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
|
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-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 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.
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.
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-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'.
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
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.
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.
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 exponentialization
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 exponentialization
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/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: Rewrite.
* mpn/cray/sub_n.c: Rewrite.
* 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.
Tue Sep 10 00:07:54 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
* mpn/cray/lshift.c: New file.
* mpn/cray/rshift.c: New file.
* mpn/cray/add_n.c: New file.
* mpn/cray/sub_n.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 exponentialization 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: 75
version-control: never
End:
|