You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

666 lines
23 KiB

25 years ago
Remove exception hooks in favor of real C++ exceptions: * include/cln/exception.h: New file... * include/cln/cln.h: ...included here... * include/cln/rational.h: ...and here. * include/cln/abort.h: Removed. * include/cln/integer.h (ash_exception, exquo_exception): Add exception types. * include/cln/float.h (floating_point_exception, floating_point_nan_exception, floating_point_overflow_exception, floating_point_underflow_exception): Likewise. * include/cln/number_io.h (read_number_exception, read_number_bad_syntax_exception, read_number_junk_exception, read_number_eof_exception): Likewise. * include/cln/object.h (CL_DEFINE_CONVERTER): Replace dynamic assertion with a compile-time assertion. * include/cln/GV.h: Replace nonreturning functions with exceptions. * include/cln/modinteger.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/ring.h: Likewise. * include/cln/string.h: Likewise. * include/cln/univpoly.h: Likewise. * src/base/cl_abort.cc: Removed. * src/base/cl_N_err_d0.cc: Removed. * src/base/cl_d0_exception.cc: New file. * src/base/cl_as_err.cc: Removed. * src/base/cl_as_exception.cc: New file. * src/base/cl_notreached.cc: Removed. * src/base/cl_notreached_exception.cc: New file. * src/base/input/cl_read_err_bad.cc: Removed. * src/base/input/cl_read_bad_syntax_exception.cc: New file. * src/base/input/cl_read_err_junk.cc: Removed. * src/base/input/cl_read_junk_exception.cc: New file. * src/base/input/cl_read_err_eof.cc: Removed. * src/base/input/cl_read_eof_exception.cc: New file. * src/base/cl_N.h (cl_as_error): Removed (see cln/exception.h). * src/base/macros.h (NOTREACHED): Throw. * src/base/cl_malloc.cc (xmalloc): Throw. * src/base/digitseq/cl_2DS_div.cc: Throw. * src/base/digitseq/cl_DS_div.cc: Throw. * src/base/digitseq/cl_DS_mul.cc: Throw. * src/base/digitseq/cl_DS_mul_fftc.h: Throw. * src/base/digitseq/cl_DS_mul_fftcs.h: Throw. * src/base/digitseq/cl_DS_mul_fftm.h: Throw. * src/base/digitseq/cl_DS_mul_fftp.h: Throw. * src/base/digitseq/cl_DS_mul_fftp3.h: Throw. * src/base/digitseq/cl_DS_mul_fftp3m.h: Throw. * src/base/digitseq/cl_DS_mul_fftr.h: Throw. * src/base/digitseq/cl_DS_mul_nuss.h: Throw. * src/base/digitseq/cl_DS_recipsqrt.cc: Throw. * src/base/digitseq/cl_DS_sqrt.cc: Throw. * src/base/hash/cl_hash.h: Throw. * src/base/hash/cl_hash1.h: Throw. * src/base/hash/cl_hash1weak.h: Throw. * src/base/hash/cl_hash2.h: Throw. * src/base/hash/cl_hash2weak.h: Throw. * src/base/hash/cl_hashset.h: Throw. * src/base/hash/cl_hashuniq.h: Throw. * src/base/hash/cl_hashuniqweak.h: Throw. * src/base/proplist/cl_pl_add.cc: Throw. * src/base/ring/cl_no_ring.cc: Throw. * src/base/string/cl_spushstring.h: Throw. * src/base/symbol/cl_symbol.cc: Throw. * src/integer/bitwise/cl_I_ash.h: Removed (see cln/integer.h.) * src/integer/bitwise/cl_I_asherr.cc: Removed. * src/integer/bitwise/cl_I_ash_exception.cc: New file. * src/integer/division/cl_I_exquoerr.cc: Removed. * src/integer/division/cl_I_exquo_exception.cc: New file. * src/integer/cl_I.h: Throw. * src/integer/division/cl_I_exquopos.cc: Throw. * src/integer/bitwise/cl_I_logbitp_I.cc: Throw. * src/integer/bitwise/cl_I_ash.cc: Throw. * src/integer/bitwise/cl_I_ash_I.cc: Throw. * src/integer/division/cl_I_exquo.cc: Throw. * src/integer/gcd/cl_I_gcd_aux2.cc: Throw. * src/integer/conv/cl_I_to_L.cc: Throw. * src/integer/conv/cl_I_to_Q.cc: Throw. * src/integer/conv/cl_I_to_UL.cc: Throw. * src/integer/conv/cl_I_to_UQ.cc: Throw. * src/integer/conv/cl_I_to_digits.cc: Throw. * src/integer/elem/cl_I_div.cc: Throw. * src/integer/algebraic/cl_I_sqrt.cc: Throw. * src/integer/input/cl_I_read.cc: Throw. * src/integer/input/cl_I_read_stream.cc: Throw. * src/integer/misc/cl_I_as.cc: Throw. * src/rational/elem/cl_RA_from_I_I_div.cc: Throw. * src/rational/elem/cl_RA_recip.cc: Throw. * src/rational/input/cl_RA_read.cc: Throw. * src/rational/input/cl_RA_read_stream.cc: Throw. * src/rational/input/cl_RA_readparsed.cc: Throw. * src/rational/misc/cl_RA_as.cc: Throw. * src/float/base/cl_F_err_nan.cc: Removed. * src/float/base/cl_F_nan_exception.cc: New file. * src/float/base/cl_F_err_un.cc: Removed. * src/float/base/cl_F_underflow_exception.cc: New file. * src/float/base/cl_F_err_ov.cc: Removed. * src/float/base/cl_F_overflow_exception.cc: New file. * src/float/cl_F.h (cl_error_floating_point_nan, cl_error_floating_point_overflow, cl_error_floating_point_underflow): Removed (see cln/float.h.) * src/float/sfloat/cl_SF.h: Throw. * src/float/sfloat/elem/cl_SF_div.cc: Throw. * src/float/sfloat/elem/cl_SF_from_RA.cc: Throw. * src/float/sfloat/elem/cl_SF_scale.cc: Throw. * src/float/sfloat/elem/cl_SF_scale_I.cc: Throw. * src/float/sfloat/misc/cl_SF_as.cc: Throw. * src/float/ffloat/cl_FF.h: Throw. * src/float/ffloat/conv/cl_FF_from_float.cc: Throw. * src/float/ffloat/elem/cl_FF_div.cc: Throw. * src/float/ffloat/elem/cl_FF_from_RA.cc: Throw. * src/float/ffloat/elem/cl_FF_scale.cc: Throw. * src/float/ffloat/elem/cl_FF_scale_I.cc: Throw. * src/float/ffloat/misc/cl_FF_as.cc: Throw. * src/float/dfloat/cl_DF.h: Throw. * src/float/dfloat/conv/cl_DF_from_double.cc: Throw. * src/float/dfloat/elem/cl_DF_div.cc: Throw. * src/float/dfloat/elem/cl_DF_from_RA.cc: Throw. * src/float/dfloat/elem/cl_DF_scale.cc: Throw. * src/float/dfloat/elem/cl_DF_scale_I.cc: Throw. * src/float/dfloat/misc/cl_DF_as.cc: Throw. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Throw. * src/float/lfloat/elem/cl_LF_1plus.cc: Throw. * src/float/lfloat/elem/cl_LF_I_div.cc: Throw. * src/float/lfloat/elem/cl_LF_I_mul.cc: Throw. * src/float/lfloat/elem/cl_LF_div.cc: Throw. * src/float/lfloat/elem/cl_LF_from_I.cc: Throw. * src/float/lfloat/elem/cl_LF_mul.cc: Throw. * src/float/lfloat/elem/cl_LF_scale.cc: Throw. * src/float/lfloat/elem/cl_LF_scale_I.cc: Throw. * src/float/lfloat/elem/cl_LF_square.cc: Throw. * src/float/lfloat/misc/cl_LF_as.cc: Throw. * src/float/lfloat/misc/cl_LF_shorten.cc: Throw. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Throw. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Throw. * src/float/input/cl_F_read.cc: Throw. * src/float/input/cl_F_read_stream.cc: Throw. * src/float/misc/cl_F_as.cc: Throw. * src/float/misc/cl_F_shortenrel.cc: Throw. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Throw. * src/float/transcendental/cl_LF_cossin_aux.cc: Throw. * src/float/transcendental/cl_LF_exp_aux.cc: Throw. * src/float/transcendental/cl_LF_ratseries_a.cc: Throw. * src/float/transcendental/cl_LF_ratseries_ab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_b.cc: Throw. * src/float/transcendental/cl_LF_ratseries_p.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pb.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pq.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Throw. * src/float/transcendental/cl_LF_ratseries_q.cc: Throw. * src/float/transcendental/cl_LF_ratseries_qa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_qab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_qb.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Throw. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Throw. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Throw. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Throw. * src/float/transcendental/cl_LF_zeta_int.cc: Throw. * src/real/elem/cl_R_div.cc: Throw. * src/real/format-output/cl_fmt_cardinal.cc: Throw. * src/real/format-output/cl_fmt_newroman.cc: Throw. * src/real/format-output/cl_fmt_oldroman.cc: Throw. * src/real/input/cl_R_read.cc: Throw. * src/real/input/cl_R_read_stream.cc: Throw. * src/real/misc/cl_R_as.cc: Throw. * src/real/random/cl_R_random.cc: Throw. * src/real/transcendental/cl_R_atan2.cc: Throw. * src/real/transcendental/cl_R_log.cc: Throw. * src/complex/input/cl_N_read.cc: Throw. * src/complex/input/cl_N_read_stream.cc: Throw. * src/complex/misc/cl_N_as.cc: Throw. * src/complex/transcendental/cl_C_atanh_aux.cc: Throw. * src/complex/transcendental/cl_C_expt_C.cc: Throw. * src/complex/transcendental/cl_C_log.cc: Throw. * src/complex/transcendental/cl_C_log2.cc: Throw. * src/numtheory/cl_nt_cornacchia1.cc: Throw. * src/numtheory/cl_nt_cornacchia4.cc: Throw. * src/numtheory/cl_nt_isprobprime.cc: Throw. * src/numtheory/cl_nt_jacobi.cc: Throw. * src/numtheory/cl_nt_jacobi_low.cc: Throw. * src/numtheory/cl_nt_sqrtmodp.cc: Throw. * src/modinteger/cl_MI.cc: Throw. * src/modinteger/cl_MI_int.h: Throw. * src/modinteger/cl_MI_montgom.h: Throw. * src/modinteger/cl_MI_pow2.h: Throw. * src/modinteger/cl_MI_rshift.cc: Throw. * src/modinteger/cl_MI_std.h: Throw. * src/polynomial/elem/cl_UP_GF2.h: Throw. * src/polynomial/elem/cl_UP_MI.h: Throw. * src/polynomial/elem/cl_UP_gen.h: Throw. * src/polynomial/elem/cl_UP_named.cc: Throw. * src/polynomial/elem/cl_UP_no_ring.cc (uninitialized_error, uninitialized_ring): Removed (see cln/ring.h.) * src/polynomial/elem/cl_UP_number.h: Throw. * src/polynomial/elem/cl_UP_unnamed.cc: Throw. * src/vector/cl_GV_I.cc: Throw. * src/vector/cl_GV_number.cc: Throw. * tests/timediv2adic-compare.cc: Use default abort(), not cl_abort(). * tests/timeprint-compare.cc: Likewise. * tests/timerecip2adic-compare.cc: Likewise. * doc/cln.tex: Document the exception classes. * examples/contfrac.cc: Use try/catch instead of setjmp/longjmp. * INSTALL: undocument -fno-exceptions. * README: Add exceptions to list of used C++ features.
18 years ago
25 years ago
25 years ago
25 years ago
Extend the exponent range from 32 bits to 64 bits on selected platforms. * include/cln/number.h: Add signatures for operations with long long. * include/cln/complex_class.h: Likewise. * include/cln/real_class.h: Likewise. * include/cln/real.h: Likewise. * include/cln/rational_class.h: Likewise. * include/cln/rational.h: Likewise. * include/cln/integer_class.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/float.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/types.h (sintE and uintE): New types for exponents. * include/cln/*float.h: Use the new types for exponents. * include/cln/floatformat.h (float_format_t): Make underlying type compatible with sintE. * doc/cln.tex: Document changed float_exponent return value. * src/float/cl_F.h: Likewise. * src/float/ffloat/misc/cl_FF_exponent.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/cl_LF.h: Likewise. * src/float/lfloat/cl_LF_impl.h: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_compare.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_square.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_decode.cc: Likewise. * src/float/lfloat/misc/cl_LF_exponent.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_decode.cc: Likewise. * src/float/misc/cl_F_exponent.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/misc/cl_float_format.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/sfloat/misc/cl_SF_exponent.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/complex/algebraic/cl_LF_hypot.cc: Likewise. * src/complex/elem/division/cl_C_LF_recip.cc: Likewise. * src/float/dfloat/misc/cl_DF_exponent.cc: Likewise. * src/integer/conv/cl_I_from_Q2.cc: Added. * src/base/cl_low.h (isqrtC): New function, for 64 bit falls back to... * src/base/low/cl_low_isqrt.cc (isqrt): ...this new implementation. * src/base/cl_macros.h (bitc): Make sure 64 bit is used if required by exponent operations. * examples/pi.cc: Support more than 646456614 decimal digits.
18 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
Remove exception hooks in favor of real C++ exceptions: * include/cln/exception.h: New file... * include/cln/cln.h: ...included here... * include/cln/rational.h: ...and here. * include/cln/abort.h: Removed. * include/cln/integer.h (ash_exception, exquo_exception): Add exception types. * include/cln/float.h (floating_point_exception, floating_point_nan_exception, floating_point_overflow_exception, floating_point_underflow_exception): Likewise. * include/cln/number_io.h (read_number_exception, read_number_bad_syntax_exception, read_number_junk_exception, read_number_eof_exception): Likewise. * include/cln/object.h (CL_DEFINE_CONVERTER): Replace dynamic assertion with a compile-time assertion. * include/cln/GV.h: Replace nonreturning functions with exceptions. * include/cln/modinteger.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/ring.h: Likewise. * include/cln/string.h: Likewise. * include/cln/univpoly.h: Likewise. * src/base/cl_abort.cc: Removed. * src/base/cl_N_err_d0.cc: Removed. * src/base/cl_d0_exception.cc: New file. * src/base/cl_as_err.cc: Removed. * src/base/cl_as_exception.cc: New file. * src/base/cl_notreached.cc: Removed. * src/base/cl_notreached_exception.cc: New file. * src/base/input/cl_read_err_bad.cc: Removed. * src/base/input/cl_read_bad_syntax_exception.cc: New file. * src/base/input/cl_read_err_junk.cc: Removed. * src/base/input/cl_read_junk_exception.cc: New file. * src/base/input/cl_read_err_eof.cc: Removed. * src/base/input/cl_read_eof_exception.cc: New file. * src/base/cl_N.h (cl_as_error): Removed (see cln/exception.h). * src/base/macros.h (NOTREACHED): Throw. * src/base/cl_malloc.cc (xmalloc): Throw. * src/base/digitseq/cl_2DS_div.cc: Throw. * src/base/digitseq/cl_DS_div.cc: Throw. * src/base/digitseq/cl_DS_mul.cc: Throw. * src/base/digitseq/cl_DS_mul_fftc.h: Throw. * src/base/digitseq/cl_DS_mul_fftcs.h: Throw. * src/base/digitseq/cl_DS_mul_fftm.h: Throw. * src/base/digitseq/cl_DS_mul_fftp.h: Throw. * src/base/digitseq/cl_DS_mul_fftp3.h: Throw. * src/base/digitseq/cl_DS_mul_fftp3m.h: Throw. * src/base/digitseq/cl_DS_mul_fftr.h: Throw. * src/base/digitseq/cl_DS_mul_nuss.h: Throw. * src/base/digitseq/cl_DS_recipsqrt.cc: Throw. * src/base/digitseq/cl_DS_sqrt.cc: Throw. * src/base/hash/cl_hash.h: Throw. * src/base/hash/cl_hash1.h: Throw. * src/base/hash/cl_hash1weak.h: Throw. * src/base/hash/cl_hash2.h: Throw. * src/base/hash/cl_hash2weak.h: Throw. * src/base/hash/cl_hashset.h: Throw. * src/base/hash/cl_hashuniq.h: Throw. * src/base/hash/cl_hashuniqweak.h: Throw. * src/base/proplist/cl_pl_add.cc: Throw. * src/base/ring/cl_no_ring.cc: Throw. * src/base/string/cl_spushstring.h: Throw. * src/base/symbol/cl_symbol.cc: Throw. * src/integer/bitwise/cl_I_ash.h: Removed (see cln/integer.h.) * src/integer/bitwise/cl_I_asherr.cc: Removed. * src/integer/bitwise/cl_I_ash_exception.cc: New file. * src/integer/division/cl_I_exquoerr.cc: Removed. * src/integer/division/cl_I_exquo_exception.cc: New file. * src/integer/cl_I.h: Throw. * src/integer/division/cl_I_exquopos.cc: Throw. * src/integer/bitwise/cl_I_logbitp_I.cc: Throw. * src/integer/bitwise/cl_I_ash.cc: Throw. * src/integer/bitwise/cl_I_ash_I.cc: Throw. * src/integer/division/cl_I_exquo.cc: Throw. * src/integer/gcd/cl_I_gcd_aux2.cc: Throw. * src/integer/conv/cl_I_to_L.cc: Throw. * src/integer/conv/cl_I_to_Q.cc: Throw. * src/integer/conv/cl_I_to_UL.cc: Throw. * src/integer/conv/cl_I_to_UQ.cc: Throw. * src/integer/conv/cl_I_to_digits.cc: Throw. * src/integer/elem/cl_I_div.cc: Throw. * src/integer/algebraic/cl_I_sqrt.cc: Throw. * src/integer/input/cl_I_read.cc: Throw. * src/integer/input/cl_I_read_stream.cc: Throw. * src/integer/misc/cl_I_as.cc: Throw. * src/rational/elem/cl_RA_from_I_I_div.cc: Throw. * src/rational/elem/cl_RA_recip.cc: Throw. * src/rational/input/cl_RA_read.cc: Throw. * src/rational/input/cl_RA_read_stream.cc: Throw. * src/rational/input/cl_RA_readparsed.cc: Throw. * src/rational/misc/cl_RA_as.cc: Throw. * src/float/base/cl_F_err_nan.cc: Removed. * src/float/base/cl_F_nan_exception.cc: New file. * src/float/base/cl_F_err_un.cc: Removed. * src/float/base/cl_F_underflow_exception.cc: New file. * src/float/base/cl_F_err_ov.cc: Removed. * src/float/base/cl_F_overflow_exception.cc: New file. * src/float/cl_F.h (cl_error_floating_point_nan, cl_error_floating_point_overflow, cl_error_floating_point_underflow): Removed (see cln/float.h.) * src/float/sfloat/cl_SF.h: Throw. * src/float/sfloat/elem/cl_SF_div.cc: Throw. * src/float/sfloat/elem/cl_SF_from_RA.cc: Throw. * src/float/sfloat/elem/cl_SF_scale.cc: Throw. * src/float/sfloat/elem/cl_SF_scale_I.cc: Throw. * src/float/sfloat/misc/cl_SF_as.cc: Throw. * src/float/ffloat/cl_FF.h: Throw. * src/float/ffloat/conv/cl_FF_from_float.cc: Throw. * src/float/ffloat/elem/cl_FF_div.cc: Throw. * src/float/ffloat/elem/cl_FF_from_RA.cc: Throw. * src/float/ffloat/elem/cl_FF_scale.cc: Throw. * src/float/ffloat/elem/cl_FF_scale_I.cc: Throw. * src/float/ffloat/misc/cl_FF_as.cc: Throw. * src/float/dfloat/cl_DF.h: Throw. * src/float/dfloat/conv/cl_DF_from_double.cc: Throw. * src/float/dfloat/elem/cl_DF_div.cc: Throw. * src/float/dfloat/elem/cl_DF_from_RA.cc: Throw. * src/float/dfloat/elem/cl_DF_scale.cc: Throw. * src/float/dfloat/elem/cl_DF_scale_I.cc: Throw. * src/float/dfloat/misc/cl_DF_as.cc: Throw. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Throw. * src/float/lfloat/elem/cl_LF_1plus.cc: Throw. * src/float/lfloat/elem/cl_LF_I_div.cc: Throw. * src/float/lfloat/elem/cl_LF_I_mul.cc: Throw. * src/float/lfloat/elem/cl_LF_div.cc: Throw. * src/float/lfloat/elem/cl_LF_from_I.cc: Throw. * src/float/lfloat/elem/cl_LF_mul.cc: Throw. * src/float/lfloat/elem/cl_LF_scale.cc: Throw. * src/float/lfloat/elem/cl_LF_scale_I.cc: Throw. * src/float/lfloat/elem/cl_LF_square.cc: Throw. * src/float/lfloat/misc/cl_LF_as.cc: Throw. * src/float/lfloat/misc/cl_LF_shorten.cc: Throw. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Throw. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Throw. * src/float/input/cl_F_read.cc: Throw. * src/float/input/cl_F_read_stream.cc: Throw. * src/float/misc/cl_F_as.cc: Throw. * src/float/misc/cl_F_shortenrel.cc: Throw. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Throw. * src/float/transcendental/cl_LF_cossin_aux.cc: Throw. * src/float/transcendental/cl_LF_exp_aux.cc: Throw. * src/float/transcendental/cl_LF_ratseries_a.cc: Throw. * src/float/transcendental/cl_LF_ratseries_ab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_b.cc: Throw. * src/float/transcendental/cl_LF_ratseries_p.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pb.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pq.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Throw. * src/float/transcendental/cl_LF_ratseries_q.cc: Throw. * src/float/transcendental/cl_LF_ratseries_qa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_qab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_qb.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Throw. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Throw. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Throw. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Throw. * src/float/transcendental/cl_LF_zeta_int.cc: Throw. * src/real/elem/cl_R_div.cc: Throw. * src/real/format-output/cl_fmt_cardinal.cc: Throw. * src/real/format-output/cl_fmt_newroman.cc: Throw. * src/real/format-output/cl_fmt_oldroman.cc: Throw. * src/real/input/cl_R_read.cc: Throw. * src/real/input/cl_R_read_stream.cc: Throw. * src/real/misc/cl_R_as.cc: Throw. * src/real/random/cl_R_random.cc: Throw. * src/real/transcendental/cl_R_atan2.cc: Throw. * src/real/transcendental/cl_R_log.cc: Throw. * src/complex/input/cl_N_read.cc: Throw. * src/complex/input/cl_N_read_stream.cc: Throw. * src/complex/misc/cl_N_as.cc: Throw. * src/complex/transcendental/cl_C_atanh_aux.cc: Throw. * src/complex/transcendental/cl_C_expt_C.cc: Throw. * src/complex/transcendental/cl_C_log.cc: Throw. * src/complex/transcendental/cl_C_log2.cc: Throw. * src/numtheory/cl_nt_cornacchia1.cc: Throw. * src/numtheory/cl_nt_cornacchia4.cc: Throw. * src/numtheory/cl_nt_isprobprime.cc: Throw. * src/numtheory/cl_nt_jacobi.cc: Throw. * src/numtheory/cl_nt_jacobi_low.cc: Throw. * src/numtheory/cl_nt_sqrtmodp.cc: Throw. * src/modinteger/cl_MI.cc: Throw. * src/modinteger/cl_MI_int.h: Throw. * src/modinteger/cl_MI_montgom.h: Throw. * src/modinteger/cl_MI_pow2.h: Throw. * src/modinteger/cl_MI_rshift.cc: Throw. * src/modinteger/cl_MI_std.h: Throw. * src/polynomial/elem/cl_UP_GF2.h: Throw. * src/polynomial/elem/cl_UP_MI.h: Throw. * src/polynomial/elem/cl_UP_gen.h: Throw. * src/polynomial/elem/cl_UP_named.cc: Throw. * src/polynomial/elem/cl_UP_no_ring.cc (uninitialized_error, uninitialized_ring): Removed (see cln/ring.h.) * src/polynomial/elem/cl_UP_number.h: Throw. * src/polynomial/elem/cl_UP_unnamed.cc: Throw. * src/vector/cl_GV_I.cc: Throw. * src/vector/cl_GV_number.cc: Throw. * tests/timediv2adic-compare.cc: Use default abort(), not cl_abort(). * tests/timeprint-compare.cc: Likewise. * tests/timerecip2adic-compare.cc: Likewise. * doc/cln.tex: Document the exception classes. * examples/contfrac.cc: Use try/catch instead of setjmp/longjmp. * INSTALL: undocument -fno-exceptions. * README: Add exceptions to list of used C++ features.
18 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
25 years ago
Extend the exponent range from 32 bits to 64 bits on selected platforms. * include/cln/number.h: Add signatures for operations with long long. * include/cln/complex_class.h: Likewise. * include/cln/real_class.h: Likewise. * include/cln/real.h: Likewise. * include/cln/rational_class.h: Likewise. * include/cln/rational.h: Likewise. * include/cln/integer_class.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/float.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/types.h (sintE and uintE): New types for exponents. * include/cln/*float.h: Use the new types for exponents. * include/cln/floatformat.h (float_format_t): Make underlying type compatible with sintE. * doc/cln.tex: Document changed float_exponent return value. * src/float/cl_F.h: Likewise. * src/float/ffloat/misc/cl_FF_exponent.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/cl_LF.h: Likewise. * src/float/lfloat/cl_LF_impl.h: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_compare.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_square.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_decode.cc: Likewise. * src/float/lfloat/misc/cl_LF_exponent.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_decode.cc: Likewise. * src/float/misc/cl_F_exponent.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/misc/cl_float_format.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/sfloat/misc/cl_SF_exponent.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/complex/algebraic/cl_LF_hypot.cc: Likewise. * src/complex/elem/division/cl_C_LF_recip.cc: Likewise. * src/float/dfloat/misc/cl_DF_exponent.cc: Likewise. * src/integer/conv/cl_I_from_Q2.cc: Added. * src/base/cl_low.h (isqrtC): New function, for 64 bit falls back to... * src/base/low/cl_low_isqrt.cc (isqrt): ...this new implementation. * src/base/cl_macros.h (bitc): Make sure 64 bit is used if required by exponent operations. * examples/pi.cc: Support more than 646456614 decimal digits.
18 years ago
25 years ago
Extend the exponent range from 32 bits to 64 bits on selected platforms. * include/cln/number.h: Add signatures for operations with long long. * include/cln/complex_class.h: Likewise. * include/cln/real_class.h: Likewise. * include/cln/real.h: Likewise. * include/cln/rational_class.h: Likewise. * include/cln/rational.h: Likewise. * include/cln/integer_class.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/float.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/types.h (sintE and uintE): New types for exponents. * include/cln/*float.h: Use the new types for exponents. * include/cln/floatformat.h (float_format_t): Make underlying type compatible with sintE. * doc/cln.tex: Document changed float_exponent return value. * src/float/cl_F.h: Likewise. * src/float/ffloat/misc/cl_FF_exponent.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/cl_LF.h: Likewise. * src/float/lfloat/cl_LF_impl.h: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_compare.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_square.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_decode.cc: Likewise. * src/float/lfloat/misc/cl_LF_exponent.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_decode.cc: Likewise. * src/float/misc/cl_F_exponent.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/misc/cl_float_format.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/sfloat/misc/cl_SF_exponent.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/complex/algebraic/cl_LF_hypot.cc: Likewise. * src/complex/elem/division/cl_C_LF_recip.cc: Likewise. * src/float/dfloat/misc/cl_DF_exponent.cc: Likewise. * src/integer/conv/cl_I_from_Q2.cc: Added. * src/base/cl_low.h (isqrtC): New function, for 64 bit falls back to... * src/base/low/cl_low_isqrt.cc (isqrt): ...this new implementation. * src/base/cl_macros.h (bitc): Make sure 64 bit is used if required by exponent operations. * examples/pi.cc: Support more than 646456614 decimal digits.
18 years ago
25 years ago
25 years ago
Extend the exponent range from 32 bits to 64 bits on selected platforms. * include/cln/number.h: Add signatures for operations with long long. * include/cln/complex_class.h: Likewise. * include/cln/real_class.h: Likewise. * include/cln/real.h: Likewise. * include/cln/rational_class.h: Likewise. * include/cln/rational.h: Likewise. * include/cln/integer_class.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/float.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/types.h (sintE and uintE): New types for exponents. * include/cln/*float.h: Use the new types for exponents. * include/cln/floatformat.h (float_format_t): Make underlying type compatible with sintE. * doc/cln.tex: Document changed float_exponent return value. * src/float/cl_F.h: Likewise. * src/float/ffloat/misc/cl_FF_exponent.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/cl_LF.h: Likewise. * src/float/lfloat/cl_LF_impl.h: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_compare.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_square.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_decode.cc: Likewise. * src/float/lfloat/misc/cl_LF_exponent.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_decode.cc: Likewise. * src/float/misc/cl_F_exponent.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/misc/cl_float_format.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/sfloat/misc/cl_SF_exponent.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/complex/algebraic/cl_LF_hypot.cc: Likewise. * src/complex/elem/division/cl_C_LF_recip.cc: Likewise. * src/float/dfloat/misc/cl_DF_exponent.cc: Likewise. * src/integer/conv/cl_I_from_Q2.cc: Added. * src/base/cl_low.h (isqrtC): New function, for 64 bit falls back to... * src/base/low/cl_low_isqrt.cc (isqrt): ...this new implementation. * src/base/cl_macros.h (bitc): Make sure 64 bit is used if required by exponent operations. * examples/pi.cc: Support more than 646456614 decimal digits.
18 years ago
25 years ago
Extend the exponent range from 32 bits to 64 bits on selected platforms. * include/cln/number.h: Add signatures for operations with long long. * include/cln/complex_class.h: Likewise. * include/cln/real_class.h: Likewise. * include/cln/real.h: Likewise. * include/cln/rational_class.h: Likewise. * include/cln/rational.h: Likewise. * include/cln/integer_class.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/float.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/types.h (sintE and uintE): New types for exponents. * include/cln/*float.h: Use the new types for exponents. * include/cln/floatformat.h (float_format_t): Make underlying type compatible with sintE. * doc/cln.tex: Document changed float_exponent return value. * src/float/cl_F.h: Likewise. * src/float/ffloat/misc/cl_FF_exponent.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/cl_LF.h: Likewise. * src/float/lfloat/cl_LF_impl.h: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_compare.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_square.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_decode.cc: Likewise. * src/float/lfloat/misc/cl_LF_exponent.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_decode.cc: Likewise. * src/float/misc/cl_F_exponent.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/misc/cl_float_format.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/sfloat/misc/cl_SF_exponent.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/complex/algebraic/cl_LF_hypot.cc: Likewise. * src/complex/elem/division/cl_C_LF_recip.cc: Likewise. * src/float/dfloat/misc/cl_DF_exponent.cc: Likewise. * src/integer/conv/cl_I_from_Q2.cc: Added. * src/base/cl_low.h (isqrtC): New function, for 64 bit falls back to... * src/base/low/cl_low_isqrt.cc (isqrt): ...this new implementation. * src/base/cl_macros.h (bitc): Make sure 64 bit is used if required by exponent operations. * examples/pi.cc: Support more than 646456614 decimal digits.
18 years ago
25 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
25 years ago
25 years ago
Extend the exponent range from 32 bits to 64 bits on selected platforms. * include/cln/number.h: Add signatures for operations with long long. * include/cln/complex_class.h: Likewise. * include/cln/real_class.h: Likewise. * include/cln/real.h: Likewise. * include/cln/rational_class.h: Likewise. * include/cln/rational.h: Likewise. * include/cln/integer_class.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/float.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/types.h (sintE and uintE): New types for exponents. * include/cln/*float.h: Use the new types for exponents. * include/cln/floatformat.h (float_format_t): Make underlying type compatible with sintE. * doc/cln.tex: Document changed float_exponent return value. * src/float/cl_F.h: Likewise. * src/float/ffloat/misc/cl_FF_exponent.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/cl_LF.h: Likewise. * src/float/lfloat/cl_LF_impl.h: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_compare.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_square.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_decode.cc: Likewise. * src/float/lfloat/misc/cl_LF_exponent.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_decode.cc: Likewise. * src/float/misc/cl_F_exponent.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/misc/cl_float_format.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/sfloat/misc/cl_SF_exponent.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/complex/algebraic/cl_LF_hypot.cc: Likewise. * src/complex/elem/division/cl_C_LF_recip.cc: Likewise. * src/float/dfloat/misc/cl_DF_exponent.cc: Likewise. * src/integer/conv/cl_I_from_Q2.cc: Added. * src/base/cl_low.h (isqrtC): New function, for 64 bit falls back to... * src/base/low/cl_low_isqrt.cc (isqrt): ...this new implementation. * src/base/cl_macros.h (bitc): Make sure 64 bit is used if required by exponent operations. * examples/pi.cc: Support more than 646456614 decimal digits.
18 years ago
25 years ago
Extend the exponent range from 32 bits to 64 bits on selected platforms. * include/cln/number.h: Add signatures for operations with long long. * include/cln/complex_class.h: Likewise. * include/cln/real_class.h: Likewise. * include/cln/real.h: Likewise. * include/cln/rational_class.h: Likewise. * include/cln/rational.h: Likewise. * include/cln/integer_class.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/float.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/types.h (sintE and uintE): New types for exponents. * include/cln/*float.h: Use the new types for exponents. * include/cln/floatformat.h (float_format_t): Make underlying type compatible with sintE. * doc/cln.tex: Document changed float_exponent return value. * src/float/cl_F.h: Likewise. * src/float/ffloat/misc/cl_FF_exponent.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/cl_LF.h: Likewise. * src/float/lfloat/cl_LF_impl.h: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_compare.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_square.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_decode.cc: Likewise. * src/float/lfloat/misc/cl_LF_exponent.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_decode.cc: Likewise. * src/float/misc/cl_F_exponent.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/misc/cl_float_format.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/sfloat/misc/cl_SF_exponent.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/complex/algebraic/cl_LF_hypot.cc: Likewise. * src/complex/elem/division/cl_C_LF_recip.cc: Likewise. * src/float/dfloat/misc/cl_DF_exponent.cc: Likewise. * src/integer/conv/cl_I_from_Q2.cc: Added. * src/base/cl_low.h (isqrtC): New function, for 64 bit falls back to... * src/base/low/cl_low_isqrt.cc (isqrt): ...this new implementation. * src/base/cl_macros.h (bitc): Make sure 64 bit is used if required by exponent operations. * examples/pi.cc: Support more than 646456614 decimal digits.
18 years ago
25 years ago
25 years ago
25 years ago
25 years ago
Remove exception hooks in favor of real C++ exceptions: * include/cln/exception.h: New file... * include/cln/cln.h: ...included here... * include/cln/rational.h: ...and here. * include/cln/abort.h: Removed. * include/cln/integer.h (ash_exception, exquo_exception): Add exception types. * include/cln/float.h (floating_point_exception, floating_point_nan_exception, floating_point_overflow_exception, floating_point_underflow_exception): Likewise. * include/cln/number_io.h (read_number_exception, read_number_bad_syntax_exception, read_number_junk_exception, read_number_eof_exception): Likewise. * include/cln/object.h (CL_DEFINE_CONVERTER): Replace dynamic assertion with a compile-time assertion. * include/cln/GV.h: Replace nonreturning functions with exceptions. * include/cln/modinteger.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/ring.h: Likewise. * include/cln/string.h: Likewise. * include/cln/univpoly.h: Likewise. * src/base/cl_abort.cc: Removed. * src/base/cl_N_err_d0.cc: Removed. * src/base/cl_d0_exception.cc: New file. * src/base/cl_as_err.cc: Removed. * src/base/cl_as_exception.cc: New file. * src/base/cl_notreached.cc: Removed. * src/base/cl_notreached_exception.cc: New file. * src/base/input/cl_read_err_bad.cc: Removed. * src/base/input/cl_read_bad_syntax_exception.cc: New file. * src/base/input/cl_read_err_junk.cc: Removed. * src/base/input/cl_read_junk_exception.cc: New file. * src/base/input/cl_read_err_eof.cc: Removed. * src/base/input/cl_read_eof_exception.cc: New file. * src/base/cl_N.h (cl_as_error): Removed (see cln/exception.h). * src/base/macros.h (NOTREACHED): Throw. * src/base/cl_malloc.cc (xmalloc): Throw. * src/base/digitseq/cl_2DS_div.cc: Throw. * src/base/digitseq/cl_DS_div.cc: Throw. * src/base/digitseq/cl_DS_mul.cc: Throw. * src/base/digitseq/cl_DS_mul_fftc.h: Throw. * src/base/digitseq/cl_DS_mul_fftcs.h: Throw. * src/base/digitseq/cl_DS_mul_fftm.h: Throw. * src/base/digitseq/cl_DS_mul_fftp.h: Throw. * src/base/digitseq/cl_DS_mul_fftp3.h: Throw. * src/base/digitseq/cl_DS_mul_fftp3m.h: Throw. * src/base/digitseq/cl_DS_mul_fftr.h: Throw. * src/base/digitseq/cl_DS_mul_nuss.h: Throw. * src/base/digitseq/cl_DS_recipsqrt.cc: Throw. * src/base/digitseq/cl_DS_sqrt.cc: Throw. * src/base/hash/cl_hash.h: Throw. * src/base/hash/cl_hash1.h: Throw. * src/base/hash/cl_hash1weak.h: Throw. * src/base/hash/cl_hash2.h: Throw. * src/base/hash/cl_hash2weak.h: Throw. * src/base/hash/cl_hashset.h: Throw. * src/base/hash/cl_hashuniq.h: Throw. * src/base/hash/cl_hashuniqweak.h: Throw. * src/base/proplist/cl_pl_add.cc: Throw. * src/base/ring/cl_no_ring.cc: Throw. * src/base/string/cl_spushstring.h: Throw. * src/base/symbol/cl_symbol.cc: Throw. * src/integer/bitwise/cl_I_ash.h: Removed (see cln/integer.h.) * src/integer/bitwise/cl_I_asherr.cc: Removed. * src/integer/bitwise/cl_I_ash_exception.cc: New file. * src/integer/division/cl_I_exquoerr.cc: Removed. * src/integer/division/cl_I_exquo_exception.cc: New file. * src/integer/cl_I.h: Throw. * src/integer/division/cl_I_exquopos.cc: Throw. * src/integer/bitwise/cl_I_logbitp_I.cc: Throw. * src/integer/bitwise/cl_I_ash.cc: Throw. * src/integer/bitwise/cl_I_ash_I.cc: Throw. * src/integer/division/cl_I_exquo.cc: Throw. * src/integer/gcd/cl_I_gcd_aux2.cc: Throw. * src/integer/conv/cl_I_to_L.cc: Throw. * src/integer/conv/cl_I_to_Q.cc: Throw. * src/integer/conv/cl_I_to_UL.cc: Throw. * src/integer/conv/cl_I_to_UQ.cc: Throw. * src/integer/conv/cl_I_to_digits.cc: Throw. * src/integer/elem/cl_I_div.cc: Throw. * src/integer/algebraic/cl_I_sqrt.cc: Throw. * src/integer/input/cl_I_read.cc: Throw. * src/integer/input/cl_I_read_stream.cc: Throw. * src/integer/misc/cl_I_as.cc: Throw. * src/rational/elem/cl_RA_from_I_I_div.cc: Throw. * src/rational/elem/cl_RA_recip.cc: Throw. * src/rational/input/cl_RA_read.cc: Throw. * src/rational/input/cl_RA_read_stream.cc: Throw. * src/rational/input/cl_RA_readparsed.cc: Throw. * src/rational/misc/cl_RA_as.cc: Throw. * src/float/base/cl_F_err_nan.cc: Removed. * src/float/base/cl_F_nan_exception.cc: New file. * src/float/base/cl_F_err_un.cc: Removed. * src/float/base/cl_F_underflow_exception.cc: New file. * src/float/base/cl_F_err_ov.cc: Removed. * src/float/base/cl_F_overflow_exception.cc: New file. * src/float/cl_F.h (cl_error_floating_point_nan, cl_error_floating_point_overflow, cl_error_floating_point_underflow): Removed (see cln/float.h.) * src/float/sfloat/cl_SF.h: Throw. * src/float/sfloat/elem/cl_SF_div.cc: Throw. * src/float/sfloat/elem/cl_SF_from_RA.cc: Throw. * src/float/sfloat/elem/cl_SF_scale.cc: Throw. * src/float/sfloat/elem/cl_SF_scale_I.cc: Throw. * src/float/sfloat/misc/cl_SF_as.cc: Throw. * src/float/ffloat/cl_FF.h: Throw. * src/float/ffloat/conv/cl_FF_from_float.cc: Throw. * src/float/ffloat/elem/cl_FF_div.cc: Throw. * src/float/ffloat/elem/cl_FF_from_RA.cc: Throw. * src/float/ffloat/elem/cl_FF_scale.cc: Throw. * src/float/ffloat/elem/cl_FF_scale_I.cc: Throw. * src/float/ffloat/misc/cl_FF_as.cc: Throw. * src/float/dfloat/cl_DF.h: Throw. * src/float/dfloat/conv/cl_DF_from_double.cc: Throw. * src/float/dfloat/elem/cl_DF_div.cc: Throw. * src/float/dfloat/elem/cl_DF_from_RA.cc: Throw. * src/float/dfloat/elem/cl_DF_scale.cc: Throw. * src/float/dfloat/elem/cl_DF_scale_I.cc: Throw. * src/float/dfloat/misc/cl_DF_as.cc: Throw. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Throw. * src/float/lfloat/elem/cl_LF_1plus.cc: Throw. * src/float/lfloat/elem/cl_LF_I_div.cc: Throw. * src/float/lfloat/elem/cl_LF_I_mul.cc: Throw. * src/float/lfloat/elem/cl_LF_div.cc: Throw. * src/float/lfloat/elem/cl_LF_from_I.cc: Throw. * src/float/lfloat/elem/cl_LF_mul.cc: Throw. * src/float/lfloat/elem/cl_LF_scale.cc: Throw. * src/float/lfloat/elem/cl_LF_scale_I.cc: Throw. * src/float/lfloat/elem/cl_LF_square.cc: Throw. * src/float/lfloat/misc/cl_LF_as.cc: Throw. * src/float/lfloat/misc/cl_LF_shorten.cc: Throw. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Throw. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Throw. * src/float/input/cl_F_read.cc: Throw. * src/float/input/cl_F_read_stream.cc: Throw. * src/float/misc/cl_F_as.cc: Throw. * src/float/misc/cl_F_shortenrel.cc: Throw. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Throw. * src/float/transcendental/cl_LF_cossin_aux.cc: Throw. * src/float/transcendental/cl_LF_exp_aux.cc: Throw. * src/float/transcendental/cl_LF_ratseries_a.cc: Throw. * src/float/transcendental/cl_LF_ratseries_ab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_b.cc: Throw. * src/float/transcendental/cl_LF_ratseries_p.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pb.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pq.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Throw. * src/float/transcendental/cl_LF_ratseries_q.cc: Throw. * src/float/transcendental/cl_LF_ratseries_qa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_qab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_qb.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Throw. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Throw. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Throw. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Throw. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Throw. * src/float/transcendental/cl_LF_zeta_int.cc: Throw. * src/real/elem/cl_R_div.cc: Throw. * src/real/format-output/cl_fmt_cardinal.cc: Throw. * src/real/format-output/cl_fmt_newroman.cc: Throw. * src/real/format-output/cl_fmt_oldroman.cc: Throw. * src/real/input/cl_R_read.cc: Throw. * src/real/input/cl_R_read_stream.cc: Throw. * src/real/misc/cl_R_as.cc: Throw. * src/real/random/cl_R_random.cc: Throw. * src/real/transcendental/cl_R_atan2.cc: Throw. * src/real/transcendental/cl_R_log.cc: Throw. * src/complex/input/cl_N_read.cc: Throw. * src/complex/input/cl_N_read_stream.cc: Throw. * src/complex/misc/cl_N_as.cc: Throw. * src/complex/transcendental/cl_C_atanh_aux.cc: Throw. * src/complex/transcendental/cl_C_expt_C.cc: Throw. * src/complex/transcendental/cl_C_log.cc: Throw. * src/complex/transcendental/cl_C_log2.cc: Throw. * src/numtheory/cl_nt_cornacchia1.cc: Throw. * src/numtheory/cl_nt_cornacchia4.cc: Throw. * src/numtheory/cl_nt_isprobprime.cc: Throw. * src/numtheory/cl_nt_jacobi.cc: Throw. * src/numtheory/cl_nt_jacobi_low.cc: Throw. * src/numtheory/cl_nt_sqrtmodp.cc: Throw. * src/modinteger/cl_MI.cc: Throw. * src/modinteger/cl_MI_int.h: Throw. * src/modinteger/cl_MI_montgom.h: Throw. * src/modinteger/cl_MI_pow2.h: Throw. * src/modinteger/cl_MI_rshift.cc: Throw. * src/modinteger/cl_MI_std.h: Throw. * src/polynomial/elem/cl_UP_GF2.h: Throw. * src/polynomial/elem/cl_UP_MI.h: Throw. * src/polynomial/elem/cl_UP_gen.h: Throw. * src/polynomial/elem/cl_UP_named.cc: Throw. * src/polynomial/elem/cl_UP_no_ring.cc (uninitialized_error, uninitialized_ring): Removed (see cln/ring.h.) * src/polynomial/elem/cl_UP_number.h: Throw. * src/polynomial/elem/cl_UP_unnamed.cc: Throw. * src/vector/cl_GV_I.cc: Throw. * src/vector/cl_GV_number.cc: Throw. * tests/timediv2adic-compare.cc: Use default abort(), not cl_abort(). * tests/timeprint-compare.cc: Likewise. * tests/timerecip2adic-compare.cc: Likewise. * doc/cln.tex: Document the exception classes. * examples/contfrac.cc: Use try/catch instead of setjmp/longjmp. * INSTALL: undocument -fno-exceptions. * README: Add exceptions to list of used C++ features.
18 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
2006-04-25 Bruno Haible <bruno@clisp.org> Richard B. Kreckel <kreckel@ginac.de> Make it theoretically possible to use bignums and long-floats with more than 2^32 significant digits or bits. * doc/cln.tex (logcount): Change return type to uintC. (struct cl_byte): Change elements to uintC. (integer_length, ord2, power2p): Change return type to uintC. (scale_float): Change argument type to sintC. (float_digits, float_precision): Change return type to uintC. * examples/atan_recip.cc: Use uintC instead of uintL where appropriate. * examples/atanh_recip.cc: Likewise. * include/cln/GV.h: Likewise. * include/cln/GV_complex.h: Likewise. * include/cln/GV_integer.h: Likewise. * include/cln/GV_modinteger.h: Likewise. * include/cln/GV_number.h: Likewise. * include/cln/GV_rational.h: Likewise. * include/cln/GV_real.h: Likewise. * include/cln/SV.h: Likewise. * include/cln/SV_complex.h: Likewise. * include/cln/SV_integer.h: Likewise. * include/cln/SV_number.h: Likewise. * include/cln/SV_rational.h: Likewise. * include/cln/SV_real.h: Likewise. * include/cln/SV_ringelt.h: Likewise. * include/cln/dfloat.h: Likewise. * include/cln/ffloat.h: Likewise. * include/cln/float.h: Likewise. * include/cln/integer.h: Likewise. * include/cln/lfloat.h: Likewise. * include/cln/modinteger.h: Likewise. * include/cln/sfloat.h: Likewise. * src/base/cl_low.h (integerlengthC): New macro. * src/base/digitseq/cl_2DS_div.cc: Use uintC instead of uintL where appropriate. * src/base/digitseq/cl_2DS_recip.cc: Likewise. * src/base/digitseq/cl_DS.h: Likewise. * src/base/digitseq/cl_DS_mul.c: Likewise. * src/base/digitseq/cl_DS_mul_fftc.h: Likewise. * src/base/digitseq/cl_DS_mul_fftcs.h: Likewise. * src/base/digitseq/cl_DS_mul_fftm.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3.h: Likewise. * src/base/digitseq/cl_DS_mul_fftp3m.h: Likewise. * src/base/digitseq/cl_DS_mul_fftr.h: Likewise. * src/base/digitseq/cl_DS_mul_kara.h: Likewise. * src/base/digitseq/cl_DS_mul_nuss.h: Likewise. * src/base/digitseq/cl_DS_recip.cc: Likewise. * src/base/digitseq/cl_DS_recipsqrt.cc: Likewise. * src/base/digitseq/cl_DS_sqrt.cc: Likewise. * src/base/digitseq/cl_DS_trandom.cc: Likewise. * src/complex/input/cl_N_read.cc: Likewise. * src/complex/transcendental/cl_C_asinh_aux.cc: Likewise. * src/complex/transcendental/cl_C_expt_C.cc: Likewise. * src/float/cl_F.h: Likewise. * src/float/conv/cl_F_from_F_f.cc: Likewise. * src/float/conv/cl_F_from_I_f.cc: Likewise. * src/float/conv/cl_F_from_RA_f.cc: Likewise. * src/float/dfloat/conv/cl_I_to_double.cc: Likewise. * src/float/dfloat/conv/cl_RA_to_double.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_I.cc: Likewise. * src/float/dfloat/elem/cl_DF_from_RA.cc: Likewise. * src/float/dfloat/elem/cl_DF_scale.cc: Likewise. * src/float/dfloat/misc/cl_DF_digits.cc: Likewise. * src/float/dfloat/misc/cl_DF_precision.cc: Likewise. * src/float/elem/cl_F_scale.cc: Likewise. * src/float/ffloat/conv/cl_I_to_float.cc: Likewise. * src/float/ffloat/conv/cl_RA_to_float.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_I.cc: Likewise. * src/float/ffloat/elem/cl_FF_from_RA.cc: Likewise. * src/float/ffloat/elem/cl_FF_scale.cc: Likewise. * src/float/ffloat/misc/cl_FF_digits.cc: Likewise. * src/float/ffloat/misc/cl_FF_precision.cc: Likewise. * src/float/input/cl_F_read.cc: Likewise. * src/float/lfloat/algebraic/cl_LF_sqrt.cc: Likewise. * src/float/lfloat/elem/cl_LF_1plus.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_I_mul.cc: Likewise. * src/float/lfloat/elem/cl_LF_div.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_I.cc: Likewise. * src/float/lfloat/elem/cl_LF_from_RA.cc: Likewise. * src/float/lfloat/elem/cl_LF_fround.cc: Likewise. * src/float/lfloat/elem/cl_LF_ftrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_futrunc.cc: Likewise. * src/float/lfloat/elem/cl_LF_scale.cc: Likewise. * src/float/lfloat/elem/cl_LF_to_I.cc: Likewise. * src/float/lfloat/misc/cl_LF_digits.cc: Likewise. * src/float/lfloat/misc/cl_LF_idecode.cc: Likewise. * src/float/lfloat/misc/cl_LF_leninc.cc: Likewise. * src/float/lfloat/misc/cl_LF_lenincx.cc: Likewise. * src/float/lfloat/misc/cl_LF_precision.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenrel.cc: Likewise. * src/float/lfloat/misc/cl_LF_shortenwith.cc: Likewise. * src/float/misc/cl_F_digits.cc: Likewise. * src/float/misc/cl_F_epsneg.cc: Likewise. * src/float/misc/cl_F_epspos.cc: Likewise. * src/float/misc/cl_F_leastneg.cc: Likewise. * src/float/misc/cl_F_leastpos.cc: Likewise. * src/float/misc/cl_F_mostneg.cc: Likewise. * src/float/misc/cl_F_mostpos.cc: Likewise. * src/float/misc/cl_F_precision.cc: Likewise. * src/float/misc/cl_F_rational.cc: Likewise. * src/float/misc/cl_F_shortenrel.cc: Likewise. * src/float/output/cl_F_dprint.cc: Likewise. * src/float/random/cl_F_random.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_I.cc: Likewise. * src/float/sfloat/elem/cl_SF_from_RA.cc: Likewise. * src/float/sfloat/elem/cl_SF_scale.cc: Likewise. * src/float/sfloat/misc/cl_SF_digits.cc: Likewise. * src/float/sfloat/misc/cl_SF_precision.cc: Likewise. * src/float/transcendental/cl_F_atanhx.cc: Likewise. * src/float/transcendental/cl_F_atanx.cc: Likewise. * src/float/transcendental/cl_F_catalanconst_f.cc: Likewise. * src/float/transcendental/cl_F_cos.cc: Likewise. * src/float/transcendental/cl_F_cosh.cc: Likewise. * src/float/transcendental/cl_F_coshsinh.cc: Likewise. * src/float/transcendental/cl_F_cossin.cc: Likewise. * src/float/transcendental/cl_F_eulerconst_f.cc: Likewise. * src/float/transcendental/cl_F_exp1_f.cc: Likewise. * src/float/transcendental/cl_F_expx.cc: Likewise. * src/float/transcendental/cl_F_ln10_f.cc: Likewise. * src/float/transcendental/cl_F_ln2_f.cc: Likewise. * src/float/transcendental/cl_F_lnx.cc: Likewise. * src/float/transcendental/cl_F_pi_f.cc: Likewise. * src/float/transcendental/cl_F_sin.cc: Likewise. * src/float/transcendental/cl_F_sinh.cc: Likewise. * src/float/transcendental/cl_F_sinhx.cc: Likewise. * src/float/transcendental/cl_F_sinx.cc: Likewise. * src/float/transcendental/cl_F_tran.h: Likewise. * src/float/transcendental/cl_F_zeta_int_f.cc: Likewise. * src/float/transcendental/cl_LF_atan_recip.cc: Likewise. * src/float/transcendental/cl_LF_atanh_recip.cc: Likewise. * src/float/transcendental/cl_LF_catalanconst.cc: Likewise. * src/float/transcendental/cl_LF_coshsinh_aux.cc: Likewise. * src/float/transcendental/cl_LF_cossin_aux.cc: Likewise. * src/float/transcendental/cl_LF_eulerconst.cc: Likewise. * src/float/transcendental/cl_LF_exp1.cc: Likewise. * src/float/transcendental/cl_LF_exp_aux.cc: Likewise. * src/float/transcendental/cl_LF_pi.cc: Likewise. * src/float/transcendental/cl_LF_ratseries.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_a.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_ab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_b.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_p.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_q.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_qb.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pq.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqa.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqab.cc: Likewise. * src/float/transcendental/cl_LF_ratseries_stream_pqb.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd.cc: Likewise. * src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc: Likewise. * src/float/transcendental/cl_LF_tran.h: Likewise. * src/float/transcendental/cl_LF_zeta3.cc: Likewise. * src/float/transcendental/cl_LF_zeta_int.cc: Likewise. * src/integer/algebraic/cl_I_rootp_I.cc: Likewise. * src/integer/algebraic/cl_I_rootp_aux.cc: Likewise. * src/integer/bitwise/cl_I_ash.cc: Likewise. * src/integer/bitwise/cl_I_ash_I.cc: Likewise. * src/integer/bitwise/cl_I_byte.h: Likewise. * src/integer/bitwise/cl_I_fullbyte.cc: Likewise. * src/integer/bitwise/cl_I_ilength.cc: Likewise. * src/integer/bitwise/cl_I_ldb.cc: Likewise. * src/integer/bitwise/cl_I_ldbtest.cc: Likewise. * src/integer/bitwise/cl_I_ldbx.cc: Likewise. * src/integer/bitwise/cl_I_ldbxtest.cc: Likewise. * src/integer/bitwise/cl_I_logbitp.cc: Likewise. * src/integer/bitwise/cl_I_logbitp_I.cc: Likewise. * src/integer/bitwise/cl_I_logcount.cc: Likewise. * src/integer/bitwise/cl_I_mkf.cc: Likewise. * src/integer/bitwise/cl_I_mkfx.cc: Likewise. * src/integer/cl_I.h: Likewise. * src/integer/conv/cl_I_to_digits.cc: Likewise. * src/integer/conv/cl_I_digits_need.cc: Likewise. * src/integer/conv/cl_I_from_digits.cc: Likewise. * src/integer/gcd/cl_I_gcd.cc: Likewise. * src/integer/gcd/cl_I_xgcd.cc: Likewise. * src/integer/misc/cl_I_eqhashcode.cc: Likewise. * src/integer/misc/cl_I_ord2.cc: Likewise. * src/integer/misc/cl_I_power2p.cc: Likewise. * src/integer/output/cl_I_cached_power.h (cached_power_table): allow for 40 elements. * src/integer/output/cl_I_decstring.cc: Use uintC instead of uintL where appropriate. * src/integer/output/cl_I_print.cc: Likewise. * src/integer/output/cl_I_print_string.cc: Likewise. * src/modinteger/cl_MI.cc: Likewise. * src/modinteger/cl_MI_lshift.cc: Likewise. * src/modinteger/cl_MI_montgom.h: Likewise. * src/modinteger/cl_MI_pow2.h: Likewise. * src/modinteger/cl_MI_pow2m1.h: Likewise. * src/modinteger/cl_MI_pow2p1.h: Likewise. * src/modinteger/cl_MI_rshift.cc: Likewise. * src/modinteger/cl_MI_std.h: Likewise. * src/numtheory/cl_IF_millerrabin.cc: Likewise. * src/numtheory/cl_nt_isprobprime.cc: Likewise. * src/numtheory/cl_nt_sqrtmodp.cc: Likewise. * src/polynomial/elem/cl_UP_GF2.h: Likewise. * src/real/conv/cl_F_from_R_f.cc: Likewise. * src/real/format-output/cl_fmt_floatstring.cc: Likewise. * src/real/input/cl_R_read.cc: Likewise. * src/vector/cl_GV_I.cc: Likewise. * src/vector/cl_GV_I_copy.cc: Likewise. * src/vector/cl_GV_number.cc: Likewise. * src/vector/cl_GV_number_copy.cc: Likewise. * src/vector/cl_SV_copy.cc: Likewise. * src/vector/cl_SV_number.cc: Likewise. * src/vector/cl_SV_ringelt.cc: Likewise. * tests/main.cc: Likewise. * tests/test_I_ilength.cc: Likewise. * tests/test_I_ord2.cc: Likewise.
19 years ago
25 years ago
25 years ago
25 years ago
25 years ago
  1. // Public integer operations.
  2. #ifndef _CL_INTEGER_H
  3. #define _CL_INTEGER_H
  4. #include "cln/number.h"
  5. #include "cln/integer_class.h"
  6. #include "cln/exception.h"
  7. #include "cln/random.h"
  8. namespace cln {
  9. CL_DEFINE_AS_CONVERSION(cl_I)
  10. // Konversion Integer >=0, <2^32 nach uintL.
  11. // Wandelt Integer >=0 in Unsigned Longword um.
  12. // cl_I_to_UL(obj)
  13. // > obj: Integer, sollte >=0, <2^32 sein
  14. // < ergebnis: der Wert des Integer als 32-Bit-Zahl.
  15. extern uint32 cl_I_to_UL (const cl_I& obj);
  16. // Konversion Integer >=-2^31, <2^31 nach sintL.
  17. // Wandelt Integer in Signed Longword um.
  18. // cl_I_to_L(obj)
  19. // > obj: Integer, sollte >=-2^31, <2^31 sein
  20. // < ergebnis: der Wert des Integer als 32-Bit-Zahl.
  21. extern sint32 cl_I_to_L (const cl_I& obj);
  22. // Convert an integer to a C `int' or `unsigned int'.
  23. #if (int_bitsize==32)
  24. inline int cl_I_to_int (const cl_I& x) { return cl_I_to_L(x); }
  25. inline unsigned int cl_I_to_uint (const cl_I& x) { return cl_I_to_UL(x); }
  26. #endif
  27. // Convert an integer to a 64-bit 'quad' type.
  28. #ifdef intQsize
  29. extern uint64 cl_I_to_UQ (const cl_I& obj);
  30. extern sint64 cl_I_to_Q (const cl_I& obj);
  31. #endif
  32. // Convert an integer to a C `long' or `unsigned long'.
  33. #if (long_bitsize==32)
  34. inline long cl_I_to_long (const cl_I& x) { return cl_I_to_L(x); }
  35. inline unsigned long cl_I_to_ulong (const cl_I& x) { return cl_I_to_UL(x); }
  36. #elif (long_bitsize==64)
  37. inline long cl_I_to_long (const cl_I& x) { return cl_I_to_Q(x); }
  38. inline unsigned long cl_I_to_ulong (const cl_I& x) { return cl_I_to_UQ(x); }
  39. #endif
  40. // Convert an integer to a counter type.
  41. #if (intCsize==long_bitsize)
  42. inline uintC cl_I_to_UC (const cl_I& x) { return cl_I_to_ulong(x); }
  43. inline sintC cl_I_to_C (const cl_I& x) { return cl_I_to_long(x); }
  44. #elif (intCsize==int_bitsize)
  45. inline uintC cl_I_to_UC (const cl_I& x) { return cl_I_to_uint(x); }
  46. inline sintC cl_I_to_C (const cl_I& x) { return cl_I_to_int(x); }
  47. #endif
  48. // Convert an integer to an exponent type.
  49. #if (intEsize==intLsize)
  50. inline uintE cl_I_to_UE (const cl_I& x) { return cl_I_to_UL(x); }
  51. inline sintE cl_I_to_E (const cl_I& x) { return cl_I_to_L(x); }
  52. #elif (intEsize==intQsize)
  53. inline uintE cl_I_to_UE (const cl_I& x) { return cl_I_to_UQ(x); }
  54. inline sintE cl_I_to_E (const cl_I& x) { return cl_I_to_Q(x); }
  55. #endif
  56. // Logische Operationen auf Integers:
  57. // (LOGIOR x y), wenn x, y Integers sind.
  58. // Ergebnis Integer.
  59. extern const cl_I logior (const cl_I& x, const cl_I& y);
  60. // (LOGXOR x y), wenn x, y Integers sind.
  61. // Ergebnis Integer.
  62. extern const cl_I logxor (const cl_I& x, const cl_I& y);
  63. // (LOGAND x y), wenn x, y Integers sind.
  64. // Ergebnis Integer.
  65. extern const cl_I logand (const cl_I& x, const cl_I& y);
  66. // (LOGEQV x y), wenn x, y Integers sind.
  67. // Ergebnis Integer.
  68. extern const cl_I logeqv (const cl_I& x, const cl_I& y);
  69. // (LOGNAND x y), wenn x, y Integers sind.
  70. // Ergebnis Integer.
  71. extern const cl_I lognand (const cl_I& x, const cl_I& y);
  72. // (LOGNOR x y), wenn x, y Integers sind.
  73. // Ergebnis Integer.
  74. extern const cl_I lognor (const cl_I& x, const cl_I& y);
  75. // (LOGANDC2 x y), wenn x, y Integers sind.
  76. // Ergebnis Integer.
  77. extern const cl_I logandc2 (const cl_I& x, const cl_I& y);
  78. // (LOGANDC1 x y), wenn x, y Integers sind.
  79. // Ergebnis Integer.
  80. inline const cl_I logandc1 (const cl_I& x, const cl_I& y)
  81. {
  82. return logandc2(y,x);
  83. }
  84. // (LOGORC2 x y), wenn x, y Integers sind.
  85. // Ergebnis Integer.
  86. extern const cl_I logorc2 (const cl_I& x, const cl_I& y);
  87. // (LOGORC1 x y), wenn x, y Integers sind.
  88. // Ergebnis Integer.
  89. inline const cl_I logorc1 (const cl_I& x, const cl_I& y)
  90. {
  91. return logorc2(y,x);
  92. }
  93. // (LOGNOT x), wenn x ein Integer sind.
  94. // Ergebnis Integer.
  95. extern const cl_I lognot (const cl_I& x);
  96. // Konstanten für BOOLE:
  97. typedef enum {
  98. boole_clr,
  99. boole_set,
  100. boole_1,
  101. boole_2,
  102. boole_c1,
  103. boole_c2,
  104. boole_and,
  105. boole_ior,
  106. boole_xor,
  107. boole_eqv,
  108. boole_nand,
  109. boole_nor,
  110. boole_andc1,
  111. boole_andc2,
  112. boole_orc1,
  113. boole_orc2
  114. } cl_boole;
  115. // (BOOLE op x y), wenn x und y Integers und op ein Objekt sind.
  116. // Ergebnis Integer.
  117. extern const cl_I boole (cl_boole op, const cl_I& x, const cl_I& y);
  118. // Prüft, ob (LOGTEST x y), wo x und y Integers sind.
  119. // (LOGTEST x y) = (NOT (ZEROP (LOGAND x y))).
  120. // < ergebnis: /=0, falls ja; =0, falls nein.
  121. extern bool logtest (const cl_I& x, const cl_I& y);
  122. // Prüft, ob (LOGBITP x y), wo x und y Integers sind.
  123. // Ergebnis: /=0, wenn ja; =0, wenn nein.
  124. extern bool logbitp (uintC x, const cl_I& y);
  125. extern bool logbitp (const cl_I& x, const cl_I& y);
  126. // Prüft, ob (ODDP x), wo x ein Integer ist.
  127. // Ergebnis: /=0, falls ja; =0, falls nein.
  128. extern bool oddp (const cl_I& x);
  129. // Prüft, ob (EVENP x), wo x ein Integer ist.
  130. // Ergebnis: /=0, falls ja; =0, falls nein.
  131. inline bool evenp (const cl_I& x)
  132. { return !oddp(x); }
  133. // (ASH x y), wo x und y Integers sind. Ergebnis Integer.
  134. extern const cl_I ash (const cl_I& x, sintC y);
  135. extern const cl_I ash (const cl_I& x, const cl_I& y);
  136. // Thrown when shift amount is too large.
  137. class ash_exception : public runtime_exception {
  138. public:
  139. explicit ash_exception (const cl_I& badamount);
  140. };
  141. // (LOGCOUNT x), wo x ein Integer ist. Ergebnis uintC.
  142. extern uintC logcount (const cl_I& x);
  143. // (INTEGER-LENGTH x), wo x ein Integer ist. Ergebnis uintC.
  144. extern uintC integer_length (const cl_I& x);
  145. // (ORD2 x) = max{n>=0: 2^n | x }, wo x ein Integer /=0 ist. Ergebnis uintC.
  146. extern uintC ord2 (const cl_I& x);
  147. // power2p(x) stellt fest, ob ein Integer x>0 eine Zweierpotenz ist.
  148. // Ergebnis: n>0, wenn x=2^(n-1), 0 sonst.
  149. extern uintC power2p (const cl_I& x);
  150. inline const cl_I operator| (const cl_I& x, const cl_I& y)
  151. { return logior(x,y); }
  152. inline const cl_I operator^ (const cl_I& x, const cl_I& y)
  153. { return logxor(x,y); }
  154. inline const cl_I operator& (const cl_I& x, const cl_I& y)
  155. { return logand(x,y); }
  156. inline const cl_I operator~ (const cl_I& x)
  157. { return lognot(x); }
  158. // This could be optimized to use in-place operations.
  159. inline cl_I& operator|= (cl_I& x, const cl_I& y) { return x = x | y; }
  160. inline cl_I& operator^= (cl_I& x, const cl_I& y) { return x = x ^ y; }
  161. inline cl_I& operator&= (cl_I& x, const cl_I& y) { return x = x & y; }
  162. // Addition/Subtraktion von Integers
  163. // (1+ x), wo x ein Integer ist. Ergebnis Integer.
  164. extern const cl_I plus1 (const cl_I& x);
  165. // (1- x), wo x ein Integer ist. Ergebnis Integer.
  166. extern const cl_I minus1 (const cl_I& x);
  167. // (+ x y), wo x und y Integers sind. Ergebnis Integer.
  168. extern const cl_I operator+ (const cl_I& x, const cl_I& y);
  169. // Dem C++-Compiler muß man auch das Folgende sagen:
  170. inline const cl_I operator+ (const int x, const cl_I& y)
  171. { return cl_I(x) + y; }
  172. inline const cl_I operator+ (const unsigned int x, const cl_I& y)
  173. { return cl_I(x) + y; }
  174. inline const cl_I operator+ (const long x, const cl_I& y)
  175. { return cl_I(x) + y; }
  176. inline const cl_I operator+ (const unsigned long x, const cl_I& y)
  177. { return cl_I(x) + y; }
  178. #ifdef HAVE_LONGLONG
  179. inline const cl_I operator+ (const long long x, const cl_I& y)
  180. { return cl_I(x) + y; }
  181. inline const cl_I operator+ (const unsigned long long x, const cl_I& y)
  182. { return cl_I(x) + y; }
  183. #endif
  184. inline const cl_I operator+ (const cl_I& x, const int y)
  185. { return x + cl_I(y); }
  186. inline const cl_I operator+ (const cl_I& x, const unsigned int y)
  187. { return x + cl_I(y); }
  188. inline const cl_I operator+ (const cl_I& x, const long y)
  189. { return x + cl_I(y); }
  190. inline const cl_I operator+ (const cl_I& x, const unsigned long y)
  191. { return x + cl_I(y); }
  192. #ifdef HAVE_LONGLONG
  193. inline const cl_I operator+ (const cl_I& x, const long long y)
  194. { return x + cl_I(y); }
  195. inline const cl_I operator+ (const cl_I& x, const unsigned long long y)
  196. { return x + cl_I(y); }
  197. #endif
  198. // (- x), wenn x ein Integer ist. Ergebnis Integer.
  199. extern const cl_I operator- (const cl_I& x);
  200. // (- x y), wo x und y Integers sind. Ergebnis Integer.
  201. extern const cl_I operator- (const cl_I& x, const cl_I& y);
  202. // Dem C++-Compiler muß man auch das Folgende sagen:
  203. inline const cl_I operator- (const int x, const cl_I& y)
  204. { return cl_I(x) - y; }
  205. inline const cl_I operator- (const unsigned int x, const cl_I& y)
  206. { return cl_I(x) - y; }
  207. inline const cl_I operator- (const long x, const cl_I& y)
  208. { return cl_I(x) - y; }
  209. inline const cl_I operator- (const unsigned long x, const cl_I& y)
  210. { return cl_I(x) - y; }
  211. #ifdef HAVE_LONGLONG
  212. inline const cl_I operator- (const long long x, const cl_I& y)
  213. { return cl_I(x) - y; }
  214. inline const cl_I operator- (const unsigned long long x, const cl_I& y)
  215. { return cl_I(x) - y; }
  216. #endif
  217. inline const cl_I operator- (const cl_I& x, const int y)
  218. { return x - cl_I(y); }
  219. inline const cl_I operator- (const cl_I& x, const unsigned int y)
  220. { return x - cl_I(y); }
  221. inline const cl_I operator- (const cl_I& x, const long y)
  222. { return x - cl_I(y); }
  223. inline const cl_I operator- (const cl_I& x, const unsigned long y)
  224. { return x - cl_I(y); }
  225. #ifdef HAVE_LONGLONG
  226. inline const cl_I operator- (const cl_I& x, const long long y)
  227. { return x - cl_I(y); }
  228. inline const cl_I operator- (const cl_I& x, const unsigned long long y)
  229. { return x - cl_I(y); }
  230. #endif
  231. // (abs x), wenn x ein Integer ist. Ergebnis Integer.
  232. extern const cl_I abs (const cl_I& x);
  233. // Shifts.
  234. inline const cl_I operator<< (const cl_I& x, sintC y) // assume 0 <= y < 2^(intCsize-1)
  235. { return ash(x,y); }
  236. inline const cl_I operator<< (const cl_I& x, const cl_I& y) // assume y >= 0
  237. { return ash(x,y); }
  238. inline const cl_I operator>> (const cl_I& x, sintC y) // assume 0 <= y < 2^(intCsize-1)
  239. { return ash(x,-y); }
  240. inline const cl_I operator>> (const cl_I& x, const cl_I& y) // assume y >= 0
  241. { return ash(x,-y); }
  242. // Vergleich von Integers
  243. // equal(x,y) vergleicht zwei Integers x und y auf Gleichheit.
  244. extern bool equal (const cl_I& x, const cl_I& y);
  245. // equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
  246. extern uint32 equal_hashcode (const cl_I& x);
  247. // compare(x,y) vergleicht zwei Integers x und y.
  248. // Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x<y.
  249. extern cl_signean compare (const cl_I& x, const cl_I& y);
  250. inline bool operator== (const cl_I& x, const cl_I& y)
  251. { return equal(x,y); }
  252. inline bool operator!= (const cl_I& x, const cl_I& y)
  253. { return !equal(x,y); }
  254. inline bool operator<= (const cl_I& x, const cl_I& y)
  255. { return compare(x,y)<=0; }
  256. inline bool operator< (const cl_I& x, const cl_I& y)
  257. { return compare(x,y)<0; }
  258. inline bool operator>= (const cl_I& x, const cl_I& y)
  259. { return compare(x,y)>=0; }
  260. inline bool operator> (const cl_I& x, const cl_I& y)
  261. { return compare(x,y)>0; }
  262. // minusp(x) == (< x 0)
  263. extern bool minusp (const cl_I& x);
  264. // plusp(x) == (> x 0)
  265. extern bool plusp (const cl_I& x);
  266. // zerop(x) stellt fest, ob ein Integer = 0 ist.
  267. extern bool zerop (const cl_I& x);
  268. // BYTE-Operationen auf Integers
  269. struct cl_byte {
  270. uintC size;
  271. uintC position;
  272. // Konstruktor:
  273. cl_byte (uintC s, uintC p) : size (s), position (p) {}
  274. };
  275. // (LDB byte n), wo n ein Integer ist.
  276. extern const cl_I ldb (const cl_I& n, const cl_byte& b);
  277. // ldb_test(n,byte) führt (LDB-TEST byte n) aus, wobei n ein Integer ist.
  278. // Ergebnis: false wenn nein (also alle fraglichen Bits =0), true wenn ja.
  279. extern bool ldb_test (const cl_I& n, const cl_byte& b);
  280. // (MASK-FIELD byte n), wo n ein Integer ist.
  281. extern const cl_I mask_field (const cl_I& n, const cl_byte& b);
  282. // (DEPOSIT-FIELD newbyte byte n), wo n und newbyte Integers sind.
  283. extern const cl_I deposit_field (const cl_I& newbyte, const cl_I& n, const cl_byte& b);
  284. // (DPB newbyte byte n), wo n und newbyte Integers sind.
  285. extern const cl_I dpb (const cl_I& newbyte, const cl_I& n, const cl_byte& b);
  286. // Multiplikation ganzer Zahlen
  287. // (* x y), wo x und y Integers sind. Ergebnis Integer.
  288. extern const cl_I operator* (const cl_I& x, const cl_I& y);
  289. // Dem C++-Compiler muß man auch das Folgende sagen:
  290. inline const cl_I operator* (const int x, const cl_I& y)
  291. { return cl_I(x) * y; }
  292. inline const cl_I operator* (const unsigned int x, const cl_I& y)
  293. { return cl_I(x) * y; }
  294. inline const cl_I operator* (const long x, const cl_I& y)
  295. { return cl_I(x) * y; }
  296. inline const cl_I operator* (const unsigned long x, const cl_I& y)
  297. { return cl_I(x) * y; }
  298. #ifdef HAVE_LONGLONG
  299. inline const cl_I operator* (const long long x, const cl_I& y)
  300. { return cl_I(x) * y; }
  301. inline const cl_I operator* (const unsigned long long x, const cl_I& y)
  302. { return cl_I(x) * y; }
  303. #endif
  304. inline const cl_I operator* (const cl_I& x, const int y)
  305. { return x * cl_I(y); }
  306. inline const cl_I operator* (const cl_I& x, const unsigned int y)
  307. { return x * cl_I(y); }
  308. inline const cl_I operator* (const cl_I& x, const long y)
  309. { return x * cl_I(y); }
  310. inline const cl_I operator* (const cl_I& x, const unsigned long y)
  311. { return x * cl_I(y); }
  312. #ifdef HAVE_LONGLONG
  313. inline const cl_I operator* (const cl_I& x, const long long y)
  314. { return x * cl_I(y); }
  315. inline const cl_I operator* (const cl_I& x, const unsigned long long y)
  316. { return x * cl_I(y); }
  317. #endif
  318. // (EXPT x 2), wo x Integer ist.
  319. extern const cl_I square (const cl_I& x);
  320. // (EXPT x y), wo x Integer, y Integer >0 ist.
  321. extern const cl_I expt_pos (const cl_I& x, uintL y);
  322. extern const cl_I expt_pos (const cl_I& x, const cl_I& y);
  323. // Fakultät (! n), wo n Fixnum >=0 ist. Ergebnis Integer.
  324. extern const cl_I factorial (uintL n);
  325. // Double factorial (!! n), with n Fixnum >=0. Returns integer.
  326. extern const cl_I doublefactorial (uintL n);
  327. // Binomialkoeffizient (n \choose k) = n! / k! (n-k)!, wo n,k >= 0 sind.
  328. extern const cl_I binomial (uintL n, uintL k);
  329. // Division ganzer Zahlen
  330. // Return type for division operators.
  331. // x / y --> (q,r) with x = y*q+r.
  332. struct cl_I_div_t {
  333. cl_I quotient;
  334. cl_I remainder;
  335. // Constructor.
  336. cl_I_div_t () {}
  337. cl_I_div_t (const cl_I& q, const cl_I& r) : quotient(q), remainder(r) {}
  338. };
  339. // Dividiert zwei Integers x,y >=0 und liefert den Quotienten x/y >=0.
  340. // Bei y=0 Error. Die Division muß aufgehen, sonst Error.
  341. // exquopos(x,y)
  342. // > x,y: Integers >=0
  343. // < ergebnis: Quotient x/y, ein Integer >=0
  344. extern const cl_I exquopos (const cl_I& x, const cl_I& y);
  345. // Dividiert zwei Integers x,y und liefert den Quotienten x/y.
  346. // Bei y=0 Error. Die Division muß aufgehen, sonst Error.
  347. // exquo(x,y)
  348. // > x,y: Integers
  349. // < ergebnis: Quotient x/y, ein Integer
  350. extern const cl_I exquo (const cl_I& x, const cl_I& y);
  351. // Thrown when quotient is no integer.
  352. class exquo_exception : public runtime_exception {
  353. public:
  354. exquo_exception (const cl_I& x, const cl_I& y);
  355. };
  356. // mod(x,y) = (mod x y), wo x,y Integers sind.
  357. extern const cl_I mod (const cl_I& x, const cl_I& y);
  358. // rem(x,y) = (rem x y), wo x,y Integers sind.
  359. extern const cl_I rem (const cl_I& x, const cl_I& y);
  360. // Dividiert zwei Integers x,y und liefert Quotient und Rest
  361. // (q,r) := (floor x y)
  362. // floor2(x,y)
  363. // > x,y: Integers
  364. // < q,r: Quotient q, Rest r
  365. extern const cl_I_div_t floor2 (const cl_I& x, const cl_I& y);
  366. extern const cl_I floor1 (const cl_I& x, const cl_I& y);
  367. // Dividiert zwei Integers x,y und liefert Quotient und Rest
  368. // (q,r) := (ceiling x y)
  369. // ceiling2(x,y)
  370. // > x,y: Integers
  371. // < q,r: Quotient q, Rest r
  372. extern const cl_I_div_t ceiling2 (const cl_I& x, const cl_I& y);
  373. extern const cl_I ceiling1 (const cl_I& x, const cl_I& y);
  374. // Dividiert zwei Integers x,y und liefert Quotient und Rest
  375. // (q,r) := (truncate x y)
  376. // truncate2(x,y)
  377. // > x,y: Integers
  378. // < q,r: Quotient q, Rest r
  379. extern const cl_I_div_t truncate2 (const cl_I& x, const cl_I& y);
  380. extern const cl_I truncate1 (const cl_I& x, const cl_I& y);
  381. // Dividiert zwei Integers x,y und liefert Quotient und Rest
  382. // (q,r) := (round x y)
  383. // round2(x,y)
  384. // > x,y: Integers
  385. // < q,r: Quotient q, Rest r
  386. extern const cl_I_div_t round2 (const cl_I& x, const cl_I& y);
  387. extern const cl_I round1 (const cl_I& x, const cl_I& y);
  388. // ggT und kgV von Integers
  389. // Liefert den ggT zweier Integers.
  390. // gcd(a,b)
  391. // > a,b: zwei Integers
  392. // < ergebnis: (gcd a b), ein Integer >=0
  393. extern const cl_I gcd (const cl_I& a, const cl_I& b);
  394. extern uintV gcd (uintV a, uintV b);
  395. // Liefert den ggT zweier Integers samt Beifaktoren.
  396. // g = xgcd(a,b,&u,&v)
  397. // > a,b: zwei Integers
  398. // < u, v, g: Integers mit u*a+v*b = g >= 0
  399. extern const cl_I xgcd (const cl_I& a, const cl_I& b, cl_I* u, cl_I* v);
  400. // Im Fall A/=0, B/=0 genügt das Ergebnis (g,u,v) den Ungleichungen:
  401. // Falls |A| = |B| : g = |A|, u = (signum A), v = 0.
  402. // Falls |B| | |A|, |B| < |A| : g = |B|, u = 0, v = (signum B).
  403. // Falls |A| | |B|, |A| < |B| : g = |A|, u = (signum A), v = 0.
  404. // Sonst: |u| <= |B| / (2*g), |v| <= |A| / (2*g).
  405. // In jedem Fall |u| <= |B|/g, |v| < |A|/g.
  406. // (Beweis: Im Prinzip macht man ja mehrere Euklid-Schritte auf einmal. Im
  407. // letzten Fall - oBdA |A| > |B| - braucht man mindestens zwei Euklid-Schritte,
  408. // also gilt im Euklid-Tableau
  409. // i |A| |B| Erg.
  410. // --------------------------------------------
  411. // 0 1 0 |A|
  412. // 1 0 1 |B|
  413. // ... ... ... ...
  414. // n-1 -(-1)^n*x[n-1] (-1)^n*y[n-1] z[n-1]
  415. // n (-1)^n*x[n] -(-1)^n*y[n] z[n]
  416. // n+1 -(-1)^n*x[n+1] (-1)^n*y[n+1] z[n+1] = 0
  417. // --------------------------------------------
  418. // g = z[n], |u|=x[n], |v|=y[n]
  419. // n>=2, z[0] > ... > z[n-1] > z[n] = g, g | z[n-1], also z[n-1] >= 2*g.
  420. // Da aber mit (-1)^i*x[i]*|A| - (-1)^i*y[i]*|B| = z[i] für i=0..n+1
  421. // und x[i]*y[i+1] - x[i+1]*y[i] = (-1)^i für i=0..n,
  422. // x[i]*z[i+1] - x[i+1]*z[i] = (-1)^i*|B| für i=0..n,
  423. // y[i]*z[i+1] - y[i+1]*z[i] = -(-1)^i*|A| für i=0..n
  424. // auch |A| = y[i+1]*z[i] + y[i]*z[i+1], |B| = x[i+1]*z[i] + x[i]*z[i+1]
  425. // für i=0..n (Cramersche Regel), folgt
  426. // |A| = y[n]*z[n-1] + y[n-1]*z[n] >= y[n]*2*g + 0 = |v|*2*g,
  427. // |B| = x[n]*z[n-1] + x[n-1]*z[n] >= x[n]*2*g + 0 = |u|*2*g.)
  428. // Liefert den kgV zweier Integers.
  429. // lcm(a,b)
  430. // > a,b: zwei Integers
  431. // < ergebnis: (lcm a b), ein Integer >=0
  432. extern const cl_I lcm (const cl_I& a, const cl_I& b);
  433. // Wurzel aus ganzen Zahlen
  434. // Zieht die Wurzel (ISQRT x) aus einem Integer.
  435. // isqrt(x,&w)
  436. // > x: Integer (sollte >=0 sein)
  437. // < w: (isqrt x)
  438. // < ergebnis: true falls x Quadratzahl, false sonst
  439. extern bool isqrt (const cl_I& x, cl_I* w);
  440. // Wenn das boolesche Ergebnis uninteressant ist:
  441. inline const cl_I isqrt (const cl_I& x) { cl_I w; isqrt(x,&w); return w; }
  442. // Stellt fest, ob ein Integer >=0 eine Quadratzahl ist.
  443. // sqrtp(x,&w)
  444. // > x: ein Integer >=0
  445. // < w: Integer (sqrt x) falls x Quadratzahl
  446. // < ergebnis: true ..................., false sonst
  447. extern bool sqrtp (const cl_I& x, cl_I* w);
  448. // Stellt fest, ob ein Integer >=0 eine n-te Potenz ist.
  449. // rootp(x,n,&w)
  450. // > x: ein Integer >=0
  451. // > n: ein Integer >0
  452. // < w: Integer (expt x (/ n)) falls x eine n-te Potenz
  453. // < ergebnis: true ........................, false sonst
  454. extern bool rootp (const cl_I& x, uintL n, cl_I* w);
  455. extern bool rootp (const cl_I& x, const cl_I& n, cl_I* w);
  456. // max(x,y) liefert (max x y), wo x und y ganze Zahlen sind.
  457. extern const cl_I max (const cl_I& x, const cl_I& y);
  458. // min(x,y) liefert (min x y), wo x und y ganze Zahlen sind.
  459. extern const cl_I min (const cl_I& x, const cl_I& y);
  460. // signum(x) liefert (signum x), wo x eine ganze Zahl ist.
  461. extern const cl_I signum (const cl_I& x);
  462. // Multipliziert ein Integer mit 10 und addiert eine weitere Ziffer.
  463. // mul_10_plus_x(y,x)
  464. // > y: Integer Y (>=0)
  465. // > x: Ziffernwert X (>=0,<10)
  466. // < ergebnis: Integer Y*10+X (>=0)
  467. extern const cl_I mul_10_plus_x (const cl_I& y, unsigned char x);
  468. // 2-adische Inverse.
  469. // cl_recip2adic(n,x)
  470. // > n: >0
  471. // > x: Integer, ungerade
  472. // < ergebnis: n-Bit-Zahl y == (x mod 2^n)^-1, d.h. y*x == 1 mod 2^n
  473. extern const cl_I cl_recip2adic (uintL n, const cl_I& x);
  474. // 2-adische Division.
  475. // cl_div2adic(n,x,y)
  476. // > n: >0
  477. // > x: Integer
  478. // > y: Integer, ungerade
  479. // < ergebnis: n-Bit-Zahl z == (x mod 2^n)/(y mod 2^n), d.h. z*y == x mod 2^n
  480. extern const cl_I cl_div2adic (uintL n, const cl_I& x, const cl_I& y);
  481. // numerator(r) liefert den Zähler des Integer r.
  482. inline const cl_I numerator (const cl_I& r)
  483. { return r; }
  484. // denominator(r) liefert den Nenner (> 0) des Integer r.
  485. inline const cl_I denominator (const cl_I& r)
  486. { (void)r; return 1; }
  487. // Konversion zu einem C "float".
  488. extern float float_approx (const cl_I& x);
  489. // Konversion zu einem C "double".
  490. extern double double_approx (const cl_I& x);
  491. // random_I(randomstate,n) liefert zu einem Integer n>0 ein zufälliges
  492. // Integer x mit 0 <= x < n.
  493. // > randomstate: ein Random-State, wird verändert
  494. extern const cl_I random_I (random_state& randomstate, const cl_I& n);
  495. inline const cl_I random_I (const cl_I& n)
  496. { return random_I(default_random_state,n); }
  497. // testrandom_I(randomstate) liefert ein zufälliges Integer zum Testen.
  498. // > randomstate: ein Random-State, wird verändert
  499. extern const cl_I testrandom_I (random_state& randomstate);
  500. inline const cl_I testrandom_I ()
  501. { return testrandom_I(default_random_state); }
  502. // This could be optimized to use in-place operations.
  503. inline cl_I& operator+= (cl_I& x, const cl_I& y) { return x = x + y; }
  504. inline cl_I& operator+= (cl_I& x, const int y) { return x = x + y; }
  505. inline cl_I& operator+= (cl_I& x, const unsigned int y) { return x = x + y; }
  506. inline cl_I& operator+= (cl_I& x, const long y) { return x = x + y; }
  507. inline cl_I& operator+= (cl_I& x, const unsigned long y) { return x = x + y; }
  508. inline cl_I& operator++ /* prefix */ (cl_I& x) { return x = plus1(x); }
  509. inline void operator++ /* postfix */ (cl_I& x, int dummy) { (void)dummy; x = plus1(x); }
  510. inline cl_I& operator-= (cl_I& x, const cl_I& y) { return x = x - y; }
  511. inline cl_I& operator-= (cl_I& x, const int y) { return x = x - y; }
  512. inline cl_I& operator-= (cl_I& x, const unsigned int y) { return x = x - y; }
  513. inline cl_I& operator-= (cl_I& x, const long y) { return x = x - y; }
  514. inline cl_I& operator-= (cl_I& x, const unsigned long y) { return x = x - y; }
  515. inline cl_I& operator-- /* prefix */ (cl_I& x) { return x = minus1(x); }
  516. inline void operator-- /* postfix */ (cl_I& x, int dummy) { (void)dummy; x = minus1(x); }
  517. inline cl_I& operator*= (cl_I& x, const cl_I& y) { return x = x * y; }
  518. inline cl_I& operator<<= (cl_I& x, sintC y) // assume 0 <= y < 2^(intCsize-1)
  519. { return x = x << y; }
  520. inline cl_I& operator<<= (cl_I& x, const cl_I& y) // assume y >= 0
  521. { return x = x << y; }
  522. inline cl_I& operator>>= (cl_I& x, sintC y) // assume 0 <= y < 2^(intCsize-1)
  523. { return x = x >> y; }
  524. inline cl_I& operator>>= (cl_I& x, const cl_I& y) // assume y >= 0
  525. { return x = x >> y; }
  526. #if 0 // Defining operator/ collides with the operator/ (cl_RA, cl_RA).
  527. // operator/ should perform exquo(x,y), but people believe in the C semantics.
  528. // And it would be wiser to use floor1 and mod instead of truncate1 and rem,
  529. // but again, many C compilers implement / and % like this and people believe
  530. // in it.
  531. inline const cl_I operator/ (const cl_I& x, const cl_I& y) { return truncate1(x,y); }
  532. inline const cl_I operator% (const cl_I& x, const cl_I& y) { return rem(x,y); }
  533. inline cl_I& operator/= (cl_I& x, const cl_I& y) { return x = x / y; }
  534. inline cl_I& operator%= (cl_I& x, const cl_I& y) { return x = x % y; }
  535. #endif
  536. // Runtime typing support.
  537. extern cl_class cl_class_fixnum;
  538. extern cl_class cl_class_bignum;
  539. CL_FORCE_LINK(cl_I_classes_dummy, cl_class_fixnum)
  540. // Debugging support.
  541. #ifdef CL_DEBUG
  542. extern int cl_I_debug_module;
  543. CL_FORCE_LINK(cl_I_debug_dummy, cl_I_debug_module)
  544. #endif
  545. } // namespace cln
  546. #endif /* _CL_INTEGER_H */