[Gmp-commit] /var/hg/www: 5 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Tue Oct 8 14:56:35 CEST 2013
details: /var/hg/www/rev/270e6f49a71a
changeset: 106:270e6f49a71a
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Oct 07 23:01:38 2013 +0200
description:
Fix typo.
details: /var/hg/www/rev/abc858c7a060
changeset: 107:abc858c7a060
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Oct 07 23:02:29 2013 +0200
description:
Reflect current system status.
details: /var/hg/www/rev/6670215794c6
changeset: 108:6670215794c6
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Oct 07 23:02:54 2013 +0200
description:
Fix typo.
details: /var/hg/www/rev/f305ceff61e9
changeset: 109:f305ceff61e9
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Oct 07 23:03:40 2013 +0200
description:
Updates for 5.1.3.
details: /var/hg/www/rev/174c196aeea6
changeset: 110:174c196aeea6
user: Torbjorn Granlund <tege at gmplib.org>
date: Tue Oct 08 14:56:30 2013 +0200
description:
Remove old file.
diffstat:
devel/GMPng.html | 6 +-
devel/gmpxx.h | 3389 ------------------------------------------------
devel/testsystems.html | 8 +-
devel/x64-64.html | 4 +-
gmp5.1.html | 78 +-
5 files changed, 85 insertions(+), 3400 deletions(-)
diffs (truncated from 3692 to 300 lines):
diff -r 503299f16291 -r 174c196aeea6 devel/GMPng.html
--- a/devel/GMPng.html Mon Sep 30 20:48:11 2013 +0200
+++ b/devel/GMPng.html Tue Oct 08 14:56:30 2013 +0200
@@ -107,8 +107,8 @@
<span style="white-space: nowrap; font-size:larger">
√<span style="text-decoration:overline;"> 2 </span>
</span>
- trick: 2<sup>3n/4</sup>-2<sup>n/4</sup> is a square
- root of 2 mod (2n+1). This allows for smaller coeffients. </p>
+ trick: 2<sup>3n/4</sup>−2<sup>n/4</sup> is a square
+ root of 2 mod (2<sup>n</sup>+1). This allows for smaller coeffients. </p>
</font>
@@ -438,7 +438,7 @@
</div>
-<font size="-4">Last modified: 2013-08-30 </font>
+<font size="-4">Last modified: 2013-10-07 </font>
<div id="footer">
<table cellpadding=0 width="100%" bgcolor="#e8e8e8">
<tr>
diff -r 503299f16291 -r 174c196aeea6 devel/gmpxx.h
--- a/devel/gmpxx.h Mon Sep 30 20:48:11 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3389 +0,0 @@
-/* gmpxx.h -- C++ class wrapper for GMP types. -*- C++ -*-
-
-Copyright 2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc.
-
-This file is part of the GNU MP Library.
-
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
-
-/* the C++ compiler must implement the following features:
- - member templates
- - partial specialization of templates
- - namespace support
- for g++, this means version 2.91 or higher
- for other compilers, I don't know */
-#ifdef __GNUC__
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 91)
-#error gmpxx.h requires g++ version 2.91 (egcs 1.1.2) or higher
-#endif
-#endif
-
-#ifndef __GMP_PLUSPLUS__
-#define __GMP_PLUSPLUS__
-
-#include <iosfwd>
-
-#include <cstring> /* for strlen */
-#include <string>
-#include <stdexcept>
-#include <limits>
-#include <gmp.h>
-
-
-/**************** Function objects ****************/
-/* Any evaluation of a __gmp_expr ends up calling one of these functions
- all intermediate functions being inline, the evaluation should optimize
- to a direct call to the relevant function, thus yielding no overhead
- over the C interface. */
-
-struct __gmp_unary_plus
-{
- static void eval(mpz_ptr z, mpz_srcptr w) { mpz_set(z, w); }
- static void eval(mpq_ptr q, mpq_srcptr r) { mpq_set(q, r); }
- static void eval(mpf_ptr f, mpf_srcptr g) { mpf_set(f, g); }
-};
-
-struct __gmp_unary_minus
-{
- static void eval(mpz_ptr z, mpz_srcptr w) { mpz_neg(z, w); }
- static void eval(mpq_ptr q, mpq_srcptr r) { mpq_neg(q, r); }
- static void eval(mpf_ptr f, mpf_srcptr g) { mpf_neg(f, g); }
-};
-
-struct __gmp_unary_com
-{
- static void eval(mpz_ptr z, mpz_srcptr w) { mpz_com(z, w); }
-};
-
-struct __gmp_binary_plus
-{
- static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v)
- { mpz_add(z, w, v); }
-
- static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l)
- { mpz_add_ui(z, w, l); }
- static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w)
- { mpz_add_ui(z, w, l); }
- static void eval(mpz_ptr z, mpz_srcptr w, signed long int l)
- {
- if (l >= 0)
- mpz_add_ui(z, w, l);
- else
- mpz_sub_ui(z, w, -l);
- }
- static void eval(mpz_ptr z, signed long int l, mpz_srcptr w)
- {
- if (l >= 0)
- mpz_add_ui(z, w, l);
- else
- mpz_sub_ui(z, w, -l);
- }
- static void eval(mpz_ptr z, mpz_srcptr w, double d)
- {
- mpz_t temp;
- mpz_init_set_d(temp, d);
- mpz_add(z, w, temp);
- mpz_clear(temp);
- }
- static void eval(mpz_ptr z, double d, mpz_srcptr w)
- {
- mpz_t temp;
- mpz_init_set_d(temp, d);
- mpz_add(z, temp, w);
- mpz_clear(temp);
- }
-
- static void eval(mpq_ptr q, mpq_srcptr r, mpq_srcptr s)
- { mpq_add(q, r, s); }
-
- static void eval(mpq_ptr q, mpq_srcptr r, unsigned long int l)
- { mpq_set(q, r); mpz_addmul_ui(mpq_numref(q), mpq_denref(q), l); }
- static void eval(mpq_ptr q, unsigned long int l, mpq_srcptr r)
- { mpq_set(q, r); mpz_addmul_ui(mpq_numref(q), mpq_denref(q), l); }
- static void eval(mpq_ptr q, mpq_srcptr r, signed long int l)
- {
- mpq_set(q, r);
- if (l >= 0)
- mpz_addmul_ui(mpq_numref(q), mpq_denref(q), l);
- else
- mpz_submul_ui(mpq_numref(q), mpq_denref(q), -l);
- }
- static void eval(mpq_ptr q, signed long int l, mpq_srcptr r)
- {
- mpq_set(q, r);
- if (l >= 0)
- mpz_addmul_ui(mpq_numref(q), mpq_denref(q), l);
- else
- mpz_submul_ui(mpq_numref(q), mpq_denref(q), -l);
- }
- static void eval(mpq_ptr q, mpq_srcptr r, double d)
- {
- mpq_t temp;
- mpq_init(temp);
- mpq_set_d(temp, d);
- mpq_add(q, r, temp);
- mpq_clear(temp);
- }
- static void eval(mpq_ptr q, double d, mpq_srcptr r)
- {
- mpq_t temp;
- mpq_init(temp);
- mpq_set_d(temp, d);
- mpq_add(q, temp, r);
- mpq_clear(temp);
- }
-
- static void eval(mpq_ptr q, mpq_srcptr r, mpz_srcptr z)
- { mpq_set(q, r); mpz_addmul(mpq_numref(q), mpq_denref(q), z); }
- static void eval(mpq_ptr q, mpz_srcptr z, mpq_srcptr r)
- { mpq_set(q, r); mpz_addmul(mpq_numref(q), mpq_denref(q), z); }
-
- static void eval(mpf_ptr f, mpf_srcptr g, mpf_srcptr h)
- { mpf_add(f, g, h); }
-
- static void eval(mpf_ptr f, mpf_srcptr g, unsigned long int l)
- { mpf_add_ui(f, g, l); }
- static void eval(mpf_ptr f, unsigned long int l, mpf_srcptr g)
- { mpf_add_ui(f, g, l); }
- static void eval(mpf_ptr f, mpf_srcptr g, signed long int l)
- {
- if (l >= 0)
- mpf_add_ui(f, g, l);
- else
- mpf_sub_ui(f, g, -l);
- }
- static void eval(mpf_ptr f, signed long int l, mpf_srcptr g)
- {
- if (l >= 0)
- mpf_add_ui(f, g, l);
- else
- mpf_sub_ui(f, g, -l);
- }
- static void eval(mpf_ptr f, mpf_srcptr g, double d)
- {
- mpf_t temp;
- mpf_init2(temp, 8*sizeof(double));
- mpf_set_d(temp, d);
- mpf_add(f, g, temp);
- mpf_clear(temp);
- }
- static void eval(mpf_ptr f, double d, mpf_srcptr g)
- {
- mpf_t temp;
- mpf_init2(temp, 8*sizeof(double));
- mpf_set_d(temp, d);
- mpf_add(f, temp, g);
- mpf_clear(temp);
- }
-};
-
-struct __gmp_binary_minus
-{
- static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v)
- { mpz_sub(z, w, v); }
-
- static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l)
- { mpz_sub_ui(z, w, l); }
- static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w)
- { mpz_ui_sub(z, l, w); }
- static void eval(mpz_ptr z, mpz_srcptr w, signed long int l)
- {
- if (l >= 0)
- mpz_sub_ui(z, w, l);
- else
- mpz_add_ui(z, w, -l);
- }
- static void eval(mpz_ptr z, signed long int l, mpz_srcptr w)
- {
- if (l >= 0)
- mpz_ui_sub(z, l, w);
- else
- {
- mpz_add_ui(z, w, -l);
- mpz_neg(z, z);
- }
- }
- static void eval(mpz_ptr z, mpz_srcptr w, double d)
- {
- mpz_t temp;
- mpz_init_set_d(temp, d);
- mpz_sub(z, w, temp);
- mpz_clear(temp);
- }
- static void eval(mpz_ptr z, double d, mpz_srcptr w)
- {
- mpz_t temp;
- mpz_init_set_d(temp, d);
- mpz_sub(z, temp, w);
- mpz_clear(temp);
- }
-
- static void eval(mpq_ptr q, mpq_srcptr r, mpq_srcptr s)
- { mpq_sub(q, r, s); }
-
- static void eval(mpq_ptr q, mpq_srcptr r, unsigned long int l)
- { mpq_set(q, r); mpz_submul_ui(mpq_numref(q), mpq_denref(q), l); }
- static void eval(mpq_ptr q, unsigned long int l, mpq_srcptr r)
- { mpq_neg(q, r); mpz_addmul_ui(mpq_numref(q), mpq_denref(q), l); }
- static void eval(mpq_ptr q, mpq_srcptr r, signed long int l)
- {
- mpq_set(q, r);
- if (l >= 0)
- mpz_submul_ui(mpq_numref(q), mpq_denref(q), l);
- else
- mpz_addmul_ui(mpq_numref(q), mpq_denref(q), -l);
- }
- static void eval(mpq_ptr q, signed long int l, mpq_srcptr r)
- {
- mpq_neg(q, r);
- if (l >= 0)
- mpz_addmul_ui(mpq_numref(q), mpq_denref(q), l);
- else
- mpz_submul_ui(mpq_numref(q), mpq_denref(q), -l);
- }
- static void eval(mpq_ptr q, mpq_srcptr r, double d)
- {
- mpq_t temp;
- mpq_init(temp);
- mpq_set_d(temp, d);
- mpq_sub(q, r, temp);
- mpq_clear(temp);
- }
- static void eval(mpq_ptr q, double d, mpq_srcptr r)
- {
- mpq_t temp;
- mpq_init(temp);
- mpq_set_d(temp, d);
- mpq_sub(q, temp, r);
- mpq_clear(temp);
- }
-
- static void eval(mpq_ptr q, mpq_srcptr r, mpz_srcptr z)
- { mpq_set(q, r); mpz_submul(mpq_numref(q), mpq_denref(q), z); }
More information about the gmp-commit
mailing list