Import Upstream version 0.8.2
[platform/upstream/mpc.git] / tests / sqr.dat
index 72bfe07..c60bc4d 100644 (file)
@@ -1,21 +1,23 @@
 # Data file for mpc_sqr.
 #
-# Copyright (C) 2008, 2010, 2012 INRIA
+# Copyright (C) 2008 Philippe Th\'eveny, Andreas Enge
 #
-# This file is part of GNU MPC.
+# This file is part of the MPC Library.
 #
-# GNU MPC 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
-#ption) any later version.
+# The MPC Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
+# option) any later version.
 #
-# GNU MPC 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.
+# The MPC Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+# License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/ .
+# along with the MPC Library; see the file COPYING.LIB.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
 #
 # The line format respects the parameter order in function prototype as
 # follow:
 # ...and a case where x+y or x-y are 0.
 0 0 4 0 4 2  4 1 4 1 N N
 
-# a few values, previously hard-coded in tsqr.c
-0 0 8 7 8 24  8 4 8 3 N N
-+ + 8 0b1.1000111e-3 8 0b1.1100111e-3  27 0b1.11111011011000010101000000e-2 27 0b1.11010001010110111001110001e-3 N N
-
-# bug 20090930, infinite loop
-+ + 3464 inf 3464 inf  866 -0x2.5763c6519ef1510f8afa101a210b8030b1909cc17004db561a25d9b53e2c08c41c01e8bbac5af6299b9d8786030aa14943d841798c8c369287942e4d4cec42a60ab0922af931159805e631128e97f973754ad53972d5d320a651a3b4a667f0ef2b92dbd698d159c3642675140@192158913 866 -0xd.15f2d530934dd930d66e89d70762d2337a8f973dd6915eb6b532fd372fcc955df1d852632d4e46fe64154ceda991a1302caf1b0ec622497e3e5724dd05b1c89a06e28d7e18e8af58f5ff4c9998cb31714688867524f41e0b31e847c1bf40de5127f858069998efd7c3e599080@192158893 N N
-
-# bug 20091001, infinite loop
-? + 2256 0 2256 -0  564 0xc.87999bfd1cb1a64288881e214b7cf1af979863b23c030b79c4a8bebb39177967608388a2e4df527977e7755a25df8af8f72fdd6dd2f42bd00de83088b4e9b59ce85caf2e6b0c0@-184298749 564 -0x2.5109af459d4daf357e09475ec991cdc9b02c8f7dfacdc060d2a24710d09c997f8aea6dbd46f10828c30b583fdcc90d7dcbb895689d594d3813db40784d2309e450d1fb6e38da8@-184298726 N N
-
-# (x+x*i)^2 = 0+2*x^2*i with exact real part
-0 0 100 0 100 304831530559368   100 12345678 100 12345678 N N
-0 0 1000 0 100 304831530559368   100 12345678 100 12345678 N N
-# intermediate overflow- and underflows
-0 + 100 0 100 +inf  100 0x1@225000750 100 0x1@225000750 N N
-0 + 10000 0 10000 +inf  100 0x1@225000750 100 0x1@225000750 N N
-0 - 100 0 100 +0  100 0x1@-225000750 100 0x1@-225000750 N N
-0 + 100 0 100 -0  100 0x1@-225000750 100 -0x1@-225000750 N N
-0 - 10000 0 10000 +0  100 0x1@-225000750 100 0x1@-225000750 N N
-0 + 10000 0 10000 -0  100 0x1@-225000750 100 -0x1@-225000750 N N
-
-# intermediate overflow in Karatsuba found by hydra, simplified test case
-- - 100 -inf 100 -inf  593 -0xf@192058806 593 0x1@192058873 N N
-# another interesting one with not exactly the same behaviour
-- - 100 -inf 100 -inf  100 -0xf@192058806 100 0x1@192058873 N N
-0 + 100 0 100 inf  100 0x1@192058806  100 0x1@192058806 N N
-# Re(op)*Im(op) can be computed, but multiplication by 2 triggers overflow
-0 + 100 0 100 inf  100 0b1@536870911  100 0b1@536870911 N N
-0 - 10 0 10 0b1.111111111e1073741822  100 0b1@536870911  100 0b1@536870911 N D
-0 - 10 0 10 0b1.111111111e1073741822  100 0b1@536870912  100 0b1@536870912 N D
-0 0 10 0 10 0b1e-1073741823  100 0b1@-536870912  100 0b1@-536870912 N N
-0 - 10 0 10 0  100 0b1@-536870913  100 0b1@-536870913 N N
-0 + 10 0 10 0b1@-1073741824  100 0b1@-536870913  100 0b1@-536870913 N U
-+ - 10 0b1e-1073741824 10 0  100 0b1@-536870912  100 0b1@-536870913 N N