1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183
|
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002 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 2.1 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; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
2002-01-22 Kevin Ryde <kevin@swox.se>
* Version 4.0.1 released.
2002-01-20 Kevin Ryde <kevin@swox.se>
* gmp.texi (Contributors): Bump release version.
* acinclude.m4 (GMP_FUNC_VSNPRINTF): Use %n to better detect sparc
solaris 2.7 problems.
2002-01-17 Kevin Ryde <kevin@swox.se>
* tests/refmpn.c (refmpn_divmod_1c): Avoid a bug in i386 gcc 3.0.
2002-01-15 Kevin Ryde <kevin@swox.se>
* printf/Makefile.am: libdummy.la should be in EXTRA_LTLIBRARIES.
* mpf/out_str.c: Use MPF_SIGNIFICANT_DIGITS, so mpf_out_str and
mpf_get_str give the same for ndigits==0.
2002-01-06 Kevin Ryde <kevin@swox.se>
* gmp-h.in (mpn_divexact_by3c): Remove variables from prototype, to
keep out of application namespace.
* mpbsd/mtox.c: Add TMP_FREE to avoid memory leak in malloc methods.
2002-01-04 Kevin Ryde <kevin@swox.se>
* gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump to 4.0.1.
* Makefile.am (*_LT_REVISION): Bump for implementation changes.
2001-12-28 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_PROG_CC_WORKS): For a native compile, demand
executables will run, per AC_PROG_CC. This detects ABI=64 is unusable
in a native sparc solaris 7 build with the kernel in 32-bit mode.
* gmp.texi (ABI and ISA): Add notes on this, add an example configure
setting an ABI.
2001-12-18 Kevin Ryde <kevin@swox.se>
* gmp-h.in (operator<<, operator>>): Remove parameter names from
prototypes, to keep out of user namespace.
2001-12-15 Kevin Ryde <kevin@swox.se>
* gmp-h.in (mpn_add, mpn_add_1, mpn_cmp, mpn_sub, mpn_sub_1): Follow
__GMP_INLINE_PROTOTYPES for whether to give prototype with inline.
2001-12-12 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_PROG_CC_WORKS): Detect cmov problems with gcc
-march=pentiumpro on solaris 2.8.
* tune/common.c, tune/speed.h: Allow for commas in count_leading_zeros
and count_trailing_zeros macros.
* demos/expr/Makefile.am: Distribute exprfr.c and exprfra.c.
* tune/Makefile.am (speed_ext_SOURCES): Should be speed-ext.c.
2001-12-07 Kevin Ryde <kevin@swox.se>
* gmp-h.in, mp-h.in, gmp-impl.h: __GMP_DECLSPEC at start of
prototypes, for the benefit of Microsoft C.
* gmp.texi (Introduction to GMP): Mention ABI and ISA section.
(Known Build Problems): Recommend GNU sed on solaris 2.6.
(Assigning Integers): Direct feedback to bug-gmp.
(References): Typo Knuth vol 2 is from 1998.
* gmpxx.h (gmp_randclass): Add initializers for gmp_randinit_default
and gmp_randinit_lc_2exp_size.
gmp.texi (C++ Interface Random Numbers): Describe them.
* tests/misc/t-locale.c, tests/cxx/t-locale.cc: Ensure mpf_clear is
done when the localconv override doesn't work. Reported by Mike
Jetzer.
* printf/doprnti.c: Don't showbase on a zero mpq denominator.
* tests/misc/t-printf.c, tests/cxx/t-ostream.c: Add test cases.
2001-12-04 Kevin Ryde <kevin@swox.se>
* gmp.texi (Known Build Problems): Update to gmp_randinit_lc_2exp_size
for the sparc solaris 2.7 problem.
(Reentrancy): SCO ctype.h affects all text-based input functions.
(Formatted Output Strings): Correction to the mpf example.
(Single Limb Division): Correction, should be q-1 not q+1.
(Extended GCD): Clarify why single-limb is inferior.
(Raw Output Internals): Clarify size is twos complement, note limb
order means _mp_d doesn't get directly read or written.
(Contributors): Clarify mpz_jacobi.
And a couple of formatting tweaks elsewhere.
* tests/cxx/t-headers.cc: New file.
* tests/cxx/Makefile.am: Add it.
* gmpxx.h: Add <strstream>, needed by mpf_class::get_str2.
* gmp-h.in (mpq_inp_str, mpn_hamdist): Add __GMP_DECLSPEC.
2001-12-01 Torbjorn Granlund <tege@swox.com>
* Version 4.0 released.
* mpfr/README: Replace contents with explanation of why mpfr is gone.
2001-12-01 Kevin Ryde <kevin@swox.se>
* Makefile.am, configure.in: Temporarily remove mpfr, just leave a
README.
* mpn/Makefile.am (EXTRA_DIST): Add Makeasm.am.
2001-11-30 Gerardo Ballabio <ballabio@sissa.it>
* tests/cxx/t-constr.cc, tests/cxx/t-expr.cc: New files.
* tests/cxx/Makefile.am (check_PROGRAMS): Add them.
2001-11-30 Kevin Ryde <kevin@swox.se>
* mpfr: Update to 2001-11-16. Patch TMP handling of agm.c and sqrt.c,
use plain mpn_sqrtrem in sqrt.c, separate .c files for floor and ceil,
disable an expression style assert in add1.c.
* mpn/s370: Rename to s390.
* configure.in (s3[6-9]0*-*-*): Update.
* mpn/Makefile.am (TARG_DIST): Add s390.
* mpz/fits_s.c, mpf/fits_s.c, mpf/fits_u.c: Remove files, unused since
change to .h style.
2001-11-29 Torbjorn Granlund <tege@swox.com>
* gmp-h.in: Declare mpz_get_d_2exp and mpf_get_d_2exp.
* Makefile.am: Add mpz/get_d_2exp$U.lo and mpf/get_d_2exp$U.lo.
* mpf/Makefile.am: Add get_d_2exp.c.
* mpz/Makefile.am: Add get_d_2exp.c.
2001-11-29 Kevin Ryde <kevin@swox.se>
* mpn/*/gmp-mparam.h: Update measured thresholds.
* mpn/s370/gmp-mparam.h: New file.
* mpz/millerrabin.c: Mark for internal use only, for now.
* gmp.texi (Number Theoretic Functions): Remove documentation.
2001-11-28 Torbjorn Granlund <tege@swox.com>
* mpf/get_d_2exp.c: New file.
* mpz/get_d_2exp.c: New file.
* mpz/realloc2.c: Fix typo. Make more similar to mpz_realloc.
* mpz/realloc.c: Use __GMP_REALLOCATE_FUNC_LIMBS.
2001-11-27 Gerardo Ballabio <ballabio@sissa.it>
* gmpxx.h, mpfrxx.h: Various updates and improvements.
2001-11-27 Kevin Ryde <kevin@swox.se>
* gmp.texi (Useful Macros and Constants): Add gmp_version, add @findex
for mp_bits_per_limb.
* demos/perl/GMP.pm, demos/perl/GMP.xs: Use new style gmp_randinit's.
* demos/perl/test.pl: Update for this, and for mpz_perfect_power_p
handling of 0 and 1.
2001-11-26 Torbjorn Granlund <tege@swox.com>
* mpz/realloc.c: Clear variable when decreasing allocation to less than
needed. Misc updates.
2001-11-25 Kevin Ryde <kevin@swox.se>
* tests/misc/t-locale.c: Avoid printf in the normal case, since the
replacement localeconv breaks it on SunOS 4.
* gmp.texi (Build Options, Notes for Package Builds): Note libgmpxx
depends on libgmp from same GMP version.
* acinclude.m4, configure.in (GMP_FUNC_SSCANF_WRITABLE_INPUT): New
test.
* scanf/sscanf.c, scanf/vsscanf.c: Use it to ensure sscanf input is
writable, if necessary.
* tests/misc/t-scanf.c: Ensure sscanf arguments are writable, always.
* configure.in (AC_CHECK_DECLS): Remove sscanf, no longer required.
* configure.in (none-*-*): Fix default CFLAGS setups.
* doc/configuration: Misc updates.
2001-11-23 Kevin Ryde <kevin@swox.se>
* mpz/init2.c, mpz/realloc2.c: New files.
* Makefile.am, mpz/Makefile.am: Add them.
* gmp-h.in: Add prototypes.
* gmp.texi (Efficiency): Mention these instead of _mpz_realloc.
(Initializing Integers): Add documentation, reword other parts.
2001-11-22 Torbjorn Granlund <tege@swox.com>
* mpn/cray/ieee/addmul_1.c: Fix logic for more_carries scalar loop.
* mpn/cray/ieee/submul_1.c: Likewise.
2001-11-20 Kevin Ryde <kevin@swox.se>
* gmp.texi (Known Build Problems): Note an out of memory on DJGPP.
(Function Classes): Update function counts.
Misc tweaks elsewhere.
* configure.in (AC_CHECK_DECLS): Add sscanf.
* tests/misc/t-scanf.c: Use it, for the benefit of SunOS 4.
* tal-debug.c, gmp-impl.h: More checks of TMP_DECL/TMP_MARK/TMP_FREE
consistency.
* mpfr/Makefile.am (AR): Explicit AR=@AR@ to override automake
default, necessary for powerpc64 ABI=aix64.
2001-11-18 Torbjorn Granlund <tege@swox.com>
* mpz/powm.c: Move TMP_MARK to before any TMP_ALLOCs.
2001-11-18 Kevin Ryde <kevin@swox.se>
* configure.in (--enable-fft): Make this the default.
* gmp.texi (Build Options): Update.
* Makefile.am (libmp_la_DEPENDENCIES): Revise mpz objects needed by
new mpz/powm.c.
* gmp.texi (Random State Initialization): Add gmp_randinit_default and
gmp_randinit_lc_2exp_size, mark gmp_randinit as obsolete.
(Random State Seeding): New section, taken from "Random State
Initialization" and "Random Number Functions".
* configure.in (AC_CHECK_DECLS): Add fgetc, fscanf, ungetc.
* scanf/fscanffuns.c: Use these, for the benefit of SunOS 4.
* gmp-impl.h, gmp-h.in (__gmp_default_fp_limb_precision): Move back to
gmp-impl.h now not required for inlined mpf.
* randlc2s.c (gmp_randinit_lc_2exp_size): New file, the size-based LC
selection from rand.c.
* rand.c (gmp_randinit): Use it.
* randdef.c (gmp_randinit_default): New file.
* gmp-impl.h (RANDS): Use it.
(ASSERT_CARRY): New macro.
* gmp-h.in (gmp_randinit_default, gmp_randinit_lc_2exp_size: Add
prototypes.
* Makefile.am (libgmp_la_SOURCES): Add randdef.c and randlc2s.c.
* printf/asprntffuns.c: Include config.h before using its defines.
* gmp-impl.h: Move C++ <string> to top of file to avoid the memset
redefine upsetting configure tests. Remove <iostream> since <iosfwd>
in gmp.h suffices.
2001-11-16 Kevin Ryde <kevin@swox.se>
* gmp.texi (Integer Exponentiation): mpz_powm supports negative
exponents.
(Assigning Floats, I/O of Floats, C++ Formatted Output, C++ Formatted
Input): Decimal point follows locale.
(Formatted Output Strings): %n accepts any type.
(Formatted Input Strings): New section.
(Formatted Input Functions): New section.
(C++ Class Interface): Corrections and clarifications suggested by
Gerardo.
* scanf/doscan.c, scanf/fscanf.c, scanf/fscanffuns.c, scanf/scanf.c,
scanf/sscanf.c, scanf/sscanffuns.c, scanf/vfscanf.c, scanf/vscanf.c,
scanf/vsscanf.c, scanf/Makefile.am, tests/misc/t-scanf.c: New files.
* gmp-h.in, gmp-impl.h, Makefile.am, configure.in: Consequent
additions.
* tests/misc: New directory.
* tests/misc/Makefile.am: New file.
* tests/misc/t-locale.c: New file.
* tests/misc/t-printf.c: Moved from tests/printf.
* tests/printf: Remove directory.
* configure.in, tests/Makefile.am: Update.
* tests/cxx/t-locale.cc: New file.
* tests/cxx/Makefile.am: Add it.
* mpf/set_str.c, cxx/ismpf.cc: Use localeconv for the decimal point.
* acinclude.m4 (GMP_ASM_X86_MCOUNT): Update to $lt_prog_compiler_pic
for current libtool, recognise non-PIC style mcount in windows DLLs.
* gmp-impl.h (__gmp_replacement_vsnprintf): Add prototype.
* gmp-impl.h (__gmp_rands, __gmp_rands_initialized,
modlimb_invert_table): Add __GMP_DECLSPEC for the benefit of test
programs using them from a windows DLL.
* longlong.h (__clz_tab): Ditto.
* mpn/x86/t-zdisp2.pl: New file.
* mpn/x86/pentium4/README: New file.
2001-11-15 Torbjorn Granlund <tege@swox.com>
* mpz/powm.c (HANDLE_NEGATIVE_EXPONENT): #define to 1.
* tests/mpz/reuse.c (main): Use mpz_invert to avoid undefined mpz_powm
cases.
2001-11-14 Torbjorn Granlund <tege@swox.com>
* mpz/powm_ui.c: Rewrite along the lines of mpz/powm.c (except still no
redc).
* mpz/powm.c: Adjust for negative b, after exponentiation done. Add
(still disabled) code for handling negative exponents. Misc cleanups.
2001-11-14 Kevin Ryde <kevin@swox.se>
* mpf/out_str.c: Use localeconv for the decimal point.
* tests/misc.c (tests_rand_end): Use time() if gettimeofday() not
available (eg. on mingw).
2001-11-11 Kevin Ryde <kevin@swox.se>
* gmp-h.in: Remove parameter names from prototypes, to keep out of
application namespace.
2001-11-08 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_GCC_VERSION_GE): Fix sed regexps to work on
Solaris 8.
* printf/doprnt.c: Support %n of all types, per glibc.
* gmp-h.in, gmp-impl.h, mpf/abs.c, mpf/neg.c, mpf/get_prc.c,
mpf/get_dfl_prec.c, mpf/set_dfl_prec.c, mpf/set_prc_raw.c,
mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Revert mpf inlining, in order
to leave open the possibility of keeping binary compatibility if mpf
becomes mpfr.
* mpn/x86/k7/mmx/lshift.asm, mpn/x86/k7/mmx/rshift.asm: Use Zdisp to
force code size for computed jumps.
* mpn/x86/k6/mod_34lsub1.asm, mpn/x86/k6/k62mmx/copyd.asm: Use Zdisp
to force good code alignment.
* mpn/x86/x86-defs.m4 (Zdisp): More instructions.
* mpn/x86/pentium/sqr_basecase.asm, mpn/x86/k7/mmx/mod_1.asm,
mpn/x86/k7/mmx/popham.asm: Remove some unnecessary "0" address offsets.
* mpq/set_si.c, mpq/set_ui.c: Set _mp_den._mp_size correctly if den==0.
2001-11-07 Torbjorn Granlund <tege@swox.com>
* mpn/hppa/hppa1_1/udiv_qrnnd.asm: Work around gas bug.
* mpn/asm-defs.m4 (PROLOGUE): Change alignment to 8 (probably a good
idea in general; required for hppa/hppa1_1/udiv_qrnnd.asm).
2001-11-06 Torbjorn Granlund <tege@swox.com>
* gmp-impl.h (MPN_COPY_INCR): Prepend local variable by `__'.
(MPN_COPY_DECR): Likewise.
2001-11-05 Torbjorn Granlund <tege@swox.com>
* mpz/powm.c: Call mpn functions, not mpz functions, for computation
mod m. Streamline allocations to use a mixture of stack allocation and
heap allocation. Add currently disabled phi(m) exponent reduction
code. Misc optimizations and cleanups.
2001-11-05 Kevin Ryde <kevin@swox.se>
* mpq/inp_str.c: Remove unused variable "ret".
* mpn/x86/k7/sqr_basecase.asm: Fix a 0(%edi) to use Zdisp, so the
computed jumps hit the right spot on old gas.
* mpq/canonicalize.c: DIVIDE_BY_ZERO if denominator is zero.
* mpn/lisp/gmpasm-mode.el (comment-start-skip): Correction to the way
the first \( \) pair is setup.
(gmpasm-font-lock-keywords): Don't fontify the space before a "#" etc.
Misc tweaks to some comments.
2001-11-03 Torbjorn Granlund <tege@swox.com>
* tests/refmpn.c (refmpn_overlap_p): Reverse return values.
2001-11-02 Kevin Ryde <kevin@swox.se>
* tune/many.pl: Setup CFLAGS_PIC and ASMFLAGS_PIC, since that's no
longer done by configure.
* mpn/x86/pentium4/mmx/popham.asm: New file.
* mpn/x86/x86-defs.m4 (psadbw): New macro.
* mpn/x86/k7/mmx/popham.asm: Use it.
* tests/refmpn.c (refmpn_overlap_p): New function, independent of
MPN_OVERLAP_P.
2001-10-31 Torbjorn Granlund <tege@swox.com>
* tests/mpz/t-powm.c: Print proper error message when finding
discrepancy.
2001-10-31 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium/mod_34lsub1.asm: New file.
* mpn/x86/k7/mod_34lsub1.asm: New file.
* mpn/x86/mod_34lsub1.asm: New file.
2001-10-30 Kevin Ryde <kevin@swox.se>
* tests/printf/t-printf.c (check_misc): Add checks from the glibc docs.
(check_vasprintf, check_vsnprintf): Run these unconditionally.
* gmp-impl.h (ASSERT_MPQ_CANONICAL): New macro.
* mpq/cmp.c, mpq/cmp_si.c, mpq/cmp_ui.c, mpq/equal.c: Add ASSERTs for
canonical inputs, where correctness depends on it.
* mpn/lisp/gmpasm-mode.el (comment-start-skip): Add "dnl".
2001-10-27 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c: Remove some unused variables.
(main): Allocate more buffer space to accommodate minus sign.
2001-10-27 Kevin Ryde <kevin@swox.se>
* gmp-impl.h, mpn/asm-defs.m4, configure.in, tune/speed.h,
tune/speed.c, tune/common.c, tune/many.pl, tests/devel/try.c: Add
mpn_mod_34lsub1.
* tests/refmpn.c, tests/tests.h (refmpn_mod_34lsub1): New function.
* mpn/generic/mod_34lsub1.c: New file.
* mpn/x86/k6/mod_34lsub1.asm: New file.
* mpn/x86/pentium4/sse2/mod_34lsub1.asm: New file.
* mpn/x86/x86-defs.m4 (Zdisp): Add another instruction.
* gmp-h.in, gmpxx.h: Use <iosfwd> not whole <iostream>.
* gmp.texi (Known Build Problems): Add note on test programs with
Windows DLLs.
2001-10-26 Kevin Ryde <kevin@swox.se>
* tests/mpq/t-get_d.c: Limit the size of "eps" for vax.
* gmp.texi (maybepagebreak): New macro, use it in a few places.
(Notes for Particular Systems): C++ Windows DLLs are not supported.
(Known Build Problems): Note sparc solaris 2.7 gcc 2.95.2 shared
library problems.
(Autoconf): Tweak version numbers shown.
(Integer Roots): mpz_perfect_square_p and mpz_perfect_power_p consider
0 and 1 perfect powers, mpz_perfect_power_p accepts negatives.
(Number Theoretic Functions): Add mpz_millerrabin, combined with a
reworded mpz_probab_prime_p.
(Formatted Output Strings): Misc clarifications.
(Formatted Output Functions): gmp_asprintf, gmp_vasprintf,
gmp_snprintf, gmp_vsnprintf always available.
(C++ Formatted Output): Misc rewordings.
(Formatted Input): New chapter.
(C++ Class Interface): New chapter, by Gerardo and me.
(Language Bindings): Update GMP++ now in GMP.
(C++ Interface Internals): New section, by Gerardo and me.
* printf/repl-vsnprintf.c: New file.
* configure.in, acinclude.m4, Makefile.am, printf/Makefile.am: Use it
if libc vsnprintf missing or bad.
* configure.in (AC_CHECK_FUNCS): Add strnlen.
* printf/snprntffuns.c, printf/vasprintf.c: Use
__gmp_replacement_vsnprintf if libc vsnprintf not available.
* printf/asprintf.c, printf/snprintf.c, printf/vasprintf.c,
printf/vsnprintf.c: Provide these functions unconditionally.
* acinclude.m4 (GMP_FUNC_VSNPRINTF): Remove warning about omissions
when vsnprintf not available.
2001-10-24 Kevin Ryde <kevin@swox.se>
* configure, aclocal.m4: Regenerate with a libtool patch for a stray
quote in AC_LIBTOOL_PROG_LD_SHLIBS under mingw and cygwin.
* gmp-impl.h (modlimb_invert): More comments.
* printf/doprnt.c, printf/doprnti.c: Use the precision field to print
leading zeros.
* tests/printf/t-printf.c: Test this.
* cxx/osdoprnti.cc, gmp-impl.h: Ignore precision in operator<<.
* tune/speed.c, tune/speed.h, tune/common.c: Add mpn_mul_1_inplace.
2001-10-23 Torbjorn Granlund <tege@swox.com>
* mpz/pprime_p.c (mpz_millerrabin): Remove function and its descendant.
* mpz/millerrabin.c: New file with code from pprime.c.
* mpz/Makefile.am: Compile millerrabin.c.
* Makefile.am (MPZ_OBJECTS): Ditto.
* gmp-h.in: Declare mpz_millerrabin.
2001-10-22 Torbjorn Granlund <tege@swox.com>
* tests/mpz/t-perfsqr.c: New file.
* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
* demos/factorize.c (factor): Check for number to factor == 0.
(main): When invoked without arguments, read from stdin.
* mpz/perfpow.c: Add code to handle negative perfect powers ((-b)^odd).
Treat 0 and 1 as perfect powers.
* mpn/sparc32/v9/sqr_diagonal.asm: Jump past .align.
2001-10-21 Torbjorn Granlund <tege@swox.com>
* mpn/generic/perfsqr.c (sq_res_0x100): Remove bogus final `,'.
(mpn_perfect_square_p): Suppress superfluous `&1' in sq_res_0x100 test.
(mpn_perfect_square_p, O(n) test): Improve comments. Combine remainder
tests for some small primes. Don't share code for different limb
sizes. Use single `if' with many `||' for better code density.
2001-10-22 Kevin Ryde <kevin@swox.se>
* demos/perl/GMP.xs (mutate_mpz, tmp_mpf_grow): Make these "static".
* mpn/x86/pentium/popcount.asm, mpn/x86/pentium/hamdist.asm
(mpn_popcount_table): Use GSYM_PREFIX.
2001-10-19 Kevin Ryde <kevin@swox.se>
* mpn/x86/*.asm: Add some measured speeds on various x86s.
* tests/mpz/reuse.c, tests/mpf/reuse.c: Disable tests when using a
windows DLL, because certain global variable usages won't compile.
* configure.in (AC_CHECK_FUNCS): Add alarm.
* tests/spinner.c: Conditionalize alarm and SIGALRM availability, for
the benefit of mingw32.
* acinclude.m4 (GMP_ASM_TYPE, GMP_ASM_SIZE): Suppress .type and .size
on COFF.
* acinclude.m4 (GMP_PROG_HOST_CC): New macro.
* configure.in: Use it for windows DLL cross-compiles.
* aclocal.m4, configure: Regenerate with libtool patch to hold HOST_CC
in the generated libtool script.
* aclocal.m4, configure: Regenerate with libtool patch to suppress
warnings when probing command line limit on FreeBSD.
* demos/qcn.c (M_PI): Define if not already provided, helps mingw32.
2001-10-17 Kevin Ryde <kevin@swox.se>
* printf/doprnt.c: Use <stdint.h> for intmax_t.
* longlong.h: Recognise __sparcv8 for gcc on Solaris. Reported by
Mark Mentovai <mark@mentovai.com>.
* gmp-impl.h (gmp_allocated_string): No need for inline on member funs.
2001-10-16 Kevin Ryde <kevin@swox.se>
* gmp.texi (Debugging): Add mpatrol.
(Integer Comparisons, Comparing Rationals, Float Comparison): Index
entries for sign tests.
(I/O of Floats): Clarify mpf_out_str exponent is in decimal.
(C++ Formatted Output): mpf_t operator<< exponent now in decimal.
(FFT Multiplication): Use an ascii art sigma.
(Contributors): Add Gerardo Ballabio.
* cxx/osfuns.cc (__gmp_doprnt_params_from_ios): Always give mpf_t
exponent in decimal, irrespective of ios::hex or ios::oct.
* tests/cxx/t-ostream.cc (check_mpf): Update.
* printf/doprnt.c: Support %lln and %hhn.
* mpn/x86/pentium4/sse2/submul_1.asm: Use a psubq to negate the
initial carry (helps the submul_1c case), and improve the comments.
2001-10-11 Kevin Ryde <kevin@swox.se>
* acinclude.m4, configure.in (GMP_IMPL_H_IEEE_FLOATS): New macro.
* ltmain.sh: Send some rm errors to /dev/null, helps during compiles
on Solaris 2.7 and HP-UX 10.
* tal-notreent.c: Renamed from stack-alloc.c.
* Makefile.am, acinclude.m4, gmp-impl.h: Update.
* gmp-h.in: Don't give both prototypes and inlines, except on gcc.
* gmp-h.in, gmp-impl.h: Use #includes to get necessary standard
classes, add std:: to prototypes.
* cxx/*.cc, tests/cxx/t-ostream.cc: Add "use namespace std".
* acinclude.m4 (GMP_PROG_CXX_WORKS): Ditto.
* tests/*/Makefile.in, mpfr/tests/Makefile.in: Regenerate with
automake patch to avoid Ultrix problem with empty $(TESTS).
* */Makefile.in: Regenerate with automake patch to only rm *_.c in
"make clean" when ansi2knr actually in use, helps DOS 8.3.
* Makefile.in: Regenerate with automake patch to fix stamp-h
numbering, avoiding an unnecessary config.status run.
2001-10-09 Torbjorn Granlund <tege@swox.com>
* mpn/hppa/hppa1_1/udiv_qrnnd.asm: Use L macros for labels.
Quote L reloc operator.
* gmp-impl.h: Declare class string.
* mpn/asm-defs.m4 (INT32, INT64): Quote $1 to prevent further
expansion.
* mpn/alpha/ev6/mul_1.asm: New file.
2001-10-09 Kevin Ryde <kevin@swox.se>
* gmp.texi (Introduction to GMP): Add pentium 4 to optimized CPUs.
(Build Options): Note macos directory.
(Notes for Package Builds): GMP 4 series binary compatible with 3.
(Known Build Problems): Remove $* and ansi2knr note, now fixed, except
possibly under --host=none.
(Formatted Output Strings): Remove -1 prec for all digits.
* mpz/add.c, mpz/sub.c: Don't use mpz path on #include (helps macos).
* mpbsd/Makefile.am (INCLUDES): Add -I$(top_srcdir)/mpz.
* printf/doprnt.c, tests/printf/t-printf.c: Remove support for %.*Fe
prec -1 meaning all digits.
* acinclude.m4 (GMP_PROG_AR): Override libtool, use AR_FLAGS="cq".
(GMP_HPC_HPPA_2_0): Print version string to config.log.
* Makefile.am (AUTOMAKE_OPTIONS): Remove check-news (permission notice
in NEWS file is too big).
(dist-hook): Don't distribute numbered or unnumbered emacs backups.
* Makefile.am, cxx/Makefile.am: Updates for Gerardo's stuff.
2001-10-09 Gerardo Ballabio <ballabio@sissa.it>
* cxx/isfuns.cc: New file.
* gmp-impl.h: Add prototypes.
* cxx/ismpf.cc, cxx/ismpq.cc, cxx/ismpz.cc: New files.
* gmp-h.in: Add prototypes.
* gmpxx.h, mpfrxx.h: New files.
2001-10-08 Kevin Ryde <kevin@swox.se>
* configure.in (with_tags): Establish a default based on --enable-cxx.
* aclocal.m4: Regenerate with libtool patches for sed char range to
help Cray, LTCC quotes and +Z warnings grep to help HP-UX.
* gmp-impl.h (doprnt_format_t, doprnt_memory_t, doprnt_reps_t,
doprnt_final_t): Use _PROTO.
2001-10-05 Torbjorn Granlund <tege@swox.com>
* mpn/asm-defs.m4 (INT32, INT64): Use LABEL_SUFFIX.
* mpn/hppa: Convert files to `.asm'.
2001-10-05 Kevin Ryde <kevin@swox.se>
* mpn/Makeasm.am (.S files): Revert to separate CPP and CCAS, use
cpp-ccas, and only pass CPPFLAGS to CPP, not whole CFLAGS.
* mpn/cpp-ccas: New file.
* mpn/Makefile.am (EXTRA_DIST): Add it.
* tune/common.c, tune/speed.h: Change SPEED_ROUTINE_MPN_COPY_CALL uses
to SPEED_ROUTINE_MPN_COPY or new SPEED_ROUTINE_MPN_COPY_BYTES. Avoids
macro expansion problems on Cray.
* configure.in (AC_PROG_CXXCPP): Add this, to make libtool happier.
2001-10-04 Torbjorn Granlund <tege@swox.com>
* mpz/rrandomb.c (gmp_rrandomb): Change bit_pos to be 0-based (was
1-based); shift 2 (was 1) when making bit mask. These two changes
avoid undefined shift counts.
(gmp_rrandomb): Avoid most calls to _gmp_rand by caching random values.
* mpn/generic/random2.c: Changes for mirroring mpz/rrandomb.c.
2001-10-04 Kevin Ryde <kevin@swox.se>
* gmp.texi (Build Options): Add --enable-cxx.
(Notes for Particular Systems): Mention pentium4 performance and SSE2.
(Known Build Problems): Remove vax jsobgtr note, no longer needed.
(Converting Floats): Tweak mpf_get_str description.
(Low-level Functions): Correction to mpn_gcdext destination space
requirements.
(C++ Formatted Output): New section.
(Language Bindings): Add ALP
(Contributors): Add Paul Zimmermann's square root, update my things.
* acinclude.m4 (GMP_PROG_CC_IS_GNU, GMP_PROG_CXX_WORKS): Send compiler
errors to config.log.
* mpq/Makefile.am (INCLUDES): Remove -DOPERATION_$*, not needed.
* mpn/x86/*.asm: Change references to old README.family to just README.
* mpz/README: Remove file, now adequately covered in the manual.
2001-10-03 Torbjorn Granlund <tege@swox.com>
* mpn/x86/pentium4/copyi.asm: New file.
* mpn/x86/pentium4/copyd.asm: New file.
* gmp-impl.h: Implement separate MPN_COPY_INCR and MPN_COPY_DECR
macros for CRAY systems.
(CRAY _MPN_COPY): Delete.
2001-10-02 Kevin Ryde <kevin@swox.se>
* tests/mpz/t-popcount.c (check_data): Use "~ (unsigned long) 0" to
avoid compiler warnings on sco.
* mpbsd/Makefile.am: Compile mpz files directly, no copying.
Use mpz/add.c and mpz/sub.c rather than mpz/aors.c.
(INCLUDES): Remove -DOPERATION_$*, no longer needed (by mpz).
* mpz/aors.h: Renamed from mpz/aors.c.
* mpz/add.c, mpz/sub.c: New files, using mpz/aors.h.
* mpz/aors_ui.h: Renamed from mpz/aors_ui.c.
* mpz/add_ui.c, mpz/sub_ui.c: New files, using mpz/aors_ui.h.
* mpz/fits_s.h: Renamed and adapted from mpz/fits_s.c.
* mpz/fits_sshort.c, mpz/fits_sint.c, mpz/fits_slong.c: New files.
* mpz/mul_i.h: Renamed from mpz/mul_siui.c.
* mpz/mul_ui.c, mpz/mul_ui.c: New files, using mpz/mul_i.h.
* mpz/Makefile.am: Consequent updates.
(INCLUDES): Remove -DOPERATION_$*.
* mpf/fits_s.h: Renamed and adapted from mpf/fits_s.c.
* mpf/fits_sshort.c, mpf/fits_sint.c, mpf/fits_slong.c: New files.
* mpf/fits_u.h: Renamed and adapted from mpf/fits_u.c.
* mpf/fits_ushort.c, mpf/fits_uint.c, mpf/fits_ulong.c: New files.
* mpf/Makefile.am: Consequent updates.
(INCLUDES): Remove -DOPERATION_$*.
* cxx/osfuns.cc (__gmp_doprnt_params_from_ios): Don't use ios::hex etc
as cases in a switch, they're not constant in g++ 3.0.
* mpn/Makeasm.am (.s.o, .s.obj, .S.o, .S.obj, .asm.o, .asm.obj):
Locate source file with test -f the same as automake.
(.S): Let CCAS do the preprocessing, and run libtool for .S.lo.
(.asm.lo): Run libtool via m4-ccas to get new style foo.lo right.
(COMPILE_FLAGS): Add $(DEFAULT_INCLUDES), per new automake.
* mpn/m4-ccas: New file.
* mpn/Makefile.am (EXTRA_DIST): Add it.
* mpn/asm-defs.m4: Add m4_not_for_expansion(`DLL_EXPORT').
* mpn/x86/x86-defs.m4: Undefine PIC if DLL_EXPORT is set.
* configure.in (CFLAGS_PIC, ASMFLAGS_PIC): Remove, no longer needed.
* acinclude.m4 (GMP_FUNC_VSNPRINTF): Warn what's omitted when
vsnprintf not available.
* mpn/underscore.h: Remove file, not used since m68k converted to asm.
* mpn/Makefile.am (EXTRA_DIST): Remove it.
* tests/refmpz.c: Add <stdlib.h>, for free().
2001-10-01 Torbjorn Granlund <tege@swox.com>
* mpn/x86/pentium4/sse2/submul_1.asm: Apply some algebraic
simplifications.
* mpn/x86/pentium4/sse2/addmul_1.asm: Comment.
2001-10-01 Kevin Ryde <kevin@swox.se>
* configure.in (--enable-cxx): New option for C++ support.
Add cxx and tests/cxx subdirectories.
* ltmain.sh, aclocal.m4: Update to libtool 2001-09-30.
* cxx/Makefile.am, cxx/Makefile.in, cxx/osdoprnti.cc, cxx/osfuns.cc,
cxx/osmpf.cc, cxx/osmpq.cc, cxx/osmpz.cc: New files.
* Makefile.am: Add them, in new libgmpxx.
* gmp-h.in, gmp-impl.h: Prototypes and support.
* tests/cxx/Makefile.am, tests/cxx/Makefile.in,
tests/cxx/t-ostream.cc: New files.
* tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL,
SPEED_ROUTINE_MPN_GCDEXT_ONE): mpn_gcdext needs size+1 for
destinations. Found by Torbjorn.
* gmp-h.in (__GNU_MP__, __GNU_MP_VERSION): Bump to 4.0.
* mp-h.in (__GNU_MP__): Ditto.
* gmp.texi, Makefile.am, compat.c: Amend version 3.2 to 4.0.
* acinclude.m4 (GMP_PROG_CXX_WORKS): New macro.
(GMP_PROG_CC_WORKS): Write "conftest" test program, not a.out.
* gmp-impl.h (struct gmp_asprintf_t): Moved from printf/vasprintf.c.
(GMP_ASPRINTF_T_INIT): New macro.
(GMP_ASPRINTF_T_NEED): New macro, adapted from vasprintf.c NEED().
* printf/vasprintf.c: Use these.
* printf/asprntffuns.c: New file.
* printf/Makefile.am, Makefile.am: Add it.
* printf/asprntffuns.c, printf/vasprintf.c, gmp-impl.h
(__gmp_asprintf_memory, __gmp_asprintf_reps, __gmp_asprintf_final):
Move to asprntffuns.c, rename to __gmp and make global, remove
spurious formal parameters from __gmp_asprintf_final.
* configure.in (j90-*-*, sv1-*-*): Don't duplicate $path in $add_path.
(*-*-mingw*): Don't assemble with -DPIC (as per cygwin).
* printf/snprntffuns.c (gmp_snprintf_final): Remove spurious formal
parameters.
* tune/tuneup.c (POWM_THRESHOLD): Reduce stop_factor to 1.1 to help
Cray vector systems.
* tests/misc.c (tests_rand_start): Print GMP_CHECK_RANDOMIZE=NN to
facilitate cut and paste when re-running.
* tests/mpz/t-inp_str.c (check_data): Add more diagnostic prints.
2001-09-30 Kent Boortz <kent@swox.com>
* macos/configure, macos/Makefile.in, macos/README: Updates for gmp 4.
* gmp-h.in (_GMP_H_HAVE_FILE): Recognise Apple MPW.
2001-09-30 Torbjorn Granlund <tege@swox.com>
* mpn/cray/ieee/submul_1.c: Rewrite. Streamline multiplications;
use `majority' logic.
2001-09-27 Torbjorn Granlund <tege@swox.com>
* gmp-h.in (__GMPN_AORS_1): Rewrite to work around Cray compiler bug.
2001-09-26 Torbjorn Granlund <tege@swox.com>
* mpn/x86/pentium4/sse2/gmp-mparam.h: New file.
2001-09-26 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium4/sse2/dive_1.asm: New file.
* mpn/x86/pentium4/sse2/submul_1.asm: New file.
* mpn/x86/pentium4/sse2/sqr_basecase.asm: New file.
* mpn/x86/pentium/copyi.asm: New file, based on past work by Torbjorn.
* mpn/x86/pentium/copyi.asm: New file, ditto.
* mpn/x86/pentium/com_n.asm: Rewrite, ditto.
* printf/snprntffuns.c (gmp_snprintf_format): Copy va_list in case
vsnprintf trashes it.
* printf/vasprintf.c (gmp_asprintf_format): Ditto.
* gmp-impl.h, doprnt.c (va_copy): Move to gmp-impl.h.
* tests/mpz/t-cmp_d.c (check_low_z_one): Patch by Torbjorn for vax
limited float range.
2001-09-23 Torbjorn Granlund <tege@swox.com>
* mpn/vax/lshift.s: Change `jsob*' to `sob*'.
* mpn/vax/rshift.s: Likewise.
2001-09-23 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium4/sse2/mul_basecase.asm: Some simple but real code.
* printf/doprnt.c: Use va_copy for va_list variables, copy function
parameter in case it's call-by-reference.
* tune/freq.c (speed_cpu_frequency_bsd_dmesg): New function.
(speed_cpu_frequency_table): Use it.
* tune/many.pl (popcount, hamdist): Fix declared return value.
(sb_divrem_mn): Remove a spurious duplicate entry.
(CLEAN): Add tmp-$objbase.c when using that for .h files.
(macro_speed): Give a default for .h files.
Add ATTRIBUTE_CONST or __GMP_ATTRIBUTE_PURE as appropriate.
* tune/speed.h (SPEED_ROUTINE_MPN_MOD_CALL,
SPEED_ROUTINE_MPN_PREINV_MOD_1, SPEED_ROUTINE_MPN_POPCOUNT,
SPEED_ROUTINE_MPN_HAMDIST, SPEED_ROUTINE_MPN_GCD_1N,
SPEED_ROUTINE_MPN_GCD_1_CALL, SPEED_ROUTINE_MPZ_JACOBI): Use return
values so gcc 3 won't discard calls to pure or const functions.
(mpn_mod_1_div, mpn_mod_1_inv): Add __GMP_ATTRIBUTE_PURE.
2001-09-22 Torbjorn Granlund <tege@swox.com>
* mpn/x86/pentium4/sse2/mul_basecase.asm: New file, placeholder
for real code, hiding the default x86 mul_basecase.asm.
2001-09-22 Kevin Ryde <kevin@swox.se>
* configure.in (AC_PREREQ): Bump to 2.52.
(m4_pattern_forbid, m4_pattern_allow): New calls, forbid GMP_.
(AC_CHECK_HEADERS): Remove sys/types.h, already done by autoconf.
* acinclude.m4, configure.in (GMP_GCC_NO_CPP_PRECOMP): New macro.
* tests/devel/try.c (TYPE_PREINV_MOD_1): Don't run size==0.
(malloc_region): Need fd=-1 for mmap MAP_ANON on BSD.
2001-09-20 Torbjorn Granlund <tege@swox.com>
* mpz/cong.c (mpz_congruent_p): Fix one-limb c<d test.
* longlong.h: Rewrite __i370__ smul_ppmm; enable also for __s390__.
* configure.in: Add support for IBM 360, 370, 390 families.
2001-09-20 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium4/sse2/diveby3.asm: New file.
* mpn/x86/pentium4/sse2/mode1o.asm: New file.
2001-09-16 Kevin Ryde <kevin@swox.se>
* printf/doprnt.c: '#' means showpoint and showtrailing for %e, %f, %g.
* tests/printf/t-printf.c (check_f): More test cases.
2001-09-15 Torbjorn Granlund <tege@swox.com>
* gmp-h.in (__GMPN_AORS_1): Remove param TEST, add OP and CB.
Postpone zeroing of (cout).
(__GMPN_ADD_1, __GMPN_SUB_1): Corresponding changes.
2001-09-14 Kevin Ryde <kevin@swox.se>
* ChangeLog: Merge in tests/rand/ChangeLog.
* tests/rand/ChangeLog: Remove file.
* printf/doprnt.c: Fix handling of a plain format after a GMP one; no
need to protect against negative precision internally.
* tests/printf/t-printf.c (check_misc): More checks.
2001-09-12 Torbjorn Granlund <tege@swox.com>
* mpn/cray/ieee/invert_limb.c: Add a PROLOGUE in a comment to have
HAVE_NATIVE_... defined.
2001-09-11 Kevin Ryde <kevin@swox.se>
* configure.in, gmp-h.in (__GMP_HAVE_HOST_CPU_FAMILY_power,
__GMP_HAVE_HOST_CPU_FAMILY_powerpc): New AC_SUBSTs.
* gmp-h.in (__GMPN_COPY_INCR): Use them to select the power/powerpc
code, rather than preprocessor defines.
* acinclude.m4, configure.in (GMP_H_ANSI): New macro.
* gmp-h.in (__GMP_EXTERN_INLINE): Add a definition for SCO 8 cc.
* gmp-h.in, version.c (gmp_version): Make the pointer "const" as well
as the string.
* acinclude.m4, configure.in (GMP_PROG_CC_IS_XLC): Recognise xlc when
invoked under another name (cc, xlc128, etc).
* acinclude.m4 (GMP_PROG_CC_IS_GCC): Print a message when recognised.
2001-09-11 Torbjorn Granlund <tege@swox.com>
* gmp-h.in: Let __DECC mean __GMP_HAVE_CONST, etc.
* mp-h.in: Likewise.
2001-09-10 Torbjorn Granlund <tege@swox.com>
* mpn/x86/pentium4/mmx/lshift.asm: New file.
* mpn/x86/pentium4/mmx/rshift.asm: New file.
* tests/mpn/t-iord_u.c (check_incr_data): Work around HP compiler bug.
(check_decr_data): Likewise.
2001-09-08 Kevin Ryde <kevin@swox.se>
* gmp.texi (Integer Logic and Bit Fiddling): Update mpz_hamdist
behaviour, clarify mpz_popcount a touch.
(Language Bindings): Add mlton, fix alphabetical order.
(Single Limb Division): Describe 2 or 1/2 limbs at a time style.
* configure.in (AC_CHECK_FUNCS): Add mmap.
* tests/devel/try.c (malloc_region): Use mmap if available.
* tests/refmpz.c, tests/tests.h (refmpz_hamdist): New function.
* tests/mpz/t-hamdist.c: New file.
* tests/mpz/Makefile.am: Add it.
* mpz/hamdist.c: Support neg/neg operands.
* macos/Makefile.in: Remove dual compile of mpq/aors.c and
mpn/generic/popham.c.
* gmp-impl.h (popc_limb): New macro, adapted from mpn/generic/popham.c.
For 64-bits reuse 0x33...33 constant.
* mpn/generic/popcount.c, mpn/generic/hamdist.c: Split from popham.c,
use popc_limb macro, remove unused "i", don't bother with "register"
qualifiers.
* mpn/generic/popham.c: Remove file.
* ltmain.sh, configure, aclocal.m4: Update to libtool 1.4.1, with one
ltdll.c generation patch.
* doc/configuration: Misc updates, note libtool patch used.
* mpn/x86/pentium4/sse2/mul_1.asm: Use pointer increments not indexed
addressing, to get 4.0 c/l flat.
* tests/mpq/t-cmp_si.c (check_data): Use ULONG_MAX for denominators.
* tests/misc.c (mpz_negrandom): Use given rstate, not RANDS.
2001-09-07 Torbjorn Granlund <tege@swox.com>
* mpn/x86/pentium4/sse2/addmul_1.asm: New file.
2001-09-04 Kevin Ryde <kevin@swox.se>
* tune/freq.c: Define a HAVE for each speed_cpu_frequency routine to
avoid duplicating conditionals.
(speed_cpu_frequency_sco_etchw): New function.
(speed_cpu_frequency_table): Use it.
* tune/README: Mention SCO openunix 8 /etc/hw.
* mpz/fib_ui.c: Use ?: to avoid a gcc 3 bug on powerpc64.
Store back a carry for limb<long.
* mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/k7/mmx/mod_1.asm,
mpn/x86/p6/mmx/divrem_1.asm: Fix a couple of comments.
* config.guess: Give m68020 for 68020 or better, not m68k.
* configfsf.guess: Update to 2001-09-04.
2001-09-02 Kevin Ryde <kevin@swox.se>
* configure.in (m68k-*-*): Let m68k mean 68000, not 68020.
* gmp.texi (Notes for Particular Systems): Update.
* gmp-impl.h (union ieee_double_extract) [m68k]: Use longs, since int
might be only 16 bits.
* tests/mpq/t-aors.c: New file.
* tests/mpq/Makefile.am: Add it.
* tests/refmpq.c: New file.
* tests/Makefile.am: Add it.
* tests/tests.h: Add prototypes.
* mpq/aors.c: Share object code for mpq_add and mpq_sub.
* Makefile.am, mpq/Makefile.am: Single mpq/aors.lo now.
* tests/devel/try.c (TYPE_SUBMUL_1): Use correct reference routine.
2001-08-30 Kevin Ryde <kevin@swox.se>
* mpn/x86/x86-defs.m4 (cmov_available_p): Add pentium4.
* gmp-h.in: Put #define renamings with prototypes.
Remove commented out #defines of gmp-impl.h things.
(mpn_invert_limb): Remove #define, already in gmp-impl.h.
(mpn_lshiftc, mpn_rshiftc): Remove #defines, unused.
(mpn_addsub_nc): Add prototype to #define.
2001-08-28 Kevin Ryde <kevin@swox.se>
* gmp.texi: Switch to GFDL.
(Top): Arrange copyright and conditions to appear here too. For
clarity have all this before the miscellaneous macro definitions.
(Copying): Refer to COPYING.LIB file, mention plain GPL2 in demo
programs.
(Contributors, References): Use @appendix rather than @unnumbered.
(GNU Free Documentation License): New appendix.
(@contents): Move to start of document, use only for tex (not html).
(Debugging): Add leakbug.
(Build Options): Add pentium4.
(I/O of Rationals): Add mpq_inp_str.
* fdl.texi: New file, with two @appendix directive tweaks.
* Makefile.am (gmp_TEXINFOS): Add it.
* tests/mpz/io.c: Check mpz_inp_str return against ftell, send error
messages just to stdout.
* mpz/inp_str.c, gmp-impl.h (__gmpz_inp_str_nowhite): New function,
and share a __gmp_free_func call.
* mpq/inp_str.c: New file.
* Makefile.am, mpq/Makefile.am: Add it.
* tests/mpq/t-inp_str.c: New file.
* tests/mpq/Makefile.am (check_PROGRAMS): Add it.
* configure.in, acconfig.h (HAVE_HOST_CPU_FAMILY_power,
HAVE_HOST_CPU_FAMILY_powerpc, HAVE_HOST_CPU_FAMILY_x86): AC_DEFINEs
for processor families.
* gmp-impl.h: Use them, rather than cpp defines.
* demos/Makefile.am (primes_LDADD): Use $(LIBM), for log().
* tune/many.pl, tune/Makefile.am: Fix some from clean and distclean.
2001-08-26 Kevin Ryde <kevin@swox.se>
* tests/devel/try.c (ARRAY_ITERATION): Make types match on "?:" legs.
(TYPE_MPZ_JACOBI, TYPE_MPZ_KRONECKER): Remove some superseded code.
* tests/printf/t-printf.c (check_plain): Don't compare "all digits"
precision against plain printf.
* tune/Makefile.am: Eliminate empty TUNE_MPZ_SRCS.
* configure, config.in, INSTALL.autoconf: Update to autoconf 2.52.
* */Makefile.in, mdate-sh, missing, aclocal.m4, configure: Update to
automake 1.5.
* configfsf.guess, configfsf.sub: Update to 2001-08-23.
2001-08-24 Torbjorn Granlund <tege@swox.com>
* demos/primes.c: Complete rewrite.
2001-08-24 Kevin Ryde <kevin@swox.se>
* longlong.h: Test __ppc__ for apple darwin cc, reported by Jon
Becker. Also test __POWERPC__, PPC and __vxworks__.
* tune/speed.h (speed_cyclecounter) [x86]: Don't clobber ebx in PIC.
2001-08-22 Kevin Ryde <kevin@swox.se>
* configure.in (x86 mmx): Correction to mmx path stripping.
2001-08-17 Kevin Ryde <kevin@swox.se>
* configure.in, acinclude.m4, Makefile.am, printf/Makefile.am,
tests/printf/Makefile.am, gmp-h.in, gmp-impl.h, gmp.texi: Remove C++
support, for the time being.
* printf/doprntfx.cc, doprntix.cc, osfuns.cc, osmpf.cc, osmpq.cc,
osmpz.cc, tests/printf/t-ostream.cc: Remove files.
* printf/doprnt.c, printf/doprntf.c, gmp-impl.h: Use a single
__gmp_doprnt_mpf, rather than a separate ndigits calculation.
* printf/doprnt.c, printf/doprntf.c, gmp-impl.h, gmp.texi,
tests/printf/t-printf.c: Let empty or -1 prec mean all digits for mpf.
* printf/doprnt.c, tests/printf/t-printf.c: Accept h or l in %n; let
negative "*" style width mean left justify.
* gmp-impl.h, mpf/get_str.c (MPF_SIGNIFICANT_DIGITS): New macro,
extracted from mpf/get_str.c.
* libmp.sym: New file.
* Makefile.am (libmp_la_LDFLAGS): Use it.
(DISTCLEANFILES): Remove asm-syntax.h, no longer generated.
Remove some comments about "make check".
* demos/perl/GMP.pm, GMP.xs, GMP/Mpf.pm: Add printf and sprintf,
change get_str to string/exponent for floats, remove separate
mpf_get_str.
* demos/perl/GMP/Mpf.pm (overload_string): Use $# (default "%.g").
* demos/perl/typemap: Fix some duplicate string entries.
* demos/perl/test.pl: Update tests, split overloaded constants into ...
* demos/perl/test2.pl: ... this new file.
* demos/perl/Makefile.PL (clean): Add test.tmp.
2001-08-16 Kevin Ryde <kevin@swox.se>
* printf/snprntffuns.c (gmp_snprintf_format): Correction to bufsize-1
return value handling.
* demos/calc/calc.y: Reposition "%{" so copyright notice gets into
generated files.
* INSTALL: Use gmp_printf.
2001-08-14 Kevin Ryde <kevin@swox.se>
* mpz/inp_str.c: Fix return value (was 1 too big).
* tests/mpz/t-inp_str.c: New file.
* tests/mpz/Makefile.am: Add it.
* mpn/x86/pentium4/sse2/add_n.asm: New file.
* mpn/x86/pentium4/sse2/sub_n.asm: New file.
* mpn/x86/pentium4/sse2/mul_1.asm: New file.
2001-08-12 Kevin Ryde <kevin@swox.se>
* printf/sprintffuns.c, printf/doprntf.c: Don't use sprintf return
value (it's a pointer on SunOS 4).
* acinclude.m4 (GMP_ASM_X86_SSE2, GMP_STRIP_PATH): New macros.
* configure.in: Add pentium4 support.
* mpn/x86/pentium4, mpn/x86/pentium4/mmx, mpn/x86/pentium4/sse2: New
directories.
* mpn/x86/README: Update.
2001-08-10 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c (setup_error_handler): Catch also SIGABRT.
2001-07-31 Kevin Ryde <kevin@swox.se>
* tests/refmpn.c (refmpn_mul_1c): Allow low to high overlaps.
* gmp-h.in, gmp-impl.h (_gmp_rand): Move prototype to gmp-impl.h.
* tune/Makefile.am (EXTRA_DIST): Add many.pl.
2001-07-28 Kevin Ryde <kevin@swox.se>
* gmp.texi (Random Number Functions): Old rand functions no longer use
the C library.
* configure.in, acinclude.m4 (GMP_FUNC_VSNPRINTF): New macro.
* mpn/generic/get_str.c: Add an ASSERT for high limb non-zero.
2001-07-24 Kevin Ryde <kevin@swox.se>
* gmp.texi (Build Options): Add --enable-cxx.
(Converting Floats): Note mpf_get_str only generates accurately
representable digits.
(Low-level Functions): Note mpn_get_str requires non-zero high limb.
(Formatted Output): New chapter.
(Multiplication Algorithms): Use @quotation with @multitable.
(Toom-Cook 3-Way Multiplication): Ditto.
* tests/memory.c (tests_free_nosize): New function.
* tests/tests.h (tests_allocate etc): Add prototypes.
* tests/printf: New directory.
* tests/printf/Makefile.am, t-printf.c, t-ostream.cc: New files.
* configure.in, tests/Makefile.am: Add them.
* configure.in, acinclude.m4 (GMP_PROG_CXX): New macro.
* configure.in (--enable-cxx): New option.
(AC_CHECK_HEADERS): Add locale.h and sys/types.h, remove unistd.h.
(AC_CHECK_TYPES): Add intmax_t, long double, long long, ptrdiff_t,
quad_t.
(AC_CHECK_FUNCS): Add localeconv, memset, obstack_vprintf, snprintf,
strchr, vsnprintf.
(AC_CHECK_DECLS): Add vfprintf.
* gmp-h.in, gmp-impl.h: Additions for gmp_printf etc.
* printf: New directory.
* printf/Makefile.am, asprintf.c, doprnt.c, doprntf.c, doprntfx.cc,
doprnti.c, doprntix.cc, fprintf.c, obprintf.c, obprntffuns.c,
obvprintf.c, osfuns.cc, osmpf.cc, osmpq.cc, osmpz.cc, printf.c,
printffuns.c, snprintf.c, snprntffuns.c, sprintf.c, sprintffuns.c,
vasprintf.c, vfprintf.c, vprintf.c, vsnprintf.c, vsprintf.c: New
files.
* configure.in, Makefile.am: Add them.
* configure.in (HAVE_INLINE): Remove AC_DEFINE, unused.
(AC_CHECK_TYPES): Don't test for void, assume it always exists.
* gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE): New macro.
* mpz/get_str.c, mpq/get_str.c, mpf/get_str.c: Use it.
* gmp-impl.h (mpn_fib2_ui): Use __MPN.
(MPN_COPY_DECR): Fix an ASSERT.
(CAST_TO_VOID): Remove macro.
* gmp-h.in (mpq_out_str): Give #define even without prototype.
(mpz_cmp_d, mpz_cmpabs_d): Corrections to #defines.
* tests/devel/try.c: Add mpn_add and mpn_sub, don't use CAST_TO_VOID.
2001-07-23 Torbjorn Granlund <tege@swox.com>
* config.guess: Recognize pentium4.
* config.sub: Recognize pentium4.
2001-07-17 Kevin Ryde <kevin@swox.se>
* gmp-h.in (__GMPN_AORS_1): Remove x86 and gcc versions, leave just
one version.
(__GMPN_ADD, __GMPN_SUB): New macros, rewrite of mpn_add and mpn_sub.
(mpn_add, mpn_sub): Use them.
(__GMPN_COPY_REST): New macro.
* gmp-h.in, gmp-impl.h, acinclude.m4: Remove __GMP_ASM_L and
__GMP_LSYM_PREFIX, revert to ASM_L in gmp-impl.h and AC_DEFINE of
LSYM_PREFIX.
2001-07-11 Kevin Ryde <kevin@swox.se>
* gmp-h.in (__GMPN_ADD_1 etc) [x86]: Don't use this on egcs 2.91.
* mpz/fits_uint.c, fits_ulong.c, mpz/fits_ushort.c: Split up fits_u.c.
* mpz/fits_u.c: Remove file.
* mpz/Makefile.am, macos/Makefile.in: Update.
* tests/refmpn.c,tests.h (refmpn_copy): New function.
* tests/devel/try.c (TYPE_ZERO): No return value from call.
(TYPE_MODEXACT_1_ODD, TYPE_MODEXACT_1C_ODD): Share call with
TYPE_MOD_1 and TYPE_MOD_1C.
(MPN_COPY, __GMPN_COPY, __GMPN_COPY_INCR): Add testing.
2001-07-10 Kevin Ryde <kevin@swox.se>
* gmp-h.in (__GMPN_COPY): Add form to help gcc on power and powerpc.
* gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR, MPN_ZERO): Ditto.
* mpn/powerpc64/copyi.asm, mpn/powerpc64/copyd.asm: Remove files.
* mpz/tdiv_ui.c: Eliminate some local variables (seems to save code on
i386 gcc 2.95.x), remove a bogus comment about quotient.
* errno.c, gmp-impl.h (__gmp_exception, __gmp_divide_by_zero,
__gmp_sqrt_of_negative): New functions.
* gmp-impl.h (GMP_ERROR, DIVIDE_BY_ZERO, SQRT_OF_NEGATIVE): Use them.
* randclr.c, randraw.c: Use ASSERT(0) for unrecognised algorithms.
2001-07-07 Kevin Ryde <kevin@swox.se>
* configure.in (powerpc*-*-*): Use -no-cpp-precomp for Darwin.
* tests/mpbsd/t-itom.c: Renamed from t-misc.c.
* tests/mpbsd/t-misc.c: Remove file.
* tests/mpbsd/Makefile.am: Update.
* tests/mpf/t-set_si.c,t-cmp_si.c,t-gsprec.c: Split from t-misc.c.
* tests/mpf/t-misc.c: Remove file.
* tests/mpf/Makefile.am: Update.
* tests/mpz/t-oddeven.c,t-set_si.c,t-cmp_si.c: Split from t-misc.c.
* tests/mpz/t-misc.c: Remove file.
* tests/mpz/Makefile.am: Update.
* stack-alloc.c: Add some alignment ASSERTs.
* gmp-impl.h (MPN_NORMALIZE): Add notes on x86 repe/scasl slow.
* tests/devel/try.c (MPN_ZERO): Add testing.
* tune/speed.c,speed.h,common.c,many.pl (MPN_ZERO): Add measuring.
* mpn/x86/divrem_1.asm: Update a remark about gcc and "loop".
* tests/mpq/t-cmp_si.c: New file.
* tests/mpq/Makefile.am: Add it.
* tests/misc.c,tests.h (mpq_set_str_or_abort): New function.
* mpq/cmp_si.c: New file.
* Makefile.am, mpq/Makefile.am: Add it.
* gmp-h.in (mpq_cmp_si): Add prototype.
* gmp.texi (Comparing Rationals): Add doco.
* gmp-h.in (_GMP_H_HAVE_FILE): Add _FILE_DEFINED for microsoft, add
notes on what symbols are for what systems.
2001-07-06 Torbjorn Granlund <tege@swox.com>
* longlong.h (ibm032 umul_ppmm): Fix typo.
* longlong.h (sparclite sdiv_qrnnd): Fix typo.
2001-07-03 Kevin Ryde <kevin@swox.se>
* mpz/bin_ui.c (DIVIDE): Use MPN_DIVREM_OR_DIVEXACT_1.
* mpz/bin_uiui.c (MULDIV): Ditto, and use local variables for size and
pointer.
* acinclude.m4 (GMP_INCLUDE_GMP_H): New macro, use it everywhere gmp.h
is wanted at configure time.
* acinclude.m4, configure.in (GMP_H_EXTERN_INLINE, GMP_H_HAVE_FILE):
New macros.
* gmp-h.in (__GMP_EXTERN_INLINE): Set to "inline" for C++.
(mpn_add, mpn_sub): Use new style __GMP_EXTERN_INLINE.
* gmp-h.in, mp-h.in, gmp-impl.h (_EXTERN_INLINE): Remove, unused.
* mpn/generic/add.c, mpn/generic/sub.c: New files.
* mpn/generic/inlines.c: Remove file.
* configure.in, mpn/Makefile.am: Update.
* gmp.texi (GMP Basics): Note the need for stdio.h to get FILE
prototypes.
2001-07-01 Kevin Ryde <kevin@swox.se>
* gmp.texi (Build Options, Reentrancy): Updates for new
--enable-alloca behaviour.
(Debugging): Describe --enable-alloca=debug.
(Miscellaneous Integer Functions): Note mpz_sizeinbase ignores signs.
(Low-level Functions): Give a formula for mpn_gcdext cofactor.
(Factorial Algorithm): New section.
(Binomial Coefficients Algorithm): New section.
Misc tweaks elsewhere.
* mpf/set_prc.c: Merge the two truncation conditionals, misc cleanups,
no functional changes.
* mpn/*/gmp-mparam.h (DIVEXACT_1_THRESHOLD): Add tuned values.
* gmp-impl.h (DIVEXACT_1_THRESHOLD): Make the default 0 when
2*UMUL_TIME < UDIV_TIME.
* mpn/x86/p6/dive_1.asm: New file.
* mpn/x86/dive_1.asm: New file.
* mpn/x86/gmp-mparam.h (DIVEXACT_1_THRESHOLD): Use it always.
* tests/refmpn.c, tests.h (refmpn_zero): New function.
* tests/devel/try.c: Use it.
* tests/refmpn.c (refmpn_sb_divrem_mn): Use refmpn_cmp, not mpn_cmp.
* tests/mpf/t-get_d.c (main): Use || not |.
* tests/misc.c, tests/t-modlinv.c, tests/mpq/t-get_str.c,
tests/mpf/reuse.c: Add string.h.
2001-06-29 Kevin Ryde <kevin@swox.se>
* tune/speed.h (SPEED_ROUTINE_MPN_FIB2_UI,
SPEED_ROUTINE_COUNT_ZEROS_C): Corrections to TMP block handling.
* gmp-impl.h (MPN_TOOM3_MUL_N_MINSIZE, MPN_TOOM3_SQR_N_MINSIZE):
Corrections to these to account for adding tD into E.
(MPN_INCR_U, MPN_DECR_U) [WANT_ASSERT]: Add size
assertions, since mpn_add_1 and mpn_sub_1 from gmp.h don't get them.
(MPN_DIVREM_OR_DIVEXACT_1): Add an assert of no remainder.
* assert.c: Add stdlib.h for abort prototype.
* tests/spinner.c, trace.c, t-constants.c, t-count_zeros.c,
t-gmpmax.c, t-modlinv.c: Ditto.
* tests/mpz/t-bin.c, t-cmp.c, t-get_si.c, t-misc.c, t-popcount.c,
t-set_str.c, t-sizeinbase.c: Ditto.
* tests/mpq/t-equal.c, t-get_str.c, t-set_f.c, t-set_str.c: Ditto.
* tests/mpf/t-fits.c, t-get_d.c, t-get_si.c, t-int_p.c, t-misc.c,
t-trunc.c: Ditto.
* tests/mpbsd/allfuns.c, t-misc.c: Ditto.
* mpn/generic/mul_n.c, mpz/cfdiv_r_2exp.c: Use MPN_INCR_U rather than
mpn_incr_u.
* tests/devel/try.c (TYPE_SB_DIVREM_MN): More fixes for calling method.
* mpn/x86/k6/cross.pl: More insn exceptions.
2001-06-23 Kevin Ryde <kevin@swox.se>
* gmp-h.in (__GMPN_ADD_1, __GMPN_SUB_1) [i386]: Fix some asm output
constraints.
* gmp-impl.h (modlimb_invert): Mask after shifting, so mask constant
fits a signed byte.
* tests/devel/try.c (TYPE_SB_DIVREM_MN): Fix initial fill of quotient
with garbage.
2001-06-20 Kevin Ryde <kevin@swox.se>
* config.guess (rs6000-*-aix4* | powerpc-*-aix4*): Suppress error
messages if $CC_FOR_BUILD or program don't work.
* mpz/sqrt.c,sqrtrem.c: Special case for op==0, to avoid TMP_ALLOC(0).
* tests/refmpf.c (refmpf_add, refmpf_sub): Avoid TMP_ALLOC(0).
* tests/mpn/t-aors_1.c: New file.
* tests/mpn/Makefile.am: Add it.
* gmp-h.in (__GMPN_ADD_1, __GMPN_SUB_1): New macros, rewrite of
mpn_add_1 and mpn_sub_1, better code for src==dst and/or n==1,
separate versions for gcc x86, gcc generic, and non-gcc.
(mpn_add_1, mpn_sub_1): Use them.
(mpn_add, mpn_sub): Ditto, to get inlines on all compilers.
(extern "C") [__cplusplus]: Let this encompass the extern inlines too.
* mpn/generic/add_1.c,sub_1.c: New files, force code from gmp.h.
* configure.in, mpn/Makefile.am: Add them.
* acinclude.m4 (GMP_ASM_LSYM_PREFIX): AC_SUBST __GMP_LSYM_PREFIX
rather than AC_DEFINE LSYM_PREFIX.
* gmp-h.in (__GMP_LSYM_PREFIX): New substitution.
(__GMP_ASM_L): New macro.
* gmp-impl.h (ASM_L): Use it.
* acinclude.m4, configure.in (GMP_C_ATTRIBUTE_MALLOC): New macro.
* gmp-impl.h: Use it for all the malloc based TMP_ALLOCs.
* stack-alloc.h: Remove file.
* tal-reent.c: New file.
* Makefile.am: Update.
* acinclude.m4, configure.in (GMP_OPTION_ALLOCA): New macro, add
malloc-reentrant method, use stack-alloc.c as malloc-notreentrant,
make "reentrant" the default.
* gmp-impl.h (__TMP_ALIGN): Moved from stack-alloc.c, use a union to
determine the value, and demand only 4 bytes align on 32-bit systems.
* gmp-impl.h (WANT_TMP_NOTREENTRANT): Move global parts of
stack-alloc.h to here, allow non power-of-2 __TMP_ALIGN in TMP_ALLOC.
* gmp-impl.h: Extend extern "C" to TMP_ALLOC declarations.
* stack-alloc.c (tmp_stack): Move private parts of stack-alloc.h to
here, use gmp-impl.h.
* gmp-impl.h (TMP_ALLOC_LIMBS_2): New macro.
* mpz/fib_ui.c, mpz/jacobi.c, mpq/cmp.c, mpn/generic/fib2_ui.c: Use it.
* mpfr/exp2.c: Patch by Paul to match TMP_MARK and TMP_FREE in loop.
* mpfr/sqrt.c: Scope nested TMP_DECL into nested { } block, patch by
Paul, tweaked by me.
* mpfr/agm.c: Ditto, and add a final TMP_FREE(marker2).
* gmp-h.in (mpn_cmp): Add __GMP_ATTRIBUTE_PURE.
* INSTALL: Clarify "make install", tweak formatting a bit.
2001-06-17 Kevin Ryde <kevin@swox.se>
* configure.in, Makefile.am, gmp-impl.h: Add a debugging TMP_ALLOC,
selected with --enable-alloca=debug.
* tal-debug.c: New file.
* configure.in, Makefile.am: Compile stack-alloc.c only for
--disable-alloca.
* assert.c (__gmp_assert_header): New function, split from
__gmp_assert_fail.
* mpz/lcm.c: Don't TMP_MARK and then just return. Remove unnecessary
_mpz_realloc prototype.
* mpn/generic/mul.c (mpn_sqr_n): Use __gmp_allocate_func for toom3
temporary workspace.
2001-06-15 Kevin Ryde <kevin@swox.se>
* tests/mpz/t-set_f.c: New file.
* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
* mpz/set_f.c: Share MPN_COPY between pad and trunc cases, do exp<=0
test earlier, store SIZ(w) earlier.
* tests/t-count_zeros.c: New file.
* tests/t-gmpmax.c: New file.
* tests/Makefile.am (check_PROGRAMS): Add them.
* mp_clz_tab.c: Compile the table only if longlong.h says it's needed;
add an internal-use-only comment.
* tune/common.c: Force a __clz_tab for convenience when testing.
* mpn/x86/pentium/gmp-mparam.h, mpn/x86/pentium/mmx/gmp-mparam.h: Add
COUNT_LEADING_ZEROS_NEED_CLZ_TAB, for mod_1.asm.
* longlong.h (count_leading_zeros) [pentium]: Decide to go with float
method for p54.
(count_leading_zeros) [alpha]: Add COUNT_LEADING_ZEROS_NEED_CLZ_TAB.
(__clz_tab): Provide a prototype only if it's needed.
* tests/trace.c (mpz_trace): Don't use = on structures.
(mpn_trace): Set _mp_alloc when creating mpz.
2001-06-12 Kevin Ryde <kevin@swox.se>
* mpn/x86/divrem_1.asm: Amend some comments about P5 speed.
* tune/README: Clarify reconfigure on gmp-mparam.h update.
* mpn/x86/p6/copyd.asm: New file.
* mpn/x86/p6/README: Update copyd and mod_1.
* mpn/x86/copyd.asm: Amend some comments.
* gmp-impl.h (__builtin_constant_p): Add dummy for non-gcc.
(mpn_incr_u, mpn_decr_u): Recognise incr==1 at compile time in the
generic code on gcc.
* gmp-impl.h (ASSERT_ZERO_P, ASSERT_MPN_NONZERO_P): New macros.
* mpn/generic/gcd_1.c, mpn/generic/mul_fft.c: Use them.
* mpz/get_d.c: Add a private mpn_zero_p.
* mpfr/trunc.c: Use own mpn_zero_p.
* tune/speed.h (SPEED_ROUTINE_MPN_GCD_1N): Use refmpn_zero_p.
* gmp-impl.h (mpn_zero_p): Remove, no longer needed.
* gmp-h.in, gmp-impl.h: Move MPN_CMP to gmp.h as __GMPN_CMP, leave an
MPN_CMP alias in gmp-impl.h.
* gmp-h.in (mpn_cmp): Add an inline version.
* mpn/generic/cmp.c: Use __GMP_FORCE_mpn_cmp to get code from gmp.h.
* acinclude.m4 (GMP_C_ATTRIBUTE_MODE): New macro.
* configure.in: Call it.
* gmp-impl.h (SItype etc): Use it.
* randraw.c (lc): Change mpn_mul_basecase->mpn_mul,
mpn_incr_u->MPN_INCR_U, abort->ASSERT_ALWAYS(0).
* longlong.h (count_leading_zeros) [pentiumpro]: Work around a partial
register stall on gcc < 3.
* gmp.texi (Introduction to GMP): Add IA-64.
(Notes for Particular Systems): i386 means generic x86.
* tests/t-modlinv.c: Use tests_start and tests_end.
2001-06-10 Kevin Ryde <kevin@swox.se>
* gmp.texi (Number Theoretic Functions): mpz_jacobi only defined for b
odd. Separate the jacobi/legendre/kronecker descriptions.
(Low-level Functions): Document mpn_mul_1 "incr" overlaps.
(Language Bindings): New chapter.
* mpz/jacobi.c: Don't retaining old behaviour of mpz_jacobi on even b
(it wasn't documented in 3.1.1).
* mpz/jacobi.c, gmp-h.in (mpz_kronecker, mpz_legendre): Remove
separate entrypoints, just #define to mpz_jacobi.
* compat.c (__gmpz_legendre): Add compatibility entrypoint.
* mpn/generic/mul_1.c: Allow "incr" style overlaps.
* tests/devel/try.c (param_init): Test this.
* mpf/mul_ui.c: Do size==0 test earlier.
2001-06-08 Kevin Ryde <kevin@swox.se>
* gmp-impl.h (ULONG_HIGHBIT, UINT_HIGHBIT, USHRT_HIGHBIT): Cast
ULONG_MAX etc to unsigned long etc before attempting to right shift.
* acinclude.m4 (GMP_ASM_LSYM_PREFIX): Add an AC_DEFINE of LSYM_PREFIX.
* gmp-impl.h (ASM_L): New macro.
(mpn_incr_u, mpn_decr_u, MPN_INCR_U, MPN_DECR_U): Add i386 optimized
versions.
* mpn/hppa/*.s,S,asm: Use .label so the code works with gas on hppa
GNU/Linux too, reported by LaMont Jones <lamont@smallone.fc.hp.com>.
* mpn/hppa/README: Add some notes on this.
* acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Ditto.
* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add dive_1.c,
fib2_ui.c.
* tests/mpn/t-iord_u.c: New file.
* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
* configure.in (mips*-*-irix[6789]*): Make ABI=n32 the default, same
as in gmp 3.1.
* gmp.texi (ABI and ISA): Update.
* gmp.texi (Build Options): Misc tweaks.
(Notes for Particular Systems): Describe windows DLL handling.
(Known Build Problems): DJGPP needs bash 2.04.
(Number Theoretic Functions): mpz_invert returns 0<=r<modulus; add
mpz_fib2_ui, mpz_lucnum_ui, mpz_lucnum2_ui.
(Fibonacci Numbers Algorithm): Update for new formulas used.
(Lucas Numbers Algorithm): New section.
* tune/speed.c,speed.h,common.c,many.pl: Add mpn_fib2_ui, mpz_fib2_ui,
mpz_lucnum_ui, mpz_lucnum2_ui.
* demos/expr/exprz.c,README: Add lucnum.
* demos/perl/GMP.pm,GMP.xs,GMP/Mpz.pm,test.pl: Add fib2, lucnum,
lucnum2.
* tests/mpz/t-lucnum_ui.c: New file.
* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
* tests/mpz/t-fib_ui.c: Check mpz_fib2_ui too, updates for new style
MPN_FIB2_SIZE.
* tune/tuneup.c, tune/Makefile.am, gmp-impl.h, mpn/*/gmp-mparam.h:
Remove FIB_THRESHOLD, no longer required.
* mpz/fib2_ui.c, mpz/lucnum_ui.c mpz/lucnum2_ui.c: New files.
* Makefile.am, mpz/Makefile.am: Add them.
* gmp-h.in (mpz_fib2_ui, mpz_lucnum_ui, mpz_lucnum2_ui): Add
prototypes.
* mpn/generic/fib2_ui.c: New file.
* configure.in (gmp_mpn_functions): Add it.
* gmp-impl.h (mpn_fib2_ui, FIB_TABLE, etc): Add these.
* mpz/fib_ui.c: Rewrite.
* acinclude.m4 (GMP_C_SIZES): Fix _LONG_LONG_LIMB define for mp_limb_t
size test.
(GMP_FUNC_ALLOCA): Add dummy __GMP_BITS_PER_MP_LIMB for gmp-h.in work.
* configure.in (CPPFLAGS): Remove -D__GMP_WITHIN_GMP, don't want it
everywhere.
* Makefile.am, mpn/Makefile.am, mpz/Makefile.am, mpq/Makefile.am,
mpf/Makefile.am, mpbsd/Makefile.am (INCLUDES): Set -D__GMP_WITHIN_GMP.
* configure.in (*-*-msdosdjgpp*): Forcibly disable shared libraries,
to make libtests.la work.
* acconfig.h (_LONG_LONG_LIMB, HAVE_MPFR): Remove dummy defines, no
longer needed.
* mpz/set_ui.c: Store to _mp_d[0] unconditionally.
2001-05-27 Kevin Ryde <kevin@swox.se>
* configure.in, gmp-h.in, mp-h.in: Add support for windows DLLs.
2001-05-26 Kevin Ryde <kevin@swox.se>
* gmp.texi (ABI and ISA, Reentrancy): Minor tweaks
(Notes for Package Builds): Note gmp.h is a generated file.
(Notes for Particular Systems): -march=pentiumpro is used for gcc
2.95.4 and up.
(Assembler Loop Unrolling): Mention non power-of-2 unrolling.
(Internals): New chapter.
* mpf/README: Remove file.
* demos/expr/README: Miscellaneous rewordings.
* demos/perl: New directory.
* demos/Makefile.am: Add it.
* demos/perl/INSTALL, Makefile.PL, GMP.pm, GMP.xs, typemap,
GMP/Mpz.pm, GMP/Mpq.pm, GMP/mpf.pm, GMP/Rand.pm, sample.pl, test.pl:
New files.
* configure, aclocal.m4: Update to autoconf 2.50.
* configure, aclocal.m4, ltmain.sh: Update to libtool 1.4.
* configure, aclocal.m4, missing, ansi2knr.c, */Makefile.in: Update to
automake 1.4f.
* Makefile.am: Conditionalize mpfr in $(SUBDIRS) to handle mpfr.info.
* mpfr/Makefile.am (INFO_DEPS): Remove previous mpfr.info handling.
* mpn/Makefile.am (GENERIC_SOURCES): Remove this, just put mp_bases.c
in libmpn_la_SOURCES.
* tests/Makefile.am (tests.h): Move from EXTRA_HEADERS to
libtests_la_SOURCES.
* ltconfig: Remove file, no longer needed.
* Makefile.am (gmp-impl.h, longlong.h, stack-alloc.h): Move from
EXTRA_DIST to libgmp_la_SOURCES, so they get included in TAGS.
* tests/rand/Makefile.am (gmpstat.h): Move to libstat_la_SOURCES
similarly.
* config.guess (68k-*-*): Use $SHELL not "sh", tweak some comments.
* mpfr/mpfr.texi (Introduction to MPFR): Tweak table formatting, note
non-free programs must be able to be re-linked.
2001-05-20 Kevin Ryde <kevin@swox.se>
* mpn/powerpc64/addmul_1.asm,mul_1.asm,submul_1.asm: Add carry-in
entrypoints.
2001-05-17 Kevin Ryde <kevin@swox.se>
* gmp.texi (ge): Fix definition for info.
(Notes for Particular Systems): Mention 68k dragonball and cpu32.
(Efficiency): Add static linking, more about in-place operations,
describe mpq+/-integer using addmul.
(Reporting Bugs): A couple of words about self-contained reports.
(Floating-point Functions): Note exponent limitations of mpf_get_str
and mpf_set_str.
(Initializing Floats): Clarify mpf_get_prec, mpf_set_prec and
mpf_set_prec_raw a bit.
(Float Comparison): Note current mpf_eq deficiencies.
* gmp-h.in (__GMP_HAVE_CONST, __GMP_HAVE_PROTOTYPES,
__GMP_HAVE_TOKEN_PASTE): Merge GNU ansidecl.h tests for ANSI compilers.
* demos/expr/expr-impl-h.in: Ditto.
* gmp-impl.h (BITS_PER_MP_LIMB): Define from __GMP_BITS_PER_MP_LIMB if
not already in gmp-mparam.h.
* tests/t-constants.c (BITS_PER_MP_LIMB, __GMP_BITS_PER_MP_LIMB):
Check these are the same.
* gmp-h.in (mpf_get_default_prec, mpf_get_prec, mpf_set_default_prec,
mpf_set_prec_raw): Provide "extern inline" versions, use __GMPF on the
macros.
* mpf/get_dfl_prc.c, mpf/get_prc.c, mpf/set_dfl_prc.c,
mpf/set_prc_raw.c: Get code from gmp.h using __GMP_FORCE.
* gmp-h.in, gmp-impl.h (__gmp_default_fp_limb_precision): Move from
gmp-impl.h to gmp-h.in.
(__GMPF_BITS_TO_PREC, __GMPF_PREC_TO_BITS): Ditto, and use __GMPF
prefix and add a couple of casts.
* gmp-h.in (__GMP_MAX): New macro.
* mpf/init2.c mpf/set_prc.c: Update for __GMPF prefix.
* gmp-h.in (__GMP_BITS_PER_MP_LIMB): New templated define.
* acinclude.m4 (GMP_C_SIZES): Add AC_SUBST __GMP_BITS_PER_MP_LIMB,
remove AC_DEFINE BITS_PER_MP_LIMB.
2001-05-13 Kevin Ryde <kevin@swox.se>
* gmp-h.in, gmp.texi, Makefile.am, mpz/Makefile.am, tests/mpz/t-pow.c:
Remove mpz_si_pow_ui, pending full si support.
* mpz/si_pow_ui.c: Remove file.
2001-05-11 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium/dive_1.asm: New file.
* mpn/powerpc32/umul.asm: Use r on registers.
* mpn/powerpc64/umul.asm: New file.
* configure.in (powerpc*-*-*): Enable umul in extra_functions.
* tests/refmpn.c, tests/tests.h (refmpn_umul_ppmm): Use same arguments
as normal mpn_umul_ppmm.
(refmpn_mul_1c): Update.
* tests/devel/try.c, tune/many.pl: Add some umul_ppmm testing support.
* mpn/x86/k6/mmx/popham.asm, mpn/x86/k7/mmx/popham.asm: Don't support
size==0.
* mpn/x86/pentium/popcount.asm, mpn/x86/pentium/hamdist.asm: Ditto,
and shave a couple of cycles from the PIC entry code.
* mpz/mul.c: Use mpn_mul_1 for size==1 and mpn_mul_2 (if available)
for size==2, to avoid copying; do vsize==0 test earlier.
* mpf/sub.c: Test r!=u before calling mpf_set.
* mpf/add.c: Ditto, and share mpf_set between usize==0 and vsize==0.
* mpn/generic/tdiv_qr.c, mpq/get_d.c, mpf/div.c, mpf/set_q.c,
mpf/set_str.c, mpf/ui_div.c: Test for high bit set, not for
count_leading_zeros zero.
* acinclude.m4 (GMP_PROG_AR, GMP_PROG_NM): Print a message if extra
flags are added.
* tests/mpz/t-mul_i.c: New file.
* tests/mpz/Makefile.am: Add it.
* mpz/mul_siui.c (mpz_mul_si): Fix for -0x80..00 on long long limb.
* gmp-h.in (mpf_set_si, mpf_set_ui): Revert last change, set exp to 0
when n==0.
* mpf/ceilfloor.c, mpf/trunc.c: Fix exp to 0 when setting r to 0.
* gmp-impl.h (MPF_CHECK_FORMAT): Check exp==0 when size==0.
2001-05-07 Kevin Ryde <kevin@swox.se>
* gmp-h.in (mpf_set_si, mpf_set_ui): Don't bother setting _mp_exp to 0
when n==0 (use 1 unconditionally).
* tests/mpf/t-misc.c (check_mpf_set_si): Don't demand anything of
_mp_exp when _mp_size is zero.
* mpn/x86/README: Note gas _GLOBAL_OFFSET_TABLE_ with leal problem.
* gmp-h.in (mpz_fits_uint_p, mpz_fits_ulong_p, mpz_fits_ushort_p):
Provide these as "extern inline"s.
(__GMP_UINT_MAX, __GMP_ULONG_MAX, __GMP_USHRT_MAX): New macros.
(mpz_popcount): Use __GMP_ULONG_MAX.
* gmp-impl.h (UINT_MAX, ULONG_MAX, USHRT_MAX): Use __GMP_U*_MAX, if
not already defined.
* mpz/fits_u.c: Use the code from gmp.h.
2001-05-06 Kevin Ryde <kevin@swox.se>
* mpn/x86/k7/dive_1.asm: New file.
* mpn/x86/k7/gcd_1.asm: New file.
* mpn/asm-defs.m4 (m4_count_trailing_zeros): New macro.
* gmp-h.in (mpz_get_ui, mpz_getlimbn, mpz_set_q, mpz_perfect_square_p,
mpz_popcount, mpz_size, mpf_set_ui, mpf_set_si, mpf_size): Provide
these as "extern inlines".
Use just one big extern "C" block.
* mpz/getlimbn.c, mpz/get_ui.c, mpz/perfsqr.c, mpz/popcount.c
mpz/set_q.c, mpz/size.c, mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Use
__GMP_FORCE to get code from gmp.h.
2001-05-03 Kevin Ryde <kevin@swox.se>
* extract-dbl.c: Add ASSERT d>=0.
* gmp.texi (Efficiency): Add mpz_addmul etc for mpz+=integer, add
mpz_neg etc in-place.
(Integer Arithmetic): Add mpz_addmul, mpz_submul, mpz_submul_ui.
(Initializing Rationals): Add mpq_set_str.
(Low-level Functions): mpn_set_str requires strsize >= 1.
* gmp-h.in (__GMP_EXTERN_INLINE, __GMP_ABS): New macros.
(mpz_abs, mpq_abs, mpf_abs, mpz_neg, mpq_neg, mpf_neg): Provide inline
versions.
* mpz/abs.c, mpq/abs.c, mpf/abs.c, mpz/neg.c, mpq/neg.c, mpf/neg.c:
Add suitable __GMP_FORCE to turn off inline versions.
* tests/mpz/t-aorsmul.c,t-cmp_d.c,t-popcount,t-set_str.c: New files.
* tests/mpz/Makefile.am: Add them.
* mpz/aorsmul_i.c: New file, rewrite of addmul_ui.c. Add
mpz_submul_ui entrypoint, share more code between some of the
conditionals, use mpn_mul_1c if available.
* mpz/addmul_ui.c: Remove file.
* mpz/aorsmul.c: New file.
* Makefile.am, mpz/Makefile.am: Update.
* gmp-h.in (mpz_addmul, mpz_submul, mpz_submul_ui): Add prototypes.
* gmp-impl.h (mpz_aorsmul_1): Add prototype.
* tests/mpq/t-set_str.c: New file.
* tests/mpq/Makefile.am: Add it.
* mpq/set_str.c: New file.
* Makefile.am, mpq/Makefile.am: Add it.
* gmp-h.in (mpq_set_str): Add prototype.
* mpz/set_str.c: Fix for trailing white space on zero, eg. "0 ".
* mpn/generic/set_str.c: Add ASSERT str_len >= 1.
* gmp-h.in, gmp-impl.h (mpn_incr_u, mpn_decr_u): Move to gmp-impl.h.
* gmp-impl.h (MPN_INCR_U, MPN_DECR_U): New macros.
2001-04-30 Kevin Ryde <kevin@swox.se>
* tests/mpz/t-lcm.c: New file.
* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
* mpz/lcm.c: Add one limb special case.
* mpz/lcm_ui.c: New file.
* Makefile.am, mpz/Makefile.am: Add it.
* gmp-h.in (mpz_lcm_ui): Add prototype.
* gmp.texi (Number Theoretic Functions): Add mpz_lcm_ui, document lcm
now always positive.
* mp-h.in (mp_size_t, mp_exp_t): Fix typedefs to match gmp-h.in.
* gmp-h.in (mpn_add_1, mpn_add, mpn_sub_1, mpn_sub): Remove K&R
function defines (ansi2knr will handle mpn/inline.c, and just ansi is
enough for gcc extern inline).
* gmp-h.in (__GMP_HAVE_TOKEN_PASTE): New macro.
(__MPN): Use it.
* gmp-impl.h (CNST_LIMB): Ditto.
* gmp-h.in, mp-h.in (__gmp_const, __gmp_signed, _PROTO, __MPN): Use
ANSI forms on Microsoft C.
(__GMP_HAVE_CONST): New define.
* gmp-impl.h (const, signed): Use it.
* demos/expr/expr-impl-h.in (<stdarg.h>): Use this with Microsoft C.
(HAVE_STDARG): New define.
* demos/expr/expr.c,exprz.c,exprq.c,exprf.c,exprfr.c: Use it.
* acinclude.m4 (GMP_C_STDARG): New macro.
* configure.in: Call it.
* rand.c: Use it.
* configure.in (AC_PROG_CC_STDC): New test.
2001-04-25 Kevin Ryde <kevin@swox.se>
* mpn/x86/k6/mmx/dive_1.asm: New file.
* mpn/x86/x86-defs.m4 (Zdisp): Two more insns.
* mpn/x86/pentium/mul_2.asm: New file.
* mpn/asm-defs.m4: Add define_mpn(mul_2).
* acconfig.h (HAVE_NATIVE_mpn_divexact_1, mul_2): Add templates.
* configure.in (ABI): Use AC_ARG_VAR.
* tests/devel/try.c: Run reference function when validate fails.
* mpq/get_str.c: Fixes for negative bases.
* tests/mpq/t-get_str.c: Check negative bases.
* tests/misc.c,tests.h (__gmp_allocate_strdup, strtoupper): New
functions.
2001-04-24 Torbjorn Granlund <tege@swox.com>
* mpz/lcm.c (mpz_lcm): Make result always positive.
* gmp-h.in (mpz_inp_binary, mpz_out_binary): Remove declarations.
2001-04-22 Kevin Ryde <kevin@swox.se>
* mpn/powerpc64/addsub_n.asm: Use config.m4 not asm-syntax.m4.
* mpz/cmp_d.c, mpz/cmpabs_d.c: New files.
* Makefile.am, mpz/Makefile.am: Add them.
* mpf/cmp_d.c, mpf/get_dfl_prec.c: New files.
* Makefile.am, mpf/Makefile.am: Add them.
* gmp-h.in (mpz_cmp_d, mpz_cmpabs_d, mpf_cmp_d, mpf_get_default_prec):
Add prototypes.
* gmp.texi: Add documentation.
* mpf/set_prc.c: Avoid a realloc call if already the right precision.
* gmp-impl.h (MPF_BITS_TO_PREC, MPF_PREC_TO_BITS): New macros.
* mpf/get_prc.c, init2.c, set_dfl_prec.c, set_prc.c, set_prc_raw.c:
Use them.
2001-04-20 Kevin Ryde <kevin@swox.se>
* tests/devel/try.c: Don't test size==0 on mpn_popcount and
mpn_hamdist; add testing for mpn_divexact_1; print some limb values
with mpn_trace not printf.
* mpz/popcount.c, mpz/hamdist.c: Don't pass size==0 to mpn_popcount
and mpn_hamdist.
* mpn/generic/popham.c: Don't support size==0.
* config.guess (m68k-*-*): Detect m68010, return m68360 for cpu32,
cleanup the nesting a bit.
* gmp.texi (Integer Division): Fix mpz_congruent_2exp_p "c" type.
(Integer Division): Add mpz_divexact_ui.
(Number Theoretic Functions): Fix mpz_nextprime return type.
(Exact Remainder): Divisibility tests now implemented.
And more index entries in a few places.
* tests/mpz/dive_ui.c: New file.
* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
* mpz/dive_ui.c: New file.
* Makefile.am, mpz/Makefile.am: Add it.
* gmp-h.in (mpz_divexact_ui): Add prototype.
* tune/many.pl, tune/speed.h: Add special mpn_back_to_back for
development.
* gmp-impl.h (MPN_DIVREM_OR_DIVEXACT_1): New macro.
* mpz/divexact.c: Use it.
* gmp-impl.h (DIVEXACT_1_THRESHOLD): New threshold.
* tune/tuneup.c: Tune it.
* tune/speed.c,speed.h,common.c,many.pl: Add measuring of
mpn_divexact_1, mpn_copyi, mpn_copyd.
* mpn/generic/dive_1.c: New file.
* configure.in (gmp_mpn_functions): Add it.
* gmp-impl.h (mpn_divexact_1): Add prototype.
* mpn/asm-defs.m4: Add define_mpn(divexact_1).
* tests/mpn: New directory.
* tests/Makefile.am: Add it.
* tests/mpn/Makefile.am: New file.
* configure.in (AC_OUTPUT): Add it.
* tests/mpn/t-asmtype.c: New file.
* configure, config.in: Update to autoconf 2.49d.
* configure.in, gmp-h.in, mp-h.in, demos/expr/expr-impl-h.in: Revert
to generating gmp.h, mp.h and expr-impl.h with AC_OUTPUT and AC_SUBST.
* configure.in (m68*-*-*): Oops, m683?2 is 68000, m68360 is cpu32.
* mpn/m68k/m68k-defs.m4 (scale_available_p): Ditto.
* configure.in (underscore, asm_align): Remove these variables, unused.
(GMP_ASM_*): Sort by AC_REQUIREs, to avoid duplication.
* acinclude.m4 (GMP_ASM_UNDERSCORE, GMP_ASM_ALIGN_LOG): Remove support
for actions, no longer needed.
2001-04-17 Kevin Ryde <kevin@swox.se>
* config.guess (m68k-*-*): Look for cpu in linux kernel /proc/cpuinfo.
* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): The -mpentiumpro problem is
fixed in 2.95.4, so test for that.
(GMP_ASM_TYPE): Amend some comments.
* tune/freq.c (speed_cpu_frequency_sysctl): Avoid having unused
variables on GNU/Linux.
* mpn/asm-defs.m4 (m4_instruction_wrapper): Fix a quoting problem if
the name of the file is a macro.
2001-04-15 Kevin Ryde <kevin@swox.se>
* mpn/powerpc64/*.asm: Add speeds on ppc630.
* acconfig.h: Add dummy templates for _LONG_LONG_LIMB and HAVE_MPFR.
* configure.in: Ensure config.in is the last AM_CONFIG_HEADER,
which autoheader requires.
* mpn/x86/pentium/popcount.asm: New file.
* mpn/x86/pentium/hamdist.asm: New file.
* mpn/asm-defs.m4: (m4_popcount): New macro.
Amend a few comments elsewhere.
* acinclude.m4 (GMP_ASM_RODATA): If possible, grep compiler output for
the right directive.
* tune/speed.c: Print clock speed in MHz, not cycle time.
* configure.in (AC_CHECK_HEADERS): Check for sys/processor.h.
* tune/freq.c (speed_cpu_frequency_processor_info): Require
<sys/processor.h> to exist, to differentiate the different
processor_info on Darwin.
(speed_cpu_frequency_sysctlbyname): Remove hw.model test which is in
speed_cpu_frequency_sysctl.
(speed_cpu_frequency_sysctl): Add hw.cpufrequency for Darwin.
* gmp-impl.h (MPN_LOGOPS_N_INLINE, mpn_and_n ... mpn_xnor_n): Use a
single expression argument for the different operations, necessary for
the Darwin "smart" preprocessor.
* mpn/m68k/t-m68k-defs.pl: Allow white space in m4_definsn and
m4_defbranch.
* tune/many.pl: Change RM_TMP_S to RM_TMP to match mpn/Makeasm.am,
avoid a possibly undefined array in a diagnostic, add more renaming to
hamdist.
2001-04-13 Kevin Ryde <kevin@swox.se>
* ltmain.sh, aclocal.m4, configure, config.in: Update to libtool 1.3d.
* configure.in: Change ac_ to lt_ in lt_cv_archive_cmds_need_lc and
lt_cv_proc_cc_pic.
* config.guess (m68*-*-*): Detect exact cpu with BSD sysctl hw.model,
detect 68000/68010 with trapf, detect 68302 with bfffo.
2001-04-11 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_ASM_M68K_INSTRUCTION, GMP_ASM_M68K_ADDRESSING,
GMP_ASM_M68K_BRANCHES): New macros.
* configure.in: Use them, remove old 68k configs, use mc68020 udiv and
umul.
* mpn/m68k/m68k-defs.m4: New file.
* mpn/m68k/t-m68k-defs.pl: New file.
* mpn/m68k/*.asm: New files, converted from .S. Merge add_n and sub_n
to aors_n, ditto mc68020 addmul_1 and submul_1 to aorsmul_1. No
object code changes (except .type and .size now used on NetBSD 1.4).
* mpn/m68k/README: New file.
* mpn/m68k/*.S, */*.S, syntax.h: Remove files.
* configure.in (m68*-*-netbsd1.4*): Pretend getrusage doesn't exist.
* tune/README: Update.
* configure.in (powerpc*-*-*): For the benefit of Darwin 1.3, add cc
to cclist, make gcc_cflags -Wa,-mppc optional.
2001-04-06 Kevin Ryde <kevin@swox.se>
* mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add | for 68k.
(gmpasm-mode-syntax-table): Add to comments.
* tests/mpz/reuse.c (dsi_div_func_names): Add names for cdiv_[qr]_2exp.
2001-04-04 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_M4_M4WRAP_SPURIOUS): Fix test so as to actually
detect the problem, add notes on m68k netbsd 1.4.1.
* gmp.texi (Compatibility with older versions): Note libmp
compatibility.
2001-04-03 Kevin Ryde <kevin@swox.se>
* tests/mpz/reuse.c: Add mpz_cdiv_q_2exp and mpz_cdiv_r_2exp.
* tests/mpz/t-pow.c: Drag in refmpn.o when testing mpz_pow_ui etc with
refmpn_mul_2.
* tune/speed.c,speed.h,common.c,many.pl: Add measuring of mpn_com_n
and mpn_mul_2.
* tests/devel/try.c: Add testing of mpn_mul_2, and a
DATA_MULTIPLE_DIVISOR attribute.
* gmp.texi (Build Options): List more m68k's.
(Build Options): Add cross reference to tex2html.
(Notes for Particular Systems): Add m68k means 68020 or up.
(Rational Conversions): New section, with mpq_get_d, mpq_set_d and
mpq_set_f from Miscellaneous, and new mpq_set_str.
(Applying Integer Functions): Move mpq_get_num, mpq_get_den,
mpq_set_num and mpq_set_den from Misc.
(Miscellaneous Rational Functions): Remove section.
(Custom Allocation): Partial rewrite for various clarifications.
(References): Improve line breaks near URLs.
* acinclude.m4 (GMP_GCC_M68K_OPTIMIZE): New macro.
* configure.in (m68*-*-*): Use it to run gcc 2.95.x at -O not -O2.
(m680?0-*-*, m683?2-*-*, m68360-*-*): Add optional gcc -m options.
* tests/mpz/t-cmp.c: New file.
* tests/mpz/t-sizeinbase.c: New file.
* tests/mpz/Makefile.am: Add them.
* gmp-impl.h (MPN_CMP): New macro.
* mpz/cmp.c,cmpabs.c: Use it, and minor cleanups too.
* tests/mpq/t-equal.c: New file.
* tests/mpq/t-get_str.c: New file.
* tests/mpq/Makefile.am: Add them.
* mpq/get_str.c: New file.
* Makefile.am, mpq/Makefile.am: Add it.
* gmp-h.in (mpq_get_str): Add prototype.
* mpq/equal.c: Rewrite using inline compare loops.
* tests/refmpn.c,tests.h (refmpn_mul_2): Fix parameter order.
* mpz/n_pow_ui.c: Fix mpn_mul_2 calls parameter order.
2001-03-29 Kevin Ryde <kevin@swox.se>
* tests/mpf/t-trunc.c: New file.
* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
* gmp-impl.h (MPF_CHECK_FORMAT): New macro.
* mpf/trunc.c: New file, rewrite of integer.c, preserve prec+1 in
copy, don't copy if unnecessary.
* mpf/ceilfloor.c: New file likewise, and use common subroutine for
ceil and floor.
* mpf/integer.c: Remove file.
* Makefile.am, mpf/Makefile.am, macos/Makefile.in: Update.
* acinclude.m4 (GMP_GCC_VERSION_GE): New macro.
(GMP_GCC_MARCH_PENTIUMPRO): Use it, remove CCBASE parameter (don't
bother checking it's gcc).
(GMP_GCC_ARM_UMODSI): New macro.
* configure.in (GMP_GCC_MARCH_PENTIUMPRO): Update parameters.
(arm*-*-*): Use GMP_GCC_ARM_UMODSI.
* gmp.texi (Notes for Particular Systems): Add arm gcc requirements.
2001-03-28 Kevin Ryde <kevin@swox.se>
* gmp.texi (Converting Integers): Document mpz_getlimbn using absolute
value and giving zero for N out of range, move to end of section.
* tests/refmpn.c (refmpn_tdiv_qr): Use refmpn_divmod_1 rather than
refmpn_divrem_1.
* tests/tests.h: Add some prototypes that were missing.
* mpz/tdiv_q_ui.c: Remove a comment that belonged to mpz_tdiv_r_ui.
2001-03-26 Torbjorn Granlund <tege@swox.com>
* mpn/generic/gcdext.c: Handle carry overflow after m*n multiply code
in both arms. Partially combine multiply arms.
2001-03-24 Kevin Ryde <kevin@swox.se>
* longlong.h: Add comments to P5 count_leading_zeros.
* demos/expr/exprz.c,t-expr.c,README: Add congruent_p and divisible_p.
2001-03-23 Kevin Ryde <kevin@swox.se>
* gmp.texi (GMPceil, GMPfloor, ge, le): New macros.
(Integer Division, mpn_cmp, mpn_sqrtrem, Algorithms): Use them.
(mpn_bdivmod): Refer to mp_bits_per_limb, not BITS_PER_MP_LIMB, and
improve formatting a bit.
(mpn_lshift, mpn_rshift): Clarify the return values, and use {rp,n}
for the destination.
Miscellaneous minor rewordings in a few places.
* mpn/arm/arm-defs.m4: New file.
* configure.in (arm*-*-*): Use it.
* mpn/arm/*.asm: Use changecom and registers from arm-defs.m4, use L()
for local labels.
* mpn/x86/k6/mmx/com_n.asm: Relax code alignment (same speed).
* gmp-h.in (__GMP_ATTRIBUTE_PURE): Use __pure__ to avoid application
namespace.
* gmp-impl.h (ABS): Add parens around argument.
2001-03-20 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_PROG_M4): Use AC_ARG_VAR on $M4.
* acinclude.m4 (GMP_M4_M4WRAP_SPURIOUS): New macro.
* configure.in: Use it.
* mpn/asm-defs.m4: Ditto.
2001-03-18 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium/logops_n.asm: New file.
* mpn/x86/k6/k62mmx/copyd.asm: Rewrite, smaller and simpler, faster on
small sizes, slower on big sizes (about half the time).
* mpn/x86/k6/k62mmx/copyi.asm: Remove file, in favour of generic x86.
* mpn/x86/copyi.asm: Add some comments.
* mpn/x86/k6/README: Update.
* mpn/x86/k6/gcd_1.asm: New file.
* gmp-impl.h (NEG_MOD): Fix type of __dnorm.
* acinclude.m4 (GMP_C_SIZES): Fix use of __GMP_WITHIN_CONFIGURE.
2001-03-15 Kevin Ryde <kevin@swox.se>
* gmp.texi (GMPabs): New macro.
(Float Comparison - mpf_reldiff): Use it.
(Integer Comparisons - mpz_cmpabs): Ditto, puts "abs" in info.
(Reentrancy): Update notes on old random functions.
(Karatsuba Multiplication): Better characterize the effect of basecase
speedups on the thresholds, pointed out by Torbjorn.
* tune/README: Notes on the 1x1 div threshold for mpn_gcd_1.
* tests/misc.c (mpz_pow2abs_p, mpz_flipbit, mpz_errandomb,
mpz_errandomb_nonzero, mpz_negrandom): New functions.
(mpz_erandomb, mpz_erandomb_nonzero): Use urandom().
* tests/spinner.c (spinner_wanted, spinner_tick): Make global.
* tests/tests.h: Update prototypes.
* tests/mpz/t-cong.c, tests/mpz/t-cong_2exp.c: New files.
* tests/mpz/Makefile.am (check_PROGRAMS): Add them.
* mpz/cong.c, mpz/cong_2exp.c, mpz/cong_ui.c: New files.
* Makefile.am, mpz/Makefile.am: Add them.
* gmp-impl.h (NEG_MOD): New macro.
* gmp-h.in (mpz_congruent_p, mpz_congruent_2exp_p,
mpz_congruent_ui_p): Add prototypes.
* gmp.texi (Integer Division, Efficiency): Add documentation.
* mpq/aors.c: No need for ABS on denominator sizes.
* gmp-impl.h (mpn_divisible_p): Use __MPN.
* gmp-impl.h (LOW_ZEROS_MASK): New macro.
* mpz/divis_ui.c, mpn/generic/divis.c: Use it.
* mpz/setbit.c: Fix normalization for case of a negative ending up
with a zero high limb.
* tests/mpz/bit.c (check_single): New test for this problem.
* configure.in (none-*-*): Fix cclist for default ABI=long.
2001-03-10 Kevin Ryde <kevin@swox.se>
* mpz/cfdiv_q_2exp.c: Don't scan for non-zero limbs if they don't
matter to the rounding.
* mpz/get_ui.c: Fetch _mp_d[0] unconditionally, so the code can come
out branch-free.
2001-03-08 Kevin Ryde <kevin@swox.se>
* tests/devel/try.c (param_init): Fix reference functions for and_n
and nand_n.
* tune/speed.c, tests/devel/try.c: Seed RANDS, not srandom etc.
* configure.in (AC_CHECK_FUNCS): Remove srand48 and srandom.
* macos/configure (coptions): Remove random/srandom, now unnecessary.
* configure.in (gmp.h, mp.h, demos/expr/expr-impl.h): Generate using
AM_CONFIG_HEADER.
(_LONG_LONG_LIMB, HAVE_MPFR): Change to AC_DEFINEs.
* gmp-h.in, mp-h.in, demos/expr/expr-impl-h.in: Change to #undef's.
* acinclude.m4 (GMP_FUNC_ALLOCA, GMP_C_SIZES): Use gmp-h.in, not gmp.h.
* Makefile.am (EXTRA_DIST): Remove gmp-h.in and mp-h.in, now done
automatically.
* acinclude.m4 (GMP_FUNC_ALLOCA), gmp-impl.h: Set and use
__GMP_WITHIN_CONFIGURE rather than GMP_FUNC_ALLOCA_TEST.
* mpf/random2.c: Use _gmp_rand and RANDS instead of random() for the
exponent, ensures full range of values too.
* tests/mpz/t-div_2exp.c (check_various): Start with d based on i, but
don't let it go negative.
* tune/tuneup.c (KARATSUBA_MUL_THRESHOLD): Limit probing to
TOOM3_MUL_THRESHOLD_LIMIT, the size of the workspace in mul_n.c.
Use a -1 with this too, so size<LIMIT not <=.
2001-03-07 Torbjorn Granlund <tege@swox.com>
* mpn/cray/cfp/mul_1.c: Don't call mpn_add_n with size 0.
* mpn/cray/cfp/addmul_1.c: Likewise.
* mpn/cray/cfp/submul_1.c: Don't call mpn_sub_n with size 0.
* tests/mpz/t-div_2exp.c (check_various): Start 2nd d loop from 0
(avoid problems with Cray compilers).
2001-03-06 Torbjorn Granlund <tege@swox.com>
* mpn/cray/ieee/submul_1.c: Don't call mpn_sub_n with size 0.
* mpn/cray/ieee/mul_basecase.c: New file.
* mpn/cray/ieee/sqr_basecase.c: New file, derived from mul_basecase.c.
2001-03-06 Kevin Ryde <kevin@swox.se>
* tests/devel/try.c (pointer_setup): Allow dst_size == SIZE_SIZE2 for
the benefit of mpn_tdiv_qr.
* tune/tuneup.c (all): Start karatsuba probing at size==4, for the
benefit of cray t90 ieee which has speed oddities at size==2.
* gmp-impl.h (USE_LEADING_REGPARM): Use __GMP_GNUC_PREREQ.
Use __GMP_ATTRIBUTE_PURE and ATTRIBUTE_CONST in a few places.
* gmp-h.in (__GMP_GNUC_PREREQ) New macro.
(__GMP_ATTRIBUTE_PURE): New macro, use it in many places.
* gmp-impl.h, gmp-h.in (mpn_jacobi_base): Move prototype to
gmp-impl.h, use ATTRIBUTE_CONST.
* tune/speed.h (speed_cyclecounter): Inline asm version for i386.
* mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Only reread "up" after second
realloc, first is under w!=u.
2001-03-05 Torbjorn Granlund <tege@swox.com>
* mpn/cray/sub_n.c: Rewrite using `majority' logic.
* mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Reread `up' after realloc of w.
* mpn/cray/ieee/mul_1.c: Rewrite. Streamline multiplications;
use `majority' logic.
* mpn/cray/ieee/addmul_1.c: Likewise.
* mpn/cray/add_n.c: Rewrite using `majority' logic.
2001-03-04 Torbjorn Granlund <tege@swox.com>
* longlong.h (CRAY udiv_qrnnd): No longer conditional on CRAYMPP.
(64-bit hppa add_ssaaaa): New.
(64-bit hppa sub_ddmmss): New.
* mpn/cray/ieee/invert_limb.c: New file.
* gmp-impl.h (RANDS): Add a `,0' to make it compile on more compilers.
2001-03-03 Kevin Ryde <kevin@swox.se>
* mpz/n_pow_ui.c (ULONG_PARITY): Move to gmp-impl.h.
* gmp-impl.h (ULONG_PARITY): i386 part from n_pow_ui.c, new generic
form by Torbjorn.
* tests/mpz/t-div_2exp.c: New file, rewrite of t-2exp.c.
* tests/mpz/t-2exp.c: Remove file.
* tests/mpz/Makefile.am (check_PROGRAMS): Update.
* gmp-h.in (mpz_cdiv_q_2exp, mpz_cdiv_q_2exp): Add prototypes.
* gmp.texi (Integer Division): Add mpz_cdiv_q_2exp and mpz_cdiv_q_2exp.
* mpz/cfdiv_q_2exp.c: New file, partial rewrite of fdiv_q_2exp.c, add
mpz_cdiv_q_2exp entrypoint.
* mpz/cfdiv_r_2exp.c: New file, rewrite of fdiv_r_2exp.c, use all mpn,
add mpz_cdiv_r_2exp entrypoint.
* mpz/fdiv_q_2exp.c, mpz/fdiv_r_2exp.c: Remove files.
* mpz/Makefile.am (libmpz_la_SOURCES): Update.
* Makefile.am (MPZ_OBJECTS): Ditto.
* gmp-impl.h (USE_LEADING_REGPARM): Use __i386__ same as longlong.h
(REGPARM_2_1, REGPARM_3_1, REGPARM_ATTR): New macros.
* mpz/jacobi.c (jac_or_kron): Use them.
* configure.in (HAVE_ABI_$ABI): Re-enable this for config.m4, with
dots changed to underscores (necessary for hppa).
* tests/mpz/t-divis.c, tests/mpz/t-divis_2exp.c: New files.
* tests/mpz/Makefile.am (check_PROGRAMS): Add them.
* gmp-h.in (mpz_divisible_p, mpz_divisible_ui_p,
mpz_divisible_2exp_p): Add prototypes.
* gmp.texi (Integer Division): Add mpz_divisible_p.
(Efficiency): Add remarks about divisibility testing.
* mpz/divis.c, mpz/divis_ui.c, mpz/divis_2exp.c: New files.
* mpz/Makefile.am (libmpz_la_SOURCES): Add them.
* Makefile.am (MPZ_OBJECTS): Ditto.
* mpn/generic/divis.c: New file.
* configure.in (gmp_mpn_functions): Add it.
* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Ditto.
* gmp-impl.h (mpn_divisible_p): Add prototype.
* urandom.h: Remove file.
* Makefile.am (EXTRA_DIST): Remove it.
* tests/mpz/convert.c, dive.c, io.c, logic.c, reuse.c, t-2exp.c,
t-fdiv.c, t-fdiv_ui.c, t-gcd.c, t-jac.c, t-mul.c, t-pow.c,
t-powm.c, t-powm_ui.c, t-root.c, t-sqrtrem.c, t-tdiv.c,
t-tdiv_ui.c: Use RANDS, initialized by tests_rand_start.
* tests/mpz/t-pow.c: New file, being t-pow_ui renamed and with some
further tests added.
* tests/mpz/t-pow_ui.c: Remove file.
* tests/mpz/Makefile.am (check_PROGRAMS): Update.
* tests/t-modlinv.c: Don't use urandom.h.
* tests/mpz/bit.c, tests/mpz/t-scan.c: Ditto.
* tests/mpq/t-cmp.c, tests/mpq/t-cmp_ui.c, tests/mpq/t-get_d.c: Ditto.
* tests/mpf/reuse.c, t-add.c, t-conv.c, t-dm2exp.c, t-muldiv.c,
t-sqrt.c, t-sub.c: Ditto.
* tests/misc.c (tests_rand_start, tests_rand_end): New functions.
(tests_start, tests_end): Use them.
(urandom): New function.
* tests/tests.h: Add prototypes.
* mpz/random.c: Rewrite using mpz_urandomb and RANDS.
* mpn/generic/random.c: Rewrite using _gmp_rand and RANDS.
* mpn/generic/random2.c: Use RANDS not random() etc.
* gmp-impl.h (__gmp_rands, __gmp_rands_initialized): Add externs.
(gmp_randstate_ptr): New typedef.
(RANDS, RANDS_CLEAR): New macros.
* rands.c: New file.
* Makefile.am (libgmp_la_SOURCES): Add it.
* configure.in (mpn_objs_in_libmp): New AC_SUBST.
* Makefile.am (libmp_la_DEPENDENCIES): Use it.
2001-03-02 Torbjorn Granlund <tege@swox.com>
* mpn/pa64/udiv_qrnnd.asm: New file.
2001-03-01 Kevin Ryde <kevin@swox.se>
* mpbsd/rpow.c: New file.
* mpbsd/Makefile.am (libmpbsd_la_SOURCES): Add it
(nodist_libmpbsd_la_SOURCES): Remove pow_ui.c.
* Makefile.am (MPBSD_OBJECTS): Add rpow.lo, remove pow_ui.lo.
(libmp_la_DEPENDENCIES): Add mpz/n_pow_ui.lo.
* mpz/ui_pow_ui.c: Rewrite using mpz_n_pow_ui.
* mpz/pow_ui.c: Ditto, and no longer provide rpow for mpbsd.
* mpz/n_pow_ui.c: New file, rewrite of pow_ui.c and ui_pow_ui.c. Use
less temporary memory, strip factors of 2 from the base, use mpn_mul_2
if available.
* mpz/si_pow_ui.c: New file.
* mpz/Makefile.am (libmpz_la_SOURCES): Add them.
* Makefile.am (MPZ_OBJECTS): Ditto.
* gmp-impl.h (mpz_n_pow_ui): Add prototype.
* gmp-h.in (mpz_si_pow_ui): Add prototype.
* gmp.texi (Integer Exponentiation): Add mpz_si_pow_ui.
* acinclude.m4 (GMP_C_SIZES): Add BITS_PER_ULONG.
Correction to mp_limb_t working check.
* configure.in (limb_chosen): New variable.
* tests/t-constants.c (BITS_PER_ULONG): Check this value.
Add some reminders about tests that fail on Cray.
* tests/refmpn.c (refmpn_mul_2): New function.
* tests/refmpz.c (refmpz_pow_ui): Copied from tests/mpz/t-pow_ui.c
* tests/tests.h: Add prototypes.
* configure.in (none-*-*): Add ABI=longlong.
* doc/configuration (Long long limb testing): Describe it.
* gmp.texi (Low-level Functions): Move some commented out remarks ...
* mpn/generic/mul_basecase.c: ... to here.
* mpn/x86/README: Note "%=" as an alternative to "1:" in __asm__.
* tests/trace.c (mp_trace_start): Print "bin" for binary.
* mpn/generic/dump.c: Add a couple of casts to keep gcc quiet.
* gmp-h.in (mpn_incr_u, mpn_decr_u): Add parens around arguments.
* mpbsd/mout.c, mpbsd/mtox.c (num_to_text): Remove unused variable.
* mpfr/set_d.c (mpfr_get_d2): Declare "q" for 64-bit limbs.
2001-02-28 Torbjorn Granlund <tege@swox.com>
* mpn/pa64w/udiv_qrnnd.asm: Tune.
2001-02-27 Torbjorn Granlund <tege@swox.com>
* mpn/pa64w/udiv_qrnnd.asm: New file.
2001-02-26 Torbjorn Granlund <tege@swox.com>
* longlong.h (arm): Optimize sub_ddmmss by testing for constant
operands.
* mpn/arm/invert_limb.asm: New file.
2001-02-24 Torbjorn Granlund <tege@swox.com>
* mpn/generic/lshift.c: Rewrite.
* mpn/generic/rshift.c: Rewrite.
* longlong.h: Use UWtype for external interfaces that expect mp_limb_t.
* longlong.h (arm): #define invert_limb.
* mpn/arm: Make labels have local scope.
* configure.in (arm*-*-*): Set extra_functions.
* longlong.h (arm): #define udiv_qrnnd.
* mpn/arm/udiv.asm: New file.
2001-02-24 Kevin Ryde <kevin@swox.se>
* tune/many.pl: Add mpn_count_leading_zeros, mpn_count_trailing_zeros
and mpn_invert_limb. Add count_leading_zeros, count_trailing_zeros
from a .h file. Correction to modexact_1_odd prototype. Support
ansi2knr.
* tune/speed.h, tune/common.c: Consequent changes.
* demos/expr/*: Make a few more functions available in expressions,
create only libexpr.a, misc minor updates.
* mpn/Makeasm.am: Add some comments about suffix ordering.
* tests/refmpn.c (rshift_make, lshift_make): No need to compare
unsigned to zero.
* mpq/mul.c: Detect and optimize squaring.
2001-02-23 Torbjorn Granlund <tege@swox.com>
* mpn/mips3: Convert files to `.asm'.
* mpn/arm: Convert files to `.asm'. Misc cleanups.
* mpn/arm/submul_1.asm: New file.
2001-02-21 Kevin Ryde <kevin@swox.se>
* tune/tuneup.c (all): Only one compiler print should match, no need
for #undef PRINTED_COMPILER.
* mpfr/mpfr.h (mpfr_sgn): Use mpfr_cmp_ui (patch from Paul).
* mpz/fib_ui.c: Update some remarks about alternative algorithms.
* gmp.texi (Fibonacci Numbers Algorithm): Ditto.
(Assigning Floats): Clarify mpf_swap swaps the precisions too.
(Low-level Functions): Try to be clearer about negative cofactors.
2001-02-21 Torbjorn Granlund <tege@swox.com>
* mpn/sparc64/copyi.asm: Streamline for small operands.
* mpn/sparc64/add_n.asm: Likewise.
* mpn/sparc64/sub_n.asm: Likewise.
* mpn/sparc64/copyd.asm: New file.
2001-02-20 Torbjorn Granlund <tege@swox.com>
* mpn/sparc64/lshift.asm: Rewrite.
* mpn/sparc64/rshift.asm: Rewrite.
2001-02-19 Torbjorn Granlund <tege@swox.com>
* mpn/sparc64/add_n.asm: Rewrite using `majority' logic.
* mpn/sparc64/sub_n.asm: Likewise.
* tune/tuneup.c (all): Recognise DECC and MIPSpro compilers.
* mpn/pa64/sqr_diagonal.asm: Use PROLOGUE/EPILOGUE.
* mpn/pa642/sqr_diagonal.asm: Likewise.
* configure.in (HAVE_ABI_$abi): Disable for now.
* mpn/asm-defs.m4 (PROLOGUE): Use LABEL_SUFFIX.
* acinclude.m4 (GMP_ASM_ATTR): New check, for hppa oddities.
2001-02-18 Torbjorn Granlund <tege@swox.com>
* mpn/hppa/hppa1_1/gmp-mparam.h: New file.
* mpn/hppa/hppa2_0/gmp-mparam.h: New file.
* mpn/pa64/sqr_diagonal.asm: New file.
* mpn/pa64w/sqr_diagonal.asm: New file.
* mpn/hppa/hppa1_1/sqr_diagonal.asm: New file.
* mpn/hppa/hppa2_0/sqr_diagonal.asm: New file.
* mpn/sparc32/v9/add_n.asm: Use `fitod' instead of `fxtod' for dummy
FA-pipeline insns.
* mpn/sparc32/v9/sub_n.asm: Likewise.
2001-02-18 Kevin Ryde <kevin@swox.se>
* gmp.texi (Known Build Problems): Notes on make, $* and K&R, misc
tweaks elsewhere.
(Low-level Functions): Use {} notation in mpn_sqrtrem.
(Basecase Multiplication): Mention BASECASE_SQR_THRESHOLD.
* mpfr/isnan.c (mpfr_number_p): Infinity is not a number.
* mpfr/out_str.c: Pass strlen+1 for the block size to free.
* mpfr/get_str.c: Correction for realloc to strlen+1.
* acinclude.m4 (GMP_C_SIZES): Generate an error if mp_limb_t doesn't
seem to work for some reason.
2001-02-16 Torbjorn Granlund <tege@swox.com>
* mpn/sparc32/v9/gmp-mparam.h: Retune.
* mpn/sparc32/v9/add_n.asm: New file.
* mpn/sparc32/v9/sub_n.asm: New file.
* mpn/sparc32/v9/mul_1.asm: Tune function entry.
* mpn/sparc32/v9/addmul_1.asm: Likewise.
* mpn/sparc32/v9/submul_1.asm: Likewise.
* mpn/sparc32/v9/sqr_diagonal.asm: New file.
2001-02-16 Kevin Ryde <kevin@swox.se>
* configure.in: Fix flags selection when $CC is a compiler known to us.
* demos/expr/exprfr.c (e_mpfr_cos, e_mpfr_sin): mpfr_sin_cos now
allows NULL for one parameter.
* mpfr/*: Update to 20010215.
* mpfr/trunc.c: Use -DOPERATION scheme, and gmp mpn_zero_p.
* mpfr/sqrt.c: Use plain mpn_sqrtrem, not mpn_sqrtrem_new.
* mpfr/sqrtrem.c: Remove file.
* mpfr/Makefile.am (libmpfr_a_SOURCES): Add isnan.c and set_ui.c,
remove sqrtrem.c and srandom.h.
* configfsf.guess: Update to 2001-02-13.
* configfsf.sub: Update to 2001-02-16.
* config.sub (j90, t90): Remove special handing, configfsf.sub now ok.
* Makefile.am (MPF_OBJECTS): Add a couple of missing $U's.
* tune/tuneup.c: Identify compiler used (GCC and Sun C so far).
2001-02-15 Torbjorn Granlund <tege@swox.com>
* mpn/sparc32/v9/mul_1.asm: Change `ld' to `lduw' and `st' to `stw'.
* mpn/sparc32/v9/addmul_1.asm: Likewise.
* mpn/sparc32/v9/submul_1.asm: Likewise.
2001-02-14 Torbjorn Granlund <tege@swox.com>
* mpn/mips3/mips.m4: New file.
* configure.in (mips*-*-irix[6789]*): Use mips3/mips.m4.
* mpn/powerpc64/sqr_diagonal.asm: New file.
* mpn/mips3/sqr_diagonal.asm: New file.
2001-02-12 Torbjorn Granlund <tege@swox.com>
* mpn/powerpc32/sqr_diagonal.asm: New file.
* mpn/generic/sqr_basecase.c: Remove declaration of mpn_sqr_diagonal.
Fix typo in header comment.
2001-02-12 Kevin Ryde <kevin@swox.se>
* mpn/generic/mul.c, mpn/generic/mul_n.c, gmp-impl.h: Use
mpn_mul_basecase for squaring below new BASECASE_SQR_THRESHOLD.
* tune/tuneup.c gmp-impl.h: Tune BASECASE_SQR_THRESHOLD.
* Makefile.am (libgmp.la, libmp.la): Revert change to build from
mpn/libmpn.la etc, go back to explicitly listed objects.
* configure.in: Recognise sparc64-*-*, not just sparc64-*-linux*.
2001-02-11 Torbjorn Granlund <tege@swox.com>
* mpn/asm-defs.m4 (sqr_diagonal): New define_mpn.
* mpn/alpha/sqr_diagonal.asm: New file.
2001-02-11 Kevin Ryde <kevin@swox.se>
* gmp.texi (Low-level Functions): Note mpn_get_str clobbers its input
plus 1 extra limb.
* mpfr/add.c,agm.c,exp2.c,exp3.c,generic.c,log2.c,pi.c,print_raw.c,
set_d.c,sin_cos.c,sqrtrem.c,sub.c: Apply some tweaks for K&R.
* tests/mpz/reuse.c, tests/mpq/t-md_2exp.c, demos/pexpr.c,
demos/expr/t-expr.c: Ditto.
* configure.in (HAVE_ABI_$abi): New define in config.m4.
* gmp-impl.h (mpn_sqr_diagonal): Add prototype and define.
* tune/speed.c,speed.h,common.c,many.pl: Add measuring of
mpn_sqr_diagonal.
* gmp.texi, acinclude.m4: Mention x86 solaris 2.7 has the reg->reg
movq bug the same as 2.6.
* mpfr/Makefile.am (EXTRA_DIST): Add mpfr-test.h and mpf2mpfr.h.
* mpn/x86/README: Merge contents of README.family.
* mpn/x86/README.family: Remove file.
* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add mode1o, gcd_finda,
invert_limb, sqr_diagonal; remove mod_1_rs; sort alphabetically.
2001-02-10 Torbjorn Granlund <tege@swox.com>
* configure.in (gmp_mpn_functions_optional): List sqr_diagonal.
* mpn/powerpc32/aix.m4: Use unnamed csects.
* mpn/powerpc64/aix.m4: Likewise.
* acconfig.h: Add #undef of mpn_sqr_diagonal.
Remove lots of spacing.
* configure.in (syntax testing section): Match power* instead of
powerpc*.
* mpn/power: Convert files to `.asm'.
Prefix umul_ppmm and sdiv_qrnnd.
Update some comments.
2001-02-09 Kevin Ryde <kevin@swox.se>
* acconfig.h: Add HAVE_NATIVE_mpn_modexact_1_odd and
HAVE_NATIVE_mpn_modexact_1c_odd.
* configure.in (CCAS): Don't override a user selection.
* mpq/cmp_ui.c: DIVIDE_BY_ZERO if den2==0.
2001-02-08 Torbjorn Granlund <tege@swox.com>
* mpn/generic/sqr_basecase.c: Use mpn_sqr_diagonal when appropriate.
2001-02-07 Kevin Ryde <kevin@swox.se>
* gmp.texi (Low-level Functions): mpn_preinv_mod_1 now undocumented.
* mpn/generic/random2.c (myrandom): Use rand() on mingw.
* mpn/alpha/gmp-mparam.h: Update tuned parameters.
2001-02-05 Torbjorn Granlund <tege@swox.com>
* mpn/alpha/ev6/gmp-mparam.h: Retune.
2001-02-05 Kevin Ryde <kevin@swox.se>
* Makefile.am (libgmp, libmp): Construct from mpn/libmpn.la etc rather
than explicitly listed objects.
* urandom.h: Use rand() on mingw.
* mpn/powerpc64/lshift.asm,addsub_n.asm: Use r1 not 1.
2001-02-04 Torbjorn Granlund <tege@swox.com>
* mpn/ia64/copyi.asm: New file.
* mpn/ia64/copyd.asm: New file.
2001-02-04 Kevin Ryde <kevin@swox.se>
* mpn/alpha/ev5/gmp-mparam.h, mpn/mips3/gmp-mparam.h,
mpn/powerpc32/gmp-mparam.h, mpn/powerpc64/gmp-mparam.h,
mpn/sparc64/gmp-mparam.h, mpn/x86/*/gmp-mparam.h:
Update tuned parameters.
* mpn/x86/i486: New directory.
* configure.in (i486-*-*): Use it.
* mpn/x86/i486/gmp-mparam.h: New file.
* mpn/x86/pentium/mode1o.asm: New file.
* mpn/x86/p6/mode1o.asm: New file.
* tune/many.pl: Use $(ASMFLAGS_PIC) and $(CFLAGS_PIC).
* gmp.texi (Integer Division): Another rewording of 2exp divisions.
2001-02-03 Torbjorn Granlund <tege@swox.com>
* mpn/arm/gmp-mparam.h: Tune.
* mpn/ia64/popcount.asm: Put a `;;' break at end of main loop.
* configure.in (arm*-*-*): Set gcc_cflags in order to pass
$fomit_frame_pointer.
* tests/mpz/t-mul.c (base_mul): Remove an unused variable.
2001-02-02 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c (TIME): New macro.
(main): Use TIME--print timing more accurately.
(setup_error_handler): Increase RLIMIT_DATA to 16 Mibyte.
* longlong.h (arm): Add __CLOBBER_CC to add_ssaaaa and sub_ddmmss.
2001-02-02 Kevin Ryde <kevin@swox.se>
* configure.in: Don't remove gmp-mparam.h and mpn source links under
--no-create since in that case they're not re-created.
* demos/expr: New directory.
* Makefile.am (SUBDIRS, allprogs): Add it.
* demos/expr/README, Makefile.am, expr.c, exprv.c, exprz.c, exprza.c,
exprq.c, exprqa.c, exprfa.c, exprf.c, exprfr.c, exprfra.c, expr.h,
expr-impl-h.in, run-expr.c, t-expr.c: New files.
* configure.in: Generate demos/expr/Makefile & demos/expr/expr-impl.h.
* Makefile.am: Remove mpfr from main libgmp.
* mpfr/Makefile.am: Build and install separate libmpfr.a.
* mpfr/*: Update to mpfr 2001.
* gmp-h.in (__GNU_MP_VERSION_MINOR): Bump to 2.
* Makefile.am (libtool -version-info): Bump appropriately.
* NEWS: Updates.
* tune/divrem1div.c, tune/divrem1inv.c, tune/divrem2div.c,
tune/divrem2inv.c: Renamed from divrem_1_div.c, divrem_1_inv.c,
divrem_2_div.c, divrem_2_inv.c, to be unique in DOS 8.3 filenames.
* tune/Makefile.am (libspeed_la_SOURCES): Update.
* mpn/x86/*/README, mpn/x86/README.family: Misc updates.
* tune/README: Misc updates.
* doc/configuration: Misc updates.
* mpn/x86/pentium/mmx/gmp-mparam.h: Change UDIV_PREINV_TIME to
UDIV_NORM_PREINV_TIME.
* mpz/pprime_p.c: Use ASSERT_ALWAYS instead of abort.
* rand.c (__gmp_rand_lc_scheme): Add "const".
(struct __gmp_rand_lc_scheme_struct): Make astr "const char *".
* demos/calc/calc.y, demos/calc/calclex.l: Add kron function.
* tests/devel/try.c: Partial rewrite, new scheme of function types,
allow result validation functions, add sqrtrem and jacobi testing.
* tune/many.pl: Corresponding updates.
* tests/devel/Makefile.am: Add a convenience rule for libtests.la.
* tests/refmpz.c: New file.
* tests/Makefile.am: Add it.
* tests/misc.c (mpz_erandomb, mpz_erandomb_nonzero): New functions.
* tests/tests.h: Add prototypes.
* mpn/x86/k6/cross.pl: Add a couple more exceptions.
* gmp.texi: Don't use @nicode{'\0'}, it doesn't come out right in tex.
(Introduction to GMP): Mention Cray vector systems.
(Build Options): Describe --enable-mpfr, refer to its manual. Add
Crays under supported CPUs.
(Debugging): Add notes on source file paths.
(Autoconf): New section.
(Assigning Integers): Note truncation by mpz_set_d, mpz_set_q and
mpz_set_f.
(Converting Integers): Note the size mpz_get_str allocates.
(Floating-point Functions): Rewrite introduction, clarifying some
points about precision handling.
(Converting Floats): Note the size mpf_get_str allocates, and that it
gives an empty string for zero. Add mpf_get_si and mpf_get_ui.
(Float Comparison): Give the formula mpf_reldiff calculates.
(Miscellaneous Float Functions): Add mpf_integer_p and mpf_fits_*_p.
(Random Number Functions): Misc rewordings for clarity.
(Random State Initialization): Ditto.
(Custom Allocation): Remove note on deallocate_function called with 0,
misc rewording and clarifications.
(Exact Remainder): New section.
(Binary GCD): A few words on initial reduction using division.
(Accelerated GCD): Refer to exact remainder section.
(Extended GCD): Extra remarks on single versus double selection.
(Jacobi Symbol): Update for mpz/jacobi.c rewrite and modexact_1_odd.
(Modular Powering Algorithm): Refer to exact remainder section.
(Assembler SIMD Instructions): Update remarks on MMX.
(Contributors): Amend to "Divide and Conquer" division.
(References): Tweak some formatting. Add "Proof of GMP Fast Division
and Square Root Implementations" by Paul Zimmermann.
2001-01-31 Torbjorn Granlund <tege@swox.com>
* configure.in: Don't ever pass -mips3; let ABI flags imply ISA.
2001-01-31 Kevin Ryde <kevin@swox.se>
* tune/time.c: Remove unnecessary longlong.h.
(speed_endtime): Add some extra diagnostics.
* tests/mpz/t-fdiv_ui.c, tests/mpz/t-tdiv_ui.c: Use unsigned long for
the divisor, not mp_limb_t.
* tests/mpz/t-jac.c (try_base): Use %llu for long long limb.
* tests/trace.c: Add <string.h> for strlen.
* tune/freq.c (speed_cpu_frequency_proc_cpuinfo): Ignore "cycle
frequency" of 0, allow "BogoMIPS" as well as "bogomips".
* macos/Makefile.in: Add mpf/fits_s.c and mpf/fits_u.c objects.
2001-01-30 Torbjorn Granlund <tege@swox.com>
* longlong.h: Add add_ssaaaa and sub_ddmmss for 64-bit sparc.
2001-01-29 Torbjorn Granlund <tege@swox.com>
* mpn/powerpc64/addmul_1.asm: Prefix registers with an `r'.
* mpn/powerpc64/submul_1.asm: Likewise.
* mpn/powerpc64/mul_1.asm: Likewise.
* configure.in (alpha*-*-*): Amend last change to handle pca*.
2001-01-29 Kevin Ryde <kevin@swox.se>
* tune/speed.h (SPEED_ROUTINE_INVERT_LIMB_CALL): Don't let the
compiler optimize everything away.
* tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Measure
operator_div, operator_mod, mpn_divrem_2_div, mpn_divrem_2_inv,
mpn_sb_divrem_m3, mpn_sb_divrem_m3_div, mpn_sb_divrem_m3_inv,
mpn_dc_divrem_sb_div, mpn_dc_divrem_sb_inv.
* tune/divrem_2_div.c, tune/divrem_2_inv.c, tune/sb_div.c,
tune/sb_inv.c: New files.
* tune/tuneup.c, gmp-impl.h, tune/speed.h, tune/common.c,
tune/Makefile.am: Tune SB_PREINV_THRESHOLD and DIVREM_2_THRESHOLD.
* mpn/generic/divrem_2.c: Use new DIVREM_2_THRESHOLD.
* mpn/generic/sb_divrem_mn.c: Use new SB_PREINV_THRESHOLD.
* mpn/x86/p6/mmx/lshift.asm, mpn/x86/p6/mmx/rshift.asm: New files,
just m4 include()ing the P55 code.
* configure.in (pentium[23]-*-*): Remove x86/pentium/mmx from path.
2001-01-27 Kevin Ryde <kevin@swox.se>
* configure.in (AC_CHECK_FUNCS): Add srand48.
* tune/speed.c: Use this test.
* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): Allow "egcs-" prefix on gcc
--version, warn if the format is unrecognised.
(GMP_COMPARE_GE): Guard against empty $1 not only on last arg.
(GMP_INIT, GMP_FINISH, GMP_PROG_M4): Obscure or eliminate literal
"dnl"s since autoconf thinks they indicate faulty macros.
* mpz/get_str.c, mpf/get_str.c: Make allocated string block exactly
strlen(str)+1 bytes.
* mpz/dump.c, mpf/dump.c, tests/mpz/convert.c: Use this size when
freeing.
* tests/mpf/t-conv.c: Ditto, and ensure x==0 is exercised.
* tests/mpz/t-fits.c: New file.
* tests/mpz/Makefile.am: Add it.
* tests/mpf/t-fits.c: New file.
* tests/mpf/t-get_si.c: New file.
* tests/mpf/t-int.c: New file.
* tests/mpf/Makefile.am: Add them.
* mpf/fits_s.c: New file.
* mpf/fits_u.c: New file.
* mpf/get_si.c: New file.
* mpf/get_ui.c: New file.
* mpf/int_p.c: New file.
* Makefile.am, mpf/Makefile.am: Add them.
* gmp-h.in (mpf_fits_*_p, mpf_get_si, mpf_get_ui, mpf_integer_p): Add
prototypes.
* tests/memory.c (tests_allocate, tests_reallocate): Guard against
size==0.
* tests/mpz/*.c, tests/mpq/*.c, tests/mpf/*.c: Uses tests_start and
tests_end.
* gmp-impl.h (USE_LEADING_REGPARM): Fix conditionals.
2001-01-23 Kevin Ryde <kevin@swox.se>
* configure.in, mpn/Makeasm.am (ASMFLAGS_PIC): New substitution,
allowing -DPIC to be suppressed on cygwin.
(CFLAGS_PIC): New substitution, use it and $(CCAS) directly, rather
than $(LIBTOOL), avoiding a problem with FreeBSD 2.2.8.
* mpn/x86/k6/mode1o.asm, mpn/x86/k7/mode1o.asm: Remove an unnecessary
+[.-L(here)] from _GLOBAL_OFFSET_TABLE_, avoids a segv from gas 1.92.3.
* mpn/x86/README.family: Add notes on the problem.
2001-01-20 Torbjorn Granlund <tege@swox.com>
* configure.in (alpha*-*-*): Default `flavour' to ev4.
2001-01-19 Kevin Ryde <kevin@swox.se>
* assert.c, gmp-impl.h (__gmp_assert_fail): Change return type to
void, since it's no longer used in expressions.
* mpn/x86/addsub_n.S: Remove file, since it doesn't work and it upsets
tune/many.pl.
* mpz/jacobi.c: Rewrite, but still binary algorithm; accept zero and
negative denominators; merge mpz_jacobi and mpz_legendre, add
mpz_kronecker; use mpn directly, add special cases for size==1.
* gmp.texi (Number Theoretic Functions): Update.
* gmp-h.in (mpz_kronecker): Add prototype.
* gmp-impl.h (USE_LEADING_REGPARM): New macro.
* tests/mpz/t-jac.c: Test mpz_kronecker.
* mpz/legendre.c: Remove file.
* Makefile.am, mpz/Makefile.am: Update.
* longlong.h (alpha count_leading_zeros): Use __attribute__ ((const))
when possible, add parameter to prototype.
(ia64 udiv_qrnnd): Use for all compilers, not just gcc.
(pentium count_trailing_zeros): Use count_leading_zeros.
* acinclude.m4 (GMP_C_ATTRIBUTE_CONST, GMP_C_ATTRIBUTE_NORETURN): New
macros.
* configure.in: Use them.
* gmp-impl.h (ATTRIBUTE_CONST, ATTRIBUTE_NORETURN): New macros.
(mpn_invert_limb): Add ATTRIBUTE_CONST.
(__gmp_assert_fail): Add ATTRIBUTE_NORETURN.
2001-01-18 Kevin Ryde <kevin@swox.se>
* gmp-h.in, gmp-impl.h (__gmp_allocate_func, __gmp_reallocate_func,
__gmp_free_func): Move prototypes from gmp-impl.h to gmp-h.in, for the
benefit of gmp++.h.
* gmp-impl.h, tests/misc.c, tests/tests.h: Move MPZ_SET_STR_OR_ABORT
and MPF_SET_STR_OR_ABORT to mpz_set_str_or_abort and
mpf_set_str_or_abort in libtests.
* tests/mpz/convert.c, tests/mpz/t-bin.c, tests/mpz/t-get_si.c,
tests/mpz/t-jac.c, tests/mpz/t-misc.c, tests/mpq/t-md_2exp.c,
tests/mpq/t-set_f.c, tests/mpf/t-conv.c, tests/mpf/t-misc.c: Update.
* mpn/generic/sqrtrem.c: Use MPN_COPY_INCR (for when rp==NULL).
* tests/mpz/reuse.c: Only run mpz_divexact_gcd on positive divisors.
2001-01-18 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c (main): Accept -vml option.
(fns): List `hamdist', `pow', `nextprime'.
(mpz_eval_expr): Return -1 for `popc' of negative.
(mpz_eval_expr): Handle `hamdist', `pow', `nextprime'.
2001-01-15 Kevin Ryde <kevin@swox.se>
* mpn/alpha/ev5/mode1o.c: New file.
* tune/freq.c (speed_cpu_frequency_measure): Check cycles_works_p
before running speed_cyclecounter.
* tune/speed.h (cycles_works_p): Add prototype.
2001-01-13 Torbjorn Granlund <tege@swox.com>
* tests/rand/t-rand.c (farr): Fix typo.
(zarr): Fix typo.
2001-01-12 Kevin Ryde <kevin@swox.se>
* mpz/kronsz.c: Don't depend on right shifting a negative.
* mpn/x86/gmp-mparam.h: New file.
* mpn/x86/pentium/mmx/mul_1.asm: New file.
2001-01-11 Torbjorn Granlund <tege@swox.com>
* mpz/kronsz.c: Temporary workaround for Cray right shift oddities.
Explicitly compare against zero in tests.
2001-01-10 Kevin Ryde <kevin@swox.se>
* mpz/kronzs.c: Don't depend on right shifting a negative.
2001-01-09 Torbjorn Granlund <tege@swox.com>
* tests/t-constants.c: Disable some undefined tests.
(CHECK_MAX_S): Remove workaround for gcc 2.95.2 bug recently added.
2001-01-09 Kevin Ryde <kevin@swox.se>
* tests/t-constants.c: Add more diagnostics.
(CHECK_MAX_S): Fix for gcc 2.95.2 -mpowerpc64 -maix64.
* mpn/x86/k6/mode1o.asm: New file.
* mpn/x86/k7/mode1o.asm: New file.
* mpn/asm-defs.m4 (modexact_1_odd, modexact_1c_odd): New define_mpn's.
(__clz_tab, modlimb_invert_table, PROLOGUE, EPILOGUE): Add asserts for
GSYM_PREFIX.
* mpn/x86/x86-defs.m4 (Zdisp): Add a movzbl.
* tests/mpz/t-jac.c (check_a_zero): New test.
(check_squares_zi): Fix to use (a^2/b), not (a*b/b); revert last
change avoiding a,b=0, both are fine.
(try_2den): Don't use mpz_kronecker_ui for the expected answer.
(try_*): Call abort rather than exit.
* mpz/kronzu.c, mpz/kronzs.c: Fix for a=0.
* tune/tuneup.c (USE_PREINV_MOD_1): Fix to use new DATA_HIGH_LT_R.
2001-01-08 Torbjorn Granlund <tege@swox.com>
* urandom.h: Amend 2000-11-21 change to also handle cygwin.
2001-01-08 Kevin Ryde <kevin@swox.se>
* tune/many.pl: Updates for move to tests/devel, add modexact_1_odd,
don't assume C files can't have carry-in entrypoints, remove
$(TRY_TESTS_OBJS) now in libtests.
* tests/devel/try.c, tests/refmpn.c, tests/tests.h: Remove
mpn_mod_1_rshift testing.
* tune/tuneup.c (fft_step_size): Test for overflow using the actual
mp_size_t, don't use BITS_PER_INT.
* tune/speed.c (r_string): "r" is a limb, use BITS_PER_MP_LIMB and
change LONG_ONES to LIMB_ONES.
* tune/time.c (M_2POWU): Use INT_MAX rather than BITS_PER_INT.
* extract-dbl.c (BITS_PER_PART): Use BITS_PER_MP_LIMB not
BITS_PER_LONGINT.
* mpz/inp_raw.c, mpz/out_raw.c: Add private defines of BITS_PER_CHAR.
* mpz/fac_ui.c, tests/mpz/t-fac_ui.c: Don't use BITS_PER_LONGINT.
* tests/mpz/t-get_si.c: Don't use BITS_PER_LONGINT, do the LONG_MAX
tests with some explicit code.
* mpn/*/gmp-mparam.h, acinclude.m4, tests/t-constants.c
(BITS_PER_LONGINT, BITS_PER_INT, BITS_PER_SHORTINT, BITS_PER_CHAR):
Remove defines, remove probings, remove tests.
* tune/tuneup.c (MODEXACT_1_ODD_THRESHOLD): Add tuning.
* tune/speed.c,speed.h,common.c: Add measuring of mpn_modexact_1_odd,
mpn_gcd_finda, and an "N" form for mpn_gcd_1.
* tests/mpz/t-jac.c (check_squares_zi): Ensure random a,b != 0.
2001-01-07 Kevin Ryde <kevin@swox.se>
* configure.in (gmp_mpn_functions): Add mode1o, remove mod_1_rs.
* mpn/generic/mod_1_rs.c: Remove file, no longer needed.
* gmp-h.in (mpn_mod_1_rshift): Remove prototype and define.
* mpq/set_f.c: Use MPN_STRIP_LOW_ZEROS_NOT_ZERO.
* mpz/kronzu.c, mpz/kronzs.c, mpz/kronuz.c, mpz/kronsz.c: Use
mpn_modexact_1_odd, new style MPN_STRIP_LOW_ZEROS_NOT_ZERO, and new
JACOBI macros. Various rearrangements supporting all this.
* mpn/generic/gcd_1.c: Use mpn_modexact_1_odd, reduce u%v if u much
bigger than v when size==1, some rearrangements supporting this.
* gmp-impl.h (JACOBI_*): More macros, add some casts to "int".
(MPN_STRIP_LOW_ZEROS_NOT_ZERO): Add a "low" parameter.
(mpn_modexact_1_odd, mpn_modexact_1c_odd): Add prototype and defines.
(MODEXACT_1_ODD_THRESHOLD): New threshold.
(MPN_MOD_OR_MODEXACT_1_ODD, JACOBI_MOD_OR_MODEXACT_1_ODD): New macros.
* mpn/generic/mode1o.c: New file.
* tests/mpz/reuse.c: Add testing of mpz_divexact_gcd.
* tests/mpz/t-fac_ui.c: Use libtests for memory leak checking.
* tests/mpz/t-fib_ui.c: Add a usage comment.
* tests/mpz/bit.c: Use libtests.
* tests/mpz/t-scan.c: Remove unused subroutines.
* tests/devel/try.c: Use libtests, define PROT_NONE if the system
doesn't.
* tests/spinner.c, tests/x86check.c: Use tests.h.
* tests/trace.c: Use tests.h, add mpf_trace.
* tests/refmpn.c: Use tests.h, add refmpn_malloc_limbs_aligned,
refmpn_tstbit, refmpn_neg.
* tune/common.c, tune/speed.h: Update for functions moved to
tests/misc.c.
* tune/Makefile.am, tests/mpz/Makefile.am, tests/mpq/Makefile.am,
tests/mpf/Makefile.am: Use tests/libtests.la.
* configure.in (AC_OUTPUT): Update for new directories.
(x86 CALLING_CONVENTIONS_OBJS): Use .lo for libtests.la, allow
ansi2knr on x86check.c.
* tests/Makefile.am: Establish new libtests.la convenience library,
add mpz, mpq, mpf, mpbsd subdirectories.
* tests/tests.h: New file.
* mpn/tests/ref.h,try.h: Remove files, now in tests.h.
* tests/mpf/ref.c: Move to tests/refmpf.c, rename functions to refmpf.
* tests/mpf/t-add.c, tests/mpf/t-sub.c: Use libtests.
* tests/mpf/Makefile.am: Update.
* tests/memory.c: New file.
* tests/misc.c: New file, a few subroutines from the test programs.
* mpz/tests, mpq/tests, mpf/tests, mpbsd/tests: Move directories to
tests/mpz etc.
* mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am, mpbsd/Makefile.am
(SUBDIRS): Remove.
* tests/devel: New directory.
* mpn/tests/*.c: Move programs to tests/devel.
* mpn/tests/Makefile.am, mpn/tests/README: Move to tests/devel, update.
* mpn/tests/ref.c: Move to tests/refmpn.c.
* mpn/tests/spinner.c,trace.c,x86call.asm,x86check.c: Move to tests
directory.
* tests/t-constants.c: Add checks of HIGHBIT, MAX and MIN constants,
simplify ANSI vs K&R stringizing, use correct printf format types, do
all tests before aborting.
2001-01-05 Torbjorn Granlund <tege@swox.com>
* mpn/cray/ieee/gmp-mparam.h: Retune.
2001-01-05 Kevin Ryde <kevin@swox.se>
* configure.in (mp.h): Only create this under --enable-mpbsd.
* demos/calc: New subdirectory, move demos/calc* to it.
* demos/calc/Makefile.am: New file, split from demos/Makefile.am.
* demos/Makefile.am: Update.
* configure.in (AC_OUTPUT): Add demos/calc/Makefile.
* tests/t-constants.c (CALC_BITS_PER_TYPE etc): Use a run-time test
for how many bits work in a give type, don't assume bits==8*sizeof.
2001-01-04 Kevin Ryde <kevin@swox.se>
* mpz/fits_s.c, mpz/fits_u.c: New files, split from fits.c, use plain
UINT_MAX etc, not MPZ_FITS_UTYPE_SDT etc.
* mpz/fits.c: Remove file.
* mpz/Makefile.am, macos/Makefile.in: Update.
* gmp-impl.h (UNSIGNED_TYPE_MAX etc): Remove these generic forms.
(MPZ_FITS_[SU]TYPE_SDT): Remove these.
(UINT_MAX etc): Provide a full set of defaults.
* gmp-h.in (__GMP_MP_SIZE_T_INT): New define.
* mpz/tests/t-scan.c: New file.
* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
* mpz/scan0.c, mpz/scan1.c: Rewrite, don't read beyond allocated
memory, support negatives, return ULONG_MAX for no bit found.
* gmp.texi (Integer Logic and Bit Fiddling): Update.
2001-01-03 Torbjorn Granlund <tege@swox.com>
* mpz/tests/dive.c: Generate test operands using new random functions.
* mpz/tests/io.c: Likewise.
* mpz/tests/logic.c: Likewise.
* mpz/tests/t-2exp.c: Likewise.
* stack-alloc.c (__gmp_tmp_alloc): Round `now' to required alignment.
* stack-alloc.h (__TMP_ALIGN): Append `L'.
* gmp-impl.h: For Cray, #include limits.h.
(LONG_MIN): New #define.
(ULONG_HIGHBIT): #define in terms of ULONG_MAX.
(LONG_HIGHBIT): #define as LONG_MIN.
(USHRT_MAX): New name for USHORT_MAX.
(SHRT_MAX): New name for SHORT_MAX.
(SHRT_MIN): New #define.
(USHORT_HIGHBIT,SHORT_HIGHBIT): Removed.
* mpbsd/tests/t-misc.c (check_itom [data]): *SHORT* => *SHRT*;
remove code disabling a test for Cray.
* tests/t-constants.c (CHECK_CONSTANT): Cast parameters to long.
* mpn/generic/mul_n.c (mpn_kara_sqr_n): Remove unused variable `t'.
(mpn_kara_mul_n): Likewise.
* mpz/fac_ui.c (MPZ_SET_1_NZ): Actually use `__z'.
* mpz/tests/t-jac.c
(main, check_squares_zi): Generate test operands using new random
functions.
All changes below on this date for enabling `make; make check'
with C++ compilers:
* mpz/tests/t-pow_ui.c (debug_mp, ref_mpz_pow_ui): Provide prototypes.
* mpz/tests/t-mul.c (debug_mp, base_mul, ref_mpz_mul):
Provide prototypes.
(dump_abort): Provide prototype and declare properly for C++.
* mpz/tests/t-jac.c: #include stdlib.h and sys/time.h.
* mpz/tests/t-fdiv.c
(dump_abort): Provide prototype and declare properly for C++.
(debug_mp): Provide prototype.
* mpz/tests/t-fdiv_ui.c: Likewise.
* mpz/tests/t-gcd.c: Likewise.
* mpz/tests/t-powm.c: Likewise.
* mpz/tests/t-powm_ui.c: Likewise.
* mpz/tests/t-sqrtrem.c: Likewise.
* mpz/tests/t-tdiv_ui.c: Likewise.
* mpz/tests/t-tdiv.c: Likewise.
* mpz/tests/t-2exp.c: #include stdlib.h and sys/time.h.
Remove #include of longlong.h.
* mpz/tests/io.c: #include config.h, stdlib.h, sys/time.h, and
conditionally unistd.h.
* mpz/tests/dive.c: #include stdlib.h and sys/time.h.
(dump_abort): Provide prototype and declare properly for C++.
(debug_mp): Provide prototype.
* mpz/tests/logic.c: Likewise.
* mpz/tests/convert.c (debug_mp): Provide prototype.
* mpz/tests/t-root.c (debug_mp): Likewise.
* mpz/tests/bit.c: #include stdlib.h and sys/time.h.
* mpq/tests/t-get_d.c: #include stdlib.h and sys/time.h.
(dump): Provide prototype and declare properly for C++.
* mpq/tests/t-cmp_ui.c: #include stdio.h, stdlib.h and sys/time.h.
(ref_mpq_cmp_ui): Declare properly for C++.
* mpq/tests/t-cmp.c: #include stdlib.h and sys/time.h.
(ref_mpq_cmp): Declare properly for C++.
(dump): Delete unused function.
* mpf/random2.c (myrandom): New function.
(mpf_random2): Use it.
* mpn/generic/random2.c: #include stdlib.h (for random/mrand48).
(myrandom): New function.
(mpn_random2): Use it.
* mpf/tests/t-add.c: #include stdlib.h and sys/time.h.
(oo): Remove unused function.
* mpf/tests/t-conv.c: Likewise.
* mpf/tests/t-sub.c: Likewise.
* mpf/tests/t-dm2exp.c: Likewise.
* mpf/tests/t-muldiv.c: Likewise.
* mpf/tests/t-sqrt.c: Likewise.
* mpf/tests/reuse.c: #include stdlib.h and sys/time.h.
Use PROTO on some typedefs.
(oo): Remove function.
(dump_abort): Call mpf_dump instead of oo.
* mpf/set_str.c: #include stdlib.h (for strtol).
* mpf/random2.c: #include stdlib.h (for random/mrand48).
* mpn/alpha/udiv_arnnd: File deleted.
* Remove K&R function headers.
2001-01-02 Torbjorn Granlund <tege@swox.com>
* mpn/generic/mul.c: Clean up spacing and indentation.
* mpn/generic/mul_fft.c (mpn_fft_add_modF): Use mpn_decr_u.
Clean up spacing and indentation.
* extract-dbl.c: Generalize to handle smaller limb sizes.
2001-01-01 Torbjorn Granlund <tege@swox.com>
* mpbsd/mout.c: Output newline after "0".
2000-12-31 Torbjorn Granlund <tege@swox.com>
* ltmain.sh: Remove space between `#!' and `$SHELL' when generating
`libtool'.
* mpbsd/tests/t-misc.c (check_itom): Exclude test for all Cray
vector systems. Correct comment.
2000-12-31 Kevin Ryde <kevin@swox.se>
* gmp.texi (ABI and ISA): New enough gcc needed for mips n32 etc, gcc
2.95 needed for sparc 64-bit ABI, gcc 2.8 needed for -mv8plus.
* configure.in ([cjt]90,sv1-cray-unicos*): Preserve user specified
MPN_PATH, amend test program indenting.
(none-*-*): Add -DNO_ASM to gcc to disable longlong.h asm macros in
generic C.
* config.sub (j90, t90): Preserve these, don't let configfsf.sub turn
them into c90.
* config.guess (m68k-*-nextstep*,m68k-*-openstep*): Don't transform
m68k to m68020, since m68k is already interpreted as 68020.
2000-12-30 Kevin Ryde <kevin@swox.se>
* mpq/neg.c: Rewrite, use mpn, avoid denominator copy if unnecessary.
* mpz/tstbit.c: Rewrite, slightly simplified.
* mpz/tests/bit.c (check_tstbit): New test, and add a couple more
diagnostics elsewhere.
* configure.in (x86 gcc_cflags_cpu): Add -m486 for gcc 2.7.2.
(ccbase): Only use a known compiler in eval statements (avoids
problems with non-symbol characters).
(ccbase): Use GMP_PROG_CC_IS_GNU to identify gcc installed under a
different name.
(cclist): Use same style $abi as other variables.
* acinclude.m4 (GMP_PROG_CC_IS_GNU): New macro.
(GMP_GCC_MARCH_PENTIUMPRO): Use $ccbase to identify gcc.
(GMP_ASM_TYPE): Define TYPE to empty, not "dnl", when no .type needed.
(GMP_ASM_SIZE): Ditto for SIZE, which ensures EPILOGUE on the last
line of a file doesn't leave a tab and no newline.
(GMP_ASM_UNDERSCORE): Add a prototype for C++.
* configure.in (sys/mman.h, mprotect): New tests.
* mpn/tests/try.c: Use them, and HAVE_UNISTD_H too.
* configure.in (getopt.h): Remove test.
* tune/speed.c, mpn/tests/try.c (getopt.h): Remove include, since
plain getopt() is in <unistd.h>.
* configure.in, gmp-h.in (mips*-*-irix6*): Set limb_n32=longlong
rather than using _ABIN32.
2000-12-29 Torbjorn Granlund <tege@swox.com>
* mpz/tests/reuse.c: Rename dump_abort => dump.
* mpz/tests/reuse.c: Generate operands using gmp_rand*.
* mpz/tests/convert.c: Likewise.
* configure.in: Detect T90-ieee systems; move Cray path
selection to after AC_PROG_CC. Invoke AC_PROG_CPP.
* mpn/cray/cfp: New directory. Move cfp specific files here.
* mpn/cray/cfp/mulwwc90.s: New file.
* mpn/cray/cfp/mulwwj90.s: New file.
* mpn/cray/mulww.s: Delete.
2000-12-27 Torbjorn Granlund <tege@swox.com>
* mpn/cray/ieee/mul_1.c: New file.
* mpn/cray/ieee/addmul_1.c: New file.
* mpn/cray/ieee/submul_1.c: New file.
* mpn/cray/ieee/gmp-mparam.h: New file.
* mpn/cray/gmp-mparam.h: Disable UMUL_TIME and UDIV_TIME.
* mpn/cray/hamdist.c: New file.
* mpn/cray/popcount.c: New file.
* mpn/cray/rshift.c: New file.
* mpn/cray/lshift.c: New file.
* longlong.h: Add count_leading_zeros for _CRAY.
Reorganize _CRAY stuff.
2000-12-24 Kevin Ryde <kevin@swox.se>
* configure.in (alpha*-cray-unicos*): Disable SPEED_CYCLECOUNTER_OBJ,
as tune/alpha.asm doesn't suit.
* mpn/generic/sqrtrem.c, mpz/pow_ui.c, mpz/powm_ui.c, mpf/get_str.c,
mpf/set_str.c: Use mpn_sqr_n when applicable, not mpn_mul_n.
2000-12-23 Torbjorn Granlund <tege@swox.com>
* mpn/generic/mul_fft.c: Reformat.
(mpn_fft_neg_modF): Remove.
(mpn_fft_mul_2exp_modF): Inline mpn_fft_neg_modF.
* mpn/cray/gmp-mparam.h: Retune.
* configure.in (*-cray-unicos*): Pass `-O3 -htask0'.
(vax*-*-*): Fix typo.
* mpn/cray/mul_1.c: Use dynamic arrays, get rid of TMP_*.
* mpn/cray/addmul_1.c: Likewise.
* mpn/cray/submul_1.c: Likewise.
* mpn/cray/add_n.c: Likewise.
* mpn/cray/sub_n.c: Likewise.
* configure.in (default cc_cflags,cc_64_cflags): Remove -g/add -O.
(mips*-*-irix[6789]*]): Remove -g from cc_*_cflags.
2000-12-22 Torbjorn Granlund <tege@swox.com>
* mpn/generic/mul_n.c: Delete K&R function headers.
* mpn/generic/mul_n.c (mpn_kara_mul_n): Clean up type confusion
between mp_limb_t and mp_size_t.
(mpn_kara_sqr_n): Likewise.
* mpn/generic/mul_n.c (mpn_kara_mul_n): Use mpn_incr_u.
(mpn_kara_sqr_n): Likewise.
* mpn/generic/mul_n.c (mpn_kara_mul_n): Change handling of `sign'
to work around GCC 2.8.1 MIPS bug.
* configure.in (implied alpha*-cray-unicos*): Remove -g from cc_cflags.
2000-12-21 Torbjorn Granlund <tege@swox.com>
* mpn/alpha/invert_limb.asm: Simplify a bit.
Add handling of bigend systems.
* mpn/alpha/unicos.m4: Define `bigend'.
* mpn/alpha/default.m4: Define `bigend' (to expand to nothing).
* tests/t-constants.c (CHECK_CONSTANT): Print using %lx.
* mpn/alpha/gmp-mparam.h: Remove sizes for plain C types.
* mpn/alpha/ev5/gmp-mparam.h: Likewise.
* mpn/alpha/ev6/gmp-mparam.h: Likewise.
* mpn/alpha/unicos.m4: Define LEA.
* mpn/alpha/default.m4: Likewise.
* mpn/alpha/invert_limb.asm: Use LEA for loading symbolic addresses.
* mpn/alpha/cntlz.asm: Likewise.
* mpn/alpha/cntlz.asm: Don't use `ldbu', use slightly slower
`ldq_u' + `extbl' instead.
* mpn/alpha/unicos.m4: Define EXTERN.
* mpn/alpha/default.m4: Define EXTERN (to expand to nothing).
* mpn/alpha/cntlz.asm: Declare __clz_tab usign `EXTERN' (for the
benefit of Unicos).
2000-12-21 Kevin Ryde <kevin@swox.se>
* mpn/alpha/unicos.m4 (GSYM_PREFIX): Define for the benefit of
__clz_tab.
2000-12-20 Torbjorn Granlund <tege@swox.com>
* longlong.h: Add udiv_qrnnd and count_leading_zeros for _CRAYMPP
systems.
2000-12-19 Torbjorn Granlund <tege@swox.com>
* configure.in (*sparc*-*-*): Remove -g from cc_cflags and acc_cflags.
* mpn/generic/sqrtrem.c (mpn_sqrtrem): Separate `limb' values from
`size' values.
* configure.in (*-cray-unicos*): Add `-Wa,-B' to cc_cflags.
* demos/pexpr.c (rstate): New variable.
(main): Initialize rstate.
(enum op_t): Add RANDOM.
(fns): Add field for RANDOM.
(mpz_eval_expr): Handle RANDOM.
2000-12-19 Kevin Ryde <kevin@swox.se>
* mpn/generic/sqrtrem.c: Rewrite by Paul Zimmermann, based on his
Karatsuba Square Root algorithm.
* gmp.texi (Square Root Algorithm): Update.
* tune/many.pl: New file.
* mpn/tests/try.c,ref.[ch] (mpn_preinv_mod_1, mpn_sb_divrem_mn,
mpn_tdiv_qr, mpn_gcd_finda, mpn_kara_mul_n, mpn_kara_sqr_n,
mpn_toom3_mul_n, mpn_toom3_sqr_n): Add testing.
* mpn/tests/ref.c: Cast some "0"s in function calls.
* mpn/x86/k7/mmx/mod_1.asm: Add preinv_mod_1 entrypoint, remove extra
variable for loop termination.
* mpn/x86/p6/mmx/mod_1.asm: Remove file, in favour of the following.
* mpn/x86/p6/mod_1.asm: New file.
* mpn/x86/pentium/mod_1.asm: New file.
2000-12-18 Torbjorn Granlund <tege@swox.com>
* configure.in (mips*-*-irix[6789]*): Pass options to compiler using
`-Wc'.
2000-12-18 Kevin Ryde <kevin@swox.se>
* mpn/x86/k6/pre_mod_1.asm: New file.
* tune/tuneup.c (USE_PREINV_MOD_1): Tune this, rearrange mpn_divrem_1
and mpn_mod_1 handling in support of it.
* tune/Makefile.am: Consequent changes to divrem_1.c and mod_1.c.
* gmp-impl.h (USE_PREINV_MOD_1, MPN_MOD_OR_PREINV_MOD_1): New macros.
* mpn/generic/perfsqr.c, mpz/pprime_p.c: Use MPN_MOD_OR_PREINV_MOD_1.
* configure.in: Let an asm mod_1 provide a preinv_mod_1 entrypoint.
* mpn/alpha/default.m4: Remove some newlines, add some asserts.
(r0 etc, f0 etc): Use defreg and deflit.
(PROLOGUE, PROLOGUE_GP, EPILOGUE): Use GSYM_PREFIX.
* mpn/alpha/unicos.m4: Remove some newlines, add some asserts.
* mpn/alpha/invert_limb.asm: Remove unused second DATASTART parameter.
* mpn/alpha/cntlz.asm: Use mpn_count_leading_zeros and __clz_tab.
* mpn/asm-defs.m4 (changecom): Comments on portability.
(__clz_tab, modlimb_invert_table): New macros, matching gmp-impl.h.
(count_leading_zeros, count_trailing_zeros): New define_mpn's.
(PROLOGUE etc): Comments on usage, add some asserts.
(OPERATION_[lr]shift): Use m4_not_for_expansion, for the benefit of
lorrshift multifunc.
* mpn/Makeasm.am (RM_TMP): New variable controlling tmp-*.s
removal, for development purposes.
* mpz/fac_ui.c: Fix for long long limb by using mpn_mul_1 not
mpz_mul_ui, and note some possible enhancements.
* mpz/tests/t-fac_ui.c: New test.
* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
* macos/Makefile.in: Ditto, and add t-fib_ui too.
* mpn/generic/[lr]shift.c: Remove some DEBUG code adequately covered
by new parameter ASSERTs.
* longlong.h (count_trailing_zeros): Assert x!=0.
* doc/configuration: Updates for new configure things, add some notes
on test setups.
2000-12-16 Torbjorn Granlund <tege@swox.com>
* configure.in (*-*-aix): Pass -qmaxmem=20000 to xlc also for 64-bit
compiles.
* configure.in: Disable shared libs for *-*-ultrix*.
2000-12-15 Torbjorn Granlund <tege@swox.com>
* configure.in (powerpc*-*-*): Pass -Wa,-mppc when using gcc.
* gmp-impl.h (_EXTERN_INLINE): #define different for GCC and other
compilers.
* gmp-h.in (__gmp_inline): Remove.
* mp-h.in: Likewise.
* mpn/generic/gcd.c: Use `inline' instead of `__gmp_inline'.
* configure.in (mips*-*-irix[6789]*): Define *_ldflags.
2000-12-14 Torbjorn Granlund <tege@swox.com>
* mpn/generic/pre_mod_1.c: Use proper type for udiv_qrnnd
parameter `dummy'.
* mpn/generic/divrem_1.c: Use explicit `!= 0' in if statement.
* mpn/generic/mod_1.c: Likewise.
2000-12-14 Kevin Ryde <kevin@swox.se>
* config.guess (mips-*-irix[6789]*): Transform to mips64.
(m68k-*-nextstep* | m68k-*-openstep*): Transform to m68020.
2000-12-13 Torbjorn Granlund <tege@swox.com>
* tests/t-constants.c (main): Conditionalize use of PP_INVERTED.
* mpn/mp_bases.c: Handle 4-bit limbs.
(main): Add code for generating tables.
* mpn/generic/popham.c: Handle limb bitsizes of 4, 8, 16.
Suffix all 32-bit constant with `L'.
Use CNST_LIMB for 64-bit constants.
2000-12-13 Kevin Ryde <kevin@swox.se>
* gmp-impl.h (FIB_THRESHOLD): Defaults for 4,8,16 bits per limb, and
an arbitrary fallback default.
(modlimb_invert): Add efficient code for 8,16 (or 4) bits per limb.
* configure.in (mips3, mips64): Don't bother with o32 (mips2 32-bit
limb) on IRIX 6.
* Makefile.am (SUBDIRS): Put "tests" first so tests/t-constants.c is
run first, to pick up any limb size mismatch.
* tune/tuneup.c (DIVREM_1, MOD_1): Fix result values, were off by 1.
* mpz/fib_ui.c (table1, table2): Add data for 4,8,16 bits per limb.
2000-12-12 Torbjorn Granlund <tege@swox.com>
* gmp-impl.h (LIMBS_PER_DOUBLE): Define for any limb bitsize.
2000-12-11 Torbjorn Granlund <tege@swox.com>
* mpn/mp_bases.c: Add tables for 8-bit and 16-bit limbs.
Round existing `double' values properly.
* gmp-h.in (__gmp_randstate_struct): Prefix field names with _mp_
to keep out of user name space.
(__gmp_randata_lc): Likewise.
* randclr.c, randlc.c, randlc2x.c, randraw.c, randsd.c, randsdui.c:
Corresponding changes.
* gmp-impl.h (PP): #define for machines with BITS_PER_MP_LIMB
of 2, 4, 8, and 16.
(PP_FIRST_OMITTED): New, define for various BITS_PER_MP_LIMB.
(PP_MASK): Remove.
(PP_MAXPRIME): Remove.
* mpn/generic/perfsqr.c: Generalize PP handling for machines with
limbs of < 32 bits. Allow PP_INVERTED to be undefined.
* mpz/pprime_p.c: Likewise.
2000-12-10 Torbjorn Granlund <tege@swox.com>
* mpn/generic/mul_1.c: Declare parameters in C89 style.
2000-12-10 Kevin Ryde <kevin@swox.se>
* tune/Makefile.am ({speed_LDFLAGS, speed_ext_LDFLAGS, tune_LDFLAGS):
Don't use -all-static, as gcc 2.95.2 on i386 solaris 8 doesn't like
it.
* configure.in (mips3,mips64): Add ABI=64, name the others ABI=n32 and
ABI=o32.
* mpn/mips3/gmp-mparam.h (BITS_PER_LONGINT): Remove #define and let
configure determine it, since it varies with ABI=64 or ABI=n32.
* gmp.texi (ABI and ISA): Update.
(mpz_mod_ui): Remark that it's identical to mpz_fdiv_r_ui.
(mpn_divexact_by3): Qualify a statement needing mp_bits_per_limb even.
* mul_fft.c (mpn_fft_mul_modF_K etc): Patch by Paul Zimmermann to fix
results in certain cases of recursing into a further FFT.
2000-12-09 Torbjorn Granlund <tege@swox.com>
* mpz/cmpabs.c: Remove unused variable.
* mpz/rrandomb.c: Likewise.
* mpz/xor.c: Likewise.
2000-12-07 Torbjorn Granlund <tege@swox.com>
* mpn/generic/gcdext.c: Handle double carry when computing s1.
Merge two code blocks for computing s0 and s1.
2000-12-07 Kevin Ryde <kevin@swox.se>
* configure.in (hppa*-*-*): Remove -Aa -D_HPUX_SOURCE from
cc_cflags/cppflags, and instead let AM_C_PROTOTYPES add it, or -Ae,
whichever works.
* configure.in (*-*-aix[34]*): Disable shared by default, but let
the user override that, if desired.
* gmp.texi (Notes for Particular Systems): Update.
2000-12-06 Torbjorn Granlund <tege@swox.com>
* mpq/cmp_ui.c: Streamline.
2000-12-06 Kevin Ryde <kevin@swox.se>
* tune/divrem_1_div.c,divrem_1_inv.c,mod_1_div.c,mod_1_inv.c,
gcdext_double.c: New files for measuring.
* tune/Makefile.am (libspeed_la_SOURCES): Add them.
* tune/speed.c,speed.h,common.c: Add measuring of them.
(mpn_preinv_mod_1, mpz_jacobi, mpz_powm_ui): Add measuring.
* speed.c (getopt_long): Don't use this, just plain getopt.
* configure.in (getopt_long): Remove test.
* gmp-impl.h (MPN_KARA_MUL_N_TSIZE, MPN_KARA_MUL_N_MINSIZE,
MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_MUL_N_MINSIZE): New macros, and
assume toom3 square tsize was meant to be the same as the mul (both
are overestimates).
* tune/tuneup.c, mpn/generic/mul.c, mpn/generic/mul_n.c: Use them.
* mpn/generic/mul_n.c (mpn_toom3_sqr_n): Fix an ASSERT to use
TOOM3_SQR_THRESHOLD not TOOM3_MUL_THRESHOLD, add a few that might
be more realistic size checks.
* tune/speed.h (SPEED_ROUTINE_MPN_MUL_N_TSPACE etc): Use minsize.
* mpn/generic/divrem_1.c: Partial rewrite, merge fractional part
calculation, skip a divide step in more cases, introduce
DIVREM_1_NORM_THRESHOLD and DIVREM_1_UNNORM_THRESHOLD.
* mpn/generic/mod_1.c: Partial rewrite, skip a divide step in more
cases, introduce MOD_1_NORM_THRESHOLD, MOD_1_UNNORM_THRESHOLD.
* longlong.h (UDIV_PREINV_ALWAYS): New define, set for alpha and ia64.
* tune/tuneup.c (DIVREM_1_NORM_THRESHOLD, DIVREM_1_UNNORM_THRESHOLD,
MOD_1_NORM_THRESHOLD, MOD_1_UNNORM_THRESHOLD): Tune these.
* gmp-impl.h [TUNE_PROGRAM_BUILD]: Support for this.
* tune/Makefile.am (TUNE_MPN_SRCS): Add divrem_1.c and mod_1.c.
* gmp-impl.h (UDIV_NORM_PREINV_TIME): Renamed from UDIV_PREINV_TIME.
* mpn/generic/perfsqr.c, mpn/generic/sb_divrem_mn.c,
mpn/x86/*/gmp-mparam.h: Ditto.
* gmp-impl.h (UDIV_UNNORM_PREINV_TIME): New define.
* configure.in (AC_C_INLINE, HAVE_INLINE): New test and define.
* gmp-impl.h (inline): Remove, use config.h.
(_EXTERN_INLINE): Redefine based on HAVE_INLINE.
(mpn_zero_p): Use HAVE_INLINE.
* acinclude.m4 (GMP_PROG_AR, GMP_PROG_NM): Don't add flags to a user
selected $AR or $NM.
* tune/tuneup.c (all): Print how long the tuning took.
* configure.in (AM_C_PROTOTYPES): Use this, not GMP_ANSI2KNR.
* acinclude.m4 (GMP_ANSI2KNR): Remove.
* Makefile.am (gmp.h, mp.h): In DISTCLEANFILES not CLEANFILES.
* gmp-h.in (mpn_divmod, mpn_divmod_1, mpn_divexact_by3): Cast some
zeros, for the benefit of K&R if long!=int.
* mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add "*" for
the benefit of cray.
* compat.c (mpn_divexact_by3, mpn_divmod_1): Return types should be
mp_limb_t, not int, and need an actual "return".
2000-12-05 Torbjorn Granlund <tege@swox.com>
* mpn/sparc32/v8/supersparc/gmp-mparam.h: Retune.
* mpn/alpha/gmp-mparam.h: Tune for 21064.
* longlong.h: Reformat to avoid newlines within strings.
* gmp-impl.h (inline): Disable if GCC has defined __STRICT_ANSI__.
* configure.in: Do a `mkdir tune' before creating tune/sqr_basecase.c.
* Makefile.am: Treat mp.h analogously to gmp.h.
configure.in (*-*-aix): Pass -qmaxmem=20000 to xlc.
* mp-h.in: Renamed from mp.h.
Add #define for _LONG_LONG_LIMB.
Move some other fixes from gmp-h.in.
* mp.h: Removed.
* configure.in: Generate mp.h from mp-h.in like we handle
gmp-h.in/gmp.h.
2000-12-04 Torbjorn Granlund <tege@swox.com>
* acinclude.m4: Fix typo testing for bad HP compiler.
2000-12-03 Torbjorn Granlund <tege@swox.com>
* mpbsd/tests/t-misc.c (check_itom): Exclude some tests for Cray
CFP systems.
* longlong.h (CRAYIEEE umul_ppmm): New.
* mpn/cray/gmp-mparam.h (BITS_PER_SHORTINT): 32 => 64.
(*_THRESHOLD): Tune.
* configure.in: Disable shared libs for *-*-unicos*.
2000-12-03 Kevin Ryde <kevin@swox.se>
* configure.in, tune/Makefile.am: Create tune/sqr_basecase.c during
configure, and use it unconditionally in $(nodist_tuneup_SOURCES).
Fixes a problem with sqr_basecase.lo under --disable-static.
2000-12-01 Torbjorn Granlund <tege@swox.com>
* mpf/tests/t-get_d.c (LOW_BOUND,HIGH_BOUND): #define for non-IEEE
Cray systems.
* gmp-impl.h (union ieee_double_extract): Test for _CRAYIEEE.
2000-11-30 Torbjorn Granlund <tege@swox.com>
* mpz/tests/t-mul.c (base_mul): Fix re-evaluation problems in macro
invocations.
(ref_mpz_mul): New name from mpz_refmul. Make static.
(base_mul): New name for _mpn_mul_classic.
2000-11-30 Kevin Ryde <kevin@swox.se>
* configure.in: Rewrite of CC/CFLAGS selection scheme, introduce a
notion of ABI, merge compiler and mpn path selection, add flags
selection for AR and NM, let CC without CFLAGS work.
(AC_PROG_CC): Use this, not GMP_SELECT_CC.
* acinclude.m4 (GMP_PROG_CC_WORKS): Don't use AC_TRY_COMPILE, combine
cc/cflags parameter.
(GMP_PROG_CC_FIND, GMP_CHECK_CC_64BIT, GMP_PROG_CC_SELECT): Remove.
* gmp.texi (Installing GMP): Updates for new scheme.
* configure.in (AC_CANONICAL_HOST): Use this and $host, not $target.
* acinclude.m4, acconfig.h, longlong.h, mpn/x86/x86-defs.m4,
mpn/x86/k7/mmx/popham.asm: Ditto, renaming HAVE_TARGET_CPU to
HAVE_HOST_CPU.
* gmp.texi (Build Options, and elsewhere): Update.
* acinclude.m4 (GMP_COMPARE_GE): New macro.
(GMP_GCC_MARCH_PENTIUMPRO): Use it, add CC parameter, check for GCC.
(GMP_HPC_HPPA_2_0): New macro, adapted from GMP_CHECK_CC_64BIT.
* acinclude.m4 (GMP_PROG_AR): New macro, using AC_CHECK_TOOL, adding
GMP flags.
* configure.in: Use it
* gmp-h.in: Renamed from gmp.h.
(@define_LONG_LONG_LIMB@): Placeholder for instantiation.
(__GNU_MP__): Bump to 3.
* acinclude.m4 (GMP_VERSION): Get version from gmp-h.in.
* configure.in: Create gmp.h from gmp-h.in to set _LONG_LONG_LIMB.
* gmp.texi.h (ABI and ISA): Mention this.
* acconfig.h (_LONG_LONG_LIMB): Remove undef.
* Makefile.am: Distribute gmp-h.in, not gmp.h.
* configure.in (AC_PROG_CPP, AC_PROG_INSTALL, AC_PROG_LN_S): Remove,
dragged in by other macros.
(gmp_asm_syntax_testing): Renamed from gmp_no_asm_syntax_testing.
(AC_EXEEXT, AC_OBJEXT): Remove, done automatically by libtool.
* configure.in, acinclude.m4: Remove "" from "`foo`", being
unnecessary and not portable.
* configure.in (GMP_LDFLAGS): New AC_SUBST flags for libtool link.
(powerpc64*-*-aix*): Use for -Wc,-maix to fix shared library creation,
but can't build shared and static at the same time.
* Makefile.am (libgmp_la_LDFLAGS, libmp_la_LDFLAGS): Use
$(GMP_LDFLAGS).
* gmp.texi (Notes for Particular Systems): Update AIX problem
* configure.in (AC_CONFIG_LINKS): Use where needed, not via gmp_links.
(gmp_srclinks): Build up as needed, not via gmp_links.
* acinclude.m4 (GMP_INIT): Do CONFIG_TOP_SRCDIR and asm-defs.m4 here.
* configure.in (asm-defs.m4): Consequent changes.
* acinclude.m4 (GMP_INCLUDE_MPN): Using include_mpn(), replacing
GMP_INCLUDE and GMP_SINCLUDE.
* configure.in (gmp_m4postinc): Remove this scheme, use
GMP_INCLUDE_MPN instead.
* configure.in (*-*-sco3.2v5*): Force ac_cv_archive_cmds_need_lc=no,
until libtool does this itself.
* gmp.texi (Known Build Problems): Remove SCO -lc problem.
* configure, INSTALL.autoconf, etc: Update to autoconf 2000-11-29.
* acinclude.m4 (GMP_C_SIZES): Use AC_CHECK_SIZEOF.
* gmp.texi (Known Build Problems): Remove version.c sed/config.h
problem, fixed.
* ltmain.sh, aclocal.m4: Update to libtool 2000-11-25.
* ltconfig: No longer required, but leave an empty dummy for automake.
* gmp.texi (Known Build Problems): Remove SunOS native ar ranlib
problem, fixed.
* */Makefile.in, aclocal.m4: Update to automake 2000-11-25.
* mpbsd/tests/Makefile.am, mpfr/tests/Makefile.am (check_PROGRAMS):
Remove dummy, no longer required.
* mpbsd/tests/dummy.c, mpfr/tests/dummy.c: Remove files.
* depcomp: Remove file, no longer required (with no-dependencies).
* texinfo.tex: Update to 2000-11-09.
* gmp.texi (Build Options): Mention PDF from gmp.texi.
* Makefile.am (MOSTLYCLEANFILES): Add gmp.tmp, from new texinfo.tex.
* gmp.texi (Build Options): List alphaev56, alphapca56, alphaev67,
hppa2.0n and power among supported CPUs.
2000-11-30 Torbjorn Granlund <tege@swox.com>
* mpz/tests/t-mul.c: Increase max operand size from 2^17 bits
to 2^19 bits. Misc cleanups.
2000-11-26 Kevin Ryde <kevin@swox.se>
* tune/tuneup.c (FIB_THRESHOLD): Cope better with different speeds of
odd and even sizes.
* longlong.h (alpha): Use udiv_qrnnd and count_leading_zeros on all
compilers, not just gcc.
* pre_mod_1.c: Use conditional subtract to always skip a division.
(UMUL_TIME, UDIV_TIME): Remove defaults, now in longlong.h.
2000-11-22 Torbjorn Granlund <tege@swox.com>
* mpn/pa64w/gmp-mparam.h: Retune.
* mpn/pa64/gmp-mparam.h: Retune.
* mpn/sparc64/gmp-mparam.h: Retune.
2000-11-22 Kevin Ryde <kevin@swox.se>
* gmp-impl.h (ABOVE_THRESHOLD, BELOW_THRESHOLD): New macros.
* mpn/generic/gcdext.c: Use them.
* mpn/generic/gcdext.c [WANT_GCDEXT_ONE_STEP]: Force only one step.
* tune/gcdextos.c, tune/gcdextod.c: New files, one step gcdext, single
and double.
* tune/Makefile.am (libspeed_la_SOURCES): Add them.
(TUNE_MPN_SRCS): Remove gcdext.c.
* tune/{speed.h,common.c,speed.c}: Add measuring.
* tune/tuneup.c: Use for GCDEXT_THRESHOLD, plus check if double limb
is ever better. Should be more accurate, and hopefully faster.
* tune/gcdext_single.c: New file, gcdext forced to single limbs.
* tune/Makefile.am: Add it.
* tune/{speed.h,common.c,speed.c}: Add measuring, and of invert_limb.
* tune/speed.h (speed_params r): Use mp_limb_t, not long.
* tune/{speed.h,common.c}: Don't "switch" on "r".
* tune/speed.c (r_string): Accept limb sized constants.
(choice scale): Add a scale factor (eg. "2.33*mpn_add_n").
* tune/common.c (SPEED_ROUTINE_UDIV_QRNND_A): Default r to
__mp_bases[10].big_base, being a full limb value.
* configure.in (alphapca56*-*-*): Use ev5 mpn path.
(am29000*-*-*): Remove this, leave the canonical a29k.
(z8k*-*-*, z8kx*-*-*): Changed from z8000, since z8k is canonical.
(gmp_mpn_functions_optional): Add invert_limb, use for alpha and ia64.
* configure.in (alloca): Accept yes/no/detect, generate an error if
"yes" but not available.
* gmp.texi (Build Options): Update.
* acinclude.m4 (GMP_TRY_ASSEMBLE): Make conftest.out available.
(GMP_ASM_ALIGN_FILL_0x90): Use it.
* acinclude.m4 (GMP_ASM_X86_MMX) [*-*-solaris*]: Check for solaris
2.6 "as" movq bug.
* gmp.texi (Notes for Particular Systems): Update x86 MMX note.
2000-11-21 Torbjorn Granlund <tege@swox.com>
* tune/Makefile.am (EXTRA_DIST): List hppa2w.asm.
* tune/hppa2.asm: Change level directive to "2.0n".
* tune/hppa2w.asm: New file.
* configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Separate out hppa2.0w.
* mpn/pa64/gmp-mparam.h (BITS_PER_LONGINT): 64 => 32.
2000-11-21 Kevin Ryde <kevin@swox.se>
* urandom.h (random): No prototype if glibc stdlib.h has already
provided it (avoids an int32_t/long conflict).
* tune/Makefile.am (LDFLAGS): Use -all-static.
(speed-dynamic): Dynamic linked version of speed.c.
* tune/README: Update.
* mpn/generic/gcd.c (find_a): Use native version if available.
* acconfig.h (HAVE_NATIVE_mpn_gcd_finda): Add #undef.
* gmp-impl.h (mpn_gcd_finda): Add prototype and define.
* mpn/asm-defs.m4 (mpn_gcd_finda): New define_mpn.
* tune/gcd_finda_gen.c: #undef any HAVE_NATIVE_mpn_gcd_finda.
* configure.in (gmp_mpn_functions_optional): Add gcd_finda.
* mpn/x86/k6/gcd_finda.asm: New file.
* tune/tuneup.c (POWM_THRESHOLD): Slightly bigger size steps.
* gmp-impl.h (__GMP_IMPL_H__): Protect against multiple inclusion.
* tune/{gcd_bin,powm_mod,powm_redc}.c: Use #undef after gmp-impl.h to
force thresholds.
* tune/tuneup.c (print_define, fft): No need for #ifndefs on
thresholds any more.
2000-11-20 Torbjorn Granlund <tege@swox.com>
* mpz/tests/t-powm.c: Analogous changes as made 2000-11-12 to t-mul.c.
* mpz/tests/t-powm_ui.c: Likewise.
* mpz/tests/t-pow_ui.c: Likewise.
* mpz/tests/t-root.c: Likewise.
* configure.in [compiler switch]: Pass "-Aa -D_HPUX_SOURCE" to cc for
all hppa versions.
* mpn/hppa/hppa1_1/udiv_qrnnd.S: Reference data using PC relative
addressing (was r19 relative addressing).
2000-11-18 Torbjorn Granlund <tege@swox.com>
* rand.c: (__gmp_rand_lc_scheme): Convert strings to hexadecimal.
(gmp_randinit): Expect strings in hexadecimal.
2000-11-18 Kevin Ryde <kevin@swox.se>
* configfsf.guess, configfsf.sub: Update to 2000-11-16.
* config.guess (alpha*-*-openbsd*): Do exact cpu detection.
2000-11-14 Torbjorn Granlund <tege@swox.com>
* mpz/tests/t-fdiv.c: Analogous changes as made 2000-11-12 to t-mul.c.
* mpz/tests/t-tdiv_ui.c: Likewise.
* mpz/tests/t-fdiv_ui.c: Likewise.
* mpz/tests/t-sqrtrem.c: Likewise.
* mpz/tests/t-gcd.c: Likewise.
2000-11-13 Kevin Ryde <kevin@swox.se>
* mpn/Makeasm.am: New file, splitting out assembler rules.
* mpn/Makefile.am, tune/Makefile.am: Use it.
* mpn/Makefile.am (@CPP@): Remove this, automake already gives it.
* configure.in (AC_CHECK_LIBM): New test, and AC_SUBST it.
* Makefile.am (MPFR_LIBADD_OPTION): Use it.
* demos/Makefile.am (qcn_LDADD): Ditto.
* tune/Makefile.am (libspeed_la_LIBADD): Ditto.
* tests/rand/Makefile.am (libstat_la_LIBADD): Ditto.
* tune/time.c (timeval_diff_secs): Better calculation.
(read_real_time): New measuring method for AIX power/powerpc.
(speed_endtime): Protect against negative times.
* tune/common.c (speed_measure): Protect against big reps.
* tune/freq.c (speed_cpu_frequency_measure_one): Better timeval diff.
* tune/speed.h (TIMEVAL_DIFF_SEC,USEC): Remove macros.
* configure.in: (sys/systemcfg.h, read_real_time): New tests.
2000-11-13 Torbjorn Granlund <tege@swox.com>
* mpz/tests/t-mul.c: Remove #include urandom.h.
* mpz/tests/t-tdiv.c: Likewise.
* configure.in [SPEED_CYCLECOUNTER_OBJS switch]:
Declare hppa.asm as just 32 bits (cyclecounter_size=1).
2000-11-12 Torbjorn Granlund <tege@swox.com>
* mpz/tests/t-mul.c
(main): Generate random numbers using gmp_rand* functions.
(main): Distribute random numbers non-uniformly.
(main): Seed by current time if GMP_CHECK_RANDOMIZE is set.
(_mpn_mul_classic): Streamline.
* mpz/tests/t-tdiv.c: Analogous changes.
* demos/pexpr.c (HAVE_sigaltstack): Fix typo in testing for _UNICOS.
Also test for __hpux.
2000-11-11 Torbjorn Granlund <tege@swox.com>
* mpn/alpha/ev5/gmp-mparam.h: Retune.
* mpn/alpha/ev6/gmp-mparam.h: Retune.
* mpn/alpha/ev6/add_n.asm: Misc cleanups.
* mpn/alpha/ev6/sub_n.asm: New file.
2000-11-10 Torbjorn Granlund <tege@swox.com>
* configure.in [path switch] (alphaev6*-*-*): Add alpha/ev5 to path.
* mpn/alpha/ev6/add_n.asm: New file.
2000-11-10 Kevin Ryde <kevin@swox.se>
* mpz/powm.c (redc): Make global under WANT_REDC_GLOBAL.
* tune/powm_mod.c, tune/powm_redc.c: New files.
* tune/Makefile.am (libspeed_la_SOURCES): Add them.
* tune/*: Add measuring of redc, mpz_mod, mpz_powm_mod, mpz_powm_redc.
* tune/tuneup.c (POWM_THRESHOLD): Determine from redc and mpz_mod.
* tune/Makefile.am (TUNE_MPZ_SRCS): Remove powm.
2000-11-10 Torbjorn Granlund <tege@swox.com>
* mpn/mips3/gmp-mparam.h: Retune.
* configure.in (os_64bit): Rename to check_64bit_compiler.
2000-11-09 Torbjorn Granlund <tege@swox.com>
* configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Choose hppa/hppa2 code
depending on $CC64.
2000-11-09 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium/mul_1.asm: Unroll 2x, saving 1 c/l when in L1.
Add 1c entrypoint.
* mpn/x86/pentium/aorsmul_1.asm: Add 1c entrypoints, shave a couple
of cycles at entry and exit.
* configure.in (power1,2,2sc): Support these as synonyms for plain
power.
* acinclude.m4 (GMP_ASM_X86_SHLDL_CL): GMP_DEFINE WANT_SHLDL_CL here.
(GMP_ASM_X86_MMX, GMP_ASM_X86_SHLDL_CL): Add X86 into the names.
* configure.in: Consequent changes.
* gmp.texi (Notes for Particular Systems): Remarks about power/powerpc.
(Reentrancy): Remarks about simultaneous writing.
(Reporting Bugs): Ask for configfsf.guess.
2000-11-08 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_FUNC_ALLOCA): New macro.
* configure.in: Use it.
* gmp-impl.h (alloca): Conditionals and setups as per autoconf
(should make alloca available on more non-gcc compilers).
* acinclude.m4: Misc reformatting, simplify some quoting.
(GMP_ASM_UNDERSCORE, GMP_ASM_X86_MCOUNT): Use $CC $CFLAGS $CPPFLAGS.
(GMP_ASM_UNDERSCORE, GMP_ASM_ALIGN_FILL_0x90, GMP_ASM_RODATA): Put
AC_REQUIREs outside AC_CACHE_CHECK.
(GMP_C_SIZES): Use $srcdir/gmp.h, not -I; use $CPPFLAGS.
(GMP_ASM_UNDERSCORE): Use "gmp_compile" variable, and only rm
conftes1* conftes2*.
(GMP_PROG_NM): New macro, require it in appropriate GMP_ASM_*.
(GMP_TRY_ASSEMBLE): New macro, use it in various GMP_ASM_*.
* configure.in: Use GMP_PROG_NM.
* mpn/tests/spinner.c (spinner_signal): Use RETSIGTYPE.
(spinner_init): Force output to unbuffered.
* mpn/x86/README.family: Notes about GOT table and imul, misc updates.
* mpn/x86/k7/diveby3.asm: Change to 3 operands for immediate imul.
* mpn/x86/k6/diveby3.asm: Ditto.
2000-11-06 Torbjorn Granlund <tege@swox.com>
* urandom.h: Simplify and make it work properly for 64-bit
machines also in environments without `random'.
2000-11-04 Torbjorn Granlund <tege@swox.com>
* configure.in [path switch]: Don't match rs6000-*-*, in
particular don't assume POWER.
* tune/tuneup.c (fft): Remove usleep calls.
* config.guess: Don't pass "$@" when it is known to be empty.
* Makefile.am (EXTRA_DIST): List configfsf.guess and configfsf.sub.
2000-11-04 Kevin Ryde <kevin@swox.se>
* configfsf.guess, configfsf.sub: Moved from config.guess and
config.sub.
* config.guess, config.sub: New files, wrappers around around
configfsf versions.
* configfsf.guess: Update to FSF 2000-10-23.
* configfsf.sub: Update to FSF 2000-10-25.
* acinclude.m4 (GMP_ASM_POWERPC_R_REGISTERS): New macro.
* mpn/powerpc32/powerpc-defs.m4: New file, regmap.m4 r0 etc macros
conditionalized by GMP_ASM_POWERPC_R_REGISTERS.
* mpn/powerpc32/regmap.m4: Remove file.
* configure.in (powerpc*-*-*): Use all this.
* mpz/divegcd.c: New file, providing mpz_divexact_gcd.
* Makefile.am, mpz/Makefile.am: Add it.
* gmp-impl.h (mpz_divexact_gcd): Add prototype.
* mpq/aors.c,canonicalize.c,div.c,mul.c: Use it.
* longlong.h [pentium] (count_leading_zeros): New macro.
(__clz_tab): Always provide prototype.
* acconfig.h (HAVE_TARGET_CPU_): Add x86s.
* tune/speed.[ch],common.c (count_leading_zeros,
count_trailing_zeros, __udiv_qrnnd_c): Add measuring.
* configure.in (X86_PATTERN): Move from here ...
* acinclude.m4 (X86_PATTERN): ... to here.
(GMP_ASM_RODATA): Use it.
* configure.in (srandom): New test.
* mpn/tests/try.c: Use it.
* tune/speed.c: Ditto, and conditionalize getrusage and headers.
2000-11-02 Kevin Ryde <kevin@swox.se>
* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add udiv_qrnnd.c
and udiv_w_sdiv.c.
* mpn/generic/mul_n.c (mpn_kara_sqr_n): Remove a duplicate
subtract at the evaluate stage.
2000-11-01 Torbjorn Granlund <tege@swox.com>
* configure.in [compiler switch] (sparc64-*-linux*): Spell
gmp_xoptcflags_gcc properly, and pass same options as for other
sparcv9 configs.
* tune/speed.h (SPEED_ROUTINE_MPN_GET_STR): Fix type of wsize.
2000-10-31 Torbjorn Granlund <tege@swox.com>
* configure.in [compiler switch] (sparc64-*-linux*): Remove -mvis
from gmp_xoptflags_gcc, this might not be an ultrasparc.
Remove -m32 from gmp_cflags_gcc; add -Wa,-xarch=v8plus.
2000-10-29 Torbjorn Granlund <tege@swox.com>
* mpn/ia64/lorrshift.asm: New file.
* configure.in: New mulfunc `lorrshift' for lshift and rshift.
2000-10-29 Kevin Ryde <kevin@swox.se>
* mpn/generic/mul_n.c (mpn_kara_sqr_n): Delete code performing
superfluous mpn_sub_n calls.
* configure.in (found_asm, M4): Account for SPEED_CYCLECOUNTER_OBJ,
for the benefit of targets whose only .asm is a cycle counter.
* tune/tuneup.c (fft): Remove bogus usleep calls.
2000-10-28 Torbjorn Granlund <tege@swox.com>
* mpn/ia64/invert_limb.asm: Get return value for 0x800...00 right.
* tune/Makefile.am (EXTRA_DIST): Add ia64.asm.
* tune/ia64.asm: Fix typo.
* add_n.asm addmul_1.asm mul_1.asm popcount.asm sub_n.asm:
Preserve ar.lc as required by ABI.
* longlong.h (ia64 udiv_qrnnd): New.
* configure.in [path switch] (ia64*-*-*): Set extra_functions.
* mpn/ia64/invert_limb.asm: New file.
2000-10-27 Torbjorn Granlund <tege@swox.com>
* configure.in [compiler switch]:
Get rid of c89 for all hppa flavours--it is an evil compiler!
* tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Fix type of xp.
(SPEED_ROUTINE_MPN_GET_STR): Fix type of wp.
2000-10-27 Kevin Ryde <kevin@swox.se>
* gmp.texi (Fibonacci Number Algorithm): New section.
* mpz/tests/t-fib_ui.c: New file.
* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
* mpz/fib_ui.c: Rewrite, same formulas but using mpn functions and
some lookup tables, much faster at small to moderate sizes.
* gmp-impl.h (MPZ_FIB_SIZE): New macro.
(FIB_THRESHOLD): Establish default here.
* tune/tuneup.c (FIB_THRESHOLD): Start search after the new table
data.
* mpn/x86/x86-defs.m4 (mcount_movl_GOT_ebx): Rename from movl_GOT_ebx,
and don't use GSYM_PREFIX with _GLOBAL_OFFSET_TABLE_.
* tune/freq.c (speed_cpu_frequency_measure): New test comparing
gettimeofday and speed_cyclecounter, should cover many systems.
2000-10-27 Torbjorn Granlund <tege@swox.com>
* mpn/ia64/gmp-mparam.h: Retune.
2000-10-26 Torbjorn Granlund <tege@swox.com>
* longlong.h (ia64): Set UMUL_TIME and UDIV_TIME.
* mpn/ia64/submul_1.c: Fix typo.
2000-10-25 Kevin Ryde <kevin@swox.se>
* tune/freq.c (speed_cpu_frequency_sysctl): New test, supporting
hw.model for BSD flavours.
* configure.in (sysctl, sys/param.h): New tests.
2000-10-24 Torbjorn Granlund <tege@swox.com>
* tune/freq.c: Explicitly #include config.h before other include files.
* mpz/tests/reuse.c (FAIL2): New #define.
(main): Use FAIL2. Now this test properly returns non-zero exit
status when it fails.
* mpn/powerpc32/gmp-mparam.h: Retune.
* mpn/powerpc64/gmp-mparam.h: Retune.
2000-10-24 Kevin Ryde <kevin@swox.se>
* mpn/x86/k6/cross.pl: Support 8 and 16 byte code alignment.
* mpq/aors.c, mpq/canonicalize.c: Skip two mpz_divexact calls if
gcd gives 1, which should be 60% of the time.
* gmp-impl.h (MPZ_EQUAL_1_P): New macro.
* mpq/mul.c, mpq/div.c: Use it, and a new DIV_OR_SET.
* tune/tuneup.c (xp_block, yp_block): Initialize these with random
data. Fixes GCD_ACCEL and GCDEXT thresholds, and latest POWM.
2000-10-23 Torbjorn Granlund <tege@swox.com>
* configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Add ia64 case.
* mpn/ia64/gmp-mparam.h: Fill in some parameters.
* mpn/ia64/submul_1.c: New file.
* tune/ia64.asm: New file.
* gmp-impl.h (union ieee_double_extract): Handle ia64.
* mpn/mp_bases.c: Decrease chars_per_bit_exactly for entry 1 to
work around buggy ia64-linux.
* longlong.h (ia64 umul_ppmm): Update register flags to match new GCC.
2000-10-22 Torbjorn Granlund <tege@swox.com>
* mpn/alpha/ev6/gmp-mparam.h (DC_THRESHOLD): Update.
* mpn/alpha/ev6/submul_1.asm: New file.
2000-10-22 Kevin Ryde <kevin@swox.se>
* tune/gcd_bin.c: New file.
* tune/gcd_finda_gen.c: New file.
* tune/Makefile.am (libspeed_la_SOURCES): Add them.
* tune/speed.[ch],common.c (mpn_gcd_binary, find_a): Add measuring.
* * (__gmp_allocate_func etc): Rename from _mp_allocate_func etc.
(__gmp_default_allocate etc): Rename from _mp_default_allocate etc.
* gmp-impl.h (__GMP_REALLOCATE_FUNC_TYPE,
__GMP_REALLOCATE_FUNC_LIMBS): New macros.
* gmp-impl.h (DC_THRESHOLD): Establish default here, set to 3*KARA
since that's the measured average.
* mpn/generic/dc_divrem_n.c, mpn/generic/tdiv_qr.c (DC_THRESHOLD):
Remove default.
2000-10-21 Torbjorn Granlund <tege@swox.com>
* mpn/Makefile.am (TARG_DIST): Add ia64.
2000-10-21 Kevin Ryde <kevin@swox.se>
* *: Change BZ -> DC.
* mpn/generic/dc_divrem_n.c: Renamed from bz_divrem_n.c.
* doc/multiplication: Remove file, now in the manual.
* doc/assembly_code: Ditto.
* tune/README: Remove some parts now in the manual.
* gmp.texi (@m etc): Add and use some new macros.
(Integer Division - mpz_[cft]div_*): Merge descriptions, for brevity
and to emphasise similarities.
(Low-Level Functions - mpn_[lr]shift): Specify count as 1 to
mp_bits_per_limb-1.
(Algorithms): New chapter.
(References): Add some papers.
* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove some
unused variables.
* mpn/generic/mul_fft.c (mpn_fft_best_k): Ditto.
* tune/freq.c: New file, split from time.c.
* tune/time.c: Rewrite, now more automated.
* configure.in, tune/*: Consequent changes.
2000-10-20 Torbjorn Granlund <tege@swox.com>
* mpn/ia64/default.m4: New file.
* configure.in [config.m4 switch] (ia64*-*-*): Use ia64/default.m4.
* mpn/ia64/mul_1.asm: New file.
* mpn/ia64/addmul_1.asm: New file.
* mpn/ia64/add_n.asm: New file.
* mpn/ia64/sub_n.asm: New file.
* mpn/ia64/popcount.asm: New file.
* mpn/ia64/README: New file.
* mpn/alpha/cntlz.asm: Override `.set noat' from ASM_START.
* configure.in (HAVE_TARGET_CPU_*): Support hppa1.0, hppa1.1, hppa2.0
by sed'ing the period into `_'.
* acconfig.h: Add #undefs for hppa targets.
* longlong.h (udiv_qrnnd): Fix typo in last change.
* mpz/tstbit.c: Rewrite (partly to work around GCC 2.95.2 HPPA bug).
* configure.in [path switch]:
(hppa2.0*-*-*): For non-CC64 case, update path.
* configure.in [compiler switch]:
(hppa2.0w-*-*): Match with same regexp in both places.
(hppa*-*-*): New case.
(all hppa alternatives): Don't inherit default gmp_cflags_cc,
gmp_cflags_c89.
2000-10-18 Torbjorn Granlund <tege@swox.com>
* configure.in (alpha*-*-*): Define gmp_xoptcflags_gcc like for
alpha*-*-osf*.
* longlong.h (x86 udiv_qrnnd): Change `d' => `dx' to avoid K&R C
stringification.
2000-10-15 Kevin Ryde <kevin@swox.se>
* doc/configuration: Updates.
* demos/calc.y: Remove some comments.
2000-10-14 Kevin Ryde <kevin@swox.se>
* gmp.texi (Parameter Conventions, Memory Management): New sections
split from "Variable Conventions".
(Efficiency, Debugging, Profiling): New sections in "GMP Basics".
(Reentrancy): Some rewording, add note on standard I/O.
(Build options): Add --enable-assert and --enable-profiling.
* configure.in (--enable-profiling): New option.
* acinclude.m4 (GMP_ASM_X86_MCOUNT): New macro, finding how to profile.
* mpn/x86/x86-defs.m4 (PROLOGUE_cpu, call_mcount): Profiling support.
* acinclude.m4, configure.in (GMP_ASM_*): Rename from GMP_CHECK_ASM_*,
to follow autoconf conventions.
* configure.in: Run GMP_CHECK_ASM tests only if needed.
* acinclude.m4 (GMP_CHECK_ASM_MMX): Don't use GMP_CHECK_ASM_TEXT.
* mpn/x86/x86-defs.m4 (ASSERT): Allow no condition, to just emit code.
2000-10-13 Kevin Ryde <kevin@swox.se>
* mpq/md_2exp.c: New file.
* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
* Makefile.am (MPQ_OBJECTS): Ditto.
* gmp.h (mpq_mul_2exp, mpq_div_2exp): Add prototypes.
* gmp.texi (Rational Arithmetic): Add documentation.
* mpq/tests/t-md_2exp.c: New file.
* mpq/tests/Makefile.am (check_PROGRAMS): Add it.
* mpn/generic/perfsqr.c: Add/amend some comments.
* gmp.texi (Known Build Problems): Note VERSION problem with old
sed, do some minor rewording.
(Build Options): Add cygwin and djgpp URLs, mention INSTALL.autoconf,
mention HTML.
(Getting the Latest Version of GMP): Move this ...
(Introduction to GMP): ... to here.
(Compatibility with older versions): Just refer to 2.x and 3.x, not
every minor version.
(Initializing Integers): Note restrictions on mpz_array_init'ed
variables.
(Integer Logic and Bit Fiddling): Note bits are numbered from 0.
* INSTALL.autoconf: New file.
* Makefile.am (EXTRA_DIST): Add it.
* tune/Makefile.am, tune/tuneup.c, configure.in, gmp-impl.h: New
scheme for recompiled objects used by tune program. Don't use
libgmptune.a, make better use of libtool, work with ansi2knr.
* tune/speed.h,common.c (SPEED_ROUTINE_MPZ_POWM): Use s->yp and
s->xp_block, make exponent a fixed size.
2000-10-07 Torbjorn Granlund <tege@swox.com>
* mpn/mips3/gmp-mparam.h: Retune.
* mpn/generic/mul_n.c (USE_MORE_MPN): Revert last change.
2000-10-06 Torbjorn Granlund <tege@swox.com>
* mpn/mips3/add_n.s: Decrease carry recurrence from 4 to 3 cycles.
* mpn/mips3/sub_n.s: Likewise.
2000-10-04 Torbjorn Granlund <tege@swox.com>
* configure.in (sparc64-*-linux*): Set path according to CC64.
2000-10-04 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Use LABEL_SUFFIX, not a
hard-coded ":".
* config.sub: Don't demand "86" in CPU name for SCO.
* configure.in (supersparc-*-*): Remove -DSUPERSPARC.
* longlong.h: Use HAVE_TARGET_CPU_supersparc.
* configure.in (HAVE_TARGET_CPU_*): AC_DEFINE from $target_cpu.
* acconfig.h: Add #undefs, but only for targets of interest.
2000-10-03 Torbjorn Granlund <tege@swox.com>
* mpn/alpha/cntlz.asm: Rewrite.
* mp_clz_tab.c (__clz_tab): Half table size to 128 entires.
* longlong.h (count_leading_zeros): Demand just 128 entries from
__clz_tab.
* configure.in (mips-sgi-irix6.*): Pass -mips3 in addition to options
for n32 ABI.
* longlong.h: Move NO_ASM test around all assembly code.
From gcc:
* longlong.h (count_leading_zeros): Sparclite scan instruction was
being invoked incorrectly.
Replace __mc68332__ with __mcpu32__.
Add ARC support.
2000-10-02 Torbjorn Granlund <tege@swox.com>
* mpn/mips3/gmp-mparam.h: Retune for both gcc and cc.
* mpn/generic/mul_n.c (USE_MORE_MPN): Remove exception for __mips.
(interpolate3): Cast mp_limb_t variables to mp_limb_signed_t
when testing sign bit.
* mpn/alpha/ev6/gmp-mparam.h: Retune.
* mpn/powerpc32/gmp-mparam.h: Retune.
* mpn/powerpc64/gmp-mparam.h: Retune.
* mpn/x86/pentium/gmp-mparam.h: Retune.
* mpn/x86/pentium/mmx/gmp-mparam.h: Retune.
* mpn/sparc32/v9/gmp-mparam.h: Retune.
* mpn/x86/k6/gmp-mparam.h: Retune.
* mpn/x86/p6/gmp-mparam.h: Retune.
* mpn/x86/k7/gmp-mparam.h: Retune.
* mpn/sparc64/gmp-mparam.h: Retune.
* mpn/m68k/gmp-mparam.h: New file.
* mpn/alpha/ev5/gmp-mparam.h: New file.
* gmp-impl.h (default MPN_COPY): Remove final `;'.
* tune/time.c (speed_endtime): Rewrite.
* tune/speed.h (SPEED_ROUTINE_MPZ_POWM): Set base to a large value,
not 2.
* demos/pexpr.c (setup_error_handler): Fix typo.
* mpz/powm.c (redc): New function, based on old mpz_redc. Don't
multiply here.
(mpz_redc): Remove.
(mpz_powm): Major changes, partially reverting to mpn calls.
Multiply before calling redc.
(mpz_powm): Use TMP_ allocation.
(mpz_powm): Refine calculation of k (width of exponent window).
(mpz_powm): Cast constants to mp_limb_t before left shifting.
* longlong.h: Use ia64 count_leading_zeros just when __GNUC__.
2000-09-29 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_C_SIZES): New macro.
* configure.in: Use it.
* acconfig.in (BYTES_PER_MP_LIMB etc): Add #undefs.
* mpn/generic/gmp-mparam.h (BYTES_PER_MP_LIMB etc): Remove #defines.
* gmp.texi (Known Build Problems): Remove 64-bit generic C
gmp-mparam.h problem, now fixed.
* configure.in: Only run GMP_PROG_M4 if it's actually needed.
2000-09-27 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c: Clean up code for systems not supporting
sigaltstack. Handle old Linux without sigaltstack. Properly
disable all stuff related to sigaltstack under Unicos.
* mpn/alpha/ev6/addmul_1.asm: Use explicit offset for all load and
store insns. Helps old gas.
* longlong.h (count_leading_zeros): Define for ia64.
2000-09-27 Paul Zimmermann <Paul.Zimmermann@loria.fr>
* mpn/generic/bz_divrem_n.c: Fix qhl handling, simplify.
2000-09-27 Kevin Ryde <kevin@swox.se>
* mpn/Makefile.in (.SUFFIXES): Regenerate with patched automake to
get .s before .c, which is needed to override ansi2knr .c rules.
* gmp.texi (mpn_sqrtrem): Fix r2p==NULL return value description
to match the code (change by Torbjorn).
(mpn_gcd, mpn_gcdext, mpn_sqrtrem, mpn_tdiv_qr): Note most
significant limbs must be non-zero.
(mpn_gcd, mpn_gcdext, mpn_sqrtrem): Clarify destination size
requirements.
(mpn_gcd_1): Clarify value must be non-zero, not just size.
* gmp-impl.h (mpn_zero_p): New inline function.
* mpn/generic/inlines.c: Add gmp-impl.h.
* mpf/integer.c, mpz/get_d.c, mpn/generic/mul_fft.c: Use it.
* mpn/generic/gcd.c: Use MPN_COPY_INCR not MPN_COPY.
* mpf/add_ui.c: Ditto.
* mpf/add.c: Ditto, and fix test to skip copy.
2000-09-26 Kevin Ryde <kevin@swox.se>
* gmp-impl.h, longlong.h, mpn/generic/*.c: Add ASSERTs for various
parameter restrictions.
* gmp-impl.h (UDIV_PREINV_TIME): New macro.
* mpn/generic/sb_divrem_mn.c: Use it.
* mpn/generic/perfsqr.c: Ditto.
* mpn/x86/*/gmp-mparam.h (UDIV_PREINV_TIME): Add values.
* macos/Makefile.in: Add mpz/tests/t-get_si.c, mpf/tests/t-set_f.c,
and new multi-function mpz and mpq files.
2000-09-25 Kevin Ryde <kevin@swox.se>
* randlc.c, randlc2x.c, randsd.c, mpz/urandomb.c, mpz/urandomm.c:
Use mpz_ptr and mpz_srcptr for parameters.
* gmp.h (gmp_randinit_lc, gmp_randinit_lc_2exp, gmp_randseed,
mpz_urandomb, mpz_urandomm): Corresponding change to prototypes.
* randsdui.c: Remove wrong K&R parameters part.
2000-09-12 Kevin Ryde <kevin@swox.se>
* gmp-impl.h (mpn_tdiv_qr): Move prototype from here ...
* gmp.h (mpn_tdiv_qr): ... to here.
* gmp.texi (Miscellaneous Rational Functions): Comment-out and
move version 1 compatibility note to "Compatibility" section.
(Rational Number Functions): Ditto for canonicalization note.
2000-09-10 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium/com_n.asm: New file.
* gmp.texi (Rational Arithmetic): Add mpq_abs.
(Miscellaneous Rational Functions): Merge and simplify descriptions of
mpq_get_num, mpq_get_den, mpq_set_num, mpq_set_den.
* mpq/abs.c: New file.
* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
* Makefile.am (MPQ_OBJECTS): Add it.
* gmp.h (mpq_abs): Add prototype.
* mpq/set_den.c: Don't discard sign when copying, this makes the
code match the manual.
2000-09-07 Torbjorn Granlund <tege@swox.com>
* tune/alpha.asm: Rewrite to actually work right.
2000-09-07 Kevin Ryde <kevin@swox.se>
* tune/common.c,speed.[ch]: Add measuring of mpn_sqrtrem,
mpn_get_str, mpn_set_str.
* tune/README: Various updates.
2000-09-06 Torbjorn Granlund <tege@swox.com>
* mpz/fits.c: Correct type of `data'.
2000-09-06 Kevin Ryde <kevin@swox.se>
* gmp.texi (Build Options): Clarify where to find CFLAGS.
(Known Build Problems): Note SCO -lc problem.
* tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Fix for sizes > 512 limbs.
* doc/multiplication: Corrections and additions suggested by Paul.
* tune/modlinv.c: New file with alternate modlimb_inverts.
* tune/Makefile.am, tune/speed.[ch]: Add measuring of them.
* tune/speed.c (FLAG_NODATA): New attribute, use for mpz_bin_uiui,
mpz_fib_ui, mpz_fac_ui.
* mpn/x86/t-zdisp.sh: New file.
* tests/t-modlinv.c: New file.
* tests/Makefile.am (check_PROGRAMS): Add it.
* mpq/tests/t-set_f.c: New file.
* mpq/tests/Makefile.am (check_PROGRAMS): Add it.
* gmp-impl.h (MPQ_CHECK_FORMAT): New macro.
* mpq/tests/t-get_d.c: Use it.
* mpq/set_f.c: New file.
* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
* Makefile.am (MPQ_OBJECTS): Ditto.
* gmp.h: Add prototype.
* gmp.texi (Miscellaneous Rational Functions): Document mpq_set_f,
correct return type of mpq_set_d.
2000-09-03 Kevin Ryde <kevin@swox.se>
* mpz/aors_ui.c: New file merging add_ui.c and sub_ui.c, no object
code changes.
* mpz/add_ui.c, mpz/sub_ui.c: Remove files.
* mpz/Makefile.am: Update.
* gmp-impl.h (MPZ_FITS_STYPE_SDT, MPZ_FITS_UTYPE_SDT): New macros.
* mpz/fits.c: New file merging six separate fits*.c.
* mpz/fits_sshort_p.c, fits_sint_p.c, fits_slong_p.c, fits_ushort_p.c,
fits_uint_p.c, fits_ulong_p.c: Remove files
* mpz/Makefile.am: Use new fits.c, change object names from
fits_*_p.lo to fits_*.lo to avoid SunOS 4 native "ar" warnings.
* Makefile.am (MPZ_OBJECTS): Change from fits_*_p.lo to fits_*.lo.
* acinclude.m4 (GMP_CHECK_ASM_RODATA): New macro, defining RODATA.
* configure.in: Use it.
* mpn/x86/k[67]/mmx/popham.asm: Use it.
* mpn/x86/*/*.asm: Use "TEXT" not ".text".
2000-09-02 Kevin Ryde <kevin@swox.se>
* mpq/aors.c: New file merging add.c and sub.c, no object code changes.
* mpq/add.c, mpq/sub.c: Remove files.
* mpq/Makefile.am: Update.
* mpz/aors.c: New file merging add.c and sub.c, no object code changes.
* mpz/add.c, mpz/sub.c: Remove files.
* mpz/Makefile.am, mpbsd/Makefile.am: Update.
* configure.in: Re-apply "PROLOGUE.*" regexp change for the
benefit of alpha PROLOGUE_GP, lost in path search reorganisation.
* mpn/x86/x86-defs.m4 (jadcl0, cmov_simulate, ASSERT,
movl_text_address): Don't use "1:" style labels.
(Zdisp): Rearrange a bit, switch to all hex.
* mpn/x86/README.family: Note SCO "as" doesn't support "1:" style
local labels, misc rewordings.
2000-08-29 Torbjorn Granlund <tege@swox.com>
* demos/primes.c: Include string.h.
* config.guess (x86 variant recog code): Remove dummy*.o files
generated by some compilers.
2000-08-28 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_CHECK_ASM_ALIGN_FILL_0x90): Fix Solaris 2.8
warning message supression, add notes about SCO.
* Makefile.am (MPZ_OBJECTS etc): Move some comments.
2000-08-25 Kevin Ryde <kevin@swox.se>
* mpz/pprime_p.c (mpz_millerrabin): Fix a TMP_FREE.
* gmp.texi (Copying): Refer to Lesser not Library GPL.
(GMP and Reentrancy): Note stack-alloc.c is not reentrant, and
that SCO <ctype.h> is potentially not reentrant.
* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Test by attempting to
link with or without an underscore.
* gmp.texi (Known Build Problems): Remove SunOS 4 native grep
GSYM_PREFIX problem, now fixed.
* gmp-impl.h (MODLIMB_INVERSE_3): New constant.
* mpn/generic/diveby3.c: Use it instead of own INVERSE_3.
* mpn/generic/mul_n.c: Ditto.
* tests/t-constants.c: Check it, and PP_INVERTED too.
* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): New macro.
* configure.in [p6 and athlon] (gmp_optcflags_gcc): Use it to
possibly add -march=pentiumpro.
* gmp-impl.h (MPZ_SET_STR_OR_ABORT, MPF_SET_STR_OR_ABORT): New macros.
* mpz/tests/{t-bin,t-get_si,t-jac,t-misc}.c: Use them.
* mpf/tests/{t-conv,t-misc}.c: Ditto.
* mpz/tests/convert.c: Ditto and amend diagnostics slightly.
* mpz/tests/t-misc.c (check_mpz_set_si): Remove a superfluous init.
* mpz/tests/io.c: Differentiate between I/O and data conversion errors.
* mpn/generic/aors_n.c: New file merging add_n and sub_n, no
object code changes.
* mpn/generic/add_n.c: Remove file.
* mpn/generic/sub_n.c: Remove file.
* mpn/generic/aorsmul_1.c: New file merging addmul_1 and submul_1,
no object code changes.
* mpn/generic/addmul_1.c: Remove file.
* mpn/generic/submul_1.c: Remove file.
* mpn/generic/popham.c: New file merging popcount and hamdist, no
object code changes.
* mpn/generic/popcount.c: Remove file.
* mpn/generic/hamdist.c: Remove file.
2000-08-24 Torbjorn Granlund <tege@swox.com>
* gmp-impl.h (mpn_com_n): Fix typo.
2000-08-23 Torbjorn Granlund <tege@swox.com>
* demos/primes.c (main): Don't call mpz_probab_prime_p for numbers
that are known to be prime after sieving.
(main): Declare and initialize max_s_prime_squared.
(MAX_S_PRIME): Increase.
(ST_SIZE): Increase.
2000-08-23 Kevin Ryde <kevin@swox.se>
* gmp-impl.h (ASSERT_ALWAYS): Change to statement style.
(JACOBI_TWO_U_BIT1): Remove ASSERT.
(MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS as a statement.
2000-08-21 Torbjorn Granlund <tege@swox.com>
* gmp-impl.h (ASSERT): Use do..while for dummy version.
* mpf/get_str.c: Don't set n_digits from digits_computed_so_far
when the converted operand becomes zero. Misc cleanups.
2000-08-21 Kevin Ryde <kevin@swox.se>
* mpz/{fdiv_r_2exp.c,lcm.c,urandomm.c}: Add missing TMP_MARK/FREE,
avoiding memory leak when using stack-alloc.c.
2000-08-20 Kevin Ryde <kevin@swox.se>
* mpz/set.c [BERKELEY_MP] (move): Add conditionals to build as
"move" for libmp.
* mpbsd/Makefile.am: Use mpz/set.c, not move.c.
* Makefile.am (MPBSD_OBJECTS): Corresponding change.
* mpbsd/move.c: Remove file.
* mp{n,z,q,f,mpbsd}/Makefile.am (-DOPERATION_foo): Use "foo" even
for ansi2knr "foo_" objects. Do this with the makefiles to keep
the sources cleaner.
* mpz/mul_siui.c, mpf/integer.c: Revert to plain OPERATION_* forms.
* mpn/lisp/gmpasm-mode.el (gmpasm-remove-from-list): Renamed from
gmpasm-delete-from-list, because it's non-destructive.
(gmpasm-font-lock-keywords): Add some more keywords.
2000-08-16 Kevin Ryde <kevin@swox.se>
* tune/mul_n_mpn.c, tune/mul_n_open.c: New files, being forced
open-coded and mpn #includes of mpn/generic/mul_n.c.
* tune/*: Add measuring of them.
* tune/speed.c: Print command line into *.gnuplot file.
* mpn/generic/mul_n.c (USE_MORE_MPN): Change to #if not #ifdef for
using the value, add #ifndef for providing the default.
* mpn/sparc64/gmp-mparam.h (USE_MORE_MPN): Add #ifndef.
* tests/t-constants.c: New file.
* tests/Makefile.am (check_PROGRAMS): Add it.
* mpz/get_si.c: Use LONG_MAX, not BITS_PER_MP_LIMB, so the result
doesn't depend on limb size when outside the range of a long
(though such results are not actually documented).
* mpz/tests/t-get_si.c: New file.
* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
* mpn/tests/try.c (call): Cast popcount and hamdist calls,
for the benefit of long long limb.
2000-08-15 Kevin Ryde <kevin@swox.se>
* mp.h (mp_set_memory_functions): Add missing #define.
* mpbsd/tests/allfuns.c (mp_set_memory_functions): Verify its
existance.
* mpf/tests/t-misc.c (check_mpf_getset_prec): New test, verifying
reverted behaviour of mpf_get_prec.
* mpn/tests/ref.c (refmpn_strip_twos): Use refmpn_copyi, not
MPN_COPY_INCR.
* mpz/mul_siui.c, mpf/integer.c: Recognise OPERATION_*_ forms
produced under ansi2knr.
* configure.in (mpn_objects, mpn_objs_in_libgmp): Add $U to .c
objects when ansi2knr in use.
* mpn/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr.
(libdummy.la): Add this, not built, to create ansi2knr style rules
for all potential .c files.
* mp{z,q,f,fr,bsd}/Makefile.am, mpq/tests/Makefile.am,
tests/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr (now everywhere).
* Makefile.am (MP{Z,Q,F,FR,BSD}_OBJECTS, libmp_la_DEPENDENCIES):
Add $U to all .lo filenames.
2000-08-03 Torbjorn Granlund <tege@swox.com>
* mpn/alpha/ev6/addmul_1.asm: Correct number of cycles to 3.5/28.
2000-08-02 Torbjorn Granlund <tege@swox.com>
* Version 3.1 released.
* gmp.texi: Rephrase mpf_urandomb documentation.
* mpn/alpha/ev6: New directory with ev6/21264 optimized code.
* mpn/alpha/ev6/addmul_1.asm: New file.
* mpn/alpha/ev6/gmp-mparam.h: New file.
2000-08-02 Kevin Ryde <kevin@swox.se>
* demos/factorize.c (random): Don't use "inline".
* mpfr/{log,mul_ui,round,set,set_d}.c: Corrections to K&R parts.
* Makefile.am (EXTRA_HEADERS): Omit $(MPFR_HEADERS_OPTION).
* mpfr/Makefile.am (EXTRA_DIST): Add mpfr.h.
* gmp.texi (Known Build Problems): Note problem stripping libgmp.a.
2000-08-02 Kent Boortz <kent@swox.com>
* mpfr: Integrated experimental version of mpfr-0.4.
* configure.in: Changes for option --enable-mpfr.
* Makefile.am: Changes for option --enable-mpfr.
2000-08-01 Torbjorn Granlund <tege@swox.com>
* mpn/generic/popcount.c: Disable SPARC v9 popc_limb pattern.
* mpn/generic/hamdist.c: Likewise.
2000-08-01 Kevin Ryde <kevin@swox.se>
* mpn/tests/try.c (try_init): Account for ALIGNMENTS when sizing
source and dest regions.
2000-07-31 Torbjorn Granlund <tege@swox.com>
* mpf/get_str.c: Develop three extra digits, not just one.
2000-07-31 Kevin Ryde <kevin@swox.se>
* gmp.texi (References): Add URL for invariant division.
2000-07-30 Kevin Ryde <kevin@swox.se>
* tune/time.c (speed_cpu_frequency_proc_cpuinfo): Add support for
alpha linux "cycle frequency".
* mpn/sparc64/gmp-mparam.h: Re-run tune program for FFT thresholds.
2000-07-29 Kevin Ryde <kevin@swox.se>
* gmp.texi (ABI and ISA): Add sparc64-*-linux*.
* configure.in [sparc64-*-linux*] (gmp_cflags64_gcc): Same flags
as under solaris.
* configure.in (--enable-fft): New option, default "no".
* gmp.texi (Build Options): Describe it.
* mpn/generic/mul.c, mpn/generic/mul_n.c [WANT_FFT]: Use it.
* tune/tuneup.c [WANT_FFT]: By default don't probe FFTs if not enabled.
* NEWS: Multiplication optionally using FFT.
* tune/README: Notes on FFT and GCD thresholds, other minor updates.
* Makefile.am: Expunge the macos generated files update stuff.
2000-07-28 Kevin Ryde <kevin@swox.se>
* mpn/x86/*/gmp-mparam.h: Add some FFT thresholds.
2000-07-28 Kent Boortz <kent@swox.se>
* macos/Asm*, macos/CmnObj, macos/Mp*: Delete directories.
* macos/Makefile: Delete file.
* macos/Makefile.cw: Delete file.
* macos/config.h: Delete file.
* macos/Asm/*.s: Delete files.
* macos/configure: Create target directories. Don't transform
'(C)' to '(;)' in a 'dnl' line comment in .asm file.
* Makefile.am: Delete macos targets.
* macos/README: Reflect that we reverted back to a build
process that require ""macos/configure" to run on MacOS.
This imply that MacPerl is needed for a build in MacOS.
2000-07-27 Kevin Ryde <kevin@swox.se>
* mpn/generic/mul_fft.c: New file, by Paul Zimmermann, minor mods
applied.
* configure.in (gmp_mpn_functions): Add it.
* mpn/generic/mul.c, mpn/generic/mul_n.c: Use it.
* doc/multiplication: Describe it (briefly).
* gmp-impl.h (FFT_MUL_THRESHOLD etc): New thresholds.
(mpn_fft_best_k, mpn_fft_next_size, mpn_mul_fft, mpn_mul_fft_full):
New functions.
(numberof, TMP_ALLOC_TYPE etc, _MP_ALLOCATE_FUNC_TYPE etc,
UNSIGNED_TYPE_MAX etc): New macros.
* tune/*: Add FFT threshold tuning and speed measuring.
* tune/common.c: Avoid huge macro expansions for umul and udiv.
* mpz/tests/t-{bin,jac,misc}.c, mp{bsd,f}/tests/t-misc.c,
mpn/tests/{try,spinner}.c: Use new gmp-impl.h macros.
* demos/Makefile.am (BUILT_SOURCES): Don't need calc.c etc under this.
2000-07-27 Torbjorn Granlund <tege@swox.com>
* mpn/ia64/gmp-mparam.h: New file.
2000-07-26 Torbjorn Granlund <tege@swox.com>
* demos/isprime.c: Handle any number of arguments and print
classification for each. Add `-q' option for old behaviour.
2000-07-26 Kevin Ryde <kevin@swox.se>
* gmp.texi (Build Options): Mention djgpp stack size.
(Notes for Package Builds): New section.
(Compatibility with older versions): Update for 3.1, add mpf_get_prec.
* demos/factorize.c [__GLIBC__]: Don't declare random() under glibc.
* gmp.h (gmp_version): Add prototype and define.
* Makefile.am: Keep macos directory generated files up-to-date
during development and on a "make dist".
2000-07-25 Torbjorn Granlund <tege@swox.com>
* mpn/hppa/gmp-mparam.h: Update threshold values from new `tune' run.
* mpn/pa64/gmp-mparam.h: Fill in values from `make tune' run.
* mpn/pa64w/gmp-mparam.h: Likewise.
* mpn/mips3/gmp-mparam.h: Likewise.
* tune/hppa2.asm: Fix typo in .level directive.
* configure.in: Add sparc64-*-linux* support (from Jakub Jelinek).
* configure: Regenerate.
* mpn/sparc64/rshift.asm: Use %g5 instead of volatile stack frame area
for return value (from Jakub Jelinek).
* mpn/sparc64/lshift.asm: Likewise.
* mpf/get_prc.c: Revert Aug 8, 1996 change.
* version.c: No longer static.
* mpn/pa64/gmp-mparam.h: Only #define *_THRESHOLD if not already
defined.
* mpn/pa64w/gmp-mparam.h: Likewise.
* mpn/arm/gmp-mparam.h: Likewise.
* mpn/mips3/gmp-mparam.h: Likewise.
2000-07-25 Kevin Ryde <kevin@swox.se>
* INSTALL: It's "info -f ./gmp.info" to be sure of hitting the
gmp.info in the current directory.
* Makefile.am (libmp_la_DEPENDENCIES): Add mpz/cmp.lo, for last
mpz/powm.c fix.
* mpn/sparc64/{add,sub}mul1h.asm: Renamed from {add,sub}mul_1h.asm
to avoid name conflicts on an 8.3 filesystem.
* mpn/sparc64/{add,sub,}mul_1.asm: Update include_mpn()s.
2000-07-24 Torbjorn Granlund <tege@swox.com>
* Update header of all files previously under the Library GPL
to instead be under the Lesser GPL.
* COPYING.LIB: Now Lesser GPL.
* demos/primes.c: Change license to GPL (was Library GPL).
* demos/isprime.c: Change license to GPL (was Library GPL).
* gmp.h (error code enum): Add GMP_ERROR_BAD_STRING (currently unused).
* mpz/tests/t-mul.c: Default SIZE to a function of TOOM3_MUL_THRESHOLD.
Improve error messages. Decrease reps.
2000-07-22 Kevin Ryde <kevin@swox.se>
* tune/speed.h: Decrease the amount of data used for gcd and powm
measuring, to make the tune go a bit faster.
2000-07-21 Kent Boortz <kent@swox.se>
* macos/Asm*, macos/CmnObj, macos/Mp*: Directories no longer created
from configure script, now part of dist.
* macos/Makefile
* macos/Makefile.cw
* macos/config.h
* macos/Asm/*.s
New files and directories that is the output from configure. This way
no Perl installation is required to build on MacOS, just MPW.
* macos/configure: Added prefix '__g' to exported assembler labels.
Changed to handle new m4 syntax instead of the old cpp syntax in asm.
* macos/Makefile.in: Corrected 'clean' target, added 'distclean'
and 'maintainer_clean'. Added "mpn/mp_bases.c" to build.
* macos/README: Reflect the new build process without configure.
Corrected the file structure for Apple MPW installation.
2000-07-21 Torbjorn Granlund <tege@swox.com>
* mpf/tests/t-muldiv.c: Relax error limit. Make precision depend
on SIZE. Misc changes.
* configure: Regenerate.
2000-07-20 Kent Boortz <kent@swox.com>
* macos/Makefile.in: Removed hard coded targets, added special
targets found in Makefile.am files.
* macos/configure: Generate targets from top configure script and
Makefile.am files. Made script runnable from Unix for testing.
* macos/README: Notes about search paths for includes, contributed
by Marco Bambini.
* configure.in: Added comment about lines that the "macos/configure"
script depend on.
2000-07-20 Torbjorn Granlund <tege@swox.com>
* mpz/powm.c (mpz_powm): After final mpz_redc call, subtract `mod'
from result if it is greater than `mod'.
2000-07-19 Torbjorn Granlund <tege@swox.com>
* mpn/hppa/gmp-mparam.h: Fill in values from `make tune' run.
* mpn/alpha/gmp-mparam.h: Likewise.
* mpn/powerpc32/gmp-mparam.h: Likewise.
* tune/hppa.asm: New file.
* tune/hppa2.asm: New file.
* configure.in (SPEED_CYCLECOUNTER_OBJS): Set for hppa2*-*-* and
hppa*-*-*.
* tune/Makefile.am (EXTRA_DIST): Add hppa.asm and hppa2.asm.
* tune/speed.h (SPEED_ROUTINE_MPN_BZ_DIVREM_CALL): Declare `marker';
invoke TMP_FREE.
* mpn/hppa/hppa1_1/udiv_qrnnd.S: Use "%" instead of "'" for
reloc/symbol delimiter.
2000-07-16 Torbjorn Granlund <tege@swox.com>
* mpn/powerpc64/gmp-mparam.h: Update with output from tune utility.
* mpn/powerpc64/copyi.asm: New file.
* mpn/powerpc64/copyd.asm: New file.
2000-07-16 Kevin Ryde <kevin@swox.se>
* tune/*: Add measuring for umul_ppmm and udiv_qrnnd.
2000-07-14 Kevin Ryde <kevin@swox.se>
* mpn/x86/k6/k62mmx: New directory.
* configure.in (k6[23]*-*-*): Use it.
* mpn/x86/k6/k62mmx/copyi.asm, mpn/x86/k6/k62mmx/copyd.asm: Move from
mmx directory, improve code alignment a bit.
* mpn/x86/k6/k62mmx/lshift.asm, mpn/x86/k6/k62mmx/rshift.asm: Ditto,
and improve addressing modes for pre-CXT cores.
* mpn/x86/x86-defs.m4 (Zdisp): Add an instruction.
* mpn/x86/k6/mmx/lshift.asm, mpn/x86/k6/mmx/rshift.asm: New files,
suiting plain K6.
* mpn/x86/README, mpn/x86/k6/README: Updates.
* mpn/x86/k6/mmx/*.asm: Update some comments.
* mpn/tests/Makefile.am: Use $(MAKE) in .asm rules, not "m".
* tune/Makefile.am: Use $(EXEEXT) and libtool --config objdir, for
the benefit of djgpp.
* */Makefile.in: Regenerate with patched automake that adds
$(EXEEXT) to EXTRA_PROGRAMS.
* mpn/tests/try.c: Add #ifdef to SIGBUS, for the benefit of djgpp.
* config.guess: Recognise pc:*:*:* as an x86, for djgpp.
* configure: Regenerate with patched autoconf to fix temp file
".hdr" which is invalid on a DOS 8.3 filesystem, and to fix two
sed substitutes that clobbered a ":" in $srcdir (eg. a DOS drive
spec).
* mpz/tests/io.c: Use one fp opened "w+", since separately opened
input and output doesn't work on MS-DOS 6.21.
* tests/rand/Makefile.am (allprogs): Pseudo-target to build everything.
(CLEANFILES): Add EXTRA_PROGRAMS and EXTRA_LTLIBRARIES.
(manual-test, manual-bigtest): Add $(EXEEXT) to dependencies.
* tests/rand/*/Makefile.in: Regenerate with patched automake that adds
$(EXEEXT) to EXTRA_PROGRAMS.
2000-07-13 Torbjorn Granlund <tege@swox.com>
* mpz/tests/t-root.c: Also test mpz_perfect_power_p.
Generate `nth' so that there will be fewer trivial values.
* mpz/root.c: Reverse return value in tests for detecting root of +1
and -1.
* mpz/perfpow.c: Use TMP_ALLOC interface.
2000-07-12 Torbjorn Granlund <tege@swox.com>
* mpz/perfpow.c (primes): Make it const.
2000-07-06 Kevin Ryde <kevin@swox.se>
* mpn/x86/k6/cross.pl: New file.
* mpn/x86/*/gmp-mparam.h: Updates to thresholds, conditionalize
all _TIME defines.
* mpn/x86/pentium/mmx/gmp-mparam.h: New file.
* mpn/sparc64/gmp-mparam.h: Update thresholds.
* mpn/sparc32/v9/gmp-mparam.h: Ditto.
2000-07-04 Kevin Ryde <kevin@swox.se>
* NEWS: Updates.
* mpn/x86/*/README: Miscellaneous updates.
* tune/speed-ext.c: New file.
* tune/Makefile.am: Add it.
* tune/README: Updates.
* tune/speed.h (SPEED_ROUTINE_MPN_DIVREM_2): Bug fixes.
* demos/calc.y,calclex.l: New files.
* demos/calc.c,calc.h,calclex.c: New files, generated from .y and .l.
* demos/Makefile.am: Add them.
* gmp.h (mpq_swap, mpf_swap): Add prototypes and defines.
2000-07-01 Kevin Ryde <kevin@swox.se>
* gmp.texi (ABI and ISA): New section, bringing together ABI notes.
(Build Options): Add MPN_PATH, various updates.
(Build Options): Add note on setting CFLAGS when setting CC.
(Notes for Particular Systems): Add -march=pentiumpro problem.
(Known Build Problems): Note on gmp-mparam.h for 64-bit generic C.
(GMP Variable Conventions): Add some info on user defined functions.
(Reporting Bugs): Minor rewording.
* configure.in (MPN_PATH): Renamed from mpn_path.
* gmp-impl.h (ULONG_MAX,ULONG_HIGHBIT,...,SHORT_MAX): New defines.
* mp[zf]/tests/t-misc.c: Use them.
* mpbsd/tests/t-misc.c: New file.
* mpbsd/tests/Makefile.am: Add it.
* Makefile.am (LIBGMP_LT_*, LIBMP_LT_*): Bump version info.
* gmp.h (__GNU_MP_VERSION_*): Bump to 3.1.
* mpf/tests/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
* Makefile.am (libmp_la_SOURCES): Add mp_set_fns.c, accidentally
omitted in gmp 3.0.x.
* gmp.texi (Custom Allocation): Note this is available in mpbsd,
and some minor rewording.
2000-06-30 Torbjorn Granlund <tege@swox.com>
* demos/factorize.c (random): New function, defined conditionally.
(factor_using_pollard_rho): Use it, not mrand48.
* mpn/cray/README: New file.
2000-06-30 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium/aorsmul_1.asm: Add MULFUNC_PROLOGUE.
* mpz/tests/t-jac.c: Test limbs on mpn_jacobi_base, not just ulongs.
* gmp-impl.h, mpn/tests/try.c, mpn/tests/spinner.c, tune/speed.c:
Use config.h unconditionally, not under HAVE_CONFIG_H.
* demos/pexpr.c [__DJGPP__]: Patch by Richard Dawe to not use
setup_error_handler on djgpp.
* tune/*: Locate data to help direct-mapped caches, add measuring
of mpz_init/clear, mpz_add and mpz_bin_uiui, various cleanups.
* configure.in (AC_CHECK_FUNCS): Add popen.
2000-06-29 Torbjorn Granlund <tege@swox.com>
* mpf/mul_2exp.c: Streamline criterion for whether to use mpn_lshift or
mpn_rshift. Increase precision when exp is a multiple of
BITS_PER_MP_LIMB primarily to make exp==0 be a noop.
* mpf/div_2exp.c: Analogous changes.
* mpf/tests/t-dm2exp.c: Set u randomly in loop. Perform more
mpf_mul_2exp testing.
* configure.in: Recognize cray vector processors with a broad `*';
move after alpha* not to match that.
2000-06-28 Kevin Ryde <kevin@swox.se>
* mpz/tests/io.c: Use a disk file, not a pipe, switch to ansi2knr
style, switch from MP_INT to mpz_t, add a couple of error checks.
* mpz/tests/Makefile.am (CLEANFILES): Add io.tmp, in case io.c fails.
2000-06-27 Torbjorn Granlund <tege@swox.com>
* mpf/tests/t-get_d.c: Be more lax about relative error, to handle Cray
floating point format.
* mpq/tests/t-get_d.c: Decrease default reps to 1000.
* mpf/tests/t-conv.c: Correct type of `bexp'.
* configure.in (cray vector machines): Don't inherit gmp_cflags_cc.
* tune/Makefile.am (EXTRA_DIST): Delete sparc64.asm.
* configure.in (cray vector machines): Set extra_functions.
* mpn/cray/mulww.f: New file with vectorizing cray code.
* mpn/cray/mulww.s: Generated from mulww.f.
* mpn/cray/mul_1.c: New file.
* mpn/cray/addmul_1.c: New file.
* mpn/cray/submul_1.c: New file.
* mpn/cray/add_n.c: New file.
* mpn/cray/sub_n.c: New file.
2000-06-26 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_CHECK_ASM_ALIGN_FILL_0x90): Fix so it actually
detects solaris 2.6, and also suppress warning on solaris 2.8.
* configure.in (SPEED_CYCLECOUNTER): Remove spurious "athlon" from
sparc case.
* mpn/lisp/gmpasm-mode.el: Move keymap to the top of the docstring.
2000-06-21 Kevin Ryde <kevin@swox.se>
* mpn/generic/mul_n.c (mpn_kara_mul_n, mpn_kara_sqr_n): Use
mp_size_t for n2.
(mpn_toom3_mul_n, mpn_toom3_sqr_n): Use mp_size_t for size
parameters and "l" variables.
* gmp-impl.h (mpn_toom3_mul_n, mpn_toom3_sqr_n): Update prototypes.
* mpbsd/itom.c, mpbsd/sdiv.c: Add casts for correct handling of
-0x80...00 on systems with sizeof(short)==sizeof(int).
* mpz/tests/t-misc.c: Move "bin" test from here ...
* mpz/tests/t-bin.c: ... to here, and add a new (2k,k) test too.
* mpz/tests/Makefile.am (check_PROGRAMS): Add t-bin.
* mpz/bin_ui.c [_LONG_LONG_LIMB]: Use mpn_divrem_1, since kacc is
a limb not a ulong.
* mpz/bin_uiui.c [_LONG_LONG_LIMB]: Ditto, and use mpn_mul_1 too,
since nacc is a limb.
* mpf/tests/t-misc.c (check_mpf_set_si, check_mpf_cmp_si):
New file, testing mpf_set_si, mpf_init_set_si, and mpf_cmp_si.
* mpf/tests/Makefile.am (check_PROGRAMS): Add it.
* mpz/tests/t-misc.c (check_mpz_set_si, check_mpz_cmp_si):
New tests, for mpz_set_si, mpz_init_set_si, and mpz_cmp_si.
* mpz/{set,iset,cmp}_si.c [_LONG_LONG_LIMB]: Fix handling of -0x80..00.
* mpf/{set,iset,cmp}_si.c [_LONG_LONG_LIMB]: Ditto.
2000-06-19 Torbjorn Granlund <tege@swox.com>
* demos/primes.c: Properly handle arguments `m +n'.
2000-06-17 Torbjorn Granlund <tege@swox.com>
* config.sub: Recognize k5 and k6 with common pattern.
* mpq/tests/t-get_d.c: Also test mpq_set_d. Misc improvements.
* mpq/set_d.c: Special case 0.0. Don't call mpn_rshift with 0 count.
Allocate correct amount of memory for numerator. Delete spurious
ASSERT_ALWAYS(1).
2000-06-17 Kevin Ryde <kevin@swox.se>
* mpz/perfsqr.c: Fix so that zero is considered a perfect square.
(Was wrongly calling mpn_perfect_square_p with size==0.)
2000-06-16 Kevin Ryde <kevin@swox.se>
* configure.in: Set k5*-*-* to use basic i386 code until there's
something specific. Add path=x86 as a default for x86s.
* acinclude.m4 (GMP_CHECK_ASM_ALIGN_LOG): Generate
ALIGN_LOGARITHMIC setting, not a full ALIGN definition.
(GMP_CHECK_ASM_ALIGN_FILL_0x90): New test.
* configure.in [x86-*-*]: Use GMP_CHECK_ASM_ALIGN_FILL_0x90.
* mpn/asm-defs.m4 (ALIGN): New macro.
* mpn/x86/x86-defs.m4 (ALIGN): Remove supplementary definition.
* tune/*: Plain "unsigned" for speed_cyclecounter.
* configure.in: Use tune/sparcv9.asm for 32 and 64 bit modes.
* tune/sparc64.asm: Remove file.
2000-06-15 Torbjorn Granlund <tege@swox.com>
* mpn/x86/k7/mmx/copyi.asm: Use `testb' instead of `test'.
* mpn/x86/k7/mmx/copyd.asm: Likewise.
* mpn/x86/k7/mmx/lshift.asm: Avoid using `~' (Solaris as problems).
* mpn/x86/k7/mmx/rshift.asm: Likewise.
* mpn/x86/k6/aors_n.asm: Likewise.
* mpn/x86/k7/aors_n.asm: Likewise.
* mpn/x86/k7/mul_basecase.asm: Likewise.
2000-06-13 Torbjorn Granlund <tege@swox.com>
* tune/sparcv9.asm: Tune, deleting two instructions.
* tune/alpha.asm: Update to unified speed_cyclecounter.
2000-06-11 Kevin Ryde <kevin@swox.se>
* mpz/tests/reuse.c (FAIL): Add a K&R version.
Use _PROTO on some typedefs.
* mpz/tests/t-misc.c: Add gmp-impl.h for "const".
* configure.in: Rework mpn multi-function and optional files.
Names standardized, no need for explicit declarations, all picked
up in one $path traversal.
* doc/configuration: Updates.
* tests/rand/t-rand.c (main): Change "usage" to work with K&R.
2000-06-10 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium/mmx/popham.asm, mpn/x86/p6/mmx/popham.asm,
mpn/x86/p6/p3mmx/popham.asm, mpn/x86/p6/diveby3.asm: Add
MULFUNC_PROLOGUE for correct HAVE_NATIVE_* matching.
* mpn/x86/x86-defs.m4 (cmov_bytes_tttn): Use eval() on expressions.
(cmov_available_p): Switch to list CPUs which do have cmov.
* mpn/x86/p6/sqr_basecase.asm, mpn/x86/k6/sqr_basecase.asm,
mpn/x86/k7/sqr_basecase.asm: Use eval() for multiplication.
* mpn/x86/README.family: Various updates.
2000-06-09 Kevin Ryde <kevin@swox.se>
* mpbsd/tests/allfuns.c (main): Call exit() instead of doing return.
* doc/tasks.html, doc/projects.html: Moved from projects directory.
* doc/multiplication: New file.
* Makefile.am (EXTRA_DIST): Remove projects, add doc.
* Makefile.am (libgmp_la_LIBADD, libmp_la_LIBADD): Remove
unnecessary -lm.
* INSTALL: Remove -lm from instructions.
* demos/Makefile.am (qcn_LDADD): Add -lm.
* tune/*: Add measuring for mpn_divrem_2 and modlimb_invert,
improve addsub_n. Switch to unified speed_cyclecounter.
* configure.in: Update configs for speed_cyclecounter.
* gmp-impl.h (MP_LIMB_T_MAX, MP_LIMB_T_HIGHBIT): New macros.
* mpn/generic/diveby3.c, mpn/generic/mul_n.c, mpn/generic/gcd.c,
tune/speed.c, mpn/tests/ref.c: Use them.
* mpn/tests/spinner.c: Remove setitimer, just alarm is enough.
* configure.in (AC_CHECK_FUNCS): Remove setitimer.
* mpn/tests/x86call.asm: Start with junk in %eax, %ecx, %edx.
* mpn/tests/ref.[ch] (refmpn_addsub_nc): New function.
* mpn/tests/try.c: Add some support for mpn_addsub_nc.
* mpn/tests/Makefile.am (EXTRA_PROGRAMS): Remove addsub_n and
addsub_n_2 which don't currently build.
* mpn/tests/copy.c: Test MPN_COPY_INCR, not __gmpn_copy.
* tests/rand/Makefile.am (libstat_la_LIBADD): Add -lm, no longer on
libgmp.la.
(findlc_LDADD): Use libstat.la.
(AUTOMAKE_OPTIONS): Use ansi2knr.
2000-06-08 Torbjorn Granlund <tege@swox.com>
* configure.in (alpha*-*-osf*): Default `flavour' to ev6 for ev6 and
higher.
(alpha*-*-*): Likewise.
(alpha*-*-osf*: gmp_optcflags_cc): Move -arch/-tune flags from
gmp_xoptcflags_gcc.
* mpn/Makefile.am (TARG_DIST): Add pa64w.
* longlong.h: Wrap 64-bit hppa code in #ifndef LONGLONG_STANDALONE.
2000-06-07 Torbjorn Granlund <tege@swox.com>
* mpz/remove.c: Fail for `src' being zero.
* mpz/tests/reuse.c: Test more functions.
(FAIL): New define.
* mpz/tests/t-powm.c: Loop during operand generation while they
are mathematically ill-defined (used to just skip such tests).
* mpz/powm.c (mpz_redc): Clean up argument declarations.
* configure.in (gmp_cflags64_gcc): Don't add bogus -mWHAT option.
(sparcv9-*-solaris2.[7-9]], gmp_cflags64_gcc):
Inherit from previous gmp_cflags64_gcc; pass `-m64 -mptr64'.
(ia64*-*-*): New.
* mpn/generic/dump.c: Make it work when an mp_limb_t is not `long'.
* mpf/set_prc.c: MPN_COPY => MPN_COPY_INCR.
2000-06-06 Torbjorn Granlund <tege@swox.com>
* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n):
Use mpn_incr_u for final carry propagation.
* mpz/tests/t-gcd.c: Add calls to mpz_gcdext with argument t == NULL.
* mpz/tests/reuse.c: Major rewrite; test many more functions.
* mpz/powm_ui.c: When exp is 0, change res assign order in order
to handle argument overlap.
* mpz/powm.c: When exp is 0, change res assign order in order
to handle argument overlap. Handle negative exp and mod arguments.
* mpz/gcdext.c: Rework code after mpn_gcdext call to handle
argument overlap.
* mpz/fdiv_qr.c: Read dividend->_mp_size before calling mpz_tdiv_qr
in order to handle argument overlap.
* mpz/cdiv_qr.c: Likewise.
* mpf/tests/reuse.c: Fix typo that effectively disabled `dis_funcs'
tests. Clean up test for mpf_ui_div.
2000-06-06 Kevin Ryde <kevin@swox.se>
* mpn/x86/p6/sqr_basecase.asm: New file.
* mpn/x86/mod_1.asm: Avoid one conditional jump.
* mpn/x86/p6/gmp-mparam.h: Update thresholds, #ifndef UMUL_TIME
and UDIV_TIME, add COUNT_TRAILING_ZEROS_TIME.
* mp_minv_tab.c: New file.
* Makefile.am (libgmp_la_SOURCES, libmp_la_SOURCES): Add it.
* gmp-impl.h (modlimb_invert): New macro.
* mpz/powm.c: Remove mpz_dmprepare, use modlimb_invert instead.
* mpn/generic/bdivmod.c: Use modlimb_invert instead of a loop.
* mpn/generic/gcd.c: Inline two small mpn_bdivmod calls, use
MPN_COPY_INCR not MPN_COPY in one place.
2000-06-05 Torbjorn Granlund <tege@swox.com>
* mpf/tests/reuse.c (dsi_funcs): Add mpf_mul_2exp and mpf_div_2exp.
(main): Clean up test for mpf_div_ui.
* mpf/mul_2exp.c: Correct criterion for whether to use mpn_lshift or
mpn_rshift. MPN_COPY => MPN_COPY_INCR. Coerce the two assignments to
r->_mp_size.
* mpf/div_2exp.c: Use mpn_rshift instead of mpn_lshift when overlap
so requires. MPN_COPY => MPN_COPY_INCR.
* mpf/tests/t-dm2exp.c: Correct type of res_prec.
2000-06-04 Kevin Ryde <kevin@swox.se>
* mpz/bin_uiui.c: Fix result for n==0 and n==k.
* mpz/bin_ui.c: Fix result for k>n, add support for n<0.
* gmp.texi (Number Theoretic Functions): Update mpz_bin_ui to
note n<0 is supported.
* mpz/tests/t-misc.c: New file.
* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
2000-05-31 Kevin Ryde <kevin@swox.se>
* tune/speed.* (FLAG_R_OPTIONAL): New option for routines, use on
mpn_gcd_1 and mpn_mul_basecase.
* tune/README: Update.
* tune/alpha.asm: New file, by Torbjorn.
* tune/Makefile.am (EXTRA_DIST): Add it.
* configure.in (alpha*-*-*): Use it.
2000-05-31 Linus Nordberg <linus@swox.se>
* doc/configuration: New file.
2000-05-30 Torbjorn Granlund <tege@swox.com>
* mpn/generic/mul_basecase.c: Call mpn_mul_2 and mpn_addmul_2
if available. Don't include longlong.h.
* doc/isa_abi_headache: New file.
2000-05-30 Linus Nordberg <linus@swox.se>
* configure.in (NM): Use AC_PROG_NM rather than AC_CHECK_TOOL to
find `nm'. (AC_PROG_NM comes with Libtool and is needed to get
the `-B' option (BSD compatible output) included in $NM.)
(AR): Use AC_CHECK_PROG rather than AC_CHECK_TOOL to find `ar'.
(Now that NM isn't a cross compilation tool, don't give the
impression that we know how to cross compile.)
(CCAS): Remove spurious comment.
* gmp.texi (Notes for Particular Systems): Remove comment about
using GNU `nm' on AIX since system nm now works.
2000-05-29 Torbjorn Granlund <tege@swox.com>
* mpn/power/mul_1.s: Remove [PR] from first word in function
descriptor.
* mpn/power/addmul_1.s: Likewise.
* mpn/power/submul_1.s: Likewise.
2000-05-28 Kevin Ryde <kevin@swox.se>
* configure.in, tune/*: Change pentium rdtsc cycle scheme to
HAVE_SPEED_CYCLECOUNTER and SPEED_CYCLECOUNTER_OBJS.
* tune/pentium.asm: Renamed and converted from rdtsc.asm.
* tune/sparcv9.asm: New file, by Torbjorn.
* tune/sparc64.asm: New file.
* tune/tuneup.c: Put a limit on gcdext search.
* gmp.h (mp_set_memory_functions): Add extern "C".
* mp.h (__GNU_MP__): Bump to "3".
* mpz/add.c,mul.c,powm.c,sub.c,sqrtrem.c,tdiv_qr.c [BERKELEY_MP]:
Include mp.h for mpbsd compile.
* mpz/gcd.c: Ditto, and remove _mpz_realloc declaration.
* gmp.texi (Integer Functions): Flatten @subsections into @sections.
(Floating-point Functions): Ditto.
(Integer Random Numbers): Split from miscellaneous as a sep section.
(Installing GMP): Make nodes for the sections.
Add more "@cindex"s.
(Known Build Problems): Remove SunOS get_d problem, believed fixed.
(Notes for Particular Systems): Remove HPPA note since now PIC.
(References): URL for Jebelean.
2000-05-27 Torbjorn Granlund <tege@swox.com>
* mpn/pa64w: New directory, contents based on corresponding mpn/pa64
files.
* configure.in (hppa2.0w-*-*): New.
* mpz/tests/io.c (_INCLUDE_POSIX_SOURCE): Define when __hpux before
including stdio.h.
* gmp-impl.h: Always define DItype and UDItype.
2000-05-27 Kevin Ryde <kevin@swox.se>
* tune/common.c (speed_measure): Correction to array sorting,
better diagnostic when measuring fails.
* tune/time.c: Add microsecond accurate getrusage method.
* tune/time.c (speed_cpu_frequency_processor_info): New function.
* configure.in (AC_CHECK_FUNCS): Add processor_info.
2000-05-26 Linus Nordberg <linus@swox.se>
* gmp.texi (Installing GMP): Shared libraries work for AIX < 4.3
if using GNU nm.
2000-05-26 Torbjorn Granlund <tege@swox.com>
* tune/tuneup.c (SIGNED_TYPE_MAX): Shift `-1' instead of `1' to
avoid signed overflow.
* demos/pexpr.c (setup_error_handler): Don't call sigaltstack on
Unicos.
2000-05-25 Torbjorn Granlund <tege@swox.com>
* insert-dbl.c: Work around GCC 2.8 bug.
* extract-dbl.c: Likewise.
* config.sub: Allow i586, i686, i786 again.
* config.guess: Use X86CPU for lots more systems.
2000-05-25 Linus Nordberg <linus@swox.se>
* mpbsd/tests/dummy.c (main): Call exit() instead of doing return
(some old SysV machines don't get this correct, I've heard.)
2000-05-25 Kevin Ryde <kevin@swox.se>
* mpf/iset_str.c: Initialize _mp_size and _mp_exp to 0, in case no
digits in string, so it's the same as a separate init and set_str.
2000-05-24 Torbjorn Granlund <tege@swox.com>
* mpz/tests/reuse.c: Use mpz_random2 instead of mpz_random.
* mpz/divexact.c: Read pointers after reallocation.
Compare `quot' and `den' instead of `qp' and `dp' in overlap check.
Use MPN_COPY_INCR for copying from `np'.
(*-*-aix4.[3-9]*): Disable shared libs just for problematic AIX
versions.
* configure.in (*-cray-unicos*): Disable asm syntax checking; set
compiler explicitly.
* configure.in (hppa*-*-*): Remove code disabling shared libs.
2000-05-24 Linus Nordberg <linus@swox.se>
* acinclude.m4 (GMP_PROG_CC_WORKS): Don't report progress to user
when doing the AIX specific test to avoid "nested output".
2000-05-22 Kevin Ryde <kevin@swox.se>
* mp.h (_PROTO): Copy from gmp.h, use on prototypes.
Add extern "C" too.
* mpbsd/tests/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr.
* mpbsd/tests/allfuns.c: Don't execute mout, just link to it.
(main): ANSI style definition.
* gmp-impl.h (MP_BASE_AS_DOUBLE): Change the expression to
something that works on SunOS native cc. Seems to fix the
mp*_get_d problems.
* mpn/tests/ref.c (refmpn_strip_twos): Use MPN_COPY_INCR.
* mpn/tests/Makefile.am: Let .asm.o rules work with absolute $srcdir.
2000-05-21 Kevin Ryde <kevin@swox.se>
* mpn/x86/k7/sqr_basecase.asm: Replace file with K7 specific code.
* mpn/x86/k7/README: Update.
* mpn/x86/k7/gmp-mparam.h: Tune thresholds.
(COUNT_TRAILING_ZEROS_TIME): New define.
* mpn/x86/k6/gmp-mparam.h: Ditto.
* mpn/x86/pentium/mmx/popham.asm: New file (include_mpn of K6 version).
* mpn/x86/p6/diveby3.asm: New file (include_mpn of P5 version).
* mpn/x86/p6/mmx/popham.asm: New file (include_mpn of K6 version).
* mpn/x86/p6/p3mmx/popham.asm: New file (include_mpn of K7 version).
* configure.in (pentium3-*-*): Add p3mmx to $path.
* gmp.texi (Integer Arithmetic): Clarify mpz_jacobi op2; add
mpz_*_kronecker_*.
(Miscellaneous Integer Functions): Add mpz_odd_p and mpz_even_p.
(Low-level Functions): Put mpn_divmod_1 with mpn_divrem_1 and note
it's now a macro.
(References): Add Henri Cohen.
* gmp.h (mpn_addmul_1c, mpn_divrem_1c, mpn_mod_1c, mpn_mul_1c,
mpn_submul_1c): Add prototypes.
(mpz_odd_p, mpz_even_p): New macros.
* mpn/asm-defs.m4 (m4wrap_prepend): New macro.
(m4_error): Use it.
(m4_not_for_expansion): Corrections to OPERATION symbols.
More comments about variations between m4 versions.
* mpn/x86/x86-defs.m4 (PROLOGUE): Use m4wrap_prepend (fixes error
exit under BSD m4, previously m4_error printed the message but the
exit code was 0).
* gmp.h (mpn_divmod_1): Change to a macro calling mpn_divrem_1.
* mpn/generic/divrem_1.c: Move divmod_1.c code to here, make it
static and call it __gmpn_divmod_1_internal.
* mpn/generic/divmod_1.c: Remove file.
* configure.in (gmp_mpn_functions): Remove divmod_1.
* mpn/asm-defs.m4 (define_mpn): Remove divmod_1 and divmod_1c.
* compat.c (mpn_divmod_1): Add compatibility function.
* tune/*: Remove mpn_divmod_1 measuring (leave just divrem_1).
* acconfig.h (HAVE_NATIVE_mpn_*): Add some missing carry-in
variants, remove divmod_1.
* mpn/x86/diveby3.asm: Use imul, update comments.
* demos/qcn.c: New file.
* demos/Makefile.am (EXTRA_PROGRAMS): Add it.
* mpz/tests/t-jac.c: New file.
* mpz/tests/Makefile.am (check_PROGRAMS): Add it. Enable ansi2knr.
* mpz/kronsz.c: New file.
* mpz/kronuz.c: New file.
* mpz/kronzs.c: New file.
* mpz/kronzu.c: New file.
* mpz/Makefile.am (libmpz_la_SOURCES): Add them.
* Makefile.am (MPZ_OBJECTS): Add them.
* gmp-impl.h (JACOBI_*, MPN_STRIP_LOW_ZEROS_NOT_ZERO): New macros.
* gmp.h (mpz_*_kronecker_*): New defines and prototypes.
* mpn/generic/jacbase.c: New file.
* mpn/generic/mod_1_rs.c: New file.
* configure.in (gmp_mpn_functions): Add them.
* gmp.h (mpn_jacobi_base, mpn_mod_1_rshift): New defines and
prototypes.
* longlong.h (COUNT_TRAILING_ZEROS_TIME): New define.
* mpn/tests/ref.c (refmpn_mod_1_rshift): New function.
* mpn/tests/try.c: Add mpn_mod_1_rshift.
* tune/*: Add measuring for mpn_jacobi_base.
* acinclude.m4 (GMP_FINISH): Add ifdefs to allow multiple
inclusion of config.m4.
(GMP_PROG_M4): Put "good" message through to config.log.
* mpz/powm.c: Use a POWM_THRESHOLD for where redc stops.
* tune/*: Add mpz_powm measuring, and tune POWM_THRESHOLD.
* gmp-impl.h [TUNE_PROGRAM_BUILD] (POWM_THRESHOLD): Conditional
redefinition for use when tuning.
* mpz/powm_ui.c: Use DIVIDE_BY_ZERO.
* mpz/iset_str.c: Initialize _mp_size to 0, in case no digits in
string; this makes it the same as a separate init and set_str.
2000-05-20 Kevin Ryde <kevin@swox.se>
* mpn/asm-defs.m4: Note &,|,^ aren't bitwise in BSD m4 eval().
* mpn/x86/k6/sqr_basecase.asm: Use "%" not "&" in m4 eval()s.
* mpn/x86/x86-defs.m4 (Zdisp): Yet more instruction forms.
2000-05-19 Linus Nordberg <linus@swox.se>
* acinclude.m4 (GMP_CHECK_CC_64BIT): Don't use shell variable
`ac_compile' for our own compile command string since other
Autoconf macros may depend on it.
2000-05-19 Kevin Ryde <kevin@swox.se>
* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Fix
carry propagation in final coefficient additions.
2000-05-18 Linus Nordberg <linus@swox.se>
* configure.in: Set NM before looking for compiler since
GMP_CHECK_CC_64BIT needs it.
* acinclude.m4 (GMP_CHECK_CC_64BIT): Don't execute on target.
(GMP_PROG_CC_FIND): Before checking if the compiler knows how to
produce 64-bit code, verify that it works at all. The background
is that /usr/ucb/cc on Solaris 7 successfully compiles in 64-bit
mode but fails when doing final link.
(GMP_PROG_CC_WORKS): Report to user what's happening.
2000-05-17 Linus Nordberg <linus@swox.se>
* config.guess: Use X86CPU for x86 Cygwin.
2000-05-16 Kevin Ryde <kevin@swox.se>
* mpn/x86/p6/mmx/divrem_1.asm: New file.
* mpn/x86/p6/mmx/mod_1.asm: New file.
* mpn/x86/p6/README: Update.
* mpn/x86/divrem_1.asm: Update comments.
* mpn/x86/mod_1.asm: Ditto.
2000-05-14 Kevin Ryde <kevin@swox.se>
* tune/speed.h: Run gcd functions on a set of data.
* mpn/tests/try.c: New file.
* mpn/tests/try.h: New file.
* mpn/tests/spinner.c: New file.
* mpn/tests/trace.c: New file.
* mpn/tests/x86call.asm: New file.
* mpn/tests/x86check.c: New file.
* mpn/tests/ref.c (refmpn_hamdist): Allow size==0.
(refmpn_gcd): New function, and other additions supporting it.
* mpn/tests/ref.h: More prototypes.
* mpn/tests/Makefile.am: Add try program, use ansi2knr.
* mpn/x86/k7/mmx/popham.asm: New file.
* mpn/x86/k6/mmx/popham.asm: New file.
* mpn/x86/k6/sqr_basecase.asm: Unroll the addmul, for approx 1.3x
speedup above 15 limbs.
* mpn/x86/k7/README: Update.
* mpn/x86/k6/README: Update, and add notes on plain K6 and pre-CXT
K6-2 problems.
* configure.in (k6*-*-*, athlon-*-*): Add popham.
* mpn/x86/pentium/diveby3.asm: New file.
* mpn/x86/pentium/README: Update.
* gmp.texi (Installing GMP): Add note on bad OpenBSD 2.6 m4.
(Reporting Bugs): Ask for config.m4 if asm file related.
(I/O of Rationals): New section, add mpq_out_str.
(References): Add url for on-line gcc manuals.
A few node and menu updates.
* INSTALL: Better command line argument checking for test progs.
Change MP -> GMP.
* configure.in (WANT_ASSERT, USE_STACK_ALLOC, HAVE_PENTIUM_RDTSC):
Put descriptions here, not in acconfig.h.
(CALLING_CONVENTIONS_OBJS): New AC_SUBST (for mpn/tests/try).
(HAVE_CALLING_CONVENTIONS): New AC_DEFINE.
(AC_CHECK_HEADERS): Add sys/time.h.
(AC_CHECK_FUNCS): Add getpagesize, setitimer.
(KARATSUBA_SQR_THRESHOLD): Strip trailing comments from the
#define when passing through to config.m4.
* acconfig.h (PACKAGE, VERSION, WANT_ASSERT, USE_STACK_ALLOC,
HAVE_PENTIUM_RDTSC): No need for #undefs, autoheader gets them
from configure.in.
* acinclude.m4 (GMP_PROG_M4): Check for broken OpenBSD 2.6 m4
eval(), put messages into config.log.
* mpn/asm-defs.m4: Add notes and test for OpenBSD 2.6 m4.
* mpq/out_str.c: New file.
* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
* Makefile.am (MPQ_OBJECTS): Ditto.
* gmp.h (mpq_out_str): New define and prototype.
2000-05-12 Kevin Ryde <kevin@swox.se>
* configure.in (CONFIG_TOP_SRCDIR): Fix to use $srcdir not
$top_srcdir (which doesn't exist).
* acinclude.m4 (GMP_C_ANSI2KNR): Fix setting U=_.
* gmp-impl.h (mpn_com_n, MPN_LOGOPS_N_INLINE): Fix missing "do"
(not currently used, probably no ill effect anyway).
2000-05-11 Torbjorn Granlund <tege@swox.com>
* randraw.c (lc): Major overhaul (pending rewrite).
(_gmp_rand): Rewrite.
2000-05-08 Torbjorn Granlund <tege@swox.com>
* mpz/tests/convert.c: Call free via _mp_free_func.
* mpf/tests/t-conv.c: Likewise.
* memory.c: Add code enabled for DEBUG that adds special patterns
around allocated blocks.
2000-05-05 Linus Nordberg <linus@swox.se>
* gmp.texi (Miscellaneous Float Functions): Correct parameter list
for mpf_urandomb().
* configure.in: Invoke AC_REVISION.
2000-05-05 Kevin Ryde <kevin@swox.se>
* gmp.texi: Use @dircategory and @direntry.
(Installing GMP): Clarification for --target, updates on SunOS
problems.
(Integer Arithmetic): Add mpz_mul_si.
(Initializing Rationals): Add mpq_swap.
(Assigning Floats): Add mpf_swap.
(Low-level Functions): Add mpn_divexact_by3c, and details of what
the calculation actually gives.
(Low-level Functions): Note extra space needed by mpn_gcdext,
clarify the details a bit.
* compat.c: New file, entry points for upward binary compatibility.
(mpn_divexact_by3): Compatibility function.
* Makefile.am (libgmp_la_SOURCES): Add compat.c.
* mpn/tests/ref.c: Rearrange macros for ansi2knr.
(div1): Renamed from div to avoid library function.
(refmpn_divexact_by3c, refmpn_gcd_1, refmpn_popcount,
refmpn_hamdist): New functions.
* mpn/tests/ref.h: Add extern "C", add new prototypes.
* gmp.h (gmp_randinit, etc): Add extern "C".
(_mpq_cmp_ui): Fix prototype name from mpq_cmp_ui.
(mpn_divexact_by3): Now a macro calling mpn_divexact_by3c.
(mpn_divexact_by3c): New prototype and define.
* mpn/x86/diveby3.asm: Change to mpn_divexact_by3c.
* mpn/x86/k6/diveby3.asm: Ditto.
* mpn/generic/diveby3.c: Ditto.
* mpn/asm-defs.m4: Ditto on the define_mpn.
* acconfig.h (HAVE_NATIVE_mpn_divexact_by3c): New define.
* mpq/swap.c: New file, derived from mpz/swap.c.
* mpf/swap.c: Ditto.
* mpq/Makefile.am: Add swap.c.
* mpf/Makefile.am: Ditto.
* Makefile.am: Add two new "swap.lo"s.
* mpn/x86/k6/mmx/com_n.asm: Fix an addressing bug (fortunately
this code hasn't been used anywhere yet).
* mpn/x86/k7/mmx/divrem_1.asm: New file.
* mpn/x86/k7/mmx/mod_1.asm: New file.
* mpn/x86/k7/diveby3.asm: New file.
* mpn/x86/k7/README: Update.
* mpn/x86/k7/aorsmul_1.asm: Use new cmovCC, no object code change.
* mpn/x86/k7/mul_basecase.asm: Ditto.
* mpn/x86/p6/aorsmul_1.asm: Ditto.
* mpn/x86/x86-defs.m4 (defframe_empty_if_zero): Eval the argument.
(cmovCC): New macros, replacing individual cmovCC_reg_reg forms.
(Zdisp): Recognise more instructions.
(shldl,etc): Use m4_instruction_wrapper().
(ASSERT, movl_text_address): New macros.
* mpn/asm-defs.m4: Add remarks on SunOS /usr/bin/m4 and new
OpenBSD m4.
(m4_assert_numargs_internal_check): Remove a spurious parameter.
(m4_empty_if_zero): Eval the argument.
(m4_assert, m4_assert_numargs_range, m4_config_gmp_mparam,
m4_instruction_wrapper): New macros.
2000-05-04 Linus Nordberg <linus@swox.se>
* gmp.texi (Reporting Bugs): Be explicit about output from running
a command.
2000-05-02 Torbjorn Granlund <tege@swox.com>
* mpn/generic/bz_divrem_n.c (mpn_bz_divrem_n): Handle non-zero return
from first mpn_bz_div_3_halves_by_2 call.
(mpn_bz_divrem_aux): Likewise.
2000-04-30 Kevin Ryde <kevin@swox.se>
* tune/* (GCD_ACCEL_THRESHOLD, GCDEXT_THRESHOLD): Tune these.
* mpn/generic/gcdext.c (GCDEXT_THRESHOLD): Rename from THRESHOLD,
use with >=, adjust default to 17 accordingly.
Use new *_SWAP macros.
* mpn/generic/gcd.c (GCD_ACCEL_THRESHOLD): Rename from
ACCEL_THRESHOLD, use with >=, adjust default to 5 accordingly.
Use new *_SWAP macros.
* mpf/get_str.c, mpf/set_str.c, mpf/sub.c, mpz/add.c, mpz/ior.c,
mpz/and.c, mpz/sub.c, mpz/xor.c, mpz/ui_pow_ui.c,
mpn/generic/mul.c: Use new *_SWAP macros.
* stack-alloc.h: Add extern "C" around prototypes.
* gmp-impl.h: (MP_PTR_SWAP, etc): New macros.
(_mp_allocate_func, etc): Use _PROTO.
[TUNE_PROGRAM_BUILD]: More changes in tune program build part.
2000-04-28 Torbjorn Granlund <tege@swox.com>
* mpn/pa64/add_n.s: Add `,entry' to export directive.
* mpn/pa64/{addmul_1.S,lshift.s,mul_1.S,rshift.s,sub_n.s,submul_1.S,
umul_ppmm.S}: Likewise.
* mpn/hppa/hppa1_1/udiv_qrnnd.S: New name for udiv_qrnnd.s.
Add PIC support.
2000-04-29 Kevin Ryde <kevin@swox.se>
* gmp-impl.h [TUNE_PROGRAM_BUILD] (TOOM3_MUL_THRESHOLD_LIMIT): New
define.
* mpn/generic/mul_n.c [TUNE_PROGRAM_BUILD] (mpn_mul_n): Use
TOOM3_MUL_THRESHOLD_LIMIT, not a hard coded 500.
* memory.c: Use <stdlib.h> for malloc etc, and use _PROTO.
* stack-alloc.c: Don't use C++ reserved word "this".
* urandom.h: Put extern "C" around prototypes.
* mpz/powm.c: Switch a couple of parameters to "const", which they
are, to satisfy g++.
* randraw.c, stack-alloc.c, mpbsd/mout.c, mpbsd/mtox.c: Add casts to
help g++.
* stack-alloc.c: Provide dual ANSI/K&R function definitions.
* mpz/addmul_ui.c,get_d.c,inp_str.c,perfpow.c,powm.c,pprime_p.c,
rrandomb.c,set_str.c,ui_pow_ui.c: Ditto.
* mpf/integer.c,set_str.c: Ditto.
* mpbsd/min.c,xtom.c: Ditto.
* mpn/generic/bz_divrem_n.c,dump.c,gcd_1.c,get_str.c,hamdist.c,
popcount.c,random.c,random2.c,set_str.c: Ditto.
* rand.c: Use <stdio.h> for NULL.
* mpz/gcd_ui.c,gcdext.c,mul.c,perfpow.c,powm_ui.c,root.c,sqrt.c,
sqrtrem.c: Ditto
* mpf/sqrt.c,sqrt_ui.c: Ditto.
* mpn/generic/perfsqr.c,sqrtrem.c: Ditto.
* gmp-impl.h (NULL, malloc, realloc, free): Don't define/declare.
(extern "C"): Add around function prototypes.
(mpn_kara_mul_n, mpn_kara_sqr_n, mpn_toom3_mul_n, mpn_toom3_sqr_n):
Add prototypes.
[TUNE_PROGRAM_BUILD] (FIB_THRESHOLD): Add necessary redefinitions for
use by tune program.
* mpn/generic/mul_n.c: Remove mpn_toom3_mul_n prototype.
* acinclude.m4 (GMP_C_ANSI2KNR): New macro.
(GMP_CHECK_ASM_MMX, GMP_CHECK_ASM_SHLDL_CL): Fix to use
$gmp_cv_check_asm_text which is what GMP_CHECK_ASM_TEXT sets.
* configure.in (GMP_C_ANSI2KNR): Use this instead of AM_C_PROTOTYPES,
for reasons described with its definition.
* demos/Makefile.am (ansi2knr): Use $(top_builddir) nor $(top_srcdir).
* mpz/fib_ui.c (FIB_THRESHOLD): Rename from FIB_THRES, for consistency.
(FIB_THRESHOLD): Conditionalize so gmp-mparam.h can define a value.
(mpz_fib_bigcase): Use >= FIB_THRESHOLD, same as main mpz_fib_ui.
* tune/tuneup.c,Makefile.am (FIB_THRESHOLD): Tune this.
* configure.in (*-*-aix* gmp_m4postinc): Fix setting (don't overwrite
a value just stored).
2000-04-26 Kevin Ryde <kevin@swox.se>
* mpn/sparc32/udiv_fp.asm: Use mpn_udiv_qrnnd macro.
* mpn/sparc32/udiv_nfp.asm: Ditto.
* mpn/sparc32/v8/supersparc/udiv.asm: Ditto.
* mpn/sparc32/umul.asm: Name the function mpn_umul_ppmm.
* mpn/sparc32/v8/umul.asm: Ditto.
* mpn/powerpc32/umul.asm: Ditto.
* mpn/x86/syntax.h: Remove file, since now unused.
* configure.in (x86): Remove -DBROKEN_ALIGN and -DOLD_GAS
previously used by .S files.
(x86 extra_functions): Add udiv and umul.
(GMP_PROG_M4): Use this instead of AC_CHECK_PROG(M4,m4,...)
(HAVE_NATIVE_*): Loosen up the regexp to "PROLOGUE.*" so as to
accept PROLOGUE_GP on alpha.
* acconfig.h (HAVE_NATIVE_mpn_umul_ppmm, udiv_qrnnd, invert_limb):
New template defines.
* mpn/asm-defs.m4 (mpn_umul_ppmm, mpn_udiv_qrnnd): New define_mpn()s.
* longlong.h (umul_ppmm, udiv_qrnnd): Use a library version if
it's available and an asm macro isn't.
* gmp-impl.h (invert_limb): Ditto.
* gmp-impl.h (ASSERT_NOREALLOC): Not a good idea, remove it.
* acinclude.m4 (GMP_PROG_M4): New macro.
2000-04-25 Linus Nordberg <linus@swox.se>
* gmp.texi (Random State Initialization): Correct arguments to
`gmp_randinit'.
* acinclude.m4 (GMP_VERSION): Change `eval' --> `m4_eval'. Fix
from Kevin.
* aclocal.m4: Regenerate.
2000-04-25 Kevin Ryde <kevin@swox.se>
* mpn/x86/aors_n.asm: Remove parentheses around an immediate that
Solaris "as" doesn't like, change by Torbjorn.
2000-04-24 Kevin Ryde <kevin@swox.se>
* configure.in (AC_CHECK_FUNCS): Add strtoul.
* mpn/generic/mul_n.c [TUNE_PROGRAM_BUILD] (mpn_mul_n): Bigger
array for karatsuba temporary space for tune program build.
(mpn_toom3_sqr_n) Remove an unused variable.
* demos/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
Add "allprogs:" pseudo-target.
* demos/factorize.c, demos/isprime.c: Switch to ANSI functions,
rely on ansi2knr.
* gmp.texi (Getting the Latest Version of GMP): Add reference to
ftp.gnu.org mirrors list.
* INSTALL: Add arg count check to example programs.
* mpn/x86/*/*.asm: Convert to FORTRAN ... or rather to
FORTRAN-style "C" commenting to support Solaris "as".
* mpn/x86/x86-defs.m4: Ditto, and add another Zdisp insn.
* mpn/asm-defs.m4 (C): Update comments.
* mpn/x86/README.family: Add a note on commenting, remove
description of .S files.
* mpn/sparc64/addmul_1.asm, mul_1.asm, submul_1.asm: Use
include_mpn().
2000-04-23 Torbjorn Granlund <tege@swox.com>
* config.sub: Merge with FSF version of April 23.
* mpn/powerpc32: Use dnl/C instead of `#' for comments.
* config.guess: Get "model" limit between pentium 2 and pentium3 right.
Get rid of code determining `_' prefix; use double labels instead.
* config.guess: Partially merge with FSF version of April 22.
(Don't bring over NetBSD changes for now.)
2000-04-23 Kevin Ryde <kevin@swox.se>
* tune/Makefile.am, tune/README, tune/common.c, tune/rdtsc.asm,
tune/speed.c, tune/speed.h, tune/time.c, tune/tuneup.c: New files.
* tune/Makefile.in: New file, generated from Makefile.am.
* gmp-impl.h (ASSERT_NOREALLOC,TMP_ALLOC_LIMBS): New macros.
[TUNE_PROGRAM_BUILD] Further mods for tune program builds.
* mpz/Makefile.am: Add -DOPERATION_$* for new mul_siui.c.
Add rules to build mul_si and mul_ui from a common mul_siui.c.
* mpz/mul_siui.c: New file, derived from and replacing mul_ui.c.
* gmp.h (mpz_mul_si): New prototype and define.
* mpn/tests/*.c [__i386__] (CLOCK): Don't use floating point in
CLOCK because cpp can't handle floats in #if's (TIMES is derived
from CLOCK by default).
* mpn/asm-defs.m4 (include_mpn): New macro.
(m4_assert_numargs) Changes to implementation.
* mpf/Makefile.am: Add -DOPERATION_$* for new integer.c.
Remove explicit rules for floor.o etc.
* mpf/integer.c: Use OPERATION_$* for floor/ceil/trunc.
* mpn/Makefile.am: Put "tests" in SUBDIRS.
* mpn/tests/Makefile.am: New file providing rules to build test
programs, nothing done in a "make all" or "make check" though.
* mpn/tests/README: New file.
* acconfig.h (HAVE_PENTIUM_RDTSC): New define.
* configure.in (x86): Rearrange target cases.
Add mulfunc aors_n and aorsmul_1 for x86 and pentium (now all x86s).
Remove asm-syntax.h generation not needed.
Remove now unused family=x86.
(sparc) Remove unused family=sparc.
(HAVE_PENTIUM_RDTSC) New AC_DEFINE and AM_CONDITIONAL.
(AM_C_PROTOTYPES) New test, supporting ansi2knr.
(AC_CHECK_HEADERS) Add getopt.h, unistd.h and sys/sysctl.h for
tune progs.
(AC_CHECK_FUNCS) Add getopt_long, sysconf and sysctlbyname for
tune progs.
(config.m4 CONFIG_TOP_SRCDIR) Renamed from CONFIG_SRCDIR.
(config.m4 asm-defs.m4) Use CONFIG_TOP_SRCDIR and include().
(gmp_m4postinc) Use include_mpn().
(gmp_links) Omit asm-defs.m4/asm.m4 and gmp_m4postinc's.
(MULFUNC_PROLOGUE) Fix regexps so all functions get AC_DEFINE'd.
(PROLOGUE) Ditto (native copyi and copyd were unused in gmp 3).
(KARATSUBA_SQR_THRESHOLD) Copy from gmp-mparam.h into config.m4.
(AC_OUTPUT) Add tune/Makefile, mpn/tests/Makefile.
* Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
(SUBDIRS): Add tune, reorder directories.
(MPZ_OBJECTS): Add mpz/mul_si.lo.
(libmp_la_SOURCES): Use this for top-level objects, not .lo's.
* ansi2knr.c, ansi2knr.1: New files, provided by automake.
* mpn/x86/aors_n.asm: Convert add_n.S and sub_n.S to a
multi-function aors_n.asm, no object code change.
* mpn/x86/pentium/aors_n.asm: Ditto.
* mpn/x86/aorsmul_1.asm: Ditto for addmul/submul.
* mpn/x86/pentium/aorsmul_1.asm: Ditto.
* mpn/x86/{lshift,mul_1,mul_basecase,rshift}.asm: Convert from .S,
no object code change.
* mpn/x86/pentium/{lshift,mul_1,mul_basecase,rshift}.asm: Ditto.
* gmp.texi (Reporting Bugs): Itemize the list of things to include.
(Miscellaneous Float Functions): Correct typo in mpf_ceil etc
argument types.
Change @ifinfo -> @ifnottex for benefit of makeinfo --html.
Remove unnecessary @iftex's around @tex.
2000-04-22 Torbjorn Granlund <tege@swox.com>
* config.guess: Generalize x86 cpu determination code.
Now works on Solaris.
* mpz/nextprime.c: Rewrite still disabled code.
* configure.in: Specifically match freebsd[3-9].
2000-04-21 Torbjorn Granlund <tege@swox.com>
* rand.c: Call mpz_clear for otherwise leaking mpz_t.
* mpz/pprime_p.c (mpz_probab_prime_p): Merge handling of negative
n into code for handling small positive n. Merge variables m and n.
After dividing, simply call mpz_millerrabin.
(isprime): Local variables now use attribute `long'.
(mpz_millerrabin): New static function, based on code from
mpz_probab_prime_p.
(millerrabin): Now simple workhorse for mpz_millerrabin.
2000-04-19 Torbjorn Granlund <tege@swox.com>
* gmp-impl.h: Fix parenthesis error in test for __APPLE_CC__.
2000-04-18 Linus Nordberg <linus@swox.se>
* NEWS: Add info about shared libraries. Remove reference to
gmp_randinit_lc.
2000-04-17 Torbjorn Granlund <tege@swox.com>
* Version 3.0 released.
* mpn/arm/add_n.S: New version from Robert Harley.
* mpn/arm/addmul_1.S: Likewise.
* mpn/arm/mul_1.S: Likewise.
* mpn/arm/sub_n.S: Likewise.
* gmp.h (__GNU_MP_VERSION_PATCHLEVEL): Now 0.
2000-04-17 Linus Nordberg <linus@swox.se>
* configure.in (hppa2.0*-*-*): Pass `+O3' to cc/c89 in 64-bit mode
to avoid compiler bug.
(ns32k*-*-*): Fix typo in path. Change by Kevin.
(alpha*-*-osf*): New case. Pass assembly flags for architecture
to gcc.
(alpha*-*-*): Don't bother searching for cc.
* configure: Regenerate.
* Makefile.am (EXTRA_DIST): Add `macos', `.gdbinit'.
* Makefile.in: Regenerate.
* mpn/Makefile.am (EXTRA_DIST): Add `m88k', `lisp'.
* mpn/Makefile.in: Regenerate.
2000-04-16 Kevin Ryde <kevin@swox.se>
* README: Updates, and don't duplicate the example in INSTALL.
* INSTALL: Minor updates.
* gmp.texi (Installing MP): Minor edits, restore CC/CFLAGS description.
2000-04-16 Linus Nordberg <linus@swox.se>
* configure.in (*-*-cygwin*): Select BSD_SYNTAX to avoid
.type/.size in PROLOGUE for ELF_SYNTAX. Override ALIGN definition
from x86/syntax.h.
(gmp_xoptcflags_${CC}): New set of variables, indicating
``exclusive optional cflags''.
(most sparcs): Use gmp_xoptcflags instead of gmp_optcflags to
ensure that we pass CPU type to older gcc.
(CFLAGS): CFLAGS on the command line was spoiled.
* configure: Regenerate.
2000-04-16 Linus Nordberg <linus@swox.se>
* configure.in: Invoke AC_PROG_LIBTOOL directly.
* acinclude.m4 (GMP_PROG_CC_FIND): Quote source variable when
setting CC64 and CFLAGS64.
(GMP_PROG_CC_SELECT): Cache result.
(GMP_PROG_LIBTOOL): Remove.
* aclocal.m4: Regenerate.
* configure: Regenerate.
2000-04-16 Linus Nordberg <linus@swox.se>
* tests/rand/t-rand.c (main): Add non-ANSI function declaration.
Don't use `const'.
2000-04-16 Torbjorn Granlund <tege@swox.com>
* mpn/generic/dump.c: Suppress output of leadign zeros.
* mpz/inp_str.c: Fix memory leakage.
* mpz/tests/reuse.c (dss_func_division): Add a final 1.
* longlong.h (alpha count_leading_zeros): Wrap in __MPN.
* mpn/alpha/cntlz.asm: Use __gmpn prefix (by means of __MPN).
* longlong.h (__umul_ppmm, __udiv_qrnnd): Wrap in __MPN.
* mpn/alpha/udiv_qrnnd.S: Use __gmpn prefix.
* mpn/hppa/udiv_qrnnd.s: Likewise.
* mpn/hppa/hppa1_1/udiv_qrnnd.s: Likewise.
* mpn/pa64/udiv_qrnnd.c: Likewise (by means of __MPN).
* mpn/pa64/umul_ppmm.S: Likewise.
* mpn/sparc32/udiv_fp.asm: Likewise (by means of MPN).
* mpn/sparc32/udiv_nfp.asm: Likewise (by means of MPN).
* mpn/sparc32/v8/supersparc/udiv.asm: Likewise (by means of MPN).
* mpn/generic/tdiv_qr.c: Work around gcc 2.7.2.3 i386 register handling
bug.
* mpn/generic/tdiv_qr.c: Use udiv_qrnnd instead of mpn_divrem_1
when computing appropriate quotient; mpn_divrem_1 writes too
many quotient limbs.
* mpn/asm-defs.m4: invert_normalized_limb => invert_limb.
* mpn/alpha/invert_limb.asm: mpn_invert_normalized_limb =>
mpn_invert_limb.
* gmp.h: Likewise.
* gmp-impl.h (alpha specific): invert_normalized_limb => invert_limb;
wrap with __MPN.
* longlong.h (alpha udiv_qrnnd): Likewise.
2000-04-16 Kevin Ryde <kevin@swox.se>
* gmp.h (mp_set_memory_functions,mp_bits_per_limb,gmp_errno): Add
#defines so the library symbols are __gmp_*.
* errno.c: Include gmp.h.
* gmp-impl.h (_mp_allocate_func,etc): Add #defines to __gmp_*.
(__clz_tab): New #define to __MPN(clz_tab).
* stack-alloc.c (__gmp_allocate_func,etc): Change from _mp_*.
* Makefile.am (libmp_la_DEPENDENCIES): Add some mpz files needed
for new mpz_powm (pow in libmp).
(EXTRA_DIST): Add projects directory.
* mpn/*: Change __mpn to __gmpn.
* gmp.h (__MPN): Ditto.
* stack_alloc.c,stack-alloc.h: Change __tmp to __gmp_tmp.
* mpn/generic/sb_divrem_mn.c (mpn_sb_divrem_mn): Avoid gcc 2.7.2.3
i386 register handling bug (same as previously in mpn_divrem_classic).
* mpn/generic/divrem.c: Now contains mpn_divrem, which is not an
internal function, so remove warning comment.
* gmp.texi (Compatibility with Version 2.0.x): Source level only.
2000-04-16 Linus Nordberg <linus@swox.se>
* configure.in (hppa1.0*): Prefer c89 to cc.
* configure: Regenerate.
2000-04-15 Linus Nordberg <linus@swox.se>
* configure.in: If `mpn_path' is set by user on configure command
line, use that as path.
* configure: Regenerate.
2000-04-15 Linus Nordberg <linus@swox.se>
* configure.in (hppa2.0*): Use path "hppa/hppa1_1 hppa" if no
64-bit compiler was found.
* configure: Regenerate.
2000-04-15 Linus Nordberg <linus@swox.se>
* configure.in: Honor `CC' and `CFLAGS' set by user on configure
command line.
* acinclude.m4: (GMP_PROG_CC_SELECT): Set CFLAGS if not set already.
* aclocal.m4: Regenerate.
* configure: Regenerate.
2000-04-15 Linus Nordberg <linus@swox.se>
* acinclude.m4 (GMP_PROG_CC_FIND): Remove debug output. Remove
commented out code.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* configure.in: Make all `-mcpu' options to gcc optional.
* configure: Regenerate.
* tests/rand/Makefile.am: Don't do anything for target 'all'.
* tests/rand/Makefile.in: Regenerate.
2000-04-15 Kevin Ryde <kevin@swox.se>
* README: Small updates.
* NEWS: Add some things about 3.0.
* mpz/Makefile.am (EXTRA_DIST): Remove dmincl.c.
* Makefile.am: Use -version-info on libraries, not -release.
* mpz/tdiv_qr.c: Add mdiv function header #ifdef BERKELEY_MP.
* mpbsd/Makefile.am: Use mpz/tdiv_qr.c, not mdiv.c.
* Makefile.am (MPBSD_OBJECTS): Change mdiv.lo to tdiv_qr.lo.
(libmp_la_DEPENDENCIES): Add mp_clz_tab.lo.
* mpbsd/mdiv.c: Remove file.
* config/mt-linux,mt-m68k,mt-m88110,mt-ppc,mt-ppc64-aix,mt-pwr,
mt-sprc8-gcc,mt-sprc9-gcc,mt-supspc-gcc,mt-vax,mt-x86,
mpn/config/mt-pa2hpux,mt-sprc9,t-oldgas,t-ppc-aix,t-pwr-aix:
Remove configure fragments not used since change to autoconf.
* mpn/generic/bz_divrem_n.c,sb_divrem_mn.c: Add comment that
internal functions are changeable and shouldn't be used directly.
2000-04-15 Linus Nordberg <linus@swox.se>
* configure.in: Remove debug output.
* configure: Regenerate.
2000-04-15 Torbjorn Granlund <tege@swox.com>
* mpn/generic/tdiv_qr.c: Don't use alloca directly.
* mpz/tdiv_qr.c: Fix typo.
* mpz/tdiv_r.c: Fix typo.
* mpz/tdiv_q.c: Fix typo.
* configure.in: Disable -march=pentiumpro due to apparent compiler
problems.
* mpz/powm.c: Replace with new code from Paul Zimmermann.
* mpz/tdiv_q.c: Remove debug code.
* mpn/generic/divrem.c: Remove C++ style `//' commented-out code.
* mpn/generic/sb_divrem_mn.c: Likewise.
2000-04-14 Torbjorn Granlund <tege@swox.com>
* mpz/cdiv_q.c: Change temp allocation for new requirements of
mpz_tdiv_qr.
* mpz/fdiv_q.c: Likewise.
* mpn/sparc64/gmp-mparam.h: Set up parameters for TOOM3.
* mpz/dmincl.c: Delete file.
* mpz/tdiv_qr.c: Rewrite using mpn_tdiv_qr.
* mpz/tdiv_r.c: Likewise.
* mpz/tdiv_q.c: Likewise.
* mpn/generic/tdiv_qr.c: New file.
* mpn/generic/bz_divrem_n.c: New file.
* mpn/generic/sb_divrem_mn.c: New file.
* gmp-impl.h (MPZ_REALLOC): New macro.
(mpn_sb_divrem_mn): Declare.
(mpn_bz_divrem_n): Declare.
(mpn_tdiv_qr): Declare.
* configure.in (gmp_mpn_functions): Delete divrem_newt and divrem_1n;
add tdiv_qr, bz_divrem_n, and sb_divrem_mn.
* mpn/generic/divrem_newt.c: Delete file.
* mpn/generic/divrem_1n.c: Delete file.
* gmp.h (mpn_divrem_newton): Remove declaration.
(mpn_divrem_classic): Remove declaration.
* gmp.h (mpn_divrem): Remove function definition.
* mpn/generic/divrem.c: Replace mpn_divrem_classic with a
mpn_divrem wrapper.
2000-04-14 Kevin Ryde <kevin@swox.se>
* mpf/dump.c, mpz/dump.c, mpn/generic/dump.c,
mpn/generic/divrem.c, mpn/generic/divrem_1n.c,
mpn/generic/divrem_2.c, mpn/generic/divrem_newt.c,
mpn/generic/mul.c, mpn/generic/mul_basecase.c,
mpn/generic/mul_n.c, mpn/generic/sqr_basecase.c,
mpn/generic/udiv_w_sdiv.c: Add comment that internal functions are
changeable and shouldn't be used directly.
* mpq/div.c: Use DIVIDE_BY_ZERO (previously didn't get an
exception on zero divisor).
* mpf/tests/t-get_d.c, mpz/tests/reuse.c: Add K&R function
definitions.
* mpz/tests/t-2exp.c: Don't use ANSI-ism 2ul.
* gmp.texi (Installing MP): Build problem notes for GSYM_PREFIX
and ranlib on native SunOS.
Particular systems notes about AIX and HPPA shared libraries
disabled.
(MP Basics): Add that undocumented things shouldn't be used.
(Introduction to MP): Add to CPUs listed.
* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Don't depend on C
having "void".
2000-04-13 Linus Nordberg <linus@swox.se>
* mpn/pa64/udiv_qrnnd.c (__udiv_qrnnd64): Add K&R function
definition.
* configure.in: Disable shared libraries for hppa*.
(mips-sgi-irix6.*): Fix flags for 64-bit gcc.
(hppa2.0*-*-*): Prefer c89 to cc.
* configure: Regenerate.
* gmp.h (gmp_randalg_t): Remove comma after last element.
* tests/rand/t-rand.c: Add copyright notice.
2000-04-13 Kevin Ryde <kevin@swox.se>
* mpn/generic/mul_n.c, mpn/generic/gcdext.c, mpz/nextprime.c,
mpz/remove.c, mpz/root.c: Add K&R function definitions.
* mpz/rrandomb.c: Fix typo in K&R part.
* stack-alloc.c: Add K&R style function pointer declarations.
* mpz/root.c: Use SQRT_OF_NEGATIVE on even roots of negatives.
Use DIVIDE_BY_ZERO on a "zero'th" root.
* configure: Regenerate with autoconf backpatched to fix --srcdir
absolute path wildcards that bash doesn't like, change by Linus.
* gmp.texi (Integer Arithmetic): Document mpz_nextprime.
(Miscellaneous Integer Functions): Fix mpz_fits_* formatting.
(Installing MP): Comment-out CC and CFLAGS description.
2000-04-13 Linus Nordberg <linus@swox.se>
* rand.c (gmp_randinit): Don't combine va_alist with ordinary
arguments for non STDC.
2000-04-13 Torbjorn Granlund <tege@swox.com>
* mpz/nextprime.c: Use proper names of new random types and functions.
* mpz/rrandomb.c: New file.
* mpz/Makefile.am: List it.
* mpz/Makefile.in: Regenerate.
* Makefile.am: Here too.
* Makefile.in: Regenerate.
* gmp.h: Declare mpz_rrandomb.
2000-04-12 Linus Nordberg <linus@swox.se>
* Makefile.am, demos/Makefile.am, mpbsd/Makefile.am,
mpbsd/tests/Makefile.am, mpf/Makefile.am, mpf/tests/Makefile.am,
mpn/Makefile.am, mpq/Makefile.am, mpq/tests/Makefile.am,
mpz/Makefile.am, mpz/tests/Makefile.am, tests/Makefile.am,
tests/rand/Makefile.am (AUTOMAKE_OPTIONS): Add 'no-dependencies'.
* Makefile.in, demos/Makefile.in, mpbsd/Makefile.in,
mpbsd/tests/Makefile.in, mpf/Makefile.in, mpf/tests/Makefile.in,
mpn/Makefile.in, mpq/Makefile.in, mpq/tests/Makefile.in,
mpz/Makefile.in, mpz/tests/Makefile.in, tests/Makefile.in,
tests/rand/Makefile.in: Regenerate.
2000-04-12 Linus Nordberg <linus@swox.se>
* randlc.c (gmp_randinit_lc): Disable function.
* gmp.texi (Random State Initialization): Remove gmp_randinit_lc.
* acinclude.m4 (GMP_CHECK_CC_64BIT): Compiling an empty main
successfully with `-n32' will have to suffice on irix6.
* aclocal.m4: Regenerate.
* configure.in (sparc): Don't pass -D_LONG_LONG_LIMB to compiler.
(mips-sgi-irix6.*): Use compiler option `-n32' rather than `-64'
for 64-bit `cc'. Add options for gcc.
* configure: Regenerate.
* mpf/urandomb.c (mpf_urandomb): Add third parameter 'nbits'. If
'nbits' doesn't make even limbs, shift up result before
normalizing.
* gmp.h (mpf_urandomb): Add parameter to prototype.
* mpf/urandom.c: Rename file to ...
* mpf/urandomb.c: ... this.
* Makefile.am (MPF_OBJECTS): Change urandom.lo --> urandomb.lo.
* Makefile.in: Regenerate.
* mpf/Makefile.am (libmpf_la_SOURCES): Change urandom.c --> urandomb.c.
* mpf/Makefile.in: Regenerate.
* config.in: Regenerate for HAVE_DECL_OPTARG.
* randraw.c (_gmp_rand): Fix bug with _LONG_LONG_LIMB.
(lc): Change return type.
Use one temporary storage instead of two.
Handle seed of size 0.
Avoid modulus operation in some cases.
Abort if M is not a power of 2.
Fix bug with 64-bit limbs.
Fix bug with small seed, small A and large M.
* tests/rand/gen.c (main): Include gmp.h. Remove macros MIN, MAX. Add
option '-q'. Don't demand argument N. Change parameters in call
to mpf_urandomb.
* tests/rand/t-rand.c: New file for testing random number generation.
* tests/rand/Makefile.am: Run t-rand for 'make check'.
(test, bigtest): Rename to manual-test, manual-bigtest.
* tests/rand/Makefile.in: Regenerate.
2000-04-12 Kevin Ryde <kevin@swox.se>
* gmp-impl.h: Include config.h before TMP_ALLOC, so
--disable-alloca works.
* mpbsd/Makefile.am: Don't recompile top-level sources here.
* Makefile.am (libmp_la_DEPENDENCIES): Put objects here instead,
add errno.lo and stack-alloc.lo.
* mpn/asm-defs.m4: Add a test and message for the unsuitable SunOS m4.
* gmp.texi (Installing MP): Update note on SunOS m4 failure.
* acconfig.h: Add copyright notice using @TOP@.
* stack-alloc.c: Use _mp_allocate_func, not malloc.
* gmp.texi (Installing MP): Note this under --disable-alloca.
* gmp.texi (Comparison Functions): mpz_cmp_abs => mpz_cmpabs.
(Integer Arithmetic): mpz_prime_p not yet implemented, comment out.
(Float Arithmetic): mpf_pow_ui now implemented, uncomment-out.
(Miscellaneous Float Functions): Add mpf_ceil, mpf_floor, mpf_trunc.
(Low-level Functions): Add mpn_random2, with mpn_random.
* mpn/m68k/mc68020/udiv.S: Rename from udiv.s.
* mpn/m68k/mc68020/umul.S: Ditto.
* mpn/alpha/umul.asm: Rename from umul.s, remove .file and
compiler identifiers.
* mpn/powerpc32/syntax.h: Removed, no longer used.
* mpn/a29k/udiv.s: Remove .file and compiler identifiers.
* mpn/a29k/umul.s: Ditto.
* mpn/tests/ref.c: Use WANT_ASSERT.
* mpn/tests/ref.h: Use _PROTO.
* mpbsd/configure.in: Removed, no longer required.
* mpf/div.c: Use DIVIDE_BY_ZERO.
* mpf/div_ui.c: Ditto.
* mpf/ui_div.c: Ditto.
* mpq/inv.c: Ditto.
* mpf/sqrt.c: Use SQRT_OF_NEGATIVE.
* mpz/sqrt.c: Ditto.
* mpz/sqrtrem.c: Ditto.
* gmp-impl.h (GMP_ERROR,SQRT_OF_NEGATIVE): New macros.
(DIVIDE_BY_ZERO): Use GMP_ERROR.
(__mp_bases): #define to __MPN(mp_bases).
2000-04-11 Linus Nordberg <linus@swox.se>
* tests/rand/stat.c (main): Initialize `l1runs' at declaration.
2000-04-11 Kevin Ryde <kevin@swox.se>
* mpz/fib_ui.c: Add K&R function definitions.
* mpbsd/tests/Makefile.am (TESTS): Add a dummy test to avoid a
shell problem with an empty "for tst in $(TESTS) ; ...".
* mpbsd/tests/dummy.c: New file.
2000-04-10 Torbjorn Granlund <tege@swox.com>
* mpz/bin_uiui.c: Delete several unused variables.
Add copyright notice.
* mpz/bin_ui.c: Add copyright notice.
* longlong.h: Declare __count_leading_zeros for alpha.
2000-04-10 Linus Nordberg <linus@swox.se>
* rand.c (gmp_randinit): Change parameter list to (rstate, alg, ...).
* gmp.h: Change prototype accordingly.
* mpz/pprime_p.c (millerrabin): Change call accordingly.
* configure.in: Check for `optarg'.
* configure: Regenerate.
* mpn/Makefile.am: Remove incorrect comment.
* mpn/Makefile.in: Regenerate.
* gmp.h: Rename most of the random number functions, structs and
some of the struct members.
* rand.c (gmp_randinit): Likewise.
* randclr.c (gmp_randclear): Likewise.
* randlc.c (gmp_randinit_lc): Likewise.
* randlc2x.c (gmp_randinit_lc_2exp): Likewise.
* randraw.c (lc): Likewise.
(_gmp_rand_getraw): Likewise.
* randsd.c (gmp_randseed): Likewise.
* randsdui.c (gmp_randseed_ui): Likewise.
* gmp.texi: Likewise.
* gmp.texi: Use three hyphens for a dash.
(Low-level Functions): Remove documentation for gmp_rand_getraw.
(Random Number Functions): Add info on where to find documentation
on the random number functions.
* tests/rand/Makefile.am (test, bigtest): Quote argument to grep.
* tests/rand/Makefile.in: Regenerate.
* tests/rand/gen.c: Declare optarg, optind, opterr if not already
declared.
(main): Use new names for the random stuff.
(main): Don't use strtoul() if we don't have it. Use strtol()
instead, if we have it. Otherwise, use atoi().
(main): Use srandom/srandomdev for __FreeBSD__ only.
(main): Use new parameter order to gmp_randinit().
* tests/rand/stat.c: Declare optarg, optind, opterr if not already
declared.
2000-04-10 Torbjorn Granlund <tege@swox.com>
* mpz/pprime_p.c: Pass 0L for mpz_scan1. mpz_mmod => mpz_mod.
(millerrabin): Use new random interface.
(millerrabin): ... and don't forget to call gmp_randclear.
* mpz/nextprime.c: New file.
* gmp.h: Declare mpz_nextprime.
* mpz/Makefile.am: List nextprime.c.
* mpz/Makefile.in: Regenerate.
* Makefile.am: List mpz/nextprime.lo.
* Makefile.in: Regenerate.
2000-04-10 Kevin Ryde <kevin@swox.se>
* move-if-change: Removed, no longer used.
* mp{z,q,f}/tests/move-if-change: Ditto.
* Makefile.am (SUBDIRS): Add tests, demos, mpbsd.
(libmp.la): New target, conditional on WANT_MPBSD.
(libgmp_la_LIBADD): Add -lm.
(AUTOMAKE_OPTIONS): Add check-news.
(include_HEADERS): Setup to install gmp.h and possibly mp.h.
(DISTCLEANFILES): Add generated files.
(check): Remove explicit target (now uses check-recursive).
* configure.in: Use AM_CONFIG_HEADER.
Add --enable-mpbsd setting automake conditional WANT_MPBSD.
Output demos/Makefile, mpbsd/Makefile and mpbsd/tests/Makefile.
* mpz/Makefile.am: Add SUBDIRS=tests, shorten INCLUDES since now
using AM_CONFIG_HEADER.
* mpq/Makefile.am: Ditto.
* mpf/Makefile.am: Ditto, and add DISTCLEANFILES.
* mpn/Makefile.am: Shorten INCLUDES, amend some comments.
* mpz/tests/Makefile.am: Use TESTS and $(top_builddir).
* mpf/tests/Makefile.am: Ditto.
* mpq/tests/Makefile.am: Ditto.
* demos/Makefile.am: New file.
* mpbsd/Makefile.am: New file, derived from old mpbsd/Makefile.in.
* mpbsd/Makefile.in: Now generated from Makefile.am.
* mpbsd/realloc.c: Removed, use mpz/realloc.c instead.
* mpbsd/tests/Makefile.am: New file.
* mpbsd/tests/Makefile.in: New file, generated from Makefile.am.
* mpbsd/tests/allfuns.c: New file.
* gmp.texi (Top): Use @ifnottex, to help makeinfo --html.
(Installing MP): Describe --enable-mpbsd and demo programs.
* tests/rand/statlib.c: mpz_cmp_abs => mpz_cmpabs.
* tests/rand/Makefile.am (LDADD): Don't need -lm (now in libgmp.la).
(EXTRA_PROGRAMS): Not noinst_PROGRAMS.
(INCLUDES): Shorten to -I$(top_srcdir) now using AM_CONFIG_HEADER.
2000-04-09 Torbjorn Granlund <tege@swox.com>
* mpz/urandomm.c: Get type of count right.
Simplify computation of nbits.
2000-04-08 Torbjorn Granlund <tege@swox.com>
* mpz/urandomb.c: Fix reallocation condition.
Simplify size computation.
2000-04-08 Linus Nordberg <linus@swox.se>
* acinclude.m4 (GMP_CHECK_CC_64BIT): Add special handling for
HPUX.
(GMP_CHECK_ASM_W32): Ditto.
* aclocal.m4: Regenerate.
* mpn/Makefile.am: Use $(CCAS) for assembling.
(.asm.obj): Add rule.
* mpn/Makefile.in: Regenerate.
* gmp.texi (Miscellaneous Integer Functions): Fix typos.
* configure.in: Never pass `-h' to grep.
(mips-sgi-irix6.[2-9]*): Try to find 64-bit compiler.
(hppa1.0*-*-*): New flag for cc.
(hppa2.0*-*-*): Try to find 64-bit compiler. Chose path, set
CCAS.
* configure: Regenerate.
2000-04-08 Torbjorn Granlund <tege@swox.com>
* mpz/bin_ui.c: Don't depend on ANSI C features.
* mpz/bin_uiui.c: Likewise.
* Makefile.am (MPZ_OBJECTS): mpz/cmp_abs* => mpz/cmpabs*.
(MPQ_OBJECTS): Add mpq/set_d.lo.
(MPZ_OBJECTS): Add mpz/fits*.lo.
* Makefile.in: Regenerate.
* mpz/cmpabs.c: New name for mpz/cmp_abs.c.
* mpz/cmpabs_ui.c: New name for mpz/cmp_abs_ui.c.
* mpz/Makefile.am: Corresponding changes.
* mpz/Makefile.in: Regenerate.
* gmp.h: mpz_cmp_abs* => mpz_cmpabs*.
* mpz/addmul_ui.c (mpn_neg1): Don't depend on ANSI C features.
* mpz/invert.c: Use TMP_MARK since we invoke MPZ_TMP_INIT.
* gmp.h (mpq_set_d): Declare correctly.
(mpz_root): Use _PROTO.
(mpz_remove): Use _PROTO.
(mpf_pow_iu): Use _PROTO.
* mpn/asm-defs.m4 (MPN_PREFIX): Revert previous change.
* gmp.h (__MPN): Revert previous change.
* mpz/perfpow.c: De-ANSI-fy. Add copyright notice.
* mpz/set_d.c: Misc cleanups.
* mpq/set_d: New file.
* gmp.h: Declare mpq_set_d.
* mpq/Makefile.am: List set_d.c.
* mpq/Makefile.in: Regenerate.
2000-04-07 Torbjorn Granlund <tege@swox.com>
* mpz/fits_sint_p.c: New file.
* mpz/fits_slong_p.c: New file.
* mpz/fits_sshort_p.c: New file.
* mpz/fits_uint_p.c: New file.
* mpz/fits_ulong_p.c: New file.
* mpz/fits_ushort_p.c: New file.
* gmp.h: Declare mpz_fits_*.
* mpz/Makefile.am: List fits_* files.
* mpz/Makefile.in: Regenerate.
2000-04-06 Kevin Ryde <kevin@swox.se>
* gmp.texi (Installing MP): Add known build problem SunOS 4.1.4 m4
failure.
* mpn/x86/pentium/gmp-mparam.h: Tune thresholds.
* mpn/x86/p6/gmp-mparam.h: Ditto.
* mpn/x86/k6/gmp-mparam.h: Tune thresholds, add UMUL_TIME, UDIV_TIME.
* mpn/x86/k7/gmp-mparam.h: Tune thresholds, amend UMUL_TIME.
* mpn/generic/mul_n.c (mpn_kara_mul_n): Add an ASSERT.
(mpn_kara_sqr_n): Add an ASSERT, use KARATSUBA_SQR_THRESHOLD.
(mpn_toom3_sqr_n): Eliminate second evaluate3.
* gmp-impl.h (mpn_com_n,MPN_LOGOPS_N_INLINE): Don't allow size==0.
(tune_mul_threshold,tune_sqr_threshold): Conditionalize
declarations on TUNE_PROGRAM_BUILD.
* mpn/generic/sqr_basecase.c: Add an assert.
2000-04-05 Torbjorn Granlund <tege@swox.com>
* gmp.h, mpn/asm-defs.m4: List the same functions for __MPN, but
leave some commented out.
* gmp-impl.h (MPN_LOGOPS_N_INLINE): Optimize.
(mpn_com_n): Optimize.
* gmp.h (__MPN): Make it use __gmpn instead of __mpn for consistency.
* mpn/asm-defs.m4 (MPN_PREFIX): Likewise.
* gmp.h (GMP_ERROR_ALLOCATE): New errcode.
* gmp-impl.h (MPN_MUL_N_RECURSE): Delete.
(MPN_SQR_RECURSE): Delete.
* gmp-impl.h (TARGET_REGISTER_STARVED): New define.
* gmp-impl.h (mpn_kara_sqr_n): Remap with __MPN.
(mpn_toom3_sqr_n): Likewise.
(mpn_kara_mul_n): Likewise.
(mpn_toom3_mul_n): Likewise.
(mpn_reciprocal): Likewise.
* gmp-impl.h (__gmpn_mul_n): Remove declaration.
(__gmpn_sqr): Likewise.
* gmp.h (mpn_sqr_n): Declare/remap.
* mpn/generic/mul.c (mpn_sqr_n): New name for mpn_sqr.
* gmp.h (mpn_udiv_w_sdiv): Move __MPN remap from here...
* gmp-impl.h: ...to here.
2000-04-05 Linus Nordberg <linus@swox.se>
* gmp.texi (Top): Add `Random Number Functions' to menu.
(Introduction to MP): Fix typo.
(MP Basics): Create menu for all sections. Move `Random Number
Functions' to its own chapter. Add nodes for all sections.
(Function Classes): Mention random generation functions under
miscellaneous.
(Miscellaneous Integer Functions): Update mpz_urandomb,
mpz_urandomm.
(Low-level Functions): Remove mpn_rawrandom.
(Random State Initialization): Update.
* mpf/urandom.c (mpf_urandomb): Remove SIZE parameter. Normalize
result correctly.
* gmp.h (mpf_urandomb): Remove SIZE parameter.
* randraw.c (gmp_rand_getraw): Handle the case where (1) the LC
scheme doesn't generate even limbs and (2) more than one LC
invokation is necessary to produce the requested number of bits.
2000-04-05 Torbjorn Granlund <tege@swox.com>
* mpn/generic/mul_n.c (INVERSE_3): New name for THIRD, define for
any BITS_PER_MP_LIMB.
(MP_LIMB_T_MAX): New.
(mpn_divexact3_n): Remove.
(interpolate3): Use mpn_divexact_by3 instead of mpn_divexact3_n.
2000-04-05 Kevin Ryde <kevin@swox.se>
* gmp-impl.h (KARATSUBA_MUL_THRESHOLD<2): Remove cpp test.
(tune_mul_threshold,tune_sqr_threshold): Add declarations, used in
development only.
* mpn/x86/k7/sqr_basecase.asm: New file, only a copy of k6 for now.
2000-04-04 Torbjorn Granlund <tege@swox.com>
* gmp-impl.h (TOOM3_MUL_THRESHOLD): Provide default.
(TOOM3_SQR_THRESHOLD): Provide default.
* mpn/generic/mul_n.c: Rewrite (mostly by Robert Harley).
* mpn/generic/mul.c: Rewrite (mostly by Robert Harley).
* configure.in (sparcv9 64-bit OS): Set extra_functions.
2000-04-04 Linus Nordberg <linus@swox.se>
* mpn/generic/rawrandom.c: Remove file and replace with randraw.c
on top level.
(mpn_rawrandom): Rename to gmp_rand_getraw.
* randraw.c: New file; essentially a copy of
mpn/generic/rawrandom.c.
(gmp_rand_getraw): New function (formerly known as mpn_rawrandom).
* mpz/urandomb.c (mpz_urandomb): Change mpn_rawrandom -->
gmp_rand_getraw.
* mpz/urandomm.c (mpz_urandomb): Ditto.
* mpf/urandom.c (mpf_urandomb): Ditto.
* gmp.h (gmp_rand_getraw): Add function prototype.
(mpn_rawrandom): Remove function prototype.
* Makefile.am (libgmp_la_SOURCES): Add randraw.c.
* Makefile.in: Regenerate.
* configure.in (gmp_mpn_functions): Remove rawrandom.
* configure: Regenerate.
2000-04-04 Linus Nordberg <linus@swox.se>
* gmp.h (GMP_ERROR enum): Remove comma after last enumeration
since the AIX compiler (xlc) doesn't like that.
* randlc.c (gmp_rand_init_lc): Allocate enough space for seed to
hold any upcoming seed.
* randlc2x.c (gmp_rand_init_lc_2exp): Likewise.
* mpn/generic/rawrandom.c: Remove debugging code.
(mpn_lc): Don't reallocate seed.
* mpz/urandomm.c (mpz_urandomm): Implement function.
* mpz/urandomb.c (mpz_urandomb): Fix typo in function definition.
2000-04-04 Kevin Ryde <kevin@swox.se>
* make.bat: Removed (no longer works, no longer supported).
* mpn/msdos/asm-syntax.h: Removed (was used only by make.bat).
2000-04-03 Torbjorn Granlund <tege@swox.com>
* mpn/generic/brandom.c: New file, replacing random2.
2000-04-02 Torbjorn Granlund <tege@swox.com>
* mpn/sparc32/v9/submul_1.asm: Change some carry-form instructions
into their plain counterparts.
* mpn/sparc64/copyi.asm: Avoid executing ALIGN.
* mpn/sparc64/mul_1.asm: Handle overlap of rp/sp.
* mpn/sparc64/addmul_1.asm: Likewise.
* mpn/sparc64/submul_1.asm: Likewise.
2000-04-01 Linus Nordberg <linus@swox.se>
* gmp.h: Fix function prototypes for randomization functions.
(__gmp_rand_lc_scheme_struct): Replace `m' with `m2exp'. Remove
unused `bits'.
(__gmp_rand_data_lc): Add `m2exp' as another way of representing
the modulus.
(__gmp_rand_state_struct): Remove unused `size'.
* rand.c (__gmp_rand_scheme): Use better multipliers. Remove test
schemes. Replace `m' with `m2exp'.
(gmp_rand_init): Change parameters and return type. Use `m2exp'
instead of `m'. Set `gmp_errno' on error. Disable BBS algorithm.
* randlc.c (gmp_rand_init_lc): Don't use malloc(). Change
parameters.
* randclr.c (gmp_rand_clear): Don't use free(). Disable BBS
algorithm. Set `gmp_errno' on error.
* randlc2x.c (gmp_rand_init_lc_2exp): New function.
* randsd.c (gmp_rand_seed): New function.
* randsdui.c (gmp_rand_seed_ui): New function.
* randlcui.c: Remove unused file.
* mpn/generic/rawrandom.c (mpn_rawrandom): Rewrite.
(mpn_lc): New static function.
* mpz/urandomb.c (mpz_urandomb): Use ABSIZ() instead of SIZ() for
determining size of ROP.
* mpf/urandom.c (mpf_urandomb): Add third parameter, nbits. (Not
used yet!)
Change parameter order to mpn_rawrandom().
* Makefile.am (libgmp_la_SOURCES): Add errno.c, randlc2x.c,
randsd.c, randsdui.c. Remove randui.c.
(MPZ_OBJECTS): Rename urandom.lo --> urandomb.lo. Add urandomm.lo.
* Makefile.in: Regenerate.
* mpz/Makefile.am (libmpz_la_SOURCES): Change urandom.c -->
urandomb.c. Add urandomm.c.
* mpz/Makefile.in: Regenerate.
* tests/rand/Makefile.am (noinst_PROGRAMS): Change findcl --> findlc.
Add gen.static.
* tests/rand/Makefile.in: Regenerate.
* tests/rand/gen.c (main): Add mpz_urandomm. Add command line options
`-C', `-m', extend `-a'. Use *mp*_*rand*() with new parameters. Call
gmp_rand_seed().
2000-04-01 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_CHECK_ASM_DATA): Plain .data for hpux.
* configure.in (CCAS): No CFLAGS, they're added when it's used.
(CONFIG_SRCDIR): New define for config.m4.
* mpn/sparc64/addmul_1.asm: Use it for an include().
* mpn/sparc64/submul_1.asm: Ditto.
* mpn/sparc64/mul_1.asm: Ditto.
2000-03-31 Linus Nordberg <linus@swox.se>
* mpz/urandom.c: Rename to...
* mpz/urandomb.c: ...this.
* mpz/urandomb.c (mpz_urandomb): Change operand order in call to
mpn_rawrandom(). Use ABSIZ() instead of SIZ() when checking size
of ROP.
* mpz/urandomm.c: New file.
2000-03-31 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GMP_CHECK_ASM_MMX): Give a warning when mmx code
will be omitted.
2000-03-30 Torbjorn Granlund <tege@swox.com>
* mpn/sparc64/mul_1h.asm: New file.
* mpn/sparc64/addmul_1h.asm: New file.
* mpn/sparc64/submul_1h.asm: New file.
* mpn/sparc64/mul_1.asm: Rewrite.
* mpn/sparc64/addmul_1.asm: Rewrite.
* mpn/sparc64/submul_1.asm: Rewrite.
2000-03-28 Torbjorn Granlund <tege@swox.com>
* mpn/sparc32/v9/mul_1.asm: Fix typo in branch prediction.
* mpn/sparc32/v9/addmul_1.asm: Likewise.
* mpn/sparc32/v9/submul_1.asm: Likewise.
2000-03-25 Kevin Ryde <kevin@swox.se>
* mpn/lisp/gmpasm-mode.el: Fix some comment detection, use custom,
fontify more keywords, turn into a standalone mode.
* stamp-vti: New file, generated together with version.texi.
* acinclude.m4 (GMP_VERSION,GMP_HEADER_GETVAL): New macros.
* configure.in (AM_INIT_AUTOMAKE): Use GMP_VERSION.
2000-03-24 Kevin Ryde <kevin@swox.se>
* INSTALL: Updates for new configure system.
* configure.in: Add gmp_optcflags_gcc for the x86s, setting -mcpu
and -march.
2000-03-23 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c (mpz_eval_expr): Properly initialize rhs/lhs
for ROOT.
2000-03-23 Kevin Ryde <kevin@swox.se>
* config.guess (i?86:*:*:*): Use uname -m if detection program fails.
* mpn/x86/README: Remove remarks on the now implemented MMX shifts.
* mpn/x86/k6/README: Add speed of mpn_divexact_by3, update mpn_mul_1.
* gmp.texi (Installing MP): Corrections to target CPUs.
* version.c: Use VERSION from config.h, add copyright comment,
restore "const" somehow lost.
* configure.in (a29k*-*-*): Fix directory name.
2000-03-22 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c (op_t): Add ROOT.
(fns): Add ROOT.
(mpz_eval_expr): Add ROOT.
* mpz/root.c: Handle roots of negative numbers.
Fix other border cases.
Fix rare memory leakage.
* errno.c: New file.
2000-03-21 Torbjorn Granlund <tege@swox.com>
* gmp.h (error number enum): New anonymous enum.
(gmp_errno): New.
* gmp.h (__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR): Bump for GMP 3.0.
2000-03-20 Torbjorn Granlund <tege@swox.com>
* mpn/alpha/unicos.m4 (FLOAT64): New define.
* mpn/alpha/default.m4 (FLOAT64): New define.
* mpn/alpha/invert_limb.asm (C36): Use FLOAT64.
2000-03-21 Kevin Ryde <kevin@swox.se>
* mpn/x86/k6/diveby3.asm: Tiny speedup.
* acinclude.m4 (GMP_CHECK_ASM_SHLDL_CL): New macro.
* configure.in: Use it, set WANT_SHLDL_CL in config.m4.
* mpn/x86/x86-defs.m4 (shldl,shrdl,shldw,shrdw): New macros, using
WANT_SHLDL_CL.
* mpn/x86/k6/mmx/lshift.asm: Use shldl macro.
* mpn/x86/k7/mmx/lshift.asm: Ditto.
* mpn/x86/pentium/mmx/lshift.asm: Ditto.
* mpn/x86/k6/mmx/rshift.asm: Use shrdl macro.
* mpn/x86/k7/mmx/rshift.asm: Ditto.
* mpn/x86/pentium/mmx/rshift.asm: Ditto.
* mpn/x86/README.family: Add a note about this.
2000-03-20 Linus Nordberg <linus@swox.se>
* mpn/generic/rawrandom.c (mpn_rawrandom): Handle seed value of 0
correctly.
* configure.in: Fix detection of alpha flavour.
Set compiler options for `sparcv8'.
* configure: Regenerate.
* rand.c (__gmp_rand_scheme): Clean up some. Use slightly better
multipliers.
* configure.in (AC_OUTPUT): Add tests/Makefile and
tests/rand/Makefile.
* acinclude.m4 (AC_CANONICAL_BUILD): Define to
`_AC_CANONICAL_BUILD' to deal with incompabilities between
Autoconf and Libtool.
(AC_CHECK_TOOL_PREFIX): Likewise.
* Makefile.am (EXTRA_DIST): Add directory `tests'.
* mkinstalldirs: Update (Automake 2000-03-17).
* ltconfig: Update (Libtool 2000-03-17).
* ltmain.sh: Ditto.
* configure: Regenerate with new autoconf/-make/libtool suite.
* aclocal.m4: Ditto.
* config.in: Ditto.
* all Makefile.in's: Ditto.
2000-03-20 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c (main): Don't allow `-N' for base, require `-bN'.
* mpn/alpha/unicos.m4 (cvttqc): New define.
* mpn/alpha/invert_limb.asm: Use new define for cvttqc.
2000-03-19 Kevin Ryde <kevin@swox.se>
* mpn/x86/k6/sqr_basecase.asm: Tiny amendments for 3x3 case.
* gmp.texi: Use @include version.texi.
Use @email and @uref.
(Installing MP): Rewrite for new configure.
(Low-level Functions): Add mpn_divexact_by3.
* configure.in (--enable-alloca): New option.
* acconfig.h (USE_STACK_ALLOC): For --disable-alloca.
2000-03-18 Kent Boortz <kent@swox.com>
* macos: New directory with macos port files.
2000-03-17 Torbjorn Granlund <tege@swox.com>
* gmp-impl.h (union ieee_double_extract): Check _CRAYMPP.
* mpn/asm-defs.m4 (invert_normalized_limb): Define.
* mpn/alpha: Translate `.s' files to `.asm'.
* configure: Regenerate.
* mpn/alpha/invert_limb.asm: Replace dash in file name with underscore.
* configure.in: Corresponding change.
* configure.in: Assign special "path" for alphaev6.
* mpn/alpha/unicos.m4: New file.
* configure.in (alpha*-cray-unicos*): [This part of the change
commited 2000-03-13 by linus]
* mpn/alpha/default.m4: New file.
* configure.in (alpha*-*-*): Use it.
2000-03-17 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium/rshift.S: Use plain rcrl (not rcrl $1) for
shift-by-1 case, significant speedup.
* mpn/x86/pentium/README: Add shift-by-1 speed.
2000-03-16 Torbjorn Granlund <tege@swox.com>
* config.guess: Handle Cray T3D/E.
2000-03-15 Kevin Ryde <kevin@swox.se>
* mpn/generic/diveby3.c: New file.
* mpn/x86/diveby3.asm: New file.
* mpn/x86/k6/diveby3.asm: New file.
* gmp.h (mpn_divexact_by3): Prototype and define.
* mpn/asm-defs.m4: define_mpn(divexact_by3).
* configure.in (gmp_mpn_functions): Add diveby3.
* mpn/x86/pentium/sqr_basecase.asm: A few better addressing modes.
* configure.in: Add AC_C_STRINGIZE and AC_CHECK_TYPES((void)).
* gmp-impl.h (ASSERT): Use them.
* mpn/x86/k7/mmx/lshift.asm: New file.
* mpn/x86/k7/mmx/rshift.asm: Rewrite simple loop and return value
handling, add some pictures.
2000-03-14 Torbjorn Granlund <tege@swox.com>
* mpn/sparc32/v8/mul_1.asm: Make PIC actually work.
* mpn/sparc32/v8/addmul_1.asm: Likewise.
* mpn/sparc32/v8/mul_1.asm: Use m4 ifdef, not cpp #if.
* mpn/sparc32/v8/addmul_1.asm: Likewise.
* mpn/asm-defs.m4 (C): New define for comments.
* mpn/sparc32: Start comments with `C'.
* config.guess: Remove `SunOS 6' handling.
Recognize sun4m and sun4d architectures under old SunOS.
2000-03-14 Linus Nordberg <linus@swox.se>
* configure.in (gmp_srclinks): Set to list of links created by
configure.
* configure: Regenerate.
* Makefile.am (libgmp_la_LDFLAGS): Set version info.
(DISTCLEANFILES): Include @gmp_srclinks@.
* Makefile.in: Regenerate.
2000-03-13 Linus Nordberg <linus@swox.se>
* configure.in: Remove some changequote's by quoting the strings
containing `[]'.
Add support for `alpha*-cray-unicos*'.
AC_DEFINE `_LONG_LONG_LIMB' instead of passing it in CFLAGS.
Conditionalize the assembler syntax checks.
* configure: Regenerate.
* config.in: Regenerate.
* acinclude.m4 (GMP_PROG_CCAS): Remove macro.
* aclocal.m4: Regenerate.
2000-03-13 Kevin Ryde <kevin@swox.se>
* mpn/x86/p6/README: New file.
* mpn/x86/k6/mul_1.asm: Rewrite, smaller and slightly faster.
* mpn/lisp/gmpasm-mode.el: Rewrite assembler comment detection and
handling.
* configure.in: Separate mmx directories for each x86 flavour.
* configure: Regenerate.
2000-03-12 Kevin Ryde <kevin@swox.se>
* mpn/x86/x86-defs.m4 (ALIGN): Supplement definition from
config.m4 so as to pad with nops not zeros on old gas.
* mpn/x86/k7/mmx/copyd.asm: Use plain emms (femms is just an alias
for emms now).
* mpn/x86/k7/mmx/copyi.asm: Ditto.
* mpn/x86/k7/mmx/rshift.asm: Ditto.
* mpn/x86/x86-defs.m4: Amend comments.
* mpn/x86/mod_1.asm: Add comments on speeds.
* mpn/x86/pentium/mmx/lshift.asm: New file.
* mpn/x86/pentium/mmx/rshift.asm: New file.
* mpn/x86/pentium/README: Add speeds of various routines.
2000-03-10 Linus Nordberg <linus@swox.se>
* configure.in: Reorganize.
Use AC_CHECK_TOOL to find `ar'.
Add post-includes `regmap.m4' and `aix.m4' for AIX targets.
asm-syntax.h is not needed for PPC or sparc anymore.
(powerpc64-*-aix*): Compiler is always 64-bit. Use `-q64
-qtune=pwr3' to xlc and `-maix64 -mpowerpc64' to gcc. Pass `-X
64' to `ar' and `nm'.
(pentiummmx): Use GMP_CHECK_ASM_MMX and avoid MMX assembly path if
assembler is not MMX capable.
(pentium[23]): Likewise.
(athlon): Likewise.
(k6*): Likewise.
* configure: Regenerate.
* acinclude.m4 (GMP_PROG_CC_WORKS): New macro.
(GMP_PROG_CC_FIND): Use GMP_PROG_CC_WORKS instead of
AC_TRY_COMPILER. Make sure that the *first* working 32-bit
compiler is used if no 64-bit compiler is found.
(GMP_CHECK_ASM_MMX): New macro.
* aclocal.m4: Regenerate.
* Makefile.in: Regenerate. (CC_TEST removed.)
* mpf/Makefile.in: Likewise.
* mpn/Makefile.in: Likewise.
* mpq/Makefile.in: Likewise.
* mpz/Makefile.in: Likewise.
* mpf/tests/Makefile.in: Likewise.
* mpq/tests/Makefile.in: Likewise.
* mpz/tests/Makefile.in: Likewise.
* acconfig.h (_LONG_LONG_LIMB): Add.
* gmp-impl.h: Include config.h only if HAVE_CONFIG_H is defined.
2000-03-09 Kevin Ryde <kevin@swox.se>
* mpn/x86/pentium/mul_basecase.S: Small speedup by avoiding an AGI.
* mpn/x86/k7/mmx/copyd.asm: Tiny speedup by avoiding popl.
* mpn/x86/k7/mmx/copyi.asm: Ditto.
* mpn/x86/k7/mul_basecase.asm: Ditto.
2000-03-07 Torbjorn Granlund <tege@swox.com>
* config.guess: Better recognize POWER/PowerPC processor type.
2000-03-07 Kevin Ryde <kevin@swox.se>
* mpn/generic/addsub_n.c: Use HAVE_NATIVE_* now in config.h.
* mpn/asm-defs.m4: Add comments about SysV m4.
(m4_log2): Don't use <<.
(m4_lshift,m4_rshift): New macros.
2000-03-06 Torbjorn Granlund <tege@swox.com>
* mpn/powerpc32/regmap.m4: Map cr0 => `0', etc.
2000-03-06 Kevin Ryde <kevin@swox.se>
* mpn/tests/ref.c (refmpn_divexact_by3): New function.
* mpn/tests/ref.h: Prototype.
* acconfig.h (WANT_ASSERT): New define.
* configure.in (--enable-assert): Turn on WANT_ASSERT.
* assert.c: New file.
* Makefile.am: Add to build.
* gmp-impl.h (ASSERT): New macro.
(ASSERT_NOCARRY) Renamed from assert_nocarry.
(MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS.
* mpn/tests/ref.c: Use ASSERT.
* mpf/get_str.c: Use ASSERT_ALWAYS.
* mpf/set_str.c: Remove old assert macro.
* mpn/x86/x86-defs.m4 (cmovnz_ebx_ecx): New macro.
* mpn/x86/p6/aorsmul_1.asm: Use cmov.
* mpn/x86/lshift.S: Use %dl with testb, not %edx. No object code
change, testb was still getting generated.
* mpn/x86/rshift.S: Ditto.
2000-03-03 Torbjorn Granlund <tege@swox.com>
* longlong.h: Add IA-64 support.
* mpn/powerpc32: Misc cleanups.
* mpn/powerpc32/aix.m4: New file (mainly by Linus).
* mpn/powerpc64/aix.m4: New file (mainly by Linus).
* mpn/powerpc64: Translate `.S' files to `.asm'.
* configure.in: Fix tyops.
* configure: Regenerate.
2000-03-02 Torbjorn Granlund <tege@swox.com>
* mpn/powerpc32/regmap.m4: New file.
* mpn/powerpc32: Translate `.S' files to `.asm'.
* configure.in: Use mpn/powerpc32/regmap.m4 for powerpc targets
except some weird ones.
2000-03-03 Kevin Ryde <kevin@swox.se>
* mpn/lisp/gmpasm-mode.el: Suppress postscript comment prefixes in
filladapt.
* mpn/x86/pentium/sqr_basecase.asm: New file.
* mpn/x86/pentium/gmp-mparam.h (KARATSUBA_SQR_THRESHOLD): Update.
* configure.in: Add --enable-assert, enable k6 logops functions.
* mpn/x86/k6/mmx/copyi.asm: Use m4 for divide, not as.
* mpn/x86/k6/mmx/copyd.asm: Ditto.
* mpn/x86/README.family: Add a note on this.
2000-03-02 Kevin Ryde <kevin@swox.se>
* mpn/x86/k6/aors_n.asm: Don't use stosl.
* mpn/x86/copyi.asm: Use cld to clear direction flag.
* mpn/x86/divrem_1.asm: Ditto.
* mpn/x86/README.family: Add a note on this.
* mpn/x86/k6/mmx/copyi.asm: Rewrite.
* mpn/x86/k6/mmx/copyd.asm: New file.
* mpn/x86/k6/README: Update, and small amendments.
* mpn/x86/x86-defs.m4 (Zdisp): New macro.
* mpn/asm-defs.m4 (m4_stringequal_p): New macro.
* mpn/x86/p6/aorsmul_1.asm: Use Zdisp to force zero displacements.
* mpn/x86/k6/aorsmul_1.asm: Ditto.
* mpn/x86/k6/mul_1.asm: Ditto.
* mpn/x86/k6/mul_basecase.asm: Ditto.
* mpn/x86/k7/aors_n.asm: Ditto.
* mpn/x86/k7/aorsmul_1.asm: Ditto.
* mpn/x86/k7/mul_1.asm: Ditto.
* mpn/x86/k7/mul_basecase.asm: Ditto.
* mpn/x86/README.family: Add a note on this.
2000-02-27 Kevin Ryde <kevin@swox.se>
* mpn/generic/divrem.c (mpn_divrem_classic): Patch to avoid gcc
2.7.2.3 i386 register handling bug.
* mpn/x86/k6/aors_n.asm: Rewrite.
* mpn/x86/k6/mmx/lshift.asm: Rewrite.
* mpn/x86/k6/mmx/rshift.asm: Rewrite.
* mpn/x86/k6/README: Update.
* mpn/x86/k7/mmx/copyd.asm: Support size==0.
* mpn/x86/k7/mmx/copyi.asm: Ditto.
* mpn/x86/k6/mmx/copyi.asm: Ditto.
* gmp-impl.h: Comment size==0 allowed in MPN_COPY_INCR and
MPN_COPY_DECR.
* configure.in: Enable x86 copyi, copyd; add k6 com_n.
2000-02-25 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c (power): Move factorial handing code from `factor'
to `power'.
* demos/factorize.c (factor_using_pollard_rho): Move resetting of `c'
to before checking for a non-zero gcd.
2000-02-25 Kevin Ryde <kevin@swox.se>
* mpn/asm-defs.m4 (MULFUNC_PROLOGUE): New macro by Linus.
* mpn/x86/k6/aors_n.asm: Use MULFUNC_PROLOGUE.
* mpn/x86/k6/aorsmul_1.asm: Ditto.
* mpn/x86/k7/aors_n.asm: Ditto.
* mpn/x86/k7/aorsmul_1.asm: Ditto.
* mpn/x86/p6/aorsmul_1.asm: Ditto.
* mpn/tests/ref.c (refmpn_copyi,refmpn_copyd): Allow size==0.
* gmp-impl.h: Move mpn_and_n, mpn_andn_n, mpn_com_n, mpn_ior_n,
mpn_iorn_n, mpn_nand_n, mpn_nior_n, mpn_xor_n and mpn_xorn_n here
from gmp.h. Use HAVE_NATIVE_mpn_* to make these functions or
inlines.
* gmp-impl.h: Move mpn_copyd, mpn_copyi here from gmp.h.
* gmp-impl.h (MPN_COPY_INCR): Use mpn_copyi if available.
* gmp-impl.h (MPN_COPY_DECR): Use mpn_copyd if available.
* mpn/x86/k6/mmx/com_n.asm: Moved into mmx subdirectory.
* mpn/x86/k6/mmx/copyi.asm: Ditto.
* mpn/x86/k6/mmx/lshift.asm: Ditto.
* mpn/x86/k6/mmx/rshift.asm: Ditto.
* mpn/x86/k7/mmx/rshift.asm: Ditto.
* mpn/x86/k6/mmx/logops_n.asm: New file.
* configure.in (k6*-*-*): Add logops_n.asm.
* mpn/x86/k6/README: Update.
* mpn/x86/k7/mmx/copyi.asm: New file.
* mpn/x86/k7/mmx/copyd.asm: New file.
* mpn/x86/k7/README: Update.
2000-02-24 Kevin Ryde <kevin@swox.se>
* mpn/x86/x86-defs.m4 (femms): Generate emms if 3dnow not available.
* mpn/x86/x86-defs.m4 (FRAME_popl): New macro.
* Makefile.am: Add info_TEXINFOS = gmp.texi
* mpn/x86/divrem_1.asm: Moved from mpn/x86/k6, allow size==0,
conditionalize loop versus decl/jnz.
* mpn/x86/mod_1.asm: Ditto.
* mpn/x86/divmod_1.asm: Removed.
* gmp.texi (mpn_divrem_1,mpn_mod_1): Add that size==0 is allowed.
* mpn/tests/ref.c (refmpn_divrem_1c,etc): Allow size==0.
* mpn/x86/k6/aors_n.asm: Avoid gas 1.92.3 leal displacement
expression problem.
* mpn/x86/k6/aorsmul_1.asm: Ditto.
* mpn/x86/k6/mul_1.asm: Ditto.
* mpn/x86/k6/mul_basecase.asm: Ditto
* mpn/x86/k7/aors_n.asm: Ditto.
* mpn/x86/k7/aorsmul_1.asm: Ditto.
* mpn/x86/k7/mul_1.asm: Ditto.
* mpn/x86/k7/mul_basecase.asm: Ditto.
* mpn/x86/k7/rshift.asm: Ditto.
* mpn/x86/p6/aorsmul_1.asm: Ditto.
* mpn/x86/README.family: Describe problem.
2000-02-24 Linus Nordberg <linus@swox.se>
* acinclude.m4 (GMP_CHECK_ASM_LSYM_PREFIX): Add dummy symbol to
testcase to avoid nm failure. Try nm before piping to grep.
* acconfig.h: Undef HAVE_NATIVE_func for every mpn function found
in gmp.h.
* configure.in: Invoke AC_CONFIG_HEADERS.
Don't invoke AM_CONFIG_HEADER; it makes autoconf confused.
Dig out entry points declared in assembly code and AC_DEFINE proper
HAVE_NATIVE_func.
* mpn/asm-defs.m4 (MULFUNC_PROLOGUE): New macro.
* mpn/x86/p6/aorsmul_1.asm: Use MULFUNC_PROLOGUE.
* mpn/x86/k6/aors_n.asm: Likewise.
* Makefile.am (EXTRA_DIST): Add config.in; needed when we don't
use AM_CONFIG_HEADER in configure.in.
* mpn/Makefile.am (INCLUDES): Add `-I..' for config.h and
gmp-mparam.h.
* mpf/Makefile.am: Likewise.
* mpq/Makefile.am: Likewise.
* mpz/Makefile.am: Likewise.
* mpf/tests/Makefile.am (INCLUDES): Add `-I../..' for config.h and
gmp-mparam.h.
* mpq/tests/Makefile.am: Likewise.
* mpz/tests/Makefile.am: Likewise.
* configure: Regenerate.
* aclocal.m4: Regenerate.
* config.in: Regenerate.
* Makefile.in: Regenerate.
* mpf/Makefile.in: Regenerate.
* mpn/Makefile.in: Regenerate.
* mpq/Makefile.in: Regenerate.
* mpz/Makefile.in: Regenerate.
* mpf/tests/Makefile.in: Regenerate.
* mpq/tests/Makefile.in: Regenerate.
* mpz/tests/Makefile.in: Regenerate.
2000-02-23 Kevin Ryde <kevin@swox.se>
* mpn/x86/addmul_1.S: Amend comments, this code no longer used by
PentiumPro.
* mpn/x86/submul_1.S: Ditto.
* mpn/x86/k6/com_n.asm: Rewrite, smaller but same speed.
* mpn/x86/addmul_1.S: Add PROLOGUE and EPILOGUE to get .type and
.size for ELF. Rename #define size to n to avoid .size.
* mpn/x86/lshift.S: Ditto.
* mpn/x86/mul_1.S: Ditto.
* mpn/x86/mul_basecase.S: Ditto.
* mpn/x86/rshift.S: Ditto.
* mpn/x86/submul_1.S: Ditto.
* mpn/x86/udiv.S: Ditto.
* mpn/x86/umul.S: Ditto.
* mpn/x86/pentium/add_n.S: Ditto.
* mpn/x86/pentium/addmul_1.S: Ditto.
* mpn/x86/pentium/lshift.S: Ditto.
* mpn/x86/pentium/mul_1.S: Ditto.
* mpn/x86/pentium/mul_basecase.S: Ditto.
* mpn/x86/pentium/rshift.S: Ditto.
* mpn/x86/pentium/sub_n.S: Ditto.
* mpn/x86/pentium/submul_1.S: Ditto.
2000-02-22 Linus Nordberg <linus@swox.se>
* acinclude.m4 (GMP_INIT): Use temporary file cnfm4p.tmp for
post-defines.
(GMP_FINISH): Ditto.
(GMP_DEFINE): Add third optional argument specifying location in
outfile.
(GMP_DEFINE_RAW): New macro.
* aclocal.m4: Regenerate.
* configure.in: Add `HAVE_TARGET_CPU_$target_cpu' using
GMP_DEFINE_RAW.
* configure: Regenerate.
* mpz/tests/Makefile.am: New test t-root.
* mpz/tests/Makefile.in: Regenerate.
2000-02-22 Torbjorn Granlund <tege@swox.com>
* mpz/root.c: Complete rewrite; still primitive, but at least correct.
* mpz/tests/t-root.c: New test.
2000-02-22 Kevin Ryde <kevin@swox.se>
* mpn/x86/k7/mul_basecase.asm: New file.
* mpn/x86/k7/README: Add mpn_mul_basecase speed.
* mpn/x86/k7/gmp-mparam.h: New file.
* mpn/x86/x86-defs.m4 (loop_or_decljnz,cmov_bytes): New macros.
* mpn/asm-defs.m4 (m4_ifdef_anyof_p): New macro.
* mpn/x86/k6/aorsmul_1.asm: New file.
* mpn/x86/k6/addmul_1.S: Removed (was a copy of pentium version).
* mpn/x86/k6/submul_1.S: Removed (was a copy of pentium version).
* mpn/x86/p6/aorsmul_1.asm: Use OPERATION_addmul_1 and
OPERATION_submul_1.
* mpn/x86/k6/aors_n.asm: Use OPERATION_add_n and OPERATION_sub_n.
* configure.in: Declare multi-function files for k6 and p6.
* configure.in: Add HAVE_TARGET_CPU_$target_cpu for config.m4.
* mpn/asm-defs.m4 (define_not_for_expansion): New macro.
* mpn/generic/divrem_1n.c (__gmpn_divrem_1n): New file, split from
mpn/generic/divrem_1.c.
* mpn/generic/divrem_1.c: Ditto.
* configure.in (gmp_mpn_functions): Ditto.
2000-02-21 Torbjorn Granlund <tege@swox.com>
* gmp.h: Undo 1996-10-06 NeXT change, it was clearly improperly
written.
2000-02-21 Linus Nordberg <linus@swox.se>
* configure.in: Link <src>/mpn/asm-defs.m4 to <build>mpn/asm.m4.
* configure: Regenerate.
2000-02-21 Linus Nordberg <linus@swox.se>
* mpn/x86/k7/aorsmul_1.asm: Change OPERATION_ADDMUL -->
OPERATION_addmul_1. Change OPERATION_SUBMUL -->
OPERATION_submul_1.
* mpn/x86/k7/aors_n.asm: Change OPERATION_ADD --> OPERATION_add_n.
Change OPERATION_SUB --> OPERATION_sub_n.
* mpn/Makefile.am: Pass -DOPERATION_$* to preprocessors.
* mpn/Makefile.in: Regenerate.
* configure.in: Symlink mpn/asm-defs.m4 to build-dir/mpn. Link
multi-function files to mpn/<function>.asm and remove function
name from `gmp_mpn_functions'.
* configure: Regenerate.
* acinclude.m4 (GMP_FINISH): Tell user what we're doing.
* aclocal.m4: Regenerate.
2000-02-21 Kevin Ryde <kevin@swox.se>
* gmp-impl.h: Rename __gmpn_mul_basecase to mpn_mul_basecase and
__gmpn_sqr_basecase to mpn_sqr_basecase, remove __gmpn prototypes.
* mpn/x86/mul_basecase.S: Ditto.
* mpn/x86/pentium/mul_basecase.S: Ditto.
* configure.in (gmp_m4postinc): Use x86-defs.m4 on athlon-*-* too.
2000-02-20 Kevin Ryde <kevin@swox.se>
* acinclude.m4 (GSYM_PREFIX): Drop $1, change by Linus.
* mpn/asm-defs.m4 (PROLOGUE,EPILOGUE): Use GSYM_PREFIX as a
string, change by Linus.
* mpn/x86/x86-defs.m4: Use GSYM_PREFIX as a string.
* mpn/x86/k6/gmp-mparam.h: New file.
* mpn/asm-defs.m4 (m4_warning): New macro.
* mpn/x86/README: Amendments per new code and directories.
* mpn/x86/README.family: New file.
* mpn/x86/k6/README: New file.
* mpn/x86/k7/README: New file.
* mpn/generic/mul_n.c: Rename __gmpn_mul_basecase to
mpn_mul_basecase and __gmpn_sqr_basecase to mpn_sqr_basecase.
* mpn/generic/mul_basecase.c: Ditto.
* mpn/generic/sqr_basecase.c: Ditto.
* mpn/generic/mul.c: Ditto.
2000-02-19 Linus Nordberg <linus@swox.se>
* configure.in: Don't try to symlink more than one multi-func
file.
* configure: Regenerate.
2000-02-18 Linus Nordberg <linus@swox.se>
* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): GMP_DEFINE
`GSYM_PREFIX'. Run ACTIONs even when value is found in cache.
(GMP_CHECK_ASM_ALIGN_LOG): GMP_DEFINE `ALIGN'. Run ACTIONs even
when value is found in cache.
* aclocal.m4: Regenerate.
* configure.in: Don't define GSYM_PREFIX or ALIGN.
Add mechanism for multi-function files.
* configure: Regenerate.
2000-02-18 Kevin Ryde <kevin@swox.se>
* configure.in (gmp_m4postinc): Enable x86-defs.m4.
* mpn/x86/k7/mul_1.asm: Fix include.
* mpn/x86/k6/mul_basecase.S: Removed (copy of the pentium version).
* mpn/x86/k6/mul_basecase.asm: New file.
* mpn/x86/k6/sqr_basecase.asm: New file.
* mpn/x86/k6/com_n.asm: New file.
* mpn/x86/k6/copyi.asm: New file.
* gmp.texi (Low-level Functions): Clarify mpn overlaps permitted.
* gmp-impl.h (MPN_OVERLAP_P): New macro.
* gmp-impl.h (assert_nocarry): New macro.
* mpn/tests/ref.c: New file, based in part on other mpn/tests/*.c.
* mpn/tests/ref.h: New file.
2000-02-17 Linus Nordberg <linus@swox.se>
* Makefile.am (dist-hook): Don't include any emacs backup files
(*.~*) in dist.
* Makefile.in: Regenerate.
2000-02-17 Torbjorn Granlund <tege@swox.com>
* mpn/sparc32/v9/mul_1.asm: Use `rd' to get current PC; get rid of
getpc function.
* mpn/sparc32/v9/addmul_1.asm: Likewise.
* mpn/sparc32/v9/submul_1.asm: Likewise.
2000-02-17 Kevin Ryde <kevin@swox.se>
* gmp.h: Add prototypes and defines for mpn_and_n, mpn_andn_n,
mpn_com_n, mpn_copyd, mpn_copyi, mpn_ior_n, mpn_iorn_n,
mpn_mul_basecase, mpn_nand_n, mpn_nior_n, mpn_sqr_basecase,
mpn_xor_n, mpn_xorn_n.
* mpn/asm-defs.m4: Many additions making up initial version.
* mpn/asm-defs.m4 (L): Use defn(`LSYM_PREFIX').
* mpn/x86/x86-defs.m4: New file.
* mpn/x86/k6/aors_n.asm: New file.
* mpn/x86/k6/divmod_1.asm: New file.
* mpn/x86/k6/divrem_1.asm: New file.
* mpn/x86/k6/lshift.S: Removed (was a copy of the pentium version).
* mpn/x86/k6/lshift.asm: New file.
* mpn/x86/k6/mod_1.asm: New file.
* mpn/x86/k6/mul_1.S: Removed (was a copy of the pentium version).
* mpn/x86/k6/mul_1.asm: New file.
* mpn/x86/k6/rshift.S: Removed (was a copy of the pentium version).
* mpn/x86/k6/rshift.asm: New file.
* mpn/x86/k7/aors_n.asm: New file.
* mpn/x86/k7/aorsmul_1.asm: New file.
* mpn/x86/k7/mul_1.asm: New file.
* mpn/x86/k7/rshift.asm: New file.
* mpn/x86/p6/aorsmul_1.asm: New file.
* mpn/x86/copyi.asm: New file.
* mpn/x86/copyd.asm: New file.
* mpn/lisp/gmpasm-mode.el: New file.
2000-02-16 Torbjorn Granlund <tege@swox.com>
* mpn/sparc32/v9/mul_1.asm: Conditionalize for PIC.
* mpn/sparc32/v9/addmul_1.asm: Likewise.
* mpn/sparc32/v9/submul_1.asm: Likewise.
* mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
* mpn/sparc32/udiv_fp.asm: Likewise.
2000-02-16 Linus Nordberg <linus@swox.se>
* configure.in: Add mechanism for including target specific
m4-files in config.m4.
* configure: Regenerate.
* acinclude.m4 (GMP_PROG_CCAS): Begin assembly lines (except
labels) with a tab character. HP-UX demands it.
(GMP_CHECK_ASM_SIZE): Ditto.
(GMP_CHECK_ASM_LSYM_PREFIX): Ditto.
(GMP_CHECK_ASM_LABEL_SUFFIX): Set to empty string for HP-UX.
(GMP_CHECK_ASM_GLOBL): Change `.xport' --> `.export'.
* aclocal.m4: Regenerate.
2000-02-16 Linus Nordberg <linus@swox.se>
* acinclude.m4 (GMP_CHECK_ASM_LSYM_PREFIX): Define LSYM_PREFIX as
the prefix only, no argument.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* mpn/asm-defs.m4 (L): No argument to LSYM_PREFIX.
2000-02-15 Linus Nordberg <linus@swox.se>
* acinclude.m4: Prefix all temporary shell variables with
`gmp_tmp_'.
(GMP_PROG_CC_FIND): Use defaults if no arguments are passed.
Quote use of arguments.
(GMP_PROG_CCAS): New macro.
(GMP_INIT): New macro.
(GMP_FINISH): New macro.
(GMP_INCLUDE): New macro.
(GMP_SINCLUDE): New macro.
(GMP_DEFINE): New macro.
(GMP_CHECK_ASM_LABEL_SUFFIX): New macro.
(GMP_CHECK_ASM_TEXT): New macro.
(GMP_CHECK_ASM_DATA): New macro.
(GMP_CHECK_ASM_GLOBL): New macro.
(GMP_CHECK_ASM_TYPE): New macro.
(GMP_CHECK_ASM_SIZE): New macro.
(GMP_CHECK_ASM_LSYM_PREFIX): New macro.
(GMP_CHECK_ASM_W32): New macro.
* aclocal.m4: Regenerate.
* configure.in: Find m4 and nm for target.
Use new macros to create config.m4.
Prefix all temporary shell variables with `tmp_'.
Pass `-X 64' to nm for 64-bit PPC target with 64-bit compiler.
* configure: Regenerate.
* Makefile.am (dist-hook): *Really* remove all CVS dirs in
dist.
* Makefile.in: Regenerate.
* mpn/Makefile.am: Add target for building .lo and .o from
.asm.
Pass -DPIC to preprocessor (CPP/m4) when building .lo.
Build .o a second time for target .lo, without -DPIC to
preprocessor.
(SUFFIX): Add `.asm'.
(EXTRA_DIST): Add asm-defs.m4.
* mpn/Makefile.in: Regenerate.
* mpf/Makefile.in: Regenerate.
* mpf/tests/Makefile.in: Regenerate.
* mpq/Makefile.in: Regenerate.
* mpq/tests/Makefile.in: Regenerate.
* mpz/Makefile.in: Regenerate.
* mpz/tests/Makefile.in: Regenerate.
2000-02-15 Torbjorn Granlund <tege@swox.com>
* mpn/sparc32/udiv_fp.asm: Change `RODATA' to `DATA'.
* mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
* mpn/sparc32/v9/addmul_1.asm: Likewise.
* mpn/sparc32/v9/submul_1.asm: Likewise.
* mpn/sparc32/v9/mul_1.asm: Likewise.
* mpn/sparc32/add_n.asm: Rename `size' -> `n'.
* mpn/sparc32/sub_n.asm: Likewise.
* sparc32: Rename `.s' and `.S' files to `.asm'.
* sparc64: Rename `.s' and `.S' files to `.asm'.
2000-02-11 Torbjorn Granlund <tege@swox.com>
* config.sub: Adopt to new config.guess sparc naming conventions.
* config.guess (sun4u:SunOS:5.*:*): Change `sparc9' to `sparcv9'.
* config.guess (sun4m:SunOS:5.*:*): Change to sun4[md]:SunOS:5.*:* and
change `sparc8' to `sparcv8'.
* mpn/x86/add_n.S: Use PROLOGUE/EPILOGUE.
* mpn/x86/sub_n.S: Likewise.
* mpn/x86/syntax.h (PROLOGUE): New name for PROLOG.
* mpn/x86/syntax.h (EPILOGUE): New name for EPILOG.
2000-02-11 Linus Nordberg <linus@swox.se>
* configure.in: Better path for 64-bit sparc without 64-bit cc.
Change sparc8 --> sparcv8.
Change sparc9 --> sparcv9.
* configure: Regenerate.
2000-02-10 Linus Nordberg <linus@swox.se>
* configure.in: Use Autoconf.
* Makefile.am: New file.
* AUTHORS: New file.
* COPYING: New file.
* acinclude.m4: New file.
* acconfig.h: New file.
* configure: Generate.
* Makefile.in: Generate.
* aclocal.m4: Generate.
* config.in: Generate.
* install.sh: Remove.
* install-sh: New file from Automake.
* missing: New file from Automake.
* ltconfig: New file from Libtool.
* ltmain.sh: New file from Libtool.
* mpf/Makefile.am: New file.
* mpf/Makefile.in: Generate.
* mpf/configure.in: Remove.
* mpf/tests/Makefile.am: New file.
* mpf/tests/Makefile.in: Generate.
* mpf/tests/configure.in: Remove.
* mpn/Makefile.am: New file.
* mpn/Makefile.in: Generate.
* mpn/configure.in: Remove.
* mpq/Makefile.am: New file.
* mpq/Makefile.in: Generate.
* mpq/configure.in: Remove.
* mpq/tests/Makefile.am: New file.
* mpq/tests/Makefile.in: Generate.
* mpq/tests/configure.in: Remove.
* mpz/Makefile.am: New file.
* mpz/Makefile.in: Generate.
* mpz/configure.in: Remove.
* mpz/tests/Makefile.am: New file.
* mpz/tests/Makefile.in: Generate.
* mpz/tests/configure.in: Remove.
2000-02-10 Torbjorn Granlund <tege@swox.com>
* mpn/x86/add_n.S: Don't use label L0 twice.
* mpn/x86/sub_n.S: Likewise.
2000-01-20 Linus Nordberg <linus@swox.se>
* demos/pexpr.c: Don't use setup_error_handler() in windoze.
2000-01-19 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c (sigaltstack): #define to sigstack for AIX.
(setup_error_handler): Don't write to ss_size and ss_flags
on AIX.
2000-01-11 Torbjorn Granlund <tege@swox.com>
* mpn/configure.in (hppa2.0*-*-*): Move assignment of
target_makefile_frag to where it belongs.
1999-12-21 Torbjorn Granlund <tege@swox.com>
* longlong.h (v9 umul_ppmm): New #define.
(v9 udiv_qrnnd): New #define.
1999-12-14 Torbjorn Granlund <tege@swox.com>
* mpn/generic/divmod_1.c: Use invert_limb.
* mpn/generic/mod_1.c: Use invert_limb.
* gmp-impl.h (invert_limb): Put definition here.
* mpn/generic/divrem.c (invert_limb): Delete definition.
* mpn/generic/divrem_2.c (invert_limb): Delete definition.
* gmp.h (mpn_divrem): Inhibit for non-gcc.
But declare (undo 1999-11-22 change).
* gmp-impl.h (DItype,UDItype): Do these also if _LONG_LONG_LIMB.
* longlong.h: Move 64-bit hppa code out of __GNUC__ conditional.
* stack-alloc.c (HSIZ): New #define.
(__tmp_alloc): Use HSIZ instead of sizeof(tmp_stack).
1999-12-10 Torbjorn Granlund <tege@swox.com>
* config.sub: Clean up handling of x86 CPUs: Properly recognize
Amd CPUs as unique entities. Use manufacturer's names of
processors ("pentium", etc); still match ambiguous names like
"i586", "i686", "p6" but be conservative in interpreting them.
* configure.in: Recognize x86 CPU types known by config.guess.
* mpn/configure.in: Likewise. Add x86/mmx path component as
appropriate.
(athlon-*-*): Fix typo.
* config.guess: Update x86 recog code to intiallly match
more than just i386.
Call K6-2 and K6-III for "k62" and "k63" respectively.
* config.guess: Recognize x86 CPU types.
Update code for FreeBSD, NetBSD, OpenBSD, Linux.
1999-12-08 Torbjorn Granlund <tege@swox.com>
* mpf/pow_ui.c: Avoid final squaring in loop.
1999-12-07 Torbjorn Granlund <tege@swox.com>
* gmp-impl.h (udiv_qrnnd_preinv2gen): Prefix local variables with `_'.
(udiv_qrnnd_preinv2norm): Likewise.
From Kevin Ryde:
(HAVE_ALLOCA): #define also if defined (alloca).
1999-12-04 Torbjorn Granlund <tege@swox.com>
* mpn/tests/add_n.c: Set OPS from CLOCK.
* mpn/tests/sub_n.c: Likewise.
* mpn/tests/mul_1.c: Likewise.
* mpn/tests/addmul_1.c: Likewise.
* mpn/tests/submul_1.c: Likewise.
* mpn/tests/lshift.c: Update from add_n.c.
* mpn/tests/rshift.c: Likewise.
1999-12-03 Torbjorn Granlund <tege@swox.com>
* mpn/powerpc64/copy.S: New file.
1999-12-02 Torbjorn Granlund <tege@swox.com>
* mpn/sparc64/copy.s: New file.
* mpn/tests/copy.c: New file.
* mpn/configure.in: Recognize more Amd CPUs; Set special paths for
k7 CPU.
* configure.in: Recognize Amd x86 CPUs.
* mpz/fdiv_r_2exp.c: In rounding code, read in->_mp_size before
writing to res->_mp_size.
* mpn/powerpc64/*.S: Clean up assembly syntax, add function headers.
* mpn/powerpc64/gmp-mparam.h: (KARATSUBA_MUL_THRESHOLD): #define.
(KARATSUBA_SQR_THRESHOLD): #define.
* mpn/tests/add_n.c (main): Only print test number if TIMES==1
and not printing.
(main): Don't run reference code if NOCHECK.
* mpn/tests/sub_n.c: Likewise.
* mpn/tests/mul_1.c: Likewise.
* mpn/tests/addmul_1.c: Likewise.
* mpn/tests/submul_1.c: Likewise.
* mpn/tests/lshift.c: (main): Only print test number if TIMES==1
and not printing.
* mpn/tests/rshift.c: Likewise.
1999-11-22 Torbjorn Granlund <tege@swox.com>
* gmp.h (mpz_init_set_str): Declare using __gmp_const.
(mpz_set_str): Likewise.
(mpf_init_set_str): Likewise.
(mpf_set_str): Likewise.
(mpn_set_str): Likewise.
(__gmp_0): Likewise.
(mpn_divrem): Remove separate declaration; it's defined later in
this file.
* gmp.h: Replace "defined (__STD__)' by (__STDC__-0) in
expressions involving more than one term, to handle Sun's compiler
that most helpfully sets __STDC__ to 0.
* gmp-impl.h: Likewise.
* longlong.h: Likewise.
1999-11-21 Torbjorn Granlund <tege@swox.com>
* mpn/sparc64/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
(KARATSUBA_SQR_THRESHOLD): #define.
* mpn/sparc64/lshift.s: Compensate stack references for odd stack ptr.
* mpn/sparc64/rshift.s: Likewise.
* mpn/sparc64/addmul_1.s: Propagate carry properly.
* mpn/sparc64/submul_1.s: Likewise.
* mpn/sparc64/sub_n.s: Rewrite.
* mpn/sparc64/sub_n.s: Get operand order for main subcc right
(before scrapping this code for new code).
1999-11-20 Torbjorn Granlund <tege@swox.com>
* mpn/sparc64/add_n.s: Rewrite.
1999-11-17 Torbjorn Granlund <tege@swox.com>
* mpn/x86/syntax.h (PROLOG): New #define.
(EPILOG): New #define.
* gmp.h (mpn_addsub_n): Declare.
* gmp.h (mpn_add_nc): Declare.
* gmp.h (mpn_sub_nc): Declare.
* mpn/powerpc64/addsub_n.S: New file.
1999-11-17 Torbjorn Granlund <tege@swox.com>
* mpn/alpha/gmp-mparam.h
(KARATSUBA_MUL_THRESHOLD): Only #define #ifndef.
(KARATSUBA_SQR_THRESHOLD): Likewise.
1999-11-14 Torbjorn Granlund <tege@swox.com>
* mpn/x86/mul_1.S: Unroll and optimize for P6 and K7.
1999-11-09 Torbjorn Granlund <tege@swox.com>
* mpn/x86/p6/gmp-mparam.h
(KARATSUBA_MUL_THRESHOLD): Only #define #ifndef.
(KARATSUBA_SQR_THRESHOLD): Likewise.
1999-11-05 Torbjorn Granlund <tege@swox.com>
* mpn/generic/addsub_n.c: New file.
1999-11-02 Torbjorn Granlund <tege@swox.com>
* config.guess: Handle alpha:FreeBSD with alpha:NetBSD.
* configure.in (vax*-*-*): New case.
* config/mt-vax: New file.
* mpn/vax/add_n.s: Rewrite.
* mpn/vax/sub_n.s: Rewrite.
1999-10-31 Torbjorn Granlund <tege@swox.com>
* mpn/vax/rshift.s: New file.
* mpn/vax/lshift.s: New file.
1999-10-29 Torbjorn Granlund <tege@swox.com>
* config.sub: Handle k5 and k6.
* mpn/configure.in: Recognize k6.
* mpf/tests/t-get_d.c (LOW_BOUND, HIGH_BOUND): New #defines.
(main): Tighten error bounds to 14 digits.
* longlong.h (default umul_ppmm, when smul_ppmm exists):
Rename __m0 => __xm0, __m1 => __xm1.
(default smul_ppmm): Likewise.
1999-10-11 Torbjorn Granlund <tege@swox.com>
* config.guess: Reverse the test for POWER vs PowerPC.
* config.guess (sun4m:SunOS:5.*:*): New case.
* config.guess (sun4u:SunOS:5.*:*): New case.
1999-09-29 Torbjorn Granlund <tege@swox.com>
* mpn/generic/divrem_2.c: Clean up comments.
1999-09-23 Torbjorn Granlund <tege@swox.com>
* mpz/tests/Makefile.in: Use move-if-change when generating binaries.
* mpf/tests/Makefile.in: Likewise.
* mpq/tests/Makefile.in: Likewise.
* mpz/tests/move-if-change: New file.
* mpf/tests/move-if-change: New file.
* mpq/tests/move-if-change: New file.
* gmp.h (mpn_incr_u): New macro (from mpn/generic/mul_n.c).
(mpn_decr_u): New macro.
* mpn/generic/mul_n.c (mpn_incr): Delete.
* mpn/generic/mul_n.c: Update usages mpn_incr => mpn_incr_u.
* mpn/generic/divrem_newt.c: Use mpn_incr_u and mpn_decr_u instead of
mpn_add_1 and mpn_sub_1.
* mpn/generic/sqrtrem.c: Likewise.
* mpz/cdiv_q_ui.c: Likewise.
* mpz/cdiv_qr_ui.c: Likewise.
* mpz/fdiv_q_ui.c: Likewise.
* mpz/fdiv_qr_ui.c: Likewise.
* mpn/generic/sqrtrem.c: Start single-limb Newton iteration from 18
bits.
1999-07-27 Torbjorn Granlund <tege@swox.com>
* mpn/generic/divrem_1.c (__gmpn_divrem_1n): New function.
* mpn/generic/divrem_2.c: New file, code from divrem.c, `case 2:'.
* mpn/Makefile.in: Compile divrem_2.c.
* make.bat: Compile divrem_2.c.
* mpn/configure.in (functions): Add divrem_2.
* gmp.h: Declare mpn_divrem_2.
* mpn/generic/divrem.c: Delete special cases, handle just divisors
of more than 2 limbs.
* gmp.h (mpn_divrem): Call mpn_divrem_1, mpn_divrem_2, as appropriate.
* mpn/generic/divrem.c: Rework variable usage for better register
allocation.
1999-07-26 Torbjorn Granlund <tege@swox.com>
* mpn/alpha/ev5/add_n.s: Rewrite for better ev6 speed.
* mpn/alpha/ev5/sub_n.s: Likewise.
1999-07-21 Torbjorn Granlund <tege@swox.com>
* longlong.h (alpha): Define umul_ppmm for cc.
* gmp-impl.h (DItype, UDItype): Define for non-gcc if _LONGLONG is
defined.
1999-07-15 Torbjorn Granlund <tege@swox.com>
* longlong.h (powerpc64 count_leading_zeros): Fix typo.
(powerpc64 add_ssaaaa): Fix typos.
(powerpc64 sub_ddmmss): Fix typos.
1999-07-14 Torbjorn Granlund <tege@swox.com>
* mpz/tests/Makefile.in: Pass XCFLAGS when linking.
* mpf/tests/Makefile.in: Likewise.
* mpq/tests/Makefile.in: Likewise.
* mpn/Makefile.in (.S.o): Pass XCFLAGS.
* longlong.h: Add support for 64-bit PowerPC.
* config.sub: Handle "powerpc64".
* configure.in: Likewise.
* mpn/configure.in: Suppress use of config/t-ppc-aix for now,
it seems compiler passes proper options.
* mpn/powerpc64/*.S: New files.
* Makefile.in (FLAGS_TO_PASS): Pass "AR=$(AR)".
1999-07-07 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c (factor): Change alloca call to a malloc/free pair.
* mpn/powerpc32/syntax.h: Add #define's for crN.
* gmp.h (gmp_rand_algorithm): Remove spurious `,'.
1999-07-05 Torbjorn Granlund <tege@swox.com>
* mpn/generic/divrem_1.c: Normalize divisor when needed.
1999-07-02 Torbjorn Granlund <tege@swox.com>
* mpn/configure.in (powerpc*-apple-mach): New configuration.
* mpn/powerpc32/*: Add support for apple-macho syntax.
* mpn/powerpc32/syntax.h: New file.
* gmp-impl.h: Don't use `__attribute__' syntax for Apple's perversion
of GCC.
1999-05-26 Linus Nordberg <linus@swox.se>
* rand.c (gmp_rand_init): Fix typo.
* mpn/generic/rawrandom.c (mpn_rawrandom): Count bits, not limbs,
to keep track of how many rounds to do in loop. Clean up
temporary allocation. Update `seedsize' inside loop. Mask off
the correct number of bits from final result. Init `mcopyp' even
when not normalizing `m'.
* randlc.c (gmp_rand_init_lc): Fix typo (don't call
mpz_init_set_ui()).
* mpn/generic/rawrandom.c (mpn_rawrandom): Set SIZ(s->seed) when
reallocating.
* tests/rand/Makefile (test, bigtest): Add 33-bit tests.
* tests/rand/gen.c (main): Set precision of variable passed to
mpf_urandomb(). Add option `-p'.
1999-05-25 Linus Nordberg <linus@swox.se>
* randcm.c: Remove.
* randcmui.c: Remove.
* Makefile.in: Remove randcm and randcmui.
* make.bat: Ditto.
* gmp-impl.h: Remove prototypes for __gmp_rand_init_common() and
__gmp_rand_init_common_ui().
* randlc.c (gmp_rand_init_lc): Don't call
__gmp_rand_init_common().
* randlcui.c (gmp_rand_init_lc_ui): Don't call
__gmp_rand_init_common_ui().
* gmp.h (__gmp_rand_state_struct): Remove unused member `maxval'.
* randclr.c (gmp_rand_clear): Remove reference to s->maxval.
* randcm.c (__gmp_rand_init_common): Ditto
* mpn/generic/rawrandom.c (mpn_rawrandom): Don't calculate nlimbs
twice.
* gmp.h (__gmp_rand_dist): Remove.
1999-05-24 Linus Nordberg <linus@swox.se>
* mpn/generic/rawrandom.c: Clean up comments.
* gmp.texi: Add documentation for random number generation.
1999-05-21 Linus Nordberg <linus@swox.se>
* gmp.h: Typedef `gmp_rand_state' as an array with one element.
Change prototypes accordingly.
* gmp-impl.h: Change prototypes using `gmp_rand_state'.
* rand.c (gmp_rand_init): Take `gmp_rand_state' as argument
instead of a pointer to a `gmp_rand_state'.
* mpf/urandom.c (mpf_urandomb): Ditto.
* mpz/urandom.c (mpz_urandomb): Ditto.
* mpn/generic/rawrandom.c (mpn_rawrandom): Ditto.
* randcmui.c (__gmp_rand_init_common_ui): Ditto.
* randlc.c (gmp_rand_init_lc): Ditto.
* randlcui.c (gmp_rand_init_lc_ui): Ditto.
* randui.c (gmp_rand_init_ui): Ditto.
* randcm.c (__gmp_rand_init_common): Ditto.
* randclr.c (gmp_rand_clear): Ditto.
* tests/rand/gen.c (main): Pass `s' to rand-funcs instead of address
of `s'.
1999-05-20 Linus Nordberg <linus@swox.se>
* Makefile.in: Rename randi.c --> rand.c, randi_lc.c --> randlc.c,
randicom.c --> randcm.c. Add randui.c, randcmui.c, randlcui.c.
* make.bat: Ditto.
* gmp.h: Add prototypes for gmp_rand_init_ui() and
gmp_rand_init_lc_ui().
* gmp-impl.h: Add prototypes for __gmp_rand_init_common() and
__gmp_rand_init_common_ui().
* randlc.c, randcm.c, randclr.c, rand.c: Change #include of
<gmp.h> to "gmp.h".
* randclr.c: Include stdlib.h for free().
* rand.c: Include gmp-impl.h.
1999-05-12 Torbjorn Granlund <tege@swox.com>
* mpn/configure.in: Put generic m68k alternative last.
1999-05-04 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c (setup_error_handler): Use sigemptyset to create
empty set (for portability).
(fns): Fix typo '#if #if'.
(mpz_eval_expr): Implement FERMAT and MERSENNE.
* demos/pexpr.c: Cast longjmp argument via long to silent warnings on
64-bit hosts.
1999-05-03 Torbjorn Granlund <tege@swox.com>
* demos/pexpr.c: Add #defines for GMP 1.x and 2.0 compatibility.
* demos/pexpr.c (setup_error_handler): New function; take signal
handler setup code from main(), with major modifications to use modern
signal interface.
(main): Remove signal handler setup code; call setup_error_handler.
1999-04-29 Linus Nordberg <linus@swox.se>
* tests/rand/findcl.c (main): Add option '-i' for interval factor.
Separate v and merit lose figures. Add '-v' for version.
1999-04-28 Linus Nordberg <linus@swox.se>
* tests/rand/statlib.c: Change debugging stuff.
* tests/rand/gmpstat.h: Add debug values definitions.
* tests/rand/findcl.c (main): Print low and high merit on startup.
Print version string on startup. Catch SEGV and HUP. Add option -d
for debug. Fix bug making test for v too hard.
(sh_status): New function.
(sh_status): Flush stdout. Add RCSID.
1999-04-27 Linus Nordberg <linus@swox.se>
* tests/rand/Makefile (clean): Add target.
1999-04-27 Linus Nordberg <linus.nordberg@canit.se>
* tests/rand/stat.c: Include gmpstat.h.
Add global int g_debug.
* tests/rand/spect.c: Include <unistd.h>.
* tests/rand/findcl.c (main): Input is `m', not all factors of `m'.
Print only the very first matching multiplier. Include <unistd.h>.
Flush stdout. Print "done." when done.
* tests/rand/spect.c: Move everything but main() to statlib.c.
* tests/rand/findcl.c: New file.
* tests/rand/gmpstat.h: New file.
* tests/rand/statlib.c (merit, merit_u, f_floor, vz_dot,
spectral_test): New functions.
1999-04-27 Torbjorn Granlund <tege@swox.com>
* mpn/configure.in: Fix typo, "sparc-*)" was "sparc)".
1999-04-21 Torbjorn Granlund <tege@swox.com>
* config.sub: Recognize ev6.
1999-04-12 Linus Nordberg <linus.nordberg@canit.se>
* urandom.c: Split up into randclr.c, randi.c, randi_lc.c,
randicom.c.
* randclr.c, randi.c, randi_lc.c, randicom.c: New files.
* Makefile.in: Remove urandom. Add randclr, randi, randi_lc,
randicom.
* make.bat: Ditto
1999-03-31 Torbjorn Granlund <tege@matematik.su.se>
* configure.in (sparc9-*-solaris2.[789]*, etc): New alternative.
* mpn/configure.in: Use mt-sprc9 also for ultrasparc*-*-solaris2*.
1999-03-30 Linus Nordberg <linus.nordberg@canit.se>
* urandom.c (__gmp_rand_scheme): Change NULL->0.
Include "gmp.h" instead of <gmp.h>.
1999-03-29 Linus Nordberg <linus.nordberg@canit.se>
* gmp.h (__gmp_rand_data_lc): Now holds a, c, m instead of scheme
struct.
(__gmp_rand_lc_scheme_struct): Remove mpz_t's `a' and `m'.
* tests/rand/stat.c (f_freq): Don't print 2nd level results if doing
1st level.
* tests/rand/gen.c (main): Set default algorithm to mpz_urandomb.
(main): Add option -c.
1999-03-24 Linus Nordberg <linus.nordberg@canit.se>
* tests/rand/Makefile (GMPINC): Rename to GMPH.
(GMPH): Add gmp-mparam.h.
(CFLAGS): Add -I$(GMPLIBDIR)/mpn
1999-03-23 Linus Nordberg <linus.nordberg@canit.se>
* Makefile.in: Compile top-dir/urandom.c.
* make.bat: Ditto.
* mpn/Makefile.in: Compile rawrandom.c.
* make.bat: Ditto.
* mpn/configure.in (functions): Add rawrandom.
* gmp.h (__gmp_rand_scheme_struct): Rename to
__gmp_rand_lc_scheme_struct.
(__gmp_rand_data_lc): Remove member 'n'. Allocate a
__gmp_rand_lc_scheme_struct instead of a pointer to one.
Add prototype for gmp_rand_init_lc(), mpn_rawrandom().
New prototype for mpz_urandomb().
* urandom.c: New file.
(__gmp_rand_init_common): New function.
(gmp_rand_init_lc): New function.
(gmp_rand_init): Don't init data_lc->n. Call gmp_rand_init_lc()
and __gmp_rand_init_common().
(gmp_rand_clear): Remove reference to data_lc->n.
* mpz/urandom.c (gmp_rand_init, gmp_rand_clear): Move to new file
urandom.c in top-dir.
(mpz_urandomb): Add function parameter nbits. Call mpn_rawrandom().
* mpf/urandom.c (mpf_urandomb): Call mpn_rawrandom().
* mpn/generic/rawrandom.c: New file.
(mpn_rawrandom): New function.
1999-03-17 Torbjorn Granlund <tege@matematik.su.se>
* extract-dbl.c: When packing result, adjust exp when sc == 0.
* mpf/tests/t-get_d.c: New file.
* mpf/tests/Makefile.in: Compile t-get_d.c.
1999-03-16 Linus Nordberg <linus.nordberg@canit.se>
* mpz/urandom.c (__gmp_rand_scheme): Add extra braces around the
mpz_t members.
* make.bat: Compile mpz/urandom.c and mpf/urandom.c
* tests/rand/statlib.c (ks_table): Use mpf_pow_ui() and exp().
* tests/rand/gen.c: Include unistd.h for getopt.
1999-03-15 Linus Nordberg <linus.nordberg@canit.se>
* mpz/urandom.c (gmp_rand_init): New function.
(gmp_rand_clear): New function.
(mpz_urandomb): New function.
* mpz/Makefile.in: Compile urandom.c
* mpf/urandom.c (mpf_urandomb): New function.
* mpf/Makefile.in: Compile urandom.c.
* gmp.h (__gmp_rand_state_struct, __gmp_rand_scheme_struct): New
structs for randomization functions.
(gmp_rand_dist, gmp_rand_alogrithm): New enums for randomization
functions.
(mpz_urandomb, mpf_urandomb): Add prototype.
(gmp_rand_init, gmp_rand_clear): Add prototype.
* tests/rand/gen.c, stat.c, statlib.c, statlib.h: New files.
* tests/rand/Makefile, tests/rand/ChangeLog: New files.
1999-03-15 Torbjorn Granlund <tege@matematik.su.se>
* .gdbinit: New file.
* mpz/dump.c: New file.
* mpz/Makefile.in: Compile dump.c.
* make.bat: Likewise.
* gmp.h (mpz_dump): Declare.
1999-03-14 Torbjorn Granlund <tege@matematik.su.se>
* mpz/tests/reuse.c: Also test mpz_invert and mpz_divexact.
* mpz/tests/convert.c: Update to GMP 2 variable syntax.
1999-03-13 Torbjorn Granlund <tege@matematik.su.se>
* mpf/README: New file.
* mpz/README: New file.
* mpf/pow_ui.c: New file.
* mpf/Makefile.in: Compile pow_ui.c.
* make.bat: Likewise.
* gmp.h (mpf_pow_ui): Declare.
1999-03-12 Torbjorn Granlund <tege@matematik.su.se>
* mpn/configure.in: Stage 1 of rewrite.
* mpn/underscore.h: New name for bsd.h.
* mpn/sysv.h: Deleted.
* mpn/m68k/*: Don't include sysdep.h.
* mpn/pa64/README: New file.
1999-03-11 Torbjorn Granlund <tege@matematik.su.se>
* mpn/powerpc32/add_n.S: Add support for both AIX and ELF syntax.
Renamed from `.s'.
* mpn/powerpc32/sub_n.S: Likewise.
* mpn/powerpc32/lshift.S: Likewise.
* mpn/powerpc32/rshift.S: Likewise.
* mpn/powerpc32/mul_1.S: Likewise.
* mpn/powerpc32/addmul_1.S: Likewise.
* mpn/powerpc32/submul_1.S: Likewise.
* mpn/powerpc32/umul.S: New file.
* mpn/sparc32/v8/umul.S: New file.
* mpn/sparc32/umul.S: New file.
* mpn/x86/umul.S: New file.
* mpn/x86/udiv.S: New file.
* mpn/Makefile.in (mul_basecase.o): Delete rule.
1999-02-22 Torbjorn Granlund <tege@matematik.su.se>
* configure.in (hppa2.0*-*-*): Force use of GCC.
* extract-dbl.c: Handle IEEE denormalized numbrs. Clean up.
1998-12-02 Torbjorn Granlund <tege@matematik.su.se>
* mpn/Makefile.in (CCAS): New macro.
(.s.o): Use CCAS.
(.S.o): Likewise.
* mpn/Makefile.in (mul_basecase.o): Add dependency.
(sqr_basecase.o): Likewise.
(mod_1.o): Likewise.
* demos/pexpr.c (cputime): Test also __hpux.
(cleanup_and_exit): Check SIGXCPU only #ifdef LIMIT_RESOURCE_USAGE.
* mpz/tests/t-2exp.c: Use urandom, not random.
* mpn/configure.in (arm*-*-*): New alternative.
1998-11-30 Torbjorn Granlund <tege@matematik.su.se>
* gmp-impl.h (union ieee_double_extract): Special case for
little-endian arm.
(LIMBS): Alias for PTR.
1998-11-26 Torbjorn Granlund <tege@matematik.su.se>
* longlong.h (m68000 umul_ppmm): Use `muluw', not `mulu'.
(m68k stuff): Clean up; add coldfire support.
1998-11-23 Torbjorn Granlund <tege@matematik.su.se>
* mpn/mips3/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
(KARATSUBA_SQR_THRESHOLD): #define.
* mpn/sparc32/v9/README: New file.
1998-11-20 Torbjorn Granlund <tege@matematik.su.se>
* mpn/x86/README: New file.
* mpn/arm/gmp-mparam.h: New file.
* mpn/pa64/gmp-mparam.h: New file.
* mpn/hppa/gmp-mparam.h: New file.
* mpn/x86/pentium/gmp-mparam.h: New file.
* mpn/sparc32/v9/gmp-mparam.h: New file.
* mpn/powerpc32/gmp-mparam.h: New file.
* mpn/x86/p6/gmp-mparam.h: New file.
* mpn/alpha/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
(KARATSUBA_SQR_THRESHOLD): #define.
* mpn/configure.in: Point to x86/p6 when appropriate.
* mpn/power/umul.s: New file.
* mpn/power/sdiv.s: New file.
* mpn/pa64/addmul_1.S: New file.
* mpn/pa64/submul_1.S: New file.
* mpn/pa64/mul_1.S: New file.
* mpn/pa64/udiv_qrnnd.c: New file.
* mpn/pa64/umul_ppmm.S: New file.
* mpn/mips2/umul.s: New file.
* mpn/m68k/mc68020/umul.s: New file.
* mpn/m68k/mc68020/udiv.s: New file.
* mpn/hppa/hppa1_1/umul.s: New file.
* mpn/alpha/umul.s: New file.
* mpn/a29k/udiv.s: New file.
* mpn/a29k/umul.s: New file.
1998-11-17 Torbjorn Granlund <tege@matematik.su.se>
* mpn/x86/mul_basecase.S: New file for non-pentiums.
* mpn/x86/mul_basecase.S: Move to mpn/x86/pentium.
1998-11-16 Torbjorn Granlund <tege@matematik.su.se>
* make.bat: Compile mul_basecase.c and sqr_basecase.c.
1998-11-10 Torbjorn Granlund <tege@matematik.su.se>
* mpz/invert.c: Defer writing to parameter `invert' until
end.
1998-11-03 Torbjorn Granlund <tege@matematik.su.se>
* mpn/pa64/udiv_qrnnd.c: Handle more border cases.
1998-10-29 Torbjorn Granlund <tege@matematik.su.se>
* insert-dbl.c: Special case biased exponents < 1; Get boundary for
Inf right.
* longlong.h (COUNT_LEADING_ZEROS_NEED_CLZ_TAB): New #define.
1998-10-28 Torbjorn Granlund <tege@matematik.su.se>
* mpn/powerpc32/submul_1.s: Rewrite, optimizing for PPC604.
* mpn/powerpc32/addmul_1.s: Likewise.
* mpn/powerpc32/lshift.s: Likewise.
1998-10-23 Torbjorn Granlund <tege@matematik.su.se>
* config/mt-sprc9-gcc (XCFLAGS): Add -Wa,-xarch=v8plus.
* mpn/sparc32/v9/submul_1.s: New file.
1998-10-21 Torbjorn Granlund <tege@matematik.su.se>
* mpn/config/mt-pa2hpux: New file.
* mpn/configure.in (hppa2.0*-*-*): Use new 64-bit code.
* config.sub: Recognize hppa2.0 as CPU type.
* longlong.h (64-bit hppa): Add umul_ppmm and udiv_qrnnd.
* mpn/pa64/mul_1.S: New file.
* mpn/pa64/addmul_1.S: New file.
* mpn/pa64/submul_1.S: New file.
* mpn/pa64/umul_ppmm.S: New file.
* mpn/pa64/udiv_qrnnd.c: New file.
1998-10-20 Torbjorn Granlund <tege@matematik.su.se>
* mpz/pprime_p.c: Pass 1L, not 1, to mpz_cmp_ui.
* mpz/fdiv_q_2exp.c: Cast `long' argument to `mp_limb_t' for mpn calls.
* mpz/gcd_ui.c: Likewise.
* mpz/add_ui.c: Likewise.
* mpz/sub_ui.c: Likewise.
1998-10-19 Torbjorn Granlund <tege@matematik.su.se>
* mpn/generic/bdivmod.c: Avoid using switch statement with mp_limb_t
index.
1998-10-17 Torbjorn Granlund <tege@matematik.su.se>
* mpn/sparc32/v9/mul_1.s: Misc cleanups.
* mpn/sparc32/v9/addmul_1.s: Misc cleanups.
1998-10-16 Torbjorn Granlund <tege@matematik.su.se>
* mpn/tests/{add,sub,}mul_1.c: Print xlimb using mpn_print.
* mpz/tests/t-powm.c (SIZE): Increase to 50.
(EXP_SIZE): New parameter; use it for computing exp_size.
1998-10-15 Torbjorn Granlund <tege@matematik.su.se>
* mpn/generic/divrem_newt.c: Use TMP_ALLOC interface.
* mpn/generic/sqrtrem.c: Check BITS_PER_MP_LIMB before defining
assembly variants of SQRT.
1998-10-14 Torbjorn Granlund <tege@matematik.su.se>
* mpn/tests: Clean up timing routines. Don't include longlong.h
where it is not needed.
(mpn_print): Handle printing when _LONG_LONG_LIMB.
* mpn/tests/{add,sub,}mul_1.c: Generate xlimb with mpn_random2
and do it whether TIMES != 1 or not.
* mpn/generic/mul_n.c: Delay assignment of `sign' for lower
register pressure.
* mpn/sparc32/v9/mul_1.s: New file.
* config/mt-sprc9-gcc: New file.
* configure.in: Use it.
* mpn/configure.in: Use sparc64 for Solaris 2.7 and later with a
sparc v9 CPU.
* mpn/configure.in: Use sparc32/v9 for Solaris 2.6 or earlier with
a sparc v9 CPU.
* mpf/sub.c: In initial code for ediff == 0, limit precision
before jumping to `normalize'.
1998-10-13 Torbjorn Granlund <tege@matematik.su.se>
* mpn/hppa/hppa2_0/add_n.s: New file.
* mpn/hppa/hppa2_0/sub_n.s: New file.
* mpn/configure.in: Handle hppa2.0 (32-bit code for now).
* config.guess: Update from egcs 1.1.
(9000/[3478]??:HP-UX:*:*): Properly return 2.0 for all known 2.0
machines.
1998-10-07 Torbjorn Granlund <tege@matematik.su.se>
* mpz/root.c (mpz_root): New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_root): Declare.
* mpz/perfpow.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_perfect_power_p): Declare.
* mpz/remove.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_remove): Declare.
* mpz/bin_ui.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_bin_ui): Declare.
* mpz/bin_uiui.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_bin_uiui): Declare.
1998-09-16 Torbjorn Granlund <tege@matematik.su.se>
* longlong.h: Test for __powerpc__ in addition to _ARCH_PPC.
Sat Sep 5 17:22:28 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpf/cmp_si.c: Compare most significant mantissa limb before
trying to deduce anything from the limb count.
* mpf/cmp_ui.c: Likewise.
Tue Aug 18 10:24:39 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpz/pprime_p.c (mpz_probab_prime_p): Add new code block
for doing more dividing.
Sat Aug 15 18:43:17 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpn/generic/divrem_newt.c: New name for divrem_newton.c.
* mpn/Makefile.in: Corresponding changes.
* mpn/configure.in: Likewise.
Wed Aug 12 23:07:09 1998 Torbjorn Granlund <tege@matematik.su.se>
* config.guess: Handle powerpc for NetBSD.
Tue Jul 28 23:10:55 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpz/fib_ui.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_fib_ui): Declare.
Wed Jun 17 22:52:58 1998 Torbjorn Granlund <tege@matematik.su.se>
* make.bat: Fix typo, `asm-synt.h' => `asm-syntax.h'.
Wed Jun 3 11:27:32 1998 Torbjorn Granlund <tege@matematik.su.se>
* config/mt-pwr: New file.
* config/mt-ppc: New file.
* configure.in: Use the new files.
Tue Jun 2 13:04:17 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpn/sparc32/v9/addmul_1.s: New file.
* mpn/config/mt-sprc9: New file.
* mpn/configure.in: Use mt-sprc9.
Tue May 26 11:24:18 1998 Torbjorn Granlund <tege@matematik.su.se>
* demos/factorize.c (factor_using_pollard_rho): Pass correct
parameters in recursive calls; join the two recursion arms.
* mpf/set_q.c: Set result sign.
When normalizing the numerator, don't allow it to increase in size
beyond prec.
Tue May 19 17:28:14 1998 Torbjorn Granlund <tege@matematik.su.se>
* demos/factorize.c (factor_using_division): Call fflush
also for the factor 2.
Mon May 18 15:51:01 1998 Torbjorn Granlund <tege@matematik.su.se>
* make.bat: Pass -fomit-frame-pointer. Do not pass -g.
Tue May 5 01:42:50 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpz/Makefile.in (LOCAL_CC): Remove definition.
* gmp.h: Get rid of GMP_SMALL stuff.
* mpz/Makefile.in: Likewise.
* mpq/Makefile.in: Likewise.
* mpf/Makefile.in: Likewise.
* mpz/invert.c: Fix typo in comment.
Mon May 4 23:05:32 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpn/generic/sqrtrem.c: Check that __arch64__ is not defined
before defining sparc SQRT.
Mon Apr 20 19:16:17 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpn/generic/gcdext.c: Allow gp to be NULL.
1998-04-03 Torbjorn Granlund <tege@matematik.su.se>
* mpn/configure.in: Recognize `alphaev5*', not `alphaev5'.
* config.guess: Handle CPU variants for NetBSD.
Mon Mar 16 13:07:54 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpz/pprime_p.c: Use mpn_mod_1/mpn_preinv_mod_1 for computing mod PP,
not mpz_tdiv_r_ui (which expects an `unsigned long').
(mpz_probab_prime_p): Change type of `r' to mp_limb_t.
Thu Mar 12 17:19:04 1998 Torbjorn Granlund <tege@matematik.su.se>
* gmp.h (mpf_ceil, mpf_floor, mpf_trunc): Add declarations.
* config.guess: Update from FSF version.
* config.sub: Likewise.
* config.guess: Add special handling of alpha-*-NetBSD.
Wed Mar 11 00:55:34 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpz/inp_str.c: Update from set_str.c.
Properly increment `nread' when skipping minus sign.
* mpz/set_str.c: Check for empty string after having skipped
leading zeros.
Mon Mar 9 19:28:00 1998 Torbjorn Granlund <tege@matematik.su.se>
* mpz/set_str.c: Skip leading zeros.
Wed Mar 4 19:29:16 1998 Torbjorn Granlund <tege@matematik.su.se>
* gmp.h (mpz_cmp_si): Cast argument before calling mpz_cmp_ui.
* demos/factorize.c: Rewrite.
1998-02-04 Torbjorn Granlund <tege@matematik.su.se>
* configure.in (i[3456]86* etc): Check if using gcc before
choosing mt-x86.
* configure.in (m68*-*-*): New alterantive.
* config/mt-m68k: New file.
* mpn/alpha/invert-limb.s: Put tables in text segment,
since not all systems support "rdata".
Wed Feb 4 02:20:57 1998 Torbjorn Granlund <tege@matematik.su.se>
* gmp.h (__GNU_MP_VERSION_SNAP): New #define.
(__GNU_MP_VERSION_MINOR): Now 1.
Wed Jan 28 22:29:36 1998 Torbjorn Granlund <tege@tunnis.tmg.se>
* longlong.h (alpha udiv_qrnnd): #define UDIV_NEEDS_NORMALIZATION.
Wed Jan 28 20:28:19 1998 Torbjorn Granlund <tege@sophie.matematik.su.se>
* mpz/pprime_p.c (mpz_probab_prime_p): Delete 59 from tried divisors.
Mon Jan 26 01:39:02 1998 Torbjorn Granlund <tege@tunnis.tmg.se>
* mpz/pprime_p.c (mpz_probab_prime_p): Major overhaul: Check small
numers specifically; check small factors, then perform a fermat test.
Tue Jan 13 14:58:28 1998 Torbjorn Granlund <tege@tunnis.tmg.se>
* longlong.h (alpha udiv_qrnnd): Call __mpn_invert_normalized_limb
and udiv_qrnnd_preinv.
Wed Jan 7 01:52:54 1998 Torbjorn Granlund <tege@tunnis.tmg.se>
* mpn/configure.in (alpha*, extra_functions): Add invert-limb and
remove udiv_qrnnd.
* mpn/tests/divrem.c: Get allocations right.
* mpn/generic/divrem.c: Conditionally pre-invert most significant
divisor limb.
Tue Jan 6 23:08:54 1998 Torbjorn Granlund <tege@tunnis.tmg.se>
* mpn/generic/divrem_1.c: Rename variables to comply to conventions.
Make `i' have type `mp_size_t'.
Tue Dec 30 22:21:42 1997 Torbjorn Granlund <tege@matematik.su.se>
* mpz/tdiv_qr_ui.c: Return the remainder.
* mpz/tdiv_r_ui.c: Likewise.
* mpz/tdiv_q_ui.c: Likewise.
* gmp.h: Change return type of mpz_tdiv_qr_ui, mpz_tdiv_r_ui,
mpz_tdiv_q_ui.
* mpz/tdiv_ui.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_tdiv_ui): Declare.
Fri Nov 7 04:21:15 1997 Torbjorn Granlund <tege@matematik.su.se>
* mpf/integer.c (FUNC_NAME): Fix bogus test for mpf_trunc.
* demos/isprime.c: New file.
Sat Nov 1 19:32:25 1997 Torbjorn Granlund <tege@matematik.su.se>
* mpz/cmp_abs.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_cmp_abs): Declare.
* mpz/cmp_abs_ui.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_cmp_abs_ui): Declare.
Sat Sep 27 04:49:52 1997 Torbjorn Granlund <tege@tunnis.tmg.se>
* mpz/fdiv_r_2exp.c: Get allocation for `tmp' right.
* mpz/fdiv_q_2exp.c: In final result adjustment code, handle
that intermediate result is zero.
* mpz/tests/t-2exp.c: New file.
* mpz/tests/Makefile.in: Handle t-2exp.c.
Fri Sep 26 16:29:21 1997 Torbjorn Granlund <tege@tunnis.tmg.se>
* mpz/divexact.c: Fix typo in test for whether to copy numerator to
quotient and move that statement to after handling quotient and
denominator overlap. Misc cleanups.
* mpn/generic/gcd.c: Change count argument of mpn_lshift/mpn_rshift
calls to `unsigned int'.
* mpz/divexact.c: Likewise.
Mon Sep 22 02:19:52 1997 Torbjorn Granlund <tege@pro.tmg.se>
* mpz/tests/t-powm.c: Decrease `reps' to 2500.
* mpz/tests/t-pow_ui.c: New file.
* mpz/tests/Makefile.in: Handle t-pow_ui.c.
* mpz/ui_pow_ui.c: Get special cases for exponent and base right.
* mpz/pow_ui.c: Increase temp space allocation by 1 limb.
Split `rsize' into two variables; compute space allocation into
`ralloc'.
Sun Sep 7 04:15:12 1997 Torbjorn Granlund <tege@pro.tmg.se>
* mpn/pa64/lshift.s: New file.
* mpn/pa64/rshift.s: New file.
* mpn/pa64/sub_n.s: New file.
Sat Sep 6 19:14:13 1997 Torbjorn Granlund <tege@gmp.tmg.se>
* mpn/pa64/add_n.s: New file.
* mpn/pa64: New directory.
Tue Aug 19 16:17:09 1997 Torbjorn Granlund <tege@pro.tmg.se>
* mpz/swap.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_swap): Declare.
* mpn/generic/mul_n.c: Push assignment of x and y pointers into the
if/else clauses in several places. (Decreases register pressure.)
Mon Aug 18 03:29:50 1997 Torbjorn Granlund <tege@pro.tmg.se>
* mpn/thumb/add_n.s: New file.
* mpn/thumb/sub_n.s: New file.
* mpn/arm/add_n.s: New file.
* mpn/arm/sub_n.s: New file.
* mpz/powm.c: After mpn_mul_n and mpn_mul calls, adjust product size
if most significant limb is zero.
* mpz/powm_ui.c: Likewise.
Fri Aug 15 02:13:57 1997 Torbjorn Granlund <tege@pro.tmg.se>
* mpn/arm/m/mul_1.s: New file.
* mpn/arm/m/addmul_1.s: New file.
* mpn/powerpc32/mul_1.s: Rewrite.
* mpn/alpha/mul_1.s: Prefix labels with `.'.
Mon Aug 11 02:37:16 1997 Torbjorn Granlund <tege@pro.tmg.se>
* mpn/powerpc32/add_n.s: Rewrite.
* mpn/powerpc32/sub_n.s: Rewrite.
Sun Aug 10 17:07:15 1997 Torbjorn Granlund <tege@pro.tmg.se>
* mpn/powerpc32/addmul_1.s: Delete obsolete comments.
* mpn/powerpc32/submul_1.s: Likewise.
Fri Jul 25 20:07:54 1997 Torbjorn Granlund <tege@pro.tmg.se>
* mpz/addmul_ui.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_addmul_ui): Declare.
* mpz/setbit.c: Add missing code after final `else'.
Tue Jul 22 17:45:01 1997 Torbjorn Granlund <tege@tunnis.tmg.se>
* mpn/sh/add_n.s: Fix typo.
* mpn/sh/sub_n.s: Likewise.
* longlong.h (ns32k count_trailing_zeros): Fix typo.
* insert-dbl.c: Check for exponent overflow and return Inf.
* mpz/get_d.c: Rewrite to avoid rounding errors.
Thu May 29 11:51:07 1997 Torbjorn Granlund <tege@pro.tmg.se>
* mpq/add.c: Swap some usages of tmp1 and tmp2 to make sure
their allocation suffices.
* mpq/sub.c: Likewise.
Wed Apr 16 02:24:25 1997 Torbjorn Granlund <tege@pro.tmg.se>
* demos/pexpr.c: New file.
* mpn/generic/mul_n.c: Misc optimizations from Robert Harley.
* gmp-impl.h (MPZ_PROVOKE_REALLOC): New #define.
Sat Apr 12 17:54:04 1997 Torbjorn Granlund <tege@pro.tmg.se>
* mpz/tstbit.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_tstbit): Declare.
* mpz/tests/logic.c: Use MPZ_CHECK_FORMAT.
* mpz/tests/bit.c: New test.
* mpz/tests/Makefile.in: Handle bit.c.
* mpz/ior.c: In -OP2,+OP1 case, normalize OP2 after call to mpn_sub_1.
* gmp-impl.h (MPZ_CHECK_FORMAT): New #define.
Thu Apr 10 00:30:14 1997 Torbjorn Granlund <tege@tmg.se>
* longlong.h (POWER/PowerPC): Test _ARCH_PWR instead of _IBMR2.
Wed Apr 9 18:23:31 1997 Torbjorn Granlund <tege@pro.tmg.se>
* gmp-impl.h: Move defaulting of UMUL_TIME and UDIV_TIME from here...
* longlong.h: ...to here.
Sun Mar 30 12:16:23 1997 Torbjorn Granlund <tege@matematik.su.se>
* mpn/generic/next_prime.c: New file.
* mpn/generic/perfsqr.c: Remove definitions of PP and PP_INVERTED.
* gmp-impl.h: Put them here.
Fri Mar 28 08:18:05 1997 Torbjorn Granlund <tege@matematik.su.se>
* gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Define as inline asm for
for x86, but leave disabled for now.
Fri Feb 28 02:39:47 1997 Torbjorn Granlund <tege@matematik.su.se>
* mpn/Makefile.in (.S.o): Pass SFLAGS and CFLAGS also to compiler
for assembly phase.
(.s.o): Pass SFLAGS.
Wed Feb 26 06:46:08 1997 Torbjorn Granlund <tege@matematik.su.se>
* mpn/configure.in: For Pentium Pro, use default code, not Pentium
optimized code.
* mpn/x86/addmul_1.S: Unroll and optimize for Pentium Pro.
* mpn/x86/submul_1.S: Likewise.
Thu Feb 13 08:26:09 1997 Torbjorn Granlund <tege@matematik.su.se>
* mpf/Makefile.in: Compile floor.o, ceil.o and trunc.o (from
integer.c).
* make.bat: Likewise.
Wed Feb 5 05:58:44 1997 Torbjorn Granlund <tege@matematik.su.se>
* mpn/configure.in (alpha*): Add cntlz to extra_functions.
Wed Feb 4 03:30:45 1997 Torbjorn Granlund <tege@matematik.su.se>
* mpf/integer.c: New file (supporting mpf_floor, mpf_ceil, mpf_trunc).
Mon Feb 3 14:21:36 1997 Torbjorn Granlund <tege@matematik.su.se>
* make.bat: Fix typo, set_dfl_prc => set_dfl_prec.
Sun Feb 2 02:34:33 1997 Torbjorn Granlund <tege@matematik.su.se>
* mpf/out_str.c: After outputting `-', decrement n_digits.
Wed Jan 8 02:50:20 1997 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/generic/divrem.c: qextra_limbs => qxn.
Wed Dec 18 07:50:46 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpz/tests/t-tdiv.c (SIZE): Increase to 200.
Tue Dec 17 19:32:48 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/generic/divrem.c (mpn_divrem_classic): New name for mpn_divrem.
* gmp.h (mpn_divrem): New function.
* mpn/generic/divrem_newton.c: New file.
* mpn/configure.in (functions): Add divrem_newton.
* make.bat: Likewise.
Thu Dec 12 17:55:13 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* gmp.h (_GMP_H_HAVE_FILE): Test also __dj_include_stdio_h_.
Sat Dec 7 09:40:06 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/alpha/invert-limb.s: New file.
Thu Dec 5 01:25:31 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpz/ui_pow_ui.c (mpz_pow2): New (static) function.
(mpz_ui_pow_ui): Rewrite.
* make.bat: `pre_mod_1.c' => `pre_mod_.c'. Fix typo in path to
gmp-mpar.h.
Fri Nov 15 00:49:55 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpz/ui_pow_ui.c: Rewrite for better speed.
Fri Nov 1 16:36:56 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* Makefile.in (recursive make rules): Use `&&' instead of `;' as
delimiter.
Fri Oct 25 17:12:36 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* gmp-impl.h (Cray/uxp MPN_COPY): Really declare as inline.
Thu Oct 24 15:08:19 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/fujitsu/rshift.c: Fix typo in loop boundaries.
Fri Oct 18 03:13:54 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/configure.in: Recognize `nextstep' for m68k variants; likewise
for x86 variants.
* mpn/x86/syntax.h (INSND): New macro.
* mpn/x86/[lr]shift.S: Use INSND.
* mpn/x86/pentium/[lr]shift.S: Likewise.
* mpn/config/t-oldgas (SFLAGS): Pass -DOLD_GAS.
* gmp-impl.h: In code for determining endianess, test also
__BIG_ENDIAN__ and __hppa__. Remove test of __NeXT__.
Wed Oct 16 03:50:34 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpf/set_str.c: Let `prec' determine precision used in
exponentiation code; decrease allocation accordingly.
* mpn/vax: Change `jsob*' to `sob*' in all files.
Tue Oct 15 03:54:06 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* longlong.h (m88110 udiv_qrnnd): Change type of intermediate quotient
to DImode (divu.d generates a 64-bit quotient).
* configure.in (m88110*): Fix typo.
* mpf/get_str.c: Compute exp_in_base using `double' to avoid overflow.
* gmp-impl.h (struct bases): Change type of chars_per_bit_exactly from
float to double.
* mpn/mp_bases.c (__mp_bases): Give 17 digits for chars_per_bit_exactly
field.
* mpf/get_str.c: Let `prec' determine precision used in
exponentiation code; decrease allocation accordingly.
Sun Oct 13 03:31:53 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* longlong.h: Major cleanup.
(__udiv_qrnnd_c): Compute remainders using multiply and subtract,
not explicit `%' operator.
(C umul_ppmm): Get rid of a redundant __ll_lowpart.
* mpz/invert.c: Properly detect all operands that would yield an
undefined inverse; make sure the inverse is always positive.
* mpz/xor.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_xor): Declare.
* mpz/tests/logic.c: Also test mpz_xor.
* mpz/lcm.c: Special case for when either operand equals 0.
Sat Oct 12 01:57:09 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/generic/gcd.c (find_a): Don't inline on x86.
* Makefile.in (CFLAGS): Default to just `-g'.
* configure.in: Recognize 386 and 486 wherever other x86 cpus are
recognized.
* configure.in: Use mt-x86 for all x86 cpus.
* config/mt-x86: New file.
* mpn/alpha/cntlz.s: New file.
Tue Oct 8 00:16:18 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* longlong.h: Define smul_ppmm for Fujitsu vpp/uxp.
Rewrite umul_ppmm to actually work on the hardware.
* mpn/x86/sub_n.S: Avoid parens around displacement of `leal'.
* mpn/x86/add_n.S: Likewise.
* mpn/x86/syntax.h (R): Define differently depending on __STDC__.
Mon Oct 7 16:48:08 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* longlong.h: Don't test for __NeXT__ in outer 68k conditional;
add test for __m68k__.
Sun Oct 6 00:59:09 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* gmp.h: Declare mpn_random.
* make.bat: Compile mpn/generic/random.c.
* longlong.h: Define umul_ppmm for Fujitsu vpp/uxp.
* gmp-impl.h: Protect definitions using `__attribute__ ((mode (...)))'
with test also for __GNUC_MINOR__.
* gmp.h: Don't define macros using __builtin_constant_p when using
NeXT's compiler.
Fri Oct 4 16:53:50 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpz/lcm.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h (mpz_lcm): Declare.
Wed Sep 25 00:06:21 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpq/tests/t-cmp_ui.c: Make sure numerator and denominator of `b' is
within limits of an `unsigned long int'.
* mpz/tests/t-powm_ui.c: Change type of exp2 to `unsigned long int'.
Tue Sep 24 18:58:20 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpz/powm_ui.c: Make result always positive.
* urandom.h (urandom): Make it return mp_limb_t.
* gmp-impl.h (CNST_LIMB): New macro.
* mpn/mp_bases.c: Use CNST_LIMB.
* mpn/generic/hamdist.c (popc_limb): Likewise.
* mpn/generic/popcount.c (popc_limb): Likewise.
* mpn/generic/perfsqr.c: Likewise.
Fri Sep 20 03:08:10 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpz/pprime_p.c: When n <= 3, don't clear out n before using it.
Wed Sep 18 11:22:45 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/fujitsu/mul_1.c: New file.
* mpn/fujitsu/addmul_1.c: New file.
* mpn/fujitsu/sub_n.c: New file.
* mpn/fujitsu/add_n.c: Mew file.
Sun Sep 15 03:13:02 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/generic/random.c: New file.
* mpn/configure.in (functions): Add `random'.
* gmp-impl.h (MPN_COPY): Define as annotated inline function for
Crays and Fujitsu VPPs.
* gmp.h (mp_size_t): Define as `int' for non-MPP Cray.
(mp_exp_t): Likewise.
* configure.in: Add support for Fujitsu VPP machines.
* mpn/configure.in: Likewise.
* config.guess: Likewise.
* config.sub: Likewise.
* mpn/fujitsu/rshift.c: New file.
* mpn/fujitsu/lshift.c: New file.
* mpn/fujitsu: New directory, for Fujitsu VPP machines.
Wed Sep 11 11:34:38 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/generic/mul_n.c (__gmpn_mul_n): New name for impn_mul_n.
Call __gmpn_mul_basecase, not impn_mul_n_basecase; update parameter
list to work with __gmpn_mul_basecase.
(__gmpn_sqr): New name for impn_sqr_n.
Call __gmpn_sqr_basecase, not impn_sqr_n_basecase; update parameter
list to work with __gmpn_sqr_basecase.
(mpn_mul_n): Update calls to match new names and parameter conventions.
* gmp-impl.h (MPN_MUL_N_RECURSE): Likewise.
(MPN_SQR_RECURSE): New name for MPN_SQR_N_RECURSE.
Update calls to match new names and parameter conventions.
* mpn/generic/mul.c: Never perform multiply explicitly here, call
__gmpn_mul_basecase instead.
Update calls to match new names and parameter conventions.
* mpn/x86/mul_basecase.S: New file.
* mpn/generic/mul_basecase.c: New file.
* mpn/generic/sqr_basecase.c: New file.
Wed Sep 4 02:59:21 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpz/set_str.c: Let `0b' and `0B' mean base 2.
Fri Aug 30 00:44:00 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* longlong.h (x86 umul_ppmm): Work around GCC bug that was
triggered by Aug 28 change.
* mpbsd/min.c (digit_value_in_base): New function.
* mpz/set_str.c: Refine allocation size computation, use
chars_per_bit_exactly instead of chars_per_limb.
* mpbsd/Makefile.in (.c.o): Add -D_mpz_realloc=_mp_realloc.
Wed Aug 28 02:52:14 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* longlong.h (x86 umul_ppmm): Don't cast result operands.
(x86 udiv_qrnnd): Likewise.
(default smul_ppmm): Fix typo, umul_ppmm => smul_ppmm.
(default umul_ppmm): New #define using smul_ppmm.
(vax smul_ppmm): New #define.
(vax umul_ppmm): Delete.
(POWER umul_ppmm): Delete.
(IBM 370 smul_ppmm): New #define.
(IBM 370 umul_ppmm): Delete.
(IBM RT/ROMP smul_ppmm): New #define.
(IBM RT/ROMP umul_ppmm): Delete.
Tue Aug 27 01:03:25 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* gmp-impl.h (__gmp_0): Make it `const'.
* mpn/Makefile.in (clean mostlyclean): Comment out recursive clean
of `tests'.
* mpn/generic/mul.c: Identify when we do squaring, and call
impn_sqr_n_basecase/impn_sqr_n as appropriate. Use
KARATSUBA_MUL_THRESHOLD and KARATSUBA_SQR_THRESHOLD.
Don't #define KARATSUBA_THRESHOLD.
* mpn/generic/mul_n.c: Don't #define KARATSUBA_THRESHOLD.
(impn_mul_n, impn_sqr_n): Rewrite, based on code contributed by
Robert Harley.
(impn_sqr_n_basecase): Rewrite.
* gmp-impl.h (KARATSUBA_MUL_THRESHOLD): New #define.
(KARATSUBA_SQR_THRESHOLD): Likewise.
(MPN_SQR_N_RECURSE): Use KARATSUBA_SQR_THRESHOLD.
(MPN_MUL_N_RECURSE): Use KARATSUBA_MUL_THRESHOLD.
* configure.in: Fix typo in last change.
Mon Aug 26 22:25:18 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/generic/random2.c: Fix typo, `alpha__' => `__alpha'.
* mpf/random2.c: Likewise.
Sun Aug 25 00:07:09 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpz/tests/t-mul.c: Also test squaring.
Fri Aug 16 05:12:08 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mp_clz_tab.c (__clz_tab): Declare as `const'.
* version.c (gmp_version): Likewise.
* mpn/generic/sqrtrem.c (even_approx_tab, odd_approx_tab): Likewise.
Thu Aug 15 02:34:47 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp.h: Fix typo, `mips__' => `__mips'.
* mpf/set_str.c: Allow a number to start with a period, if next
position contains a digit.
Tue Aug 13 18:41:25 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/gcdext.c: Get cofactor sign right for negative input operands.
Clean up code for computing tt.
* mpz/invert.c: Get rid of variable `rv'.
* mpz/divexact.c: Test for zero divisor in special case for zero
dividend.
Mon Aug 12 18:04:07 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/?div_*_ui.c: Special case for division by 0.
* mpz/tdiv_q.c: Likewise.
Sat Aug 10 14:45:26 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/dmincl.c: Special case for division by 0.
* mpz/tdiv_*_ui.c: Delete special case for dividend being 0; handle
it when computing size after mpn_divmod_1 call.
* mp_bpl.c: (__gmp_junk): New variable.
(__gmp_0): New constant.
* gmp-impl.h (DIVIDE_BY_ZERO): New #define.
Fri Aug 9 20:03:27 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/divexact.c: Test for dividend being zero before testing
for small divisors.
Thu Aug 8 13:20:23 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* configure.in: Require operating system specification for cpus
where assembly syntax differs between system.
* Makefile.in (many targets): Change `-' action prefix to `@'.
* mpn/Makefile.in: (distclean): Fix typo.
* mpq/cmp_ui.c: Rename function to _mpq_cmp_ui.
(mpq_cmp_ui): #undef deleted.
* mpz/cmp_si.c: Rename function to _mpz_cmp_si.
(mpz_cmp_si): #undef deleted.
* mpz/cmp_ui.c: Rename function to _mpz_cmp_ui.
(mpz_cmp_ui): #undef deleted.
* Makefile.in: Corresponding changes.
* mpf/get_prc.c: Return the *highest* precision achievable.
* mpf/get_str.c: Complete rewrite.
* mpf/set_str.c (swapptr): New #define.
(assert): New #define.
* mpf/set_str.c: Set prec to one more than the saved _mp_prec.
Misc cleanups.
* mpz/set_str.c: #include string.h.
* mpf/out_str.c: #include string.h.
* mpbsd/xtom.c: #include string.h and ctype.h.
* mpbsd/mout.c: #include string.h.
Wed Aug 7 11:46:04 EDT 1996 Ken Weber <kweber@mcs.kent.edu>
* mpn/generic/gcd.c: Reorder mpn_gcd argument list.
* mpz/gcd.c: Change call to mpn_gcd.
* gmp.texi: Update manual entry on mpn_gcd.
* mpn/generic/bdivmod.c: Delete limb cache to make mpn_bdivmod
reentrant.
Wed Aug 7 02:15:38 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/get_str.c: Rewrite code for converting integral part of a
number with both an integral and fractional part.
* mpf/set_str.c: Get rid of variable xxx. New variables madj and radj.
In exp_in_base==0 case, add madj to msize for EXP field.
* mpz/tests/t-gcd.c: Test deleted. Rename t-gcd2.c to t-gcd.c.
Increase reps to 2000.
* mpz/tests/t-gcd2.c: Get rid of mpz_refgcd.
* mpf/set_str.c: Ignore excess limbs in MP,MSIZE.
Thu Jul 25 04:39:10 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/configure.in: Fix typo in setting path, "sparc" => "sparc32".
Wed Jul 24 02:27:02 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/generic/gcdext.c: Reorganize and clean up. Get rid of all
signed limb arithmetic.
Mon Jul 22 02:39:56 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/generic/gcdext.c (mpn_gcdext): For large enough operands,
work with most significant *two* limbs.
(div2): New function (two variants).
(THRESHOLD): New #define.
* mpz/gcdext.c: Fix typo in MPZ_TMP_INIT call.
* longlong.h (alpha UMUL_TIME): Now 30.
(alpha UDIV_TIME): Now 350.
(x86 UMUL_TIME): Now 10 (let Pentium decide).
(SuperSPARC UDIV_TIME): Override default.
* extract-dbl.c (MP_BASE_AS_DOUBLE): Don't redefine here.
* extract-dbl.c: New name for extract-double.c.
* insert-dbl.c: New name for insert-double.c.
* Makefile.in: Corresponding changes.
* make.bat: Likewise.
* mpz/Makefile.in (.c.o): Don't pass non-portable `-f' to cp.
* mpq/Makefile.in: Likewise.
* mpf/Makefile.in: Likewise.
Sat Jul 20 01:35:18 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/getlimbn.c: Take ABS of integer->_mp_size.
* mpz/divexact.c: Use mpn_divmod_1 if divisor is a single limb.
Thu Jul 18 00:31:15 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/generic/popcount.c (popc_limb): Use different masking trick
for first step (due to David Seal).
* mpn/generic/hamdist.c (popc_limb): Likewise.
Wed Jul 17 23:21:48 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/generic/divrem.c: In MPN_COPY_DECR call, copy dsize - 1 limbs.
Sun Jul 14 17:47:46 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* configure.in: Handle sparc9, sparc64, and ultrasparc like sparc8.
Thu Jul 11 14:05:54 1996 J.T. Conklin <jtc@rtl.cygnus.com>
* longlong.h (mc680x0): Define umul_ppmm, udiv_qrnnd, sdiv_qrnnd
for the '020, '030, '040, and '332. Define count_leading_zeros
for the '020, '030, '040, and '060.
Sun Jul 14 15:24:53 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
From Joe Keane:
* mpq/equal.c: Take ABS of num1_size before passing it to mpn_cmp.
Fri Jul 12 17:11:17 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/generic/sqrtrem.c (SQRT): New asm for x86, but leave it
disabled for now.
* mpn/generic/sqrtrem.c: Use MP_BASE_AS_DOUBLE.
Wed Jul 10 03:17:45 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* cre-mparam.c: Delete obsolete file.
* gmp.h: #define _LONG_LONG_LIMB if __mips && _ABIN32.
* longlong.h: Test __mips instead of __mips__.
Sun Jul 7 23:19:13 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* longlong.h (_PROTO): Define, unless already defined.
(alpha __udiv_qrnnd): Declare using _PROTO.
(hppa __udiv_qrnnd): Likewise.
(sparc __udiv_qrnnd): Likewise.
Mon Jul 1 01:44:30 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* config.guess: Update from master version; add Cray x90 handling.
Wed Jun 26 05:35:02 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/power/add_n.s (__mpn_add_n): Work around GAS bug.
* mpn/power/sub_n.s (__mpn_sub_n): Likewise.
* insert-double.c: Rework loop to avoid potential overflow.
* mpq/get_d.c: For vax, if qsize > N_QLIMBS, ignore excess limbs.
* mpq/tests/t-get_d.c (SIZE): Special case for vax.
* gmp.h (mpX_cmp_ui): #define also when ! __GNUC__.
Mon Jun 24 17:13:21 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* longlong.h (vax sdiv_qrnnd): Fix typo.
Sat Jun 15 01:33:33 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp.h: Support `small' and `large' type and function variants,
controlled by GMP_SMALL.
* mpz/Makefile.in (.c.o): Compile each function twice, for small and
large variant.
(MPZS_OBJS): New variable.
(libmpz.a): Include MPZS_OBJS in archive.
* mpf/Makefile.in: Analogous changes.
* mpq/Makefile.in: Analogous changes.
* gmp.h: Prefix all functions with __gmp, to allow namespace-clean
internal calls.
* mp.h: Rip out __MP_SMALL__ stuff.
(__mpz_struct): mp_size_t => int.
* mpz/invert.c: #include "gmp-impl.h".
Use MPZ_TMP_INIT, not mpz_init.
* mpz/gcdext.c: Rewrite to call mpn_gcdext.
Fri Jun 14 18:05:29 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/generic/gcdext.c (s0size): New parameter.
* gmp.h (mpn_gcdext): Update prototype.
* mpn/generic/gcdext.c: Major rewrite.
Mon Jun 10 00:14:27 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/generic/dump.c: Add missing `else'.
Fri Jun 7 03:35:12 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* Makefile.in (gmp_toc.html): Pass -expandinfo to texi2html.
Thu Jun 6 19:00:53 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* Version 2.0.2 released.
* install.sh: New file.
* Makefile.in (INSTALL): Use install.sh.
(install-normal): New name for target `install'.
(install): New dummy target.
* mpz/pow_ui.c: Swap tests for (e == 0) and (bsize == 0).
* mpz/ui_pow_ui.c: Swap tests for (e == 0) and (blimb == 0).
* config/mt-linux (AR_FLAGS): New file.
* configure.in: Use config/mt-linux for all linux systems.
Tue Jun 4 03:42:18 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* Version 2.0.1 released.
* mpf/tests/ref.c: Cast result of TMP_ALLOC to the right pointer type.
* extract-double.c: Test _GMP_IEEE_FLOATS with #if, not plain if.
* insert-double.c: Don't #include stdlib.h.
* gmp-impl.h (union ieee_double_extract): Test sparc and __sparc.
Do not test __sparc__.
* mpf/reldiff.c: Change declaration to work around irix5 compiler bug.
* mpq/equal.c: Likewise.
* mpn/generic/gcd.c: Delete spurious comma at end of enumeration.
* mpn/generic/gcdext.c: Add K&R declaration syntax.
* stack-alloc.h: Likewise.
* insert-double.c: Likewise.
* extract-double.c: Likewise.
* mpf/tests/reuse.c: Likewise.
* mpz/tests/reuse.c: Likewise.
* mpf/tests/t-sub.c: Likewise.
* mpf/tests/t-add.c: Likewise.
* mpf/tests/t-muldiv.c: Likewise.
* mpf/tests/t-conv.c: Likewise.
* mpf/tests/ref.c: Likewise.
* mpn/config/t-oldgas: Renamed from t-freebsd.
* mpn/configure.in: Use t-oldgas for freebsd, netbsd, and some linux
configurations.
* mpn/powerpc32/mul_1.s: Really clear cy before entering loop.
* mpn/powerpc32/*.s: Fix power/powerpc syntax issues.
* mpn/config/t-ppc-aix: New file.
* mpn/configure.in: Use t-ppc-aix for powerpc like t-pwr-aix for power.
Wed May 29 02:07:31 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp.h (mp_bits_per_limb): Change qualifier from `const' to
__gmp_const.
* gmp.h (mpf_init_set_str): Add `const' qualifier for 2nd parameter.
* mpf/iset_str.c: Likewise.
Mon May 27 00:15:58 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp-impl.h: Declare __gmp_extract_double.
* mpz/set_q.c: Delete unused variables.
* gmp.h (mpq_equal): Declare.
* mpf/eq.c: mpf_cmp2 -> mpf_eq.
Fri May 24 03:20:44 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/iset_d.c: Don't include <math.h>.
* insert-double.c (__gmp_scale2): New name for scal2.
* mpz/get_d.c: Corresponding change.
* mpf/get_d.c: Likewise.
* mpq/get_d.c: Likewise.
* gmp-impl.h: Declare __gmp_scale2.
* mpn/generic/scan0.c: Clarify comment.
* mpz/set_q.c: New file.
* Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h: Declare mpz_set_q.
* insert-double.c: New file.
* Makefile.in: Compile it.
* make.bat: Likewise.
* mpz/get_d.c: New file.
* mpz/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h: Declare mpz_get_d.
* mpf/get_d.c: New file.
* mpf/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h: Declare mpf_get_d.
* make.bat: Compile things in alphabetical order.
* gmp-impl.h (MP_BASE_AS_DOUBLE): New #define.
(LIMBS_PER_DOUBLE): New #define.
* extract-double.c: New file.
* Makefile.in: Compile it.
* make.bat: Likewise.
* mpz/set_d.c: Rewrite to use __gmp_extract_double.
* mpf/set_d.c: Likewise.
* mpn/configure.in: Use t-pwr-aix also for aix 3.2.4 and up.
Wed May 22 02:48:35 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp-impl.h: Rework code for defining ieee_double_extract.
(IEEE_DOUBLE_BIG_ENDIAN): Macro removed.
(_GMP_IEEE_FLOATS): New macro.
* mpn/vax/gmp-mparam.h: Delete.
* mpn/config/t-pwr-aix: New file.
* mpn/configure.in: Use t-pwr-aix for aix 4 and later.
Mon May 20 16:30:31 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp.h: In code for setting _GMP_H_HAVE_FILE, test more symbols.
* mpf/tests/t-add.c (oo): Add some `l' printf modifiers.
* mpf/tests/t-sub.c (oo): Likewise.
* mpf/tests/t-conv.c (oo): Likewise.
* mpf/tests/t-sqrt.c (oo): Likewise.
* mpz/tests/t-mul.c (_mpn_mul_classic): Remove unused variables.
* mpn/{pyr,i960,clipper}/*.s: Add missing copyright headers.
Fri May 17 02:24:43 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/set_d.c: Call _mpz_realloc.
* mpq/set_z.c: New file.
* mpq/Makefile.in: Compile it.
* make.bat: Likewise.
* gmp.h: Declare mpq_set_z.
* mp?/Makefile.in (libmp?.a): Depend on Makefile, not Makefile.in.
* mpf/Makefile.in (test): Delete spurious target.
* mpq/Makefile.in (test): Likewise.
* mpf/out_str.c: Use `e' to separate exponent when base <= 10.
* mpn/configure.in: Treat ultrasparc just like sparc v8,
until 64-bit compilers are ready.
* mpf/set_d.c: Make it work for 64-bit machines.
Thu May 16 20:53:57 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp-impl.h: Set IEEE_DOUBLE_BIG_ENDIAN to 0 for little-endian
machines.
* mpn/x86/gmp-mparam.h: Delete file.
* configure.in: Treat microsparc like sparc8.
* urandom.h: Test __alpha instead of __alpha__, since the former
is the standard symbol.
* mpn/generic/random2.c: Likewise.
* mpf/random2.c: Likewise.
Tue May 14 13:42:39 1996 Torbjorn Granlund (tege@tiny.matematik.su.se)
* mpz/set_f.c: New file.
* mpz/Makefile.in: Compile it.
* gmp.h: Declare mpz_set_f.
* mpf/set_q.c: Simplify expression in rsize == nsize if-then-else arms.
Tue May 14 13:03:07 1996 Torbjorn Granlund (tege@tiny.matematik.su.se)
* make.bat: Add all new files.
Sun May 12 22:24:36 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/set_z.c: New file.
* mpf/Makefile.in: Compile it.
* gmp.h: Declare mpf_set_z.
Sat May 11 19:26:25 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp.h: Declare mpf_set_q.
* mpf/set_q.c: Compute prec-1 limbs in mpn_divrem call.
Fri May 10 17:37:38 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/set_q.c: New file.
* mpf/Makefile.in: Compile it.
* config.sub: Recognize sparc8.
Wed May 8 09:19:11 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/tests/t-dm2exp.c: New file.
* mpf/tests/t-add.c: Correct header comment.
* mpf/tests/t-sub.c: Likewise.
* mpf/tests/t-sqrt.c: Likewise.
* mpf/div.c: Misc variable name cleanups.
* mpf/div_ui.c: Base more closely on mpf/div.c.
* mpf/ui_div.c: Likewise.
* mpz/tests/Makefile.in (check): Depend on Makefile.
* mpq/tests/Makefile.in (check): Likewise.
* mpf/tests/Makefile.in (check): Likewise.
* mpf/tests/t-muldiv.c: New file.
* mpf/tests/Makefile.in: Compile and run `t-muldiv'.
(t-ref.o): Delete spurious rule.
* mpf/sqrt.c: Properly detect negative input operand.
* mpf/sqrt_ui.c: Delete spurious header comment.
* mpf/sqrt.c: Likewise.
* mpz/sqrt.c: Likewise.
* mpz/tests/reuse.c (main): Read `reps' from command line.
* mpf/tests/reuse.c: New file.
* mpf/tests/Makefile.in: Compile and run `reuse'.
* mpf/mul_ui.c: Disable code for removing low zero limbs.
* mpf/div.c: Fix condition for when vp and qp overlaps.
* mpf/add_ui.c: When sum equals u, copy up to prec+1 limbs.
* mpf/out_str.c: Don't output '\n' after exponent.
* mpf/add_ui.c: New special case for when U is completely cancelled.
Wed Apr 24 05:33:28 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* Version 2.0 released.
* All files: Upfate FSF's address.
* Makefile.in (gmp_toc.html): New name for gmp.html.
(TAGS): Depend on force.
* mpf/tests/t-conv.c: Pass -base to mpf_set_str.
Sat Apr 20 03:54:06 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* Makefile.in (ps): New target, depend on gmp.ps.
Fri Apr 19 14:03:15 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/out_str.c: Print `@' before exponent, not `e'.
* make.bat: Update from Makefiles.
Thu Apr 18 01:22:05 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/set_str.c: If parameter `base' is negative, expect exponent
to be decimal, otherwise in the same base as the mantissa.
Wed Apr 17 17:28:36 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/set_dfl_prec.c: Don't return anything.
* gmp.h: Corresponding changes.
* mpf/set_dfl_prec.c: Use `unsigned long int' for bit counts.
* mpf/init2.c: Likewise.
* mpf/get_prc.c: Likewise.
* mpf/set_prc.c: Likewise.
* mpf/set_prc_raw.c: Likewise.
* mpz/popcount.c: Likewise.
* mpz/hamdist.c: Likewise.
* mpz/scan1.c: Likewise.
* mpz/scan0.c: Likewise.
* mpn/generic/popcount.c: Likewise.
* mpn/generic/hamdist.c: Likewise.
* mpn/generic/scan1.c: Likewise.
* mpn/generic/scan0.c: Likewise.
* gmp.h: Likewise.
* mpf/eq.c: New file, based on mpf/diff.c.
* mpf/diff.c: Delete.
* mpf/Makefile.in: Corresponding changes.
* gmp.h: Likewise.
* mpf/reldiff.c: New file.
* mpf/Makefile.in: Compile it.
* gmp.h: Declare mpf_reldiff.
* mpz/iset_d.c: New file.
* mpz/Makefile.in: Compile it.
* gmp.h: Declare mpz_init_set_d.
Tue Apr 16 16:28:31 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* Makefile.in (gmp.html): Pass -acc to texi2html.
Mon Apr 15 16:20:24 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/set_str.c: Switch off code for defaulting the base from the
leading characters.
* gmp.h (mp?_sign): Delete.
(mp?_sgn): New macros.
Fri Apr 12 17:23:33 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* Makefile.in (gmp.dvi): Delete tmp.* at end of rule.
Wed Apr 10 22:52:02 1996 Torbjorn Granlund (tege@tiny.matematik.su.se)
* mpf/random2.c: Change of `exp' param, mp_size_t => mp_exp_t.
* gmp.h: Corresponding change.
* gmp.h (mp_bits_per_limb): Make it const.
Sat Mar 30 01:20:23 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* configure.in: Re-enable recognition of with_gcc.
* mpf/Makefile.in (.c.o): Pass XCFLAGS.
* mpn/Makefile.in (.c.o): Likewise.
* mpz/Makefile.in (.c.o): Likewise.
* mpq/Makefile.in (.c.o): Likewise.
* mpbsd/Makefile.in (.c.o): Likewise.
* mpf/tests/Makefile.in (.c.o): Likewise.
* mpz/tests/Makefile.in (.c.o): Likewise.
* mpq/tests/Makefile.in (.c.o): Likewise.
* Makefile.in (XCFLAGS): Default to empty.
(FLAGS_TO_PASS): Pass on XCFLAGS.
(.c.o): Pass XCFLAGS.
* config/mt-m88110 (XCFLAGS): Define instead of CC.
* config/mt-sprc8-gcc (XCFLAGS): Likewise.
* config/mt-supspc-gcc (XCFLAGS): Likewise.
* configure: Don't default CC to "gcc -O2" is -with-gcc=no was
specified.
Mon Mar 25 01:07:54 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* urandom.h: Test for __SVR4 in addition to __svr4__.
* mp_bpl.c (mp_bits_per_limb): Declare as `const'.
* Makefile.in (CFLAGS): `-O2' => `-O'.
* mpn/Makefile.in (CFLAGS): Likewise.
* gmp-impl.h: Get rid of obsolete field access macros.
* mpn/mp_bases.c (__mp_bases): 1e39 => 1e38 to work around Solaris
cc compiler bug.
* gmp.h (__MPN): Make it work also for non-ANSI compilers.
Thu Mar 21 01:07:54 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/sub.c: New special case for ediff <= 1 before generic code.
Simplify generic code for ediff == 0.
Rename uexp => exp.
Mon Mar 11 18:24:57 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/tests/*.c: Use ref_mpf_sub for error calculation.
* mpf/tests/Makefile.in: Link ref.o to all executables.
* mpf/tests/t-sub.c: Make u = v + 1 with 50% probability.
Sun Mar 10 21:03:17 1996 Torbjorn Granlund (tege@tiny.matematik.su.se)
* mpf/get_str.c: In digit development loop for fractions, change
loop condition from `<' to `<='.
Thu Mar 7 04:58:11 1996 Torbjorn Granlund <tege@tiny.matematik.su.se>
* mpn/mp_bases.c (__mp_bases): 1e100 => 1e39 to avoid overflow warning.
Wed Mar 6 01:10:42 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpf/tests/t-sqrt.c: New file.
* mpf/tests/Makefile.in: Corresponding changes.
* mpf/sqrt.c: Special case for square root of zero.
* mpq/add.c: Clean up variable names.
* mpq/sub.c: Update from mpq/add.c.
* mpz/divexact.c: abs => ABS.
* mpz/gcd.c: Likewise. Rewrite final fixup code, to decrease
allocation. Misc cleanups.
Tue Mar 5 22:24:56 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpn/configure.in: Recognize linuxoldld as a synonym for linuxaout.
* gmp.h (mpn_add, mpn_add_1, mpn_sub, mpn_sub_1): Add prototypes.
* mpn/configure.in: Use t-freebsd also for netbsd.
Mon Mar 4 15:13:28 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpq/Makefile.in (cmp.o): Depend on longlong.h.
* mpq/equal.c: New file.
* mpq/Makefile.in: Corresponding changes.
* mpf/tests/t-add.c: New file.
* mpf/tests/t-sub.c: Renamed from t-addsub.c.
* mpf/tests/ref.c: New file.
* mpf/tests/Makefile.in: Corresponding changes.
* gmp-impl.h (SIZ, ABSIZ, PTR, EXP, PREC, ALLOC): New #defines.
Sun Mar 3 07:45:46 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpf/set_str.c: In exponentiation code, allocate 3 extra
limbs, not just 2.
* mpf/get_str.c: Allocate sufficient space for tstr.
When calculating exp_in_base, round result down.
* mpf/tests/t-conv.c: New file.
* mpf/tests/Makefile.in: Corresponding changes.
* mp_bpl.c: New file.
* gmp.h: Declare it.
* Makefile.in: Corresponding changes.
Sat Mar 2 06:27:56 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpf/set_prc_raw.c: New file.
* mpf/set_prc.c: Renamed from set_prec.c.
* mpf/get_prc.c: New file.
* mpf/Makefile.in: Corresponding changes.
* gmp.h: Declare new functions.
* mpn/generic/gcdext.c: Add copyright header.
Fri Mar 1 01:22:24 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpn/configure.in: For ppc601, search "power" before "powerpc32".
* mp?/Makefile.in (AR_FLAGS): New variable.
(libmp?.a): Use it.
* make.bat: New file.
* mpn/msdos: New directory.
* mpn/msdos/asm-syntax.h: New file.
* mpn/Makefile.in (distclean maintainer-clean): Delete asm-syntax.h.
* config.sub: Recognize [ctj]90-cray.
* mpn/configure.in: Recognize [ctj]90-cray-unicos*.
* mpn/generic/gcdext.c: Don't use alloca directly, use TMP_* macros.
* mpn/generic/gcd.c: Split increment from use of USIZE to avoid
undefined behaviour.
Thu Feb 29 04:11:24 1996 Torbjorn Granlund <tege@matematik.su.se>
* Makefile.in (install-info-files): Update for new install-info
behaviour.
* mpn/power/add_n.s: Rewrite.
* mpn/power/sub_n.s: Rewrite.
Wed Feb 28 01:34:30 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpz/pow_ui.c: Compute allocation more aggressively for small bases.
* mpz/ui_pow_ui.c: Likewise.
* mpn/mp_bases.c (__mp_bases): Put huge value in 2nd field for index 1.
* mpn/generic/sqrtrem.c: sizeof (mp_limb_t) => BYTES_PER_MP_LIMB.
* mpn/generic/gcd.c: Likewise.
(SIGN_BIT): Compute differently.
Mon Feb 26 00:07:36 1996 Torbjorn Granlund <tege@matematik.su.se>
* All files: mp_limb => mp_limb_t, mp_limb_signed => mp_limb_signed_t.
* Makefile.in (install, install-bsdmp, install-info-files): Depend
on installdirs. chmod all installed files.
Sun Feb 25 01:47:41 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpbsd/configure.in: Delete debugging code.
* All Makefile.in: Update clean targets.
* Makefile.in (AR_FLAGS): New variable.
(libgmp.a): Use it.
(libmp.a): Likewise.
* VERSION: Delete file.
* Makefile.in (installdirs): New target.
* mkinstalldirs: New file (from the texinfo package).
* Makefile.in (INSTALL, INSTALL_DATA, INSTALL_PROGRAM): New variables.
(MAKEINFO, MAKEINFOFLAGS, TEXI2DVI): New variables.
(install-info): New target.
(install, install-bsdmp): Depend on install-info.
($(srcdir)/gmp.info): Changed from plain gmp.info; put info files
into source directory.
(distclean, mostlyclean): New targets.
(maintainer-clean): New name for realclean.
(uninstall): New target.
(TAGS): New target.
(info, dvi): New targets.
(.PHONY): Assign.
* Makefile.in (install, install-bsdmp): Use INSTALL_DATA.
* mp{n,z,f,bsd}/move-if-change: Delete.
* mpbsd/Makefile.in (stamp-stddefh): Delete target.
* Makefile.in (.c.o): Pass CFLAGS last.
* mpbsd/Makefile.in (.c.o): Likewise.
* mpf/Makefile.in (.c.o): Likewise.
* mpq/Makefile.in (.c.o): Likewise.
* mpz/Makefile.in (.c.o): Likewise.
* mpn/Makefile.in (.c.o): Likewise.
(.S.o): Likewise.
* memory.c: Change allocation error message.
* Makefile.in (install): Prefix gmp.h with $(srcdir).
(install-bsdmp): Prefix mp.h with $(srcdir).
* mp{n,z,f,bsd}/{configure,config.sub}: Delete.
* Makefile.in (gmp.dvi): Set TEXINPUTS also for 2nd tex invocation
(install targets): Install gmp.info-N.
Sat Feb 24 03:36:52 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpf/get_str.c: Fix typo.
* mpz/legendre.c: Clarify expression with extra parens.
* version.c (gmp_version): Not static.
* mpf/iset_str.c: Properly return error code.
* mpf/add.c: Delete unused variables.
* mpf/inp_str.c: Likewise.
* mpq/get_d.c: Likewise.
* mpn/generic/dump.c: #include <stdio.h>.
* mpf/dump.c: Likewise.
* mpf/set_str.c: #include <ctype.h>.
(strtol): Declare.
* gmp.h: mpn_sqrt => mpn_sqrtrem.
* Makefile.in (clean, realclean): Clean in mpbsd.
(check): Test in mpf.
* mpf/Makefile.in (clean): Clean in tests.
* mpq/Makefile.in (clean): Clean in tests.
* mpf/tests/Makefile.in: New file.
* mpf/tests/configure.in: New file.
* mpf/tests/t-addsub.c: New file.
* mpf/sub_ui.c: Simply call mpf_sub for now.
* mpf/sub.c: Increase prec by 1.
* mpf/ui_sub.c: Likewise.
Fri Feb 23 00:59:54 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpf/ui_sub.c: Fix typos.
* mpf/get_str.c: When allocating space for tmp, allow for an extra
limb. In code for fraction conversion, add special case for bases
that are a power of 2.
* mpf/out_str.c: Output leading "0.".
Default base to 10, before computing string allocation.
* mpf/get_str.c: Make variables for string size have type size_t.
* gmp.h: Corresponding change.
* mpf/random2.c: Allow creation of prec+1 large mantissas.
* mpf/add_ui.c: Don't abort if u < 0; special case for u <= 0.
Fix typo in MPN_COPY offset.
* mpf/sub_ui.c: Analogous changes.
* mpf/set_prec.c: Rewrite.
* mpf/init2.c: Compute precision as in set_prec.c.
* mpf/div_2exp.c: Special case for u == 0.
* mpf/mul_2exp.c: Likewise. Write r->_mp_size always.
* mpf/sqrt_ui.c: mpn_sqrt => mpn_sqrtrem.
* mpf/sqrt.c: Likewise. When computing new exponent, round quotient
towards -infinity.
* mpf/add.c: Fix typos.
* mpf/sub.c: Fix typos.
Thu Feb 22 00:24:48 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpz/Makefile.in (stamp-stddefh): Delete target.
(test): Delete target.
* Makefile.in (stamp-stddefh): Delete target.
(cre-stddefh.o): Delete target.
(gmp.dvi): Set TEXINPUTS before invoking tex.
* cre-stddefh.c: Delete.
* mpz/sqrt.c: Fix typo.
* mpz/powm.c: Special case for mod == 0.
* mpz/powm_ui.c: Likewise.
* mpz/get_si.c: Handle -0x80000000 correctly.
* mpz/inp_str.c: Now returns size_t.
Make it return number of bytes read or error indication.
* mpf/inp_str.c: Likewise.
* mpz/out_raw.c: Replace by mpz/out_binary.c, with modifications.
* mpz/inp_raw.c: Rewrite, using mpz/inp_binary as a base.
* mpz/inp_binary.c: Delete.
* mpn/Makefile.in (XCFLAGS): Remove variable.
(.c.o): Don't pass XCFLAGS.
(SFLAGS): Set to nothing.
(.S.o): Pass SFLAGS, not XCFLAGS.
* mpn/config/t-freebsd (SFLAGS): New name for XCFLAGS.
* mpf/out_str.c: Make return number of bytes written or error
indication.
* mpz/out_str.c: Likewise.
* gmp.h: Corresponding changes.
* gmp.h (__mpz_struct): mp_size_t => int.
(__mpq_struct): Likewise.
(__mpf_struct): Likewise.
(mp_size_t): int => long int.
* mpn/cray: New directory.
* mpn/cray/gmp-mparam.h: New file.
* mpn/configure.in: Recognize cray variants.
* Makefile.in: Set defaults for prefix, libdir, etc.
(install): New target.
(install-bsdmp): New target.
(gmp.html): New target.
* stack-alloc.c (__tmp_alloc): Cast void ptrs to char * in comparison.
Wed Feb 21 04:35:02 1996 Torbjorn Granlund <tege@matematik.su.se>
* gmp.h: Sort mpn declarations.
(mpn_gcdext): Add declaration.
* mpn/generic/divrem_1.c: New file.
* mpn/Makefile.in (divrem_1.o): New rule.
* configure.in (functions): Add divrem_1.
* mpn/generic/divmod.c: Delete file.
* mpn/configure.in (functions): Delete divmod.
* Makefile.in (divmod.o): Delete rule.
* gmp.h (mpn_divmod): New #define.
* gmp.h (mpn_next_bit_set): Delete spurious declaration.
* mpn/generic/divrem.c (default case): In code assigning
most_significant_q_limb, move reassignment of n0 into if statement.
* gmp.h (mpf_inp_str): Fix typo.
(mpf_out_str): Make prototype match reality.
* mpf/inp_str.c: New file.
* mpf/out_str.c: New file.
* mpf/Makefile.in: Compile new files.
* mpn/Makefile.in (dump.o): Fix dependency path.
(inlines.o): Likewise.
* mpn/configure.in: Make m68060 be the same as m68000. Clean up
m68k configs.
Tue Feb 20 01:35:11 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpn/generic/sqrtrem.c: Renamed from sqrt.
* mpn/configure.in (functions): Corresponding change.
* mpn/Makefile.in: Likewise.
* mpz/sqrtrem.c: Likewise.
* mpz/sqrt.c: Likewise.
* mpn/generic/perfsqr.c: Likewise.
* Makefile.in (clean): Also remove libmp.a.
Don't compile cre-conv-tab.c or mp_bases.c.
cre-conv-tab.c: Delete file.
(gmp.ps): New rule.
* mpn/mp_bases.c: New file.
* mpn/Makefile.in: Compile mp_bases.c.
* mpz/set_str.c: Skip initial whitespace.
* mpf/set_str.c: Likewise.
* mpbsd/xtom.c: Likewise.
* gmp.h: Add missing mpz declarations.
Delete all formal parameter names from declarations.
* mpn/Makefile.in: Add dependencies for .c files.
* Makefile.in (check): Write recursive make calls separately, not as
a loop.
(FLAGS_TO_PASS): New variable. Use it for most recursive makes.
Mon Feb 19 01:02:20 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpn/Makefile.in (.S.o): Pipe cpp output to grep in order to delete
lines starting with #.
(CPP): Set to $(CC) -E to avoid gcc dependency.
* mpn/m68k/syntax.h (moveql): Define to moveq for MIT_SYNTAX.
* mpn/hppa/hppa1_1/pa7100/addmul_1.S: Fix typo in s1_ptr alignment
code.
* mpn/hppa/hppa1_1/pa7100/submul_1.S: Likewise.
* gmp.h: Fix typos in #defines of recently added mpn functions.
* mpz/inp_str.c: Skip all whitespace, not just plain space.
* mpbsd/min.c: Likewise.
* mpn/configure.in (functions): Add gcdext.
* mpn/generic/gcdext.c: New file.
* mpz/legendre.c: mpz_div_2exp => mpz_tdiv_q_2exp.
* gmp.h: Surround mpn declarations with extern "C" { ... }.
* Makefile.in (check): New target.
* mpq/get_d.c: Update comments. Use rsize instead of dsize + N_QLIMBS
when possible. Add special case for nsize == 0.
* gmp.h (mpq_get_d): Add declaration.
(mpq_canonicalize): Likewise.
(mpq_cmp_ui): Likewise.
(mpf_diff): Likewise.
(mpf_ui_sub): Likewise.
(mpf_set_prec): Likewise.
(mpf_random2): Likewise.
* gmp.h (mpz_cmp_ui): New #define.
(mpz_cmp_si): New #define.
(mpq_cmp_ui): New #define.
(mpz_sign): New #define.
(mpq_sign): New #define.
(mpf_sign): New #define.
(mpq_numref): New #define.
(mpq_denref): New #define.
* mpq/set_z.c: File deleted.
* mpq/Makefile.in: Corresponding changes.
Sun Feb 18 01:34:47 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpbsd/sdiv.c: Use _mp_realloc, not _mpz_realloc.
* mpz/inp_binary.c: Default stream to stdin.
* mpz/inp_str.c: Likewise.
* mpz/inp_raw.c: Likewise.
* mpz/out_binary.c: Default stream to stdout.
* mpz/out_raw.c: Likewise.
* mpz/out_str.c: Likewise.
* mpbsd/realloc.c: New file.
* mpbsd/Makefile.in: Corresponding changes.
* mpbsd/min.c: Rewrite (base on mpz/inp_str.c).
* mpbsd/mtox.c: Rewrite (base on mpz/get_str.c).
* mpbsd/mout.c: Rewrite (base on mpz/out_str) but make it output
spaces in each 10th position.
* mpbsd/xtom.c: Rewrite (base on mpz/set_str).
* mpq/tests/Makefile.in (st-cmp): New file.
* mpq/tests/configure.in (srcname): New file.
* mpz/tests/configure.in (srcname): Fix typo.
* mpq/cmp.c: Add check using number of significant bits, to avoid
general multiplication.
Sat Feb 17 11:58:30 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpq/cmp_ui.c: Store cy_limb after the mpn_mul_1 calls.
* mpq/tests: New directory.
* mpq/tests/t-cmp.c: New file.
* mpq/tests/t-cmp_ui.c: New file.
* mpz/tests/dive.c (main): Generate zero numerator.
(get_random_size) : Delete.
* mpz/divexact.c: Add special case for 0/x.
* gmp.h (mpz_mod): Add declaration.
Fri Feb 16 18:18:39 1996 Andreas Schwab <schwab@informatik.uni-dortmund.de>
* mpn/m68k/*: Rewrite code not to use the INSN macros.
(L): New macro to properly prefix local labels for ELF.
Fri Feb 16 00:20:56 1996 Torbjorn Granlund <tege@matematik.su.se>
* gmp-impl.h (ieee_double_extract): Use plain `unsigned int' for
fields.
* mpn/generic/inlines.c (_FORCE_INLINES): New #define. Delete
conditional __GNUC__.
* gmp.h (mpn_add, mpn_sub, mpn_add_1, mpn_sub_1):
Only define these if __GNUC__ || _FORCE_INLINES.
* mpf/random2.c: Add missing parameter in non-ANSI header.
* mpn/generic/gcd.c (SIGN_BIT): Do as #define to work around bug
in AIX compilers.
* mpq/get_d.c: #define N_QLIMBS.
* mpz/divexact.c: Obscure division by 0 to silent compiler warnings.
* stack-alloc.c: Cast void* pointer to char* before doing arithmetic
on it.
* Makefile.in (mpbsd/libmpbsd.a): New rule.
* configure.in (configdirs): Add mpbsd.
* gmp.h: Add declarations for a few missing mpn functions.
* Makefile.in (libmp.a): New rule.
* mpbsd/mdiv.c: #include "dmincl.c", not "mpz_dmincl.c"
* gmp.h: Move #define of __GNU_MP__ into the `#if __GNU_MP__' block.
* mp.h: Likewise. Update typedefs from gmp.h.
* mpbsd/configure.in: New file.
* mpbsd/Makefile.in: New file.
* mpbsd/configure: Link to master configure.
* mpbsd/config.sub: Link to master config.sub.
* Makefile.in: Set RANLIB_TEST.
* (libgmp.a): Use it.
* (libgmp.a): Do ranlib before moving the libgmp.a to the build
directory.
* mp?/Makefile.in: Don't use or set RANLIB.
Thu Feb 15 16:38:41 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpz/add_ui.c: MP_INT => mpz_t.
* mpz/cmp_ui.c: Likewise.
* mpz/fac_ui.c: Likewise.
* mpz/inp_binary.c: Likewise.
* mpz/inp_raw.c: Likewise.
* mpz/legendre.c: Likewise.
* mpz/jacobi.c: Likewise.
* mpz/out_binary.c: Likewise.
* mpz/out_raw.c: Likewise.
* mpz/random2.c: Likewise.
* mpz/random.c: Likewise.
* mpz/realloc.c: Likewise.
* mpz/legendre.c: __mpz_2factor(X) => mpz_scan1(X,0),
__mpz_odd_less1_2factor => mpz_scan1(X,1).
* mpz/ntsup.c: File deleted.
* mpz/Makefile.in: Corresponding changes.
* mpz/pprime_p: Use mpz_scan1 to avoid looping.
* mpz/fac_ui.c: Type of `k' and `p' is `unsigned long'.
* mpz/pprime_p.c: Pass long to *_ui functions.
* mpz/gcdext.c: Likewise.
* mpz/fdiv_r_2exp.c: Likewise.
* mpz/fac_ui.c: Likewise.
* mpz/powm.c: Don't use mpn_rshift when mod_shift_cnt is 0.
* mpz/tests/Makefile.in (st-sqrtrem): Fix typo.
* mpz/cmp_ui.c: #undef mpz_cmp_ui.
* mpz/cmp_si.c: #undef mpz_cmp_si.
* gmp.h (mpz_cmp_ui): New #define.
(mpz_cmp_si): New #define.
Wed Feb 14 22:11:24 1996 Torbjorn Granlund <tege@matematik.su.se>
* gmp.h: Test __cplusplus in addition to __STDC__.
* gmp-impl.h: Likewise.
* gmp.h: Surround declarations with extern "C" { ... }.
Tue Feb 13 15:20:45 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpz/fdiv_r_2exp.c: Use MPN_NORMALIZE.
* mpz/tdiv_r_2exp.c: Likewise.
* mpz/fdiv_r_2exp.c: New file.
* mpz/fdiv_q_2exp.c: New file.
* mpz/tdiv_r_2exp.c: Renamed from mpz/mod_2exp.c.
* mpz/tdiv_q_2exp.c: Renamed from mpz/div_2exp.c
* mpz/Makefile.in: Corresponding changes.
* mpz/scan0.c,scan1.c: New files.
* mpz/Makefile.in: Compile them.
* gmp.h (mpn_normal_size): Delete.
* config.guess: Update from Cygnus version.
* mpn/m68k/rshift.S: Use INSN2 macro for lea instructions.
* mpn/m68k/lshift.S: Likewise.
* mpn/configure.in: Fix configuration for plain 68000.
Mon Feb 12 01:06:06 1996 Torbjorn Granlund <tege@matematik.su.se>
* mpz/tests/t-powm.c: Generate negative BASE operand.
* mpz/powm.c: Make result always positive.
Sun Feb 11 01:44:56 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/tests/*.c: Add t- prefix.
* mpz/tests/Makefile.in: Corresponding changes.
* mpz/tests/configure.in: Update srctrigger.
* mpz/tests/gcd.c: Generate negative operands.
* mpz/tests/gcd2.c: Likewise.
* mpz/gcdext.c: At end, if G is negative, negate all G, S, and T.
Thu Feb 8 17:16:12 UTC 1996 Ken Weber <kweber@mat.ufrgs.br>
* mp{z,n}/gcd.c: Change mpn_gcd interface.
* gmp.h: Ditto.
* gmp.texi: update documentation.
Mon Feb 7 23:58:43 1996 Andreas Schwab <schwab@informatik.uni-dortmund.de>
* mpn/m68k/{lshift,rshift}.S: New files.
* mpn/m68k/syntax.h: New ELF_SYNTAX macros.
(MEM_INDX, R, PROLOG, EPILOG): New macros.
* mpn/m68k/*.S: Use R macro with register name. Use PROLOG and EPILOG
macros. Rename `size' to `s_size' or s1_size to avoid clash with ELF
.size directive.
* mpn/configure.in: New target m68k-*-linux*.
Wed Feb 7 07:41:31 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* Makefile.in (cre-conv-tab): Workaround for SunOS make.
* mpz/tests/reuse.c: New file.
* mpz/tests/Makefile.in: Handle reuse.c.
Tue Feb 6 11:56:24 UTC 1996 Ken Weber <kweber@mat.ufrgs.br>
* mpz/gcd.c: Fix g->size when one op is 0 and g == other op.
Tue Feb 6 01:36:39 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp.h (mpz_divexact): Delete parameter names.
(mpz_lcm): Delete spurious declaration.
* mpz/dmincl.c: Fix typo.
Mon Feb 5 01:11:56 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/generic/gcd.c (gcd_2): Declare consistently.
* mpz/tdiv_q.c: Optimize division by a single-limb divisor.
* mpz/dmincl.c: Likewise.
* mpz/add.c: Use MPN_NORMALIZE instead of mpn_normal_size.
* mpz/sub.c: Likewise.
* mpn/generic/sqrt.c: Likewise.
* mpn/tests/{add_n,sub_n,lshift,rshift}.c: Put garbage in the
destination arrays.
Fri Feb 2 02:21:27 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/{jacobi.c,legendre.c,ntsup.c,invert.c}: New files.
* mpz/Makefile.in: Compile them.
* mpn/Makefile.in (INCLUDES): Don't search in `generic'.
Thu Feb 1 02:15:11 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
Change from Ken Weber:
* mpz/divexact.c: Make it work when quot is identical to either input.
* mpf/ui_sub.c: New file.
* mpf/Makefile.in: Compile it.
* gmp-impl.h (MPZ_TMP_INIT): alloca -> TMP_ALLOC.
* mpz/{c,f}div_{q,qr,r}.c: Use TMP_DECL/TMP_MARK/TMP_FREE since
these use MPZ_TMP_INIT.
* mpz/mod.c: Likewise.
* mpq/{add,sub}.c: Likewise.
* mpq/canonicalize: Likewise.
* mpq/{add,sub,mul,div}.c: Use mpz_divexact. MP_INT -> mpz_t.
* mpq/canonicalize.c: Likewise.
Wed Jan 31 01:45:00 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/generic/gcd.c: Misc changes from Ken.
* mpz/tests/gcd2.c: New file.
* mpz/tests/Makefile.in: Handle gcd2.c.
* mpn/generic/gcd.c (mpn_gcd): When GCD == ORIG_V, return vsize,
not orig_vsize. Fix parameter declaration.
* mpz/mod_ui.c: Delete file.
* mpz/Makefile.in: Don't try to compile mod_ui.
* mpz/cdiv_*_ui.c): Make them work right.
* gmp.h: Declare cdiv*.
Tue Jan 30 02:22:56 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/{cdiv_q.c,cdiv_q_ui.c,cdiv_qr.c,cdiv_qr_ui.c,cdiv_r.c,
cdiv_r_ui.c,cdiv_ui.c}: New files.
* mpz/Makefile.in: Compile them.
* All files: Make file permissions right.
Changes from Ken Weber:
* mpn/generic/accelgcd.c: Delete.
* mpn/generic/bingcd.c: Delete.
* mpn/generic/numbits.c: Delete.
* mpn/generic/gcd.c: New file.
* mpn/configure.in (functions): Update accordingly.
* mpz/divexact.c: New file.
* mpz/Makefile.in: Compile divexact.c.
* mpz/gcd.c: Rewrite to accommodate for gcd changes in mpn.
* gmp.h: declare new functions, delete obsolete declarations.
* mpz/tests/dive.c: New file.
* mpz/tests/Makefile.in: Handle dive.c.
Mon Jan 29 03:53:24 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/random.c: Handle negative SIZE parameter.
* mpz/tests/tdiv(_ui).c: New name for tst-dm(_ui).c.
* mpz/tests/tst-mdm(_ui).c: Delete.
* mpz/tests/fdiv(_ui).c: New test based in tst-mdm(_ui).
* mpz/tests/*.c: Get rid of tst- prefix for DOS 8+3 naming.
* mpz/tests/Makefile.in: Corresponding changes.
* mpz/tests/configure.in: Update srctrigger.
* mpn/generic/divmod.c: Update from divrem.
* mpn/generic/divrem.c: Misc cleanups.
Sun Jan 28 03:25:08 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* All files: Use new TMP_ALLOC interface.
* mpz/powm_ui.c: Make Jan 25 changes to powm.c also here.
* mpz/tests/powm_ui.c: New file.
* mpz/tests/Makefile.in: Add rules for tst-powm and tst-powm_ui.
* Makefile.in: Update dependency list.
* mpf/Makefile.in: Likewise.
* mpz/Makefile.in: Likewise.
* mpq/Makefile.in: Likewise.
* Makefile.in: Set RANLIB simply to ranlib, and allow configure
to override it.
* mpz/Makefile.in (conf): Delete spurious target.
(mp_bases.c): Delete.
(cre-conv-tab rules): Delete.
* Makefile.in (cre-conv-tab): Greatly simplify.
Sat Jan 27 13:38:15 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* stack-alloc.c: New file.
* stack-alloc.h: New file.
* gmp.h (__gmp_inline): Define using __inline__.
Thu Jan 25 00:28:37 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/generic/scan0.c: New file.
* mpn/generic/scan1.c: Renamed from next_bit.c.
* mpn/configure.in (functions): Include scan0 and scan1.
* mpn/m68k/*: #include sysdep.h. Use C_GLOBAL_NAME.
* configure: Update from Cygnus version.
* config.guess: Likewise.
* config.sub: Likewise.
* configure: Pass --nfp to recursive configures.
* mpz/tests/tst-*.c: Adjust SIZE and reps.
* mpz/powm.c: Move esize==0 test earlier.
In final reduction of rp,rsize, don't call mpn_divmod unless
reduction is really needed.
* mpz/tests/tst-powm.c: Fix thinko in checking code.
* All files: Get rid of `__' prefix from mpn_* calls and declarations.
* gmp.h: #define __MPN.
* gmp.h: Use __MPN in #defines for mpn calls.
* mpn/generic/mul_n.c: Prepend `i' to internal routines.
* gmp-impl.h: Add #defines using __MPN for those internal routines.
* mpn/generic/sqrt.c: Change call to mpn_mul to mpn_mul_n.
Wed Jan 24 13:28:19 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/sparc32/udiv_fp.S: New name for udiv_qrnnd.S.
* mpn/sparc32/udiv_nfp.S: New name for v8/udiv_qrnnd.S.
* mpn/sparc32/v8/supersparc: New directory.
* mpn/sparc32/v8/supersparc/udiv.S: New file.
Tue Jan 23 01:10:11 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
This major contribution is from Ken Weber:
* mpn/generic/accelgcd.c: New file.
* mpn/generic/bdivmod.c: New file.
* mpn/generic/bingcd.c: New file.
* mpn/generic/gcd_1.c: Rewrite.
* mpn/generic/numbits.c: New file (to go away soon).
* mpz/gcd.c: Rewrite.
* mpz/tests/tst-gcd.c (SIZE): Now 128.
* gmp.h: Declare new functions.
* mpn/configure.in (functions): List new files.
* gmp-impl.h (MPN_SWAP): Delete.
(MPN_LESS_BITS_LIMB, MPN_LESS_BITS, MPN_MORE_BITS): Delete.
(MPN_COMPL_INCR, MPN_COMPL): Delete.
Mon Jan 22 02:04:59 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp.h (mpn_name): New #define.
* mpn/m88k/mc88110/addmul_1.s: New file.
* mpn/m88k/mc88110/add_n.S: New file.
* mpn/m88k/mc88110/sub_n.S: New file.
* mpn/m88k/sub_n.s: Correctly initialize carry.
* mpn/sparc32/{add_n.S,sub_n.S,lshift.S,rshift.S): `beq' => `be'.
Sun Jan 21 00:04:35 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/sparc64/addmul_1.s: New file.
* mpn/sparc64/submul_1.s: New file.
* mpn/sparc64/rshift.s: New file.
Sat Jan 20 00:32:54 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpz/iset.c: Fix typo introduced Dec 25.
Wed Jan 17 13:16:44 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* config/mt-sprc8-gcc: New name for mt-sparc8-gcc.
* config/mt-sparcv8-gcc: Delete.
* configure.in: Corresponding changes.
Tue Jan 16 16:31:01 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp-impl.h: #include alloca.h when necessary.
* longlong.h: Test __alpha instead of __alpha__, since the former
is the standard symbol.
Mon Jan 15 18:06:57 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/sparc64/mul_1.s: Swap operands of mulx instructions.
* mpn/sparc64/lshift.s: New file.
Fri Dec 29 17:34:03 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/x86/pentium/add_n.S: Get rid of #defines for register names.
* mpn/x86/pentium/sub_n.S: Likewise.
Thu Dec 28 03:16:57 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/x86/pentium/mul_1.S: Rework loop to avoid AGI between update
of loop induction variable and load insn at beginning of loop.
* mpn/x86/pentium/addmul_1.S: Likewise.
* mpn/x86/pentium/submul_1.S: Likewise.
Mon Dec 25 23:22:55 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* All files: Prefix user-visible structure fields with _mp_.
Fri Dec 22 20:42:17 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/configure.in (m68k configs): Terminate path variable with
plain "m68k".
Fri Dec 22 03:29:33 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/sparc32/add_n.S: Update from sub_n.S to fix bugs, and to
clean things up.
* mpn/configure.in (m68k configs): Update #include path for new
mpn directory organization.
Tue Dec 12 02:53:02 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* gmp.h: Prefix all structure field with _mp_.
* gmp-impl.h: Define access macros for these fields.
Sun Dec 10 00:47:17 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/alpha/addmul_1.s: Prefix labels with `.'.
* mpn/alpha/submul_1.s: Likewise.
* mpn/alpha/[lr]shift.s: Likewise.
* mpn/alpha/udiv_qrnnd.S: Likewise.
* mpn/alpha/ev5/[lr]shift.s: Likewise.
* mpn/alpha/ev5/lshift.s: Fix typos.
Fri Dec 1 14:28:20 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/Makefile.in (.SUFFIXES): Define.
Wed Nov 29 23:11:57 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/sparc64/{add_n.s, sub_n.s}: New files.
Tue Nov 28 06:03:13 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/x86/syntax.h: Handle ELF_SYNTAX.
Rename GAS_SYNTAX => BSD_SYNTAX.
* mpn/configure.in: Handle linuxelf and SysV for x86 variants.
Mon Nov 27 01:32:12 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/hppa/hppa1_1/pa7100/submul_1.S: New file.
Sun Nov 26 04:30:47 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
* mpn/hppa/hppa1_1/pa7100/addmul_1.S: New file.
* mpn/sparc32/add_n.S: Rewrite to use 64 bit loads/stores.
* mpn/sparc32/sub_n.S: Likewise.
Fri Nov 17 00:18:46 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/configure.in: Handle m68k on NextStep.
Thu Nov 16 02:30:26 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn: Reorganize machine-specific directories.
* mpn/configure.in: Corresponding changes.
(sh, sh2): Handle these.
(m68k targets): Create asm-syntax.h.
Thu Nov 9 02:20:50 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/generic/mul_n.c (____mpn_sqr_n): Delete code that calls abort.
(____mpn_mul_n): Likewise.
Tue Nov 7 03:25:12 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpf/get_str.c: In exponentiation code (two places), don't swap
input and output areas when calling mpn_mul_1.
* mpf/set_str.c: Likewise.
Fri Nov 3 02:35:58 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpf/Makefile.in: Make sure all objects are listed in dependency list;
delete spurious entries.
* mpf/mul.c: Handle U or V being 0. Allow prec+1 for result precision.
* mpf/set_prec.c: New computation of limb precision.
* mpf/set_dfl_prec.c: Likewise.
* mpf/random2.c: Fix typo computing exp.
* mpf/get_str.c: In (uexp > usize) case, set n_limbs as a function of
the user-requested number of digits, n_digits.
Thu Nov 2 16:25:07 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/generic/divrem.c (case 2): Don't move np vector back, it is
never read.
(default case): Put most significant limb from np in new variable n2;
decrease size argument for MPN_COPY_DECR; use n2 instead of np[dsize].
Wed Nov 1 02:59:53 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/sparc/[lr]shift.S: New files.
Tue Oct 31 00:08:12 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpz/gcd_ui.c: Set w->size unconditionally when v is zero.
* gmp-impl.h (assert): Delete definition.
* mpf/sub.c: Delete all assert calls. Delete variable `cy'.
* mpf/neg.c: Use prec+1 as precision. Optimize for when arguments
are the same.
* mpf/abs.c: Likewise.
* mpf/{set,neg,abs}.c: Make structure and variable names similar.
Mon Oct 30 12:45:26 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpf/random2.c (random): Test __SVR4 in addition to __svr4__.
* mpn/generic/random2.c (random): Likewise.
Sun Oct 29 01:54:28 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpf/div.c: Special handle U or V being 0.
* mpf/random2.c: New file.
* longlong.h (i860 rshift_rhlc): Define.
(i960 udiv_qrnnd): Define.
(i960 count_leading_zeros): Define.
(i960 add_ssaaaa): Define.
(i960 sub_ddmmss): Define.
(i960 rshift_rhlc): Define.
Sat Oct 28 19:09:15 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/pentium/rshift.S: Fix and generalize condition for when to use
special code for shift by 1.
* mpn/pentium/lshift.S: Likewise.
Thu Oct 26 00:02:56 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* gmp.h: #undef __need_size_t.
* mp.h: Update from gmp.h.
Wed Oct 25 00:17:27 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpf/Makefile.in: Compile set_prec.c.
* mpf/realloc.c: Delete this file.
* mpf/Makefile.in: Delete mentions of realloc.c.
* gmp.h (__mpf_struct): Get rid of `alloc' field.
* mpf/clear.c: Likewise.
* mpf/init*.c: Likewise.
* mpf/set_prec.c: Likewise.
* mpf/iset*.c: Likewise.
* mpf/iset_str.c: New file.
* mpn/configure.in: Handle pyramid.
* mpf/set.c: Use prec+1 as precision.
* mpf/set_prec.c: New file.
Tue Oct 24 00:56:41 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/generic/divrem.c: New file. Will replace mpn/generic/divmod.c
when rest of source is converted.
* mpn/configure.in (functions): Add `divrem'
* mpn/generic/set_str.c: Never call __mpn_mul_1 with zero size.
* mpf/get_str.c: Completely rewritten.
* mpf/add.c: Fix several problems.
* mpf/sub.c: Compare operands from most significant end until
first difference, exclude skipped limbs from computation.
Accordingly simplify normalization code.
* mpf/set_str.c: Fix several problems.
* mpf/dump.c: New file.
* mpf/Makefile.in: Compile dump.c.
* mpf/init2.c: Set prec field correctly.
Sun Oct 22 03:02:09 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* cre-conv-tab.c: #include math.h; don't declare log and floor.
Sat Oct 21 23:04:10 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpf/mul_ui.c: Handle U being 0.
Wed Oct 18 19:39:27 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/generic/set_str.c: Correctly handle input like "000000000000".
Misc cleanups.
Tue Oct 17 15:14:13 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* longlong.h: Define COUNT_LEADING_ZEROS_0 for machines where
appropriate.
Mon Oct 16 19:14:43 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpf/add.c: Rewrite.
* mpf/set_str.c: New file. Needs more work.
Sat Oct 14 00:14:04 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpf/div_2exp.c: Vastly simplify.
* mpf/mul_2exp.c: Likewise.
* mpf/sub.c: Rewrite.
* gmp-impl.h (udiv_qrnnd_preinv2gen): Terminate comment.
* mpf/dump.c: Free allocated memory.
* gmp-impl.h (assert): Define.
Wed Oct 11 13:31:00 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/pentium/rshift.S: Install new code to optimize shift-by-1.
Tue Oct 10 00:37:21 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/pentium/lshift.S: Install new code to optimize shift-by-1.
* mpn/powerpc32/{lshift.s,rshift.s}: New files.
* configure.in: Fix typo.
Sat Oct 7 08:17:09 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* longlong.h (smul_ppmm): Correct type of __m0 and __m1.
Wed Oct 4 16:31:28 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/configure.in: Handle alphaev5.
* mpn/ev4: New name for alpha subdir.
* mpn/ev5: New subdir.
* mpn/ev5/lshift.s: New file.
Tue Oct 3 15:06:45 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/alpha/mul_1.s: Avoid static increments of pointers; use
corresponding offsets in ldq and stq instructions instead.
(Loop): Swap cmpult and stq to save one cycle on EV5.
* mpn/tests/{add_n.s,sub_n.s,lshift.s,rshift.s,mul_1.s,addmul_1.s,
submul_1.s}: Don't check results if NOCHECK is defined.
Mon Oct 2 11:40:18 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* longlong.h (mips umul_ppmm [32 and 64 bit versions]):
Make new variants, based on GCC version number, that use `l' and `h'
constraints instead of explicit mflo and mfhi instructions
Sun Oct 1 00:17:47 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/mc88100/add_n.s: Decrease unrolling factor from 16 to 8.
* mpn/mc88100/sub_n.s: Likewise.
* config/mt-m88110: New file.
* configure.in: Use it.
* mpn/mc88110/mul_1.s: Fix thinko.
Sat Sep 30 21:28:19 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpz/set_d.c: Declare `size' at function start.
* experimental: New directory for mpx and mpz2.
* mpz/tdiv_q.c: Clarify comments.
* mpz/{mod.c,mod_ui.c}: New file, for math mod function.
* mpn/sh2/{mul_1.s,addmul_1.s,submul_1.s}: New files.
* mpn/sh/{add_n.s,sub_n.s}: New files.
* mpn/pyr/{add_n.s,sub_n.s,mul_1.s,addmul_1.s}: New files.
* mpn/i960/{add_n.s,sub_n.s}: New files.
* mpn/alpha/addmul_1.s (Loop): Move decrement of r18 to before umulh,
to save cycles on EV5.
* mpn/alpha/submul_1.s: Ditto.
* mpn/alpha/mul_1.s: Ditto.
Thu Sep 28 02:48:59 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* gmp.h (mp_limb, mp_limb_signed): Define as `long long' if
_LONG_LONG_LIMB is defined.
* longlong.h (m88110): Test __m88110__, not __mc88110__
* mpn/mc88110/mul_1.s: Rewrite.
Tue Sep 26 23:29:05 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* config.sub: Update from current Cygnus version.
* mpn/configure.in: Recognize canonical m88*, not mc88*.
Fri Sep 22 14:58:05 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpz/set_d.c: New file.
* mpz/Makefile.in: Build new files.
* mpq/get_d.c: Replace usage of scalbn with ldexp.
* mpn/{vax,i386}/gmp-mparam.h: New files.
* gmp-impl.h (ieee_double_extract): Define here.
* mpf/set_d.c (ieee_double_extract): Not here.
Thu Sep 21 00:56:36 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* longlong.h (C umul_ppmm): Use UWtype, not USItype for temps.
(udiv_qrnnd): For cases implemented with call to __udiv_qrnnd,
protect with new symbol LONGLONG_STANDALONE.
(68000 umul_ppmm): Use %# prefix for immediate constants.
Wed Sep 20 15:36:23 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/generic/divmod_1.c: Handle
divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
specifically also when normalization_steps != 0.
Mon Sep 18 15:42:30 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpq/get_d.c: New file.
Sun Sep 17 02:04:36 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* longlong.h (pyr): Botch up for now.
Sat Sep 16 00:11:50 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/clipper/mul_1.s: New file.
* mpn/clipper/add_n.s: New file.
* mpn/clipper/sub_n.s: New file.
* mpn/configure.in: Handle clipper*-*-*.
* mpn/configure.in: Recognize rs6000-*-*.
Fri Sep 15 00:41:34 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/alpha/add_n.s: New file.
* mpn/alpha/sub_n.s: New file.
* mpn/mips3: New name for mpn/r4000.
* mpn/mips2: New name for mpn/r3000.
* mpn/configure.in: Corresponding changes.
* mpn/generic/perfsqr.c (primes): Delete.
(residue_map): Delete.
Thu Sep 14 00:07:58 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/r3000/sub_n.s: Fix typo.
* dm_trunc.c: Delete spurious file.
* mpz/out_binary.c: Fix typo.
* mpn/configure.in (per-target): Make mips*-*-irix6* imply r4000.
* gmp-impl.h: For sparc and sgi, include alloca.h.
* mpn/z8000/mul_1.s: Replace `test r' with `and r,r'. Replace
`ldk r,#0' with `xor r,r'.
Wed Sep 6 00:58:38 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpz/inp_binary.c: New file.
* mpz/out_binary.c: New file.
* mpz/Makefile.in: Build new files.
Tue Sep 5 22:53:51 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* gmp.h (__mpz_struct): Change `long int' => `mp_size_t' for alloc
and size fields.
Sat Sep 2 17:47:59 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/r4000/{add_n.s,sub_n.s}: Optimize away some pointer arithmetic.
* mpn/r3000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files,
derived from r4000 code.
Fri Sep 1 05:35:52 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/r3000/mul_1.s: Fix typo.
* mpn/powerpc32: Fix some old vs new mnemonic issues.
* mpn/powerpc32/{add_n.s,sub_n.s}: New files.
* mpn/r4000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files.
Wed Aug 30 10:43:47 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/r3000/mul_1.s ($LC1): Use addiu for immediate add.
* mpn/r4000/{mul_1.s,addmul_1.s,submul_1.s}: New files.
* config.guess: Update to latest FSF revision.
Mon Aug 28 02:18:13 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpz/out_str.c: Cast str to char * in fputs call.
* gmp-impl.h: Define UQItype, SItype, and USItype also
when not __GNUC__.
Fri Aug 25 01:45:04 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/i386/syntax.h: Renamed from asm-syntax.h.
* mpn/mc68020/syntax.h: Renamed from asm-syntax.h.
* mpn/configure.in: Corresponding changes.
Sun Aug 13 19:20:04 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* mpn/generic/random2.c: Test __hpux, not hpux.
Sat Apr 15 20:50:33 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/sparc/add_n.S: Make it work for PIC.
* mpn/sparc/sub_n.s: Likewise.
* mpn/sparc8/addmul_1.S: Likewise.
* mpn/sparc8/mul_1.S: Likewise.
* mpn/i386/add_n.S: Likewise.
* mpn/i386/sub_n.S: Likewise.
Thu Apr 13 23:15:03 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/configure.in: Don't search power subdir for generic ppc configs.
Add some ppc cpu-specific configs. Misc clean up.
Mon Apr 10 00:16:35 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpz/ui_pow_ui.c: Delete spurious code to handle negative results.
Sun Apr 9 12:38:11 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* longlong.h (SPARC v8 udiv_qrnnd): Generate remainder in C,
not in asm.
* mpn/generic/sqrt.c (SQRT): Test for __SOFT_FLOAT.
Tue Mar 28 00:19:52 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/generic/hamdist.c (popc_limb): Make Mar 16 change here too.
Fri Mar 17 23:29:22 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* longlong.h (SH umul_ppmm): Define.
Thu Mar 16 16:40:44 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/generic/popcount.c (popc_limb): Rearrange 32 bit case
to help CSE.
Fri Mar 10 20:03:49 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/powerpc32/mul_1.s: Clear cy before entering loop.
Rearrange loop to save a cycle.
* mpn/powerpc32/addmul_1.s: New file.
* mpn/powerpc32/submul_1.s: New file.
Fri Feb 17 22:44:45 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/configure.in: Set target_makefile_frag for freebsd
in new case stmt.
* mpn/config/t-freebsd: New file.
* mpn/Makefile.in: Add #### for frag insertion.
(XCFLAGS): Clear by default.
(.c.o, .S.o rules): Pass XCFLAGS.
Tue Feb 7 16:27:50 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* longlong.h (68000 umul_ppmm): Merge improvements from henderson.
Tue Jan 24 04:23:20 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
* longlong.h (default umul_ppmm): Store input parameters in temporaries
to avoid reading them twice.
(default smul_ppmm): New definition.
Thu Dec 29 04:20:07 1994 Jim Meyering (meyering@comco.com)
* generic/perfsqr.c (__mpn_perfect_square_p): Remove declaration
of unused variable.
* generic/pre_mod_1.c (__mpn_preinv_mod_1): Likewise.
* mpz/powm.c (pow): Likewise.
* mpz/and.c (mpz_and): Use {} instead of `;' for empty else clause
to placate `gcc -Wall'.
* mpz/ior.c (mpz_ior): Likewise.
Wed Dec 28 13:31:40 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/m*68*/*.S: #include asm-syntax.h, not asm.h.
Mon Dec 26 17:15:36 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* longlong.h: Test for more symbols, in __mc68000__ case.
* mpn/mpn/config.sub: Recognize m68060.
* mpn/configure.in: Change mc* to m* for 68k targets.
* mpn/Makefile.in (.S.o): Delete spurious creation of temp .c file.
Mon Dec 19 01:56:30 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* config.sub: Recognize pentium as a valid CPU.
* mpn/configure.in: Handle pentium specifically, to use new assembly
code.
Mon Dec 19 00:13:01 1994 Jim Meyering (meyering@comco.com)
* gmp.h: Define _GMP_H_HAVE_FILE if FILE, __STDIO_H__, or H_STDIO
is defined.
* gmp.h: test _GMP_H_HAVE_FILE instead of FILE everywhere else.
Mon Dec 19 00:04:54 1994 Kent Boortz (boortz@sics.se)
* Makefile.in (recursive makes): Pass CFLAGS.
Sun Dec 18 22:34:49 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/pentium: New directory.
* mpz/pprime.c: Make sure to mpz_clear all temporaries.
* longlong.h: Don't use udiv instruction when SUPERSPARC is defined.
* configure.in: Handle supersparc*-.
* config/mt-supspc-gcc: New file.
* config/mt-sparc8-gcc: New name for mt-sparcv8-gcc.
Mon Dec 12 22:22:10 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/i386/*.S: #include "asm-syntax.h", not "asm.h".
#include sysdep.h before asm-syntax.h.
* mpn/mc68020/asm-syntax.h: #undef ALIGN before defining it.
* mpn/i386/asm-syntax.h: Likewise.
* mpn/mc68020/asm-syntax.h: New name for asm.h.
* mpn/i386/asm-syntax.h: New name for asm.h.
Tue Dec 6 21:55:25 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpz/array_init.c: Fix typo in declaration.
Fri Nov 18 19:50:52 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/Makefile.in (.S.o): Pass CFLAGS and INCLUDES.
Mon Nov 14 00:34:12 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/generic/random2.c (random): Test for __svr4__.
Wed Oct 12 23:28:16 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* cre-conv-tab.c (main): Avoid upper-case X in printf format string.
Tue Aug 23 17:16:35 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpz/perfsqr.c: Use mpn_perfect_square_p.
* mpn/generic/perfsqr.c: New file.
Wed Jul 6 13:46:51 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpz/array_init.c: New file.
* mpz/Makefile.in: Compile array_init.
* gmp.h: Declare mpz_array_init.
Mon Jul 4 01:10:03 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpz/add.c: Fix bogus comment.
* mpz/sub.c: Likewise.
Sat Jul 2 02:14:56 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* mpn/generic/pre_mod_1.c: New file.
* mpz/perfsqr.c: Use __mpn_preinv_mod_1 when faster.
Fri Jul 01 22:10:19 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
* longlong.h (arm umul_ppmm): Fix typos in last change. Mark
hard-coded registers with "%|"
Thu Jun 30 03:59:33 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpz/perfsqr.c: Define PP, etc, for machines with 64 bit limbs.
Use __mpn_mod_1.
* mpz/perfsqr.c: Don't clobber REM in quadratic residue check loop.
Wed Jun 29 18:45:41 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* mpn/generic/sqrt.c (SQRT): New asm for IBM POWER2.
* mpz/gcd_ui.c: Return 0 if result does not fit an unsigned long.
* gmp.h: Use "defined (__STDC__)" consistently.
Tue Jun 28 18:44:58 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* gmp.h (mpz_get_si): Don't use "signed" keyword for return type.
* mpz/tests/Makefile.in: Use CFLAGS for linking.
* Makefile.in (CFLAGS): Use -O2 here.
* mpn/Makefile (CFLAGS): Not here.
* mpq/cmp_ui.c: Fix typo.
* mpq/canonicalize.c: Fix typo.
* mpz/gcd_ui.c: Handle gcd(0,v) and gcd(u,0) correctly.
* mpn/generic/gcd_1.c: Fix braino in last change.
Mon Jun 27 16:10:27 1994 Torbjorn Granlund (tege@rtl.cygnus.com)
* mpz/gcd_ui.c: Change return type and return result.
Allow destination param to be NULL.
* gmp.h: Corresponding change.
* mpn/generic/gcd_1.c: Handle zero return from mpn_mod_1.
Tue Jun 14 02:17:43 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
* mpn/i386/asm.h (ALIGN): Make it take a parameter.
* mpn/i386/*.S: Use ALIGN to align all loops.
* mpn/i386/*.S: Move colon inside C_GLOBAL_NAME expression.
(Makes old versions of GAS happy.)
Sat May 28 01:43:54 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* Many files: Delete unused variables and labels.
* mpn/generic/dump.c: cast printf width argument to int.
Wed May 25 00:42:37 1994 Torbjorn Granlund (tege@thepub.cygnus.com)
* mpz/gcd.c (mpz_gcd): Normalize after __mpn_sub calls.
(xmod): Ignore return value of __mpn_divmod.
(xmod): Improve normalization code.
Sat May 21 01:30:09 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* mpz/gcdext.c: Cosmetic changes.
* mpz/fdiv_ui.c: New file.
Fri May 20 00:24:53 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* mpz/tests/Makefile.in: Use explicit rules for running tests,
not a shell loop.
(clean): Delete stmp-*.
* mpz/Makefile.in: Update.
* mpz/div_ui.c: Don't include longlong.h.
* mpz/dm_ui.c: Likewise.
* mpz/fdiv_q.c, mpz/fdiv_q_ui.c, mpz/fdiv_qr.c, mpz/fdiv_qr_ui.c,
mpz/fdiv_r.c, mpz/fdiv_r_ui.c: New files. Code partly from deleted
mdm.c, mdm_ui.c, etc, partly rewritten.
* mpz/dm_floor_ui.c, mpz/dm_floor.c: Delete.
* mpz/mdm.c, mpz/mdm_ui.c, mpz/mdiv.c, mpz/mdiv_ui.c, mpz/mmod.c,
mpz/mmod_ui.c: Delete.
* mpz/tdiv_q.c, mpz/tdiv_q_ui.c, mpz/tdiv_qr.c, mpz/tdiv_qr_ui.c,
mpz/tdiv_r.c, mpz/tdiv_r_ui.c:
New names for files implementing truncating division.
* mpz/div_ui.c, mpz/dm_ui.c, mpz/mod_ui.c: Simplify.
* mpn/Makefile.in (.S.o): Don't rely on CPP being defined, use CC
instead.
(clean): Delete tmp-*.
Thu May 19 01:37:44 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* mpz/cmp.c: Call __mpn_cmp.
* mpz/popcount.c: Fix typo.
* mpz/powm_ui.c: Simplify main loop. Keep principal operand size
smaller than MSIZE when possible.
* mpz/powm.c: Likewise.
* mpn/generic/sqrt.c: Move alloca calls into where the memory is
needed. Simplify.
* gmp.h: (_PROTO): New macro.
Add many function declarations; use _PROTO macro in all declarations.
* mpf/*.c: Prepend mpn calls with __.
Wed May 18 20:57:06 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* mpf/*ui*.c: Make ui argument `long' for consistency with mpz
functions.
* mpf/div_ui.c: Simplify.
Tue May 17 01:05:14 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* mpz/*.c: Prepend mpn calls with __.
* mpz/mul_ui.c: Use mpn_mul_1.
Mon May 16 17:19:41 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* mpn/i386/mul_1.S: Use C_GLOBAL_NAME.
* mpn/i386/mul_1.S, mpn/i386/addmul_1.S, mpn/i386/submul_1.S:
Nuke use of LAB.
Sat May 14 14:21:02 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* gmp-impl.h: Don't define abort here.
* mpz/pow_ui.c: Increase temporary allocation.
* mpz/ui_pow_ui.c: Likewise.
* gmp.h (mpz_add_1, mpz_sub_1): Don't call memcpy.
* All Makefile.in: Delete spurious -I arguments.
Update dependencies.
* mpz/popcount.c: New file.
* mpz/hamdist.c: New file.
* All configure: Latest version from Cygnus.
* mpq/Makefile.in: New file.
* mpq/configure.in: New file.
* Makefile.in, configure.in: Enable compilation of mpq.
* mpq/set_z.c: Fix typos.
* mpq/canonicalize.c: Fix typos.
* mpq/cmp_ui.c: Fix typos.
* mpf/add_ui.c: Read U->D into UP always. Delete spurious MPN_COPY.
* mpf/sub_ui.c: Likewise.
* gmp-impl.h: Don't redefine alloca.
* COPYING.LIB: Renamed from COPYING.
Wed May 11 01:45:44 1994 Torbjorn Granlund (tege@adder.cygnus.com)
* mpz/powm_ui.c: When shifting E left by C+1, handle out-of-range
shift counts. Fix typo when testing negative_result.
* mpz/powm.c: Likewise.
* mpz/ui_pow_ui.c: New file.
* mpz/Makefile.in: Update.
* mpz/pow_ui.c: Call __mpn_mul_n instead of __mpn_mul when possible.
* mpz/div.c, mpz/div_ui.c, mpz/gcd.c: Prefix external mpn calls.
* mpz/gcd.c: Declare mpn_xmod.
* mpz/powm.c: Major changes to accommodate changed mpn semantics.
* mpz/powm_ui.c: Update from mpz/powm.c.
* mpz/tests/tst-io.c: New file.
* mpz/tests/tst-logic: New file.
* mpz/tests/Makefile.in: Update.
* mpz/inp_str.c: Get base right when checking for first digit.
* mpz/inp_str.c: Allocate more space for DEST when needed.
* mpz/com.c: Use mpn_add_1 and mpn_sub_1.
* mpz/and.c, mpz/ior.c: Likewise. Simplify somewhat.
* mpz/add_ui.c: Use mpn_add_1 and mpn_sub_1.
Rename parameters to be consistent with mpz/sub_ui.
General simplifications.
* mpz/sub_ui.x: Likewise.
Tue Aug 10 19:41:16 1993 Torbjorn Granlund (tege@prudens.matematik.su.se)
* mpf: New directory.
* mpf/*.c: Merge basic set of mpf functions.
* Many logs missing...
Sun Apr 25 18:40:26 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
* memory.c: Use #if instead of #ifdef for __STDC__ for consistency.
* bsd/xtom.c: Likewise.
* mpz/div.c: Remove free_me and free_me_size and their usage.
Use mpn_divmod for division; corresponding changes in return value
convention.
* mpz/powm.c: `carry_digit' => `carry_limb'.
* bsd/sdiv.c: Clearify comment.
Sun Apr 25 00:31:28 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
* longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
Sat Apr 24 16:23:33 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
* longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
* gmp-impl.h: #define ABS.
* (Many files): Use ABS instead of abs.
* mpn/generic/sqrt.c, mpz/clrbit.c, mpz/get_si.c, mpz/mod_2exp.c,
mpz/pow_ui.c: Cast 1 to mp_limb before shifting.
* mpz/perfsqr.c: Use #if, not plain if for exclusion of code for
non-32-bit machines.
Tue Apr 20 13:13:58 1993 Torbjorn Granlund (tege@du.nada.kth.se)
* mpn/generic/sqrt.c: Handle overflow for intermediate quotients by
rounding them down to fit.
* mpz/perfsqr.c (PP): Define in hexadecimal to avoid GCC warnings.
* mpz/inp_str.c (char_ok_for_base): New function.
(mpz_inp_str): Use it.
Sun Mar 28 21:54:06 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
* mpz/inp_raw.c: Allocate x_index, not xsize limbs.
Mon Mar 15 11:44:06 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
* mpz/pprime.c: Declare param `const'.
* gmp.h: Add declarations for mpz_com.
Thu Feb 18 14:10:34 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
* mpq/add.c, mpq/sub.c: Call mpz_clear for t.
Fri Feb 12 20:27:34 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
* mpz/inp_str.c: Recog minus sign as first character.
Wed Feb 3 01:36:02 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
* mpz/iset.c: Handle 0 size.
Tue Feb 2 13:03:33 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
* mpz/mod_ui.c: Initialize dividend_size before it's used.
Mon Jan 4 09:11:15 1993 Torbjorn Granlund (tege@sics.se)
* bsd/itom.c: Declare param explicitly 'signed'.
* bsd/sdiv.c: Likewise.
* mpq/cmp.c: Remove unused variable tmp_size.
* mpz/powm_ui.c: Fix typo in esize==0 if stmt.
* mpz/powm.c: Likewise.
Sun Nov 29 01:16:11 1992 Torbjorn Granlund (tege@sics.se)
* mpn/generic/divmod_1.c (mpn_divmod_1): Handle
divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
specifically.
* Reorganize sources. New directories mpn, mpn/MACH, mpn/generic,
mpz, mpq, bsd. Use full file name for change logs hereafter.
Wed Oct 28 17:40:04 1992 Torbjorn Granlund (tege@jupiter.sics.se)
* longlong.h (__hppa umul_ppmm): Fix typos.
(__hppa sub_ddmmss): Swap input arguments.
* mpz_perfsqr.c (mpz_perfect_square_p): Avoid , before } in
initializator.
Sun Oct 25 20:30:06 1992 Torbjorn Granlund (tege@jupiter.sics.se)
* mpz_pprime.c (mpz_probab_prime_p): Handle numbers <= 3
specifically (used to consider all negative numbers prime).
* mpz_powm_ui: `carry_digit' => `carry_limb'.
* sdiv: Handle zero dividend specifically. Replace most code in
this function with a call to mpn_divmod_1.
Fri Sep 11 22:15:55 1992 Torbjorn Granlund (tege@tarrega.sics.se)
* mpq_clear: Don't free the MP_RAT!
* mpn_lshift, mpn_rshift, mpn_rshiftci: Remove `long' from 4:th arg.
Thu Sep 3 01:47:07 1992 Torbjorn Granlund (tege@jupiter.sics.se)
* All files: Remove leading _ from mpn function names.
Wed Sep 2 22:21:16 1992 Torbjorn Granlund (tege@jupiter.sics.se)
Fix from Jan-Hein Buhrman:
* mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c: Make them work as documented.
* mpz_mmod.c, mpz_mdm.c: Move decl of TEMP_DIVISOR to reflect its
life.
Sun Aug 30 18:37:15 1992 Torbjorn Granlund (tege@jupiter.sics.se)
* _mpz_get_str: Use mpz_sizeinbase for computing out_len.
* _mpz_get_str: Don't remove leading zeros. Abort if there are some.
Wed Mar 4 17:56:56 1992 Torbjorn Granlund (tege@zevs.sics.se)
* gmp.h: Change definition of MP_INT to make the & before params
optional. Use typedef to define it.
* mp.h: Use typedef to define MINT.
Tue Feb 18 14:38:39 1992 Torbjorn Granlund (tege@zevs.sics.se)
longlong.h (hppa umul_ppmm): Add missing semicolon. Declare type
of __w1 and __w0.
Fri Feb 14 21:33:21 1992 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h: Make default count_leading_zeros work for machines >
32 bits. Prepend `__' before local variables to avoid conflicts
with users' variables.
* mpn_dm_1.c: Remove udiv_qrnnd_preinv ...
* gmp-impl.h: ... and put it here.
* mpn_mod_1: Use udiv_qrnnd_preinv if it is faster than udiv_qrnnd.
Tue Feb 11 17:20:12 1992 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_mul: Enhance base case by handling small multiplicands.
* mpn_dm_1.c: Revert last change.
Mon Feb 10 11:55:15 1992 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_dm_1.c: Don't define udiv_qrnnd_preinv unless needed.
Fri Feb 7 16:26:16 1992 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_mul: Replace code for base case.
Thu Feb 6 15:10:42 1992 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_dm_1.c (_mpn_divmod_1): Add code for avoiding division by
pre-inverting divisor.
Sun Feb 2 11:10:25 1992 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h: Make __LLDEBUG__ work differently.
(_IBMR2): Reinsert old code.
Sat Feb 1 16:43:00 1992 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h (#ifdef _IBMR2): Replace udiv_qrnnd with new code
using floating point operations. Don't define
UDIV_NEEDS_NORMALIZATION any longer.
Fri Jan 31 15:09:13 1992 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h: Define UMUL_TIME and UDIV_TIME for most machines.
* longlong.h (#ifdef __hppa): Define umul_ppmm.
Wed Jan 29 16:41:36 1992 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_cmp: Only one length parameter, assume operand lengths are
the same. Don't require normalization.
* mpq_cmp, mpz_add, mpz_sub, mpz_gcd, mpn_mul, mpn_sqrt: Change for
new mpn_cmp definition.
Tue Jan 28 11:18:55 1992 Torbjorn Granlund (tege@zevs.sics.se)
* _mpz_get_str: Fix typo in comment.
Mon Jan 27 09:44:16 1992 Torbjorn Granlund (tege@zevs.sics.se)
* Makefile.in: Add new files.
* mpn_dm_1.c: New file with function _mpn_divmod_1.
* mpz_dm_ui.c (mpz_divmod_ui): Use _mpn_divmod_1.
* mpz_div_ui: Likewise.
* mpn_mod_1.c: New file with function _mpn_mod_1.
* mpz_mod_ui: Use _mpn_mod_1.
Thu Jan 23 18:54:09 1992 Torbjorn Granlund (tege@zevs.sics.se)
Bug found by Paul Zimmermann (zimmermann@inria.inria.fr):
* mpz_div_ui.c (mpz_div_ui), mpz_dm_ui.c (mpz_divmod_ui):
Handle dividend == 0.
Wed Jan 22 12:02:26 1992 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_pprime.c: Use "" for #include.
Sun Jan 19 13:36:55 1992 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_rshiftci.c (header): Correct comment.
Wed Jan 15 18:56:04 1992 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_powm, mpz_powm_ui (if (bsize > msize)): Do alloca (bsize + 1)
to make space for ignored quotient at the end. (The quotient might
always be an extra limb.)
Tue Jan 14 21:28:48 1992 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_powm_ui: Fix comment.
* mpz_powm: Likewise.
Mon Jan 13 18:16:25 1992 Torbjorn Granlund (tege@zevs.sics.se)
* tests/Makefile.in: Prepend $(TEST_PREFIX) to Makefile target.
Sun Jan 12 13:54:28 1992 Torbjorn Granlund (tege@zevs.sics.se)
Fixes from Kazumaro Aoki:
* mpz_out_raw: Take abs of size to handle negative values.
* mpz_inp_raw: Reallocate before reading ptr from X.
* mpz_inp_raw: Store, don't read, size to x->size.
Tue Jan 7 17:50:25 1992 Torbjorn Granlund (tege@zevs.sics.se)
* gmp.h, mp.h: Remove parameter names from prototypes.
Sun Dec 15 00:09:36 1991 Torbjorn Granlund (tege@zevs.sics.se)
* tests/Makefile.in: Prepend "./" to file names when executing
tests.
* Makefile.in: Fix many problems.
Sat Dec 14 01:00:02 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_sqrt.c: New file with _mpn_sqrt.
* mpz_sqrt, mpz_sqrtrem, mpz_perfect_square_p: Use _mpn_sqrt.
* msqrt.c: Delete. Create from mpz_sqrtrem.c in Makefile.in.
* mpz_do_sqrt.c: Delete.
* Makefile.in: Update to reflect these changes.
* Makefile.in, configure, configure.subr: New files
(from bothner@cygnus.com).
* dist-Makefile: Delete.
* mpz_fac_ui: Fix comment.
* mpz_random2: Rewrite a bit to make it possible for the most
significant limb to be == 1.
* mpz_pprime.c (mpz_probab_prime_p): Remove \t\n.
Fri Dec 13 23:10:02 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_do_sqrt: Simplify special case for U == 0.
* m*sqrt*.c, mpz_perfsqr.c (mpz_perfect_square_p):
Rename _mpz_impl_sqrt to _mpz_do_sqrt.
Fri Dec 13 12:52:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
* gmp-impl.h (MPZ_TMP_INIT): Cast to the right type.
Thu Dec 12 22:17:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_add, mpn_sub, mpn_mul, mpn_div: Change type of several
variables to mp_size.
Wed Dec 11 22:00:34 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_rshift.c: Fix header comments.
Mon Dec 9 17:46:10 1991 Torbjorn Granlund (tege@zevs.sics.se)
Released 1.2.
* gmp-impl.h (MPZ_TMP_INIT): Cast alloca return value.
* dist-Makefile: Add missing dependency for cre-mparam.
* mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
mpz_mmod_ui.c, mpz_mdm_ui.c: Remove obsolete comment.
* dist-Makefile (clean): clean in tests subdir too.
* tests/Makefile: Define default values for ROOT and SUB.
* longlong.h (__a29k__ udiv_qrnnd): Change "q" to "1" for operand
2 constraint.
Mon Nov 11 00:06:05 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_sizeinb.c (mpz_sizeinbase): Special code for size == 0.
Sat Nov 9 23:47:38 1991 Torbjorn Granlund (tege@zevs.sics.se)
Released 1.1.94.
* dist-Makefile, Makefile, tests/Makefile: Merge tests into
distribution.
Fri Nov 8 22:57:19 1991 Torbjorn Granlund (tege@zevs.sics.se)
* gmp.h: Don't use keyword `signed' for non-ANSI compilers.
Thu Nov 7 22:06:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h: Cosmetic changes to keep it identical to gcc2 version
of longlong.h.
* longlong.h (__ibm032__): Fix operand order for add_ssaaaa and
sub_ddmmss.
Mon Nov 4 00:36:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_mul: Fix indentation.
* mpz_do_sqrt: Don't assume 32 bit limbs (had constant
4294967296.0).
* mpz_do_sqrt: Handle overflow in conversion from double returned
by SQRT to mp_limb.
* gmp.h: Add missing function definitions.
Sun Nov 3 18:25:25 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_pow_ui: Change type of `i' to int.
* ChangeLog: Add change log entry.
* ChangeLog: Add change log entry.
* ChangeLog: Add change log entry.
* ChangeLog: Add change log entry.
* ChangeLog: Add change log entry.
* ChangeLog: Add change log entry.
* ChangeLog: Add change log entry.
* ChangeLog: Add change log entry.
Stack overflow.
* mpz_pow_ui.c: Fix typo in comment.
* dist-Makefile: Create rpow.c from mpz_powm_ui.c.
* mpz_powm_ui.c: Add code for rpow.
* rpow.c: Delete this file. The rpow function is now implemented
in mpz_powm_ui.c.
* mpz_fac_ui.c: New file.
* gmp.h, dist-Makefile: Add stuff for mpz_fac_ui.
Bug found by John Amanatides (amana@sasquatch.cs.yorku.ca):
* mpz_powm_ui, mpz_powm: Call _mpn_mul in the right way, with
the first argument not smaller than the second.
Tue Oct 29 13:56:55 1991 Torbjorn Granlund (tege@zevs.sics.se)
* cre-conv-tab.c (main), cre-mparam.c (main): Fix typo in output
header text.
Mon Oct 28 00:35:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_random2: Handle size == 0.
* gmp-impl.h (struct __mp_bases): Rename chars_per_limb_exactly to
chars_per_bit_exactly, and change its definition.
* cre-conv-tab.c (main): Output field according to its new
definition.
* mpz_out_str, _mpz_get_str, mpz_sizeinb, mout:
Use chars_per_bit_exactly.
* mpz_random2: Change the loop termination condition in order to
get a large most significant limb with higher probability.
* gmp.h: Add declaration of new mpz_random2 and mpz_get_si.
* mpz_get_si.c: New file.
* dist-Makefile: Add mpz_random2 and mpz_get_si.
* mpz_sizeinb.c (mpz_sizeinbase): Special code for base being a
power of 2, giving exact result.
* mpn_mul: Fix MPN_MUL_VERIFY in various ways.
* mpn_mul: New macro KARATSUBA_THRESHOLD.
* mpn_mul (karatsuba's algorithm): Don't write intermediate results
to prodp, use temporary pp instead. (Intermediate results can be
larger than the final result, possibly writing into hyperspace.)
* mpn_mul: Make smarter choice between Karatsuba's algorithm and the
shortcut algorithm.
* mpn_mul: Fix typo, cy instead of xcy. Unify carry handling code.
Sun Oct 27 19:57:32 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_mul: In non-classical case, choose Karatsuba's algorithm only
when usize > 1.5 vsize.
* mpn_mul: Break between classical and Karatsuba's algorithm at
KARATSUBA_THRESHOLD, if defined. Default to 8.
* mpn_div: Kludge to fix stray memory read.
Sat Oct 26 20:06:14 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_gcdext: Handle a = b = 0. Remove memory leakage by calling
mpz_clear for all temporary variables.
* mpz_gcd: Reduce w_bcnt in _mpn_lshift call to hold that
function's argument constraints. Compute wsize correctly.
* mpz_gcd: Fix typo in comment.
* memory.c (_mp_default_allocate, _mp_default_reallocate): Call
abort if allocation fails, don't just exit.
Fri Oct 25 22:17:20 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_random2.c: New file.
Thu Oct 17 18:06:42 1991 Torbjorn Granlund (tege@zevs.sics.se)
Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
* mpq_cmp: Take sign into account, don't just compare the
magnitudes.
* mpq_cmp: Call _mpn_mul in the right way, with the first argument
not smaller than the second.
Wed Oct 16 19:27:32 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_random: Ensure the result is normalized.
Tue Oct 15 14:55:13 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_clrbit: Support non-ANSI compilers.
Wed Oct 9 18:03:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h (68k add_ssaaaa, sub_ddmmss): Generalize constraints.
Tue Oct 8 17:42:59 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_mdm_ui: Add comments.
* mpz_mdiv: Use MPZ_TMP_INIT instead of mpz_init.
* mpz_init_ui: Change spacing and header comment.
Thu Oct 3 18:36:13 1991 Torbjorn Granlund (tege@zevs.sics.se)
* dist-Makefile: Prepend `./' before some filenames.
Sun Sep 29 14:02:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
Released 1.1 (public).
* mpz_com: New name of mpz_not.
* dist-Makefile: Change mpz_not to mpz_com.
Tue Sep 24 12:44:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h: Fix header comment.
Mon Sep 9 15:16:24 1991 Torbjorn Granlund (tege@zevs.sics.se)
Released 1.0.92.
* mpn_mul.c (_mpn_mul): Handle leading zero limbs in non-Karatsuba
case.
* longlong.h (m68000 umul_ppmm): Clobber one register less by
slightly rearranging the code.
Sun Sep 1 18:53:25 1991 Torbjorn Granlund (tege@zevs.sics.se)
* dist-Makefile (stamp-stddefh): Fix typo.
Sat Aug 31 20:41:31 1991 Torbjorn Granlund (tege@zevs.sics.se)
Released 1.0.91.
* mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
mpz_mmod_ui.c, mpz_mdm_ui.c: New files and functions.
* gmp.h, gmp.texi: Define the new functions.
Fri Aug 30 08:32:56 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_gcdext: Compute t argument from the other quantities at the
end, of the function, not in the loop. New feature: Allow t to be
NULL.
* mpz_add.c, mpz_sub.c, mpz_mul.c, mpz_powm.c, mpz_gcd.c: Don't
include "mp.h". Use type name `MP_INT' always.
* dist-Makefile, mpz_cmp.c: Merge mcmp.c from mpz_cmp.c.
Wed Aug 28 00:45:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
* dist-Makefile (documentation): Go via tmp.texi to avoid the
creation of gmp.dvi if any errors occur. Make tex read input
from /dev/null.
Fri Aug 23 15:58:52 1991 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h (68020, i386): Don't define machine-dependent
__umulsidi3 (so the default definition is used).
* longlong.h (all machines): Cast all operands, sources and
destinations, to `unsigned long int'.
* longlong.h: Add gmicro support.
Thu Aug 22 00:28:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h: Rename BITS_PER_LONG to LONG_TYPE_SIZE.
* longlong.h (__ibm032__): Define count_leading_zeros and umul_ppmm.
* longlong.h: Define UMUL_TIME and UDIV_TIME for some CPUs.
* _mpz_get_str.c: Add code to do division by big_base using only
umul_qrnnd, if that is faster. Use UMUL_TIME and UDIV_TIME to
decide which variant to use.
Wed Aug 21 15:45:23 1991 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h (__sparc__ umul_ppmm): Move two insn from end to the
nops. (Saves two insn.)
* longlong.h (__sparc__ umul_ppmm): Rewrite in order to avoid
branch, and to permit input/output register overlap.
* longlong.h (__29k__): Remove duplicated udiv_qrnnd definition.
* longlong.h (__29k__ umul_ppmm): Split asm instructions into two
asm statements (gives better code if either the upper or lower
part of the product is unused.
Tue Aug 20 17:57:59 1991 Torbjorn Granlund (tege@zevs.sics.se)
* _mpz_get_str.c (outside of functions): Remove
num_to_ascii_lower_case and num_to_ascii_upper_case. Use string
constants in the function instead.
Mon Aug 19 00:37:42 1991 Torbjorn Granlund (tege@zevs.sics.se)
* cre-conv-tab.c (main): Output table in hex. Output 4 fields, not
3, for components 0 and 1.
* gmp.h: Add declaration of mpq_neg.
Released 1.0beta.13.
* _mpz_set_str.c (mpz_set_str): Cast EOF and SPC to char before
comparing to enum literals SPC and EOF. This makes the code work
for compilers where `char' is unsigned. (Bug found by Brian
Beuning).
Released 1.0beta.12.
* mpz_mod_ui: Remove references to quot. Remove quot_ptr, quot_size
declarations and assignment code.
Sun Aug 18 14:44:26 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_mod_ui: Handle dividend < 0.
Released 1.0beta.11.
* mpz_dm_ui, mpz_div_ui, mpz_mod_ui, sdiv: Make them share the same
general structure, variable names, etc.
* sdiv: Un-normalize the remainder in n1 before it is negated.
* longlong.h: Mention UDIV_NEEDS_NORMALIZATION in description of
udiv_qrnnd.
* mpz_dm_ui.c (mpz_divmod_ui), mpz_div_ui.c (mpz_div_ui): Increment
the quotient size if the dividend size is incremented. (Bug found
by Brian Beuning.)
* mpz_mod_ui: Shift back the remainder, if UDIV_NEEDS_NORMALIZATION.
(Bug found by Brian Beuning.)
* mpz_mod_ui: Replace "digit" by "limb".
* mpz_perfsqr.c (mpz_perfect_square_p): Disable second test case
for non-32-bit machines (PP is hardwired for such machines).
* mpz_perfsqr.c (outside of functions): Define PP value with an L.
* mpn_mul.c (_mpn_mul): Add verification code that is activated if
DEBUG is defined. Replace "digit" by "limb".
* mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 4.): Normalize temp
after the addition.
* mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 1.): Compare u0_size
and v0_size, and according to the result, swap arguments in
recursive call. (Don't violate mpn_mul's own argument
constraints.)
Fri Aug 16 13:47:12 1991 Torbjorn Granlund (tege@zevs.sics.se)
Released 1.0beta.10.
* longlong.h (IBMR2): Add udiv_qrnnd.
* mpz_perfsqr: Remove unused variables.
* mpz_and (case for different signs): Initialize loop variable i!
* dist-Makefile: Update automatically generated dependencies.
* dist-Makefile (madd.c, msub.c, pow.c, mult.c, gcd.c): Add mp.h,
etc to dependency file lists.
* longlong.h (add_ssaaaa, sub_ddmmss [C default versions]): Make __x
`unsigned long int'.
* longlong.h: Add `int' after `unsigned' and `long' everywhere.
Wed Aug 14 18:06:48 1991 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h: Add ARM, i860 support.
* mpn_lshift, mpn_rshift, mpn_rshiftci: Rename *_word with *_limb.
Tue Aug 13 21:57:43 1991 Torbjorn Granlund (tege@zevs.sics.se)
* _mpz_get_str.c, _mpz_set_str.c, mpz_sizeinb.c (mpz_sizeinbase),
mpz_out_str.c, mout.c: Remove declaration of __mp_bases.
* gmp-impl.h: Put it here, and make it `const'.
* cre-conv-tab.c (main): Make struct __mp_bases `const'.
Mon Aug 12 17:11:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
* cre-conv-tab.c (main): Use %lu in printf for long ints.
* dist-Makefile: Fix cre-* dependencies.
* cre-conv-tab.c (main): Output field big_base_inverted.
* gmp-impl.h (struct bases): New field big_base_inverted.
* gmp-impl.h (struct bases): Change type of chars_per_limb_exactly
to float (in order to keep the structure smaller).
* mp.h, gmp.h: Change names of macros for avoiding multiple
includes.
Fri Aug 9 18:01:36 1991 Torbjorn Granlund (tege@zevs.sics.se)
* _mpz_get_str: Only shift limb array if normalization_steps != 0
(optimization).
* longlong.h (sparc umul_ppmm): Use __asm__, not asm.
* longlong.h (IBMR2 umul_ppmm): Refer to __m0 and __m1, not to m0
and m1 (overlap between output and input operands did not work).
* longlong.h: Add VAX, ROMP and HP-PA support.
* longlong.h: Sort the machine dependent code in alphabetical order
on the CPU name.
* longlong.h: Hack comments.
Thu Aug 8 14:13:36 1991 Torbjorn Granlund (tege@zevs.sics.se)
Released 1.0beta.9.
* longlong.h: Define BITS_PER_LONG to 32 if it's not already
defined.
* Define __BITS4 to BITS_PER_LONG / 4.
* Don't assume 32 bit word size in "count_leading_zeros" C macro.
Use __BITS4 and BITS_PER_LONG instead.
* longlong.h: Don't #undef internal macros (reverse change of Aug 3).
* longlong.h (68k): Define add_ssaaaa sub_ddmmss, and umul_ppmm
even for plain mc68000.
* mpq_div: Flip the sign of the numerator *and* denominator of the
result if the intermediate denominator is negative.
* mpz_and.c, mpz_ior.c: Use MPN_COPY for all copying operations.
* mpz_and.c: Compute the result size more conservatively.
* mpz_ior.c: Likewise.
* mpz_realloc: Never allocate zero space even if NEW_SIZE == 0.
* dist-Makefile: Remove madd.c, msub.c, pow.c, mult.c, gcd.c from
BSDMP_SRCS.
* dist-Makefile: Create mult.c from mpz_mul.c.
* mult.c: Delete this file.
* _mpz_set_str: Normalize the result (for bases 2, 4, 8... it was
not done properly if the input string had many leading zeros).
Sun Aug 4 16:54:14 1991 Torbjorn Granlund (tege@zevs.sics.se)
* dist-Makefile (gcd.c, pow.c, madd.c, msub.c): Make these targets
work with VPATH and GNU MP.
* mpz_gcd: Don't call mpz_set; inline its functionality.
* mpq_mul, mpq_div: Fix several serious typos.
* mpz_dmincl, mpz_div: Don't normalize the quotient if it's already
zero.
* mpq_neg.c: New file.
* dist-Makefile: Remove obsolete dependencies.
* mpz_sub: Fix typo.
Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
* mpq_mul, mpq_div: Initialize tmp[12] variables even when the gcd
is just 1.
* mpz_gcd: Handle gcd(0,v) and gcd(u,0) in special cases.
Sat Aug 3 23:45:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h: Clean up comments.
* longlong.h: #undef internal macros.
Fri Aug 2 18:29:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpq_set_si, mpq_set_ui: Canonicalize 0/x to 0/1.
* mpq_set_si, mpq_set_ui: Cosmetic formatting changes.
* mpz_dmincl.c: Normalize the remainder before shifting it back.
* mpz_dm_ui.c (mpz_divmod_ui): Handle rem == dividend.
* mpn_div.c: Fix comment.
* mpz_add.c, mpz_sub.c: Use __MP_INT (not MP_INT) for intermediate
type, in order to work for both GNU and Berkeley functions.
* dist-Makefile: Create gcd.c from mpz_gcd.c, pow.c from mpz_powm,
madd.c from mpz_add.c, msub.c from mpz_sub.c.
respectively.
* pow.c, gcd.c, mpz_powmincl.c, madd.c, msub.c: Remove these.
* mpz_powm.c, mpz_gcd.c, mpz_add.c, mpz_sub.c: #ifdef for GNU and
Berkeley function name variants.
* dist-Makefile: Add created files to "clean" target.
Tue Jul 16 15:19:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpq_get_den: No need for absolute value of the size, the
denominator is always positive.
* mpz_get_ui: If the operand is zero, return zero. Don't read the
limb array!
* mpz_dmincl.c: Don't ignore the return value from _mpn_rshift, it
is the size of the remainder.
Mon Jul 15 11:08:05 1991 Torbjorn Granlund (tege@zevs.sics.se)
* Several files: Remove unused variables and functions.
* gmp-impl.h: Declare _mpz_impl_sqrt.
* mpz_dm_ui (mpz_divmod_ui), sdiv: Shift back the remainder if
UDIV_NEEDS_NORMALIZATION. (Fix from Brian Beuning.)
* mpz_dm_ui.c, sdiv: Replace *digit with *limb.
* mpz_ior: Add missing else statement in -OP1 | -OP2 case.
* mpz_ior: Add missing else statement in OP1 | -OP2 case.
* mpz_ior: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
* mpz_ior: Duplicate _mpz_realloc code.
* mpz_and: Add missing else statement in -OP1 & -OP2 case.
* mpz_and: Rewrite OP1 & -OP2 case.
* mpz_and: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
* mpz_gcdext: Loop in d1.size (not b->size). (Fix from Brian
Beuning.)
* mpz_perfsqr: Fix argument order in _mpz_impl_sqrt call. (Fix from
Brian Beuning.)
Fri Jul 12 17:10:33 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpq_set.c, mpq_set_ui.c, mpq_set_si.c, mpq_inv.c,
mpq_get_num.c, mpq_get_den.c, mpq_set_num.c, mpq_set_den.c:
New files.
* mpz_dmincl.c: Remove second re-allocation of rem->d. It
was never executed.
* dist-Makefile: Use `-r' instead of `-x' for test for ranlib (as
some unixes' test doesn't have the -r option).
* *.*: Cast allocated pointers to the appropriate type (makes old C
compilers happier).
* cre-conv-tab.c (main): Divide max_uli by 2 and multiply again
after conversion to double. (Kludge for broken C compilers.)
* dist-Makefile (stamp-stddefh): New target. Test if "stddef.h"
exists in the system and creates a minimal one if it does not
exist.
* cre-stddefh.c: New file.
* dist-Makefile: Make libgmp.a and libmp.a depend on stamp-stddefh.
* dist-Makefile (clean): Add some more.
* gmp.h, mp.h: Unconditionally include "stddef.h".
Thu Jul 11 10:08:21 1991 Torbjorn Granlund (tege@zevs.sics.se)
* min: Do ungetc of last read character.
* min.c: include stdio.h.
* dist-Makefile: Go via tmp- files for cre* redirection.
* dist-Makefile: Add tmp* to "clean" target.
* dist-Makefile: Use LOCAL_CC for cre*, to simplyfy cross
compilation.
* gmp.h, mp.h: Don't define NULL here.
* gmp-impl.h: Define it here.
Wed Jul 10 14:13:33 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_mod_2exp: Don't copy too much, overwriting most significant
limb.
* mpz_and, mpz_ior: Don't read op[12]_ptr from op[12] when
reallocating res, if op[12]_ptr got their value from alloca.
* mpz_and, mpz_ior: Clear up comments.
* cre-mparam.c: Output parameters for `short int' and `int'.
* mpz_and, mpz_ior: Negate negative op[12]_size in several places.
Tue Jul 9 18:40:30 1991 Torbjorn Granlund (tege@zevs.sics.se)
* gmp.h, mp.h: Test for _SIZE_T defined before typedef'ing size_t.
(Fix for Sun lossage.)
* gmp.h: Add declaration of mpq_clear.
* dist-Makefile: Chack if "ranlib" exists, before using it.
* dist-Makefile: Add mpz_sqrtrem.c and mpz_size.c.
* mpz_powm: Fix typo, "pow" instead of "mpz_powm".
Fri Jul 5 19:08:09 1991 Torbjorn Granlund (tege@zevs.sics.se)
* move: Remove incorrect comment.
* mpz_free, mpq_free: Rename to *_clear.
* dist-Makefile: Likewise.
* mpq_add, mpq_sub, mpq_mul, mpq_div: Likewise.
* mpz_dmincl.c: Don't call "move", inline its functionality.
Thu Jul 4 00:06:39 1991 Torbjorn Granlund (tege@zevs.sics.se)
* Makefile: Include dist-Makefile. Fix dist target to include
dist-Makefile (with the name "Makefile" in the archive).
* dist-Makefile: New file made from Makefile. Add new mpz_...
functions.
* mpz_powincl.c New file for mpz_powm (Berkeley MP pow)
functionality. Avoids code duplication.
* pow.c, mpz_powm.c: Include mpz_powincl.c
* mpz_dmincl.c: New file containing general division code. Avoids
code duplication.
* mpz_dm.c (mpz_divmod), mpz_mod.c (mpz_mod), mdiv.c (mdiv): Include
mpz_dmincl.c.
* _mpz_get_str: Don't call memmove, unless HAS_MEMMOVE is defined.
Instead, write the overlapping memory copying inline.
* mpz_dm_ui.c: New name for mpz_divmod_ui.c (SysV file name limit).
* longlong.h: Don't use #elif.
* mpz_do_sqrt.c: Likewise.
* longlong.h: Use __asm__ instead of asm.
* longlong.h (sparc udiv_qrnnd): Make it to one string over several
lines.
* longlong.h: Preend __ll_ to B, highpart, and lowpart.
* longlong.h: Move array t in count_leading_zeros to the new file
mp_clz_tab.c. Rename the array __clz_tab.
* All files: #ifdef for traditional C compatibility.
Wed Jul 3 11:42:14 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_and: Initialize res_ptr always (used to be initialized only
when reallocating).
* longlong.h (umul_ppmm [C variant]): Make __ul...__vh
`unsigned int', and cast the multiplications. This way
compilers more easily can choose cheaper multiplication
instructions.
* mpz_mod_2exp: Handle input argument < modulo argument.
* mpz_many: Make sure mp_size is the type for sizes, not int.
* mpz_init, mpz_init_set*, mpq_init, mpq_add, mpq_sub, mpq_mul,
mpq_div: Change mpz_init* interface. Structure pointer as first
arg to initialization function, no longer *return* struct.
Sun Jun 30 19:21:44 1991 Torbjorn Granlund (tege@zevs.sics.se)
* Rename mpz_impl_sqrt.c to mpz_do_sqrt.c to satisfy SysV 14
character file name length limit.
* Most files: Rename MINT to MP_INT. Rename MRAT to MP_RAT.
* mpz_sizeinb.c: New file with function mpz_sizeinbase.
* mp_bases.c: New file, with array __mp_bases.
* _mpz_get_str, _mpz_set_str: Remove struct bases, use extern
__mp_bases instead.
* mout, mpz_out_str: Use array __mp_bases instead of function
_mpz_get_cvtlen.
* mpz_get_cvtlen.c: Remove.
* Makefile: Update.
Sat Jun 29 21:57:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
* longlong.h (__sparc8__ umul_ppmm): Insert 3 nop:s for wr delay.
* longlong.h (___IBMR2__): Define umul_ppmm, add_ssaaaa, sub_ddmmss.
* longlong.h (__sparc__): Don't call .umul; expand asm instead.
Don't define __umulsidi3 (i.e. use default definition).
Mon Jun 24 17:37:23 1991 Torbjorn Granlund (tege@amon.sics.se)
* _mpz_get_str.c (num_to_ascii_lower_case, num_to_ascii_upper_case):
Swap 't' and 's'.
Sat Jun 22 13:54:01 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_gcdext.c: New file.
* mpn_mul: Handle carry and unexpected operand sizes in last
additions/subtractions. (Bug trigged when v1_size == 1.)
* mp*_alloc*: Rename functions to mp*_init* (files to mp*_iset*.c).
* mpq_*: Call mpz_init*.
* mpz_pow_ui, rpow: Use _mpn_mul instead of mult. Restructure.
Wed May 29 20:32:33 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_get_cvtlen: multiply by size.
Sun May 26 15:01:15 1991 Torbjorn Granlund (tege@bella.nada.kth.se)
Alpha-release 0.95.
Fixes from Doug Lea (dl@g.oswego.edu):
* mpz_mul_ui: Loop to MULT_SIZE (not PROD_SIZE). Adjust PROD_SIZE
correctly.
* mpz_div: Prepend _ to mpz_realloc.
* mpz_set_xs, mpz_set_ds: Fix typos in function name.
Sat May 25 22:51:16 1991 Torbjorn Granlund (tege@bella.nada.kth.se)
* mpz_divmod_ui: New function.
* sdiv: Make the sign of the remainder correct.
Thu May 23 15:28:24 1991 Torbjorn Granlund (tege@zevs.sics.se)
* Alpha-release 0.94.
* mpz_mul_ui: Include longlong.h.
* mpz_perfsqr.c (mpz_perfect_square_p): Call _mpz_impl_sqrt instead
of msqrt.
* mpz_impl_sqrt: Don't call "move", inline its functionality.
* mdiv: Use MPN_COPY instead of memcpy.
* rpow, mpz_mul, mpz_mod_2exp: Likewise.
* pow.c: Likewise, and fix bug in the size arg.
* xtom: Don't use mpz_alloc, inline needed code instead. Call
_mpz_set_str instead of mpz_set_str.
* Makefile: Make two libraries, libmp.a and libgmp.a.
Thu May 22 20:25:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
* Add manual to distribution.
* Fold in many missing routines descibed in the manual.
* Update Makefile.
Wed May 22 13:48:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_set_str: Make it handle 0x prefix OK.
Sat May 18 18:31:02 1991 Torbjorn Granlund (tege@zevs.sics.se)
* memory.c (_mp_default_reallocate): Swap OLD_SIZE and NEW_SIZE
arguments.
* mpz_realloc (_mpz_realloc): Swap in call to _mp_reallocate_func.
* min: Likewise.
Thu May 16 20:43:05 1991 Torbjorn Granlund (tege@zevs.sics.se)
* memory.c: Make the default allocations functions global.
* mp_set_fns (mp_set_memory_functions): Make a NULL pointer mean the
default memory function.
Wed May 8 20:02:42 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_div: Handle DEN the same as QUOT correctly by copying DEN->D
even if no normalization is needed.
* mpz_div: Rework reallocation scheme, to avoid excess copying.
* mpz_sub_ui.c, mpz_add_ui.c: New files.
* mpz_cmp.c, mpz_cmp_ui.c: New files.
* mpz_mul_2exp: Handle zero input MINT correctly.
* mpn_rshiftci: Don't handle shift counts > BITS_PER_MP_DIGIT.
* mpz_out_raw.c, mpz_inp_raw.c: New files for raw I/O.
Tue May 7 15:44:58 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_rshift: Don't handle shift counts > BITS_PER_MP_DIGIT.
* mpz_div_2exp: Don't call _mpn_rshift with cnt > BITS_PER_MP_DIGIT.
* gcd, mpz_gcd: Likewise.
* gcd, mpz_gcd: Handle common 2 factors correctly.
Mon May 6 20:22:59 1991 Torbjorn Granlund (tege@zevs.sics.se)
* gmp-impl.h (MPN_COPY): Inline a loop instead of calling memcpy.
* gmp-impl.h, mpz_get_str, rpow: Swap DST and SRC in TMPCOPY* macros.
Sun May 5 15:16:23 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpz_div: Remove test for QUOT == 0.
Sun Apr 28 20:21:04 1991 Torbjorn Granlund (tege@zevs.sics.se)
* pow: Don't make MOD normalization in place, as it's a bad idea to
write on an input parameter.
* pow: Reduce BASE if it's > MOD.
* pow, mult, mpz_mul: Simplify realloc code.
Sat Apr 27 21:03:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
* Install multplication using Karatsuba's algorithm as default.
Fri Apr 26 01:03:57 1991 Torbjorn Granlund (tege@zevs.sics.se)
* msqrt: Store in ROOT even for U==0, to make msqrt(0) defined.
* mpz_div_2exp.c, mpz_mul_2exp.c: New files for shifting right and
left, respectively.
* gmp.h: Add definitions for mpz_div_2exp and mpz_mul_2exp.
* mlshift.c, mrshift.c: Remove.
Wed Apr 24 21:39:22 1991 Torbjorn Granlund (tege@zevs.sics.se)
* mpn_mul: Check only for m2_size == 0 in function header.
Mon Apr 22 01:31:57 1991 Torbjorn Granlund (tege@zevs.sics.se)
* karatsuba.c: New file for Karatsuba's multplication algorithm.
* mpz_random, mpz_init, mpz_mod_2exp: New files and functions.
* mpn_cmp: Fix header comment.
Sun Apr 21 00:10:44 1991 Torbjorn Granlund (tege@zevs.sics.se)
* pow: Switch off initial base reduction.
Sat Apr 20 22:06:05 1991 Torbjorn Granlund (tege@echnaton.sics.se)
* mpz_get_str: Don't generate initial zeros for initial word.
Used to write outside of allocated storage.
Mon Apr 15 15:48:08 1991 Torbjorn Granlund (tege@zevs.sics.se)
* _mpz_realloc: Make it accept size in number of mp_digits.
* Most functions: Use new _mpz_realloc definition.
* mpz_set_str: Remove calls _mp_free_func.
* Most functions: Rename mpn_* to _mpn_*. Rename mpz_realloc to
_mpz_realloc.
* mpn_lshift: Redefine _mpn_lshift to only handle small shifts.
* mdiv, mpz_div, ...: Changes for new definition of _mpn_lshift.
* msqrt, mp*_*shift*: Define cnt as unsigned (for speed).
Sat Apr 6 14:05:16 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
* mpn_mul: Multiply by the first digit in M2 in a special
loop instead of zeroing the product area.
* mpz_abs.c: New file.
* sdiv: Implement as mpz_div_si for speed.
* mpn_add: Make it work for second source operand == 0.
* msub: Negate the correct operand, i.e. V before swapping, not
the smaller of U and V!
* madd, msub: Update abs_* when swapping operands, and not after
(optimization).
Fri Apr 5 00:19:36 1991 Torbjorn Granlund (tege@black.nada.kth.se)
* mpn_sub: Make it work for subtrahend == 0.
* madd, msub: Rewrite to minimize mpn_cmp calls. Ensure
mpn_cmp is called with positive sizes (used to be called
incorrectly with negative sizes sometimes).
* msqrt: Make it divide by zero if fed with a negative number.
* Remove if statement at end of precision calculation that was
never true.
* itom, mp.h: The argument is of type short, not int.
* mpz_realloc, gmp.h: Make mpz_realloc return the new digit pointer.
* mpz_get_str.c, mpz_set_str.c, mpz_new_str.c: Don't include mp.h.
* Add COPYING to distribution.
* mpz_div_ui.c, mpz_div_si.c, mpz_new_ui.c, mpz_new_si.c: New files.
Fri Mar 15 00:26:29 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
* Add Copyleft headers to all files.
* mpn_mul.c, mpn_div.c: Add header comments.
* mult.c, mdiv.c: Update header comments.
* mpq_add.c, mpq_sub.c, mpq_div.c, mpq_new.c, mpq_new_ui.c,
mpq_free.c: New files for rational arithmetics.
* mpn_lshift.c: Avoid writing the most significant word if it is 0.
* mdiv.c: Call mpn_lshift for the normalization.
* mdiv.c: Remove #ifdefs.
* Makefile: Add ChangeLog to DISTFILES.
* mpn_div.c: Make the add_back code work (by removing abort()).
* mpn_div.c: Make it return if the quotient is size as compared
with the difference NSIZE - DSIZE. If the stored quotient is
larger than that, return 1, otherwise 0.
* gmp.h: Fix mpn_div declaration.
* mdiv.c: Adopt call to mpn_div.
* mpz_div.c: New file (developed from mdiv.c).
* README: Update routine names.
Thu Mar 14 18:45:28 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
* mpq_mul.c: New file for rational multplication.
* gmp.h: Add definitions for rational arithmetics.
* mpn_div: Kludge the case where the high numerator digit > the
high denominator digit. (This code is going to be optimized later.)
* New files: gmp.h for GNU specific functions, gmp-common.h for
definitions common for mp.h and gmp.h.
* Ensure mp.h just defines what BSD mp.h defines.
* pow.c: Fix typo for bp allocation.
* Rename natural number functions to mpn_*, integer functions to
mpz_*.
Tue Mar 5 18:47:04 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
* mdiv.c (_mp_divide, case 2): Change test for estimate of Q from
"n0 >= r" to "n0 > r".
* msqrt: Tune the increasing precision scheme, to do fewer steps.
Tue Mar 3 18:50:10 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
* msqrt: Use the low level routines. Use low precision in the
beginning, and increase the precision as the result converges.
(This optimization gave a 6-fold speedup.)
Local Variables:
mode: indented-text
left-margin: 8
fill-column: 79
version-control: never
eval: (unless (string-match "GNU Emacs \\(21\.[2-9]\\|22\.\\)" (emacs-version))
(save-excursion
(goto-char (point-min))
(when (looking-at "Copyright")
(search-forward "\n\n")
(skip-chars-forward "\n")
(narrow-to-region (point) (point-max))
(message "Note! narrowed to hide copyright notice"))))
End:
|