File: xcasfr.html

package info (click to toggle)
giac 1.9.0.93%2Bdfsg2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 117,732 kB
  • sloc: cpp: 404,272; ansic: 205,462; python: 30,548; javascript: 28,788; makefile: 17,997; yacc: 2,690; lex: 2,464; sh: 705; perl: 314; lisp: 216; asm: 62; java: 41; xml: 36; sed: 16; csh: 7; pascal: 6
file content (4223 lines) | stat: -rw-r--r-- 407,293 bytes parent folder | download
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
<!DOCTYPE HTML>
<html id="fulldocument" lang="fr">
  <head>
  <meta charset="utf-8">
  <meta name=viewport content="width=device-width, initial-scale=1">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="keywords" content="xcas, firefox, navigateur, calcul, formel, en, ligne, programmation, algorithmique">
  <title>
    Xcas web
  </title>
  <style>
    html {
      background-color: #FFFFFF;
    }

    body {
      color: black;
      text-align: justify;
      background-color: #FFFFFF;
    }

    .curseur {
      min-width: 25px;
      height: 35px
    }

    .emscripten {
      padding-right: 0;
      margin-left: auto;
      margin-right: auto;
      display: block;
    }

    canvas.emscripten {
      border: 1px solid black;
    }

    textarea.emscripten {
      font-family: monospace;
      width: 100%;
    }

    div.emscripten {
      text-align: center;
    }

  </style>
  <style id="document_style" type="text/css">
    h3 {
      display: inline;
      font-size: 1em;
    }

    input[type="number"] {
      width: 40px;
      font-size: 24px;
    }

    input[type="text"] {
      width: 40px;
      font-size: 24px;
    }

    input[type="button"] {
      width: 40px;
      font-size: 24px;
    }

    .outdiv {
      width: 410px;
      max-height: 200px;
      overflow: auto;
    }

    .filenamecss {
      width: 80px;
      height: 20px
    }

    .historyinput {
      width: 400px;
    }
  </style>
  <style type="text/css">
    #divoutput span.mjx-chtml.MJXc-display { display: inline-block; }
    .matrixcell {
      font-size: 18px;
      width: 80px;
    }

    td.matrixcell {
      border: 1px solid;
    }

    input.matrixcell {
      width: 80px;
    }

    input.matrixcell:hover {
      background-color: #eee;
    }

    input.matrixcell:focus {
      background-color: #ccf;
    }

    input.matrixcell:not(:focus) {
      text-align: right;
    }

    textarea.matrixcell {
      width: 80px;
      height: 22px;
    }

    textarea.matrixcell:hover {
      background-color: #eee;
    }

    textarea.matrixcell:focus {
      background-color: #ccf;
    }

    textarea.matrixcell:not(:focus) {
      text-align: right;
    }

    div.matrixcell:hover {
      background-color: #eee;
    }

    div.matrixcell:focus {
      background-color: #ccf;
    }

    div.matrixcell:not(:focus) {
      text-align: right;
    }

    .micropy {
      border-color: yellow;
    }
    .js {
      border-color: orange;
    }
    .cas {
      border-color: cyan;
    }
    .xcas {
      border-color: magenta;
    }
  </style>
  <script>
      // Redirect to HTTPS page if not testing locally
      if (location.protocol === 'http:' && location.hostname !== 'localhost' && location.hostname !== '127.0.0.1') {
          location.href = 'https:' + window.location.href.substring(window.location.protocol.length);
      }
  </script>
  <script>
    function $id(id) { return document.getElementById(id); }
  </script>
</head>
<body>
<!-- https://developer.mozilla.org/fr/docs/Web/API/Service_Worker_API/Using_Service_Workers
    pour le moment, on utilise manifest="xcas.appcache" en en-tete et
      on modifie xcas.appcache...
    xcasfr.html
      Ok &#x2705;
      Annul. &#x274C;
    xcas.js
      Forum &#x282A;
      >X< &#x274C;
      Ok &#x2705;
    -->
<script language="javascript">
    if (window.location.href.substr(0, 4) == "http") {
        if ('serviceWorker' in navigator) {
            navigator.serviceWorker.register('service-worker.js');
        }
    }
    KEY_DOWN = 40;
    KEY_UP = 38;
    KEY_LEFT = 37;
    KEY_RIGHT = 39;

    KEY_END = 35;
    KEY_BEGIN = 36;


    KEY_BACK_TAB = 8;
    KEY_TAB = 9;
    KEY_SH_TAB = 16;
    KEY_ENTER = 13;
    KEY_ESC = 27;
    KEY_SPACE = 32;
    KEY_DEL = 46;

    KEY_A = 65;
    KEY_B = 66;
    KEY_C = 67;
    KEY_D = 68;
    KEY_E = 69;
    KEY_F = 70;
    KEY_G = 71;
    KEY_H = 72;
    KEY_I = 73;
    KEY_J = 74;
    KEY_K = 75;
    KEY_L = 76;
    KEY_M = 77;
    KEY_N = 78;
    KEY_O = 79;
    KEY_P = 80;
    KEY_Q = 81;
    KEY_R = 82;
    KEY_S = 83;
    KEY_T = 84;
    KEY_U = 85;
    KEY_V = 86;
    KEY_W = 87;
    KEY_X = 88;
    KEY_Y = 89;
    KEY_Z = 90;

    KEY_PF1 = 112;
    KEY_PF2 = 113;
    KEY_PF3 = 114;
    KEY_PF4 = 115;
    KEY_PF5 = 116;
    KEY_PF6 = 117;
    KEY_PF7 = 118;
    KEY_PF8 = 119;

    REMAP_KEY_T = 5019;

    function checkEventObj(_event_) {
        // --- IE explorer
        if (window.event)
            return window.event;
        // --- Netscape and other explorers
        else
            return _event_;
    }

    function applyKey(_event_) {
        // --- Retrieve event object from current web explorer
        var winObj = checkEventObj(_event_);
        var intKeyCode = winObj.keyCode;
        var intShiftKey = winObj.shiftKey;
        var intAltKey = winObj.altKey;
        var intCtrlKey = winObj.ctrlKey;
        var done = false;
        if (intShiftKey && intKeyCode == KEY_ENTER) {
            UI.insert_focused( '\n');
            done = true;
        }
        // raccourcis avec Alt
        // F1 aide, c cmdline, m menu,
        //console.log(intAltKey,intKeyCode);
        if (!done && (intAltKey || intCtrlKey)) {
            if (intKeyCode == KEY_D || intKeyCode == KEY_RIGHT) {
                UI.move_focus(UI.focused, 1);
                done = true;
            }
            if (intKeyCode == KEY_G || intKeyCode == KEY_LEFT) {
                UI.move_focus(UI.focused, -1);
                done = true;
            }
            if (intKeyCode == KEY_DOWN) {
                UI.move_focus(UI.focused, 1);
                UI.move_focus(UI.focused, 1);
                done = true;
            }
            if (intKeyCode == KEY_UP) {
                UI.move_focus(UI.focused, -1);
                UI.move_focus(UI.focused, -1);
                done = true;
            }
            if (intKeyCode == KEY_A) {
                var tmp = $id('helptxt');
                tmp.focus();
                tmp.scrollIntoView(false);
                done = true;
            }
            if (intKeyCode == KEY_C && intAltKey) {
                if (UI.focused != cmentree) {
                    if (UI.focused.type == 'textarea') UI.insert(cmentree, UI.focused.value);
                    if (UI.focused.getValue) UI.insert(cmentree, UI.focused.getValue());
                    cmentree.focus();
                }
                done = true;
            }
            if (intKeyCode == KEY_B) {
                cmentree.focus();
                done = true;
            }
            if (intKeyCode == KEY_M) {
                UI.show_menu();
                done = true;
            }
            if (intKeyCode == KEY_T) {
                $id('progbuttons').style.display = 'block';
                $id('boutons_tortue').style.display = 'block';
                UI.hide_show_xcas('boutons_tortue_xcas');
                done = true;
            }
            if (intKeyCode == KEY_P) {
                $id('prog_key').click();
                done = true;
            }
            if (intKeyCode == KEY_TAB || intKeyCode == KEY_PF1) {
                UI.completion(cmentree);
                done = true;
            }
            if (intKeyCode == KEY_E || intKeyCode == KEY_F) {
                UI.exec($id('mathoutput'), 0);
                done = true;
            }
            if (intKeyCode == KEY_N) {
                var field = $id('output');
                field.innerHTML = '';
                $id('consolediv').style.display = 'none';
                $id('settings').scrollIntoView();
                UI.set_config_width();
            }
        }
        if (done) {
            // --- Map the keyCode in another keyCode not used
            winObj.keyCode = REMAP_KEY_T;
            winObj.returnValue = false;
            return false;
        }
        return true;
    }

    document.onkeydown = applyKey;

</script>
<div id="startup2" style="display:none">
  <button onclick="if (UI.usecm){ $id('config').usecm.checked=false;  UI.set_config(false);} cmentree.focus();">Version accessible
  </button>
  pour deficients visuels,
  <a href="xcasen.html#lang=en" target="_blank">English version</a>.
</div>
<div id="startup1">
  Bienvenue dans Xcas pour Firefox ou navigateur compatible
  (c) 2020, B. Parisse et R. De Graeve, Institut Fourier,
  Universit&eacute; de Grenoble.<br>
  Depuis Xcas, taper python ou js dans une ligne de commande pour
  changer d'interpr&eacute;teur vers <a target="_blank" href="https://micropython.org/">MicroPython</a> (Damien P. George et
  al) ou vers <a target="_blank" href="https://bellard.org/quickjs/">QuickJS</a> de
  Fabrice Bellard et Charlie Gordon.
</div>
<div id="startup">
  Si Xcas ne fonctionne pas, <a
    href="https://fr.wikipedia.org/wiki/Aide:Purge_du_cache_du_navigateur"
    target="_blank">effacez
  le cache du navigateur</a> et rechargez.
  <span id="startup_restore" style="display:none">
            <br>
            Restaurer la session pr&eacute;c&eacute;dente
            <button title="Charge la session pr&eacute;c&eacute;dente" onclick="var s=UI.readCookie('xcas_session');UI.restoresession(s,$id('mathoutput'),false,true);">evalu&eacute;e</button> ou
            <button title="Charge la session pr&eacute;c&eacute;dente sans l'&eacute;valuer" onclick="var s=UI.readCookie('xcas_session');UI.restoresession(s,$id('mathoutput'),false,false);">non</button>
            </span>
  <hr>
</div>
<form id="config" style="display:none" onsubmit="setTimeout(function(){
            UI.set_config(true);
            }); return false">
  <h3>Configuration</h3>
  <table>
    <tr>
      <td>
        E-mail personnel <input class="bouton" type="text" name="from"
                                title="Indiquez ici votre adresse e-mail" value="">
        correspondant <input class="bouton" type="text" name="to"
                             title="Indiquez ici l'adresse de la personne &agrave; qui vous envoyez habituellement des sessions, par exemple celle de l'enseignant pour un &eacute;l&egrave;ve" value="">,
        <br> langue de l'aide
        <input type="radio" name="lang" value="radio" title="Francais" checked>fr
        <input type="radio" name="lang" value="radio" title="English">en
        <input type="radio" name="lang" value="radio" title="Spanish">sp
        <input type="radio" name="lang" value="radio" title="Greek">el
        <input type="radio" name="lang" value="radio" title="Deutsch">de
	<br> Export vers
        <input type="radio" name="calc" value="radio" title="Casio" checked>Casio 35eii&90
        <input type="radio" name="calc" value="radio" title="Numworks">Numworks
        <input type="radio" name="calc" value="radio" title="Nspire">TI Nspire CX
	
      </td>
    </tr>
    <tr>
      <td>
        Chiffres:<input class="bouton" type="number" name="digits_mode" title="Nombre de chiffres significatifs (si &gt; 14 multipr&eacute;cision, calculs plus lents)" value=12>
        Autosimplification: <input class="bouton"
                                   type="number" name="autosimp_level"
                                   title="0: pas d'autosimplification, 1: minimum, 2: maximum" value=1
                                   max=2 min=0>
        Syntaxe <input class="bouton" type="button" value="Python"
                       onclick="python_mode.checked=!python_mode.checked; if (python_mode.checked) js_mode.checked=false;"> <input
          class="bouton" type="checkbox" name="python_mode"
	title="Cocher pour utiliser la syntaxe compatible Python">,
	<input class="bouton" type="button" value="MicroPython"
                       onclick="python_xor.checked=!python_xor.checked; if (python_xor.checked){ js_mode.checked=false;python_mode.checked=true;}"> <input class="bouton" type="checkbox" name="python_xor"
	title="Si coche, utilise l'interpreteur Micropython">,
	<input class="bouton" type="button" value="JS"
                       onclick="js_mode.checked=!js_mode.checked;if (js_mode.checked) python_mode.checked=python_xor.checked=false;"> <input class="bouton" type="checkbox" name="js_mode"
	title="Si coche, utilise l'interpreteur Javascript">,
        <input class="bouton" type="button" title="Afficher les alertes Python" value="warnings" onclick="warnpy_mode.checked=!warnpy_mode.checked">
        <input class="bouton" type="checkbox" name="warnpy_mode"
               title="Cocher pour afficher les alertes Python" checked>
      </td>
    </tr>
    <tr>
      <td>
        <input class="bouton" type="button" title="Bascule unit&eacute; d'angles radians/degr&eacute;s" value="Radians" onclick="angle_mode.checked=!angle_mode.checked;"> <input class="bouton" type="checkbox" name="angle_mode" title="Cocher pour utiliser les radians, d&eacute;cocher pour utiliser les degr&eacute;s" checked>,
        <input class="bouton" type="button" title="Bascule mode complexe/r&eacute;el" value="Complexe" onclick="complex_mode.checked=!complex_mode.checked"> <input class="bouton" type="checkbox" name="complex_mode" title="Cocher pour travailler par d&eacute;faut sur les complexes">,
        <input class="bouton" type="button" title="Bascule pour toujours factoriser les polynomes de degr&eacute; 2" value=" √ " onclick="sqrt_mode.checked=!sqrt_mode.checked"> <input class="bouton" type="checkbox" name="sqrt_mode" title="Cocher pour toujours factoriser les polynomes de degr&eacute; 2">,
        <input class="bouton" type="button" title="Bascule pour montrer les &eacute;tapes de certains calculs" value="step" onclick="step_mode.checked=!step_mode.checked"> <input class="bouton" type="checkbox" name="step_mode" title="Cocher pour montrer les &eacute;tapes de certains calculs">,
        <input class="bouton" type="button" title="Bascule pour executer les calculs par un webworker" value="worker" onclick="worker_mode.checked=!worker_mode.checked"> <input class="bouton" type="checkbox" name="worker_mode" title="Cocher pour executer les calculs par un webworker">
        <input class="bouton" type="button" title="Utiliser web-assembly si possible" value="wasm" onclick="wasm_mode.checked=!wasm_mode.checked"> <input class="bouton" type="checkbox" name="wasm_mode" title="Cocher pour executer les calculs en web-assembly">
      </td>
    </tr>
    <tr>
      <td>
        <input class="bouton" type="button" title="Bascule pour affichage 2d" value="2d" onclick="prettyprint.checked=!prettyprint.checked"> <input class="bouton" type="checkbox" name="prettyprint"
                                                                                                                                                    title="Cocher pour affichage 2d" checked>,
        <input class="bouton" type="button" title="Bascule pour avoir commandes et reponses sur le meme niveau" value="Q/R sur 1 ligne" onclick="qa.checked=!qa.checked"> <input class="bouton" type="checkbox" name="qa"
                                                                                                                                                                                 title="Cocher pour avoir commandes et reponses sur le meme niveau">,
        <input class="bouton" type="button" title="Coloration syntaxique si on edite un niveau existant" value="Coloration syntaxique" onclick="usecm.checked=!usecm.checked"> <input class="bouton" type="checkbox" name="usecm"
                                                                                                                                                                                      title="Coloration syntaxique si on edite un niveau existant">
        <input class="bouton" type="button" title="Boutons de deplacement et del persistants" value="Del fixe" onclick="fixeddel.checked=!fixeddel.checked"> <input class="bouton" type="checkbox" name="fixeddel"
                                                                                                                                                                    title="Les boutons de deplacement et del sont toujours affich&eacute;s" checked>
      </td>
    </tr>
    <tr>
      <td>
        Tortue <input class="bouton" type="number" name="canvas_w" value=400
                      title="Largeur des graphiques tortue">
        par <input class="bouton" type="number" name="canvas_h" value=300
                   title="Hauteur des graphiques tortue">
        Sortie <input class="bouton" type="number" name="outdiv_width" value=410
                      title="Largeur maximale d'un champ r&eacute;ponse">
        par <input class="bouton" type="number" name="outdiv_height" value=190
                   title="Hauteur maximale d'un champ r&eacute;ponse">
      </td>
    </tr>
    <tr>
      <td>
        Taille maximale de l'assistant matrice
        <input class="bouton" type="number" name="matr_cfg_rows" id="matr_cfg_rows"
               title="Nombre de lignes" value=40 min=1 max=1000>,
        <input class="bouton" type="number" name="matr_cfg_cols" id="matr_cfg_cols"
               title="Nombre de colonnes" value=6 min=1 max=100>
        <input class="bouton" type="checkbox" name="matr_textarea"
               onclick="UI.assistant_matr_textarea=checked; UI.assistant_matr_setmatrix(UI.assistant_matr_maxrows,UI.assistant_matr_maxcols); UI.assistant_matr_setdisplay();"
               id="matr_textarea" title="Cocher pour avoir des cellules dont on peut changer la taille">d&eacute;formable
      </td>
    </tr>
    <tr>
      <td>
        Documentation <input class="bouton" type="checkbox" name="online_doc"
                             title="Cocher si Xcas n'est pas install&eacute; (utilise la documentation en ligne)" checked>online
        <input class="bouton" type="text" name="doc_path" size="60"
               value="/usr/share/giac/doc/fr/cascmd_fr/"
               title="Chemin de la documentation hors-ligne (pr&eacute;rempli pour une installation Xcas sous linux, sous mac ajouter /Applications)">
      </td>
    </tr>
  </table>
  <input class="bouton" type="submit" title="ok" value="Ok">
  <input class="bouton" type="button" title="Annule les changements de configuration" value="Annul." onclick="form.style.display='none';  UI.focused.focus();">
  <hr>
</form>
<button id="settings" class="bouton" onclick="UI.show_config()" title="Permet de modifier la configuration">
  <img WIDTH="28" HEIGHT="28" SRC="config.png" alt="Configuration" align="center">
  <span id='curcfg'></span>
</button>
<span id='thelink'></span>
<span id='themailto'></span>
<textarea id='theforumlink' style="display:none"></textarea>
<textarea id='locallink' style="display:none"></textarea>
<span id="history1" style="display:none">
        <button class="bouton" title="Cliquer ici pour sauvegarder l'historique avec le nom de fichier du champ texte qui suit" onclick="if ($id('loadbutton_file').style.display=='none') UI.savesession(2); else UI.savesession(0);">&#x1f4be;</button>
        <textarea cols="7" id="outputfilename" class="filenamecss" style="font-size:large" title="Nom de sauvegarde du fichier. Avec Firefox, pour pouvoir faire plusieurs sauvegardes sous le meme nom, cocher Toujours demander... dans Pr&eacute;f&eacute;rences, G&eacute;n&eacute;ral, T&eacute;l&eacute;chargements.">session</textarea>
        <button id="exportbutton" class="bouton" title="Cliquer ici pour exporter pour calculatrices (Casio Graph 35eii&90, Numworks ou TI Nspire CX, &agrave; configurer dans les pr&eacute;f&eacute;rences) avec le nom de fichier du champ texte qui pr&eacute;c&egrave;de. Utilisez .py comme extension pour concatener tous les niveaux en un unique script." onclick='UI.savesession(1);'>Export</button>
  </span>
<span id="historyload" style="display:none">
  <button id="numworks_load" class="bouton" title="Cliquer ici pour charger un script depuis une calculatrice Numworks" onclick="UI.numworks_load()">Numworks→</button>
<button id="loadbutton_cookie" class="bouton" title="Cliquer ici pour charger une session sauvegard&eacute;e" onclick="$id('loadfile_cookie').innerHTML=UI.listCookies();">Charge</button>
</span>
  <span id="loadfile_cookie"></span>
<form id="loadbutton_file" style="display:none">
  <label for="loadfileinput">Charger</label>
  <input id="loadfileinput" accept=".xw" type="file" title="Cliquer ici pour charger une session sauvegard&eacute;e (s&eacute;lectionner un fichier terminant par .xw.tns pour les TI Nspire CX ou _xw.py pour les Numworks)" onchange="UI.loadfile(this.files);this.value=''">
</form>
<span id="help" style="display:none">
        <ul>
            <li style="display:inline">
                <button class="bouton"
                        onclick="$id('help').style.display='none';">
                <em>Masquer la documentation</em></button>
            </li>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutointro'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Introduction</strong></button>
                <div id="tutointro" style="display:none">
                    Tapez votre calcul ou programme dans la ligne de commande en bas de la page
		  (attention, tapez <tt>1.2</tt> pour 1 virgule
		  2). Pour apprendre &agrave; utiliser Xcas, vous
		  pouvez lire ce
		  <a href="https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/tutoriel/index.html" target="_blank">tutoriel</a>
		 
		  <br>
                    Cliquez sur l'icone de <tt>Xcas</tt> ou le bouton
                    <tt>Prog</tt> pour afficher des assistants
                    math&eacute;matiques ou algorithmiques, ou sur
                    <tt>123</tt> pour le clavier scientifique.
                    Validez par la touche Entr&eacute;e ou le bouton Ok en vert.
                    <br>
                    Pour obtenir de l'aide sur une commande, tapez le d&eacute;but de son nom
                    puis tapez <tt>F1</tt> ou cliquez sur le bouton <tt>?</tt>.
                    Pour trouver des noms de commandes, utilisez les assistants Maths et
                    Prog ou cliquez sur un des th&egrave;mes
                    ci-dessous ou consultez le
                    <a
                        href="http://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/cascmd_fr"
                        target="_blank">guide de Xcas</a>
		  <br>
		  Vous pouvez choisir l'interpr&eacute;teur depuis la
    configuration (bouton en haut &agrave; gauche avec la roue
    dent&eacute;e) parmi Xcas, <a target="_blank" href="https://micropython.org/">MicroPython</a> ou
    Javascript. L'interpr&eacute;teur Javascript par d&eacute;faut est
    <a target="_blank" href="https://bellard.org/quickjs/">QuickJS</a> en mode math&eacute;matique sauf si votre ligne de
    commande commence par <tt>@</tt> (QuickJS sans le mode math) ou
		  <tt>@@</tt> (interpr&eacute;teur du navigateur).
		  
                </div>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutonet'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Partages</strong></button>
                <div id="tutonet" style="display:none">
                    Vous pouvez partager publiquement une session en cliquant sur le
                    bouton F.
                    Vous pouvez &eacute;changer des sessions de calculs Xcas entre
                    plusieurs personnes par email. Renseignez une fois pour toutes
                    les champs e-mail de la
                    configuration (bouton R&eacute;glages en haut &agrave; gauche)
                    et validez.
                    Vous pouvez alors envoyer votre session &agrave; votre
                    correspondant en cliquant
                    sur le lien &#x2709;, modifiez le destinataire si
                    n&eacute;cessaire (si vous utilisez un webmail
                    non reconnu, recopiez le contenu du lien x2 dans
                    un message ou configurez les param&egrave;tres de
                    votre navigateur pour l'utiliser, il peut &ecirc;tre n&eacute;cessaire de cloner
                    votre session avec le lien x2 avant de cliquer sur le lien &#x2709;).
                    Le destinataire
                    clique sur le lien du mail ce qui ouvrira un clone de votre
                    session dans son navigateur. Il peut alors modifier ou corriger
                    votre session, et si il clique sur le lien &#x2709;, il vous
                    renvoie votre session avec les corrections.
                    <br>
                    Lorsqu'une session est envoy&eacute;e par mail, le nom de la
                    session chez le destinataire est modifi&eacute; par ajout
                    pr&eacute;fix&eacute; de l'adresse e-mail de l'envoyeur, sauf si
                    le nom de session contient @. Si le nom de session commence par @,
                    le caract&egrave;re @ est supprim&eacute;.
                    <br>
                    Exemple: un enseignant envoie &agrave; ses &eacute;l&egrave;ves
                    une session &eacute;nonc&eacute;. Il choisit un nom de session commencant
                    par @, par exemple <tt>@exercice</tt>, il cr&eacute;e
                    la session puis il clique sur le lien &#x2709;
                    et met comme destinataire l'alias mail de la classe. S'il n'y
                    a pas d'alias mail pour la classe, l'enseignant clique
                    sur le lien &#x282A; et poste le sujet sur le forum.
                    Les &eacute;l&egrave;ves font le travail et le renvoient en
                    cliquant sur le lien &#x2709;, qui contient automatiquement
                    l'adresse mail de l'enseignant.
                    Le nom de session devient alors
                    <tt>mail_eleve@fournisseur_internet@exercice</tt> ce qui permet &agrave;
                    l'enseignant de savoir qui il corrige.
                    L'enseignant corrige la session et la renvoie, le nom de session
                    reste inchang&eacute;.
            </li>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutoinst'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Installer</strong></button>
                <div id="tutoinst" style="display:none">
                    Vous pouvez optionnellement installer
                    Xcas sur votre appareil, ce qui permet de l'utiliser
                    en mode avion.
                    <br>
                    Sur mobile, t&eacute;l&eacute;chargez
                    <a
                        href="http://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/xcashtml.zip"
                        target="_blank">
                    xcashtml.zip</a>, d&eacute;zippez-le (par exemple avec Androzip sur Android),
                    cherchez le fichier <tt>xcasfr.html</tt> (sur Android depuis
                    <a href="file:///sdcard/">ici</a>) et ouvrez-le avec votre
                    navigateur.
                    Vous pouvez cr&eacute;er un raccourci sur votre &eacute;cran
                    d'accueil depuis le menu de votre navigateur.
                    <br>
                    Sur PC/Mac: si vous avez install&eacute; Xcas natif pour PC ou Mac
                    en version 1.4.9-57 ou
                    sup&eacute;rieure, Xcas pour Firefox est d&eacute;j&agrave;
                    install&eacute;, sinon faire comme sur mobile.
                    <ul>
                        <li> Windows: cherchez le fichier <tt>xcasfr.html</tt>
                            dans le sous-r&eacute;pertoire <tt>doc</tt> du
                            r&eacute;pertoire d'installation de Xcas, en principe <tt>c:\xcas</tt>.
                        <li> Mac:<a href="file:///Applications/usr/share/giac/doc/xcasfr.html"
                                    target="_blank"><tt>/Applications/usr/share/giac/doc/xcasfr.html</tt></a>,
                        <li> Linux: <a href="file:///usr/share/giac/doc/xcasfr.html"
                                       target="_blank"><tt>/usr/share/giac/doc/xcasfr.html</tt></a>,
		    </ul>
		    Si Xcas pour Firefox ne fonctionne pas avec Firefox en local,
		    il faut d&eacute;sactiver
		    <tt>security.fileuri.strict_origin_policy</tt>
		    dans <tt>about:config</tt>.
                </div>
            </li>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutonws'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Numworks</strong></button>
	    <div id="tutonws" style="display:none">
	      Sur les navigateurs qui impl&eacute;mentent webusb (par
	      exemple Chromium ou Chrome), vous pouvez
	      &eacute;changer facilement des scripts avec une
	      calculatrice Numworks. 
	      <br>
	      V&eacute;rifiez dans la configuration (bouton en haut
	      &agrave; gauche) que l'export est configur&eacute; vers la
	      calculatrice Numworks.
	      Pour r&eacute;cup&eacute;rer un script depuis la
	      calculatrice, cliquer sur le bouton Numworks→. Pour
	      renvoyer un script vers la Numworks, cliquer sur le
	      bouton →Numworks. Le nom du script apparait &agrave; gauche
	      du bouton →Numworks. S'il se termine par <tt>xw</tt>, il
	      d&eacute;signera une session KhiCAS Numworks, s'il se
	      termine par <tt>.py</tt> un script Python. Vous pouvez
	      ensuite facilement partager vos scripts par email ou sur
	      des forums (icone enveloppe ou bouton F)<br>
	      <a href="https://www-fourier.univ-grenoble-alpes.fr/~parisse/numworks/khicasnw.html" target="_blank">KhiCAS</a> est
	      une version pour Numworks de Xcas, qui
	      <a href="nws.html"
                    target="_blank">s'installe </a> sur les
	      Numworks N0110 qui ont une version du syst&egrave;me
	      inf&eacute;rieure ou &eacute;gale &agrave; 15.
	      Sur cette page vous pouvez certifier
	      qu'une calculatrice Numworks contient le firmware
	      KhiCAS d'origine, conforme &agrave; la
	      r&eacute;glementation
	      des examens en France.
	      <b>Attention, ne mettez pas &agrave; jour votre calculatrice
	      sur le site officiel de Numworks, les mises
	      &agrave; jour versions 16 ou plus sont
	      irr&eacute;versiblement incompatibles avec
	      Xcas</b>. <a
                    href="https://tiplanet.org/forum/viewtopic.php?f=97&t=24968"
	      target="_blank">Plus d'informations ici</a> et une
	      <a
                    href="https://www.change.org/freenumworks" target="_blank">p&eacute;tition</a>
                    en ligne pour protester contre cette volte-face de
                    Numworks.
	      <br>
	      Remerciements &agrave; Maxime Friess pour le script
	      <a
                    href="https://github.com/M4xi1m3/numworks.js/blob/master/README.md"
                    target="_blank">Numworks.js</a> (sous licence MIT).
	    </div>
            </li>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutoex'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Exemples lyc&eacute;e</strong></button>
                <div id="tutoex" style="display:none">
                    Ces sessions sont propos&eacute;es en syntaxe Xcas ou en syntaxe Python.
                    Les <em>programmes</em> des sessions
                    &eacute;crits en gras (<strong>Python</strong>)
                    fonctionnent avec un interpr&eacute;teur Python (apr&egrave;s avoir fait
                    <tt>from math import *</tt> dans certains cas), ceux &eacute;crits
                    en italiques (<em>Python</em>) fonctionnent partiellement
                    (<button onclick="$id('tutoprog').style.display='block';var tmp=$id('progpython');tmp.style.display='block';tmp.scrollIntoView()">plus de d&eacute;tails sur la compatibilit&eacute;</button>).
                    <ul>
                        <li>Variables,
                            types, affectation, test, boucle, fonction, syntaxe
                            <a
                                href="#python=0&exec&+///Utilisez%20le%20point%20(.)%20pour%20s%C3%A9parer%20partie%20enti%C3%A8re%20et%20d%C3%A9cimale,%20expliciter%20les%20multiplications,%20attention%20aux%20parenth%C3%A8ses&+1.2%3B%202*3%2B4%3B%202*(3%2B4)&+expand((x%2B1)%5E2)%3B%0Afactor(x%5E2%2B4x%2B4)%3B%0Asin(pi%2F3)&+///%20Variables,%20l'affectation%20se%20fait%20avec%20:=&+a%3A%3D2&+2*a%2B5&+a%3A%3D2%3B%20type(a)&+a%3A%3D2.3%3B%20type(a)&+a%3A%3D%22bonjour%22%3B%20type(a)&+///%20Un%20test&+a%3A%3D1%3B%20%0Asi%20a%3E0%20alors%20%22positif%22%3B%20%0Asinon%20%22negatif%22%3B%20fsi%3B&+///Une%20boucle%20d%C3%A9finie,%20l'affichage%20print%20se%20fait%20dans%20la%20console%20tout%20en%20bas&+pour%20j%20de%201%20jusque%2010%20faire%0A%20%20print(j%2B%22%20au%20carre%20vaut%20%22%2Bj%5E2)%3B%20%0Afpour%3B&+///%20Une%20boucle%20tantque,%20illustrant%20la%20pr%C3%A9cision%20des%20tests%20avec%20des%20nombres%20approch%C3%A9s.&+j%3A%3D1.0%3B%20%0Atantque%20j-1!%3Dj%20faire%20%0A%20%20j%3D2*j%3B%20%0Aftantque%3B&+///%20Cr%C3%A9ation%20d'une%20fonction%20simple,%20par%20exemple%20le%20milieu%20de%202%20points%20$A$%20et%20$B$.%20On%20construit%20d'abord%20le%20milieu%20de%20mani%C3%A8re%20interactive.&+A%3A%3Dpoint(1%2C2)%3B%20B%3A%3Dpoint(-2%2C-2)&+Ax%3A%3Dabscisse(A)%3B%20%0AAy%3A%3Dordonnee(A)%3B%0ABx%3A%3Dabscisse(B)%3B%20%0ABy%3A%3Dordonnee(B)&+///%20On%20calcule%20$M$%20et%20on%20fait%20la%20repr%C3%A9sentation%20graphique%20des%20trois%20points.&+M%3A%3Dpoint((Ax%2BBx)%2F2%2C(Ay%2BBy)%2F2)%3B%0AA%3B%0AB%3B&+///%20On%20regroupe%20maintenant%20ces%20instructions%20dans%20une%20fonction%20puis%20on%20teste%20la%20fonction.&+fonction%20Milieu(A%2CB)%0A%20%20var%20Ax%2CAy%2CBx%2CBy%3B%0A%20%20Ax%3A%3Dabscisse(A)%3B%20%0A%20%20Ay%3A%3Dordonnee(A)%3B%0A%20%20Bx%3A%3Dabscisse(B)%3B%20%0A%20%20By%3A%3Dordonnee(B)%3B%20%0A%20%20retourne%20point((Ax%2BBx)%2F2%2C(Ay%2BBy)%2F2)%3B%0Affonction%3A%3B&+A%3BB%3BM%3A%3DMilieu(A%2CB)&+///%3Ch1%3eExercice%3C/h1%3e%20%C3%A9crire%20une%20fonction%20%3Ctt%3eCercle(A,B,C)%3C/tt%3e%20qui%20renvoie%20le%20cercle%20circonscrit%20au%20triangle%20$ABC$,%20en%20utilisant%20les%20commandes%20%3Ctt%3emediatrice%3C/tt%3e,%20%3Ctt%3einter_unique%3C/tt%3e,%20%3Ctt%3edistance%3C/tt%3e%20et%20%3Ctt%3ecercle(centre,rayon)%3C/tt%3e&"
                                target="_blank">
                            Xcas</a> ou
                            <a
                                href="#exec&python=1&+///En%20ligne%20de%20commande,%20utiliser%20des%20points%20(.)%20pour%20s%C3%A9parer%20partie%20enti%C3%A8re%20et%20d%C3%A9cimale%20des%20nombres,%20expliciter%20les%20multiplications,%20attention%20aux%20parenth%C3%A8ses.%0aSi%20la%20commande%20est%20sur%20plusieurs%20lignes,%20utilisez%20Shift-Entr%C3%A9e%20pour%20passer%20%C3%A0%20la%20ligne.%0aDans%20Xcas,%20la%20syntaxe%20Python%20est%20activ%C3%A9e%20automatiquement%20lorsqu'on%20d%C3%A9finit%20une%20fonction%20ou%20si%20la%20commande%20commence%20par%20un%20commentaire%20Python%20(%3Ctt%3e#%3C/tt%3e)&+%23%20calcul%20avec%20des%20nombres%0A1.2%0A2*3%2B4%0A2*(3%2B4)&+%23%20calculs%20litteraux%0Adevelopper((x%2B1)%5E2)%0Afactoriser(x%5E2%2B4x%2B4)%0Asin(pi%2F3)&+///Variables,%20l'affectation%20se%20fait%20avec%20:=,%20ou%20=%20en%20mode%20Python.&+a%3D2&+2*a%2B5&+type(a)&+a%3D2.3&+type(a)&+%23%0Aa%3D%22bonjour%22%0Atype(a)&+///%20Un%20test&+%23%0Aa%3D1%0Aif%20a%3E0%3A%20%0A%20%20%20%20%22positif%22%0Aelse%3A%0A%20%20%20%20%22negatif%22&+///%20Une%20boucle%20d%C3%A9finie,%20l'affichage%20des%20print%20se%20fait%20dans%20la%20console%20tout%20en%20bas.&+for%20j%20in%20range(10)%3A%0A%20%20%20%20print(j%2B%22%20au%20carre%20vaut%20%22%2Bj%5E2)&+///Une%20boucle%20tantque,%20qui%20s'arr%C3%AAte%20lorsque%20la%20valeur%20approch%C3%A9e%20de%20%3Ctt%3ej%3C/tt%3e%20est%20consider%C3%A9e%20comme%20%C3%A9gale%20%C3%A0%20%3Ctt%3ej+1%3C/tt%3e&+%23%0Aj%3D1.0%0Awhile%20j-1!%3Dj%3A%0A%20%20%20%20j%3D2*j&+///D%C3%A9finition%20d'une%20fonction%20simple,%20la%20valeur%20absolue.&+def%20Abs(x)%3A%0A%20%20if%20x%3C0%3A%0A%20%20%20%20return%20-x%0A%20%20return%20x&+Abs(-3)%3B%20Abs(5)&+///%3Cem%3eAttention,%20ce%20qui%20pr%C3%A9c%C3%A8de%20fonctionne%20avec%20un%20interpr%C3%A9teur%20Python%20pur%20sauf%20les%20calculs%20litt%C3%A9raux,%20mais%20ce%20qui%20suit%20ne%20fonctionnera%20pas%20avec%20un%20interpr%C3%A9teur%20Python%20pur%3C/em%3e.%0aCr%C3%A9ation%20d'une%20fonction%20simple%20en%20g%C3%A9om%C3%A9trie.%20%0aCalcul%20du%20milieu%20de%202%20points%20:%20on%20construit%20d'abord%20le%20milieu%20de%20mani%C3%A8re%20interactive&+%23%20creation%20de%202%20points%0AA%3Dpoint(1%2C2)%20%0AB%3Dpoint(-2%2C-2)&+%23%20calcul%20des%20coordonnes%0AAx%3Dabscisse(A)%20%0AAy%3Dordonnee(A)%0ABx%3Dabscisse(B)%0ABy%3Dordonnee(B)&+%23%20calcul%20de%20M%20et%20representation%20graphique%0AM%3Dpoint((Ax%2BBx)%2F2%2C(Ay%2BBy)%2F2)%0AA%0AB&+///%20On%20regroupe%20ces%20instructions%20dans%20une%20fonction&+def%20Milieu(A%2CB)%3A%0A%20%20%20%20%23%20local%20Ax%2CAy%2CBx%2CBy%3B%0A%20%20%20%20Ax%3Dabscisse(A)%0A%20%20%20%20Ay%3Dordonnee(A)%0A%20%20%20%20Bx%3Dabscisse(B)%0A%20%20%20%20By%3Dordonnee(B)%0A%20%20%20%20return%20point((Ax%2BBx)%2F2%2C(Ay%2BBy)%2F2)&+%23%0AA%0AB%0AM%3DMilieu(A%2CB)&+///%3Ch1%3eExercice%3C/h1%3e%20%C3%A9crire%20une%20fonction%20%3Ctt%3eCercle(A,B,C)%3C/tt%3e%20qui%20renvoie%20le%20cercle%20circonscrit%20au%20triangle%20$ABC$,%20en%20utilisant%20les%20commandes%20%3Ctt%3emediatrice%3C/tt%3e,%20%3Ctt%3einter_unique%3C/tt%3e,%20%3Ctt%3edistance%3C/tt%3e%20et%20%3Ctt%3ecercle(centre,rayon)%3C/tt%3e&"
                                target="_blank"><em>Python</em></a>
                        </li>
                        <li> Seconde: tortue.
                            Cliquez sur le bouton     <button onclick="$id('tutotortue').style.display='block';$id('tutoprog').style.display='none' ">
                            <strong>Tortue</strong>
                            </button>pour voir des exemples.
                        </li>
                        <li> Seconde, longueur de courbe
                            <a
                                href="#exec&python=0&+///Longueur%20d'un%20arc%20de%20courbe%20en%20l'approchant%20par%20une%20ligne%20polygonale.%20Dans%20un%20premier%20temps,%20on%20peut%20faire%20tracer%20le%20graphe%20%C3%A0%20la%20main.%20On%20peut%20prolonger%20en%20remplacant%20$1/x$%20par%20une%20fonction%20$f$%20quelconque,%20par%20exemple%20$sqrt(1-x^2)$%20sur%20$[0,1]$.&+plot(1%2Fx%2Cx%2C1%2C4%2Ccolor%3Dred)%3B%20open_polygon(seq(point(x%2C1%2Fx)%2Cx%2C1%2C4))&+fonction%20Distance(xa%2Cxb)%0A%20%20local%20ya%2Cyb%3B%0A%20%20ya%3A%3D1%2Fxa%3B%0A%20%20yb%3A%3D1%2Fxb%3B%0A%20%20return%20sqrt((xb-xa)^2%2B(yb-ya)^2)%3B%0Affonction%3A%3B&+Distance(1%2C2)%2BDistance(2%2C3)%2BDistance(3%2C4)&+fonction%20Longueur(xa%2Cxb%2CN)%0A%20%20local%20h%2Cd%2Ck%3B%0A%20%20h%3A%3D(xb-xa)%2FN%3B%20%0A%20%20d%3A%3D0%3B%0A%20%20pour%20k%20de%200%20jusque%20N-1%20faire%0A%20%20%20%20d%3A%3Dd%2BDistance(xa%2Bk*h%2Cxa%2B(k%2B1)*h)%3B%0A%20%20fpour%3B%0A%20%20return%20d%3B%0Affonction%3A%3B&+l%3A%3DLongueur(1%2C4%2C10)&+arclen(1%2Fx%2C1.0%2C4)%3B&"
                                target="_blank">Xcas</a>,
                            <a href="#exec&python=1&+///Longueur%20d'un%20arc%20de%20courbe%20en%20l'approchant%20par%20une%20ligne%20polygonale.%20Dans%20un%20premier%20temps,%20on%20peut%20faire%20tracer%20le%20graphe%20%C3%A0%20la%20main.%20On%20peut%20prolonger%20en%20remplacant%20$1/x$%20par%20une%20fonction%20$f$%20quelconque,%20par%20exemple%20$sqrt(1-x^2)$%20sur%20$[0,1]$.&+plot(1%2Fx%2Cx%2C1%2C4%2Ccolor%3Dred)%3B%20open_polygon(seq(point(x%2C1%2Fx)%2Cx%2C1%2C4))&+def%20Distance(xa%2Cxb)%3A%0A%20%20%20%20%23%20local%20ya%2Cyb%0A%20%20%20%20ya%3D1%2Fxa%0A%20%20%20%20yb%3D1%2Fxb%0A%20%20%20%20return%20sqrt((xb-xa)**2%2B(yb-ya)**2)&+Distance(1%2C2)%2BDistance(2%2C3)%2BDistance(3%2C4)&+def%20Longueur(xa%2Cxb%2CN)%3A%0A%20%20%20%20%23%20local%20h%2Cd%2Ck%0A%20%20%20%20h%3D(xb-xa)%2F(N*1.0)%20%23%201.0%20pour%20Python%202%0A%20%20%20%20d%3D0%0A%20%20%20%20for%20k%20in%20range(N)%3A%0A%20%20%20%20%20%20%20%20d%3Dd%2BDistance(xa%2Bk*h%2Cxa%2B(k%2B1)*h)%0A%20%20%20%20return%20d&+l%3A%3DLongueur(1%2C4%2C10)&+arclen(1%2Fx%2C1.0%2C4)%3B&"
                               target="_blank"><strong>Python</strong></a>
                        </li>
                        <li> Seconde, recherche de minimum
                            <a
                                href="#exec&python=0&+///Recherche%20de%20minimum%20local.%0aPrincipe:%20automatiser%20ce%20qu'on%20ferait%20avec%20un%20tableau%20de%20valeurs,%20on%20cherche%20la%20plus%20petite%20valeur%20et%20on%20zoome%20le%20tableau%20%C3%A0%20proximit%C3%A9.%20Dans%20%3Ctt%3etabval%3C/tt%3e%20on%20peut%20faire%20changer%20le%20nombre%20de%20subdivisions%20par%20les%20%C3%A9l%C3%A8ves%20et%20leur%20faire%20observer%20qu'avec%20par%20exemple%20100%20ou%201000%20subdivisions,%20c'est%20trop%20difficile%20de%20trouver%20la%20plus%20petite%20valeur,%20d'o%C3%B9%20l'int%C3%A9r%C3%AAt%20de%20zoomer.%0aDans%20la%20fonction%20%3Ctt%3eposmin10%3C/tt%3e,%20on%20se%20donne%20un%20intervalle%20$[a,b]$%20et%20une%20fonction%20$f$,%20on%20coupe%20l'intervalle%20en%2010,%20on%20cherche%20la%20plus%20petite%20valeur.%0aDans%20la%20fonction%20%3Ctt%3eposmin%3C/tt%3e%20on%20recommence%20ensuite%20sur%20l'intervalle%20encadrant%20la%20plus%20petite%20valeur%20trouv%C3%A9e%20ce%20qui%20permet%20d'am%C3%A9liorer%20la%20pr%C3%A9cision.&+f(x)%3A%3Dx%5E4%2Bx%5E2%2Bx%2B1&+fonction%20tabval(f%2Ca%2Cb)%0A%20%20local%20x%2Cj%2Ch%2Cl%3B%0A%20%20h%3A%3D(b-a)%2F10.0%3B%0A%20%20l%3A%3D%5B%5D%3B%0A%20%20pour%20j%20de%200%20jusque%2010%20faire%0A%20%20%20%20x%3A%3Da%2Bj*h%3B%0A%20%20%20%20l.append(%5Bx%2Cf(x)%5D)%3B%0A%20%20fpour%3B%0A%20%20return%20l%3B%0Affonction%3A%3B&+l%3A%3Dtabval(f%2C-2%2C2)&+plotfunc(f(x)%2Cx%2C-2%2C2)%3B%0Acouleur(polygone_ouvert(l)%2C%0A%20%20rouge)&+///On%20voit%20que%20le%20minimum%20est%20entre%20-0.8%20et%200&+tabval(f%2C-0.8%2C0)&+fonction%20posmin10(f%2Ca%2Cb)%0A%20%20local%20j%2Cxcur%2Cxmin%2Cfxcur%2Cfxmin%2Ch%3B%0A%20%20h%3A%3D(b-a)%2F10.0%3B%0A%20%20xmin%3A%3Da%3B%0A%20%20fxmin%3A%3Df(xmin)%3B%0A%20%20pour%20j%20de%201%20jusque%2010%20faire%0A%20%20%20%20xcur%3A%3Da%2Bj*h%3B%0A%20%20%20%20fxcur%3A%3Df(xcur)%3B%0A%20%20%20%20si%20fxcur%3Cfxmin%20alors%0A%20%20%20%20%20%20xmin%3A%3Dxcur%3B%0A%20%20%20%20%20%20fxmin%3A%3Dfxcur%3B%0A%20%20%20%20fsi%3B%0A%20%20fpour%3B%0A%20%20return%20xmin%3B%0Affonction%3A%3B&+posmin10(f%2C-2%2C2)&+fonction%20posmin(f%2Ca%2Cb%2Ceps)%0A%20%20local%20x%2Ch%3B%0A%20%20x%3A%3Da%3B%0A%20%20tantque%20b-a%3Eeps%20faire%0A%20%20%20%20x%3A%3Dposmin10(f%2Ca%2Cb)%3B%0A%20%20%20%20h%3A%3D(b-a)%2F10.0%3B%0A%20%20%20%20si%20x!%3Da%20alors%20a%3A%3Dx-h%3B%20fsi%3B%0A%20%20%20%20si%20x!%3Db%20alors%20b%3A%3Dx%2Bh%3B%20fsi%3B%0A%20%20ftantque%3B%0A%20%20return%20x%3B%0Affonction%3A%3B&+posmin(f%2C-2%2C2%2C1e-4)&+///On%20peut%20prolonger%20l'exercice%20en%20premi%C3%A8re%20ou%20terminale.%0aLe%20minimum%20de%20$f$%20est%20un%20z%C3%A9ro%20de%20$f'$%20que%20l'on%20peut%20d%C3%A9terminer%20avec%20la%20commande%20%3Ctt%3efsolve%3C/tt%3e%20ou%20par%20dichotomie.&+fsolve(f'(x)%3D0%2Cx)&"
                                target="_blank">Xcas</a>,
                            <a
                                href="#exec&python=1&+///Recherche%20de%20minimum%20local.%0aOn%20se%20donne%20un%20intervalle%20$[a,b]$%20et%20une%20fonction%20$f$,%20on%20coupe%20l'intervalle%20en%2010,%20on%20cherche%20la%20plus%20petite%20valeur.%20On%20recommencera%20ensuite%20sur%20l'intervalle%20encadrant%20la%20plus%20petite%20valeur%20pour%20ameliorer%20la%20pr%C3%A9cision.&+def%20tabval(f%2Ca%2Cb)%3A%0A%20%20%20%20%23%20local%20x%2Cj%2Ch%2Cl%3B%0A%20%20%20%20h%3D(b-a)%2F10.0%0A%20%20%20%20l%3D%5B%5D%0A%20%20%20%20for%20j%20in%20range(11)%3A%0A%20%20%20%20%20%20%20%20x%3Da%2Bj*h%0A%20%20%20%20%20%20%20%20l.append(%5Bx%2Cf(x)%5D)%0A%20%20%20%20return%20l&+def%20f(x)%3A%0A%20%20%20%20return%20x**4%2Bx**2%2Bx%2B1&+l%3Dtabval(f%2C-2%2C2)&+plotfunc(f(x)%2Cx%2C-2%2C2)%3B%0Acouleur(polygone_ouvert(l)%2C%0A%20%20rouge)&+///Le%20minimum%20est%20entre%20-0.8%20et%200.%20On%20zoome.&+tabval(f%2C-0.8%2C0)&+///On%20automatise%20le%20zoom.&+def%20posmin10(f%2Ca%2Cb)%3A%0A%20%20%20%20%23%20local%20j%2Cxcur%2Cxmin%2Cfxcur%2Cfxmin%2Ch%0A%20%20%20%20h%3D(b-a)%2F10.0%0A%20%20%20%20xmin%3Da%0A%20%20%20%20fxmin%3Df(xmin)%0A%20%20%20%20for%20j%20in%20range(11)%3A%0A%20%20%20%20%20%20%20%20xcur%3Da%2Bj*h%0A%20%20%20%20%20%20%20%20fxcur%3Df(xcur)%0A%20%20%20%20%20%20%20%20if%20fxcur%3Cfxmin%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20xmin%3Dxcur%0A%20%20%20%20%20%20%20%20%20%20%20%20fxmin%3Dfxcur%0A%20%20%20%20return%20xmin&+posmin10(f%2C-3%2C0)&+def%20posmin(f%2Ca%2Cb%2Ceps)%3A%0A%20%20%20%20%23%20local%20x%2Ch%0A%20%20%20%20x%3Da%0A%20%20%20%20while%20b-a%3Eeps%3A%0A%20%20%20%20%20%20%20%20x%3Dposmin10(f%2Ca%2Cb)%0A%20%20%20%20%20%20%20%20h%3D(b-a)%2F10.0%0A%20%20%20%20%20%20%20%20if%20x!%3Da%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20a%3Dx-h%0A%20%20%20%20%20%20%20%20if%20x!%3Db%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20b%3Dx%2Bh%0A%20%20%20%20return%20x&+posmin(f%2C-2%2C1%2C1e-2)&"
                                target="_blank"><strong>Python</strong></a>
                        </li>
                        <li> Seconde: trac&eacute; de courbe, syntaxe
                            <a
                                href="#python=0&exec&+///Soit%20$f$%20la%20fonction%20d%C3%A9finie%20par%20$f(x)=-x^2-3$%20lorsque%20$x%3C0$%20et%20$f(x)=x^2+1$%20sinon&+f(x)%3A%3Dsi%20x%3C0%20alors%20-x%5E2-3%20%0A%20%20sinon%20x%5E2%2B1%20fsi%3B&+///%20On%20commence%20par%20faire%20un%20tableau%20de%20valeurs&+L%3A%3DNULL%3B%20%0Apour%20x%20de%20-3%20jusque%203%20pas%200.5%20faire%0A%20%20L%3A%3DL%2C%5Bx%2Cf(x)%5D%3B%0Afpour%3B&+polygone_ouvert(L)&+///Observer%20le%20saut%20%C3%A0%20la%20discontinuit%C3%A9.%20Il%20faudrait%20faire%202%20trac%C3%A9s,%20on%20a%20donc%20int%C3%A9ret%20%C3%A0%20faire%20une%20fonction%20et%20l'appeler%20deux%20fois.&+fonction%20tabval(f%2Cxmin%2Cxmax%2Cdx)%0A%20%20var%20x%2CL%3B%0A%20%20L%3A%3DNULL%3B%0A%20%20pour%20x%20de%20xmin%20jusque%20xmax%20pas%20dx%20faire%0A%20%20%20%20L%3A%3DL%2C%5Bx%2Cf(x)%5D%3B%0A%20%20fpour%3B%0A%20%20retourne%20L%3B%0Affonction%3A%3B&+polygone_ouvert(tabval(f%2C-3%2C-0.1%2C0.1))%3B%0Apolygone_ouvert(tabval(f%2C0.1%2C3%2C0.1))%3B&"
                                target="_blank">
                            Xcas</a> ou
                            <a
                                href="#exec&python=1&+///Soit%20$f$%20la%20fonction%20d%C3%A9finie%20par%20$f(x)=-x^2-3$%20lorsque%20$x%3C0$%20et%20$f(x)=x^2+1$%20sinon&+def%20f(x)%3A%0A%20%20%20%20if%20x%3C0%3A%0A%20%20%20%20%20%20%20%20return%20-x%5E2-3%20%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20return%20x%5E2%2B1&+///%20On%20commence%20par%20faire%20un%20tableau%20de%20valeurs&+%23%0AL%3D%5B%5D%0Afor%20j%20in%20range(13)%3A%0A%20%20%20%20x%3D-3%2B0.5*j%0A%20%20%20%20L.append(%5Bx%2Cf(x)%5D)&+polygone_ouvert(L)&+///Observer%20le%20saut%20%C3%A0%20la%20discontinuit%C3%A9.%20Il%20faudrait%20faire%202%20trac%C3%A9s,%20on%20a%20donc%20int%C3%A9ret%20%C3%A0%20faire%20une%20fonction%20et%20l'appeler%20deux%20fois.&+def%20tabval(f%2Ca%2Cb%2Cdx)%3A%0A%20%20%20%20%23%20local%20x%2Cj%2CL%3B%0A%20%20%20%20L%3D%5B%5D%3B%0A%20%20%20%20for%20j%20in%20range((b-a)%2Fdx%2B1)%3A%0A%20%20%20%20%20%20%20%20x%3Da%2Bj*dx%0A%20%20%20%20%20%20%20%20L.append(%5Bx%2Cf(x)%5D)%0A%20%20%20%20return%20L%3B&+polygone_ouvert(tabval(f%2C-3%2C-0.1%2C0.1))%3B%0Apolygone_ouvert(tabval(f%2C0.1%2C3%2C0.1))%3B&"
                                target="_blank">Python</a>
                        </li>
                        <li> Seconde: &Eacute;quation  d'une droite
                            <a
                                href="#python=0&exec&+A%3A%3Dpoint(-2%2C3)%3B%20%0AB%3A%3Dpoint(1%2C-1)%3B%20%0AD%3A%3Ddroite(A%2CB)&+fonction%20eqdroite(A%2CB)%0A%20%20var%20Ax%2CAy%2CBx%2CBy%2Cm%3B%0A%20%20Ax%2CAy%3A%3Dcoordonnees(A)%3B%0A%20%20Bx%2CBy%3A%3Dcoordonnees(B)%3B%0A%20%20si%20Ax%3DBx%20alors%20return%20%22x%3D%22%2BAx%3B%20fsi%3B%0A%20%20m%3A%3D(By-Ay)%2F(Bx-Ax)%3B%0A%20%20%2F%2F%20m*Ax%2Bp%3DAy%0A%20%20retourne%20%22y%3D%22%2Bm%2B%22*x%2B%22%2B(Ay-m*Ax)%3B%0Affonction%3A%3B&+eqdroite(A%2CB)%3B%20equation(D)&"
                                target="_blank">Xcas</a>
                            ou
                            <a
                                href="#python=1&exec&+%23%20%0AA%3Dpoint(-2%2C3)%0AB%3A%3Dpoint(1%2C-1)%3B%20%0AD%3A%3Ddroite(A%2CB)&+def%20eqdroite(A%2CB)%3A%0A%20%20%20%20%23%20local%20Ax%2CAy%2CBx%2CBy%2Cm%3B%0A%20%20%20%20Ax%2CAy%3Dcoordonnees(A)%0A%20%20%20%20Bx%2CBy%3Dcoordonnees(B)%0A%20%20%20%20if%20Ax%3D%3DBx%3A%0A%20%20%20%20%20%20%20%20return%20%22x%3D%22%2BAx%0A%20%20%20%20m%3D(By-Ay)%2F(Bx-Ax)%0A%20%20%20%20%23%20m*Ax%2Bp%3DAy%0A%20%20%20%20return%20%22y%3D%22%2Bm%2B%22*x%2B%22%2B(Ay-m*Ax)&+eqdroite(A%2CB)%3B%20equation(D)&"
                                target="_blank">
                            Python</a>
                        </li>
                        <li> Seconde, fr&eacute;quence dans un &eacute;chantillon, syntaxe
                            <a
                                href="#python=0&exec&+///%20Algorithme%20de%20calcul%20de%20la%20fr%C3%A9quence%20de%20valeur%20dans%20echantillon&+fonction%20freq(echantillon%2Cvaleur)%0A%20%20var%20j%2Ctotal%3B%0A%20%20total%3A%3D0%3B%0A%20%20pour%20j%20de%201%20jusque%20dim(echantillon)%20faire%0A%20%20%20%20si%20echantillon(j)%3Dvaleur%20alors%20%0A%20%20%20%20%20%20total%3A%3Dtotal%2B1%3B%20%0A%20%20%20%20fsi%3B%0A%20%20fpour%3B%0A%20%20retourne%20total%2Fdim(echantillon)%3B%0Affonction%3A%3B&+echantillon%3A%3Dranv(100%2C2)&+freq(echantillon%2C1)%3B%20%0Afreq(echantillon%2C0)&+///%20Intervalle%20de%20fluctuation%20d%20une%20fr%C3%A9quence,%20ici%200.4.%20On%20tire%20100%20%C3%A9chantillons%20de%20N=200%20valeurs%20selon%20la%20loi%20binomiale%20et%20on%20renvoie%20la%20fr%C3%A9quence%20de%201.&+f%3A%3D0.4%3B%20N%3A%3D200&+echantillon%3A%3D%0Aranv(100%2Cbinomial%2CN%2Cf)%2FN&+count(x-%3E%0A%20%20abs(x-f)%3C1%2Fsqrt(N)%2Cechantillon)&+///%20Sans%20utiliser%20ranv,%20on%20peut%20simuler%20une%20frequence%20f%20avec%20rand()%20en%20comparant%20avec%20f&+rand()&+tirage(f)%3A%3Drand()%3Cf&+tirage(f)%3Btirage(f)%3Btirage(f)&+fonction%20simu(N%2Cf)%0A%20%20var%20j%2Cres%3B%0A%20%20res%3A%3D0%3B%0A%20%20pour%20j%20de%201%20jusque%20N%20faire%0A%20%20%20%20si%20tirage(f)%20alors%20res%3A%3Dres%2B1%3B%20fsi%3B%0A%20%20fpour%3B%0A%20%20return%20res%2FN%3B%0Affonction%3A%3B&+simu(200%2C.4)&+l%3A%3Dseq(simu(200%2C.4)%2C100)&+count(x-%3Eabs(x-f)%3C1%2Fsqrt(N)%2Cl)&"
                                target="_blank">
                            Xcas</a> ou
                            <a href="#exec&python=1&+///Algorithme%20de%20calcul%20de%20la%20fr%C3%A9quence%20de%20%3Ctt%3evaleur%3C/tt%3e%20dans%20%3Ctt%3eechantillon%3C/tt%3e&+def%20Freq(echantillon%2Cvaleur)%3A%0A%20%20%20%20%23%20local%20j%2Ctotal%3B%0A%20%20%20%20total%3D0%3B%0A%20%20%20%20for%20j%20in%20echantillon%3A%0A%20%20%20%20%20%20%20%20if%20j%3D%3Dvaleur%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20total%3Dtotal%2B1.0%0A%20%20%20%20return%20total%2Flen(echantillon)&+echantillon%3Dranv(100%2C2)&+///%3Ctt%3eranv%3C/tt%3e%20est%20une%20instruction%20Xcas%20qui%20cr%C3%A9e%20un%20vecteur%20al%C3%A9atoire%20ici%20de%20100%20entiers%20strictement%20inf%C3%A9rieurs%20%C3%A0%202.%20Voir%20plus%20bas%20comment%20faire%20la%20m%C3%AAme%20chose%20sans%20utiliser%20%3Ctt%3eranv%3C/tt%3e&+%23%0AFreq(echantillon%2C1)%0AFreq(echantillon%2C0)&+///%20Intervalle%20de%20fluctuation%20d%20une%20fr%C3%A9quence,%20ici%200.4.%20On%20tire%20100%20%C3%A9chantillons%20de%20N=200%20valeurs%20selon%20la%20loi%20binomiale%20et%20on%20renvoie%20la%20fr%C3%A9quence%20de%201.&+%23%0Af%3D0.4%0AN%3D200&+echantillon%3Devalf(ranv(100%2Cbinomial%2CN%2Cf)%2FN)&+def%20OK(echantillon%2Cf%2CN)%3A%0A%20%20%20%20%23%20local%20c%2Cx%0A%20%20%20%20c%3D0%0A%20%20%20%20for%20x%20in%20echantillon%3A%0A%20%20%20%20%20%20%20%20if%20abs(x-f)%3C1%2Fsqrt(N)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20c%3Dc%2B1%0A%20%20%20%20return%20c&+OK(echantillon%2Cf%2CN)&+///%20Sans%20utiliser%20ranv,%20on%20peut%20simuler%20une%20frequence%20f%20avec%20random()%20en%20comparant%20avec%20f&+random()&+def%20Tirage(f)%3A%0A%20%20%20%20return%20random()%3Cf&+Tirage(f)%3BTirage(f)%3BTirage(f)&+def%20Simu(N%2Cf)%3A%0A%20%20%20%20%23%20local%20j%2Cres%0A%20%20%20%20res%3D0%0A%20%20%20%20for%20j%20in%20range(N)%3A%0A%20%20%20%20%20%20%20%20if%20Tirage(f)%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20res%3Dres%2B1.0%0A%20%20%20%20return%20res%2FN&+Simu(200%2C.4)&+l%3D%5BSimu(200%2C.4)%20for%20j%20in%20range(100)%5D&+OK(l%2Cf%2CN)&"
                               target="_blank"><strong>Python</strong></a>
                        </li>
                        <li>
                            Lyc&eacute;e: d&eacute;composition d'un entier en facteurs premiers par division
                            <a href="#exec&python=0&+///Factorisation%20d'un%20entier%20par%20division%20naive%20(fonctionne%20pour%20$n%3C10000^2$)&+fonction%20tdiv(n)%0A%20%20local%20r%2Cj%3B%0A%20%20r%3A%3Dmakelist(0)%3B%0A%20%20pour%20j%20de%202%20jusque%2010000%20faire%0A%20%20%20%20si%20j*j%3En%20alors%20%0A%20%20%20%20%20%20%2F%2F%20ici%20n%20est%20premier%0A%20%20%20%20%20%20si%20n!%3D1%20alors%20r.append(n)%3B%20fsi%3B%0A%20%20%20%20%20%20return%20r%3B%20%0A%20%20%20%20fsi%3B%0A%20%20%20%20tantque%20irem(n%2Cj)%3D0%20faire%0A%20%20%20%20%20%20%2F%2F%20ici%20j%20divise%20n%0A%20%20%20%20%20%20n%3A%3Dn%2Fj%3B%0A%20%20%20%20%20%20r.append(j)%3B%0A%20%20%20%20ftantque%3B%0A%20%20%20%20si%20j%3E2%20alors%20j%2B%2B%3B%20fsi%3B%20%2F%2F%20saut%20de%202%20en%202%0A%20%20fpour%3B%0A%20%20return%20%22Trop%20grand%22%3B%0Affonction%3A%3B&+tdiv(1007)&"
                               target="_blank">Xcas</a>,
                            <a
                                href="#exec&python=1&+///Factorisation%20d'un%20entier%20par%20division%20naive%20(fonctionne%20pour%20$n%3C10000^2$)&+def%20tdiv(n)%3A%0A%20%20%20%20%23%20local%20r%2Cj%0A%20%20%20%20r%3D%5B%5D%0A%20%20%20%20for%20j%20in%20range(2%2C10000)%3A%0A%20%20%20%20%20%20%20%20if%20j*j%3En%20%3A%20%23%20ici%20n%20est%20premier%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20n%3C%3E1%20%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20r.append(n)%0A%20%20%20%20%20%20%20%20%20%20%20%20return(r)%0A%20%20%20%20%20%20%20%20while%20n%20%25j%20%3D%3D0%20%3A%20%23%20ici%20j%20divise%20n%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20n%3Dn%2F%2Fj%0A%20%20%20%20%20%20%20%20%20%20%20%20r.append(j)%0A%20%20%20%20%20%20%20%20if%20j%3E2%20%3A%20%23%20saut%20de%202%20en%202%0A%20%20%20%20%20%20%20%20%20%20%20%20j%2B%3D1%0A%20%20%20%20return(%22Trop%20grand%22)%0A&+tdiv(1007)&"
                                target="_blank"><strong>Python</strong></a>
                        </li>
                        <li>
                            Lyc&eacute;e: le paradoxe du duc de Toscane
                            <a
                                href="#exec&python=1&+///Le%20prince%20de%20Toscane%20avait%20remarqu%C3%A9%20que%2C%20bien%20qu'il%20y%20ait%20autant%20de%20fa%C3%A7ons%20d'%C3%A9crire%209%20et%2010%20comme%20somme%20de%203%20nombres%20compris%20entre%201%20et%206%2C%20on%20obtient%20plus%20souvent%20un%20total%20de%2010%20lorsqu'on%20lance%203%20d%C3%A9s.%0ACliquez%20sur%20Exec%20en%20bas%20pour%20relancer%20une%20simulation.&+fonction%20toscane(Nombre)%0A%20%20sommeA%20%3A%3D%20%5B0%5D*18%3B%0A%20%20pour%20j%20de%201%20jusque%20Nombre%20faire%0A%20%20%20%20s%20%3A%3D%20randint(1%2C6)%2Brandint(1%2C6)%2Brandint(1%2C6)%3B%0A%20%20%20%20sommeA%5Bs-1%5D%2B%2B%3B%0A%20%20fpour%3B%0A%20%20print(sommeA%5B9%5D%2B%20%22%20neufs%20et%20%22%2BsommeA%5B10%5D%2B%20%22%20dix%22)%3B%0A%20%20return%20sommeA%2FNombre%3B%0Affonction%3A%3B&+t%3Dtoscane(100000)&+barplot(t)&"
                                target="_blank">Xcas</a>,
                            <a
                                href="#exec&python=1&+///Le%20prince%20de%20Toscane%20avait%20remarqu%C3%A9%20que%2C%20bien%20qu'il%20y%20ait%20autant%20de%20fa%C3%A7ons%20d'%C3%A9crire%209%20et%2010%20comme%20somme%20de%203%20nombres%20compris%20entre%201%20et%206%2C%20on%20obtient%20plus%20souvent%20un%20total%20de%2010%20lorsqu'on%20lance%203%20d%C3%A9s.%0ACliquez%20sur%20Exec%20en%20bas%20pour%20relancer%20une%20simulation.&+def%20toscane(Nombre)%3A%0A%20%20%20%20sommeA%20%3D%20%5B0%20for%20j%20in%20range(18)%5D%0A%20%20%20%20for%20j%20in%20range(Nombre)%3A%0A%20%20%20%20%20%20%20%20s%3Drandint(1%2C6)%2Brandint(1%2C6)%2Brandint(1%2C6)%0A%20%20%20%20%20%20%20%20sommeA%5Bs-1%5D%2B%3D1%0A%20%20%20%20print(sommeA%5B9%5D%2B%20%22%20neufs%20et%20%22%2BsommeA%5B10%5D%2B%20%22%20dix%22)%0A%20%20%20%20sommeA%3D%5BsommeA%5Bj%5D%2FNombre%20for%20j%20in%20range(18)%5D%0A%20%20%20%20return%20sommeA&+t%3Dtoscane(100000)&+barplot(t)&"
                                target="_blank">
                            Python
                            </a>
                        </li>
                        <li> Premi&egrave;re, &eacute;quation du second degr&eacute;
                            <a
                                href="#python=0&exec&+fonction%20resolution2(a%2Cb%2Cc)%0A%20%20var%20delta%3B%0A%20%20delta%3A%3Db%5E2-4*a*c%3B%0A%20%20si%20delta%3C0%20alors%20retourne%20%22pas%20de%20racines%22%3B%20fsi%3B%0A%20%20si%20delta%3D0%20alors%20retourne%20-b%2F(2*a)%3B%20fsi%3B%0A%20%20delta%3A%3Dsqrt(delta)%3B%0A%20%20retourne%20(-b-delta)%2F(2*a)%2C(-b%2Bdelta)%2F(2*a)%3B%0Affonction%3A%3B&+resolution2(1%2C2%2C3)&+resolution2(1%2C2%2C1)&+resolution2(1%2C1%2C-1)&"
                                target="_blank">
                            Xcas</a>,
                            <a
                                href="#python=1&exec&+def%20resolution2(a%2Cb%2Cc)%3A%0A%20%20%20%20%23%20local%20delta%2Cs%0A%20%20%20%20delta%3Db**2-4*a*c%0A%20%20%20%20if%20delta%3C0%3A%0A%20%20%20%20%20%20%20%20return%20%22pas%20de%20racines%22%0A%20%20%20%20if%20delta%3D%3D0%3A%0A%20%20%20%20%20%20%20%20return%20-b%2F(2.0*a)%0A%20%20%20%20s%3Dsqrt(delta)%0A%20%20%20%20return%20%5B(-b-s)%2F(2.0*a)%2C(-b%2Bs)%2F(2.0*a)%5D&+resolution2(1%2C2%2C3)&+resolution2(1%2C2%2C1)&+resolution2(1%2C1%2C-1)&"
                                target="_blank"><strong>Python</strong></a>
                        </li>
                        <li> Premi&egrave;re, suites
                            <a
                                href="#exec&python=0&+///Calcul%20des%20premiers%20termes%20d'une%20suite%20donn%C3%A9e%20par%20une%20expression%20$u[n]=f(n)$&+u(n)%3A%3D1%2Fn&+s%3A%3Dseq(u(n)%2Cn%2C1%2C10)&+seq(point(n%2Cu(n))%2Cn%2C1%2C10)&+///Recherche%20du%20premier%20terme%20de%20la%20suite%20plus%20petit%20que%20eps.&+fonction%20N0(u%2Ceps)%0A%20%20local%20n%3B%0A%20%20n%3A%3D1%3B%0A%20%20tantque%20u(n)%3Eeps%20faire%0A%20%20%20%20n%3A%3Dn%2B1%3B%0A%20%20ftantque%3B%0A%20%20return%20n%3B%0Affonction%3A%3B%0A&+N0(u%2C0.01)&+///Calcul%20des%20premiers%20termes%20d'une%20suite%20r%C3%A9currente%20$u[n+1]=f(u[n])$&+fonction%20ntermes(f%2Cu0%2CN)%20%0A%20%20var%20n%2Cu%3B%0A%20%20u%3A%3D%5Bu0%5D%3B%0A%20%20pour%20n%20de%201%20jusque%20N%20faire%0A%20%20%20%20u%5Bn%5D%3A%3Df(u%5Bn-1%5D)%3B%0A%20%20fpour%3B%0A%20%20retourne%20u%3B%20%0A%20%20%2F%2F%20ou%20retourne%20u%5BN%5D%20pour%20le%20dernier%20terme%0Affonction%3A%3B&+f(x)%3A%3D1%2F2*(x%2B2%2Fx)&+ntermes(f%2C1.0%2C1)&+U%3A%3Dntermes(f%2C1.0%2C5)&+ntermes(f%2C1%2C5)&+seq(point(n%2CU%5Bn%5D)%2Cn%2C0%2Csize(U)-1)&"
                                target="_blank">Xcas
                            </a>,
                            <a
                                href="#exec&python=1&+///Calcul%20des%20premiers%20termes%20d'une%20suite%20donn%C3%A9e%20par%20une%20expression%20$u[n]=f(n)$&+def%20u(n)%3A%0A%20%20%20%20return%201.0%2Fn%0A&+s%3D%5Bu(n)%20for%20n%20in%20range(1%2C11)%5D&+%5Bpoint(n%2Cu(n))%20for%20n%20in%20range(1%2C11)%5D&+///Calcul%20du%20premier%20rang%20tel%20que%20$u[n]%3Ceps$&+def%20N0(u%2Ceps)%3A%0A%20%20%20%20%23%20local%20n%0A%20%20%20%20n%3D0%0A%20%20%20%20while%20u(n)%3Eeps%3A%0A%20%20%20%20%20%20%20%20n%3Dn%2B1%0A%20%20%20%20return%20n&+N0(u%2C0.01)&+///Calcul%20des%20premiers%20termes%20d'une%20suite%20r%C3%A9currente%20$f(u[n+1])=f(u[n])$&+def%20ntermes(f%2Cu0%2CN)%3A%0A%20%20%20%20%23%20local%20n%2Cu%0A%20%20%20%20u%3D%5Bu0%5D%3B%0A%20%20%20%20for%20n%20in%20range(N)%3A%0A%20%20%20%20%20%20%20%20u.append(f(u%5Bn%5D))%0A%20%20%20%20return%20u%20%0A%20%20%20%20%23%20ou%20retourne%20u%5BN%5D%20pour%20le%20dernier%20terme%0A&+def%20f(x)%3A%0A%20%20%20%20return%200.5*(x%2B2.0%2Fx)&+ntermes(f%2C1.0%2C10)&+U%3Dntermes(f%2C1.0%2C5)&+ntermes(f%2C1%2C5)&+%5Bpoint(n%2CU%5Bn%5D)%20for%20n%20in%20range(size(U))%5D%0A&"
                                target="_blank"><strong>Python</strong></a>
                        </li>
                        <li> Premi&egrave;re, Loi binomiale et loi g&eacute;om&eacute;trique tronqu&eacute;e
                            <a
                                href="#python=0&exec&+python_compat(0)&+///%20simulation%20de%20$n$%20tirages%20au%20hasard%20avec%20probabilit%C3%A9%20$p$%20de%20succ&egrave;s&+fonction%20Tirages(n%2Cp)%0A%20%20var%20total%2Cj%2Ch%3B%0A%20%20total%3A%3D0%3B%0A%20%20pour%20j%20de%201%20jusque%20n%20faire%0A%20%20%20%20h%3A%3Drand(0%2C1)%3B%0A%20%20%20%20si%20h%3C%3Dp%20alors%20total%3A%3Dtotal%2B1%3B%20fsi%3B%0A%20%20%20fpour%3B%0A%20%20retourne%20total%3B%0Affonction%3A%3B&+Tirages(10%2C0.4)&+///%20histogramme%20de%201000%20tirages%20et%20comparaison%20avec%20l'histogramme%20de%20la%20loi%20binomiale&+s%3A%3Dseq(Tirages(10%2C0.4)%2C1000)&+histogramme(s%2C-0.5%2C1%2Ccouleur%3Dred)%3B%20%0Ahistogramme(binomial%2C10%2C0.4)&+///%20calcul%20de%20l'intervalle%20de%20confiance%20centr%C3%A9%20pour%20la%20loi%20binomiale&+n%3A%3D100%3B%20p%3A%3D0.16%3B%20%0Axmin%3A%3Dbinomial_icdf(n%2Cp%2C0.025)%3B%0Axmax%3A%3Dbinomial_icdf(n%2Cp%2C0.975)&+gl_x%3D0..40%3B%20gl_y%3D0..0.15%3B%0Ahistogram(binomial%2Cn%2Cp)%3B%0Adroite(x%3Dxmin%2Ccolor%3Dred)%3B%0Adroite(x%3Dxmax%2Ccolor%3Dred)%3B&+///%20programme%20de%20calcul%20de%20l'intervalle%20de%20confiance%20%C3%A0%20partir%20de%20la%20loi%20binomiale&+fonction%20confiance(n%2Cp%2Cseuil)%0A%20%20var%20k%2Ctotal%3B%0A%20%20total%3A%3D0%3B%0A%20%20pour%20k%20de%200%20jusque%20n%20faire%0A%20%20%20%20total%3A%3Dtotal%2Bbinomial(n%2Cp%2Ck)%3B%0A%20%20%20%20si%20total%3E%3Dseuil%20alors%20retourne%20k%3B%20fsi%3B%0A%20%20fpour%3B%0Affonction%3A%3B&+confiance(100%2C.16%2C0.025)&+confiance(100%2C.16%2C0.975)&+///%20comparaison%20avec%20$[p-1/sqrt(n),p+1/sqrt(n)]$&+n%3A%3D30%3Bplotfunc(%0A%5Bbinomial_icdf(30%2Cp%2C0.025)%2Fn%2C%0Abinomial_icdf(30%2Cp%2C0.975)%2Fn%2C%0Ap-sqrt(1%2Fn)%2Cp%2Bsqrt(1%2Fn)%5D%2C%0Ap%3D0..1%2Ccolor%3D%5Bred%2Cred%2Cblack%2Cblack%5D)%3B&+///%20loi%20g%C3%A9om%C3%A9trique%20tronqu%C3%A9e%20(renvoie%20le%201er%20succ%C3%A8s%20ou%200)&+fonction%20geo(n%2Cp)%0A%20%20var%20k%2Ct%3B%0A%20%20pour%20k%20de%201%20jusque%20n%20faire%0A%20%20%20%20t%3A%3Dalea(0%2C1)%3B%0A%20%20%20%20si%20t%3C%3Dp%20alors%20retourne%20k%3B%20fsi%3B%0A%20%20fpour%3B%0A%20%20retourne%200%3B%0Affonction%3A%3B&+geo(10%2C.4)&+s%3A%3Dseq(geo(10%2C.4)%2C1000)&+histogramme(s%2C-0.5%2C1%2Ccouleur%3Dred)%3B%20%0Ahistogramme(geometric%2C0.4)&"
                                target="_blank">Xcas
                            </a>,
                            <a
                                href="#exec&python=1&+///%20simulation%20de%20$n$%20tirages%20au%20hasard%20avec%20probabilit%C3%A9%20$p$%20de%20succ%C3%A8s&+def%20Tirages(n%2Cp)%3A%0A%20%20%20%20%23%20local%20total%2Cj%2Ch%0A%20%20%20%20total%3D0%0A%20%20%20%20for%20j%20in%20range(n)%3A%0A%20%20%20%20%20%20%20%20h%3Drandom()%0A%20%20%20%20%20%20%20%20if%20h%3C%3Dp%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20total%3Dtotal%2B1%0A%20%20%20%20return%20total%0A&+Tirages(10%2C0.4)&+///%20histogramme%20de%201000%20tirages%20et%20comparaison%20avec%20l'histogramme%20de%20la%20loi%20binomiale&+s%3D%20%5BTirages(10%2C0.4)%20for%20j%20in%20range(1000)%5D&+histogramme(s%2C-0.5%2C1%2Ccouleur%3Dred)%3B%0Ahistogramme(binomial%2C10%2C0.4)&+///%20calcul%20de%20l'intervalle%20de%20confiance%20centr%C3%A9%20pour%20la%20loi%20binomiale&+%23%0An%3D100%0Ap%3D0.16%0Axmin%3Dbinomial_icdf(n%2Cp%2C0.025)%0Axmax%3Dbinomial_icdf(n%2Cp%2C0.975)&+%23%0Agl_x%3D0..40%0Agl_y%3D0..0.15%0Ahistogram(binomial%2Cn%2Cp)%0Acolor(droite(equal(x%2Cxmin))%2Cred)%0Acolor(droite(equal(x%2Cxmax))%2Cred)&+///%20programme%20de%20calcul%20de%20l'intervalle%20de%20confiance%20%C3%A0%20partir%20de%20la%20loi%20binomiale&+def%20confiance(n%2Cp%2Cseuil)%3A%0A%20%20%20%20%23%20local%20k%2Ctotal%0A%20%20%20%20total%3D0%0A%20%20%20%20for%20k%20in%20range(n%2B1)%3A%0A%20%20%20%20%20%20%20%20total%3Dtotal%2Bbinomial(n%2Cp%2Ck)%0A%20%20%20%20%20%20%20%20if%20total%3E%3Dseuil%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20k%0A&+confiance(100%2C.16%2C0.025)&+confiance(100%2C.16%2C0.975)&+///%20comparaison%20avec%20$[p-1/sqrt(n),p+1/sqrt(n)]$&+%23%0An%3D30%0Aplotfunc(%5Bbinomial_icdf(30%2Cp%2C0.025)%2Fn%2Cbinomial_icdf(30%2Cp%2C0.975)%2Fn%2Cp-sqrt(1%2Fn)%2Cp%2Bsqrt(1%2Fn)%5D%2Cp%2C0%2C1)&+///%20loi%20g%C3%A9om%C3%A9trique%20tronqu%C3%A9e%20(renvoie%20le%201er%20succ%C3%A8s%20ou%200)&+def%20geo(n%2Cp)%3A%0A%20%20%20%20%23%20local%20k%2Ct%0A%20%20%20%20for%20k%20in%20range(n)%3A%0A%20%20%20%20%20%20%20%20t%3Drandom()%0A%20%20%20%20%20%20%20%20if%20t%3C%3Dp%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20k%2B1%0A%20%20%20%20return%200%0A&+geo(10%2C.4)&+s%3D%5Bgeo(10%2C.4)%20for%20j%20in%20range(1000)%5D&+%23%0Acolor(histogramme(s%2C-0.5%2C1)%2Cred)%20%0Ahistogramme(geometric%2C0.4)&"
                                target="_blank">Python</a>
                        </li>
                        <li> Premi&egrave;re Triangle de Pascal
                            <a
                                href="#python=0&exec&+///%20Triangle%20de%20Pascal%20pour%20trouver%20les%20coefficients%20binomiaux&+fonction%20Pascal(n)%0A%20%20var%20tableau%2Cj%2Ck%3B%0A%20%20tableau%3A%3Dmatrix(n%2Cn)%3B%0A%20%20pour%20j%20de%200%20jusque%20n-1%20faire%0A%20%20%20%20tableau%5Bj%2C0%5D%3A%3D1%3B%0A%20%20%20%20pour%20k%20de%201%20jusque%20j%20faire%0A%20%20%20%20%20%20tableau%5Bj%2Ck%5D%3A%3Dtableau%5Bj-1%2Ck-1%5D%2Btableau%5Bj-1%2Ck%5D%3B%0A%20%20%20%20fpour%3B%0A%20%20fpour%3B%0A%20%20retourne%20tableau%3B%0Affonction%3A%3B&+Pascal(6)&"
                                target="_blank">
                            Xcas</a>,
                            <a href="#exec&python=1&+///Triangle%20de%20Pascal%20pour%20trouver%20les%20coefficients%20binomiaux.%0AOn%20calcule%20une%20ligne%20en%20fonction%20de%20la%20ligne%20pr%C3%A9c%C3%A9dente.&+def%20Pascal(n)%3A%0A%20%20%20%20%23%20local%20tableau%2Cligne%2Cj%2Ck%3B%0A%20%20%20%20tableau%3D%5B%5B1%5D%5D%0A%20%20%20%20for%20j%20in%20range(1%2Cn%2B1)%3A%0A%20%20%20%20%20%20%20%20ligne%3D%5B1%5D%0A%20%20%20%20%20%20%20%20for%20k%20in%20range(1%2Cj)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20ligne.append(tableau%5Bj-1%5D%5Bk-1%5D%2Btableau%5Bj-1%5D%5Bk%5D)%0A%20%20%20%20%20%20%20%20ligne.append(1)%0A%20%20%20%20%20%20%20%20tableau.append(ligne)%3B%0A%20%20%20%20return%20tableau%0A&+Pascal(6)&"
                               target="_blank"><strong>Python</strong></a>
                        </li>
                        <li>
                            Terminale: Dichotomie
                            <a
                                href="#python=0&exec&+///Recherche%20d'une%20racine%20de%20$f$%20entre%20$a$%20et%20$b$%20par%20dichotomie,%20avec%20pr%C3%A9cision%20%3Ctt%3eeps%3C/tt%3e.%0aLa%20fonction%20%3Ctt%3edicho%3C/tt%3e%20commence%20par%20tester%20que%20le%20signe%20n'est%20pas%20identique%20en%20$a$%20et%20$b$.&+fonction%20dicho(f%2Ca%2Cb%2Ceps)%0A%20%20var%20c%2Cniter%3B%0A%20%20si%20f(a)*f(b)%3E%3D0%20alors%20retourne%20%22erreur%3A%20pas%20de%20changement%20de%20signe%22%3B%20fsi%3B%0A%20%20tantque%20abs(b-a)%3Eeps%20faire%0A%20%20%20%20c%3D(a%2Bb)%2F2%3B%0A%20%20%20%20si%20f(a)*f(c)%3E0%20alors%20a%3Dc%3B%20sinon%20b%3Dc%3B%20fsi%3B%0A%20%20ftantque%0A%20%20retourne%20c%3B%0Affonction%3A%3B&+f(x)%3A%3Dcos(x)-x%3B&+plot(f(x)%2Cx%2C0%2C2)&+dicho(f%2C0.0%2C1.0%2C1e-8)&"
                                target="_blank">
                            Xcas
                            </a>,
                            <a
                                href="#exec&python=1&+///Recherche%20d'une%20racine%20de%20$f$%20entre%20$a$%20et%20$b$%20par%20dichotomie,%20avec%20pr%C3%A9cision%20eps&+def%20dicho(f%2Ca%2Cb%2Ceps)%3A%0A%20%20%20%20%23%20local%20c%2Cniter%3B%0A%20%20%20%20if%20f(a)*f(b)%3E%3D0%3A%20%0A%20%20%20%20%20%20%20%20return%20%22erreur%3A%20f(a)*f(b)%3E%3D0%22%0A%20%20%20%20while%20b-a%3Eeps%3A%0A%20%20%20%20%20%20%20%20c%3D(a%2Bb)%2F2.0%0A%20%20%20%20%20%20%20%20if%20f(a)*f(c)%3E0%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20a%3Dc%0A%20%20%20%20%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20b%3Dc%0A%20%20%20%20return%20c%0A&+def%20f(x)%3A%0A%20%20%20%20return%20cos(x)-x&+plot(f(x)%2Cx%2C0%2C2)&+dicho(f%2C0.0%2C1.0%2C1e-8)&"
                                target="_blank"><strong>Python</strong></a>
                        </li>
                        <li>
                            Terminale, Calcul approch&eacute; d'int&eacute;grales.
                            <a
                                href="#exec&python=0&+///Calcul%20approche%20d'int%C3%A9grale%20par%20la%20m%C3%A9thode%20des%20rectangles%20(%C3%A0%20droite),%20du%20point%20milieu%20et%20de%20Mont%C3%A9-Carlo.&+f(x)%3A%3Dsin(x)&+plot(f(x)%2Cx%2C0%2C1)%3B%20droite(y%3D0)%3B&+fonction%20Rect(f%2Ca%2Cb%2CN)%0A%20%20var%20S%3B%0A%20%20S%3A%3D0.0%3B%0A%20%20h%3A%3D(b-a)%2FN%3B%0A%20%20pour%20j%20de%201%20jusque%20N%20faire%0A%20%20%20%20S%3A%3DS%2Bf(a%2Bj*h)%3B%0A%20%20fpour%3B%0A%20%20retourne%20S*h%3B%0Affonction%3A%3B&+Rect(f%2C0%2C1%2C100)&+integrate(f(x)%2Cx%2C0%2C1.0)&+///Pour%20le%20point%20milieu%20on%20remplace%20%3Ctt%3ef(a+j*h)%3C/tt%3e%20par%20%3Ctt%3ef(a-h/2+j*h)%3C/tt%3e&+fonction%20pointmilieu(f%2Ca%2Cb%2CN)%0A%20%20var%20S%3B%0A%20%20S%3A%3D0.0%3B%0A%20%20h%3A%3D(b-a)%2FN%3B%0A%20%20pour%20j%20de%201%20jusque%20N%20faire%0A%20%20%20%20S%3A%3DS%2Bf(a-h%2F2%2Bj*h)%3B%0A%20%20fpour%3B%0A%20%20retourne%20S*h%3B%0Affonction%3A%3B&+pointmilieu(f%2C0%2C1%2C100)&+///%20Observer%20la%20pr%C3%A9cision%20bien%20meilleure,%20pour%20un%20cout%20de%20calcul%20quasi-identique.%20Intuitivement%20le%20rectangle%20correspondant%20approche%20mieux%20la%20fonction.&+plot(f(x)%2Cx%2C0%2C1)%3B%0Arectangle(0%2C1%2Cf(1)%2Ccolor%3Dred)%3B%20%0Arectangle(0%2C1%2Cf(1%2F2)%2Ccolor%3Dgreen)&+///Estimation%20par%20la%20m%C3%A9thode%20de%20Monte-Carlo.%20On%20fait%20plusieurs%20fois%20le%20calcul%20de%20la%20moyenne%20de%20$n$%20valeurs%20pour%20tracer%20l'histogramme%20des%20approximations%20obtenues%20et%20illustrer%20un%20%C3%A9cart%20en%20$1/sqrt(n)$.&+fonction%20Montecarlo(f%2Ca%2Cb%2Cn)%0A%20%20local%20k%2Cr%3B%0A%20%20r%3A%3D0%3B%0A%20%20pour%20k%20de%201%20jusque%20n%20faire%0A%20%20%20%20r%3A%3Dr%2Bf(alea(uniformd%2Ca%2Cb))%3B%0A%20%20fpour%3B%0A%20%20retourne%20r*(b-a)%2Fn%3B%0Affonction%3A%3B&+n%3A%3D100%3BMontecarlo(f%2C0%2C1%2Cn)&+N%3A%3D800%3B%0Al%3A%3Dseq(Montecarlo(f%2C0%2C1%2Cn)%2CN)%3B%0Ahistogram(l%2C0%2C0.005)%3B%0Am%3A%3D1-cos(1)%3B%0Adroite(x%3Dm%2Ccolor%3Dred)%3B%0Aplot(normald(m%2Cstddev(l)%2Cx)%2Cx%3D0.35..0.55)&"
                                target="_blank">Xcas
                            </a>,
                            <a
                                href="#exec&python=1&+///Calcul%20approch%C3%A9%20d'int%C3%A9grale%20par%20la%20m%C3%A9thode%20des%20rectangles%20(%C3%A0%20droite),%20puis%20par%20le%20point%20milieu.&+f%3Dsin&+plot(f(x)%2Cx%2C0%2C1)%3B%20droite(y%3D0)%3B&+def%20Rect(f%2Ca%2Cb%2CN)%3A%0A%20%20%20%20%23%20local%20S%2Ch%2Cj%0A%20%20%20%20S%3D0.0%0A%20%20%20%20h%3D(b-a)%2F(N*1.0)%0A%20%20%20%20for%20j%20in%20range(N)%3A%0A%20%20%20%20%20%20%20%20S%3DS%2Bf(a%2Bh%2Bj*h)%0A%20%20%20%20return%20S*h&+Rect(f%2C0%2C1%2C100)&+integrate(f(x)%2Cx%2C0%2C1.0)&+///Pour%20le%20point%20milieu,%20on%20remplace%20%3Ctt%3ef(a+j*h)%3C/tt%3e%20par%20%3Ctt%3ef(a-h/2+j*h)%3C/tt%3e&+def%20Pointmilieu(f%2Ca%2Cb%2CN)%3A%0A%20%20%20%20%23%20local%20S%2Ch%2Cj%0A%20%20%20%20S%3D0.0%0A%20%20%20%20h%3D(b-a)%2F(N*1.0)%0A%20%20%20%20for%20j%20in%20range(N)%3A%0A%20%20%20%20%20%20%20%20S%3DS%2Bf(a%2Bh%2F2%2Bj*h)%0A%20%20%20%20return%20S*h&+Pointmilieu(f%2C0%2C1%2C100)&+///%20Observer%20la%20pr%C3%A9cision%20bien%20meilleure,%20pour%20un%20cout%20de%20calcul%20quasi-identique.%20Intuitivement%20le%20rectangle%20correspondant%20approche%20mieux%20la%20fonction.&+plot(f(x)%2Cx%2C0%2C1)%3B%0Arectangle(0%2C1%2Cf(1)%2Ccolor%3Dred)%3B%20%0Arectangle(0%2C1%2Cf(1%2F2)%2Ccolor%3Dgreen)&+def%20Montecarlo(f%2Ca%2Cb%2Cn)%3A%0A%20%20%20%20%23%20local%20k%2Cr%2Cx%0A%20%20%20%20%23%20faire%20import%20random%20as%20random%20en%20Python%0A%20%20%20%20r%3D0%0A%20%20%20%20for%20k%20in%20range(n)%3A%0A%20%20%20%20%20%20%20%20r%3Dr%2Bf(random.uniform(a%2Cb))%0A%20%20%20%20return(r*(b-a)%2Fn)&+///M%C3%A9thode%20probabiliste%20de%20Mont%C3%A9-Carlo.%20On%20l'ex%C3%A9cute%20ensuite%20un%20grand%20nombre%20de%20fois%20($n$)%20et%20on%20trace%20l'histogramme%20des%20valeurs%20approch%C3%A9es%20obtenues%20pour%20mettre%20en%20%C3%A9vidence%20la%20pr%C3%A9cision%20en%20$1/sqrt(n)$%0aCliquez%20sur%20le%20bouton%20Exec%20pour%20refaire%20une%20simulation.&+%23%0An%3D100%0AMontecarlo(f%2C0%2C1%2Cn)&+%23%0AN%3D800%3B%0Al%3D%5BMontecarlo(f%2C0%2C1%2Cn)%20for%20j%20in%20range(N)%5D%0Ahistogram(l%2C0%2C0.01)%0Am%3D1-cos(1)%0Adroite(x%3D%3D%3Dm%2Ccolor%3D%3D%3Dred)%3B%0Aplot(normald(m%2Cstddev(l)%2Cx)%2Cx%3D%3D%3D0.35..0.55)&"
                                target="_blank"><strong>Python</strong></a>
                        </li>
                        <li>
                            Terminale: distribution cumul&eacute;e
                            <a
                                href="#exec&python=0&+///Illustration%20de%20la%20probabilit%C3%A9%20cumul%C3%A9e%20entre%202%20bornes%20$a$%20et%20$b$.%0aOn%20peut%20changer%20de%20loi,%20par%20exemple%20prendre%20exponentiald(1),%20il%20faut%20alors%20prendre%20garde%20aux%20valeurs%20de%20$a$%20et%20$b$%20et%20modifier%20x=-5..5%20par%20exemple%20en%20x=0..6&+loi%3A%3Dnormald(0%2C1)&*a,0,-5,5,0.125&*b,1.25,-5,5,0.125&+plotarea(loi(x)%2Cx%3Dmin(a%2Cb)..max(a%2Cb))%3B%0Aplotfunc(loi(x)%2Cx%3D-5..5)%3B%0A&+///Calcul%20d'intervalle%20de%20confiance%20bilat%C3%A9ral%20pour%20la%20loi%20au%20seuil%20alpha&+alpha%3A%3D0.05%3A%3B%0Aicdf(loi%2Calpha%2F2)%2Cicdf(loi%2C1-alpha%2F2)&"
                                target="_blank">loi normale</a>
                        </li>
                        <li>
                            <a
                                href="#exec&python=0&+n%3A%3D2%5E13%3B%0Al%3A%3Dseq(%0A%20%20%20%20sum(ranv(n%2Cuniformd%2C0%2C1))%2Fn-0.5%2C%0A%20%20%20%20400)&+sigma%3A%3Dstddev(uniformd%2C0%2C1)%3B%0Aevalf(sigma%2Fsqrt(n))%0A&+histogram(l%2C-0.01%2C0.001)%3B%0Aplot(normald(0%2Csigma%2Fsqrt(n)%2Cx)%2Cx%3D-0.01..0.01)&"
                                target="_blank">
                            Convergence d'une moyenne vers la loi normale.
                            </a>
                        </li>
                        <li> PGCD binaire:
                            <a
                                href="#exec&python=0&+///Le%20PGCD%20binaire%20calcule%20le%20PGCD%20de%202%20entiers%20%24a%24%20et%20%24b%24%20sans%20effectuer%20de%20division%2C%20sauf%20par%202%20(qui%20est%20un%20d%C3%A9calage%20pour%20un%20nombre%20%C3%A9crit%20en%20base%202).%0AOn%20commence%20par%20extraire%20%24n%24%2C%20la%20puissance%20de%202%20la%20plus%20grande%20possible%20de%20%24a%24%20et%20de%20%24b%24%2C%20%242%5En%24%20sera%20le%20facteur%20correspondant%20du%20PGCD.%20%0AOn%20est%20ramen%C3%A9%20%C3%A0%20%24a%24%20et%20%24b%24%20impairs%2C%20leur%20PGCD%20est%20celui%20de%20(%24a%24%20ou%20%24b%24)%20et%20%24a-b%24.%20Comme%20%24a-b%24%20est%20pair%20on%20divise%20par%202%20tant%20qu'on%20peut%20sans%20changer%20le%20PGCD%2C%20on%20est%20ramen%26eacute%3B%20au%20PGCD%20de%20%24min(a%2Cb)%24%20et%20%24abs(a-b)%2F2%5Ek%24%20avec%20%24k%3E%3D1%24%20le%20plus%20grand%20possible.&+///%3Cstrong%3EExercice%3A%3C%2Fstrong%3E%20%C3%A9crire%20cet%20algorithme%20avec%20une%20fonction%20r%C3%A9cursive.%0ACi-dessous%20une%20version%20it%C3%A9rative%20un%20peu%20plus%20longue.&+fonction%20pgcd(a%2Cb)%20%2F%2F%20pgcd%20binaire%0A%20%20local%20n%3B%0A%20%20a%3A%3Dabs(a)%3B%20b%3A%3Dabs(b)%3B%0A%20%20si%20a%3D0%20alors%20return%20b%3B%20fsi%3B%0A%20%20si%20b%3D0%20alors%20return%20a%3B%20fsi%3B%0A%20%20pour%20n%20de%200%20jusque%20a%20faire%20%0A%20%20%20%20si%20irem(a%2C2)%3D1%20alors%20%0A%20%20%20%20%20%20tantque%20irem(b%2C2)%3D0%20faire%20%0A%20%20%20%20%20%20%20%20b%3A%3Diquo(b%2C2)%3B%20%0A%20%20%20%20%20%20ftantque%3B%20break%3B%0A%20%20%20%20fsi%3B%0A%20%20%20%20si%20irem(b%2C2)%3D1%20alors%20%0A%20%20%20%20%20%20tantque%20irem(a%2C2)%3D0%20faire%20%0A%20%20%20%20%20%20%20%20a%3A%3Diquo(a%2C2)%3B%20%0A%20%20%20%20%20%20ftantque%3B%20break%3B%20%0A%20%20%20%20fsi%3B%0A%20%20%20%20a%3A%3Diquo(a%2C2)%3B%0A%20%20%20%20b%3A%3Diquo(b%2C2)%3B%0A%20%20fpour%3B%20%0A%20%20%2F%2F%20a%20et%20b%20sont%20impairs%20-%3E%20pgcd%3Dpgcd(min(a%2Cb)%2Cabs(a-b)%2F2%5Ek)%0A%20%20tantque%20vrai%20faire%0A%20%20%20%20si%20a%3Cb%20alors%20a%2Cb%3A%3Db%2Ca%3B%20fsi%3B%0A%20%20%20%20a%2Cb%3A%3Db%2Cabs(a-b)%2F2%3B%0A%20%20%20%20si%20b%3D0%20alors%20return%202%5En*a%3B%20fsi%3B%0A%20%20%20%20tantque%20irem(b%2C2)%3D0%20faire%20b%3A%3Diquo(b%2C2)%3B%20ftantque%3B%0A%20%20ftantque%3B%0Affonction%3A%3B&+pgcd(15%2C25)&+pgcd(15%2C50)&+pgcd(30%2C50)&"
                                target="_blank">Xcas</a>
                        </li>
                        <li>
                            <a
                                href="#exec&python=0&+def%20bezout(a%2Cb)%3A%0A%20%20%20%20%23%20local%20l1%2Cl2%2Cq%0A%20%20%20%20l1%3D%5B1%2C0%2Ca%5D%0A%20%20%20%20l2%3D%5B0%2C1%2Cb%5D%0A%20%20%20%20while%20l2%5B2%5D!%3D0%3A%0A%20%20%20%20%20%20%20%20q%3Dl1%5B2%5D%2F%2Fl2%5B2%5D%0A%20%20%20%20%20%20%20%20l1%2Cl2%3Dl2%2C%5Bl1%5B0%5D-q*l2%5B0%5D%2Cl1%5B1%5D-q*l2%5B1%5D%2Cl1%5B2%5D-q*l2%5B2%5D%5D%0A%20%20%20%20return%20l1&+bezout(15%2C25)&+fonction%20bezout(a%2Cb)%0A%20%20local%20l1%2Cl2%2Cq%3B%0A%20%20l1%3A%3D%5B1%2C0%2Ca%5D%3B%0A%20%20l2%3A%3D%5B0%2C1%2Cb%5D%3B%0A%20%20tantque%20l2%5B2%5D!%3D0%20faire%0A%20%20%20%20q%3A%3Diquo(l1%5B2%5D%2Cl2%5B2%5D)%3B%0A%20%20%20%20l1%2Cl2%3A%3Dl2%2Cl1-q*l2%3B%0A%20%20ftantque%3B%0A%20%20return%20l1%3B%0Affonction%3A%3B&+bezout(15%2C25)&"
                                target="_blank">
                            <strong>Identit&eacute; de B&eacute;zout.</strong></a>
                        </li>
                        <li>
                            <a href="#exec&python=1&+//Trois%20enfants%20A%2C%20B%2C%20C%20jouent%20%C3%A0%20la%20balle.%20Lorsque%20A%20a%20la%20balle%2C%20il%20l'envoie%20avec%20probabilit%C3%A9%203%2F4%20vers%20B%20et%201%2F4%20vers%20C%2C%20lorsque%20B%20a%20la%20balle%2C%20il%20l'envoie%20vers%20A%20avec%20probabilit%C3%A9%203%2F4%20et%20vers%20C%20avec%20probabilit%C3%A9%201%2F4%2C%20lorsque%20A%20a%20la%20balle%20il%20l'envoie%20vers%20B.&+m%3A%3D%5B%5B0%2C3%2F4%2C1%2F4%5D%2C%5B3%2F4%2C0%2C1%2F4%5D%2C%5B0%2C1%2C0%5D%5D&+axes%3D0%3B%20plotproba(m%2C%5B%22A%22%2C%22B%22%2C%22C%22%5D)&+p%3A%3Dmarkov(m)&+//La%20probabilit%C3%A9%20invariante%20est%20donc%20(12%2F35%2C16%2F35%2C1%2F5)&+p%5B1%5D*m%3B%20evalf(p%5B1%5D)&+//Simulation%20de%20lancers%20et%20comparaison%20du%20nombre%20de%20fois%20que%20le%20ballon%20est%20en%20A%2C%20B%20ou%20C%20avec%20la%20probabilit%C3%A9%20invariante.&+s%3A%3Drandmarkov(m%2C1%2C1000)&+count_eq(0%2Cs)%3B%20count_eq(1%2Cs)%3B%20count_eq(2%2Cs)&"
                               target="_blank">
                            Marche al&eacute;atoire sur un graphe</a>
                        </li>
                        <li>
                            <a href="#exec&python=0&+///Algorithme%20de%20recherche%20du%20plus%20court%20chemin%20d'un%20sommet%20%3Ctt%3Esource%3C%2Ftt%3E%20aux%20autres%20sommets%20du%20graphe.&+fonction%20Dijkstra(G%2Csource)%0A%20%20%2F%2F%20G%20matrice%20carree%20symetrique%20de%20taille%20n%20donnant%20la%20longueur%20%0A%20%20%2F%2F%20du%20sommet%20i%20au%20sommet%20j%0A%20%20%2F%2F%20renvoie%20la%20plus%20courte%20longueur%20et%20le%20sommet%20pr%C3%A9c%C3%A9dent%0A%20%20local%20v%2Ctodo%2Ctodov%2Cj%2Cdist%2Cdistv%2Calt%2Cprev%2Cn%3B%0A%20%20n%3A%3Dsize(G)%3B%0A%20%20%2F%2F%20initialisation%0A%20%20todo%3A%3Dseq(j%2Cj%2C0%2Cn-1)%3B%20dist%3A%3D%5Binf%24n%5D%3B%20prev%3A%3D%5B-1%24n%5D%3B%20dist%5Bsource%5D%3D%3C0%3B%0A%20%20tantque%20size(todo)!%3D0%20faire%0A%20%20%20%20%2F%2F%20sommet%20realisant%20la%20longueur%20min%20parmi%20ceux%20restant%0A%20%20%20%20v%3A%3D0%3B%20%0A%20%20%20%20todov%3A%3Dtodo%5Bv%5D%3B%20%0A%20%20%20%20distv%3A%3Ddist%5Btodov%5D%3B%0A%20%20%20%20pour%20j%20de%200%20jusque%20size(todo)-1%20faire%20%0A%20%20%20%20%20%20si%20dist%5Btodo%5Bj%5D%5D%3Cdistv%20alors%20v%3A%3Dj%3B%20todov%3A%3Dtodo%5Bv%5D%3B%20distv%3A%3Ddist%5Btodo%5Bj%5D%5D%3B%20fsi%3B%20%0A%20%20%20%20fpour%3B%0A%20%20%20%20si%20distv%3D%3Dinf%20alors%20return%20dist%2Cprev%3B%20fsi%3B%20%2F%2F%20fin%20algo%20prematuree%0A%20%20%20%20todo%3A%3Dsuppress(todo%2Cv)%3B%20%2F%2F%20supprime%20todo%5Bv%5D%0A%20%20%20%20%2F%2F%20cherche%20les%20distances%20en%20passant%20par%20todo%5Bv%5D%0A%20%20%20%20for%20j%20in%20todo%20do%0A%20%20%20%20%20%20alt%3A%3Ddistv%2BG%5Btodov%2Cj%5D%3B%0A%20%20%20%20%20%20si%20alt%3Cdist%5Bj%5D%20alors%20dist%5Bj%5D%3A%3Dalt%3B%20prev%5Bj%5D%3A%3Dtodov%3B%20fsi%3B%0A%20%20%20%20od%3B%0A%20%20ftantque%3B%0A%20%20return%20dist%2Cprev%3B%0Affonction%3A%3B&+///On%20g%C3%A9n%C3%A8re%20une%20matrice%20%24G%24%20sym%C3%A9trique%20de%20mani%C3%A8re%20al%C3%A9atoire%20%C3%A0%20coefficients%20positifs%2C%20on%20met%20%C3%A0%200%20la%20diagonale.&+G0%3A%3Drandmatrix(5%2C5%2Calea(50)%2B1)%3B%0AG%3A%3DG0%2Btran(G0)%3B%20%0Apour%20j%20de%200%20jusque%204%20faire%20G%5Bj%2Cj%5D%3A%3D0%20fpour&+Dijkstra(G%2C0)&+Dijkstra(G%2C1)&"
                               target="_blank">
                            algorithme de Dijkstra
                            </a>
                        </li>
                        <li>
                            Jour de la semaine:
                            <a
                                href="#exec&python=0&+fonction%20jour_semaine0(j%2Cm%2Ca)%0A%20%20local%20J%2CL%2CSL%2Ca1%2Cb%2Cbi%3B%0A%20%20J%3A%3D%5B%22Dimanche%22%2C%22Lundi%22%2C%22Mardi%22%2C%22Mercredi%22%2C%22Jeudi%22%2C%22Vendredi%22%2C%22Samedi%22%5D%3B%0A%20%20a1%3A%3Da-1%3Bbi%3A%3D0%3B%0A%20%20si%20(irem(a%2C4)%3D%3D0%20and%20irem(a%2C100)!%3D0)%20or%20irem(a%2C400)%3D%3D0%20alors%0A%20%20%20%20bi%3A%3D1%3B%0A%20%20fsi%3B%0A%20%20si%20(m%3D%3D1)%20ou%20(m%3D%3D2)%20alors%0A%20%20%20%20b%3A%3Da1%2Biquo(a1%2C4)%2Biquo(a1%2C400)-iquo(a1%2C100)%2B(iquo(23*m%2C9)%2B5)%2Bj%3B%0A%20%20%20%20sinon%0A%20%20%20%20b%3A%3Da1%2Bbi%2Biquo(a1%2C4)%2Biquo(a1%2C400)-iquo(a1%2C100)%2B(iquo(23*m%2C9)%2B3)%2Bj%3B%0A%20%20fsi%3B%0A%20%20return%20J%5Birem(b%2C7)%5D%3B%0Affonction%3A%3B%0A%0Afonction%20jour_semaine(j%2Cm%2Ca)%0A%20%20local%20J%2CL%2CSL%2Ca1%2Cb%3B%0A%20%20a1%3A%3Da-1%3B%0A%20%20L%3A%3D%5B0%2C31%2C28%2C31%2C30%2C31%2C30%2C31%2C31%2C30%2C31%2C30%5D%3B%0A%20%20J%3A%3D%5B%22Dimanche%22%2C%22Lundi%22%2C%22Mardi%22%2C%22Mercredi%22%2C%22Jeudi%22%2C%22Vendredi%22%2C%22Samedi%22%5D%3B%0A%20%20si%20(irem(a%2C4)%3D%3D0%20and%20irem(a%2C100)!%3D0)%20or%20irem(a%2C400)%3D%3D0%20alors%0A%20%20%20%20L%5B2%5D%3A%3D29%3B%0A%20%20fsi%3B%0A%20%20SL%3A%3Direm(cumSum(L)%2C7)%3B%0A%20%20b%3A%3Da1%2Biquo(a1%2C4)%2Biquo(a1%2C400)-iquo(a1%2C100)%2BSL%5Bm-1%5D%2Bj%3B%0A%20%20return%20J%5Birem(b%2C7)%5D%3B%0Affonction%3A%3B&+jour_semaine0(5%2C4%2C2018)&+jour_semaine(5%2C4%2C2018)&"
                                target="_blank">Xcas</a>
			</li>
			<li>
			<a
			href="#exec&python=0&+///%3Ca%20href%3D%22http%3A%2F%2Fwww.les-mathematiques.net%2Fphorum%2Ffile.php%3F6%2Cfile%3D78088%2Cfilename%3Dfre2.pdf%22%20target%3D%22_blank%22%3EProbl%C3%A8me%206%20olympiades%20maths.%3C%2Fa%3E%0AOn%20d%C3%A9finit%20une%20fonction%20qui%20calcule%20la%20tangente%20d'un%20angle%2C%20det%20permet%20de%20calculer%20le%20d%C3%A9terminant%202x2%20pour%20trouver%20le%20sinus%2C%20*%20calcule%20le%20produit%20scalaire.&+def%20Tan(A%2CB%2CC)%3A%0A%20%20%23%20A%2CB%2CC%20listes%2C%20tangente%20angle%20issu%20de%20B%3Dsin%2Fcos%20%0A%20%20%23%20avec%20cos%3Dvecteur(B%2CA).vecteur(B%2CC)%20et%20sin%3Ddet(vecteur(B%2CA)%2Cvecteur(B%2CC))%0A%20%20BA%3DA-B%3B%0A%20%20BC%3DC-B%3B%0A%20%20return%20det(BA%2CBC)%2F(BA*BC)&+A%3A%3D%5B0%2C0%5D%3B%20B%3A%3D%5Bb%2C0%5D%3B%20%20%0AC%3A%3D%5Bc1%2Cc2%5D%3B%20D%3A%3D%5Bd1%2Cd2%5D%3B%0AX%3A%3D%5Bx1%2Cx2%5D%3B&+///Par%20invariance%20par%20translation%20on%20peut%20prendre%20%24A%24%20en%20l'origine%2C%20et%20par%20rotation%20%24B%24%20sur%20l'axe%20des%20%24x%24%20(on%20pourrait%20par%20dilatation%20prendre%20%24b%3D1%24).&+///eq1%2C%20eq2%2C%20eq3%20sont%20la%20mise%20en%20%C3%A9quation%20des%203%20contraintes.%20eq4%20est%20la%20relation%20cherch%C3%A9e.&+eq1%3A%3D((B-A)*(B-A))*((D-C)*(D-C))-%0A%20%20((C-B)*(C-B))*((D-A)*(D-A))&+eq2%3A%3DTan(X%2CA%2CB)-Tan(X%2CC%2CD)&+eq3%3A%3DTan(X%2CB%2CC)-Tan(X%2CD%2CA)&+eq4%3A%3DTan(B%2CX%2CA)%2BTan(D%2CX%2CC)&+v%3A%3D%5Bb%2Cc1%2Cc2%2Cd1%2Cd2%2Cx1%2Cx2%5D&+Eq2%3A%3Dnumer(eq2)%3A%3B%20Eq3%3A%3Dnumer(eq3)%3A%3B&+degree(Eq2%2Cv)%3Bdegree(Eq3%2Cv)&+%5BD1%5D%3A%3Dsolve(eq2%3D0%2Cd1)&+///On%20peut%20donc%20r%C3%A9soudre%20eq2%20en%20d1%20ou%20d2%2C%20ou%20eq3%20en%20c1%20ou%20c2%20(premier%20degr%C3%A9).&+Eq1_%3A%3Dnumer(eq1(d1%3DD1))%3A%3B%0Adegree(Eq1_%2Cv)%3B&+Eq3_%3A%3Dnumer(eq3(d1%3DD1))%3A%3B%0Adegree(Eq3_%2Cv)%3B&+///On%20obtient%20deux%20%C3%A9quations%20de%20degr%C3%A9%202%20en%20%24b%24%20ou%20en%20%24d2%24%2C%20en%20faisant%20la%20combinaison%20lin%C3%A9aire%20ad%C3%A9quate%20on%20se%20ram%C3%A8ne%20%C3%A0%20une%20%C3%A9quation%20de%20degr%C3%A9%201%20en%20%24d2%24%2C%20qu'on%20r%C3%A9soud.&+Eq_%3A%3DEq1_*coeff(Eq3_%2Cd2%2C2)-%0A%20%20Eq3_*coeff(Eq1_%2Cd2%2C2)%3B%0A%5BD2%5D%3A%3Dsolve(Eq_%3D0%2Cd2)&+///On%20subtitue%20la%20valeur%20de%20d1%20et%20de%20d2%20dans%20eq4%2C%20on%20trouve%20bien%200.&+normal(subst(eq4(d1%3DD1)%2Cd2%3DD2))&+///Malheureusement%2C%20la%20preuve%20n'est%20pas%20complete.%20Il%20faut%20en%20effet%20verifier%20que%20l'equation%20qu'on%20resoud%20en%20d2%20n'est%20pas%20identiquement%20nulle.%20Or%20ceci%20peut%20arriver%3A&+cnd%3A%3Dfactor(gcd(coeffs(Eq_%2Cd2))&+///%24x1%5E2%2Bx2%5E2%24%20est%20non%20nul%2C%20de%20meme%20que%20%24(c1-x1)%5E2%2B(c2-x2)%5E2%24%20(points%20distincts).%20%24c2*x1-c1*x2%24%20est%20nul%20si%20%24A%24%2C%20%24C%24%20et%20%24X%24%20sont%20alignes.%20En%20fait%20ces%203%20facteurs%20n'interviennent%20pas%20si%20on%20utilise%20les%20bases%20de%20Groebner%2C%20ci-dessous.&+///La%20solution%20automatiquement%20avec%20des%20bases%20de%20Groebner%20et%20un%20ordre%20d'%C3%A9limination.&+G%3A%3Dgbasis(%5Bnumer(eq1)%2C%0A%20%20numer(eq2)%2Cnumer(eq3)%5D%2C%0A%20%20%5Bd1%2Cd2%5D)&+size(G)&+seq(degree(G%5Bj%5D%2C%5Bd1%2Cd2%5D)%2C%0A%20%20j%2C0%2Csize(G)-1)&+///On%20peut%20resoudre%20G%5B35%5D%20en%20%24d2%24%20si%20le%20facteur%20commun%20de%20degre%20total%205%20en%20%24b%2Cc1%2Cc2%2Cx1%2Cx2%24%20est%20non%20nul.&+factor(G%5B35%5D)%3B&+%5BD2%5D%3A%3Dsimplify(solve(G%5B35%5D%3D0%2Cd2))&+///On%20ne%20peut%20pas%20eliminer%20ce%20facteur%20commun%3A&+factor(gcd(%0A%20%20gcd(coeffs(G%5B33%5D%2Cd1))%2C%0A%20%20gcd(coeffs(G%5B34%5D%2Cd1))%2C%0A%20%20gcd(coeffs(G%5B35%5D%2Cd1)%0A%20%20)))&+///Si%20ce%20facteur%20est%20non%20nul%2C%20alors%20on%20conclut%20comme%20avant%3A&+%5BD1%5D%3A%3Dsolve(G%5B32%5D%3D0%2Cd1)&+normal(%0A%20%20subst(%0A%20%20%20%20subst(eq4%2Cd1%3DD1)%2C%0A%20%20%20%20d2%3DD2)&+///En%20fait%20si%20on%20elimine%20d1%20et%20d2%20des%203%20equations%2C%20on%20obtient%20le%20produit%20de%203%20facteurs%2C%20le%20premier%20etant%20non%20nul%20(%24X!%3DA%24)%2C%20l'un%20des%20deux%20facteurs%20restants%20est%20nul%2C%20c'est%20la%20condition%20que%20doit%20verifier%20%24X%24%20pour%20que%20les%203%20contraintes%20soient%20satisfaites.%20Or%20quand%20le%20troisieme%20facteur%20(de%20degre%20total%205)%20est%20nul%2C%20l'equation%20qui%20nous%20a%20permis%20de%20determiner%20d2%20est%20identiquement%20nulle.&+G36%3A%3Dfactors(G%5B36%5D)%3B%20size(G36)&+G36%5B2%5D&+///Au%20passage%2C%20on%20observe%20que%20si%20le%20deuxieme%20facteur%20(de%20degre%20total%204)%20s'annule%2C%20alors%20les%203%20contraintes%20sont%20bien%20verifiees.&+factors(eq1__%3A%3Dnumer(Eq1_(d2%3DD2)))&+factors(eq3__%3A%3Dnumer(Eq3_(d2%3DD2))&+///On%20ajoute%20la%20condition%20G36%5B4%5D%20pour%20determiner%20x1%20et%20x2&+H%3A%3Dgbasis(%5Bnumer(eq1)%2C%0A%20%20numer(eq2)%2Cnumer(eq3)%2CG36%5B4%5D%5D%2C%0A%20%20%5Bx1%2Cx2%5D)&+seq(degree(H%5Bj%5D%2Cv)%2Cj%2C0%2Csize(H)-1)%3Bsize(H)&+%5BX2%5D%3A%3Dsolve(H%5B64%5D%3D0%2Cx2)&+v%3Bdegree(H%5B56%5D%2Cv)%0A&+H56%3A%3Dnumer(subst(H%5B56%5D%2Cx2%3DX2))&+gcd(coeffs(H%5B56%5D%2Cx1))%0A&+%5BX1%5D%3A%3Dsolve(H%5B56%5D%3D0%2Cx1)&+///On%20verifie%20que%20eq2%20et%20eq3%20sont%20ok&+g364%3A%3Dnumer(subst(G36%5B4%5D(x1%3DX1)%2Cx2%2CX2))&+rem(g364%2Ceq1%2Cb)&+eq22%3A%3Dnumer(subst(eq2(x1%3DX1)%2Cx2%2CX2))&+rem(eq22%2Ceq1%2Cb)&+eq33%3A%3Dnumer(subst(eq3(x1%3DX1)%2Cx2%2CX2)&+rem(eq33%2Ceq1%2Cb)&+///Resterait%20a%20verifier%20que%20x1%2Cx2%20n'est%20pas%20dans%20le%20quadrilatere%3F%0AOn%20peut%20aussi%20calculer%20x1%2C%20x2%20en%20fonction%20de%20A%2CB%2CC%2CD%20dans%20le%20cas%20%22normal%22%2C%20de%20la%20meme%20facon.&+K%3A%3Dgbasis(%5Bnumer(eq1)%2C%0A%20%20numer(eq2)%2Cnumer(eq3)%2CG36%5B2%5D%5D%2C%0A%20%20%5Bx1%2Cx2%5D)&+seq(degree(K%5Bj%5D%2Cv)%2Cj%2C0%2Csize(K)-1)%3Bsize(K)&+%5BX2%5D%3A%3Dsolve(K%5B106%5D%3D0%2Cx2)&+K56%3A%3Dnumer(subst(K%5B100%5D%2Cx2%3DX2))&+gcd(coeffs(K%5B100%5D%2Cx1))&+%5BX1%5D%3A%3Dsolve(K%5B100%5D%3D0%2Cx1)&+///Il%20y%20a%20donc%20pour%20tout%20quadrilatere%20verifiant%20AB*CD%3DAC*BD%2C%202%20points%20X%20verifiant%20les%202%20conditions%20d'angle.%20On%20a%20determine%20leurs%20coordonnees%20(qui%20dependent%20rationnellement%20des%20coordonnees%20de%20A%2C%20B%2C%20C%20et%20D)%2C%20et%20montre%20qu'un%20de%20ces%20deux%20points%20verifie%20la%20propriete%20de%20l'exercice.&"
target="_blank">Olympiades de maths 2018, probl&egrave;me 6</a>
			</li>
                    </ul>
                </div>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutoex2'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Exemples</strong></button>
                <div id="tutoex2" style="display:none">
                    <ul>
                        <li> Nombres flottants (Licence):
                            <a
                                href="#exec&python=0&+///%3Ch1%3eNombres%20flottants%3C/h1%3e&+1.0-0.9-0.1&+///On%20voit%20ci-dessus%20que%20Xcas%20ne%20calcule%20pas%20en%20base%2010.%0aVoici%20un%20programme%20qui%20d%C3%A9termine%20la%20base%20utilis%C3%A9e%20pour%20repr%C3%A9senter%20les%20flottants.&+function%20Base()%0A%20%20local%20A%2CB%3B%0A%20%20A%3A%3D1.0%3B%20B%3A%3D1.0%3B%0A%20%20while%20-1%2B((A%2B1.0)-A)%3D0.0%20do%20%20A%3A%3D2*A%3B%20od%3B%0A%20%20while%20-B%2B((A%2BB)-A)!%3D0%20do%20B%3A%3DB%2B1%3B%20od%3B%0A%20%20return%20B%3B%0Affunction%3A%3B%20Base()&+///Plus%20grand%20et%20plus%20petit%20r%C3%A9el%20positif%20non%20nul%20repr%C3%A9sentable%20en%20arithm%C3%A9tique%20double%20pr%C3%A9cision.&+MINREAL%3BMAXREAL&+///Pr%C3%A9cision%20dans%20Xcas%20en%20nombre%20de%20bits.%20Si%20%3Ctt%3eDigits%3C/tt%3e%20est%20sup%C3%A9rieur%20%C3%A0%2014,%20les%20calculs%20sont%20plus%20lents%20mais%20plus%20pr%C3%A9cis.&+epsilon%3A%3D0%3A%3B%20Digits%3A%3D14%3B%0Apour%20j%20de%201%20jusque%201000%20faire%20%0A%20%20si%20evalf(1)%2B2%5E(-j)%3D%3Devalf(1)%20alors%20break%3B%20fsi%3B%20%0Afpour%3A%3B%0Aj&+///Erreur%20relative,%20exemple%20avec%20le%20calcul%20num%C3%A9rique%20de%20d%C3%A9riv%C3%A9e%20selon%20deux%20formules.%20Observer%20la%20valeur%20optimale%20de%20$h$,%20qui%20d%C3%A9pend%20de%20la%20valeur%20de%20%3Ctt%3eDigits%3C/tt%3e&+der(f%2Cx%2Ch)%3A%3D(f(x%2Bh)-f(x))%2Fh&+Digits%3A%3D14&+seq(der(exp%2C0.0%2C10%5E(-j))-1%0A%20%20%2Cj%2C1%2C15))&+der2(f%2Cx%2Ch)%3A%3D(f(x%2Bh)-f(x-h))%2F2%2Fh&+seq(der2(exp%2C0.0%2C10%5E(-j))-1%0A%20%20%2Cj%2C1%2C15))&+///L'erreur%20relative%20sur%20$f(x)$%20est%20en%20gros%20$abs(x*f'(x)/f(x))$.%20Illustration%20avec%20l'arithm%C3%A9tique%20d'intervalle.&+x%3A%3Dconvert(pi%2Cinterval)&+err%3A%3D(right(x)-left(x))%2Fpi&+f(x)%3A%3Dexp(x)%3A%3By%3A%3Df(x)&+(right(y)-left(y))%2Fexp(pi)%3B%20%0Aerr*pi*f'(pi)%2Ff(pi)&+///Somme%20de%20$n$%20erreurs%20absolues%20ind%C3%A9pendantes.%20%0aL'estimation%20rigoureuse%20sur%20l'erreur%20de%20la%20somme%20(multipli%C3%A9e%20par%20$n$)%20est%20pessimiste,%20statistiquement%20l'erreur%20totale%20est%20de%20l'ordre%20de%20$sqrt(n)$.%0aExemple%20de%20simulation%20:%20on%20somme%20$n=400$%20nombres%20r%C3%A9partis%20sur%20[%E2%88%921,1]%20selon%20la%20loi%20uniforme%20(repr%C3%A9sentant%20des%20erreurs),%20on%20divise%20par%20$sqrt(n)=20$,%20on%20effectue%20plusieurs%20tirages,%20disons%201000.%20On%20trace%20l%E2%80%99histogramme%20des%20erreurs%20divis%C3%A9ees%20par%20$sqrt(n)$%20et%20on%20compare%20avec%20la%20loi%20normale%20de%20moyenne%20nulle%20(l%E2%80%99esp%C3%A9rance%20de%20la%20somme)%20et%20d%E2%80%99%C3%A9cart-type%20celui%20de%20la%20loi%20uniforme.&+n%3A%3D400%3B%0Am%3A%3Dranm(n%2C1000%2C-1..1)%3A%3B%0Agl_x%3D-2..2%3B%0Ahistogram(sum(m)%2Fsqrt(n)%2C-1%2C0.1)%3B%20%0Aplot(normald(0%2Cstddev(uniform%2C-1%2C1))%2C-2..2)&+///Correction%20d'erreurs%20d'arrondi%20de%20la%20somme%20des%20%C3%A9l%C3%A9ments%20d'une%20liste.%20On%20accumule%20dans%20$c$%20%C3%A0%20peu%20pr%C3%A8s%20l'oppos%C3%A9%20de%20la%20somme%20des%20erreurs%20d'arrondis%20du%20calcul%20de%20%3Ctt%3es+=x%3C/tt%3e&+fonction%20Somme(l)%0A%20%20local%20x%2Cs%2Cc%3B%0A%20%20s%3A%3D0.0%3B%0A%20%20c%3A%3D0.0%3B%0A%20%20pour%20x%20in%20l%20faire%0A%20%20%20%20c%20%2B%3D%20(x-((s%2Bx)-s))%3B%0A%20%20%20%20s%20%2B%3D%20x%3B%0A%20%20fpour%3B%0A%20%20print(c)%3B%0A%20%20return%20s%2Bc%3B%0Affonction%3A%3B&+n%3A%3D6000%3B%0Al%3A%3Dseq(1%2Fj%2Cj%2C1%2Cn)%3A%3B%0ASomme(l)%3B&+///Comparaison%20avec%20la%20valeur%20approch%C3%A9e%20du%20calcul%20exact%20de%20$S$%20et%20le%20calcul%20approch%C3%A9%20sans%20pr%C3%A9caution&+S%3A%3Dsum(1%2Fj%2Cj%2C1%2Cn)%3A%3B%20evalf(S)%3B%0Asum(1.%20%2Fj%2Cj%2C1%2Cn)%3B&"
                                target="_blank">Xcas</a>,
                            <a
                                href="#exec&python=0&+///%3Ch1%3eNombres%20flottants%3C/h1%3e&+1.0-0.9-0.1&+///On%20voit%20ci-dessus%20que%20Xcas%20ne%20calcule%20pas%20en%20base%2010.%0aVoici%20un%20programme%20qui%20d%C3%A9termine%20la%20base%20utilis%C3%A9e%20pour%20repr%C3%A9senter%20les%20flottants.&+def%20Base()%3A%0A%20%20%23%20local%20A%2CB%0A%20%20A%3D1.0%20%0A%20%20B%3D1.0%0A%20%20while%20-1%2B((A%2B1.0)-A)%3D%3D0.0%3A%20%20%0A%20%20%20%20A%3D2*A%0A%20%20while%20-B%2B((A%2BB)-A)!%3D0%3A%0A%20%20%20%20B%3DB%2B1%0A%20%20return%20B%0A&+Base()&+///Plus%20grand%20et%20plus%20petit%20r%C3%A9el%20positif%20non%20nul%20repr%C3%A9sentable%20en%20arithm%C3%A9tique%20double%20pr%C3%A9cision.&+MINREAL%3BMAXREAL&+///Pr%C3%A9cision%20dans%20Xcas%20en%20nombre%20de%20bits.%20Si%20%3Ctt%3eDigits%3C/tt%3e%20est%20sup%C3%A9rieur%20%C3%A0%2014,%20les%20calculs%20sont%20plus%20lents%20mais%20plus%20pr%C3%A9cis.&+%23%0Aepsilon%3D0%0ADigits%3D14%0Afor%20j%20in%20range(1000)%3A%0A%20%20if%201.0%2B2**(-j)%3D%3D1.0%3A%0A%20%20%20%20print(j)%3B%0A%20%20%20%20break%0Aj&+///Erreur%20relative,%20exemple%20avec%20le%20calcul%20num%C3%A9rique%20de%20d%C3%A9riv%C3%A9e%20selon%20deux%20formules.%20Observer%20la%20valeur%20optimale%20de%20$h$,%20qui%20d%C3%A9pend%20de%20la%20valeur%20de%20%3Ctt%3eDigits%3C/tt%3e&+def%20der(f%2Cx%2Ch)%3A%0A%20%20return%20(f(x%2Bh)-f(x))%2Fh&+%23%0ADigits%3D14&+%5Bder(exp%2C0.0%2C10%5E(-j))-1%20for%20j%20in%20range(1%2C15)%5D&+def%20der2(f%2Cx%2Ch)%3A%0A%20%20return%20(f(x%2Bh)-f(x-h))%2F2%2Fh&+%5Bder2(exp%2C0.0%2C10%5E(-j))-1%20for%20j%20in%20range(1%2C15)%5D&+///L'erreur%20relative%20sur%20$f(x)$%20est%20en%20gros%20$abs(x*f'(x)/f(x))$.%20Illustration%20avec%20l'arithm%C3%A9tique%20d'intervalle.&+x%3Dconvert(pi%2Cinterval)&+err%3D(right(x)-left(x))%2Fpi&+def%20f(x)%3A%0A%20%20return%20exp(x)&+%23%0Ay%3Df(x)%0A(right(y)-left(y))%2Fexp(pi)%20%0Aerr*pi*function_diff(f)(pi)%2Ff(pi)&+///Somme%20de%20$n$%20erreurs%20absolues%20ind%C3%A9pendantes.%20%0aL'estimation%20rigoureuse%20sur%20l'erreur%20de%20la%20somme%20(multipli%C3%A9e%20par%20$n$)%20est%20pessimiste,%20statistiquement%20l'erreur%20totale%20est%20de%20l'ordre%20de%20$sqrt(n)$.%0aExemple%20de%20simulation%20:%20on%20somme%20$n=400$%20nombres%20r%C3%A9partis%20sur%20[%E2%88%921,1]%20selon%20la%20loi%20uniforme%20(repr%C3%A9sentant%20des%20erreurs),%20on%20divise%20par%20$sqrt(n)=20$,%20on%20effectue%20plusieurs%20tirages,%20disons%201000.%20On%20trace%20l%E2%80%99histogramme%20des%20erreurs%20divis%C3%A9ees%20par%20$sqrt(n)$%20et%20on%20compare%20avec%20la%20loi%20normale%20de%20moyenne%20nulle%20(l%E2%80%99esp%C3%A9rance%20de%20la%20somme)%20et%20d%E2%80%99%C3%A9cart-type%20celui%20de%20la%20loi%20uniforme.&+%23%0An%3D400%0Am%3Dranm(n%2C1000%2C-1..1)%0Agl_x%3D-2..2%0Ahistogram(sum(m)%2Fsqrt(n)%2C-1%2C0.1)%20%0Aplot(normald(0%2Cstddev(uniform%2C-1%2C1))%2C-2..2)&+///Correction%20d'erreurs%20d'arrondi%20de%20la%20somme%20des%20%C3%A9l%C3%A9ments%20d'une%20liste.%20On%20accumule%20dans%20$c$%20%C3%A0%20peu%20pr%C3%A8s%20l'oppos%C3%A9%20de%20la%20somme%20des%20erreurs%20d'arrondis%20du%20calcul%20de%20%3Ctt%3es+=x%3C/tt%3e&+def%20Somme(l)%3A%0A%20%20%23%20local%20x%2Cs%2Cc%0A%20%20s%3D0.0%0A%20%20c%3D0.0%0A%20%20for%20x%20in%20l%3A%0A%20%20%20%20c%20%2B%3D%20(x-((s%2Bx)-s))%0A%20%20%20%20s%20%2B%3D%20x%0A%20%20print(c)%0A%20%20return%20s%2Bc&+%23%0An%3D6000%0Al%3D%5B1.0%2Fj%20for%20j%20in%20range(1%2Cn%2B1)%5D%3A%3B%0ASomme(l)&+///Comparaison%20avec%20la%20valeur%20approch%C3%A9e%20du%20calcul%20exact%20de%20$S$%20et%20le%20calcul%20approch%C3%A9%20sans%20pr%C3%A9caution&+%23%0AS%3Dsum(1%2Fj%2Cj%2C1%2Cn)%3A%3B%20%0Aevalf(S)%0Asum(1.%20%2Fj%2Cj%2C1%2Cn)&"
                                target="_blank"><strong>Python</strong></a>
                        </li>
                        <li> Licence
                            <a
                                href="#exec&python=0&+///Temps%20de%20calcul%20et%20pr%C3%A9cision%20d'une%20factorisation%20LU%20en%20fonction%20de%20la%20taille%20$n$%20de%20la%20matrice&+t%3A%3D%5B%5D%3A%3B%20err%3A%3D%5B%5D%3A%3B%0Apour%20n%20de%201%20jusque%208%20faire%0A%20%20m%3A%3Dranm(n*50%2Cn*50%2Cuniformd%2C-1%2C1)%3B%20%0A%20%20t.append(time(p%2Cl%2Cu%3A%3Dlu(m)))%3B%20%0A%20%20err.append(maxnorm(permu2mat(p)*m-l*u))%3B%0Afpour%3A%3B%0At%3Berr%3B&+N%3A%3Dseq(ln(n)%2Cn%2C2%2C8)%3B%0AT%3A%3Dln(t)%5B1..11%5D%3B%0Apolygonscatterplot(N%2CT)%3B%0Alinear_regression_plot(N%2CT%2Ccolor%3Dred)&+linear_regression(N%2CT)&+///On%20est%20en-dessous%20du%20$O(n^3)$%20attendu,%20il%20y%20a%20des%20gains%20d'efficacit%C3%A9%20lorsque%20la%20taille%20de%20la%20matrice%20augmente,%20%20Xcas%20utilise%20des%20algorithmes%20par%20blocs%20plus%20efficaces.%20Il%20peut%20aussi%20etre%20int%C3%A9ressant%20d'utiliser%20des%20algorithmes%20sp%C3%A9cifiques%20lorsque%20la%20matrice%20est%20creuse%20par%20exemple%20pour%20la%20matrice%20du%20laplacien%20discret%20%3Ctt%3elaplacian(n)%3C/tt%3e,%20ou%20lorsque%20la%20matrice%20est%20sym%C3%A9trique%20d%C3%A9finie%20positive%20(%3Ctt%3echolesky%3C/tt%3e).&+n%3A%3D7%3B%20a%3A%3Dlaplacian(n)%3B&+///Comparaison%20entre%20r%C3%A9solution%20par%20LU%20en%20$O(n^2)$%20ou%20directe.&+fonction%20f(n)%0A%20%20local%20t1%2Ct2%2Cp%2Cl%2Cu%2Ca%2Cb%2Cv%2Cw%3B%0A%20%20p%2Cl%2Cu%3A%3Dlu(a%3A%3Dranm(n%2Cn%2Cuniformd%2C-1%2C1))%3A%3B%20%0A%20%20b%3A%3Dranv(n%2Cuniformd%2C-1%2C1)%3A%3B%20%0A%20%20t1%3A%3Dtime(v%3A%3Dlinsolve(p%2Cl%2Cu%2Cb))%3B%0A%20%20t2%3A%3Dtime(w%3A%3Dlinsolve(a%2Cb))%3B%0A%20%20return%20t1%2Ct2%2Cmaxnorm(v-w)%3B%0Affonction%3A%3B&+f(600)&+///Conditionnement%20d'une%20matrice,%20exemple%20de%20r%C3%A9solution%20de%20syst%C3%A8me%20avec%202%20seconds%20membres%20proches,%20l'erreur%20relative%20sur%20la%20solution%20est%20fortement%20amplifi%C3%A9e.&+a%3A%3D%5B%5B10%2C7%2C8%2C7%5D%2C%0A%20%20%5B7%2C5%2C6%2C5%5D%2C%0A%20%20%5B8%2C6%2C10%2C9%5D%2C%0A%20%20%5B7%2C5%2C9%2C10%5D%5D&+b%3A%3D%5B32%2C23%2C33%2C31%5D&+v%3A%3Dlinsolve(a%2Cb)&+delta_b%3A%3D%5B1%2C-1%2C1%2C-1%5D%2F100&+w%3A%3Dlinsolve(a%2Cb%2Bdelta_b)&+err1%3A%3Dl2norm(evalf(delta_b))%2Fl2norm(b)%3B%0Aerr2%3A%3Dl2norm(evalf(w-v))%2Fl2norm(v)%3B&+cond(a%2C2)%3B%20err2%2Ferr1&"
                                target="_blank">Syst&egrave;mes lin&eacute;aires, LU, conditionnement</a>
                        </li>
                        <li> Licence
                            <a
                                href="#exec&python=0&+///D%C3%A9composition%20$Q*R$%20et%20moindre%20carr%C3%A9s.%0aExemple:%20r%C3%A9gression%20lin%C3%A9aire.&+///On%20se%20donne%20une%20suite%20de%20valeurs%20sur%20une%20droite%20modulo%20une%20petite%20erreur%20al%C3%A9toire,%20on%20cherche%20la%20meilleure%20droite%20$y=a*x+b$%20approchant%20les%20points%20correspondants%20au%20sens%20des%20moindres%20carr%C3%A9s%20en%20$y$.&+n%3A%3D30%3B%20b%3A%3Dseq(2*j%2B5*rand()%2Cj%2C1%2Cn)&+x%3A%3Dseq(j%2Cj%2C1%2Cn)%3B%20scatterplot(x%2Cb)%3B%0Alinear_regression_plot(x%2Cb)&+///%C3%89criture%20matricielle%20du%20probl%C3%A8me%20sous%20la%20forme%20$A*x=b$%20avec%20$x=[m,p]$&+A%3A%3Dtrn(%5Bx%2Cseq(1%2Cn)%5D)&+A*%5Bm%2Cp%5D%3Db&+///Le%20syst%C3%A8me%20est%20surd%C3%A9termin%C3%A9.%0aOn%20le%20r%C3%A9soud%20au%20sens%20des%20moindres%20carr%C3%A9s,%20on%20cherche%20$x$%20tel%20que%20$abs(A*x-b)$%20minimal%20soit%20$A^t*A*x=A^t*b$&+///On%20utilise%20la%20d%C3%A9composition%20QR%20de%20$A$.%20%0aIci%20sous%20la%20forme%20$A=Q_1*R_1$%20avec%20$R_1$%20triangulaire%20sup%C3%A9rieure%20inversible.%20Donc%20$R_1*x=Q_1^t*b$&+q%2Cr%3A%3Dqr(evalf(A))&+q1%3A%3Dq%5B%3A%2C0..1%5D&+r1%3A%3Dr%5B0..1%2C0..1%5D&+linsolve(r1%2Ctran(q1)*b)&+///V%C3%A9rification%20avec%20la%20fonction%20int%C3%A9gr%C3%A9e%20de%20Xcas&+linear_regression(x%2Cb)&+///Int%C3%A9r%C3%AAt%20par%20rapport%20%C3%A0%20r%C3%A9soudre%20$A^t*A*x=A^t*b$.%20On%20a%20un%20syst%C3%A8me%20mieux%20conditionn%C3%A9.&+cond(A%2C2)&+///%20On%20perd%20intrins%C3%A8quement%20environ%201.5%20chiffres%20significatifs%20au%20lieu%20de%203.&"
                                target="_blank">D&eacute;composition QR, moindres carr&eacute;s,
                            exemple r&eacute;gression lin&eacute;aire</a>
                        </li>
                        <li> M&eacute;thodes it&eacute;ratives: point fixe, Newton, puissance
                            <a
                                href="#exec&python=0&+///M%C3%A9thodes%20it%C3%A9ratives&+///M%C3%A9thode%20du%20%3Cstrong%3epoint%20fixe%3C/strong%3e.%0aOn%20consid%C3%A8re%20la%20suite%20$u[n+1]=f(u[n])$,%20si%20la%20fonction%20$f$%20est%20contractante%20sur%20un%20intervalle,%20alors%20$u[n]$%20converge%20vers%20$l$%20tel%20que%20$f(l)=l$.&+fonction%20fixe(f%2Cu0%2CN%2Ceps)%0A%20%20local%20j%2Cu1%3B%0A%20%20u0%3A%3Devalf(u0)%3B%20%0A%20%20pour%20j%20de%201%20jusque%20N%20faire%0A%20%20%20%20u1%3A%3Df(u0)%3B%0A%20%20%20%20si%20abs(u1-u0)%3Ceps*abs(u0)%20alors%20return%20u1%2Cj%3B%20fsi%3B%0A%20%20%20%20u0%3A%3Du1%3B%0A%20%20fpour%3B%0A%20%20return%20%22Pas%20de%20convergence%22%3B%0Affonction%3A%3B&+f(x)%3A%3Dcos(x)%3B%0Afixe(f%2C0%2C100%2C1e-6)%3B%0Afixe(f%2C0%2C100%2C1e-8)%3B%0Afixe(f%2C0%2C100%2C1e-10)&+///La%20convergence%20est%20lin%C3%A9aire,%20il%20faut%20%C3%A0%20peu%20pr%C3%A8s%20le%20m%C3%AAme%20nombre%20d'it%C3%A9rations%20pour%20gagner%20une%20d%C3%A9cimale.%0aLa%20m%C3%A9thode%20de%20%3Cstrong%3eNewton%3C/strong%3e%20permet%20de%20r%C3%A9soudre%20$f(x)=0$%20en%20doublant%20le%20nombre%20de%20d%C3%A9cimales%20%C3%A0%20chaque%20it%C3%A9ration%20%3Cstrong%3esi%3C/strong%3e%20on%20est%20assez%20proche%20de%20la%20solution.%0aOn%20utilise%20la%20suite%20r%C3%A9currente%20$u[n+1]=u[n]-f(u[n])/f'(u[n])$,%20g%C3%A9om%C3%A9triquement%20c'est%20l'abscisse%20du%20point%20o%C3%B9%20la%20tangente%20au%20graphe%20de%20$f$%20en%20$x=u[n]$%20rencontre%20l'axe%20des%20$x$.&+gl_x%3D-1..2%3B%0Agl_y%3D-1..1.5%3B%0Af(x)%3A%3Dcos(x)-x%3B%0AG%3A%3Dplot(f(x)%2Cx%2C-1%2C2%2C%0A%20%20display%3Depaisseur_ligne_2)%3B%0AI0%3A%3Dpoint(0)%3B%0Avecteur(0%2Cpoint(0%2Cf(0)))%3B%0AT0%3A%3Dtangent(G%2C0%2C%0A%20%20display%3Dred%2Bhidden_name)%3B%0AI1%3A%3Dinter_unique(T0%2Cdroite(y%3D0))%3B%0Au1%3A%3Dabscisse(I1)%3B%0Avecteur(I1%2Cpoint(u1%2Cf(u1)))%3B%0AT1%3A%3Dtangent(G%2Cu1%2C%0A%20%20display%3Dmagenta%2Bhidden_name)%3B%0AI2%3A%3Dinter_unique(T1%2Cdroite(y%3D0))%3B%0A%2F%2Fu2%3A%3Dabscisse(I0)%3B%0A&+fonction%20Newton(f%2Cu0%2CN%2Ceps)%0A%20%20local%20j%2Cu1%2Cx%3B%0A%20%20purge(x)%3B%0A%20%20u0%3A%3Devalf(u0)%3B%0A%20%20pour%20j%20de%201%20jusque%20N%20faire%0A%20%20%20%20u1%3A%3Du0-f(u0)%2Ff'(u0)%3B%0A%20%20%20%20si%20abs(u1-u0)%3Ceps*abs(u0)%20alors%20return%20u1%2Cj%3B%20fsi%3B%0A%20%20%20%20u0%3A%3Du1%3B%0A%20%20fpour%3B%0A%20%20return%20%22Pas%20de%20convergence%22%3B%0Affonction%3A%3B&+f(x)%3A%3Dcos(x)-x%3B%0ANewton(f%2C0%2C100%2C1e-3)%3B%0ANewton(f%2C0%2C100%2C1e-6)%3B%0ANewton(f%2C0%2C100%2C1e-12)&+///Remarques:%20%0a*%20on%20observe%20le%20doublement%20du%20nombre%20de%20d%C3%A9cimales%20%C3%A0%20chaque%20it%C3%A9ration.%20%0a*%20il%20faudrait%20stocker%20la%20d%C3%A9riv%C3%A9e%20de%20$f$%20dans%20une%20variable%20locale%20pour%20ne%20pas%20la%20recalculer%20%C3%A0%20chaque%20it%C3%A9ration%0a*%20on%20peut%20d%C3%A9finir%20Newton%20en%20utilisant%20la%20fonction%20fixe%20ci-dessus%0a*%20il%20existe%20d'autres%20m%C3%A9thodes%20it%C3%A9ratives,%20par%20exemple%20la%20m%C3%A9thode%20de%20la%20s%C3%A9cante&+Newton(f%2Cu0%2CN%2Ceps)%3A%3D%0Afixe(id-f%2Ff'%2Cu0%2CN%2Ceps)&+///%3Cstrong%3eM%C3%A9thode%20de%20la%20puissance%3C/strong%3e%0aElle%20permet%20de%20trouver%20la%20plus%20grande%20valeur%20propre%20en%20module%20d'une%20matrice.%20L'id%C3%A9e%20est%20d'it%C3%A9rer%20$v[n+1]=A*v[n]$%20avec%20un%20vecteur%20$v[0]$%20al%C3%A9atoire,%20dans%20la%20base%20propre%20de%20$A$%20les%20coordonn%C3%A9es%20sont%20des%20suites%20g%C3%A9om%C3%A9triques%20de%20raisons%20les%20valeurs%20propres,%20donc%20la%20coordonn%C3%A9e%20correspondant%20%C3%A0%20la%20valeur%20propre%20de%20module%20maximal%20va%20dominer.&+fonction%20pui(A%2CN%2Ceps)%0A%20%20local%20v0%2Cv1%2Cl%2Cj%2Cn%3B%0A%20%20n%3A%3Dsize(A)%3B%0A%20%20v0%3A%3Dranv(n%2Cuniformd%2C-1%2C1)%3B%0A%20%20v0%3A%3Dnormalize(v0)%3B%0A%20%20pour%20j%20de%201%20jusque%20N%20faire%0A%20%20%20%20v1%3A%3DA*v0%3B%0A%20%20%20%20l%3A%3Ddot(v0%2Cv1)%3B%0A%20%20%20%20si%20l2norm(v1-l*v0)%3Ceps%20alors%20return(v0%2Cl%2Cj)%3B%20fsi%3B%0A%20%20%20%20v0%3A%3Dnormalize(v1)%3B%0A%20%20fpour%3B%0A%20%20return%20%22Pas%20de%20convergence%2C%20essayez%20avec%20A%2Bi*identity(A)%22%0Affonction%3A%3B&+a%3A%3Dranm(3%2C3)%3B%0AA%3A%3Da%2Btran(a)%3B%0A&+pui(A%2C1000%2C1e-6)%3B%0Apui(A%2C1000%2C1e-8)%3B%0Apui(A%2C1000%2C1e-10)%0A&+///La%20convergence%20est%20lin%C3%A9aire.%0aSi%20on%20a%20un%20couple%20de%20valeurs%20propres%20conjugu%C3%A9s%20de%20module%20maximal,%20il%20faut%20briser%20la%20sym%C3%A9trie%20par%20exemple%20en%20translatant%20de%20$i$%20dans%20la%20complexe.&+a%3A%3D%5B%5B-11%2C-69%2C-60%5D%2C%0A%20%20%5B84%2C-71%2C-88%5D%2C%0A%20%20%5B33%2C72%2C1%5D%5D%2F100.%3B%0A&+pui(a%2C1000%2C1e-6)%3B%0Apui(a%2Bi%2C1000%2C1e-6)&+///Si%20on%20connait%20une%20valeur%20approch%C3%A9e%20$lambda$%20d'une%20valeur%20propre,%20on%20peut%20acc%C3%A9l%C3%A9rer%20la%20convergence%20en%20it%C3%A9rant%20sur%20$(A-lambda*I)^(-1)$%20(on%20peut%20%C3%A9viter%20le%20calcul%20explicite%20de%20l'inverse%20en%20utilisant%20la%20d%C3%A9composition%20LU).&+pui((a%2B0.27)%5E-1%2C1000%2C1e-6)&"
                                target="_blank">
                            Xcas
                            </a>,
                            <a
                                href="#exec&python=0&+///M%C3%A9thodes%20it%C3%A9ratives&+///M%C3%A9thode%20du%20%3Cstrong%3epoint%20fixe%3C/strong%3e.%0aOn%20consid%C3%A8re%20la%20suite%20$u[n+1]=f(u[n])$,%20si%20la%20fonction%20$f$%20est%20contractante%20sur%20un%20intervalle,%20alors%20$u[n]$%20converge%20vers%20$l$%20tel%20que%20$f(l)=l$.&+def%20fixe(f%2Cu0%2CN%2Ceps)%3A%0A%20%20%23%20local%20j%2Cu1%0A%20%20u0%3Du0*1.0%20%0A%20%20for%20j%20in%20range(N)%3A%0A%20%20%20%20u1%3Df(u0)%0A%20%20%20%20if%20abs(u1-u0)%3Ceps*abs(u0)%3A%0A%20%20%20%20%20%20return%20u1%2Cj%0A%20%20%20%20u0%3Du1%0A%20%20return%20%22Pas%20de%20convergence%22&+fixe(cos%2C0%2C100%2C1e-6)%3B%0Afixe(cos%2C0%2C100%2C1e-8)%3B%0Afixe(cos%2C0%2C100%2C1e-10)&+///La%20convergence%20est%20lin%C3%A9aire,%20il%20faut%20%C3%A0%20peu%20pr%C3%A8s%20le%20m%C3%AAme%20nombre%20d'it%C3%A9rations%20pour%20gagner%20une%20d%C3%A9cimale.%0aLa%20m%C3%A9thode%20de%20%3Cstrong%3eNewton%3C/strong%3e%20permet%20de%20r%C3%A9soudre%20$f(x)=0$%20en%20doublant%20le%20nombre%20de%20d%C3%A9cimales%20%C3%A0%20chaque%20it%C3%A9ration%20%3Cstrong%3esi%3C/strong%3e%20on%20est%20assez%20proche%20de%20la%20solution.%0aOn%20utilise%20la%20suite%20r%C3%A9currente%20$u[n+1]=u[n]-f(u[n])/f'(u[n])$,%20g%C3%A9om%C3%A9triquement%20c'est%20l'abscisse%20du%20point%20o%C3%B9%20la%20tangente%20au%20graphe%20de%20$f$%20en%20$x=u[n]$%20rencontre%20l'axe%20des%20$x$.&+gl_x%3D-1..2%3B%0Agl_y%3D-1..1.5%3B%0Af(x)%3A%3Dcos(x)-x%3B%0AG%3A%3Dplot(f(x)%2Cx%2C-1%2C2%2C%0A%20%20display%3Depaisseur_ligne_2)%3B%0AI0%3A%3Dpoint(0)%3B%0Avecteur(0%2Cpoint(0%2Cf(0)))%3B%0AT0%3A%3Dtangent(G%2C0%2C%0A%20%20display%3Dred%2Bhidden_name)%3B%0AI1%3A%3Dinter_unique(T0%2Cdroite(y%3D0))%3B%0Au1%3A%3Dabscisse(I1)%3B%0Avecteur(I1%2Cpoint(u1%2Cf(u1)))%3B%0AT1%3A%3Dtangent(G%2Cu1%2C%0A%20%20display%3Dmagenta%2Bhidden_name)%3B%0AI2%3A%3Dinter_unique(T1%2Cdroite(y%3D0))%3B%0A%2F%2Fu2%3A%3Dabscisse(I0)%3B%0A&+def%20Newton(f%2Cu0%2CN%2Ceps)%3A%0A%20%20%23%20local%20j%2Cu1%2Cx%0A%20%20%23%20en%20Python%20pur%2C%0A%20%20%23%20il%20faudrait%20utiliser%20%0A%20%20%23%20une%20valeur%20approchee%20de%20la%20d%C3%A9riv%C3%A9e%0A%20%20purge(x)%0A%20%20u0%3Du0*1.0%0A%20%20for%20j%20in%20range(N)%3A%0A%20%20%20%20u1%3Du0-f(u0)%2Ffunction_diff(f)(u0)%0A%20%20%20%20if%20abs(u1-u0)%3Ceps*abs(u0)%3A%0A%20%20%20%20%20%20return%20u1%2Cj%0A%20%20%20%20u0%3Du1%0A%20%20return%20%22Pas%20de%20convergence%22&+def%20f(x)%3A%0A%20%20return%20cos(x)-x&+Newton(f%2C0%2C100%2C1e-3)%3B%0ANewton(f%2C0%2C100%2C1e-6)%3B%0ANewton(f%2C0%2C100%2C1e-12)&+///Remarques:%20%0a*%20on%20observe%20le%20doublement%20du%20nombre%20de%20d%C3%A9cimales%20%C3%A0%20chaque%20it%C3%A9ration%0a*%20il%20faudrait%20stocker%20la%20d%C3%A9riv%C3%A9e%20de%20$f$%20dans%20une%20variable%20locale%20pour%20ne%20pas%20la%20recalculer%20%C3%A0%20chaque%20it%C3%A9ration%0a*%20on%20peut%20d%C3%A9finir%20Newton%20en%20utilisant%20la%20fonction%20fixe%20ci-dessus,%20voir%20ci-dessous%0a*%20il%20existe%20d'autres%20m%C3%A9thodes%20it%C3%A9ratives,%20par%20exemple%20la%20m%C3%A9thode%20de%20la%20s%C3%A9cante&+Newton(f%2Cu0%2CN%2Ceps)%3A%3D%0Afixe(id-f%2Ff'%2Cu0%2CN%2Ceps)&+///%3Cstrong%3eM%C3%A9thode%20de%20la%20puissance%3C/strong%3e%0aElle%20permet%20de%20trouver%20la%20plus%20grande%20valeur%20propre%20en%20module%20d'une%20matrice.%20L'id%C3%A9e%20est%20d'it%C3%A9rer%20$v[n+1]=A*v[n]$%20avec%20un%20vecteur%20$v[0]$%20al%C3%A9atoire,%20dans%20la%20base%20propre%20de%20$A$%20les%20coordonn%C3%A9es%20sont%20des%20suites%20g%C3%A9om%C3%A9triques%20de%20raisons%20les%20valeurs%20propres,%20donc%20la%20coordonn%C3%A9e%20correspondant%20%C3%A0%20la%20valeur%20propre%20de%20module%20maximal%20va%20dominer.&+def%20pui(A%2CN%2Ceps)%3A%0A%20%20%23%20local%20v0%2Cv1%2Cl%2Cj%2Cn%0A%20%20n%3Dsize(A)%0A%20%20v0%3Dranv(n%2Cuniformd%2C-1%2C1)%0A%20%20v0%3Dnormalize(v0)%0A%20%20for%20j%20in%20range(N)%3A%0A%20%20%20%20v1%3DA*v0%0A%20%20%20%20l%3Ddot(v0%2Cv1)%0A%20%20%20%20if%20l2norm(v1-l*v0)%3Ceps%3A%0A%20%20%20%20%20%20return(v0%2Cl%2Cj)%0A%20%20%20%20v0%3Dnormalize(v1)%0A%20%20return%20%22Pas%20de%20convergence%2C%20essayez%20avec%20A%2Bi*identity(A)%22&+a%3A%3Dranm(3%2C3)%3B%0AA%3A%3Da%2Btran(a)%3B%0A&+pui(A%2C1000%2C1e-6)%3B%0Apui(A%2C1000%2C1e-8)%3B%0Apui(A%2C1000%2C1e-10)%0A&+///La%20convergence%20est%20lin%C3%A9aire.%0aSi%20on%20a%20un%20couple%20de%20valeurs%20propres%20conjugu%C3%A9s%20de%20module%20maximal,%20il%20faut%20briser%20la%20sym%C3%A9trie%20par%20exemple%20en%20translatant%20de%20$i$%20dans%20la%20complexe.&+a%3A%3D%5B%5B-11%2C-69%2C-60%5D%2C%0A%20%20%5B84%2C-71%2C-88%5D%2C%0A%20%20%5B33%2C72%2C1%5D%5D%2F100.%3B%0A&+pui(a%2C1000%2C1e-6)%3B%0Apui(a%2Bi%2C1000%2C1e-6)&+///Si%20on%20connait%20une%20valeur%20approch%C3%A9e%20$lambda$%20d'une%20valeur%20propre,%20on%20peut%20acc%C3%A9l%C3%A9rer%20la%20convergence%20en%20it%C3%A9rant%20sur%20$(A-lambda*I)^(-1)$%20(on%20peut%20%C3%A9viter%20le%20calcul%20explicite%20de%20l'inverse%20en%20utilisant%20la%20d%C3%A9composition%20LU).&+pui((a%2B0.27)%5E-1%2C1000%2C1e-6)&"
                                target="_blank"><em>Python</em></a>
                        </li>
                        <li><a name="exemplescas"> Polyn&ocirc;me en une variable, Horner et Taylor</a>
                            <a href="#exec&python=0&+///M%C3%A9thode%20de%20Horner%20pour%20%C3%A9valuer%20un%20polyn%C3%B4me%20en%20un%20point&+fonction%20Horner(p%2Ca)%0A%20%20%2F%2F%20p%20liste%20des%20coefficients%20par%20ordre%20decroissant%0A%20%20%2F%2F%20renvoie%20p%20evalue%20en%20a%0A%20%20local%20c%2Cr%3B%0A%20%20r%3A%3D0%3B%0A%20%20pour%20c%20in%20p%20faire%0A%20%20%20%20r%3A%3Dr*a%2Bc%3B%0A%20%20fpour%3B%0A%20%20return%20r%3B%0Affonction%3A%3B&+Horner(%5B1%2C2%2C3%5D%2C4)%3B%20%0Ahorner(%5B1%2C2%2C3%5D%2C4)&+///On%20modifie%20le%20programme%20pr%C3%A9c%C3%A9dent%20pour%20renvoyer%20le%20quotient%20de%20$p$%20par%20$x-a$.%0aNotez%20que%20%3Ctt%3eq.append%3C/tt%3e%20modifie%20en%20place%20la%20liste%20$q$,%20il%20faut%20donc%20l'initialiser%20en%20faisant%20une%20copie%20de%20la%20liste%20vide.&+fonction%20Horner2(p%2Ca)%0A%20%20local%20c%2Cr%2Cq%3B%0A%20%20r%3A%3D0%3B%20q%3A%3Dcopy(%5B%5D)%3B%0A%20%20pour%20c%20in%20p%20faire%0A%20%20%20%20r%3A%3Dr*a%2Bc%3B%0A%20%20%20%20q.append(r)%3B%0A%20%20fpour%3B%0A%20%20q%3A%3Dq%5B0..-2%5D%3B%0A%20%20return%20q%2Cr%3B%0Affonction%3A%3B&+Horner2(%5B1%2C2%2C3%5D%2C4)&+///Et%20on%20l'appelle%20pour%20faire%20un%20changement%20d'origine,%20on%20exprime%20$P(X)$%20en%20fonction%20des%20$(X-a)^k$&+fonction%20Taylor(p%2Ca)%0A%20%20local%20q%2Cj%2Cn%3B%0A%20%20q%3A%3Dp%3B%0A%20%20n%3A%3Ddegree(p)%3B%0A%20%20pour%20j%20de%200%20jusque%20n%20faire%0A%20%20%20%20p%2Cq%5Bj%5D%3A%3DHorner2(p%2Ca)%3B%0A%20%20fpour%3B%0A%20%20return%20reverse(q)%3B%0Afpour%3A%3B&+Taylor(%5B1%2C2%2C3%5D%2C4)%3B%0Aptayl(%5B1%2C2%2C3%5D%2C4)&"
                               target="_blank">Xcas</a>,
                            <a
                                href="#exec&python=0&+///M%C3%A9thode%20de%20Horner%20pour%20%C3%A9valuer%20un%20polyn%C3%B4me%20en%20un%20point.%0aN.B.:%20Cette%20session%20fonctionne%20sans%20changement%20en%20Python%20pur.&+def%20Horner(p%2Ca)%3A%0A%20%20%23%20p%20liste%20des%20coefficients%20par%20ordre%20d%C3%A9croissant%0A%20%20%23%20renvoie%20p%20%C3%A9valu%C3%A9%20en%20a%0A%20%20%23%20local%20c%2Cr%0A%20%20r%3D0%0A%20%20for%20c%20in%20p%3A%0A%20%20%20%20r%3Dr*a%2Bc%0A%20%20return%20r&+Horner(%5B1%2C2%2C3%5D%2C4)%3B%20%0Ahorner(%5B1%2C2%2C3%5D%2C4)&+///On%20modifie%20le%20programme%20pr%C3%A9c%C3%A9dent%20pour%20renvoyer%20le%20quotient%20de%20$p$%20par%20$x-a$.%0aNotez%20que%20%3Ctt%3eq.append%3C/tt%3e%20modifie%20en%20place%20la%20liste%20$q$,%20il%20faut%20donc%20l'initialiser%20en%20faisant%20une%20copie%20de%20la%20liste%20vide.&+def%20Horner2(p%2Ca)%3A%0A%20%20%23%20local%20c%2Cr%2Cq%0A%20%20r%3D0%20%0A%20%20q%3D%5B%5D%0A%20%20for%20c%20in%20p%3A%0A%20%20%20%20r%3Dr*a%2Bc%0A%20%20%20%20q.append(r)%0A%20%20q%3Dq%5B0%3A-1%5D%0A%20%20return%20q%2Cr&+Horner2(%5B1%2C2%2C3%5D%2C4)&+///Et%20on%20l'appelle%20pour%20faire%20un%20changement%20d'origine,%20on%20exprime%20$P(X)$%20en%20fonction%20des%20$(X-a)^k$&+def%20Taylor(p%2Ca)%3A%0A%20%20%23%20local%20q%2Cj%2Cn%0A%20%20q%3Dp%0A%20%20n%3Dlen(p)%0A%20%20for%20j%20in%20range(n)%3A%0A%20%20%20%20p%2Cq%5Bj%5D%3DHorner2(p%2Ca)%0A%20%20q.reverse()%0A%20%20return%20q&+Taylor(%5B1%2C2%2C3%5D%2C4)%3B%0Aptayl(%5B1%2C2%2C3%5D%2C4)&"
                                target="_blank"><strong>Python</strong></a>
                        </li>
                        <li> Interpolation polynomiale
                            <a href="#exec&python=0&+///Interpolation%20de%20$ln(x^2+1)$%20en%2011%20points%20%C3%A9quidistribu%C3%A9s%20sur%20$[0,1]$.&+f(x)%3A%3Dln(x%5E2%2B1)%3B%20n%3A%3D10%3B%20%0AX%3A%3Devalf(seq(j%2Fn%2Cj%2C0%2Cn))%3B%20%0AY%3A%3Dmap(X%2Cf)%3B&+P%3A%3Dinterp(X%2CY)%3B%0A&+plot(%5Bf(x)%2CP%5D%2Cx%3D-1..2%2Ccolor%3D%5Bred%2Cblue%5D)&+plot(1e7*abs(f(x)-P)%2Cx%3D0..1)&+///Ph%C3%A9nom%C3%A8ne%20de%20Runge,%20ajouter%20des%20points%20%C3%A9quidistribu%C3%A9s%20peut%20s'av%C3%A9rer%20n%C3%A9faste.%0aIci%20on%20prend%20$n+1$%20points%20sur%20[-1,1]%20avec%20$n=20$.&+f(x)%3A%3D1%2F(1%2B25x%5E2)%3B%20n%3A%3D20%3B%20%0AX%3A%3Dseq(2*j%2Fn-1.0%2Cj%2C0%2Cn)%3A%3B&+gl_y%3D-2..2%3B%0Al%3A%3Dlagrange(X%2Cmap(X%2Cf))%3A%3B%20%0Aplot(%5Bl%2Cf(x)%5D%2Cx%3D-1..1)&+plot(l-f(x)%2Cx%3D-1..1)%0A&+///Ceci%20n'arrive%20pas%20avec%20les%20points%20de%20Tchebyshev.&+T%3A%3Dseq(cos((j%2B0.5)*pi%2F(n%2B1))%2C%0A%20%20j%2C0%2Cn)%3B&+apply(point%2CT)&+l%3A%3Dlagrange(T%2Cmap(T%2Cf))%3A%3B%20%0Aplot(%5Bl%2Cf(x)%5D%2Cx%3D-1..1)&+plot((l-f(x))%2Cx%3D-1..1)&"
                               target="_blank">ph&eacute;nom&egrave;ne de Runge, points de
                            Tchebyshev</a>
                        </li>
                        <li>Int&eacute;gration num&eacute;rique
                            <a
                                href="#exec&python=0&+///M%C3%A9thodes%20d'int%C3%A9grations%20num%C3%A9riques.%20Rectangle,%20trap%C3%A8zes.&+f(x)%3A%3D1%2F(1%2Bx%5E2)&+gl_y%3D0..1%3B%0Aplotarea(f(x)%2Cx%3D0..1%2C10%2C%0A%20%20rectangle_droit)&+Rect(f%2Ca%2Cb%2Cn)%3A%3D(b-a)%2Fn*%0Asum(f(a%2Bj*(b-a)%2Fn)%2Cj%2C1%2Cn)&+Rect(f%2C0%2C1%2C10)&+Rect(f%2C0%2C1.0%2C100)&+evalf(int(f(x)%2Cx%2C0%2C1))&+///On%20observe%20le%20r%C3%A9sultat%20attendu%20pour%20les%20rectangles,%20en%20multipliant%20par%2010%20le%20nombre%20de%20points%20d'%C3%A9valuation,%20on%20gagne%20une%20d%C3%A9cimale.&+plotarea(f(x)%2Cx%3D-1..1%2C4%2Ctrapezoid)&+trap(f%2Ca%2Cb%2Cn)%3A%3D(b-a)%2Fn*%0A(f(a)%2F2%2Bf(b)%2F2%2B%0A%20%20sum(f(a%2Bj*(b-a)%2Fn)%2Cj%2C1%2Cn-1))&+trap(f%2C0%2C1%2C10)&+trap(f%2C0%2C1.0%2C100)&+///Ici%20on%20gagne%202%20d%C3%A9cimales%20au%20lieu%20d'une%20si%20on%20multiplie%20par%2010%20le%20nombre%20de%20subdivisions&+///Les%20rectangles%20sont%20une%20approximation%20par%20un%20polynome%20de%20degr%C3%A9%200%20%C3%A0%20une%20extr%C3%A9mit%C3%A9,%20les%20trap%C3%A8zes%20par%20degr%C3%A9%201%20aux%20deux%20extr%C3%A9mit%C3%A9s,%20on%20peut%20essayer%20par%20degr%C3%A9%202%20aux%202%20extr%C3%A9mit%C3%A9s%20et%20au%20milieu%20d'une%20subdivision.&+///On%20recherche%20les%20coefficients%20de%20la%20formule%20d'int%C3%A9gration%20en%20remplacant%20la%20fonction%20par%20son%20polyn%C3%B4me%20d'interpolation%20(voir%20des%20autres%20m%C3%A9thodes%20plus%20bas).&+int(interp(%5B0%2C1%2F2%2C1%5D%2C%0A%20%20%5By0%2Cy1%2Cy2%5D)%2Cx%2C0%2C1)&+fonction%20Simpson(f%2Ca%2Cb%2Cn)%0A%20%20%2F%2F%20voir%20ci-dessous%20en%20syntaxe%20Python%0A%20%20local%20h%2Cres%2Cj%2Cx%3B%0A%20%20h%3A%3D(b-a)%2Fn%3B%0A%20%20res%3A%3D0%3B%0A%20%20pour%20j%20de%200%20jusque%20n-1%20faire%0A%20%20%20%20x%20%3A%3D%20a%2Bj*h%3B%0A%20%20%20%20res%20%3A%3D%20res%2Bf(x)%2B2*f(x%2Bh%2F2)%3B%0A%20%20fpour%3B%0A%20%20res%20%3A%3D%202*res%2Bf(b)-f(a)%3B%20%2F%2F%20ajuste%20les%20bornes%0A%20%20return%20res*h%2F6%3B%0Affonction%3A%3B&+def%20Simpson(f%2Ca%2Cb%2Cn)%3A%0A%20%20%23%20local%20h%2Cres%2Cj%2Cx%0A%20%20h%3D(b-a)%2Fn%0A%20%20res%3D0%0A%20%20for%20j%20in%20range(n)%3A%0A%20%20%20%20x%20%3D%20a%2Bj*h%0A%20%20%20%20res%20%3D%20res%2Bf(x)%2B2*f(x%2Bh%2F2)%0A%20%20res%20%3D%202*res%2Bf(b)-f(a)%20%23%20ajuste%20les%20bornes%0A%20%20return%20res*h%2F6&+Simpson(f%2C0%2C1%2C10)%3B%0A&+///Plus%20le%20degr%C3%A9%20du%20polyn%C3%B4me%20est%20grand,%20plus%20l'approximation%20semble%20bonne.%20En%20fait%20c'est%20l'ordre%20d'une%20m%C3%A9thode%20qui%20importe,%20c'est-%C3%A0-dire%20le%20monome%20de%20plus%20grand%20degr%C3%A9%20pour%20lequel%20la%20formule%20est%20exacte.%20Bien%20sur,%20l'ordre%20est%20sup%C3%A9rieur%20au%20degr%C3%A9%20si%20on%20interpole.&+trap(x-%3Ex%2C0%2C1%2C1)%0A-integrate(x%2Cx%2C0%2C1)&+trap(x-%3Ex%5E2%2C0%2C1%2C1)%0A-integrate(x%5E2%2Cx%2C0%2C1)&+Simpson(x-%3Ex%5E2%2C0%2C1%2C1)-integrate(x%5E2%2Cx%2C0%2C1)&+Simpson(x-%3Ex%5E3%2C0%2C1%2C1)-integrate(x%5E3%2Cx%2C0%2C1)&+Simpson(x-%3Ex%5E4%2C0%2C1%2C1)-integrate(x%5E4%2Cx%2C0%2C1)&+///Pour%20Simpson,%20on%20s'attendait%20%C3%A0%20un%20ordre%202%20mais%20en%20fait%20c'est%203%20pour%20des%20raisons%20de%20sym%C3%A9trie%20(on%20peut%20faire%20la%20m%C3%AAme%20observation%20pour%20le%20point%20milieu%20qui%20est%20d'ordre%201%20au%20lieu%20de%200).%20On%20gagnera%20donc%20environ%204%20d%C3%A9cimales%20en%20multipliant%20par%2010%20le%20nombre%20de%20subdivisions.&+Simpson(cos%2C0%2C1.0%2C10)-sin(1)%0A&+Simpson(cos%2C0%2C1.0%2C100)-sin(1)&+///Les%20quadratures%20de%20Gauss%20sont%20des%20m%C3%A9thodes%20qui%20optimisent%20la%20position%20des%20points%20d'interpolation%20sur%20une%20subdivision%20pour%20obtenir%20l'ordre%20le%20plus%20grand%20possible.%20On%20montre%20qu'avec%20$n$%20points,%20l'ordre%20optimal%20est%20$2n-1$,%20atteint%20pour%20les%20racines%20du%20$n$-i%C3%A8me%20polyn%C3%B4me%20de%20Legendre.&+n%3A%3D3%3B%20l%3A%3Dlegendre(n)%3B%20r%3A%3Dsolve(l)&+I(f)%3A%3Dsum(w%5Bj%5D*f(r%5Bj%5D)%2C%0A%20%20j%2C0%2Csize(r)-1)&+///On%20peut%20trouver%20les%20poids%20de%20deux%20mani%C3%A8res,%20en%20int%C3%A9grant%20le%20polyn%C3%B4me%20qui%20s'annule%20en%20toutes%20les%20noeuds%20sauf%20un,%20ou%20en%20r%C3%A9solvant%20un%20syst%C3%A8me%20lin%C3%A9aire.&+normal(int(product(%0A%20%20x-r%5Bj%5D%2Cj%2C1%2Csize(r)-1)%2Cx%2C-1%2C1)%2F%0A%20%20product(r%5B0%5D-r%5Bj%5D%2Cj%2C1%2Csize(r)-1))&+W%3A%3Dsolve(%0A%20%20%5BI(1)-int(1%2Cx%2C-1%2C1)%2C%0A%20%20I(x-%3Ex)-int(x%2Cx%2C-1%2C1)%2C%0A%20%20I(x-%3Ex%5E2)-int(x%5E2%2Cx%2C-1%2C1)%5D%2C%0A%5Bw%5B0%5D%2Cw%5B1%5D%2Cw%5B2%5D%5D)%0A&+normal(I(x-%3Ex%5E3)(w%3DW%5B0%5D))%0A-int(x%5E3%2Cx%2C-1%2C1)&+normal(I(x-%3Ex%5E4)(w%3DW%5B0%5D))%0A-int(x%5E4%2Cx%2C-1%2C1)&+normal(I(x-%3Ex%5E5)(w%3DW%5B0%5D))%0A-int(x%5E5%2Cx%2C-1%2C1)&+normal(I(x-%3Ex%5E6)(w%3DW%5B0%5D))%0A-int(x%5E6%2Cx%2C-1%2C1)&"
                                target="_blank">
                            <em>rectangles, trap&egrave;zes, Simpson, ordre, Mont&eacute;-Carlo</em></a>
                        </li>
                        <li>
                            R&eacute;solution approch&eacute;e d'&eacute;quations
                            diff&eacute;rentielles ordinaires:
                            <a
                                href="#exec&python=0&+///M%C3%A9thode%20d'Euler%20pour%20approcher%20la%20solution%20d'une%20%C3%A9quation%20diff%C3%A9rentielle%20$y'=f(t,y)$&+fonction%20Euler(f%2Ct0%2Ct1%2Cy0%2CN)%0A%20%20local%20j%2Ch%2Ct%2Cy%3B%0A%20%20h%3A%3D(t1-t0)%2FN%3B%0A%20%20y%3A%3Devalf(y0)%3B%0A%20%20pour%20j%20de%200%20jusque%20N-1%20faire%0A%20%20%20%20t%3A%3Dt0%2Bj*h%3B%0A%20%20%20%20y%20%2B%3D%20f(t%2Cy)*h%3B%0A%20%20fpour%3B%0A%20%20return%20y%3B%0Affonction%3A%3B&+f(t%2Cy)%3A%3Dy&+///On%20v%C3%A9rifie%20avec%20$y'=y$%20dont%20la%20solution%20est%20$y=C*exp(t)*&+Euler(f%2C0%2C1%2C1%2C10)&+Euler(f%2C0%2C1%2C1%2C100)&+///Passons%20%C3%A0%20une%20%C3%A9quation%20dont%20on%20ne%20connait%20pas%20la%20solution%20g%C3%A9n%C3%A9rale,%20$y'=sin(t*y)$&+f(t%2Cy)%3A%3Dsin(t*y)&+gl_x%3D-0.5..1.5%3B%0Agl_y%3D0..2%3B%0Aplotfield(f(t%2Cy)%2C%0A%20%20%5Bt%3D-0.5..1.5%2Cy%3D0..2%5D%2C%0A%20%20xstep%3D0.2%2Cystep%3D0.2)%3B%0Aplotode(f(t%2Cy)%2C%0A%20%20%5Bt%3D-0.5..1.5%2Cy%5D%2C%0A%20%20%5B0%2C1%5D%2Ccolor%3Dmagenta)&+Euler(f%2C0%2C1%2C1%2C10)&+Euler(f%2C0%2C1%2C1%2C100)&+///La%20m%C3%A9thode%20du%20point%20milieu%20est%20l'analogue%20de%20l'int%C3%A9gration%20par%20la%20m%C3%A9thode%20du%20point%20milieu,%20mais%20on%20ne%20connait%20pas%20le%20$y$%20du%20point%20milieu,%20on%20l'approche%20par%20Euler.&+fonction%20Milieu(f%2Ct0%2Ct1%2Cy0%2CN)%0A%20%20local%20j%2Ch%2Ct%2Cy%2Cym%3B%0A%20%20h%3A%3D(t1-t0)%2FN%3B%0A%20%20y%3A%3Devalf(y0)%3B%0A%20%20pour%20j%20de%200%20jusque%20N-1%20faire%0A%20%20%20%20t%3A%3Dt0%2Bj*h%3B%0A%20%20%20%20ym%20%3A%3D%20y%2Bf(t%2Cy)*h%2F2%3B%0A%20%20%20%20y%20%2B%3D%20f(t%2Bh%2F2%2Cym)*h%3B%0A%20%20fpour%3B%0A%20%20return%20y%3B%0Affonction%3A%3B&+Milieu(f%2C0%2C1%2C1%2C10)&+odesolve(f(t%2Cy)%2C%5Bt%2Cy%5D%2C%5B0%2C1%5D%2C1)&+///Les%20m%C3%A9thodes%20de%20Runge-Kutta%20g%C3%A9n%C3%A9ralisent%20cela.%20Par%20exemple%20RK4%20est%20l'analogue%20de%20la%20m%C3%A9thode%20de%20Simpson%20en%20int%C3%A9gration,%20et%20utilise%20deux%20m%C3%A9thodes%20pour%20approcher%20le%20point%20milieu.&+fonction%20RK4(f%2Ct0%2Ct1%2Cy0%2CN)%0A%20%20local%20j%2Ch%2Ct%2Cy%2Cy1%2Cy2%2Cy3%3B%0A%20%20h%3A%3D(t1-t0)%2FN%3B%0A%20%20y%3A%3Devalf(y0)%3B%0A%20%20pour%20j%20de%200%20jusque%20N-1%20faire%0A%20%20%20%20t%3A%3Dt0%2Bj*h%3B%0A%20%20%20%20y1%20%3A%3D%20y%2Bf(t%2Cy)*h%2F2%3B%20%2F%2F%201er%20point%20milieu%0A%20%20%20%20y2%20%3A%3D%20y%2Bf(t%2Bh%2F2%2Cy1)*h%2F2%3B%20%2F%2F%202eme%20point%20milieu%0A%20%20%20%20y3%20%3A%3D%20y%2Bh*f(t%2Bh%2F2%2Cy2)%3B%20%2F%2F%201ere%20approx.%20a%20droite%0A%20%20%20%20y%20%2B%3D%20h%2F6*(f(t%2Cy)%2B2*f(t%2Bh%2F2%2Cy1)%2B2*f(t%2Bh%2F2%2Cy2)%2Bf(t%2Bh%2Cy3))%3B%0A%20%20fpour%3B%0A%20%20return%20y%3B%0Affonction%3A%3B&+RK4(f%2C0%2C1%2C1%2C100)&+RK4((t%2Cy)-%3Ey%2C0%2C1%2C1%2C100)%3B%20%0Aexp(1.0)&"
                                target="_blank">Xcas
                            </a>,
                            <a
                                href="#exec&python=0&+///M%C3%A9thode%20d'Euler%20pour%20approcher%20la%20solution%20d'une%20%C3%A9quation%20diff%C3%A9rentielle%20$y'=f(t,y)$&+def%20Euler(f%2Ct0%2Ct1%2Cy0%2CN)%3A%0A%20%20%23%20local%20j%2Ch%2Ct%2Cy%0A%20%20h%3D(t1-t0)%2F(N*1.0)%0A%20%20y%3Dy0%0A%20%20for%20j%20in%20range(N)%3A%20%0A%20%20%20%20t%20%3D%20t0%2Bj*h%0A%20%20%20%20y%20%2B%3D%20f(t%2Cy)*h%0A%20%20return%20y&+def%20f(t%2Cy)%3A%0A%20%20return%20y&+///On%20v%C3%A9rifie%20avec%20$y'=y$%20dont%20la%20solution%20est%20$y=C*exp(t)*&+Euler(f%2C0%2C1%2C1%2C10)&+Euler(f%2C0%2C1%2C1%2C100)&+///Passons%20%C3%A0%20une%20%C3%A9quation%20dont%20on%20ne%20connait%20pas%20la%20solution%20g%C3%A9n%C3%A9rale,%20$y'=sin(t*y)$&+def%20f(t%2Cy)%3A%0A%20%20return%20sin(t*y)&+gl_x%3D-0.5..1.5%3B%0Agl_y%3D0..2%3B%0Aplotfield(f(t%2Cy)%2C%0A%20%20%5Bt%3D-0.5..1.5%2Cy%3D0..2%5D%2C%0A%20%20xstep%3D0.2%2Cystep%3D0.2)%3B%0Aplotode(f(t%2Cy)%2C%0A%20%20%5Bt%3D-0.5..1.5%2Cy%5D%2C%0A%20%20%5B0%2C1%5D%2Ccolor%3Dmagenta)&+Euler(f%2C0%2C1%2C1%2C10)&+Euler(f%2C0%2C1%2C1%2C100)&+///La%20m%C3%A9thode%20du%20point%20milieu%20est%20l'analogue%20de%20l'int%C3%A9gration%20par%20la%20m%C3%A9thode%20du%20point%20milieu,%20mais%20on%20ne%20connait%20pas%20le%20$y$%20du%20point%20milieu,%20on%20l'approche%20par%20Euler.&+def%20Milieu(f%2Ct0%2Ct1%2Cy0%2CN)%3A%0A%20%20%23%20local%20j%2Ch%2Ct%2Cy%2Cym%0A%20%20h%3D(t1-t0)%2F(N*1.0)%0A%20%20y%3Dy0%0A%20%20for%20j%20in%20range(N)%3A%20%0A%20%20%20%20t%20%3D%20t0%2Bj*h%0A%20%20%20%20ym%20%3D%20y%2Bf(t%2Cy)*h%2F2%0A%20%20%20%20y%20%2B%3D%20f(t%2Bh%2F2%2Cym)*h%0A%20%20return%20y&+Milieu(f%2C0%2C1%2C1%2C10)&+odesolve(f(t%2Cy)%2C%5Bt%2Cy%5D%2C%5B0%2C1%5D%2C1)&+///Les%20m%C3%A9thodes%20de%20Runge-Kutta%20g%C3%A9n%C3%A9ralisent%20cela.%20Par%20exemple%20RK4%20est%20l'analogue%20de%20la%20m%C3%A9thode%20de%20Simpson%20en%20int%C3%A9gration,%20et%20utilise%20deux%20m%C3%A9thodes%20pour%20approcher%20le%20point%20milieu.&+def%20RK4(f%2Ct0%2Ct1%2Cy0%2CN)%3A%0A%20%20%23%20local%20j%2Ch%2Ct%2Cy%2Cy1%2Cy2%2Cy3%0A%20%20h%3D(t1-t0)%2F(N*1.0)%0A%20%20y%3Dy0%0A%20%20for%20j%20in%20range(N)%3A%0A%20%20%20%20t%20%3D%20t0%2Bj*h%0A%20%20%20%20y1%20%3D%20y%2Bf(t%2Cy)*h%2F2%20%23%201er%20point%20milieu%0A%20%20%20%20y2%20%3D%20y%2Bf(t%2Bh%2F2%2Cy1)*h%2F2%20%23%202eme%20point%20milieu%0A%20%20%20%20y3%20%3D%20y%2Bh*f(t%2Bh%2F2%2Cy2)%20%23%201ere%20approx.%20a%20droite%0A%20%20%20%20y%20%2B%3D%20h%2F6*(f(t%2Cy)%2B2*f(t%2Bh%2F2%2Cy1)%2B2*f(t%2Bh%2F2%2Cy2)%2Bf(t%2Bh%2Cy3))%0A%20%20return%20y&+RK4(f%2C0%2C1%2C1%2C100)&+RK4(lambda%20t%2Cy%3Ay%2C0%2C1%2C1%2C100)%3B%20%0Aexp(1.0)&"
                                target="_blank"><strong>Python</strong>
                            </a>
                        </li>
                        <li> PGCD de polyn&ocirc;mes, d'Euclide au sous-r&eacute;sultant:
                            <a href="#exec&python=0&+///Le%20PGCD%20de%20polyn%C3%B4mes%20en%20une%20variable%20%C3%A0%20coefficients%20entiers&+a%3A%3D(x-1)%5E8*(x%5E2%2B2)%3B%0Ab%3A%3D(x-1)*(x%5E2%2B2)%5E4&+fonction%20Euclide(a%2Cb)%0A%20%20tantque%20b!%3D0%20faire%0A%20%20%20%20print(b)%3B%0A%20%20%20%20a%2Cb%3A%3Db%2Crem(a%2Cb)%3B%0A%20%20ftantque%3B%0A%20%20return%20a%3B%0Affunction%3A%3B&+Euclide(a%2Cb)&+///Les%20coefficients%20sont%20rationnels%20donc%20les%20calculs%20plus%20couteux%20d'autant%20plus%20que%20la%20taille%20des%20num%C3%A9rateurs%20et%20d%C3%A9nominateurs%20augmente%20rapidement%20dans%20l'algorithme%20d'Euclide.%0aOn%20peut%20travailler%20dans%20Z%20au%20lieu%20de%20Q%20avec%20la%20pseudo-division&+fonction%20Euclide1(a%2Cb)%0A%20%20si%20degree(a)%3Cdegree(b)%20alors%20return%20Euclide1(b%2Ca)%3B%20fsi%3B%0A%20%20tantque%20b!%3D0%20faire%0A%20%20%20%20print(b)%3B%0A%20%20%20%20a%2Cb%3A%3Db%2Crem(lcoeff(b)%5E(degree(a)-degree(b)%2B1)*a%2Cb)%3B%0A%20%20ftantque%3B%0A%20%20return%20a%3B%0Affunction%3A%3B&+Euclide1(a%2Cb)&+///Mais%20le%20probl%C3%A8me%20de%20la%20taille%20des%20coefficients%20demeure.%20%0aOn%20peut%20remplacer%20$b$%20par%20sa%20partie%20primitive.&+fonction%20Euclide2(a%2Cb)%0A%20%20si%20degree(a)%3Cdegree(b)%20alors%20return%20Euclide2(b%2Ca)%3B%20fsi%3B%0A%20%20tantque%20b!%3D0%20faire%0A%20%20%20%20b%3A%3Dprimpart(b)%3B%0A%20%20%20%20print(b)%3B%0A%20%20%20%20a%2Cb%3A%3Db%2Crem(lcoeff(b)%5E(degree(a)-degree(b)%2B1)*a%2Cb)%3B%0A%20%20ftantque%3B%0A%20%20return%20a%3B%0Affunction%3A%3B&+Euclide2(a%2Cb)&+///C'est%20mieux,%20mais%20calculer%20le%20PGCD%20des%20coefficients%20de%20$b$%20%C3%A0%20chaque%20%C3%A9tape%20est%20co%C3%BBteux.%0aL'algorithme%20du%20sous-r%C3%A9sultant%20calcule%20%C3%A0%20la%20place%20un%20diviseur%20%C3%A0%20priori.%20Ce%20coefficient%20n'est%20pas%20optimal,%20mais%20presque,%20et%20il%20se%20calcule%20facilement.&+fonction%20Euclide3(a%2Cb)%0A%20%20local%20g%2Ch%2Cq%3B%0A%20%20si%20degree(a)%3Cdegree(b)%20alors%20return%20Euclide3(b%2Ca)%3B%20fsi%3B%0A%20%20g%3A%3D1%3B%20h%3A%3D1%3B%20%0A%20%20tantque%20b!%3D0%20faire%0A%20%20%20%20d%3A%3Ddegree(a)-degree(b)%3B%0A%20%20%20%20q%3A%3Dlcoeff(b)%3B%0A%20%20%20%20a%2Cb%3A%3Db%2Crem(q%5E(d%2B1)*a%2Cb)%3B%0A%20%20%20%20b%3A%3Dquo(b%2Cg*h%5Ed)%3B%0A%20%20%20%20g%3A%3Dq%3B%20h%3A%3Dq%5Ed%2Fh%5E(d-1)%3B%0A%20%20ftantque%3B%0A%20%20return%20a%3B%0Affunction%3A%3B&+Euclide3(a%2Cb)&+///Les%20m%C3%A9thodes%20modulaires%20sont%20plus%20efficaces.%20Si%20les%20polyn%C3%B4mes%20sont%20premiers%20entre%20eux,%20ils%20le%20sont%20toujours%20modulo%20n'importe%20quel%20nombre%20premier%20ne%20divisant%20pas%20leur%20r%C3%A9sultant,%20on%20s'en%20rend%20vite%20compte.%0aSinon%20on%20reconstruit%20le%20PGCD%20modulo%20un%20ou%20plusieurs%20nombres%20premiers%20qui%20donnent%20le%20degr%C3%A9%20minimal%20et%20on%20teste%20la%20divisibilit%C3%A9%20par%20les%20polyn%C3%B4mes%20$a$%20et%20$b$.&+Euclide(a%20mod%2011%2Cb%2B1%20mod%2011)&+g%3A%3DEuclide(a%20mod%2011%2Cb%20mod%2011)&+normal(g%2Flcoeff(g))%20mod%200&"
                               target="_blank">Xcas</a>,
                            <a
                                href="#exec&python=1&+///Le%20PGCD%20de%20polyn%C3%B4mes%20en%20une%20variable%20%C3%A0%20coefficients%20entiers&+a%3A%3D(x-1)%5E8*(x%5E2%2B2)%3B%0Ab%3A%3D(x-1)*(x%5E2%2B2)%5E4&+def%20Euclide(a%2Cb)%3A%0A%20%20while%20b!%3D0%3A%0A%20%20%20%20print(b)%0A%20%20%20%20a%2Cb%3Db%2Crem(a%2Cb)%0A%20%20return%20a&+Euclide(a%2Cb)&+///Les%20coefficients%20sont%20rationnels%20donc%20les%20calculs%20plus%20couteux%20d'autant%20plus%20que%20la%20taille%20des%20num%C3%A9rateurs%20et%20d%C3%A9nominateurs%20augmente%20rapidement%20dans%20l'algorithme%20d'Euclide.%0aOn%20peut%20travailler%20dans%20Z%20au%20lieu%20de%20Q%20avec%20la%20pseudo-division&+def%20Euclide1(a%2Cb)%3A%0A%20%20if%20degree(a)%3Cdegree(b)%3A%0A%20%20%20%20return%20Euclide1(b%2Ca)%0A%20%20while%20b!%3D0%3A%0A%20%20%20%20print(b)%0A%20%20%20%20a%2Cb%3Db%2Crem(lcoeff(b)%5E(degree(a)-degree(b)%2B1)*a%2Cb)%0A%20%20return%20a&+Euclide1(a%2Cb)&+///Mais%20le%20probl%C3%A8me%20de%20la%20taille%20des%20coefficients%20reste.%20%0aOn%20peut%20remplacer%20$b$%20par%20sa%20partie%20primitive.&+def%20Euclide2(a%2Cb)%3A%0A%20%20if%20degree(a)%3Cdegree(b)%3A%0A%20%20%20%20return%20Euclide2(b%2Ca)%0A%20%20while%20b!%3D0%3A%0A%20%20%20%20b%3A%3Dprimpart(b)%0A%20%20%20%20print(b)%0A%20%20%20%20a%2Cb%3Db%2Crem(lcoeff(b)%5E(degree(a)-degree(b)%2B1)*a%2Cb)%0A%20%20return%20a&+Euclide2(a%2Cb)&+///C'est%20mieux,%20mais%20calculer%20le%20PGCD%20des%20coefficients%20de%20$b$%20%C3%A0%20chaque%20%C3%A9tape%20est%20co%C3%BBteux.%0aL'algorithme%20du%20sous-r%C3%A9sultant%20calcule%20%C3%A0%20la%20place%20un%20diviseur%20%C3%A0%20priori.%20Ce%20coefficient%20n'est%20pas%20optimal,%20mais%20presque,%20et%20il%20se%20calcule%20facilement.&+def%20Euclide3(a%2Cb)%3A%0A%20%20%23%20local%20g%2Ch%2Cq%0A%20%20if%20degree(a)%3Cdegree(b)%3A%0A%20%20%20%20return%20Euclide3(b%2Ca)%0A%20%20g%3D1%20%0A%20%20h%3D1%20%0A%20%20while%20b!%3D0%3A%0A%20%20%20%20d%3Ddegree(a)-degree(b)%0A%20%20%20%20q%3Dlcoeff(b)%0A%20%20%20%20a%2Cb%3Db%2Crem(q%5E(d%2B1)*a%2Cb)%0A%20%20%20%20b%3Dquo(b%2C(g*h%5Ed))%0A%20%20%20%20g%3Dq%20%0A%20%20%20%20h%3Dq%5Ed%2Fh%5E(d-1)%0A%20%20return%20a&+Euclide3(a%2Cb)&+///Les%20m%C3%A9thodes%20modulaires%20sont%20plus%20efficaces.%20Si%20les%20polyn%C3%B4mes%20sont%20premiers%20entre%20eux,%20ils%20le%20sont%20toujours%20modulo%20n'importe%20quel%20nombre%20premier%20ne%20divisant%20pas%20leur%20r%C3%A9sultant,%20on%20s'en%20rend%20vite%20compte.%0aSinon%20on%20reconstruit%20le%20PGCD%20modulo%20un%20ou%20plusieurs%20nombres%20premiers%20qui%20donnent%20le%20degr%C3%A9%20minimal%20et%20on%20teste%20la%20divisibilit%C3%A9%20par%20les%20polyn%C3%B4mes%20$a$%20et%20$b$.&+Euclide(a%20mod%2011%2Cb%2B1%20mod%2011)&+g%3A%3DEuclide(a%20mod%2011%2Cb%20mod%2011)&+normal(g%2Flcoeff(g))%20mod%200&"
                                target="_blank">
                            Python</a>
                        </li>
			<li>Agr&eacute;gation:
			<a
			href="#exec&python=0&+///Intersection%20de%20courbes%20alg%C3%A9briques%20et%20r%C3%A9sultant.%0A%3Cstrong%3EPremier%20exemple%3A%3C%2Fstrong%3E%20cercle%20inter%20ellipse.&+c%3A%3Dcircle(0%2C2)%3B%20a%3A%3Dequation(c)%3B%20%0Ab%3A%3D4x%5E2%2B3x*y%2By%5E2-8%3B%20E%3A%3Dimplicitplot(b)%3B%0A&+a%3A%3Dequal2diff(equation(c))%3B%20%0Ar%3A%3Dresultant(a%2Cb%2Cx)%3B%0Asy%3A%3Dsolve(r%2Cy)%3B%20sx%3A%3Dsy%3A%3B&+j%3A%3D0%3B%20Y%3A%3Dsy%5Bj%5D%3B%0A%5BX%5D%3A%3Dsolve(gcd(a(y%3DY)%2Cb(y%3DY)))%3B&+c%3BE%3BM%3A%3Dpoint(X%2CY)&+///%3Cstrong%3EDeuxi%C3%A8me%20exemple%3A%3C%2Fstrong%3E%20une%20hyperbole%20avec%20une%20cubique.%0AOn%20s'attend%20%C3%A0%20au%20plus%206%20points%20d'intersection%2C%20il%20y%20en%20a%20en%20fait%205%2C%20on%20va%20essayer%20de%20comprendre%20pourquoi.&+hyp%3A%3Dx*y-4%3B%20cub%3A%3Dy%5E2-(x-3)*(x%5E2-16)%3B%0Agl_x%3D-5..8%3B%20gl_y%3A%3D-10..10%3B%0AH%3A%3Dimplicitplot(hyp%2C%5Bx%2Cy%5D%2Ccolor%3Dred)%3B%20%0Ac%3A%3Dimplicitplot(cub%2C%5Bx%3D-5..8%2Cy%3D-10..10%5D)&+r%3A%3Dresultant(hyp%2Ccub)&+solve(r%3D0%2Cy)&+hypt%3A%3Dx*y-4*t%5E2%3B%20cubt%3A%3Dy%5E2*t-(x-3t)*(x%5E2-16t%5E2)&+resultant(hypt%2Ccubt%2Cx)&+///Le%20r%C3%A9sultant%20homog%C3%A9n%C3%A9is%C3%A9%20en%20%24x%24%20est%20bien%20de%20degr%C3%A9%206%2C%20mais%20il%20n'a%20pas%20de%20terme%20en%20%24y%5E6%24.%20Il%20y%20a%20donc%20un%20point%20d'intersection%20%C3%A0%20l'infini%2C%20de%20la%20forme%20%24(x%2Cy%2C0)%24.%20En%20remplacant%20%24t%24%20par%200%20dans%20les%20%C3%A9quations%20de%20d%C3%A9part%2C%20on%20a%20%24x*y%3D0%24%20et%20%24x%5E3%3D0%24%2C%20donc%20le%20point%20%C3%A0%20l'infini%20est%20%24(0%2Cy%2C0)%24.%20L'intersection%20se%20fait%20en%20quelque%20sorte%20entre%20l'asymptote%20verticale%20de%20l'hyperbole%20et%20la%20branche%20parabolique%20de%20direction%20asymptotique%20verticale%20de%20la%20cubique.%0ALe%20r%C3%A9sultant%20homog%C3%A9n%C3%A9is%C3%A9%20en%20%24y%24%20est%20de%20degr%C3%A9%205%2C%20car%20le%20degr%C3%A9%20partiel%20en%20%24y%24%20est%201%20de%20moins%20que%20le%20deg%C3%A9%20total%20pour%20les%202%20polynomes%20(alors%20qu'en%20%24x%24%20le%20degr%C3%A9%20partiel%20est%20%C3%A9gal%20au%20degr%C3%A9%20total%20pour%20la%20cubique).&+///%3Cstrong%3ETroisi%C3%A8me%20exemple%3C%2Fstrong%3E%20avec%20des%20points%20complexes%20et%20de%20la%20multiplicit%C3%A9&+cer%3A%3D(x-2)%5E2%2By%5E2-4%3B%20%0Agl_x%3D-10..16%3B%20gl_y%3A%3D-8..8%3B%20%0AC%3A%3Dimplicitplot(cer%2C%5Bx%2Cy%5D%2Ccolor%3Dred)%3B%20%0Ac%3A%3Dimplicitplot(cub%2C%5Bx%3D-5..8%2Cy%3D-10..10%5D)&+rx%3A%3Dfactor(resultant(cer%2Ccub%2Cx))&+ry%3A%3Dfactor(resultant(cer%2Ccub%2Cy))&+csolve(rx%3D0%2Cy)&+csolve(ry%3D0%2Cx)&+///Ici%2C%20on%20perd%20un%20point%20d'intersection%20parce%20que%20le%20cercle%20est%20tangent%20%C3%A0%20la%20cubique%20pour%20%24x%3D4%2Cy%3D0%24%20(point%20d'intersection%20de%20multiplicit%C3%A9%202).%0AOn%20perd%20deux%20autres%20points%20d'intersection%20dans%20le%20complexe.&"
target="_blank">R&eacute;sultant et intersections</a>
			<li>
                            Agr&eacute;gation:
                            <a
                                href="#exec&python=0&+///%3Ch1%3eLocalisation%20des%20racines%20d'un%20polynome%3C/h1%3e%0aElles%20sont%20de%20module%20inf%C3%A9rieur%20%C3%A0%20%3Ctt%3e1+linfnorm(P)/lcoeff(P)%3C/tt%3e&+P%3A%3Drandpoly(10)&+1%2Babs(linfnorm(coeffs(P))%2Flcoeff(P))&+///%3Cstrong%3eTh%C3%A9or%C3%A8me%3C/strong%3e%20Soit%20$P$%20un%20polyn%C3%B4me%20de%20degr%C3%A9%20$n$.%20Il%20existe%20au%20moins%20une%20racine%20dans%20la%20boule%20de%20centre%20$z$%20et%20de%20rayon%20$n*abs(P(z)/P'(z))$&+///On%20utilise%20le%20solveur%20num%C3%A9rique%20qui%20cherche%20les%20valeurs%20propres%20de%20la%20matrice%20companion%20de%20$P$&+l%3A%3Dproot(P)&+z%3A%3Dexact(l%5B3%5D)&+///On%20passe%20en%20calcul%20exact,%20sinon%20le%20calcul%20de%20$P(z)$%20en%20flottants%20donnerait%20n'importe%20quoi%20puisqu'on%20s'approche%20de%200.&+rho%3A%3Ddegree(P)*%0Aabs(evalf(P(x%3Dz)%2FP'(x%3Dz)))%3B&+///On%20a%20donc%20localis%C3%A9%20une%20racine%20%C3%A0%20proximit%C3%A9%20de%20$z$.%20On%20peut%20am%C3%A9liorer%20la%20pr%C3%A9cision%20en%20faisant%20une%20it%C3%A9ration%20de%20Newton.&+z%3A%3Dz-P(x%3Dz)%2FP'(x%3Dz)%3A%3B&+///Enlever%20le%20:%20ci-dessus%20pour%20afficher%20$z$.%20La%20fraction%20fait%20intervenir%20des%20entiers%20trop%20grands%20par%20rapport%20%C3%A0%20la%20pr%C3%A9cision%20attendue,%20on%20va%20tronquer.&+z%3A%3Dround(10%5E25*z)%2F10%5E25&+rho%3A%3Ddegree(P)*abs(evalf(P(x%3Dz)%2FP'(x%3Dz)))%3B&+///Pour%20les%20racines%20r%C3%A9elles%20d'un%20polyn%C3%B4me%20%C3%A0%20coefficients%20r%C3%A9els,%20il%20existe%20d'autres%20r%C3%A9sultats:%20ainsi%20les%20suites%20de%20Sturm%20donnent%20le%20nombre%20de%20racines%20dans%20un%20intervalle,%20par%20exemple%20ci-dessous%20[-10,10].%0aLa%20suite%20de%20Sturm%20d'un%20polyn%C3%B4me%20$P$%20est%20obtenue%20en%20appliquant%20l'algoritme%20d'Euclide%20%C3%A0%20$P$%20et%20$P'$%20mais%20en%20prenant%20l'oppos%C3%A9%20du%20reste%20de%20la%20division%20%C3%A0%20chaque%20%C3%A9tape.%20Le%20nombre%20de%20racines%20sur%20$[a,b]$%20est%20alors%20la%20diff%C3%A9rence%20$sigma(a)-sigma(b)$%20o%C3%B9%20$sigma(c)$%20est%20le%20nombre%20de%20changements%20de%20signes%20dans%20la%20suite%20des%20oppos%C3%A9s%20de%20restes%20%C3%A9valu%C3%A9s%20en%20$c$.&+sturmab(P%2Cx%2C-10%2C10)&+gl_x%3D-10..10%3B%20%0Apoint(l)&+///On%20peut%20faire%20une%20%22dichotomie%22%20en%20utilisant%20Sturm%20jusqu'%C3%A0%20n'avoir%20qu'une%20seule%20racine%20dans%20un%20intervalle%20puis%20passer%20%C3%A0%20une%20dichotomie%20normale.%0aExercice:%20%C3%A9crire%20une%20fonction%20Sturm%20calculant%20la%20suite%20des%20oppos%C3%A9s%20des%20restes%20d'Euclide%20pour%20$P$%20et%20$P'$.%20%C3%89crire%20une%20fonction%20comptant%20les%20changements%20de%20signes%20dans%20une%20suite%20(commencer%20par%20enlever%20les%200%20avec%20remove).%20Puis%20faire%20une%20Sturm-dichotomie%20jusqu'%C3%A0%20obtenir%20un%20intervalle%20avec%20une%20seule%20racine,%20et%20basculer%20alors%20sur%20la%20dichotomie%20classique.&+///La%20r%C3%A8gle%20des%20signes%20de%20Descartes%20permet%20de%20compter%20les%20racines%20dans%20certains%20cas%20et%20d'obtenir%20des%20intervalles%20d'isolation%20des%20racines.%0aDans%20sa%20forme%20de%20base,%20elle%20dit%20que%20le%20nombre%20de%20racines%20positives%20est%20major%C3%A9%20par%20le%20nombre%20de%20changements%20de%20signes%20dans%20la%20suite%20des%20coefficients%20d'un%20polyn%C3%B4me%20$P$%20avec%20un%20%C3%A9cart%20pair.&+fonction%20descartes(P)%0A%20%20local%20l%2Cres%2Cj%3B%0A%20%20l%3A%3Dcoeffs(P)%3B%0A%20%20l%3A%3Dremove(0%2Cl)%3B%0A%20%20res%3A%3D0%3B%0A%20%20pour%20j%20de%200%20jusque%20dim(l)-2%20faire%0A%20%20%20%20si%20l%5Bj%5D*l%5Bj%2B1%5D%3C0%20alors%20res%2B%2B%3B%20fsi%3B%0A%20%20fpour%3B%0A%20%20return%20res%3B%0Affonction%3A%3B&+def%20descartes(P)%3A%0A%20%20%23%20local%20l%2Cres%2Cj%0A%20%20l%3Dcoeffs(P)%0A%20%20l%3Dremove(0%2Cl)%3B%0A%20%20res%3D0%0A%20%20for%20j%20in%20range(dim(l)-1)%3A%0A%20%20%20%20if%20l%5Bj%5D*l%5Bj%2B1%5D%3C0%3A%0A%20%20%20%20%20%20res%20%2B%3D%201%0A%20%20return%20res%3B&+descartes(x%5E5-x%5E4%2Bx%5E2-1)&+proot(x%5E5-x%5E4%2Bx%5E2-1)&+///Un%20exemple%20pas%20%C3%A0%20pas:%20on%20prend%20une%20majoration%20$M$%20des%20racines%20de%20$P$,%20on%20pose%20$Q=P(x=M*x)$,%20les%20racines%20de%20$P$%20dans%20$[0,M]$%20correspondent%20aux%20racines%20de%20$Q$%20dans%20$[0,1]$.%20Pour%20trouver%20les%20racines%20dans%20$[0,1]$%20avec%20Descartes,%20on%20se%20ram%C3%A8ne%20%C3%A0%20$[1,inf]$%20par%20le%20changement%20de%20variables%20$x=1/x$%20puis%20%C3%A0%20$[0,inf]$%20par%20$x=x+1$.&+P%3A%3D(x-1%2F3)*(x-3)*(x%5E2%2B1)%3B&+M%3A%3Dceil(maxnorm(coeffs(P))%2F%0A%20%20abs(lcoeff(P)))%2B1%3B%0AQ%3A%3DP(x%3DM*x)&+P1%3A%3Dnormal(x%5Edegree(Q)*Q(x%3D1%2Fx))%3B%20%0Adescartes(P1(x%3Dx%2B1))&+///Il%20y%20a%20plus%20qu'une%20racine,%20il%20faut%20couper%20en%20deux&+Q1%3A%3DQ(x%3Dx%2F2)%3B%20%0AP1%3A%3Dnormal(x%5Edegree(Q1)*Q1(x%3D1%2Fx))%3B%20%0Adescartes(P1(x%3Dx%2B1))%20%0A&+///Donc%20il%20y%20a%20une%20racine%20de%20$Q$%20dans%20$[0,1/2]$%20qui%20correspond%20%C3%A0%20une%20racine%20de%20$P$%20dans%20$[0,5/2]$&+Q1%3A%3DQ(x%3D(x%2B1)%2F2)%3B%20%0AP1%3A%3Dnormal(x%5Edegree(Q1)*Q1(x%3D1%2Fx))%3B%20%0Adescartes(P1(x%3Dx%2B1))%20%0A&+///Donc%20il%20y%20a%20une%20racine%20de%20$Q$%20dans%20$[1/2,1]$%20qui%20correspond%20%C3%A0%20une%20racine%20de%20$P$%20dans%20$[5/2,5]$&+///La%20fonction%20qui%20suit%20renvoie%20des%20intervalles%20d'isolation%20des%20racines%20d'un%20polyn%C3%B4me%20dans%20$[0,1]$,%20ces%20racines%20correspondant%20par%20changements%20de%20variables%20%C3%A0%20celles%20du%20polyn%C3%B4me%20de%20d%C3%A9part%20dans%20un%20intervalle%20$[a,b]$.%20%0aSi%20on%20fait%20le%20changement%20de%20variable%20$x=1/x$,%20les%20racines%20v%C3%A9rifient%20$r%3e1$,%20puis%20avec%20le%20changement%20$x=x+1$%20on%20a%20des%20racines%20strictement%20positives,%20on%20peut%20alors%20appliquer%20la%20r%C3%A8gle%20de%20Descartes%20pour%20les%20compter.%20S'il%20y%20a%200%20ou%201%20racine%20positive,%20on%20conclut.%20Sinon%20on%20cherche%20les%20racines%20dans%20$[0,1/2]$%20et%20$[1/2,1]$%20en%20se%20ramenant%20%C3%A0%20$[0,1]$%20par%20le%20changement%20de%20variables%20$x=x/2$%20ou%20$x=(x+1)/2$,%20correspondant%20pour%20le%20polyn%C3%B4me%20de%20d%C3%A9part%20aux%20demi-intervalles%20$[a,m]$%20et%20$[m,b]$%20avec%20$m=(a+b)/2$.%0a&+%23%20en%20syntaxe%20Python%0Adef%20isole01(P%2Ca%2Cb)%3A%0A%20%20%23%20renvoie%20une%20liste%20d'intervalles%20d'isolation%0A%20%20%23%20local%20n%2Cm%2CQ%2CR%2Cres%2Cx%0A%20%20purge(x)%0A%20%20Q%3Dx%5Edegree(P)*subst(P%2Cx%2C1%2Fx)%0A%20%20R%3Dsubst(Q%2Cx%2Cx%2B1)%0A%20%20n%3Ddescartes(R)%0A%20%20if%20n%3D%3D0%3A%20%0A%20%20%20%20return%20%5B%5D%0A%20%20if%20n%3D%3D1%3A%20%0A%20%20%20%20return%20%5B%20a%3Ab%20%5D%0A%20%20Q%3Dnumer(subst(P%2Cx%2Cx%2F2))%0A%20%20R%3Dnumer(subst(P%2Cx%2C(x%2B1)%2F2))%0A%20%20m%3D(a%2Bb)%2F2%0A%20%20if%20subst(P%2Cx%2C1%2F2)%3D%3D0%3A%20%0A%20%20%20%20res%3D%5B(a%2Bb)%2F2%5D%0A%20%20else%3A%20%0A%20%20%20%20res%3D%5B%5D%0A%20%20res%3Dconcat(res%2Cisole01(Q%2Ca%2Cm)%2Cisole01(R%2Cm%2Cb))%0A%20%20return%20res%0A%20%20%0Adef%20isole(P)%3A%0A%20%20%23%20racines%20positives%20de%20P%0A%20%20%23%20local%20l%2CM%2Cx%0A%20%20purge(x)%0A%20%20l%3Dcoeffs(P)%0A%20%20M%3Dceil(maxnorm(l)%2Fabs(l%5B0%5D))%2B1%0A%20%20P%3Dsubst(P%2Cx%2CM*x)%0A%20%20return%20isole01(P%2C0%2CM)&+fonction%20isole01(P%2Ca%2Cb)%0A%20%20%2F%2F%20meme%20programme%20en%20syntaxe%20Xcas%0A%20%20%2F%2F%20renvoie%20une%20liste%20d'intervalles%20d'isolation%0A%20%20local%20n%2Cm%2CQ%2CR%2Cres%3B%0A%20%20global%20x%3B%0A%20%20Q%3A%3Dx%5Edegree(P)*P(x%3D1%2Fx)%3B%0A%20%20R%3A%3DQ(x%3Dx%2B1)%3B%0A%20%20n%3A%3Ddescartes(R)%3B%0A%20%20si%20n%3D0%20alors%20return%20NULL%3B%20fsi%3B%0A%20%20si%20n%3D1%20alors%20return%20%5Ba%2Cb%5D%3B%20fsi%3B%0A%20%20Q%3A%3Dnumer(P(x%3Dx%2F2))%3B%0A%20%20R%3A%3Dnumer(P(x%3D(x%2B1)%2F2))%3B%0A%20%20m%3A%3D(a%2Bb)%2F2%3B%0A%20%20si%20P(x%3D1%2F2)%3D0%20alors%20res%3A%3D(a%2Bb)%2F2%3B%20sinon%20res%3A%3DNULL%3B%20fsi%3B%0A%20%20res%3A%3Dres%2Cisole01(Q%2Ca%2Cm)%2Cisole01(R%2Cm%2Cb)%0A%20%20retourne%20res%3B%0Affonction%3A%3B%0A%0Afonction%20isole(P)%20%2F%2F%20racines%20positives%20de%20P%0A%20%20local%20l%2CM%3B%0A%20%20l%3A%3Dcoeffs(P)%3B%0A%20%20M%3A%3Dceil(maxnorm(l)%2Fabs(l%5B0%5D))%2B1%3B%0A%20%20P%3A%3DP(x%3DM*x)%3B%0A%20%20return%20isole01(P%2C0%2CM)%3B%0Affonction%3A%3B%0A&+isole(P)%0A&+///Fonctions%20de%20Xcas:%20proot,%20realroot,%20complexroot,%20sturm,%20sturmab&"
                                target="_blank">
                            Localisation des racines d'un polyn&ocirc;me
                            </a>
                        </li>
                        <li> Alg&egrave;bre lin&eacute;aire sur un corps fini (Agr&eacute;gration)
                            <a
                                href="#exec&python=0&+///%3Ch1%3eAlg%C3%A8bre%20lin%C3%A9aire%20exacte%20sur%20un%20corps%20fini.%3C/h1%3e%0aD%C3%A9composition%20LU,%20application%20au%20calcul%20d'un%20inverse%20de%20matrice.&+n%3A%3D5%3B%20p%3A%3D17%3B%20a%3A%3Drandmatrix(n%2Cn%2C1%20mod%20p)&+p%2Cl%2Cu%3A%3Dlu(a)&+fonction%20moninv(a)%0A%20%20local%20b%2Cc%2Cj%2Cp%2Cl%2Cu%3B%0A%20%20n%3A%3Dsize(a)%3B%0A%20%20b%3A%3Da%3B%20%0A%20%20c%3A%3Didentity(n)%3B%0A%20%20p%2Cl%2Cu%3A%3Dlu(a)%3B%0A%20%20pour%20j%20de%200%20jusque%20n-1%20faire%20%0A%20%20%20%20b%5Bj%5D%3A%3Dlinsolve(p%2Cl%2Cu%2Cc%5Bj%5D)%3B%0A%20%20fpour%3B%0A%20%20return%20tran(b)%3B%0Affonction%3A%3B&+moninv(a)%3B%20inv(a)&+///Calcul%20du%20polynome%20caract%C3%A9ristique%20en%20$O(n^4)$%20par%20interpolation.%20Si%20le%20corps%20fini%20$ZZ$/$p*ZZ$%20n'a%20pas%20assez%20d'%C3%A9l%C3%A9ments%20pour%20interpoler,%20on%20construit%20une%20extension.&+fonction%20polcar(a)%0A%20%20local%20j%2Cp%2Cn%2CI%2CN%2Cg%2Cgj%2CX%2CY%3B%0A%20%20si%20type(a%5B0%2C0%5D)!%3D15%20alors%20%0A%20%20%20%20return%20%22il%20faut%20une%20matrice%20%C3%A0%20coefficients%20dans%20Z%2FpZ%22%3B%20%0A%20%20fsi%3B%0A%20%20p%3A%3Da%5B0%2C0%2C2%5D%3B%20%2F%2F%20caracteristique%20du%20corps%0A%20%20si%20!isprime(p)%20alors%20%0A%20%20%20%20return%20p%2B%22%20n'est%20pas%20premier%22%3B%20%0A%20%20fsi%3B%0A%20%20n%3A%3Dsize(a)%3B%0A%20%20I%3A%3Didentity(n)%3B%0A%20%20X%3A%3D%5B%5D%3B%20Y%3A%3D%5B%5D%3B%0A%20%20si%20n%3Cp%20alors%0A%20%20%20%20pour%20j%20de%200%20jusque%20n%20faire%0A%20%20%20%20%20%20X%5Bj%5D%3A%3Dj%3B%0A%20%20%20%20%20%20Y%5Bj%5D%3A%3Ddet(j*I-a)%3B%0A%20%20%20%20fpour%3B%0A%20%20%20%20return%20normal(interp(X%2CY))%3B%0A%20%20fsi%3B%0A%20%20%2F%2F%20construction%20d'une%20extension%20de%20Z%2FpZ%0A%20%20N%3A%3Dceil(log(n%2B1)%2Flog(p))%3B%0A%20%20purge(g)%3B%0A%20%20GF(p%2CN%2Cg)%3B%0A%20%20%2F%2F%20interpolation%20en%20les%20g%5Ej%0A%20%20gj%3A%3D1%3B%0A%20%20pour%20j%20de%200%20jusque%20n%20faire%0A%20%20%20%20X%5Bj%5D%3A%3Dgj%3B%0A%20%20%20%20Y%5Bj%5D%3A%3Ddet(gj*I-a)%3B%0A%20%20%20%20gj%3A%3Dg*gj%3B%0A%20%20fpour%3B%0A%20%20return%20normal(interp(X%2CY))%3B%0Affonction%3A%3B&+polcar(a)%3B%20charpoly(a%2Cx)&+a%3A%3Drandmatrix(8%2C8%2C1%20mod%205)&+polcar(a)%3B%20charpoly(a%2Cx)&+///Un%20autre%20algorithme%20en%20$O(n^4)$%20(Fadeev-Souriau-Leverrier),%20la%20caract%C3%A9ristique%20du%20corps%20doit%20%C3%AAtre%20plus%20grande%20que%20la%20taille%20de%20la%20matrice.%20Il%20calcule%20aussi%20la%20comatrice%20de%20$x*identity(n)-A$.&+fonction%20Faddeev(A)%0A%20%20%2F%2F%20renvoie%20la%20liste%20des%20matrices%20B%20et%20le%20polynome%20P%0A%20%20local%20Aj%2CAAj%2CId%2Ccoef%2Cn%2Cpcara%2Clmat%2Cj%3B%0A%20%20n%3A%3Dncols(A)%3B%0A%20%20Id%3A%3Didn(n)%3B%20%20%20%20%20%2F%2F%20matrice%20identite%0A%20%20Aj%3A%3DId%3B%0A%20%20lmat%3A%3D%5B%5D%3B%20%20%20%20%20%20%2F%2F%20B%20initialise%20a%20liste%20vide%0A%20%20pcara%3A%3D%5B1%5D%3B%20%20%20%20%2F%2F%20coefficient%20de%20plus%20grand%20degre%20de%20P%0A%20%20pour%20j%20de%201%20jusque%20n%20faire%0A%20%20%20%20lmat%3A%3Dappend(lmat%2CAj)%3B%20%20%2F%2F%20rajoute%20Aj%20a%20la%20liste%20de%20matrices%0A%20%20%20%20AAj%3A%3DAj*A%3B%0A%20%20%20%20coef%3A%3D-trace(AAj)%2Fj%3B%20%20%20%20%0A%20%20%20%20pcara%3A%3Dappend(pcara%2Ccoef)%3B%20%20%2F%2F%20rajoute%20coef%20au%20pol.%20caract.%0A%20%20%20%20Aj%3A%3DAAj%2Bcoef*Id%3B%0A%20%20fpour%3B%0A%20%20return%20lmat%2Cpcara%3B%20%20%20%20%20%20%20%20%2F%2F%20resultat%0Affonction%3A%3B&+n%3A%3D4%3B%20p%3A%3D101%3B%20%0Aa%3A%3Drandmatrix(n%2Cn%2C1%20mod%20p)%3B%20%0AB%2CP%3A%3DFaddeev(a)%3B%0Acharpoly(a)&+///Xcas%20utilise%20l'algorithme%20de%20Danilevsky%20en%20$O(n^3)$%20(on%20se%20ram%C3%A8ne%20%C3%A0%20une%20matrice%20companion).%0aOn%20peut%20aussi%20calculer%20le%20polynome%20minimal%20par%20rapport%20%C3%A0%20un%20vecteur%20al%C3%A9atoire%20(recherche%20de%20relations%20entre%20$v$,%20$A*v$,%20...,%20$A^n*v$%20ou%20calcul%20de%20la%20matrice%20$P$%20de%20colonnes%20$v,A*v$,...,$A^(n-1)*v$,%20si%20elle%20est%20inversible%20alors%20$P^(-1)*A*P$%20est%20une%20matrice%20companion)%20ce%20qui%20donne%20g%C3%A9n%C3%A9riquement%20le%20polynome%20caract%C3%A9ristique.%20Ce%20calcul%20peut%20%C3%AAtre%20acc%C3%A9l%C3%A9r%C3%A9%20pour%20$n$%20grand,%20on%20calcule%20$v,Av$%20on%20multiplie%20par%20$A^2$%20(calcul%C3%A9%20avec%20Strassen%20par%20exemple),%20on%20a%20$v,Av,A^2*v,A^3*v$,%20on%20multiplie%20par%20$(A^2)^2$%20etc.,%20soit%20un%20cout%20en%20$O(n^(ln(7)/ln(2))*ln(n))$%0aOn%20peut%20enfin%20calculer%20les%20traces%20des%20puissances%20de%20$A$%20de%20mani%C3%A8re%20efficace%20et%20retrouver%20le%20polynome%20caract%C3%A9ristique%20par%20les%20identit%C3%A9s%20de%20Newton,%20mais%20l'algorithme%20de%20Faddeev%20calcule%20aussi%20la%20matrice%20$B$%20qui%20peut%20servir%20%C3%A0%20d%C3%A9terminer%20les%20vecteurs%20propres.&+normal((x*idn(a)-a)*horner(B%2Cx))&+l%3A%3Dsolve(charpoly(a%2Cx))&+///Si%20%3Ctt%3el%3C/tt%3e%20est%20non%20vide,%20on%20peut%20trouver%20la%20base%20propre%20avec%20$B$%20(sinon%20il%20faudrait%20construire%20une%20extension%20du%20corps%20fini).%0aAstuce:%20cliquez%20sur%20Exec%20en%20bas%20pour%20g%C3%A9n%C3%A9rer%20une%20autre%20matrice%20si%20%3Ctt%3el%3C/tt%3e%20est%20vide.&+horner(P%2Cl%5B0%5D)&+horner(B%2Cl%5B0%5D)%3B%0A(l%5B0%5D*identity(a)-a)*horner(B%2Cl%5B0%5D)&+///Si%20la%20valeur%20propre%20est%20simple,%20les%20vecteurs%20colonnes%20sont%20colin%C3%A9aires%20modulo%20101,%20l'espace%20propre%20est%20bien%20de%20dimension%201.&+///Conversion%20avec%20les%20identit%C3%A9s%20de%20Newton.%20On%20note%20$P[j]$%20la%20somme%20des%20$x[k]^j$%20et%20$(-1)^j*E[j]$%20le%20$j$-i%C3%A8me%20coefficient%20du%20polynome%20ayant%20les%20$x[k]$%20comme%20racines.%0a$E[1]=P[1]$%0a$2*E[2]=E[1]*P[1]-P[2]$%0a$3*E[3]=E[2]*P[1]-E[1]*P[2]+P[3]$%0a$4*E[4]=E[3]*P[1]-E[2]*P[2]+E[1]*P[3]-P[4]$&+fonction%20newton_E(P)%0A%20%20%2F%2F%20calcule%20les%20E%20en%20fonction%20des%20P%0A%20%20local%20E%2Cn%2Cj%2Ck%2Cs%3B%0A%20%20E%3A%3DP%3B%0A%20%20E%5B0%5D%3A%3D1%3B%0A%20%20n%3A%3Dsize(P)-1%3B%20%0A%20%20%2F%2F%20nombre%20de%20racines%0A%20%20pour%20j%20de%202%20jusque%20n%20faire%0A%20%20%20%20s%3A%3D0%3B%0A%20%20%20%20pour%20k%20de%201%20jusque%20j%20faire%0A%20%20%20%20%20%20s%20%2B%3D%20(-1)%5E(k-1)*P%5Bk%5D*E%5Bj-k%5D%0A%20%20%20%20fpour%3B%0A%20%20%20%20E%5Bj%5D%3A%3Ds%2Fj%3B%0A%20%20fpour%3B%0A%20%20return%20E%3B%0Affonction%3A%3B&+///Exemple%20polynome%20ayant%20comme%20racines%201,%202,%20...,%20$n$.&+n%3A%3D4%3B%20P%3A%3Dseq(sum(j%5Ek%2Cj%2C1%2Cn)%2Ck%2C0%2Cn)&+E%3A%3Dnewton_E(P)&+pcoeff(seq(k%2Ck%2C1%2Cn))&+seq((-1)%5Ej*E%5Bj%5D%2Cj%2C0%2Csize(E)-1)&+///Calcul%20du%20polynome%20caract%C3%A9ristique%20avec%20les%20identit%C3%A9s%20de%20Newton&+P%3A%3Dseq(trace(a%5Ek)%2Ck%2C0%2Csize(a))&+newton_E(P)&+charpoly(a)&+fonction%20polnew(a)%0A%20%20local%20n%3B%0A%20%20n%3A%3Dsize(a)%3B%0A%20%20P%3A%3D%5Bn%5D%3B%0A%20%20aj%3A%3Da%3B%0A%20%20pour%20j%20de%201%20jusque%20n%20faire%0A%20%20%20%20P.append(trace(aj))%3B%0A%20%20%20%20aj%3A%3Daj*a%3B%0A%20%20fpour%3B%0A%20%20E%3A%3Dnewton_E(P)%3B%0A%20%20return%20seq((-1)%5Ej*E%5Bj%5D%2Cj%2C0%2Csize(E)-1)%3B%0Affonction%3A%3B&+polnew(a)&+a%3A%3Drandmatrix(6%2C6)%3A%3B%20%0Apolnew(a)%3B%20charpoly(a)&"
                                target="_blank">Xcas
                            </a>,
                            <a
                                href="#exec&python=0&+///%3Ch1%3eAlg%C3%A8bre%20lin%C3%A9aire%20exacte%20sur%20un%20corps%20fini.%3C/h1%3e%0aD%C3%A9composition%20LU,%20application%20au%20calcul%20d'un%20inverse%20de%20matrice.&+n%3A%3D5%3B%20p%3A%3D17%3B%20a%3A%3Drandmatrix(n%2Cn%2C1%20mod%20p)&+p%2Cl%2Cu%3A%3Dlu(a)&+def%20moninv(a)%3A%0A%20%20%23%20local%20b%2Cc%2Cj%2Cp%2Cl%2Cu%0A%20%20n%3Dsize(a)%0A%20%20b%3Da%20%0A%20%20c%3Didentity(n)%0A%20%20p%2Cl%2Cu%3Dlu(a)%0A%20%20for%20j%20in%20range(n)%3A%20%0A%20%20%20%20b%5Bj%5D%3Dlinsolve(p%2Cl%2Cu%2Cc%5Bj%5D)%0A%20%20return%20tran(b)&+moninv(a)%3B%20inv(a)&+///Calcul%20du%20polynome%20caract%C3%A9ristique%20en%20$O(n^4)$%20par%20interpolation.%20Si%20le%20corps%20fini%20$ZZ$/$p*ZZ$%20n'a%20pas%20assez%20d'%C3%A9l%C3%A9ments%20pour%20interpoler,%20on%20construit%20une%20extension.&+def%20polcar(a)%3A%0A%20%20%23%20local%20j%2Cp%2Cn%2CI%2CN%2Cg%2Cgj%2CX%2CY%3B%0A%20%20if%20type(a%5B0%2C0%5D)!%3D15%3A%20%0A%20%20%20%20return%20%22il%20faut%20une%20matrice%20%C3%A0%20coefficients%20dans%20Z%2FpZ%22%20%0A%20%20p%3Da%5B0%2C0%2C2%5D%20%23%20caracteristique%20du%20corps%0A%20%20if%20!isprime(p)%3A%20%0A%20%20%20%20return%20p%2B%22%20n'est%20pas%20premier%22%20%0A%20%20n%3Dsize(a)%0A%20%20I%3Didentity(n)%0A%20%20X%3D%5B%5D%0A%20%20Y%3D%5B%5D%0A%20%20if%20n%3Cp%3A%0A%20%20%20%20for%20j%20in%20range(n%2B1)%3A%0A%20%20%20%20%20%20X%5Bj%5D%3Dj%0A%20%20%20%20%20%20Y%5Bj%5D%3Ddet(j*I-a)%0A%20%20%20%20return%20normal(interp(X%2CY))%0A%20%20%23%20construction%20d'une%20extension%20de%20Z%2FpZ%0A%20%20N%3Dceil(log(n%2B1)%2Flog(p))%0A%20%20purge(g)%0A%20%20GF(p%2CN%2Cg)%0A%20%20%23%20interpolation%20en%20les%20g%5Ej%0A%20%20gj%3D1%0A%20%20for%20j%20in%20range(n%2B1)%3A%0A%20%20%20%20X%5Bj%5D%3Dgj%0A%20%20%20%20Y%5Bj%5D%3Ddet(gj*I-a)%0A%20%20%20%20gj%3Dg*gj%0A%20%20return%20normal(interp(X%2CY))&+polcar(a)%3B%20charpoly(a%2Cx)&+a%3A%3Drandmatrix(8%2C8%2C1%20mod%205)&+polcar(a)%3B%20charpoly(a%2Cx)&+///Un%20autre%20algorithme%20en%20$O(n^4)$%20(Fadeev-Souriau-Leverrier),%20la%20caract%C3%A9ristique%20du%20corps%20doit%20%C3%AAtre%20plus%20grande%20que%20la%20taille%20de%20la%20matrice.%20Il%20calcule%20aussi%20la%20comatrice%20de%20$x*identity(n)-A$.&+def%20Faddeev(A)%3A%20%0A%20%20%23%20local%20Aj%2CAAj%2CId%2Ccoef%2Cn%2Cpcara%2Clmat%2Cj%0A%20%20%23%20renvoie%20la%20liste%20des%20matrices%20B%20et%20le%20polynome%20P%0A%20%20n%3Dncols(A)%0A%20%20Id%3Didn(n)%20%20%20%20%20%23%20matrice%20identite%0A%20%20Aj%3DId%0A%20%20lmat%3D%5B%5D%20%20%20%20%20%20%23%20B%20initialise%20a%20liste%20vide%0A%20%20pcara%3D%5B1%5D%20%20%20%20%23%20coefficient%20de%20plus%20grand%20degre%20de%20P%0A%20%20for%20j%20in%20range(1%2Cn%2B1)%3A%0A%20%20%20%20lmat.append(Aj)%20%20%23%20rajoute%20Aj%20a%20la%20liste%20de%20matrices%0A%20%20%20%20AAj%3DAj*A%0A%20%20%20%20coef%3D-trace(AAj)%2Fj%20%20%20%20%0A%20%20%20%20pcara.append(coef)%20%20%23%20rajoute%20coef%20au%20pol.%20caract.%0A%20%20%20%20Aj%3DAAj%2Bcoef*Id%0A%20%20return%20lmat%2Cpcara&+n%3A%3D4%3B%20p%3A%3D101%3B%20%0Aa%3A%3Drandmatrix(n%2Cn%2C1%20mod%20p)%3B%20%0AB%2CP%3A%3DFaddeev(a)%3B%0Acharpoly(a)&+///Xcas%20utilise%20l'algorithme%20de%20Danilevsky%20en%20$O(n^3)$%20(on%20se%20ram%C3%A8ne%20%C3%A0%20une%20matrice%20companion).%0aOn%20peut%20aussi%20calculer%20le%20polynome%20minimal%20par%20rapport%20%C3%A0%20un%20vecteur%20al%C3%A9atoire%20(recherche%20de%20relations%20entre%20$v$,%20$A*v$,%20...,%20$A^n*v$%20ou%20calcul%20de%20la%20matrice%20$P$%20de%20colonnes%20$v,A*v$,...,$A^(n-1)*v$,%20si%20elle%20est%20inversible%20alors%20$P^(-1)*A*P$%20est%20une%20matrice%20companion)%20ce%20qui%20donne%20g%C3%A9n%C3%A9riquement%20le%20polynome%20caract%C3%A9ristique.%20Ce%20calcul%20peut%20%C3%AAtre%20acc%C3%A9l%C3%A9r%C3%A9%20pour%20$n$%20grand,%20on%20calcule%20$v,Av$%20on%20multiplie%20par%20$A^2$%20(calcul%C3%A9%20avec%20Strassen%20par%20exemple),%20on%20a%20$v,Av,A^2*v,A^3*v$,%20on%20multiplie%20par%20$(A^2)^2$%20etc.,%20soit%20un%20cout%20en%20$O(n^(ln(7)/ln(2))*ln(n))$%0aOn%20peut%20enfin%20calculer%20les%20traces%20des%20puissances%20de%20$A$%20de%20mani%C3%A8re%20efficace%20et%20retrouver%20le%20polynome%20caract%C3%A9ristique%20par%20les%20identit%C3%A9s%20de%20Newton,%20mais%20l'algorithme%20de%20Faddeev%20calcule%20aussi%20la%20matrice%20$B$%20qui%20peut%20servir%20%C3%A0%20d%C3%A9terminer%20les%20vecteurs%20propres.&+normal((x*idn(a)-a)*horner(B%2Cx))&+l%3A%3Dsolve(charpoly(a%2Cx))&+///Si%20%3Ctt%3el%3C/tt%3e%20est%20non%20vide,%20on%20peut%20trouver%20la%20base%20propre%20avec%20$B$%20(sinon%20il%20faudrait%20construire%20une%20extension%20du%20corps%20fini).%0aAstuce:%20cliquez%20sur%20Exec%20en%20bas%20pour%20g%C3%A9n%C3%A9rer%20une%20autre%20matrice%20si%20%3Ctt%3el%3C/tt%3e%20est%20vide.&+horner(P%2Cl%5B0%5D)&+horner(B%2Cl%5B0%5D)%3B%0A(l%5B0%5D*identity(a)-a)*horner(B%2Cl%5B0%5D)&+///Si%20la%20valeur%20propre%20est%20simple,%20les%20vecteurs%20colonnes%20sont%20colin%C3%A9aires%20modulo%20101,%20l'espace%20propre%20est%20bien%20de%20dimension%201.&+///Conversion%20avec%20les%20identit%C3%A9s%20de%20Newton.%20On%20note%20$P[j]$%20la%20somme%20des%20$x[k]^j$%20et%20$(-1)^j*E[j]$%20le%20$j$-i%C3%A8me%20coefficient%20du%20polynome%20ayant%20les%20$x[k]$%20comme%20racines.%0a$E[1]=P[1]$%0a$2*E[2]=E[1]*P[1]-P[2]$%0a$3*E[3]=E[2]*P[1]-E[1]*P[2]+P[3]$%0a$4*E[4]=E[3]*P[1]-E[2]*P[2]+E[1]*P[3]-P[4]$&+def%20newton_E(P)%3A%0A%20%20%23%20local%20E%2Cn%2Cj%2Ck%2Cs%0A%20%20%23%20calcule%20les%20E%20en%20fonction%20des%20P%0A%20%20E%3DP%0A%20%20E%5B0%5D%3D1%0A%20%20n%3Dsize(P)-1%20%0A%20%20%23%20nombre%20de%20racines%0A%20%20for%20j%20in%20range(2%2Cn%2B1)%3A%0A%20%20%20%20s%3D0%0A%20%20%20%20for%20k%20in%20range(1%2Cj%2B1)%3A%0A%20%20%20%20%20%20s%20%2B%3D%20(-1)**(k-1)*P%5Bk%5D*E%5Bj-k%5D%0A%20%20%20%20E%5Bj%5D%3Ds%2Fj%0A%20%20return%20E&+///Exemple%20polynome%20ayant%20comme%20racines%201,%202,%20...,%20$n$.&+n%3A%3D4%3B%20P%3A%3Dseq(sum(j%5Ek%2Cj%2C1%2Cn)%2Ck%2C0%2Cn)&+E%3A%3Dnewton_E(P)&+pcoeff(seq(k%2Ck%2C1%2Cn))&+seq((-1)%5Ej*E%5Bj%5D%2Cj%2C0%2Csize(E)-1)&+///Calcul%20du%20polynome%20caract%C3%A9ristique%20avec%20les%20identit%C3%A9s%20de%20Newton&+P%3A%3Dseq(trace(a%5Ek)%2Ck%2C0%2Csize(a))&+newton_E(P)&+charpoly(a)&+def%20polnew(a)%3A%0A%20%20%23%20local%20n%0A%20%20n%3Dsize(a)%0A%20%20P%3D%5Bn%5D%0A%20%20aj%3Da%0A%20%20for%20j%20in%20range(n)%3A%0A%20%20%20%20P.append(trace(aj))%0A%20%20%20%20aj%3Daj*a%0A%20%20E%3Dnewton_E(P)%0A%20%20return%20seq((-1)**j*E%5Bj%5D%2Cj%2C0%2Csize(E)-1)&+polnew(a)&+a%3A%3Drandmatrix(6%2C6)%3A%3B%20%0Apolnew(a)%3B%20charpoly(a)&"
                                target="_blank">Python</a>
                        </li>
                        <li> Bases de Groebner
                            <a
                                href="#exec&python=0&+cyclic6%3A%3D%20%5B2*(x*y*z%2By*z*t%2Bz*t*u%2Bt*u*v%2Bu*v*x%2Bv*x*y)%2C%20%0Ax*y*z*t%2By*z*t*u%2Bz*t*u*v%2Bt*u*v*x%2Bu*v*x*y%2Bv*x*y*z%2C%20%0Ax*y*z*t*u*v-1%2C%20%0Ax%2By%2Bz%2Bt%2Bu%2Bv%2C%20%0Ax*y%2By*z%2Bz*t%2Bt*u%2Bu*v%2Bx*v%2C%20%0Ax*y*z*t*u%2By*z*t*u*v%2Bz*t*u*v*x%2Bt*u*v*x*y%2Bu*v*x*y*z%2Bv*x*y*z*t%5D%3B&+p%3A%3Dprevprime(2%5E24)%3B&+time(G%3A%3D%0A%20%20gbasis(cyclic6%20mod%20p%2C%0A%20%20%20%20indets(cyclic6)))&+size(G)&+G%5B20%5D&+time(H%3A%3D%0A%20%20gbasis(cyclic6%2C%0A%20%20%20%20indets(cyclic6)))&+H%5B20%5D&+normal(1%2F(lcoeff(H%5B20%5D%2Cv)%20mod%20p)%0A%20%20*H%5B20%5D)&+normal(1%2F(lcoeff(G%5B20%5D%2Cv)%20mod%20p)%0A%20%20*G%5B20%5D-1%2F(lcoeff(H%5B20%5D%2Cv)%20mod%20p)%0A%20%20*H%5B20%5D)&"
                                target="_blank">cyclic6</a>.
                            Pour des calculs plus intensifs, activez
			wasm dans les r&eacute;glages
                            et inspirez-vous de
                            <a
                                href="#exec&python=1&+cyclic7%3A%3D%5Bx1%2Bx2%2Bx3%2Bx4%2Bx5%2Bx6%2Bx7%2C%0A%20%20%20%20%20%20%20%20%20%20x1*x2%2Bx1*x7%2Bx2*x3%2Bx3*x4%2Bx4*x5%2Bx5*x6%2Bx6*x7%2C%0A%20%20%20%20%20%20%20%20%20%20x1*x2*x3%2Bx1*x2*x7%2Bx1*x6*x7%2Bx2*x3*x4%2Bx3*x4*x5%2Bx4*x5*x6%2Bx5*x6*x7%2C%0A%20%20%20%20%20%20%20%20%20%20x1*x2*x3*x4%2Bx1*x2*x3*x7%2Bx1*x2*x6*x7%2Bx1*x5*x6*x7%2Bx2*x3*x4*x5%2Bx3*x4*x5*x6%2Bx4*x5*x6*x7%2C%0A%20%20%20%20%20%20%20%20%20%20x1*x2*x3*x4*x5%2Bx1*x2*x3*x4*x7%2Bx1*x2*x3*x6*x7%2Bx1*x2*x5*x6*x7%2Bx1*x4*x5*x6*x7%2Bx2*x3*x4*x5*x6%2Bx3*x4*x5*x6*x7%2C%0A%20%20%20%20%20%20%20%20%20%20x1*x2*x3*x4*x5*x6%2Bx1*x2*x3*x4*x5*x7%2Bx1*x2*x3*x4*x6*x7%2Bx1*x2*x3*x5*x6*x7%2Bx1*x2*x4*x5*x6*x7%2Bx1*x3*x4*x5*x6*x7%2Bx2*x3*x4*x5*x6*x7%2C%0A%20%20%20%20%20%20%20%20%20%20x1*x2*x3*x4*x5*x6*x7-1%5D%3A%3B&+p%3A%3Dprevprime(2%5E24)&+time(G%3A%3Dgbasis(cyclic7%20mod%20p%2Clname(cyclic7)%2Crevlex))%3B&+size(G)&"
target="_blank">cyclic7 modulaire</a>.
Pour avoir des informations pendant le d&eacute;roulement des calculs, tapez la commande
<tt>debug_infolevel:=1</tt> (ou plus) et ouvrez la console du navigateur.
                            Pour des calculs vraiment intensifs, utilisez la version native de Xcas.
                        </li>
                        <li> Produit, quotient de polyn&ocirc;mes &agrave; plusieurs variables
                            (pour navigateur compatible avec web-assembly, par exemple Firefox &geq; 58)
                            <a
                                href="#exec&python=0&+n%3A%3D20%3B&+f%20%3A%3D%20symb2poly((1%20%2B%20x%20%2B%20y%20%2B%20z%2Bt)%5En%2C%5Bx%2Cy%2Cz%2Ct%5D)%3A%3B%0Aq%3A%3Dsymb2poly(x%5E(n-3)%2C%5Bx%2Cy%2Cz%2Ct%5D)%3A%3B%0Asize(f)%3B&+time(p%3A%3Df*(f%2B1))%3B%0Asize(p)%3B&+time(h%3A%3Dquo(p%2Cf%2C2))%3B%0Ah-f%3B&+time(h%2Cr%3A%3Dquorem(p%2Bq%2Cf%2C-1))%3B%0Ah-f%3Bpoly2symb(r%2C%5Bx%2Cy%2Cz%2Ct%5D)%3B&"
                                target="_blank">benchmark de Fateman n=20</a>
                        </li>
                        <li>
                            <a
                                href="#filename=parisseb%40orange.fr%40%20%20session&from=parisseb%40orange.fr&python=0&+///Approx%20linear%20algebra&+n%3A%3D500%3B%20%0Am%3A%3Dranm(n%2Cn%2Cuniformd%2C-1%2C1)%3A%3B%0Atime(q%2Cr%3A%3Dqr(m%2C-1))%3B%0Amaxnorm(m-q*r)%3B&+time(p%2Cq%3A%3Dschur(m))%3B%0Amaxnorm(p*q*trn(p)-m)%0A&+time(p%2Cl%2Cu%3A%3Dlu(m))%3B%0Amaxnorm(l*u-permu2mat(p)*m)&"
                                target="_blank">
                            Approx benchmarks
                            </a>
                        </li>
                        <li>
                            <a
                                href="#exec&python=0&+///Series%20expansion%20benchmark.&+n%3A%3D200%3Bseries(%22t%22)%3B%20%0Au%20%3A%3D%20t%20%2B%20O(t%5En)%3B%20%0Atime(r%3A%3D(u%2F(exp(u)-1))*exp(x*u))%3B&+///Expand%20power%20of%20polynomial%20with%20coefficient%20in%20an%20extension%20of%20$QQ$.&+x%3A%3Drootof(cyclotomic(20))%3B%0Af%3A%3D(3x%5E7%20%2B%20x%5E4%20-%203x%20%2B%201)*y%5E3%20%2B%20(2x%5E6-x%5E5%2B4x%5E4-x%5E3%2Bx%5E2-1)*y%20%2B(-3x%5E7%2B2x%5E6-x%5E5%2B3x%5E3-2x%5E2%2Bx)%3A%3B%0Ap%3A%3Dsymb2poly(f%2Cy%2C%5B%5D)%3A%3B%20time(s%3A%3Dp%5E400)%3B&+///Determinant%20of%20a%20matrix%20of%20size%20$n$%20with%20random%20coefficients%20in%20an%20extension%20of%20$QQ$.&+purge(x)%3Bn%3A%3D40%3B%0Aa%3A%3Drootof(x%5E3%2B3x%2B1)%3B%20%0Am%3A%3Dranm(n%2Cn%2Ca)%3A%3B%20%0Atime(d%3A%3Ddet(m))%3B&+///Determinant%20of%20a%20matrix%20with%20polynomial%20coefficients%20over%20$ZZ$/$p*ZZ$&+p%20%3A%3D%202003*1009%3B%20n%3A%3D40%3B%20%0Af(j%2Ck)%3A%3D%7B%20k%3A%3Drand(6)%3B%20return%20randpoly(x%2Ck)%20mod%20p%3B%20%7D%3B%20%0Am%3A%3Dmatrix(n%2Cn%2Cf)%3A%3B%20%0Atime(det(m))%3B&+///Characteristic%20polynomial%20of%20a%20matrix%20with%20integer%20coefficients.&+n%3A%3D70%3B%20%0Am%3A%3Dranm(n%2Cn%2C-21)%3A%3B%20%0Atime(charpoly(m))%3B&"
                                target="_blank">
                            Exact benchmarks
                            </a>
                        <li>
                            Des programmes graphiques
                            <ul>
                                <li>
                                    Fractale de Mandelbrot
                                    <a
                                        href="#python=0&exec&+///Fractale%20de%20Mandelbrot,%20programme%20qui%20n'utilise%20pas%20la%20sym%C3%A9trie&+fonction%20fra(X%2CY%2CNmax)%0A%20%20local%20x%2Cy%2Cz%2Cc%2Cj%2Cw%2Ch%2Cres1%2Cres2%3B%0A%20%20w%3A%3D2.7%2FX%3B%0A%20%20h%3A%3D-1.87%2FY%3B%0A%20%20res1%3A%3D%5B%5D%3B%20%0A%20%20Y%3A%3DY-1%3B%0A%20%20pour%20y%20de%200%20jusque%20Y%20faire%0A%20%20%20%20c%3A%3D-2.1%2Bi*(h*y%2B0.935)%3B%0A%20%20%20%20pour%20x%20de%200%20jusque%20X-1%20faire%0A%20%20%20%20%20%20z%3A%3D0%3B%0A%20%20%20%20%20%20pour%20j%20de%200%20jusque%20Nmax-1%20faire%0A%20%20%20%20%20%20%20%20if%20abs(z%3A%3Dz%5E2%2Bc)%3E2%20then%20break%3B%20fi%3B%0A%20%20%20%20%20%20fpour%3B%0A%20%20%20%20%20%20res1.append(pixon(x%2Cy%2C126*j%2B2079))%3B%0A%20%20%20%20%20%20c%3A%3Dc%2Bw%3B%0A%20%20%20%20fpour%3B%0A%20%20fpour%3B%0A%20%20return%20res1%3B%0Affonction%3A%3B&+///%20Fractale%20de%20Mandelbrot%20plus%20rapide,%20en%20utilisant%20la%20sym%C3%A9trie&+fonction%20fra1(X%2CY%2CNmax)%0A%20%20local%20x%2Cy%2Cz%2Cc%2Cj%2Cw%2Ch%2Cres1%2Cres2%3B%0A%20%20w%3A%3D2.7%2FX%3B%0A%20%20h%3A%3D-1.87%2FY%3B%0A%20%20res1%3A%3Dmakelist(-ceil(X*Y%2F2)-1)%3B%20%0A%20%20res2%3A%3Dcopy(res1)%3B%0A%20%20Y%3A%3DY-1%3B%0A%20%20pour%20y%20de%200%20jusque%20Y%2F2%20faire%0A%20%20%20%20c%3A%3D-2.1%2Bi*(h*y%2B0.935)%3B%0A%20%20%20%20pour%20x%20de%200%20jusque%20X-1%20faire%0A%20%20%20%20%20%20z%3A%3D0%3B%0A%20%20%20%20%20%20pour%20j%20de%200%20jusque%20Nmax-1%20faire%0A%20%20%20%20%20%20%20%20if%20abs(z%3A%3Dz%5E2%2Bc)%3E2%20then%20break%3B%20fi%3B%0A%20%20%20%20%20%20fpour%3B%0A%20%20%20%20%20%20res1.append(pixon(x%2Cy%2C126*j%2B2079))%3B%0A%20%20%20%20%20%20res2.append(pixon(x%2CY-y%2C126*j%2B2079))%3B%0A%20%20%20%20%20%20c%3A%3Dc%2Bw%3B%0A%20%20%20%20fpour%3B%0A%20%20fpour%3B%0A%20%20return%20res1%2Cres2%3B%0Affonction%3A%3B&+pixon(1)&+fra1(260%2C222%2C10)&"
                                        target="_blank">Xcas</a>,
                                    <a href="#python=1&exec&+///Fractale%20de%20Mandelbrot%20sans%20utiliser%20la%20sym%C3%A9trie&+def%20fra(X%2CY%2CNmax)%3A%0A%20%20local%20x%2Cy%2Cz%2Cc%2Cj%2Cw%2Ch%2Cres1%0A%20%20w%3D2.7%2FX%0A%20%20h%3D-1.87%2FY%0A%20%20res1%3D%5B%5D%0A%20%20res2%3D%5B%5D%0A%20%20for%20y%20in%20range(Y)%3A%0A%20%20%20%20c%20%3D%20-2.1%2Bi*(h*y%2B0.935)%0A%20%20%20%20for%20x%20in%20range(X)%3A%0A%20%20%20%20%20%20z%20%3D%200%0A%20%20%20%20%20%20for%20j%20in%20range(Nmax)%3A%0A%20%20%20%20%20%20%20%20if%20abs(z%3A%3Dz**2%2Bc)%3E2%3A%0A%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20res1.append(pixon(x%2Cy%2C126*j%2B2079))%0A%20%20%20%20%20%20c%20%3D%20c%2Bw%3B%0A%20%20return%20res1&+///%20Fractale%20de%20Mandelbrot%20plus%20rapide,%20en%20utilisant%20la%20sym%C3%A9trie&+def%20fra1(X%2CY%2CNmax)%3A%0A%20%20local%20x%2Cy%2Cz%2Cc%2Cj%2Cw%2Ch%2Cres1%2Cres2%0A%20%20w%3D2.7%2FX%0A%20%20h%3D-1.87%2FY%0A%20%20res1%3Dmakelist(-ceil(X*Y%2F2)-1)%0A%20%20res2%3Dcopy(res1)%0A%20%20Y%3DY-1%0A%20%20for%20y%20in%20range(ceil(Y%2F2)%2B1)%3A%0A%20%20%20%20c%20%3D%20-2.1%2Bi*(h*y%2B0.935)%0A%20%20%20%20for%20x%20in%20range(X)%3A%0A%20%20%20%20%20%20z%20%3D%200%0A%20%20%20%20%20%20for%20j%20in%20range(Nmax)%3A%0A%20%20%20%20%20%20%20%20if%20abs(z%3A%3Dz**2%2Bc)%3E2%3A%0A%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20res1.append(pixon(x%2Cy%2C126*j%2B2079))%0A%20%20%20%20%20%20res2.append(pixon(x%2CY-y%2C126*j%2B2079))%0A%20%20%20%20%20%20c%20%3D%20c%2Bw%3B%0A%20%20return%20res1%2Cres2&+pixon(1)&+fra1(260%2C222%2C10)&"
                                       target="_blank">Python</a>,
                                </li>
                                <li>Julia
                                    <a href="#exec&python=1&+def%20julia(c%2CN%2Cxmin%2Cxmax%2Cymin%2Cymax)%3A%0A%20%20%20%20%23%20local%20x%2Cy%2Cj%2Cz%2Czy%2Cres%2Chx%2Chy%0A%20%20%20%20res%3Dmakelist(-320*222-1)%0A%20%20%20%20hx%3D(xmax-xmin)%2F320.0%0A%20%20%20%20hy%3D(ymax-ymin)%2F222.0%0A%20%20%20%20for%20y%20in%20range(222)%3A%0A%20%20%20%20%20%20%20%20zy%3Dxmin%2Bi*(ymax-y*hy)%0A%20%20%20%20%20%20%20%20for%20x%20in%20range(320)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20z%3Dzy%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20j%20in%20range(N)%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(abs(z%3A%3Dz*z%2Bc)%3E2)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20%20%20%20%20res.append(pixon(x%2Cy%2C126*j%2B2079))%0A%20%20%20%20%20%20%20%20%20%20%20%20zy%2B%3Dhx%0A%20%20%20%20res&+pixon(1)%3B%0Ajulia(.3%2B.5*i%2C20%2C-1%2C1%2C-1%2C1)&"
                                       target="_blank">Python
                                    </a>
                                </li>
                                <li>
                                    Fractale de Newton ou bassins d'attraction des racines d'un polynome
                                    <a href="#python=0&exec&+///Bassins%20d'attraction%20des%20racines%20du%20polynome%20$P$On%20it%C3%A8re%20la%20m%C3%A9thode%20de%20Newton%20$z[n+1]=z[n]-P(z[n])/P'(z[n])$%20et%20on%20regarde%20si%20on%20converge%20vers%20une%20des%20racines%20de%20$P$,%20on%20colorie%20$z[0]$%20en%20fonction%20de%20la%20racine%20et%20de%20la%20vitesse%20de%20convergence.On%20pr%C3%A9sente%20deux%20versions,%20la%20premi%C3%A8re%20utilise%20la%20conjugaison%20complexe%20pour%20acc%C3%A9l%C3%A9rer%20les%20calculs.&+fonction%20f(P%2Cxmin%2Cxmax%2Cymin%2Cymax%2CN%2Cmaxiter)%0A%20%20local%20z0%2Cz%2Czp%2Chx%2Chy%2Cj%2Ck%2Cl%2Cn%2Cr%2Crs%2Cres%3B%0A%20%20P%3A%3Dsymb2poly(P)%3B%0A%20%20res%3A%3Dmakelist(-(N%2B1)%5E2)%3B%0A%20%20r%3A%3Dproot(P)%3B0%3B%20%2F%2F%20f(x%5E5-1%2C-1.3%2C1.3%2C-1.3%2C1.3%2C134%2C10)%0A%20%20rs%3A%3Dsize(r)-1%3B%0A%20%20hx%3A%3Devalf(xmax-xmin)%2FN%3B%20%0A%20%20hy%3A%3Devalf(ymax-ymin)%2FN%3B%0A%20%20for%20k%20from%200%20to%20N%20do%0A%20%20%20%20z0%3A%3Dxmin%2Bi*(ymin%2Bk*hy)%3B%0A%20%20%20%20for%20j%20from%200%20to%20N%20do%0A%20%20%20%20%20%20z%3A%3Dz0%3B%0A%20%20%20%20%20%20for%20l%20from%200%20to%20maxiter%20do%0A%20%20%20%20%20%20%20%20si%20distance((z%3A%3Dhorner(P%2C(zp%3A%3Dhorner(P%2Cz%2Cnewton))%2Cnewton))%2Czp)%3C1e-4%20ou%20abs(z)%3E1e20%20alors%20break%3B%20fsi%3B%0A%20%20%20%20%20%20od%3B%0A%20%20%20%20%20%20si%20z%3D%3Dundef%20alors%20continue%3B%20fsi%3B%0A%20%20%20%20%20%20for%20n%20from%200%20to%20rs%20do%0A%20%20%20%20%20%20%20%20si%20distance(z%2Cr%5Bn%5D)%3C1e-4%20alors%20break%3B%20fsi%3B%0A%20%20%20%20%20%20od%3B%0A%20%20%20%20%20%20res.append(pixon(j%2Ck%2C256%2B25*n%2Bl))%3B%0A%20%20%20%20%20%20z0%3A%3Dz0%2Bhx%3B%0A%20%20%20%20od%3B%0A%20%20od%3B%0A%20%20return%20res%3B%0Affonction%3A%3B&+fonction%20fsym(P%2Cxmin%2Cxmax%2Cymin%2CN%2Cmaxiter)%0A%20%20local%20z0%2Cz%2Czp%2Chx%2Chy%2Cj%2Ck%2Cl%2Cn%2Cr%2Crs%2Crimag%2Cres1%2Cres2%3B%0A%20%20P%3A%3Dsymb2poly(P)%3B%0A%20%20si%20size(im(P))!%3D0%20alors%20return%20%22Le%20polynome%20doit%20etre%20a%20coefficients%20reels%22%3B%20fsi%3B%0A%20%20r%3A%3Dproot(P)%3B%0A%20%20%2F%2F%20extrait%20les%20racines%20de%20partie%20imaginaire%20%3E%3D0%2C%20place%20les%20reelles%20en%20fin%0A%20%20res1%3A%3Dselect(x-%3Eim(x)%3E0%2Cr)%3B%0A%20%20rimag%3A%3D2*size(res1)%3B%0A%20%20res2%3A%3Dselect(x-%3Eim(x)%3D%3D0%2Cr)%3B%0A%20%20r%3A%3Dconcat(res1%2Creverse(conj(res1))%2Cres2)%3B%0A%20%20rs%3A%3Dsize(r)-1%3B%0A%20%20res1%3A%3Dmakelist(-ceil((N%2B1)%5E2%2F2))%3B%20%0A%20%20res2%3A%3Dmakelist(-ceil((N%2B1)%5E2%2F2))%3B%0A%20%20hx%3A%3Devalf(xmax-xmin)%2FN%3B%20%0A%20%20hy%3A%3Devalf(-2*ymin)%2FN%3B%0A%20%20for%20k%20from%200%20to%20N%2F2%20do%0A%20%20%20%20z0%3A%3Dxmin%2Bi*(ymin%2Bk*hy)%3B%0A%20%20%20%20for%20j%20from%200%20to%20N%20do%0A%20%20%20%20%20%20z%3A%3Dz0%3B%0A%20%20%20%20%20%20for%20l%20from%200%20to%20maxiter%20do%0A%20%20%20%20%20%20%20%20si%20distance((z%3A%3Dhorner(P%2C(zp%3A%3Dhorner(P%2Cz%2Cnewton))%2Cnewton))%2Czp)%3C1e-4%20ou%20abs(z)%3E1e20%20alors%20break%3B%20fsi%3B%0A%20%20%20%20%20%20od%3B%0A%20%20%20%20%20%20si%20z%3D%3Dundef%20alors%20continue%3B%20fsi%3B%0A%20%20%20%20%20%20for%20n%20from%200%20to%20rs%20do%0A%20%20%20%20%20%20%20%20si%20distance(z%2Cr%5Bn%5D)%3C1e-4%20alors%20break%3B%20fsi%3B%0A%20%20%20%20%20%20od%3B%0A%20%20%20%20%20%20res1.append(pixon(j%2Ck%2C256%2B25*n%2Bl))%3B%0A%20%20%20%20%20%20res2.append(pixon(j%2CN-k%2C256%2B25*quand(n%3E%3Drimag%2Cn%2Crimag-n-1)%2Bl))%3B%0A%20%20%20%20%20%20z0%3A%3Dz0%2Bhx%3B%0A%20%20%20%20od%3B%0A%20%20od%3B%0A%20%20return%20res1%2Cres2%3B%0Affonction%3A%3B&+pixon(1)&+fsym(x%5E5-1%2C-1.3%2C1.3%0A%2C-1.3%2C150%2C10)&+0%3B%20%2F%2F%20f(x%5E5-1%2C-1.3%2C1.3%2C-1.3%2C1.3%2C134%2C10)&"
                                       target="_blank">Xcas</a>,
                                    <a href="#python=1&exec&+///%3Ch1%3eBassins%20d'attractions%3C/h1%3e%20On%20se%20donne%20un%20polynome%20$P$%20et%20on%20cherche%20en%20partant%20d'un%20point%20$u_0$%20du%20plan%20complexe%20si%20la%20m%C3%A9thode%20de%20Newton$u[n+1]=u_n-P(u_n)/P'(u_n)$converge%20vers%20une%20des%20racines%20complexes%20de%20$P(z)=0$.%20On%20colorie%20le%20point%20en%20fonction%20de%20la%20racine%20et%20de%20la%20vitesse%20de%20convergence.Deux%20fonctions%20sont%20donn%C3%A9es,%20la%20deuxi%C3%A8me%20utilise%20la%20conjugaison%20complexe%20pour%20acc%C3%A9l%C3%A9rer%20les%20calculs.&+def%20f(P%2Cxmin%2Cxmax%2Cymin%2Cymax%2CN%2Cmaxiter)%3A%0A%20%20%20%20%23%20local%20z%2Cz0%2Czp%2Chx%2Chy%2Cj%2Ck%2Cl%2Cn%2Cr%2Crs%2Cres%0A%20%20%20%20P%3Dsymb2poly(P)%0A%20%20%20%20res%3D%5B%5D%0A%20%20%20%20r%3Dproot(P)%0A%20%20%20%20rs%3Dsize(r)%0A%20%20%20%20hx%3Devalf(xmax-xmin)%2FN%0A%20%20%20%20hy%3Devalf(ymax-ymin)%2FN%0A%20%20%20%20for%20k%20in%20range(N%2B1)%3A%0A%20%20%20%20%20%20%20%20z0%3Dxmin%2Bi*(ymin%2Bk*hy)%0A%20%20%20%20%20%20%20%20for%20j%20in%20range(N%2B1)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20z%3Dz0%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20l%20in%20range(maxiter)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20distance((z%3A%3Dhorner(P%2C(zp%3A%3Dhorner(P%2Cz%2Cnewton))%2Cnewton))%2Czp)%3C1e-4%20or%20abs(z)%3E1e20%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20z%3D%3Dundef%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20continue%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20n%20in%20range(rs)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20distance(z%2Cr%5Bn%5D)%3C1e-4%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20%20%20%20%20res.append(pixon(j%2Ck%2C256%2B25*n%2Bl))%0A%20%20%20%20%20%20%20%20%20%20%20%20z0%3Dz0%2Bhx%0A%20%20%20%20return%20res&+def%20fsym(P%2Cxmin%2Cxmax%2Cymin%2CN%2Cmaxiter)%3A%0A%20%20%20%20%23%20local%20z0%2Cz%2Czp%2Chx%2Chy%2Cj%2Ck%2Cl%2Cn%2Cr%2Crs%2Crimag%2Cres1%2Cres2%0A%20%20%20%20P%3Dsymb2poly(P)%0A%20%20%20%20if%20size(im(P))%3C%3E0%20%3A%0A%20%20%20%20%20%20%20%20return(%22Le%20polynome%20doit%20etre%20a%20coefficients%20reels%22)%0A%20%20%20%20r%3Dproot(P)%0A%20%20%20%20res1%3Dselect(lambda%20x%3Aim(x)%3E0%2Cr)%0A%20%20%20%20rimag%3D2*size(res1)%0A%20%20%20%20res2%3Dselect(lambda%20x%3Aim(x)%3D%3D0%2Cr)%0A%20%20%20%20r%3Dconcat(res1%2Creverse(conj(res1))%2Cres2)%0A%20%20%20%20rs%3Dsize(r)%0A%20%20%20%20res1%3D%5B%5D%0A%20%20%20%20res2%3D%5B%5D%0A%20%20%20%20hx%3Devalf(xmax-xmin)%2FN%0A%20%20%20%20hy%3Devalf(-2*ymin)%2FN%0A%20%20%20%20for%20k%20in%20range(ceil((N%2B1)%2F2))%3A%0A%20%20%20%20%20%20%20%20z0%3Dxmin%2Bi*(ymin%2Bk*hy)%0A%20%20%20%20%20%20%20%20for%20j%20in%20range(0%2CN%2B1)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20z%3Dz0%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20l%20in%20range(maxiter)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20distance((z%3A%3Dhorner(P%2C(zp%3A%3Dhorner(P%2Cz%2Cnewton))%2Cnewton))%2Czp)%3C0.0001%20or%20abs(z)%3E1e%2B20%20%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(z%3D%3Dundef)%20%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20continue%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20n%20in%20range(rs)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(distance(z%2Cr%5Bn%5D))%3C0.0001%20%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20%20%20%20%20res1.append(pixon(j%2Ck%2C256%2B25*n%2Bl))%0A%20%20%20%20%20%20%20%20%20%20%20%20res2.append(pixon(j%2CN-k%2C256%2B25*when(n%3E%3Drimag%2Cn%2Crimag-n-1)%2Bl))%0A%20%20%20%20%20%20%20%20%20%20%20%20z0%3Dz0%2Bhx%0A%20%20%20%20return(res1%2Cres2)&+pixon(1)&+fsym(x%5E5-1%2C-1.3%2C1.3%2C-1.3%2C150%2C10)&+0%3B%20%2F%2F%20f(x%5E5-1%2C-1.3%2C1.3%2C-1.3%2C1.3%2C134%2C10)&"
                                       target="_blank">Python</a>
                                </li>
                                <li> Foug&egrave;re et choux-fleur
                                    <a
                                        href="#exec&python=1&+def%20fougere(nb)%3A%0A%20%20%20%20w%3D%5B%5D%3Bb%3D%5B%5D%3Bp%3D%5B%5D%0A%20%20%20%20m%3D11%0A%20%20%20%20w.append(%5B%5B0%2C0%5D%2C%5B0%2C.16%5D%5D)%3B%20b.append(%5B0%2C0%5D)%3B%20p.append(.01)%0A%20%20%20%20w.append(%5B%5B.85%2C.04%5D%2C%5B-.04%2C.85%5D%5D)%3B%20b.append(%5B0%2C2%5D)%3B%20p.append(p%5B-1%5D%2B.85)%0A%20%20%20%20w.append(%5B%5B.2%2C-.26%5D%2C%5B.23%2C.22%5D%5D)%3B%20b.append(%5B0%2C1%5D)%3B%20p.append(p%5B-1%5D%2B(1-p%5B-1%5D)%2F2)%0A%20%20%20%20w.append(%5B%5B-.15%2C.28%5D%2C%5B.26%2C.24%5D%5D)%3B%20b.append(%5B0%2C.9%5D)%3B%20p.append(1)%0A%0A%20%20%20%20x%3D%5B0%2C0%5D%0A%20%20%20%20res%3D%5B%5D%0A%20%20%20%20for%20_%20in%20range(nb)%3A%0A%20%20%20%20%20%20%20%20h%3Drandom()%0A%20%20%20%20%20%20%20%20i%3D0%0A%20%20%20%20%20%20%20%20while%20True%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20h%3C%3Dp%5Bi%5D%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20x%3Db%5Bi%5D%2Bw%5Bi%5D*x%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20%20%20%20%20i%2B%3D1%0A%20%20%20%20%20%20%20%20%23print(x)%0A%20%20%20%20%20%20%20%20res.append(pixon(160%2Bint(m*x%5B0%5D)%2C140-int(m*x%5B1%5D)%2C5100))&+fougere(10000)%0A&+def%20arbre(nb)%3A%0A%20%20%20%20w%3D%5B%5D%3Bb%3D%5B%5D%3Bp%3D%5B%5D%0A%20%20%20%20%23%20Arbre%0A%20%20%20%20m%3D222%0A%20%20%20%20w.append(%5B%5B0%2C0%5D%2C%5B0%2C.5%5D%5D)%3B%20b.append(%5B0%2C0%5D)%3B%20p.append(.05)%0A%20%20%20%20w.append(%5B%5B.42%2C-.42%5D%2C%5B.42%2C.42%5D%5D)%3B%20b.append(%5B0%2C.2%5D)%3B%20p.append(p%5B-1%5D%2B.4)%0A%20%20%20%20w.append(%5B%5B.42%2C.42%5D%2C%5B-.42%2C.42%5D%5D)%3B%20b.append(%5B0%2C.2%5D)%3B%20p.append(p%5B-1%5D%2B.4)%0A%20%20%20%20w.append(%5B%5B.1%2C0%5D%2C%5B0%2C.1%5D%5D)%3B%20b.append(%5B0%2C.2%5D)%3B%20p.append(1)%0A%0A%20%20%20%20x%3D%5B0%2C0%5D%0A%20%20%20%20res%3D%5B%5D%0A%20%20%20%20for%20_%20in%20range(nb)%3A%0A%20%20%20%20%20%20%20%20h%3Drandom()%0A%20%20%20%20%20%20%20%20i%3D0%0A%20%20%20%20%20%20%20%20while%20True%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20h%3C%3Dp%5Bi%5D%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20x%3Db%5Bi%5D%2Bw%5Bi%5D*x%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20%20%20%20%20i%2B%3D1%0A%20%20%20%20%20%20%20%20%23print(x)%0A%20%20%20%20%20%20%20%20res.append(pixon(160%2Bint(m*x%5B0%5D)%2C140-int(m*x%5B1%5D)%2C5100))&+arbre(10000)&"
                                        target="_blank">
                                    Python
                                    </a>
                                </li>
                                <li> courbe de Hilbert
                                    <a
                                        href="#exec&python=1&+def%20Draw_line(x%2C%20y%2C%20dx%2C%20dy%2C%20c)%3A%0A%20%20if%20dx%20%3D%3D%200%3A%0A%20%20%20%20if%20dy%20%3E%200%3A%0A%20%20%20%20%20%20y1%2C%20y2%20%3D%20y%2C%20y%2Bdy%2B1%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20y1%2C%20y2%20%3D%20y%2Bdy%2C%20y%2B1%0A%20%20%20%20for%20y0%20in%20range(y1%2C%20y2)%3A%0A%20%20%20%20%20%20set_pixel(x%2C%20y0%2C%20c)%0A%20%20%20%20y%20%2B%3D%20dy%0A%20%20else%3A%0A%20%20%20%20if%20dx%20%3E%200%3A%0A%20%20%20%20%20%20x1%2C%20x2%20%3D%20x%2C%20x%2Bdx%2B1%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20x1%2C%20x2%20%3D%20x%2Bdx%2C%20x%2B1%0A%20%20%20%20for%20x0%20in%20range(x1%2C%20x2)%3A%0A%20%20%20%20%20%20set_pixel(x0%2C%20y%2C%20c)%0A%20%20%20%20x%20%2B%3D%20dx%0A%20%20return%20x%2C%20y%0A&+def%20Hilbert(n%3D5%2C%20dx%3D5%2C%20dy%3D0%2C%20x%3D5%2C%20y%3D5%2C%20a%3D90%2C%20c%3D1)%3A%0A%20%20if%20n%20%3D%3D%200%3A%0A%20%20%20%20return%20x%2C%20y%2C%20dx%2C%20dy%0A%20%20elif%20a%20%3D%3D%2090%3A%0A%20%20%20%20dx%2C%20dy%20%3D%20-dy%2C%20dx%0A%20%20%20%20x%2C%20y%2C%20dx%2C%20dy%20%3D%20Hilbert(n-1%2C%20dx%2C%20dy%2C%20x%2C%20y%2C%20-90%2C%20c)%0A%20%20%20%20x%2C%20y%20%3D%20Draw_line(x%2C%20y%2C%20dx%2C%20dy%2C%20c)%0A%20%20%20%20dx%2C%20dy%20%3D%20dy%2C%20-dx%0A%20%20%20%20x%2C%20y%2C%20dx%2C%20dy%20%3D%20Hilbert(n-1%2C%20dx%2C%20dy%2C%20x%2C%20y%2C%2090%2C%20c)%0A%20%20%20%20x%2C%20y%20%3D%20Draw_line(x%2C%20y%2C%20dx%2C%20dy%2C%20c)%0A%20%20%20%20x%2C%20y%2C%20dx%2C%20dy%20%3D%20Hilbert(n-1%2C%20dx%2C%20dy%2C%20x%2C%20y%2C%2090%2C%20c)%0A%20%20%20%20dx%2C%20dy%20%3D%20dy%2C%20-dx%0A%20%20%20%20x%2C%20y%20%3D%20Draw_line(x%2C%20y%2C%20dx%2C%20dy%2C%20c)%0A%20%20%20%20x%2C%20y%2C%20dx%2C%20dy%20%3D%20Hilbert(n-1%2C%20dx%2C%20dy%2C%20x%2C%20y%2C%20-90%2C%20c)%0A%20%20%20%20dx%2C%20dy%20%3D%20-dy%2C%20dx%0A%20%20else%3A%0A%20%20%20%20dx%2C%20dy%20%3D%20dy%2C%20-dx%0A%20%20%20%20x%2C%20y%2C%20dx%2C%20dy%20%3D%20Hilbert(n-1%2C%20dx%2C%20dy%2C%20x%2C%20y%2C%2090%2C%20c)%0A%20%20%20%20x%2C%20y%20%3D%20Draw_line(x%2C%20y%2C%20dx%2C%20dy%2C%20c)%0A%20%20%20%20dx%2C%20dy%20%3D%20-dy%2C%20dx%0A%20%20%20%20x%2C%20y%2C%20dx%2C%20dy%20%3D%20Hilbert(n-1%2C%20dx%2C%20dy%2C%20x%2C%20y%2C%20-90%2C%20c)%0A%20%20%20%20x%2C%20y%20%3D%20Draw_line(x%2C%20y%2C%20dx%2C%20dy%2C%20c)%0A%20%20%20%20x%2C%20y%2C%20dx%2C%20dy%20%3D%20Hilbert(n-1%2C%20dx%2C%20dy%2C%20x%2C%20y%2C%20-90%2C%20c)%0A%20%20%20%20dx%2C%20dy%20%3D%20-dy%2C%20dx%0A%20%20%20%20x%2C%20y%20%3D%20Draw_line(x%2C%20y%2C%20dx%2C%20dy%2C%20c)%0A%20%20%20%20x%2C%20y%2C%20dx%2C%20dy%20%3D%20Hilbert(n-1%2C%20dx%2C%20dy%2C%20x%2C%20y%2C%2090%2C%20c)%0A%20%20%20%20dx%2C%20dy%20%3D%20dy%2C%20-dx%0A%20%20return%20x%2C%20y%2C%20dx%2C%20dy&+set_pixel(0)%3B%20Hilbert()%3B%20set_pixel()&"
                                        target="_blank">Python
                                    </a>
                                </li>
                                <li>
                                    <a
                                        href="#exec&python=0&+etoilo(z0%2Cr%2Ca)%3A%3D%7B%0A%20%20local%20j%2Cl%2Csomet%2Cp%2CL%2Cpa%3B%0A%20%20z0%3A%3Devalf(z0)%3B%0A%20%20r%3A%3Devalf(r)%3B%0A%20%20a%3A%3Devalf(a)%3B%0A%20%20l%3A%3Devalf(r*(3-sqrt(7))%2F2)%3B%0A%20%20somet%3A%3D%5Bz0%2Bl*exp(i*a)%2Cz0%2Br*exp(i*(a%2Bevalf(pi%2F7)))%5D%3B%0A%20%20L%3A%3Dsomet%3B%0A%20%20for%20(j%3A%3D1%3Bj%3C7%3Bj%2B%2B)%7B%0A%20%20%20%20L%3A%3Dconcat(L%2Crotation(z0%2C2*j*evalf(pi%2F7)%2Csomet))%3B%0A%20%20%7D%0A%20%20p%3A%3Dpolygone(L)%3B%0A%20%20return%20p%3B%0A%7D%3A%3B%0A%20%20%0Aetoilog(z0%2Cr%2Ca)%3A%3D%7B%0A%20%20return%20affichage(etoilo(z0%2Cr%2Ca)%2Crempli)%3B%0A%7D%3A%3B%0A%0Alogox(z0%2Cr%2Ca%2Cc)%3A%3D%7B%0A%20%20local%20j%2Ck%2CR%2CL%2Cnr%2Cnz0%3B%0A%20%20L%3A%3D%5Baffichage(etoilo(z0%2Cr%2Ca)%2Cc%2Brempli)%5D%3B%0A%20%20R%3A%3Dr%3B%0A%20%20for%20(j%3A%3D0%3Bj%3C7%3Bj%2B%2B)%7B%0A%20%20%20%20nr%3A%3D2*R%2F(1%2Bsqrt(7))%3B%0A%20%20%20%20nz0%3A%3Dz0%2BR*exp(2*i*j*pi%2F7%2Bi*a)%3B%0A%20%20%20%20for%20(k%3A%3D1%3Bk%3C7%3Bk%2B%2B)%7B%0A%20%20%20%20%20%20L%3A%3Dappend(L%2Caffichage(etoilo(evalf(nz0)%2Cnr%2Ca)%2Cc%2B(j%2B1)*k%2Brempli))%3B%0A%20%20%20%20%20%20r%3A%3Dnr%3B%0A%20%20%20%20%20%20nr%3A%3D2*r%2F(1%2Bsqrt(7))%3B%0A%20%20%20%20%20%20nz0%3A%3Dnz0%2Br*exp(2*i*j*pi%2F7%2Bi*a)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20return%20L%3B%0A%7D%3A%3B%0A%0Alx(z0%2Cr)%3A%3D%7B%0A%20%20return(segment(z0%2Br*(-1-i)%2Cz0%2Br*(1%2Bi))%2Csegment(z0%2Br*(1-i)%2Cz0%2Br*(-1%2Bi)))%3B%0A%7D%3A%3B%0A%0Alc(z0%2Cr)%3A%3D%7B%0A%20%20return%20(cercle(z0%2Cr%2Cpi%2F4%2C7*pi%2F4))%3B%0A%7D%3A%3B%0A%0Ala(z0%2Cr)%3A%3D%7B%0A%20%20return(segment(z0%2Br*(-1-i)%2Cz0%2Br*i)%2C%0A%20%20%20%20segment(z0%2Br*(1-i)%2Cz0%2Br*i)%2C%0A%20%20%20%20segment(z0%2Br*-0.5%2C%2Bz0%2Br*0.5))%3B%0A%7D%3A%3B%0A%0Als(z0%2Cr)%3A%3D%7B%0A%20%20return%20(segment(z0%2Br*(-1%2F2-i)%2Cz0-r*i)%2C%0A%20%20%20%20segment(z0%2Br*(1%2F2%2Bi)%2Cz0%2Br*i)%2C%0A%20%20%20%20cercle(z0%2Br*i%2F2%2Cr%2F2%2C%2Bpi%2F2%2C3*pi%2F2)%2C%0A%20%20%20%20cercle(z0-r*i%2F2%2Cr%2F2%2C-pi%2F2%2Cpi%2F2))%3B%0A%7D%3A%3B%0A%0A%2F%2Fc%20represente%20la%20couleur%0Alogoxcas(z0%2Cr%2Ca%2Cc)%3A%3D%7B%0A%20%20return%20logox(z0%2Cr%2Ca%2Cc)%2C%0A%20%20affichage(lx(evalf(z0-2*r*exp(i*a)%2Cr*0.2))%2Cline_width_3%2Bc%2B4)%2C%0A%20%20affichage(lc(evalf(z0-2*r*exp(-2*i*pi%2F7%2Bi*a)%2C0.2*r))%2Cline_width_3%2Bc%2B3)%2C%0A%20%20affichage(la(evalf(z0-2*r*exp(-4*i*pi%2F7%2Bi*a)%2C0.2*r))%2Cline_width_3%2Bc%2B2)%2C%0A%20%20affichage(ls(evalf(z0-2*r*exp(-6*i*pi%2F7%2Bi*a)%2C0.2*r))%2Cline_width_3%2Bc%2B1)%3B%0A%7D%3A%3B%0A%0A&+axes%3D0%3Blogoxcas(0%2C1%2C0%2C264)&"
                                        target="_blank">logo Xcas</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutointerface'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Interface</strong></button>
                <div id="tutointerface" style="display:none">
                    Cette feuille de calcul est compos&eacute;e du haut vers le bas de:
                    <ul>
                        <li>
                            Un panel de boutons permettant de restaurer/sauvegarder
                            une session, et des aides &agrave; la saisie de commandes
                            (Xcas/math, programmation, clavier scientifique, documentation) .
                            Au lancement de Xcas, le panel est
                            r&eacute;duit &agrave; insertion d'une session, consultation des
                            manuels, configuration et restauration de la session
                            pr&eacute;c&eacute;dente.
                            D&egrave;s que vous avez valid&eacute; une commande, il apparait
                            <ul>
                                <li> un lien x2 (respectivement local)
                                    qui permet de <strong>cloner</strong> une session existante
                                    (respectivement localement).
                                    A utiliser si le noyau de calcul formel a crash&eacute; ou
                                    pour copier-coller dans une page web, ou pour ex&eacute;cuter
                                    dans Xcas natif (s&eacute;lectionner un niveau en cliquant sur
                                    son num&eacute;ro de niveau puis faire Ctrl/Cmd-V)
                                <li> un lien &#x2709; qui permet de <strong>partager
                                    votre session</strong> par e-mail.
                                </li>
                            </ul>
                        </li>
                        <li> une zone d'<strong>aide</strong>, qui contient des courtes description des
                            commandes dont vous avez demand&eacute; la syntaxe. Vous pouvez
                            effacer l'aide avec le bouton d'effacement &agrave; droite du champ de recherche.
                        </li>
                        <li> un <strong>historique</strong> qui contient 0 ou plusieurs
                            niveaux (0 au d&eacute;but). Un niveau est une paire
                            ligne de commande (en noir)/r&eacute;sultats (en
                            bleu), les boutons ↑ et ↓ permettent de d&eacute;placer un niveau
                            dans l'historique. Vous pouvez modifier une ligne
                            de commande de l'historique et valider en cliquant sur le bouton Ok
                            ou sur Entree en d&eacute;but de champ. Vous
                            pouvez placer un niveau dans la corbeille avec le bouton
                            d'effacement &agrave; droite du niveau. Pour le restaurer,
                            cliquez sur le bouton Restaure, pour l'effacer
                            d&eacute;finitivement cliquez sur le bouton Vide. Le lien <tt>+</tt>
                            &agrave; droite du bouton Vide permet d'ouvrir un nouvel onglet
                            sur une session vide.
                        </li>
                        <li>
                            une <strong>ligne de commande</strong>, on y tape des commandes
                            ou des programmes Xcas, et on
                            valide en cliquant sur le bouton Ok ou en tapant Entree (si
                            votre commande est sur plusieurs lignes, tapez Ctrl-Entree ou Entree
                            sur une ligne vide). Pour
                            forcer un passage
                            &agrave; la ligne, tapez Shift-Entree au clavier
                            ou utilisez le bouton <tt>\n</tt>.
                            <br>
                            Par exemple, tapez un calcul simple comme <tt>1/2+1/3</tt>
                            ou <tt>sin(pi/4)</tt> ou <tt>sin(pi/4.0)</tt>.
                            <br>
                            Pour vous aider &agrave; remplir la ligne de commande,
                            vous pouvez cliquer sur le bouton 123 qui fait apparaitre
                            le <strong>clavier scientifique</strong> et sur l'icone de Xcas
                            qui contient des commandes
                            fr&eacute;quemment utili&eacute;es et des assistants
                            (d&eacute;placez la souris pr&egrave;s des boutons pour
                            une description de leur action).
                            <br>
                            Si vous connaissez le nom d'une commande,
                            vous pouvez taper (le d&eacute;but) du nom d'une commande
                            (par exemple <tt>factor</tt>) puis
                            la touche <button>F1</button>
                            ou cliquer sur le bouton <button>?</button>
                            pour obtenir une
                            <strong>aide courte</strong> sur la commande (si elle
                            est compl&egrave;te) ou des suggestions de noms de
                            commande (sinon).
                            <br>
                            Par exemple, cliquer sur le bouton <tt>math</tt> puis
                            <tt>reecr.</tt> puis
                            <tt>factor</tt> puis tapez sur <tt>?</tt>, observez l'aide
                            en haut, cliquez sur un des exemples ou completez avec
                            x^4-1 puis tapez Entree.
                            <br>
                            Sur mobile, vous pouvez
                            <strong>s&eacute;lectionner</strong> du texte en laissant le doigt appuy&eacute;
                            sur un mot, puis taper sur l'icone avec des ciseaux (pour couper) ou
                            avec deux feuilles (pour copier), pour coller le presse-papier,
                            laisser le doigt appuy&eacute; puis taper sur l'icone avec une
                            feuille. Vous pouvez aussi appuyer sur les boutons <tt>beg</tt>
                            et <tt>end</tt> pour marquer le d&eacute;but et la fin de la
                            s&eacute;lection, puis optionnellement sur <tt>del</tt> pour
                            effacer, puis sur <tt>cp</tt> pour coller ce que vous aviez
                            s&eacute;lectionn&eacute;.  <br>
                            Vous pouvez ajouter un <strong>commentaire</strong> en validant une ligne de commande
                            vide (ou en cliquant sur le bouton
                            <tt>math</tt> puis <tt>texte</tt>). Vous pouvez transformer une ligne
                            de commande en un commentaire (ou inversement un commentaire en ligne
                            de commande) en ajoutant <tt>///</tt> au d&eacute;but et en validant.
                            Vous pouvez commenter une ligne de
                            commande en cliquant sur le bouton repr&eacute;sentant un
                            crayon &agrave; gauche de la r&eacute;ponse.
                            Vous pouvez utiliser des commandes de
                            balisage HTML dans un commentaire, par exemple inclure un
                            graphique
                            <tt>
                            &lt;img WIDTH="32" HEIGHT="32" SRC="turtle.png" alt="Tortue"
                            align="center"&gt;
                            </tt>.
                            Lorsque vous &eacute;ditez un
                            commentaire, des boutons facilitent la saisie des commandes HTML pour
                            cr&eacute;er un titre, ou &eacute;crire en gras ou italique ou fonte
                            fixe. Vous pouvez taper des math&eacute;matiques de deux
                            mani&egrave;res mutuellement exclusives
                            <ul>
                                <li> en saisissant une ligne de commande
                                    valide entre deux signes dollar (<tt>$...$</tt>),
                                    ce morceau de ligne de commande sera interpr&eacute;t&eacute;
                                    par Xcas sans etre &eacute;valu&eacute; puis transform&eacute; en
                                    MathML pour affichage 2d, par exemple <tt>$x[n+1]^2$</tt> affichera x indice
                                    n+1 exposant 2, <tt>$A=[[1,2],[3,4]]$</tt> affichera une matrice (sans donner
                                    de valeur &agrave; A), <tt>$integrate(sin(x),x,0,pi)$</tt> affichera
                                    l'int&eacute;grale de sinus x entre 0 et pi sans la calculer,
                                    <tt>$vecteur(u), vecteur(A,B)$</tt> affichera une fl&egrave;che
                                    au-dessus de u ou de AB. Les
                                    symboles des ensembles tels que ℤ,ℕ s'obtiennent par <tt>$ZZ$, $NN$</tt>,
                                    ainsi pour saisir x∈ℚ on tape <tt>$x in QQ$</tt>. On peut aussi utiliser du
                                    code HTML comme <tt>&amp;in;</tt> pour &in;, <tt>&amp;forall;</tt> pour
                                    &forall;, <tt>&amp;exist;</tt>, <tt>&amp;oplus;</tt>, <tt>&amp;otimes;</tt>,
                                    <tt>&amp;notin;</tt>, <tt>&amp;empty;</tt>, <tt>&amp;part;</tt>
                                    etc. ou recopier directement un symbole par exemple depuis
                                    <a href="https://www.w3schools.com/charsets/ref_utf_math.asp">ici</a>.
                                <li> soit en saisissant un commentaire contenant au moins
                                    une paire de double-dollars (<tt>$$  ... $$</tt>).
                                    Dans ce cas, MathJax sera charg&eacute; pour afficher l'ensemble des
                                    commentaires en utilisant la syntaxe LaTeX
                                    (attention, cette m&eacute;thode ne fonctionne pas sans
                                    connexion Internet).
                            </ul>
                        </li>
                        <li>
                            une <strong>console</strong> qui affiche des messages du CAS :
                            erreurs de syntaxe mais aussi lors
                            d'un calcul en mode pas-&agrave;-pas, par exemple d'une
                            d&eacute;riv&eacute;e.
                            La console n'est pas visible si elle est vide.
                            Vous pouvez effacer la console ou ajuster sa taille verticale.
                        </li>
                        <li>
                            une zone affichant des <strong>graphes 3d</strong>
                            lorsqu'on ex&eacute;cute une commande
                            ayant une sortie graphique 3d. Cette zone n'est pas visible s'il n'y
                            a pas de graphique 3d.
                        </li>
                    </ul>
                    A tout moment, vous pouvez <strong>sauvegarder</strong> l'historique,
                    avec le nom de session affich&eacute; &agrave; droite du bouton
                    <tt>&#x1f4be;</tt>
                    (par d&eacute;faut <tt>session</tt>).
                    Une session sauvegard&eacute;e
                    s'ouvre ensuite avec le bouton Charger.
                    Sur mobile, les sauvegardes sont faites dans localStorage.
                    Vous pouvez aussi <strong>exporter</strong> la feuille de calcul (sauf
                    sur mobile), l'export occupe plus de place mais
                    permet de publier le fichier HTML comme une page autonome.
                    Vous pouvez sauvegarder les graphes 2d au format SVG avec le bouton
                    save &agrave; droite du graphe. Le fichier SVG cr&eacute;&eacute;
                    est au format 1.2 (il utilise la balise
                    <tt>vector-effect="non-scaling-stroke"</tt> qui n'est pas compris
                    par tous les visualisateurs ou convertisseurs).
                    <br>
                    Sous Firefox, pour pouvoir
                    choisir l'emplacement de sauvegarde et &eacute;craser
                    une version ant&eacute;rieure : cocher Toujours demander...
                    dans Pr&eacute;f&eacute;rences,
                    G&eacute;n&eacute;ral, T&eacute;l&eacute;chargements.
                    <br>
                    Vous pouvez ouvrir (partiellement) dans Xcas pour Firefox
                    une session existante Xcas natif en la clonant
                    (menu Fich, Clone du programme Xcas, ou en ligne de commande
                    <tt>xcas --online nom_fichier.xws</tt>)
                    <br>
                    Notez que Chrome (et plus g&eacute;n&eacute;ralement
                    le navigateur install&eacute; par d&eacute;faut sur votre appareil)
                    est beaucoup plus lent que Firefox pour
                    faire les calculs (5 fois plus lent environ), en particulier le
                    premier calcul dure une bonne dizaine de secondes. De plus, Chrome
                    n'a pas de support natif pour afficher les formules en 2d en mathml,
                    il faut alors charger MathJax ce qui n&eacute;cessite
                    un acc&egrave;s r&eacute;seau.
                    <br>
                    <strong>Il est donc recommend&eacute; de t&eacute;l&eacute;charger
                    Firefox et d'ex&eacute;cuter Xcas depuis Firefox</strong>
                    <br>
                    <button class="bouton"
                            onclick="$id('tutointerface').style.display='none';">Masquer
                    l'aide sur l'interface</button>
                </div>
            </li>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutokbd'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Clavier</strong></button>
                <div id="tutokbd" style="display:none">
                    Raccourcis clavier avec Alt (ou Ctrl si Alt ne marche pas car
                    d&eacute;j&agrave; utilis&eacute; par le navigateur ou le
                    syst&egrave;me d'exploitation).
                    <ul>
                        <li> D, curseur droit : d&eacute;place le focus d'un champ
                            vers la droite ou le bas
                        <li> G, curseur gauche : d&eacute;place le focus d'un champ
                            vers la gauche ou le haut
                        <li> curseur bas : d&eacute;place le focus de 2 champs
                            vers la droite ou le bas
                        <li> curseur bas : d&eacute;place le focus de 2 champs
                            vers la gauche ou le haut
                        <li> B: d&eacute;place le focus vers la ligne de commande
                        <li> C: copie le champ courant vers la ligne de commande
                        <li> A: d&eacute;place le focus vers l'aide
                        <li> TAB: affiche l'aide sur la commande &agrave; gauche du
                            curseur de la ligne de commande.
                        <li> M: affiche ou cache le menu Maths
                        <li> P: affiche ou cache le menu Programmation
                        <li> T: affiche ou cache le menu Tortue
                        <li> E ou F: ex&eacute;cute la session
                        <li> N: efface la console
                    </ul>
                </div>
            </li>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutocfg'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Configuration</strong></button>
                <div id="tutocfg" style="display:none">
		  Le bouton en haut &agrave; gauche de la feuille permet de changer
		  la configuration de Xcas pour Firefox. Vous pouvez par exemple
		  modifier le nombre de chiffres significatifs utilis&eacute;s par
		  d&eacute;faut,  l'unit&eacute; d'angle, le mode pas &agrave; pas,
		  etc. Si vous avez un navigateur compatible, par exemple Firefox&geq;58,
		  vous pouvez activer l'option <tt>wasm</tt> qui permet d'effectuer
		  la plupart des calculs plus rapidement et donne acc&egrave;s aux
		  commandes de PARI-GP (apr&egrave;s avoir &eacute;valu&eacute; la
		  commande <tt>pari()</tt>). Vous pouvez aussi
		  utiliser l'interpr&eacute;teur MicroPython &agrave;
		  la place de l'interpr&eacute;teur Xcas si la compatibilit&eacute;
		  Python de Xcas est insuffisante: il est fourni avec
		  des modules pour un usage scolaire (math, cmath,
		  random, turtle, matplotl, linalg, numpy, graphic, arit,
		  cas). Le passage d'un interpr&eacute;teur &agrave;
		  l'autre peut aussi s'effectuer avec les commandes
		  <tt>python</tt> ou <tt>xcas</tt>.
		  Pour visualiser la tortue en mode MicroPython, taper <tt>.</tt>
		  sur une ligne de commande vide, pour visualiser un
		  graphique de <tt>graphic</tt> taper <tt>;</tt>, pour
		  un graphique dans un rep&eacute;re, taper <tt>,</tt>.
                </div>
            </li>
            <li style="display:inline">
                <button class="bouton" onclick="var tmp=$id('manuels'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Manuels</strong>
                </button>
                <span id="manuels" style="display:none">
                    <strong>Manuels de Xcas</strong> <button class="bouton"
                                                             onclick="$id('manuels').style.display='none';">Masquer</button>
                    <br>
                    La version "disque dur" est accessible en local sous Linux si vous avez
                    install&eacute; <tt>giac</tt>, sinon s&eacute;lectionnez la version "Internet".
                    <ul>
                        <li> Algorithmes de calcul formel et num&eacute;rique:
                            PDF <a href="giac/doc/fr/algo.pdf"
                                   target="_blank">local</a>,
                            <a href="https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/algo.pdf"
                               target="_blank">Internet</a>,
                            HTML <a href="giac/doc/fr/algo.html"
                                    target="_blank">local</a>,
                            <a href="https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/algo.html"
                               target="_blank">Internet</a>,
                        </li>
                        <li> Programmation :
                            <a href="irem/algolycee.html" target="_blank">algorithmique lyc&eacute;e</a>,
                            <a href="giac/doc/fr/casrouge/index.html"
                               target="_blank">local</a>,
                            <a href="https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/casrouge/index.html"
                               target="_blank">Internet</a>,
                        </li>
                        <li> G&eacute;om&eacute;trie :
                            <a href="giac/doc/fr/casgeo/index.html"
                               target="_blank">local</a>,
                            <a href="https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/casgeo/index.html"
                               target="_blank">Internet</a>,
                        </li>
                        <li> Simulation :
                            <a href="giac/doc/fr/cassim/index.html"
                               target="_blank">local</a>,
                            <a href="https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/cassim/index.html"
                               target="_blank">Internet</a>,
                        </li>
                        <li> Tortue logo :
                            <a href="giac/doc/fr/castor/index.html"
                               target="_blank">local</a>,
                            <a href="https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/castor/index.html"
                               target="_blank">Internet</a>,
                        </li>
                        <li> Exercices :
                            <a href="giac/doc/fr/casexo/index.html"
                               target="_blank">local</a>,
                            <a href="http://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/casexo/index.html"
                               target="_blank">Internet</a>,
                        </li>
                        <li> Amusement :
                            <a href="giac/doc/fr/cascas/index.html"
                               target="_blank">local</a>,
                            <a href="http://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/cascas/index.html"
                               target="_blank">Internet</a>,
                        </li>
                    </ul>
                </span>
            </li>
            <li style="display:inline">
                <button class="bouton" onclick="var tmp=$id('apropos'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>&Agrave; propos</strong>
                </button>
                <span id="apropos" style="display:none">
                Xcasfr.html est une interface javascript optimis&eacute;e pour Firefox
                du système de calcul formel
                <a
                    href="http://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/emgiac.tgz">Giac/Xcas</a>
                compil&eacute; par emscripten (l'&eacute;diteur de
                programme de cette interface
                utilise <a href="http://codemirror.net">CodeMirror</a>).
                Il n'a pas besoin de serveur, il s'exécute localement
                (avec le moteur javascript de votre navigateur qui doit être récent,
                mettez-le &agrave; jour pour avoir de bonnes performances, il faut
                aussi avoir au moins 300M de RAM disponible)
                à partir du code du CAS qui est téléchargé
                une fois. Le prix à payer pour cette simplicité
                est la vitesse, le code est plus lent pour tous les
                calculs exacts.
                La plupart du temps, cela n'est pas vraiment
                genant, mais
                si vous devez exécuter un gros calcul, il
                vaut mieux installer
                <a href="http://www-fourier.univ-grenoble-alpes.fr/~parisse/giac_fr.html">Xcas</a>!
                <br>
                Giac/Xcas (c) 2018 B. Parisse, R. De Graeve, Institut Fourier, Université
                de Grenoble, sous licence GPL3, pour une licence commerciale nous
	        contacter.
	        <br>
	        Optimization, signalprocessing, graph theory code (c) Luka Marohnić.
                <br>
                Sortie mathml et SVG (c) code principalement
	    &eacute;crit par J.P. Branchard.
<br><a target="_blank" href="https://micropython.org/">MicroPython</a> (c) Damien P. George et al <br>
<a target="_blank" href="https://bellard.org/quickjs/">QuickJS</a> (c)
  Fabrice Bellard et Charlie Gordon.
                </span>
            </li>
            <br>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutosimplifier'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Simplifier</strong></button>
                <span id="tutosimplifier" style="display:none">
                    Il n'existe pas de mani&egrave;re universelle de simplifier une
                    expression, parfois il vaut mieux d&eacute;velopper, parfois factoriser,
                    parfois lin&eacute;ariser, etc., il est donc important de connaitre
                    quelques commandes de r&eacute;&eacute;criture, que l'on peut
                    retrouver depuis le menu Math, r&eacute;&eacute;cr.
                    <ul>
                        <li>
                            L'appui sur le bouton <tt>math</tt> puis <tt>r&eacute;ecr.</tt> puis <tt>simpl</tt>
                            ins&egrave;re
                            la commande
                            <button onclick="UI.insert_focused('simplify(')">simplify</button>,
                            tapez ensuite
                            l'expression que
                            vous voulez d&eacute;velopper et simplifier.<br>
                            <button onclick="UI.insert_focused('normal(')">normal</button>,
                            <button onclick="UI.insert_focused('reorder(')">reorder</button>,
                            <button onclick="UI.insert_focused('ratnormal(')">ratnormal</button>
                            sont des versions moins puissantes mais plus rapides que simplify
                            (normal ne recherche pas de relations entre fonctions
                            trigonom&eacute;triques et exponentielles, ratnormal n'effectue
                            que des simplifications rationnelles, reorder r&eacute;ordonne
                            selon une liste de variables).
                        </li>
                        <li>
                            <button onclick="UI.insert_focused('factor(')">factor</button>
                            factorise sur R,
                            <button onclick="UI.insert_focused('cfactor(')">cfactor</button>
                            sur C
                        </li>
                        <li>
                            <button onclick="UI.insert_focused('partfrac(')">partfrac</button>
                            d&eacute;compose en &eacute;l&eacute;ments simples sur R,
                            <button onclick="UI.insert_focused('cpartfrac(')">cpartfrac</button>
                            sur C.
                        </li>
                        <li>
                            <button onclick="UI.insert_focused('texpand(')">texpand</button>
                            d&eacute;veloppe les expressions trigonom&eacute;triques,
                            exponentielles et logarithmes,
                            <button onclick="UI.insert_focused('lin(')">lin</button>
                            lin&eacute;rise les exponentielles,
                            <button onclick="UI.insert_focused('tlin(')">tlin</button>
                            lin&eacute;rise les expressions trigonom&eacute;triques.
                        </li>
                        <li> <button onclick="UI.insert_focused('subst(')">subst</button>
                            permet de substituer une ou des variables par une ou des valeurs
                        </li>
                        <li> Conversions trigo: <button onclick="UI.insert_focused('trigcos(')">trigcos</button>,
                            <button onclick="UI.insert_focused('trigsin(')">trigsin</button>,
                            <button onclick="UI.insert_focused('trigtan(')">trigtan</button>,
                            <button onclick="UI.insert_focused('halftan(')">halftan</button>,
                            <button onclick="UI.insert_focused('tan2sincos(')">tan2sincos</button>
                        </li>
                        <li> Autres: <button onclick="UI.insert_focused('trig2exp(')">trig2exp</button>,
                            <button onclick="UI.insert_focused('exp2trig(')">exp2trig</button>
                            <button onclick="UI.insert_focused('pow2exp(')">pow2exp</button>,
                            <button onclick="UI.insert_focused('exp2pow(')">exp2pow</button>
                            <button onclick="UI.insert_focused('lncollect(')">lncollect</button>
                            <button onclick="UI.insert_focused('lnexpand(')">lnexpand</button>
                        </li>
                    </ul>
                </span>
            </li>
            <li style="display:inline">
                <button class="bouton"
                        onclick="var tmp=$id('tutolinalg'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
                <strong>Alg&egrave;bre lin&eacute;aire </strong>
                </button>
                <span id="tutolinalg" style="display:none">
                    <ul>
                        <li>  Pour cr&eacute;er un vecteur, tapez ses coordonn&eacute;es
                            s&eacute;par&eacute;es par des virgules entre 2 crochets [].
                            <button onclick="UI.insert_focused('dot(')">dot</button> produit
                            scalaire de deux vecteurs,   <button onclick="UI.insert_focused('cross(')">cross</button> produit
                            vectoriel en dimension 2 ou 3.
                        </li>
                        <li>
                            Pour cr&eacute;er une matrice, utilisez l'assistant <tt>matrix</tt>
                            du menu <tt>math</tt>. Vous pouvez d&eacute;finir les coefficients par
                            une formule en fonction de la ligne et de la colonne ou
                            &eacute;l&eacute;ment par &eacute;l&eacute;ment
                            (vous pouvez entrer plusieurs coefficients en les s&eacute;parant par
                            un espace et passer &agrave; la ligne suivante avec Entree). Pour
                            une matrice al&eacute;atoire, utilisez l'assistant <tt>alea</tt>.
                        </li>
                        <li>
                            Les indices de lignes et colonnes commencent &agrave; 0 avec une
                            seule paire de <tt>[]</tt> et &agrave; 1 avec une double-paire
                            <tt>[[]]</tt>, par
                            exemple
                            <button onclick="UI.insert_focused('A[0,1]')">A[0,1]</button>
                            ou <button onclick="UI.insert_focused('A[[1,2]]')">A[[1,2]]</button>.
                        <li>
                            Vous pouvez utiliser <tt>+,-,*</tt> et <button onclick="UI.insert_focused('matpow(')">matpow</button> pour
                            effectuer les op&eacute;rations usuelles sur les matrices.
                        </li>
                        <li>
                            <button onclick="UI.insert_focused('tran(')">tran</button>
                            transpos&eacute;e, <button onclick="UI.insert_focused('tran(')">trn</button>: transconjugu&eacute;e,
                            <button onclick="UI.insert_focused('idn(')">idn</button> identit&eacute;
                        </li>
                        <li>
                            <button onclick="UI.insert_focused('linsolve(')">linsolve</button>
                            syst&egrave;me lin&eacute;aire,
                            <button onclick="UI.insert_focused('rref(')">rref</button> :
                            pivot de Gauss,
                            <button onclick="UI.insert_focused('p,l,u:=lu(')">det</button>
                            : d&eacute;terminant,
                            <button onclick="UI.insert_focused('inv(')">inv</button>
                            : inverse,
                            <button onclick="UI.insert_focused('p,l,u:=lu(')">lu</button>
                            : d&eacute;composition LU et application &agrave;
                            <button onclick="UI.insert_focused('linsolve(p,l,u,')">linsolve</button>,
                        </li>
                        <li>
                            <button onclick="UI.insert_focused('charpoly(')">charpoly(</button>
                            polynome caract&eacute;ristique ou
                            <button onclick="UI.insert_focused('pmin(')">pmin(</button>
                            minimal,
                            <button onclick="UI.insert_focused('p,d:=jordan(')">p,d:=jordan(</button>
                            vecteurs et valeurs propres.
                        </li>
                        <li>
                            Factorisations
                            <button onclick="UI.insert_focused('lu(')">lu</button>,
                            <button onclick="UI.insert_focused('cholesky(')">cholesky</button>,
                            <button onclick="UI.insert_focused('qr(')">qr</button>,
                            <button onclick="UI.insert_focused('svd(')">svd</button>
                        </li>
                        <li> Normes
                            <button onclick="UI.insert_focused('l1norm(')">l1norm</button>,
                            <button onclick="UI.insert_focused('l2norm(')">l2norm</button>,
                            <button onclick="UI.insert_focused('maxnorm(')">maxnorm</button> :
                            <button onclick="UI.insert_focused('matrix_norm(')">matrix_norm</button>
                            de matrice subordonn&eacute;e
                        </li>
                    </ul>
            <li style="display:inline">
            <button class="bouton"
                    onclick="var tmp=$id('tutoarit'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
            <strong>Arithm&eacute;tique</strong>
            </button>
            <span id="tutoarit" style="display:none">
            Les commandes fr&eacute;quentes se trouvent dans le menu Math, bouton arit.
            Certaines commandes agissent indiff&eacute;ramment sur les entiers
            et sur les polyn&ocirc;mes, par exemple <tt>gcd</tt> ou <tt>lcm</tt>,
            d'autres commandes ont deux versions, celle qui agit sur des entiers
            a comme initiale <tt>i</tt>, par exemple <tt>irem</tt> est le reste
            euclidien pour des entiers, et <tt>rem</tt> pour des polyn&ocirc;mes.
            <ul>
            <li>
            <button onclick="UI.insert_focused('gcd(')">gcd</button>,
            <button onclick="UI.insert_focused('lcm(')">lcm</button> PGCD et PPCM
            </li>
            <li>
            <button onclick="UI.insert_focused('irem(')">irem</button>,
            <button onclick="UI.insert_focused('iquo(')">iquo</button>,
            <button onclick="UI.insert_focused('iquorem(')">iquorem</button>:
            reste et quotient de la division euclidienne sur les entiers
            </li>
            <li>
            <button onclick="UI.insert_focused('iegcd(')">iegcd</button> identit&eacute;
            de B&eacute;zout sur les entiers,
            <button onclick="UI.insert_focused('iabcuv(')">iabcuv</button> solutions
            de au+bv=c,
            <button onclick="UI.insert_focused('isprime(')">isprime</button> test de pseudo-primalit&eacute;,
            <button onclick="UI.insert_focused('nextprime(')">nextprime</button>
            prochain nombre premier,
            <button onclick="UI.insert_focused('ifactor(')">ifactor</button>
            factorisation d'entier, indicatrice d'<button onclick="UI.insert_focused('euler(')">Euler</button>,
            <button onclick="UI.insert_focused('powmod(')">powmod</button> puissance
            modulaire rapide.
            </li>
            <li>
            <button onclick="UI.insert_focused('rem(')">rem</button>,
            <button onclick="UI.insert_focused('quo(')">quo</button>,
            <button onclick="UI.insert_focused('quorem(')">quorem</button>:
            reste et quotient de la division euclidienne sur les polynomes. La
            variable par d&eacute;faut est <tt>x</tt>, sinon l'indiquer en
            3&egrave;me argument
            <li>
            <button onclick="UI.insert_focused('egcd(')">egcd</button> identit&eacute;
            de B&eacute;zout sur les polynomes,
            <button onclick="UI.insert_focused('abcuv(')">abcuv</button> solutions
            de au+bv=c,
            <button onclick="UI.insert_focused('horner(')">horner</button> valeur en
            un point par Horner,
            <button onclick="UI.insert_focused('interp(')">interp</button> interpolation
            polynomiale.
            </li>
            <li> Pour travailler dans ℤ/nℤ, utiliser le signe <tt>mod</tt>, par
            exemple <tt>x^3+5x-11 mod 17</tt> est un polynome a coefficients dans ℤ/17ℤ.
            Pour travailler sur un corps fini non premier, utiliser la
            commande
            <button onclick="UI.insert_focused('GF(')">GF</button>
            </li>
            </ul>
            </span>
            </li>
            <li style="display:inline">
            <button class="bouton"
                    onclick="var tmp=$id('tutosolve'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
            <strong>R&eacute;soudre</strong>
            </button>
            <span id="tutosolve" style="display:none">
            Depuis le bouton <tt>math</tt>
            <ul>
            <li> l'assistant <tt>solve</tt>
            vous guidera pour r&eacute;soudre une &eacute;quation ou un
            syst&egrave;me
            polynomial en mode exact ou approch&eacute; sur les r&eacute;els ou
            les complexes (fonctions
            <button onclick="UI.insert_focused('solve(')">solve</button>
            <button onclick="UI.insert_focused('csolve(')">csolve</button>
            <button onclick="UI.insert_focused('fsolve(')">fsolve</button>
            <button onclick="UI.insert_focused('cfsolve(')">cfsolve</button>)
            </li>
            <li>
            Pour r&eacute;soudre une &eacute;quation diff&eacute;rentielle,
            cliquez sur <tt>analyse</tt> du menu <tt>Math</tt>,
            <button onclick="UI.insert_focused('desolve(')">desolve</button> pour un
            calcul exact,
            <button onclick="UI.insert_focused('odesolve(')">odesolve</button>
            approch&eacute;, ou cliquez sur <tt>graphe</tt> puis
            <button onclick="UI.insert_focused('odeplot(')">ode</button>
            pour un graphe de solution approch&eacute;e.
            </li>
            <li>
            Pour calculer le terme g&eacute;n&eacute;ral d'une suite
            r&eacute;currente (ou d'un syst&egrave;me), cliquez sur <tt>u_n</tt>
            du menu <tt>Math</tt> (commande
            <button onclick="UI.insert_focused('rsolve(')">rsolve</button>).
            </li>
            </ul>
            </span>
            </li>
            <li style="display:inline">
            <button class="bouton"
                    onclick="var tmp=$id('tutoanalyse'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
            <strong>Analyse</strong>
            </button>
            <span id="tutoanalyse" style="display:none">
            Le <tt>math</tt> contient des assistants pour
            d&eacute;finir une fonction (bouton <tt>fonct</tt>),
            d&eacute;terminer le tableau de variations d'une expression
            (<tt>f(x)</tt>),
            travailler avec des suites (<tt>u_n</tt>),
            calculer une somme (<tt>∑</tt>), des limites (<tt>limit</tt>),
            des d&eacute;riv&eacute;es (<tt>∂</tt>),
            des primitives et valeurs d'int&eacute;grales (<tt>∫</tt>),
            des d&eacute;veloppement limit&eacute;s  (<tt>series</tt>).
            <br>
            Par exemple pour d&eacute;finir une fonction alg&eacute;brique
            <tt>f</tt> d'une variable, cliquer sur
            <tt>fonct</tt> de <tt>math</tt> puis
            mettre <tt>f</tt> comme nom de fonction,
            <tt>x</tt> comme liste des arguments et <tt>sin(x^2)</tt> comme
            valeur renvoy&eacute;ee :
            <button onclick="UI.insert_focused('f(x):=sin(x^2):;')"><tt>f(x):=sin(x^2)</tt></button>.
            On peut ensuite calcule la valeur
            de <tt>f</tt> ou de sa d&eacute;riv&eacute;e par
            <button onclick="UI.insert_focused('f(sqrt(pi)); f\'(2);f\'(y);')">
            <tt>f(sqrt(pi)); f'(2); f'(y) </tt></button>.
            <br>
            Une d&eacute;riv&eacute;e se calcule avec
            <button onclick="UI.insert_focused('diff(')">diff</button> ou <tt>'</tt>.
            Une primitive d'une
            expression se calcule avec <button onclick="UI.insert_focused('integrate(')">int</button>, par
            exemple <button onclick="UI.insert_focused('integrate(1/(x^4-1))')">int(1/(x^4-1));</button>,
            pour une int&eacute;grale entre deux bornes
            <button onclick="UI.insert_focused('int(1/(x^4+1),x,0,+infinity)')">
            int(1/(x^4+1)^4,x,0,+infinity);</button>.
            <br>
            Enfin  <button onclick="UI.insert_focused('limit(')">limit</button> et
            <button onclick="UI.insert_focused('series(')">series</button>
            permettent de calculer une limite ou un d&eacute;veloppement de
            Taylor, par exemple
            <button onclick="UI.insert_focused('limit(sin(x)/x,x=0); series(sin(x),x=0,5,polynom)')">
            limit(sin(x)/x,x=0); series(sin(x),x=0,5,polynom);</button>
            </span>
            </li>
            <li style="display:inline">
            <button class="bouton"
                    onclick="var tmp=$id('tutoproba'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
            <strong>Probabilit&eacute;s </strong></button>
            <span id="tutoproba" style="display:none">
            Utiliser l'assistant <tt>al&eacute;a</tt> de <tt>math</tt> pour
            g&eacute;n&eacute;rer des nombres pseudo-al&eacute;atoires.
            <br>
            Lois continues:
            <button onclick="UI.insert_focused('uniformd(')">uniformd</button>,
            <button onclick="UI.insert_focused('normald(')">normald</button>,
            <button onclick="UI.insert_focused('studentd(')">studentd</button>,
            <button onclick="UI.insert_focused('chisquared(')">chisquared</button>,
            <button onclick="UI.insert_focused('gammad(')">gammad</button>,
            <button onclick="UI.insert_focused('exponentiald(')">exponentiald</button>,
            <button onclick="UI.insert_focused('cauchyd(')">cauchyd</button>,
            <button onclick="UI.insert_focused('fisherd(')">fisherd</button>,
            <button onclick="UI.insert_focused('betad(')">betad</button>.
            <br>
            Lois discr&egrave;tes :
            <button onclick="UI.insert_focused('binomial(')">binomial</button>,
            <button onclick="UI.insert_focused('negbinomial(')">negbinomial</button>,
            <button onclick="UI.insert_focused('geometric(')">geometric</button>,
            <button onclick="UI.insert_focused('poisson(')">poisson</button>.
            <br>
            Les distributions cumul&eacute;es s'obtiennent en rajoutant le
            suffixe <tt>_cdf</tt> ou par la commande  <button onclick="UI.insert_focused('cdf(')">cdf</button>, et les
            inverses avec le suffixe  <tt>_icdf</tt> ou par la commande  <button onclick="UI.insert_focused('icdf(')">icdf</button>.
            <br>
            La commande    <button onclick="UI.insert_focused('histogram(')">histogram</button>
            permet de repr&eacute;senter un histogramme.
            <br>
            La commande    <button onclick="UI.insert_focused('markov(')">markov</button> permet
            de d&eacute;composer une matrice de transition.
            </span>
            </li>
            <li style="display:inline">
            <button class="bouton"
                    onclick="var tmp=$id('tutograph'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
            <strong>Graphes </strong>
            </button>
            <span id="tutograph" style="display:none">
            Utiliser les assistants du bouton <tt>math</tt> pour
            cr&eacute;er un graphe d'une fonction d'une ou deux variables
            (<tt>plot</tt>, voir aussi <tt>f(x)</tt> pour avoir un tableau
            de variations),
            une courbe ou surface param&eacute;trique (<tt>param</tt>), un champ de tangentes
            pour une &eacute;quation diff&eacute;rentielle (<tt>field</tt>).
            <br>
            Exemples
            <button onclick="UI.insert_focused('plot([sin(x),x-x^3/3!],x=-3..3,color=[red,blue])')">
            <tt>plot([sin(x),x-x^3/3!],x=-3..3,color=[red,blue])</tt>
            </button> affiche
            le graphe 2d des fonctions sin(x) et x-x^3/6, alors que
            <button onclick="UI.insert_focused('plotfunc(x^2-y^2,[x=-2..2,y=-2..2]);plan(z=0,color=cyan+filled);')">
            <tt>plotfunc(x^2-y^2,[x=-2..2,y=-2..2]);plan(z=0,color=cyan+filled);</tt>
            </button>
            affiche un graphe 3d avec un plan, vous pouvez changer de point de
            vue &agrave; la souris.
            <br>
            Vous pouvez aussi utiliser de nombreuses instructions
            g&eacute;om&eacute;triques:
            <button onclick="UI.insert_focused('point(')">point</button>,
            <button onclick="UI.insert_focused('milieu(')">milieu</button>,
            <button onclick="UI.insert_focused('droite(')">droite</button>,
            <button onclick="UI.insert_focused('bissectrice(')">bissectrice</button>,
            <button onclick="UI.insert_focused('mediatrice(')">mediatrice</button>,
            <button onclick="UI.insert_focused('segment(')">segment</button>,
            <button onclick="UI.insert_focused('triangle(')">triangle</button>,
            <button onclick="UI.insert_focused('cercle(')">cercle</button>,
            <button onclick="UI.insert_focused('ellipse(')">ellipse</button>,
            <button onclick="UI.insert_focused('hyperbole(')">hyperbole</button>,
            <button onclick="UI.insert_focused('parabole(')">parabole</button>, ...
            </span>
            </li>
            <li style="display:inline">
            <button class="bouton"
                    onclick="var tmp=$id('tutoprog'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
            <strong>Programmation</strong>
            </button>
            <span id="tutoprog" style="display:none">
            Si vous n'avez jamais programm&eacute;, vous pouvez apprendre
            &agrave; le faire avec la tortue, cliquez sur le tutoriel
            <tt>Tortue</tt>.
            <br>
            Le bouton <tt>Prog</tt> affiche des assistants
            pour cr&eacute;er les structures de programmation
            (test, boucle, fonction). Pour passer &agrave; la ligne dans un
            champ d'entr&eacute;e d&eacute;j&agrave; valid&eacute; que vous
            modifiez, tapez Entree. Dans
            la ligne de commande en bas de page, il faut
            taper simultan&eacute;ment sur Shift-Entree ou utiliser le
            bouton <tt>\n</tt>.
            Pour indenter, utilisez le bouton <tt>→|</tt>.
            Le bouton <tt>debug</tt>
            permet d'ex&eacute;cuter une fonction en mode pas &agrave; pas
            pour la mettre au point.
            <br>
            Plusieurs syntaxes sont accept&eacute;es,
            dont une syntaxe en francais tr&egrave;s proche du langage
            algorithmique et une syntaxe compatible avec
            <button onclick="var tmp=$id('progpython'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">Python</button>
            Vous pouvez afficher un
            <button onclick="var tmp=$id('progex'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
            <strong>exemple de programme</strong>
            </button>, regarder les sessions exemples ou lire le
            <a href="irem/algolycee.html" target="_blank">manuel de
            programmation</a> lyc&eacute;e.
            <div id="progpython" style="display:none">
            La syntaxe Python dans Xcas permet aux utilisateurs du langage
            Python une prise en main plus rapide de Xcas.
            Il faut prendre quelques pr&eacute;cautions :
            <ul>
            <li> activez la compatibilit&eacute; de syntaxe Python dans la
            configuration (bouton en haut &agrave; gauche), afin que les
            assistants utilisent des structures de controle Python et que
            certaines commandes comme <tt>int</tt> aient le m&ecirc;me
            comportement qu'en Python.
            <li> la syntaxe Python est activ&eacute;e lorsqu'on
            commence une commande par un commentaire Python (<tt>#</tt>), ou
            une structure de controle Python (<tt>def ...:</tt>,
            <tt>if...:</tt>, ...).
            <li> la compatibilit&eacute; se limite &agrave; la
            programmation imp&eacute;rative courante: test, boucle,
            fonction, slices, liste en compr&eacute;hension simple.
            La programmation orient&eacute;e objet n'est pas
            support&eacute;e, <tt>yield</tt>, le <tt>else</tt> en fin de <tt>for/while</tt>
            ou les listes en compr&eacute;hension imbriqu&eacute;es non plus.
            <li> il est inutile de charger des modules avec <tt>import</tt>,
            toutes les instructions Xcas sont directement accessibles. Les
            instructions built-in Python fonctionnent en
            g&eacute;n&eacute;ral en Xcas (sauf pour les chaines) ainsi
            que le module <tt>random</tt> (et <tt>math/cmath</tt> bien sur).
            Par contre les modules comme <tt>matplotlib, scipy, numpy</tt>
            ne sont pas support&eacute;s, il faut utiliser des instructions
            natives Xcas &agrave; la place (utilisez l'assistant Maths pour
            trouver les plus courantes).
            R&eacute;ciproquement, une session Xcas &eacute;crite en syntaxe Python
            qui contient des objets CAS
            (expressions symboliques, flottants multi-pr&eacute;cisions, ...)
            ou certaines commandes int&eacute;gr&eacute;es de Xcas
            (par exemple commandes de trac&eacute;)
            ne fonctionnera pas en Python pur.
            <li> choisissez des noms de fonction commencant par une
            majuscule pour &eacute;viter les conflits avec des noms de
            commande de Xcas.
            Il est conseill&eacute; de d&eacute;clarer les
            variables locales dans une fonction avec un commentaire
            <tt># local nom_des_variables_locales</tt>
            <li> les d&eacute;limiteurs de chaines de caract&egrave;res sont
            <tt>"..."</tt>, en effet <tt>'...'</tt> sert en calcul formel
            &agrave; diff&eacute;rer l'&eacute;valuation d'une expression
            <li> la division de deux entiers renvoie un rationnel (ou un
            entier), et pas un nombre flottant
            <li> <tt>^</tt> est synonyme de <tt>**</tt>
            <li> <tt>liste1+liste2</tt> ne concat&egrave;ne pas deux listes mais les
            additionne comme des vecteurs, utilisez
            <tt>liste1.extend(liste2)</tt>  pour concat&eacute;ner,
            <tt>n*liste</tt> ne duplique pas une liste, utilisez <tt>liste*n</tt>.
            <li> <tt>=</tt> est traduit en <tt>:=</tt>. On peut bien sur
            utiliser <tt>:=</tt> pour l'affectation &agrave; la place de
            <tt>=</tt>, mais il n'est pas
            possible d'utiliser certaines facilit&eacute;s de notation Xcas
            comme par exemple <tt>P:=x^3-2x+1; P(x=x+1)</tt> (il faudrait utiliser
            ici <tt>subst(P,x,x+1)</tt>)
            <li> l'affectation dans une liste se fait par
            r&eacute;f&eacute;rence en Python, dans Xcas elle se fait par valeur
            si on utilise <tt>=</tt>, par r&eacute;f&eacute;rence avec <tt>=<</tt>.
            </ul>
            </div>
            <div id="progex" style="display:none">
            Voici un programme calculant
            la somme des carr&eacute;s de 1 &agrave; x &eacute;crit en syntaxe Xcas
            <br>
            <tt>fonction f(x)
            <br>
            &nbsp;&nbsp;local y,s;
            <br>
            &nbsp;&nbsp;si x &gt; 100000 alors retourne "Nombre trop grand"; fsi;
            <br>
            &nbsp;&nbsp;s:=0;
            <br>
            &nbsp;&nbsp;pour y de 1 jusque x faire
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;s:=s+y^2;
            <br>
            &nbsp;&nbsp;fpour
            <br>
            &nbsp;&nbsp;retourne s;
            <br>
            ffonction:;
            </tt><br>
            En syntaxe compatible Python<br>
            <tt>def f(x):<br>
            &nbsp;&nbsp;&nbsp;&nbsp;# local y,s<br>
            &nbsp;&nbsp;&nbsp;&nbsp;if x &gt; 100000:<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return "Nombre trop grand"<br>
            &nbsp;&nbsp;&nbsp;&nbsp;s=0<br>
            &nbsp;&nbsp;&nbsp;&nbsp;for y in range(x+1):<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s=s+y**2<br>
            &nbsp;&nbsp;&nbsp;&nbsp;return s<br>
            </tt>
            <button onclick="UI.insert_focused('fonction f(x)\n  local y,s;\n  si x &gt; 100 alors retourne &quot;Nombre trop grand&quot; fsi;\n  s:=0;\n  pour y de 1 jusque x faire\n    s:=s+y^2;\n  fpour\n  retourne s;\nffonction:; ')">Tester (Xcas)</button>
            <button onclick="UI.insert_focused('def f(x):\n    # local y,s\n    if x > 100000:\n        return &quot;Nombre trop grand&quot;\n    s=0\n    for y in range(x+1):\n        s=s+y**2\n    return s\n')">Tester (Python)</button>
            <br>
            <br>
            </div>
            </span>
            </li>
            <li style="display:inline">
            <button class="bouton"
                    onclick="var tmp=$id('tutotortue'); if (tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">
            <strong>Tortue</strong>
            </button>
            <span id="tutotortue" style="display:none">
            La tortue est un module pour apprendre &agrave; programmer,
            utilisable d&egrave;s le primaire. Il s'agit d'un robot
            qui se d&eacute;place selon des commandes avec un crayon
            qui marque son passage, avec une couleur donn&eacute;e.
            <br>
            Tapez Ctrl-T ou cliquez sur le bouton Prog puis Tortue &agrave;
            droite pour faire apparaitre les commandes de la tortue.
            Cliquez sur le bouton <tt>nouveau</tt> de la premi&egrave;re ligne des
            commandes de la tortue pour cr&eacute;er un nouveau dessin tortue.
            <br>
            Deux champs d'entr&eacute;e
            sont cr&eacute;&eacute;s, le premier pour d&eacute;finir des fonctions,
            le second pour saisir en-dessous
            de la commande <tt>efface</tt>
            des commandes de d&eacute;placement de la tortue ou des
            appels &agrave; des fonctions (d&eacute;finies auparavant au-dessus),
            La barre de bouton &agrave; droite du bouton <tt>nouveau</tt>
            <tt>av rec td ...</tt>
            permet de saisir facilement les commandes de d&eacute;placement, comme
            <tt>avance</tt> (la tortue avance de 10 pas ou de la longueur
            indiqu&eacute;e en param&egrave;tre), <tt>recule</tt>, <tt>tourne_droite</tt>
            (la tortue tourne &agrave; droite, par d&eacute;faut de 90
            degr&eacute;s), etc.
            <br>
            Par exemple, si vous cliquez juste en-dessous de <tt>efface</tt>,
            puis sur le bouton <tt>av</tt> puis sur le bouton <tt>tg</tt> puis
            validez la ligne, la tortue se d&eacute;placera de 10 pixels vers
            la gauche puis s'orientera vers le haut.
            <br>
            Le premier champ d'entr&eacute;e sert &agrave; d&eacute;finir des
            fonctions regroupant plusieurs instructions de d&eacute;placement,
            il peut contenir des tests et des boucles. Vous pouvez vous aider
            des assistants <tt>test</tt>, <tt>boucle</tt> et <tt>fonct</tt>
            pour cr&eacute;er une nouvelle fonction.
            <br>
            Voici un exemple de construction
            de carr&eacute;s et polygones r&eacute;guliers
            <a
                href="#python=0&exec&+fonction%20Carre(l)%0A%20%20local%20k%3B%0A%20%20pour%20k%20de%201%20jusque%204%20faire%0A%20%20%20%20avance(l)%3B%0A%20%20%20%20tourne_gauche%3B%0A%20%20fpour%3B%0Affonction%3A%3B&+%23%0Aefface%0ACarre(40)%0Asaute%2080%0ACarre(40)&+fonction%20Polygone(l%2Cn)%0A%20%20local%20k%2Ct%3B%0A%20%20t%3A%3D360%2Fn%3B%0A%20%20pour%20k%20de%201%20jusque%20n%20faire%0A%20%20%20%20avance(l)%3B%0A%20%20%20%20tourne_gauche(t)%3B%0A%20%20fpour%3B%0Affonction%3A%3B&+%23%0Aefface%0APolygone(50%2C5)&"
                target="_blank">
            Xcas</a>,
            <a
                href="#python=1&exec&+def%20Carre(l)%3A%0A%20%20%20%20%23%20local%20k%0A%20%20%20%20for%20k%20in%20range(4)%3A%0A%20%20%20%20%20%20%20%20avance(l)%0A%20%20%20%20%20%20%20%20tourne_gauche&+%23%0Aefface%0ACarre(40)%0Asaute%2080%0ACarre(40)&+def%20Polygone(l%2Cn)%3A%0A%20%20%20%20%23%20local%20k%2Ct%0A%20%20%20%20t%3D360%2Fn%0A%20%20%20%20for%20k%20in%20range(n)%3A%0A%20%20%20%20%20%20%20%20avance(l)%0A%20%20%20%20%20%20%20%20tourne_gauche(t)&+%23%0Aefface%0APolygone(50%2C5)&"
                target="_blank">Python</a>, ou
            <a
                href="#python=0&exec&+sap(n)%3A%3D%7B%0A%20%20triangle_plein(5*n%2C5*n)%3B%0A%20%20tourne_gauche%20%3B%0A%20%20triangle_plein(5*n%2C5*n)%3B%0A%20%20saute%204*n%3B%0A%20%20triangle_plein(4*n%2C4*n)%3B%0A%20%20tourne_droite%20%3B%0A%20%20triangle_plein(4*n%2C4*n)%3B%0A%20%20pas_de_cote%20-4*n%3B%0A%7D%3A%3B&+sapins2(n)%3A%3D%7B%0A%20%20si%20n%3C%3D1%20alors%20crayon%20jaune%3B%20disque%2010%3B%20crayon%20vert%3B%20return%3B%20fsi%3B%0A%20%20crayon%20vert%3B%0A%20%20sap(n)%3B%0A%20%20tourne_gauche%2030%3B%0A%20%20saute%2010*n%3B%0A%20%20tourne_droite%2030%3B%0A%20%20sapins2(n-2)%3B%0A%20%20tourne_droite%2030%3B%0A%20%20saute%2010*n%3B%0A%20%20tourne_gauche%2030%3B%0A%20%20sap(n)%3B%0A%7D%3A%3B&+efface%3B%0Apas_de_cote%2050%3B%0Asaute%20-75%3B%0Asapins2(8)%3B%0Acrayon%20bleu%3B%0Asigne%20%22Joyeux%20Xcas%22&"
                target="_blank">
            Joyeux Xcas</a>,
            <a
                href="#python=1&exec&+def%20sap(n)%3A%0A%20%20%20%20triangle_plein(5*n%2C5*n)%0A%20%20%20%20tourne_gauche%0A%20%20%20%20triangle_plein(5*n%2C5*n)%0A%20%20%20%20saute%204*n%0A%20%20%20%20triangle_plein(4*n%2C4*n)%0A%20%20%20%20tourne_droite%0A%20%20%20%20triangle_plein(4*n%2C4*n)%0A%20%20%20%20pas_de_cote%20-4*n&+def%20sapins2(n)%3A%0A%20%20%20%20if%20n%3C%3D1%3A%0A%20%20%20%20%20%20%20%20crayon%20jaune%0A%20%20%20%20%20%20%20%20disque%2010%20%0A%20%20%20%20%20%20%20%20crayon%20vert%20%0A%20%20%20%20%20%20%20%20return%0A%20%20%20%20crayon%20vert%0A%20%20%20%20sap(n)%0A%20%20%20%20tourne_gauche%2030%0A%20%20%20%20saute%2010*n%0A%20%20%20%20tourne_droite%2030%0A%20%20%20%20sapins2(n-2)%0A%20%20%20%20tourne_droite%2030%0A%20%20%20%20saute%2010*n%0A%20%20%20%20tourne_gauche%2030%0A%20%20%20%20sap(n)&+%23%0Aefface%0Apas_de_cote%2050%0Asaute%20-75%0Asapins2(8)%0Acrayon%20bleu%0Asigne%20%22Joyeux%20Xcas%22&"
                target="_blank">Joyeux Xcas (version Python)</a>
            <br>
            Le <a
                href="https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac/doc/fr/castor/index.html"
                target="_blank">manuel
            tortue</a> de Xcas explique ces commandes et contient de nombreux
            exemples d'activit&eacute;s d&egrave;s le primaire.
            </span>
            </li>
            <li style="display:inline">
            <button class="bouton"
                    onclick="var l=['tutocfg','tutonet','tutoinst','tutoex','tutoex2','tutointro','tutointerface','tutokbd','tutosimplifier','tutoarit','tutosolve','tutoanalyse','tutoproba','tutoprog','tutograph','tutolinalg','tutotortue','manuels','apropos']; var s=l.length; for (var i=0;i<s;++i) $id(l[i]).style.display='none';">
            <em>Replier tout</em>
            </button>
        </ul>
        </span>
<div id="divhelpoutput" style="max-height: 200px; overflow:auto">
  <table id="helpoutput" title="Aide" style="max-width:1000px "></table>
</div>
<div>
  <button id="bouton_math" class="bouton" onclick="UI.show_menu();"
          title="Montrer ou cacher les assistants math&eacute;matiques">
    <img WIDTH="28" HEIGHT="28" SRC="logo.png" alt="Maths" align="center">
    Math
  </button><button id="prog_key" class="bouton" title="Programmation" onclick="var tmp=$id('progbuttons'); if (tmp.style.display=='none'){ tmp.style.display='block';} else { tmp.style.display='none';}">Prog</button><button class="bouton" id="button_123" onmousedown="event.preventDefault()"
          onclick="if ($id('keyboard').style.display=='inline'){ $id('keyboard').style.display='none'; $id('alpha_keyboard').style.display='none';} else UI.kbdonfuncoff(); if (UI.focusaftereval){ UI.focused.focus(); }"
          title="Montrer ou cacher le clavier scientifique">123
  </button>
  <button class="bouton" style="vertical-align:bottom"
          onclick="if($id('help').style.display=='none')
                $id('help').style.display='block';
                else $id('help').style.display='none';"
          title="Montrer ou cacher la documentation">
    <strong>Doc</strong>
  </button><textarea cols="9" class="bouton" style="font-size:large;vertical-align:bottom" id="helptxt"
            title="Aide courte sur un nom de commande" rows=1 onclick="UI.focused=this;" onkeypress="if (event.keyCode!=13) return true;UI.addhelp('?',value); return false;"></textarea><button class="bouton" style="vertical-align:bottom" onmousedown="event.preventDefault()"
          title="Efface l'aide" onclick="var helptxt=$id('helptxt'); helpoutput.innerHTML='';helptxt.value='';$id('helptxt').focus();">&#x232b;
  </button>
</div>
<table border="0" align="center" summary="" id="keyboard"
       style="display:none" onmousedown="event.preventDefault()">
  <tr>
    <td>
      <input type="button" style="width:29px;height:35px;"
             name="add_newline" id="add_newline" value=" "
             onmousedown="event.preventDefault()" onClick="if (UI.kbdshift) UI.insert_focused(' \n') ; else UI.insert_focused(' ');">
      <input type="button" style="width:29px;height:35px;" name="add_sin" id="add_sin" value="sin" onmousedown="event.preventDefault()" onClick="UI.insert_focused(value+'(')" title="fonction sinus, taper asin pour arcinus">
      <input type="button" style="width:29px;height:35px;" name="add_cos"
             id="add_cos"
             value="cos" onmousedown="event.preventDefault()" onClick="UI.insert_focused(value+'(')" title="fonction cosinus, taper acos pour arccosinus">
      <input type="button" style="width:29px;height:35px;" name="add_tan"
             id="add_tan"
             value="tan" onmousedown="event.preventDefault()" onClick="UI.insert_focused(value+'(')" title="fonction tangente, taper atan pour arctangente">
      <input type="button" style="width:29px;height:35px;" name="add_ln"
             id="add_ln"
             value="exp" onmousedown="event.preventDefault()" onClick="UI.insert_focused(value+'(')" title="logarithme neperien et exponentielle.">
      <input type="button" style="width:29px;height:35px;" name="add_^" id="add_^" value="^" onmousedown="event.preventDefault()" onClick="UI.insert_focused('^')">
      <input type="button" style="width:29px;height:35px;" name="add_7" id="add_7" value="7" onmousedown="event.preventDefault()" onClick="UI.insert_focused('7')">
      <input type="button" style="width:29px;height:35px;" name="add_8" id="add_8" value="8" onmousedown="event.preventDefault()" onClick="UI.insert_focused('8')">
      <input type="button" style="width:29px;height:35px;" name="add_9" id="add_9" value="9" onmousedown="event.preventDefault()" onClick="UI.insert_focused('9')">
      <input type="button" style="width:29px;height:35px;" name="add_/"
             id="add_/"
             value="/" onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)" title="Division. // pour faire un commentaire, % pour travailler dans Z/nZ.">
    </td>
  </tr>
  <tr>
    <td>
      <input type="button" style="width:29px;height:35px;" name="add_left_par" id="add_left_par" value="(" onmousedown="event.preventDefault()" onClick="UI.insert_focused(value);">
      <input type="button" style="width:29px;height:35px;" name="add_right_par" id="add_right_par" value=")" onmousedown="event.preventDefault()" onClick="UI.insert_focused(value);">
      <input type="button" style="width:29px;height:35px;" name="add_xtn"
             id="add_xtn"
             value="x,t,n" onmousedown="event.preventDefault()" onClick="UI.insert_focused(UI.xtn)" title="Ins&egrave;re x ou t ou n">
      <input type="button" style="width:29px;height:35px;" name="add_pi" id="add_pi" value="π" onmousedown="event.preventDefault()" onClick="if (UI.kbdshift) UI.insert_focused('∞'); else UI.insert_focused('pi')">
      <input type="button" style="width:29px;height:35px;" name="add_i"
             id="add_i"
             value="i" onmousedown="event.preventDefault()" onClick="UI.insert_focused('i')" title="Nombre complexe racine carree de -1">
      <input type="button" style="width:29px;height:35px;" name="add_sqrt"
             id="add_sqrt"
             value="√" onmousedown="event.preventDefault()" onClick="if (UI.kbdshift) UI.insert_focused('^2'); else UI.insert_focused('sqrt(');" title="racine carree">
      <input type="button" style="width:29px;height:35px;" name="add_4" id="add_4" value="4" onmousedown="event.preventDefault()" onClick="UI.insert_focused('4')">
      <input type="button" style="width:29px;height:35px;" name="add_5" id="add_5" value="5" onmousedown="event.preventDefault()" onClick="UI.insert_focused('5')">
      <input type="button" style="width:29px;height:35px;" name="add_6" id="add_6" value="6" onmousedown="event.preventDefault()" onClick="UI.insert_focused('6')">
      <input type="button" style="width:29px;height:35px;" name="add_*" id="add_*" value="*" onmousedown="event.preventDefault()" onClick="UI.insert_focused('*')">
    </td>
  </tr>
  <tr>
    <td>
      <input type="button" style="width:29px;height:35px;"
             name="add_abc" id="add_abc" value="abc"
             onmousedown="event.preventDefault()" onClick="var tmp=$id('alpha_keyboard'); if (tmp.style.display=='none') tmp.style.display='inline'; else tmp.style.display='none'"
             title="clavier alphab&eacute;tique">
      <input type="button" style="width:29px;height:35px;" name="add-=" id="add-=" value="=" onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" style="width:29px;height:35px;" name="add_,"
             id="add_,"
             value="," onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)" title="La virgule est utilisee comme separateur des composantes d'un vecteur. La quote sert &agrave; empecher l'&eacute;valuation.">
      <input type="button" id="add_infer" value="&lt;"
             title=""
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value);">
      <input type="button" style="display:none" name="curseur_up"
             id="curseur_up"
             value="↑" onmousedown="event.preventDefault()" onClick="UI.moveCaretUpDown(UI.focused,-1)" title="deplace le curseur vers le haut">
      <input type="button" style="width:29px;height:35px;" name="copy_button" id="copy_button" value="cp"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(UI.selection)" title="Copie la derni&egrave;re ligne de commande s&eacute;lectionn&eacute;e vers le focus.">
      <input type="button" style="width:29px;height:35px;" name="add_dosel"
             id="add_dosel"
             value="sel" onmousedown="event.preventDefault()" onClick="UI.selectionne()" title="Selectionne.">
      <input type="button" style="width:29px;height:35px;" name="add_1" id="add_1" value="1" onmousedown="event.preventDefault()" onClick="UI.insert_focused('1')">
      <input type="button" style="width:29px;height:35px;" name="add_2" id="add_2" value="2" onmousedown="event.preventDefault()" onClick="UI.insert_focused('2')">
      <input type="button" style="width:29px;height:35px;" name="add_3" id="add_3" value="3" onmousedown="event.preventDefault()" onClick="UI.insert_focused('3')">
      <input type="button" style="width:29px;height:35px;" name="add_-" id="add_-" value="-" onmousedown="event.preventDefault()" onClick="UI.insert_focused('-')">
    </td>
  </tr>
  <tr>
    <td>
      <input type="button" style="width:29px;height:35px" id="shift_key" value="alt" title="Touches compl&eacute;mentaires" onmousedown="event.preventDefault()" onClick="UI.toggleshift();">
      <input type="button" style="width:29px;height:35px;" name="add_:"
             id="add_:"
             value=":=" onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)" title=":= effectue une affectation, par exemple a:=pi/2; sin(a). ! calcule une factorielle.">
      <input type="button" style="width:29px;height:35px;"
             name="add_semi" id="add_semi" value=";" onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)"
             title="Le point virgule permet de separer plusieurs commandes pour les executer en une fois, par exemple dans un programme.">
      <input type="button" id="add_super" value="&gt;"
             title=""
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value);">
      <input type="button" style="display:none" name="curseur_down" id="curseur_down" value="↓" onmousedown="event.preventDefault()" onClick="UI.moveCaretUpDown(UI.focused,1)" title="deplace le curseur vers le bas">
      <input type="button" style="width:29px;height:35px;"
             id="add_beg"
             value="beg" onmousedown="event.preventDefault()"
             onClick="UI.setselbeg(UI.focused);" title="Debut selection">
      <input type="button" style="width:29px;height:35px;"
             id="add_end"
             value="end" onmousedown="event.preventDefault()"
             onClick="UI.setselend(UI.focused)" title="Fin selection">
      <input type="button" style="width:29px;height:35px;" name="add_e"
             id="add_e"
             value="e" onmousedown="event.preventDefault()" onClick="UI.insert_focused('e')" title="e est la base de l'exponentielle ou le separateur entre la mantisse et l'exposant d'un nombre approche ">
      <input type="button" style="width:29px;height:35px;" name="add_0" id="add_0" value="0" onmousedown="event.preventDefault()" onClick="UI.insert_focused('0')">
      <input type="button" style="width:29px;height:35px;" name="add_." id="add_." value="." onmousedown="event.preventDefault()" onClick="UI.insert_focused('.')">
      <input type="button" style="width:29px;height:35px;" name="add_+" id="add_+" value="+" onmousedown="event.preventDefault()" onClick="UI.insert_focused('+')">
    </td>
  </tr>
</table>
<table border="0" align="center" summary="" id="keyboardfunc"
       style="display:none" onmousedown="event.preventDefault()">
  <tr>
    <td>
      <input type="button" style="width:60px;height:35px"
             name="add_rewritetrig" id="add_rewritetrig" value="r&eacute;ecr."
             onmousedown="event.preventDefault()"
             onClick="$id('assistant_rewrite').style.display='block';UI.funcoff();"
             title="Commandes pour transformer des expressions">
      <input type="button" style="width:29px;height:35px" name="add_calculus"
             id="add_calculus"
             value="analyse" onClick="$id('assistant_calculus').style.display='block';UI.funcoff();"
             title="Calcul diff&eacute;rentiel et int&eacute;gral">
      <input type="button" style="width:60px;height:35px" name="add_solve"
             id="add_solve"
             value="solve" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused; $id('assistant_solve').style.display='block';UI.set_focus('solveeq') ;"
             title="Assistant pour r&eacute;soudre une &eacute;quation ou expression=0 par rapport &agrave; une ou plusieurs variables">
      <input type="button" style="width:60px;height:35px"
             name="add_graph" id="add_graph" value="graph"
             onmousedown="event.preventDefault()"
             onClick="$id('assistant_graph').style.display='block';UI.funcoff();"
             title="Commandes de trac&eacute; de graphes">
      <input type="button" style="width:29px;height:35px" name="add_geo"
             id="add_geo"
             value="g&eacute;om&eacute;trie" onClick="$id('assistant_geo').style.display='block';UI.funcoff();"
             title="Commandes de g&eacute;om&eacute;trie">
      <input type="button" style="width:60px;height:35px"
             name="add_arit" id="add_arit" value="arit"
             onmousedown="event.preventDefault()"
             onClick="$id('assistant_arit').style.display='block';UI.funcoff();"
             title="Commandes d'arithm&eacute;tique">
      <input type="button" style="width:60px;height:35px"
             name="add_linalg" id="add_linalg" value="linalg"
             onmousedown="event.preventDefault()"
             onClick="$id('assistant_linalg').style.display='block';UI.funcoff();"
             title="Commandes d'alg&egrave;bre lin&eacute;aire">
      <input type="button" style="width:29px;height:35px" name="add_mathcomment"
             id="add_mathcomment"
             value="texte" onmousedown="event.preventDefault()"
             onClick="UI.eval_cmdline1('///Tapez votre commentaire, vous pouvez vous aider du bouton math pour taper des expressions en syntaxe Xcas',true)" title="Cr&eacute;e une entr&eacute;e commentaire.">
    </td>
  </tr>
  <tr>
    <td>
      <input type="button" style="width:60px;height:35px" name="add_tabvar"
             id="add_tabvar"
             value="f(x)" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused;$id('assistant_tabvar').style.display='block';"
             title="Etude de graphe de fonction ou de courbe parametrique, par exemple tabvar(sin(x)) ou tabvar([cos(2t),sin(3t)])">
      <input type="button" style="width:60px;height:35px"
             name="add_rsolve" id="add_rsolve" value="u_n"
             onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused;$id('assistant_suites').style.display='block';UI.xtn='n';" title="Recherche de l'expression du terme g&eacute;n&eacute;ral d'une suite r&eacute;currente, par exemple rsolve(u(n+2)===u(n+1)+u(n),u(n),[u(0)===1,u(1)==s=1])">
      <input type="button" style="width:50px;height:35px"
             name="add_seq" id="add_seq" value="list"
             onmousedown="event.preventDefault()"
             onClick="UI.funcoff();UI.savefocused=UI.focused;$id('assistant_seq').style.display='block';UI.set_focus('seqexpr')"
             title="assistant de cr&eacute;ation de liste ou tableau de valeurs, par exemple seq(j^2,j,1,n) cr&eacute;e la liste des carr&eacute;s des entiers de 1 &agrave; n ou seq(x^2,x,-2,2,0.1) cr&eacute;e la liste des carr&eacute;s des r&eacute;els de -2 &agrave; 2 par pas de 0.1">
      <input type="button" style="width:60px;height:35px"
             name="add_tableur" id="add_tableur" value="tabl."
             onmousedown="event.preventDefault()"
             onClick="UI.open_sheet(true);"
             title="Tableur">
      <input type="button" style="width:60px;height:35px"
             name="add_matr" id="add_matr" value="matrx"
             onmousedown="event.preventDefault()"
             onClick="UI.open_sheet(false);"
             title="assistant cr&eacute;ation de matrice">
      <input type="button" style="width:60px;height:35px"
             name="add_stats" id="add_stats" value="stats"
             title="Probabilit&eacute;s et statistiques"
             onmousedown="event.preventDefault()"
             onClick="UI.funcoff();UI.savefocused=UI.focused;var mat=$id('assistant_matr');mat.style.display='block';mat.matr_formule.checked=false;mat.matr_formuleshadow.checked=true;$id('matr_type_chooser').style.display='none';$id('matr_stat12').style.display='none';$id('matr_stats').style.display='block';UI.assistant_matr_setdisplay();$id('matr').style.display='none';$id('matr_matr').style.display='none';$id('matr_testhyp').style.display='none';$id('risque_alpha').style.display='none';"
      >
      <input type="button" style="width:60px;height:35px"
             name="add_rand" id="add_rand" value="al&eacute;a"
             onmousedown="event.preventDefault()"
             onClick="UI.savefocused=UI.focused;$id('assistant_rand').style.display='block';UI.assistant_rand_setdisplay();UI.funcoff();"
             title="g&eacute;n&eacute;rer un nombre, une liste ou une matrice al&eacute;atoirement">
      <input type="button" value="curseur" id="add_curseur" style="height:35px" onclick="UI.addcurseur(String.fromCharCode(UI.paramname),0,-5,5,0.125); UI.paramname++;" title="Ajoute un param&egrave;tre modifiable &agrave; la souris"/>
    </td>
  </tr>
</table>
<div id="progbuttons" style="display:none">
  <input type="button" style="width:29px;height:35px" name="add_//"
         id="add_//"
         value="//" onmousedown="event.preventDefault()" onClick="UI.insert_focused(UI.python_mode?'#':'//');UI.funcoff();" title="commentaire">
      <input type="button" style="width:29px;height:35px;" name="add_if"
             id="add_if"
             value="if" onmousedown="event.preventDefault()" onClick="UI.insert_focused('if :')" title="if condition: action "><input type="button" style="width:32px;height:35px;" name="add_else"
             id="add_else"
             value="else" onmousedown="event.preventDefault()" onClick="UI.insert_focused('else :')" title="if condition: action_vrai else: action_faux">
<input type="button"  name="add_for" style="width:29px;height:35px;"
             id="add_for"
             value="for" onmousedown="event.preventDefault()" onClick="UI.insert_focused('for in range():')" title="boucle for "><input type="button"  name="add_while" style="width:40px;height:35px;"
             id="add_while"
             value="while" onmousedown="event.preventDefault()" onClick="UI.insert_focused('while :')" title="boucle tantque ">
      <input type="button" name="add_def"
             id="add_def" style="width:29px;height:35px;"
             value="def" onmousedown="event.preventDefault()" onClick="UI.insert_focused('def f():')" title="definition de fonction "><input type="button" name="add_return"
             id="add_return" style="width:40px;height:35px;"
             value="return" onmousedown="event.preventDefault()" onClick="UI.insert_focused('return ')" title="valeur renvoyée par la fonction ">
<br>
  <input type="button" style="width:29px;height:35px" name="add_test"
         id="add_test"
         value="test" onmousedown="event.preventDefault()" onClick="UI.savefocused=UI.focused;  $id('assistant_boucle').style.display='none'; $id('assistant_prog').style.display='none'; $id('assistant_test').style.display='block' ;UI.set_focus('sicond'); //UI.insert_focused('\nsi  alors  sinon  fsi; ');UI.moveCaret(UI.focused,-20);UI.funcoff();" title="Assistant de cr&eacute;ation de test">
  <input type="button" style="width:40px;height:35px"
         id="add_boucle" value="boucle" onclick="UI.savefocused=UI.focused; $id('assistant_boucle').style.display='block';$id('assistant_test').style.display='none';$id('assistant_prog').style.display='none'" title="Assistant de cr&eacute;ation de boucle">
  <input type="button" value="fonct" title="Assistant de cr&eacute;ation de fonction" style="width:55px;height:35px" id="add_function" onclick="UI.savefocused=UI.focused;  $id('assistant_boucle').style.display='none';  $id('assistant_test').style.display='none'; $id('assistant_prog').style.display='block';UI.set_focus('funcname');$id('localvarspan').style.display=UI.python_mode?'none':'inline';">
  <input type="button" style="width:46px;height:35px" name="add_debug"
         id="add_debug"
         value="debug" onmousedown="event.preventDefault()"
         onClick="UI.insert_focused('debug(')" title="Mettre au point (Xcas, ne fonctionne pas avec MicroPython), par exemple debug(f(2,3)) execute la fonction f avec arguments 2 et 3 en pas &agrave; pas">
  <input type="button" style="width:29px;height:35px" name="add_nlprog"
         id="add_nlprog"
         value="cmds" onmousedown="event.preventDefault()"
         onClick="UI.hide_show($id('list_cmds')); UI.hide_show_xcas('list_cmds_xcas'); UI.hide_show_python('python_mods');"
         title="Commandes">
  <input type="button" style="width:29px;height:35px" name="add_listechaine"
         id="add_listechaine"
         value='graph' onmousedown="event.preventDefault()"
         onClick="UI.hide_show($id('prog_graph_cmds'));"
         title="Commandes graphiques">
  <input type="button" style="width:29px;height:35px"
         id="add_tortue"
         value="Tortue" onmousedown="event.preventDefault()"
         onClick="UI.hide_show_xcas('boutons_tortue_xcas'); var f=$id('boutons_tortue'); if (f.style.display=='none'){ f.style.display='block'; } else { f.style.display='none'; }" title="Commandes de la tortue">
  <div id="list_cmds" style="display:none">
<button class="bouton" onclick="UI.insert_focused('pow(');">pow</button> <button class="bouton" onclick="UI.insert_focused('range(');">range</button><button class="bouton" onclick="UI.insert_focused('len(');">len</button><button class="bouton" onclick="UI.insert_focused('append(');">append</button><button class="bouton" onclick="UI.insert_focused('sorted(');">sorted</button>
    <div id="list_cmds_xcas">
    <button class="bouton" onclick="UI.insert_focused('seq(');">seq</button>
    <button class="bouton" onclick="UI.insert_focused('makelist(');">makelist</button>
    <button class="bouton" onclick="UI.insert_focused('concat(');">concat</button>
    <button class="bouton" onclick="UI.insert_focused('head(');">head</button>
    <button class="bouton" onclick="UI.insert_focused('tail(');">tail</button>
    <button class="bouton" onclick="UI.insert_focused('member(');">member</button>
    <button class="bouton" onclick="UI.insert_focused('revlist(');">revlist</button>
    <button class="bouton" onclick="UI.insert_focused('mid(');">mid</button>
    <button class="bouton" onclick="UI.insert_focused('suppress(');">suppress</button>
    <button class="bouton" onclick="UI.insert_focused('select(');">select</button>
    <button class="bouton" onclick="UI.insert_focused('count(');">count</button>
    <br>
    <button class="bouton" onclick="UI.insert_focused('set[');"><strong>set[]</strong></button>
    <button class="bouton" onclick="UI.insert_focused('intersect(');">intersect</button>
    <button class="bouton" onclick="UI.insert_focused('minus(');">minus</button>
    <button class="bouton" onclick="UI.insert_focused('union(');">union</button>
    <button class="bouton" onclick="UI.insert_focused('est_element(');">est_element</button>
    <button class="bouton" onclick="UI.insert_focused('est_inclus(');">est_inclus</button>
    <br>
    <button class="bouton" onclick="UI.insert_focused('&quote;');"><strong>""</strong></button>
    <button class="bouton" onclick="UI.insert_focused('asc(');">asc</button>
    <button class="bouton" onclick="UI.insert_focused('char(');">char</button>
    <button class="bouton" onclick="UI.insert_focused('inString(');">inString</button>
    <button class="bouton" onclick="UI.insert_focused('gauche(');">gauche</button>
    <button class="bouton" onclick="UI.insert_focused('ord(');">ord</button>
    <button class="bouton" onclick="UI.insert_focused('droit(');">droit</button>
    <button class="bouton" onclick="UI.insert_focused('string(');">string</button>
    </div>
    <div id="python_mods" style="display:none">
      <br>
    <button class="bouton" onclick="UI.insert_focused('from math import *');"><strong>math</strong></button><button class="bouton" onclick="UI.insert_focused('sqrt(');">racine</button><button class="bouton" onclick="UI.insert_focused('abs(');">abs</button><button class="bouton" onclick="UI.insert_focused('max(');">max</button><button class="bouton" onclick="UI.insert_focused('min(');">min</button><button class="bouton" onclick="UI.insert_focused('round(');">arrondi</button><button class="bouton" onclick="UI.insert_focused('floor(');">floor</button>
    <br>
<button class="bouton" onclick="UI.insert_focused('from cmath import *');"><strong>cmath</strong></button>
    <button class="bouton" onclick="UI.insert_focused('from random import *');"><strong>random</strong></button><button class="bouton" onclick="UI.insert_focused('random(');">random</button><button class="bouton" onclick="UI.insert_focused('randint(');">randint</button><button class="bouton" onclick="UI.insert_focused('choice(');">choice</button>
    <br>
    
    <button class="bouton" onclick="UI.insert_focused('from arit import *');"><strong>arit</strong></button><button class="bouton" onclick="UI.insert_focused('isprime(');">isprime</button><button class="bouton" onclick="UI.insert_focused('nextprime(');">nextp</button><button class="bouton" onclick="UI.insert_focused('ifactor(');">ifactor</button><button class="bouton" onclick="UI.insert_focused('gcd(');">gcd</button><button class="bouton" onclick="UI.insert_focused('lcm(');">lcm</button><button class="bouton" onclick="UI.insert_focused('iegcd(');">iegcd</button>
    <br>

    <button class="bouton" onclick="UI.insert_focused('from linalg import *');"><strong>linalg</strong></button><button class="bouton" onclick="UI.insert_focused('add(');">add</button><button class="bouton" onclick="UI.insert_focused('sub(');">sub</button><button class="bouton" onclick="UI.insert_focused('mul(');">mul</button><button class="bouton" onclick="UI.insert_focused('inv(');">inv</button><button class="bouton" onclick="UI.insert_focused('transpose(');">tran</button><button class="bouton" onclick="UI.insert_focused('rref(');">rref</button>
    <br>

    <button class="bouton" onclick="UI.insert_focused('from numpy import *');"><strong>numpy</strong></button><button class="bouton" onclick="UI.insert_focused('array(');">array</button><button class="bouton" onclick="UI.insert_focused('linspace(');">linspace</button><button class="bouton" onclick="UI.insert_focused('arange(');">arange</button><button class="bouton" onclick="UI.insert_focused('solve(');">solve</button><button class="bouton" onclick="UI.insert_focused('eig(');">eig</button><button class="bouton" onclick="UI.insert_focused('inv(');">inv</button>
    <br>
  </div>

  </div>
  <div id="prog_graph_cmds" style="display:none">
    <button class="bouton" title="Taper ; sur une ligne de commande vide pour voir le graphique." onclick="UI.insert_focused('from graphic import *');"><strong>graphic</strong></button><button class="bouton" onclick="UI.insert_focused('set_pixel(');">pixel</button><button class="bouton" onclick="UI.insert_focused('draw_line(');">line</button><button class="bouton" onclick="UI.insert_focused('draw_rectangle(');">rect</button><button class="bouton" onclick="UI.insert_focused('draw_circle(');">cercle</button><button class="bouton" onclick="UI.insert_focused('draw_string(');">string</button><button class="bouton" onclick="UI.insert_focused(';');">show</button>
    <br>
    <button class="bouton" onclick="UI.insert_focused('red');">rouge</button><button class="bouton" onclick="UI.insert_focused('green');">vert</button><button class="bouton" onclick="UI.insert_focused('blue');">bleu</button><button class="bouton" onclick="UI.insert_focused('yellow');">jaune</button><button class="bouton" onclick="UI.insert_focused('cyan');">cyan</button><button class="bouton" onclick="UI.insert_focused('magenta');">magenta</button>
    <br>
    
    <button class="bouton" title="En MicroPython, taper , sur une ligne de commande vide pour voir le graphique." onclick="UI.insert_focused('from matplotl import *');"><strong>matplotl</strong></button><button class="bouton" onclick="UI.insert_focused(UI.micropy?'bar(':'barplot(');">bar</button><button class="bouton" onclick="UI.insert_focused(UI.micropy?'scatter(':'scatterplot(');">scat.</button><button class="bouton" onclick="UI.insert_focused('arrow(');">arrow</button><button class="bouton" onclick="UI.insert_focused(UI.micropy?'plot(':'polygonplot(');">plot</button><button class="bouton" onclick="UI.insert_focused(UI.micropy?'text(':'legend(');">txt</button><button class="bouton" onclick="UI.insert_focused(',');">,</button><button class="bouton" onclick="UI.insert_focused('clf()');">clf</button>
    
  </div>
  <div id="boutons_tortue" style="display:none">
    <input type="button" style="width:46px;height:35px" name="add_efface"
           id="add_efface"
           value="nouveau" onmousedown="event.preventDefault()"
           onClick="if (UI.python_mode){ UI.eval_cmdline1('# fonctions du script\nfrom turtle import *\nreset()\n',true);UI.eval_cmdline1(UI.micropy?'.':'efface # Script de d&eacute;placement\n',true);} else {UI.eval_cmdline1('/* fonctions du script */\n',true); UI.eval_cmdline1('/* Script de d&eacute;placement*/\nefface;\n',true);}" title="cr&eacute; un &eacute;cran tortue. Taper . dans une ligne de commande vide pour voir la tortue.">
    <input type="button" style="width:46px;height:35px" name="add_avance"
           id="add_avance"
           value="av" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,UI.micropy?'forward(':'avance ');" title="la tortue avance de n pas (10 par d&eacute;faut)">
    <input type="button" style="width:46px;height:35px" name="add_recule"
           id="add_recule"
           value="rec" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,UI.micropy?'backward(':'recule ');" title="la tortue recule de n pas (10 par d&eacute;faut)">
    <input type="button" style="width:46px;height:35px" name="add_tourne_droite"
           id="add_tourne_droite"
           value="td" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,UI.micropy?'right(':'tourne_droite ');" title="la tortue tourne &agrave; droite de n degr&eacute;s (90 par d&eacute;faut)">
    <input type="button" style="width:46px;height:35px" name="add_tourne_gauche"
           id="add_tourne_gauche"
           value="tg" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,UI.micropy?'left(':'tourne_gauche ');" title="la tortue tourne &agrave; gauche de n degr&eacute;s (90 par d&eacute;faut)">
    <input type="button" style="width:46px;height:35px" name="add_crayon"
           id="add_crayon"
           value="crayon" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,UI.micropy?'pencolor(':'crayon ');" title="change la couleur du crayon de la tortue"> 
    <input type="button" style="width:46px;height:35px" name="add_rond"
           id="add_rond"
           value="rond" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,UI.micropy?'circle(':'rond ');" title="Arc de cercle">
    <input type="button" style="width:46px;height:35px" name="add_ecris"
           id="add_ecris"
           value="ecris" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,UI.micropy?'write(':'ecris ');" title="&Eacute;crire &agrave; la droite de la tortue"><br>
    <span id="boutons_tortue_xcas">
    <input type="button" style="width:46px;height:35px" name="add_pas_de_cote"
           id="add_pas_de_cote"
           value="pas_de_cote" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,'pas_de_cote ');" title="la tortue saute de n pas  vers la gauche (10 par d&eacute;faut)">
    <input type="button" style="width:46px;height:35px" name="add_saute"
           id="add_saute"
           value="saute" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,'saute ');" title="la tortue saute de n pas (10 par d&eacute;faut)">
    <input type="button" style="width:46px;height:35px" name="add_disque"
           id="add_disque"
           value="disque" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,'disque ');" title="Arc de cercle
                    rempli">
    <input type="button" style="width:46px;height:35px" name="add_rectangle_plein"
           id="add_rectangle_plein"
           value="rectangle_plein" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,'rectangle_plein ');" title="Rectangle plein">
    <input type="button" style="width:46px;height:35px" name="add_triangle_plein"
           id="add_triangle_plein"
           value="triangle_plein" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,'triangle_plein ');" title="Triangle plein">
    <input type="button" style="width:46px;height:35px" name="add_repete"
           id="add_repete"
           value="repete" onmousedown="event.preventDefault()"
           onClick="UI.insertsemi(UI.focused,'repete ');"
           title="R&eacute;p&eacute;ter plusieurs instructions">
    <input type="button" style="width:46px;height:35px" name="tortue_maillage"
           id="tortue_maillage"
           value="maillage" onmousedown="event.preventDefault()"
           onClick="UI.turtle_maillage=(UI.turtle_maillage+1)%3" title="Change de type de maillage (successivement quadrillage, triangulaire, rien)">
   </span>
   <input type="button" style="width:46px;height:35px" name="tortue_clear"
           id="tortue_clear"
           value="Annul." onmousedown="event.preventDefault()"
           onClick="$id('boutons_tortue').style.display='none'" title="Enleve les boutons de la tortue">
  </div>
</div>
<div id="assistant_rewrite" style="display:none">
  <button class="bouton" onclick="UI.insert_focused('simplify(')" title="Tentative de simplifier une expression, par exemple simplify(sin(3x)/sin(x)). Essayez une commande comme ratnormal, normal ou de reecriture si simplify echoue.">simpl.</button>
  <button class="bouton" onclick="UI.insert_focused('normal(')"
          title="D&eacute;veloppe et r&eacute;duit au meme d&eacute;nominateur">normal
  </button>
  <button class="bouton" onclick="UI.insert_focused('c')" title="Pr&eacute;fixe pour factoriser sur C">c</button>
  <button class="bouton" onclick="UI.insert_focused('factor(')" title="Factorisation, par exemple factor(x^4-1). Utiliser cfactor pour factoriser sur C">factor</button>
  <button class="bouton" onclick="UI.insert_focused('partfrac(')" title="D&eacute;composition en &eacute;l&eacute;ments simples. Utiliser cpartfrac pour d&eacute;composer sur C">partf</button>
  <button class="bouton" onclick="UI.insert_focused('subst(')" title="Substituer">subst</button>
  <button class="bouton" onclick="UI.insert_focused('reorder(')" title="Changer l'ordre des variables d'un polynome">reord</button>
  <br>
  <button class="bouton" onclick="UI.insert_focused('texpand(')"
          title="D&eacute;veloppe sin/cos/tan/exp/ln">texpand
  </button>
  <button class="bouton" onclick="UI.insert_focused('tlin(')"
          title="Lin&eacute;rise les expressions trigonom&eacute;triques">tlin
  </button>
  <button class="bouton" onclick="UI.insert_focused('tcollect(')"
          title="Rassemble les expressions trigonom&eacute;triques">tcoll.
  </button>
  <button class="bouton" onclick="UI.insert_focused('trigsin(')"
          title="R&eacute;ecrire avec des sinus">trigsin
  </button>
  <button class="bouton" onclick="UI.insert_focused('trigcos(')"
          title="R&eacute;ecrire avec des cos">cos
  </button>
  <button class="bouton" onclick="UI.insert_focused('trigtan(')"
          title="R&eacute;ecrire avec des tan">tan
  </button>
  <button class="bouton"
          onclick="UI.insert_focused('halftan(')"
          title="R&eacute;ecrire en fonction de tan de l'angle moiti&eacute;">halftan
  </button>
  <br>
  <button class="bouton" onclick="UI.insert_focused('trig2exp(')"
          title="sin/cos/tan en fonction de exp(i*.)">trig2exp
  </button>
  <button class="bouton" onclick="UI.insert_focused('exp2trig(')" title="exp(i*.)->cos(.)+i*sin(.)">exp2trig</button>
  <button class="bouton" onclick="UI.insert_focused('lin(')" title="Lin&eacute;arise les exponentielles">lin</button>
  <button class="bouton" onclick="UI.insert_focused('lncollect(')"
          title="Rassemble les logarithmes">lncoll.
  </button>
  <button class="bouton" onclick="UI.insert_focused('exp2pow(')" title="e^(a*ln(b))->b^a">exp2^</button>
  <button class="bouton" onclick="UI.insert_focused('pow2exp(')" title="b^a->e^(a*ln(b))">^2exp</button>
  <button class="bouton"
          onclick="$id('assistant_rewrite').style.display='none'">Annul.
  </button>
</div>
<div id="assistant_graph" style="display:none">
  <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused;$id('assistant_plotfunc').style.display='block';UI.xtn='x';" title="Graphe d'une expression, par exemple plotfunc(sin(x),x===-5..5,xstep===0.1)">plot</button>
  <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused; $id('assistant_plotimplicit').style.display='block';UI.set_focus('plotimplicitexprf') ;" title="Graphe d'une courbe implicite, par exemple plotimplicit(x^2+x*y+y^2=3)">implicit</button>
  <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused;$id('assistant_plotparam').style.display='block';UI.xtn='t';" title="Graphe d'une courbe en parametriques, par exemple plotparam([cos(t),sin(t)],t=0..2*pi,tstep===0.1)">param</button>
  <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused; $id('assistant_plotpolar').style.display='block';UI.xtn='t'; UI.set_focus('plotpolarexpr');"
          title="Graphe en polaires, par exemple plotpolar(sin(3*t),t)">polar
  </button>
  <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused;$id('assistant_plotfield').style.display='block';UI.set_focus('plotfieldexprf');"
          title="Champ des tangentes, par exemple plotfield(sin(t*y),[t===-5..5,y===-3..3],xstep===0.5,ystep===0.5))">field
  </button>
  <button class="bouton" onclick="UI.insert_focused('plotode(')"
          title="Graphe d'une solution d'&eacute;quation diff&eacute;rentielle">ode
  </button>
  <br>
  <button class="bouton" onclick="UI.insert_focused('plotseq(')"
          title="Graphe en toile d'araign&eacute;e d'une suite r&eacute;currente">suite
  </button>
  <button class="bouton" onclick="UI.insert_focused('plotlist(')"
          title="Trac&eacute; des points (i,y_i) d'une liste [y_i]">liste
  </button>
  <button class="bouton" onclick="UI.insert_focused('moustache(')"
          title="Boite &agrave; moustaches">moustache
  </button>
  <button class="bouton" onclick="UI.insert_focused('histogram(')"
          title="Histogramme">histo.
  </button>
  <button class="bouton" onclick="UI.insert_focused('scatterplot(')"
          title="Nuage de points">nuage
  </button>
  <button class="bouton" onclick="UI.insert_focused('polygonplot(')"
          title="Ligne polygonale donn&eacute;e par une liste de points">polyg.
  </button>
  <button class="bouton" onclick="UI.insert_focused('linear_regression_plot(')"
          title="Droite de r&eacute;gression lin&eacute;aire">regr.
  </button>
  <button class="bouton" onclick="UI.insert_focused('bar_plot(')"
          title="Diagramme batons">baton
  </button>
  <button class="bouton" onclick="UI.insert_focused('plotcdf(')"
          title="Graphe d'une loi de r&eacute;partition cumul&eacute;e">cdf
  </button>
  <button class="bouton" onclick="UI.insert_focused('plotcontour(')"
          title="Courbes de niveau d'une fonction de 2 variables">niveau
  </button>
  <button class="bouton" onclick="UI.insert_focused('plotarea(')"
          title="Aire sous la courbe">aire
  </button>
  <button class="bouton" onclick="UI.insert_focused('bezier(')"
          title="Courbe de Bezier">bezier
  </button>
  <button class="bouton"
          onclick="$id('assistant_graph').style.display='none'">Annul.
  </button>
  <div id="assistant_plotfunc" style="display:none">
    Choisir un trac&eacute; de
    <button class="bouton" onclick="$id('assistant_plotfunc1var').style.display='block';$id('assistant_plotfunc2var').style.display='none';UI.set_focus('plotfuncexpr');">Courbe</button>
    ou
    <button class="bouton" onclick="$id('assistant_plotfunc1var').style.display='none';$id('assistant_plotfunc2var').style.display='block';UI.set_focus('plotfunc2expr');">Surface</button>
    <div id="assistant_plotfunc1var" style="display:none">
      Expression <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                           id="plotfuncexpr" title="Expression, par exemple x^2" rows=1></textarea><br>
      variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                         id="plotfuncvarname" title="Nom de variable, par exemple x" rows=1>x</textarea><br>
      xmin <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                     id="plotfuncvarmin" title="Valeur de d&eacute;part" rows=1>-4</textarea><br>
      xmax <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                     id="plotfuncvarmax" title="Valeur de fin" rows=1>4</textarea><br>
      xstep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="plotfuncvarstep" title="Pas entre 2 &eacute;valuations successives de l'expression" rows=1>0.0625</textarea>
      <br>
      <button class="bouton" onclick="UI.assistant_plotfunc1var_ok();">Ok</button>
      <button class="bouton"
              onclick="UI.focused=UI.savefocused;$id('assistant_plotfunc').style.display='none'">Annul.
      </button>
      <button class="bouton"
              onclick="$id('plotfuncexpr').value='';$id('plotfuncvarname').value='';$id('plotfuncvarmin').value='';$id('plotfuncvarmax').value='';$id('plotfuncvarstep').value='';">Effacer
      </button>
      <button class="bouton" onclick="$id('plotfuncexpr').value='x^2';$id('plotfuncvarname').value='x';$id('plotfuncvarmin').value='-4';$id('plotfuncvarmax').value='4';">Exemple</button>
    </div>
    <div id="assistant_plotfunc2var" style="display:none">
      Expression <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                           id="plotfunc2expr" title="Expression, par exemple x^2-y^2" rows=1></textarea><br>
      1&egrave;re variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                     id="plotfunc2varx" title="Premi&egrave;re variable, par exemple x===-3..3" rows=1>x===-3..3</textarea><br>
      2&egrave;me variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                     id="plotfunc2vary" title="Deuxi&egrave;me variable, par exemple y===-3..3" rows=1>y===-3..3</textarea><br>
      xstep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="plotfunc2varxstep" title="Pas entre 2 &eacute;valuations successives de l'expression" rows=1>0.25</textarea><br>
      ystep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="plotfunc2varystep" title="Pas entre 2 &eacute;valuations successives de l'expression" rows=1>0.25</textarea>
      <br>
      <button class="bouton" onclick="UI.assistant_plotfunc2var_ok();">Ok</button>
      <button class="bouton"
              onclick="UI.focused=UI.savefocused;$id('assistant_plotfunc').style.display='none'">Annul.
      </button>
      <button onclick="$id('plotfunc2expr').value='';$id('plotfunc2varx').value='x';$id('plotfunc2vary').value='y';$id('plotfunc2varxstep').value='';$id('plotfunc2varystep').value='';">Effacer
      </button>
      <button onclick="$id('plotfunc2expr').value='x^2-y^2';$id('plotfunc2varx').value='x===-3..3';$id('plotfunc2vary').value='y===-3..3';$id('plotfunc2varxstep').value='0.25';$id('plotfunc2varystep').value='0.25';">Exemple</button>
    </div>
  </div>
  <div id="assistant_plotparam" style="display:none">
    Choisir un trac&eacute; de
    <button class="bouton"
            onclick="$id('assistant_plotparam1var').style.display='block';$id('assistant_plotparam2var').style.display='none';UI.set_focus('plotparamexprx');">Courbe
    </button>
    ou
    <button class="bouton"
            onclick="$id('assistant_plotparam1var').style.display='none';$id('assistant_plotparam2var').style.display='block';UI.set_focus('plotparam2exprx');">Surface
    </button>
    param&eacute;trique.
    <button class="bouton"
            onclick="UI.focused=UI.savefocused;$id('assistant_plotparam').style.display='none'">Annul.
    </button>
    <br>
    <div id="assistant_plotparam1var" style="display:none">
      x(t)= <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="plotparamexprx" title="Expression de x(t), par exemple 2*cos(t)" rows=1></textarea><br>
      y(t)= <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="plotparamexpry" title="Expression de y(t), par exemple 3*sin(t)" rows=1></textarea><br>
      variable<textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                        id="plotparamvarname" title="Nom de variable, par exemple t" rows=1>t</textarea><br>
      tmin <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                     id="plotparamvarmin" title="Valeur de d&eacute;part" rows=1>-4</textarea><br>
      tmax <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                     id="plotparamvarmax" title="Valeur de fin" rows=1>4</textarea><br>
      tstep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="plotparamvarstep" title="Pas entre 2 &eacute;valuations successives" rows=1>0.0625</textarea>
      <br>
      <button class="bouton" onclick="UI.assistant_plotparam_ok();;">Ok</button>
      <button class="bouton"
              onclick="UI.focused=UI.savefocused;$id('assistant_plotparam').style.display='none'">Annul.
      </button>
      <button class="bouton"
              onclick="$id('plotparamexprx').value='';$id('plotparamexpry').value='';$id('plotparamvarname').value='';$id('plotparamvarmin').value='';$id('plotparamvarmax').value='';$id('plotparamvarstep').value='';">Effacer
      </button>
      <button class="bouton" onclick="$id('plotparamexprx').value='cos(2t)';$id('plotparamexprx').value='cos(2t)';$id('plotparamexpry').value='sin(3t)';$id('plotparamvarname').value='t';$id('plotparamvarmin').value='-pi';$id('plotparamvarmax').value='pi';">Exemple</button>
    </div>
    <div id="assistant_plotparam2var" style="display:none">
      x(u,v)= <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                        id="plotparam2exprx" title="Expression, par exemple v*cos(u)" rows=1></textarea><br>
      y(u,v)= <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                        id="plotparam2expry" title="Expression, par exemple v*sin(u)" rows=1></textarea><br>
      z(u,v)= <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                        id="plotparam2exprz" title="Expression, par exemple v" rows=1></textarea><br>
      1&egrave;re variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                     id="plotparam2varx" title="Premi&egrave;re variable, par exemple u===-3..3" rows=1>u===-3..3</textarea><br>
      2&egrave;me variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                     id="plotparam2vary" title="Deuxi&egrave;me variable, par exemple v===-3..3" rows=1>v===-3..3</textarea><br>
      ustep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="plotparam2varxstep" title="Pas entre 2 &eacute;valuations successives de l'expression" rows=1>0.25</textarea><br>
      vstep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="plotparam2varystep" title="Pas entre 2 &eacute;valuations successives de l'expression" rows=1>0.25</textarea>
      <br>
      <button class="bouton" onclick="UI.assistant_plotparam2var_ok();">Ok</button>
      <button class="bouton"
              onclick="UI.focused=UI.savefocused;$id('assistant_plotparam').style.display='none'">Annul.
      </button>
      <button class="bouton"
              onclick="$id('plotparam2exprx').value='';$id('plotparam2expry').value='';$id('plotparam2exprz').value='';$id('plotparam2varx').value='u';$id('plotparam2vary').value='v';$id('plotparam2varxstep').value='';$id('plotparam2varystep').value='';">Effacer
      </button>
      <button class="bouton" onclick="$id('plotparam2exprx').value='v*cos(u)';$id('plotparam2expry').value='v*sin(u)';$id('plotparam2exprz').value='v';$id('plotparam2varx').value='u===-pi..pi';$id('plotparam2vary').value='v===-3..3';$id('plotparam2varxstep').value='pi/32';$id('plotparam2varystep').value='0.25';">Exemple</button>
    </div>
  </div>
  <div id="assistant_plotimplicit" style="display:none">
    f(x,y)= <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="plotimplicitexprf" title="Expression, par exemple x^3+x-y^2-1" rows=1></textarea><br>
    Variable x<textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                        id="plotimplicitvarx" title="Premi&egrave;re variable, par exemple x===-3..3" rows=1>x===-3..3</textarea><br>
    Variable y<textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                        id="plotimplicitvary" title="Deuxi&egrave;me variable, par exemple y===-3..3" rows=1>y===-3..3</textarea><br>
    xstep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                    id="plotimplicitvarxstep" title="Pas entre 2 &eacute;valuations successives de l'expression" rows=1>0.25</textarea><br>
    ystep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                    id="plotimplicitvarystep" title="Pas entre 2 &eacute;valuations successives de l'expression" rows=1>0.25</textarea><br>
    niveaux=<textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="plotimplicitlevel" title="Niveaux &agrave; tracer: laisser vide pour 0 ou mettre une liste" rows=1></textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_plotimplicit_ok();">Ok</button>
    <button class="bouton"
            onclick="UI.focused=UI.savefocused;$id('assistant_plotimplicit').style.display='none'">Annul.
    </button>
    <button class="bouton"
            onclick="$id('plotimplicitexprf').value='';$id('plotimplicitvarx').value='x';$id('plotimplicitvary').value='y';$id('plotimplicitvarxstep').value='';$id('plotimplicitvarystep').value='';$id('plotimplicitlevel').value=''">Effacer
    </button>
    <button class="bouton" onclick="$id('plotimplicitexprf').value='x^3-x-y^2-1';$id('plotimplicitvarx').value='x===-3..3';$id('plotimplicitvary').value='y===-3..3';$id('plotimplicitvarxstep').value='0.02';$id('plotimplicitvarystep').value='0.02';$id('plotimplicitlevel').value=''">Exemple 1</button>
    <button class="bouton" onclick="$id('plotimplicitexprf').value='x^2-y^2';$id('plotimplicitvarx').value='x===-3..3';$id('plotimplicitvary').value='y===-3..3';$id('plotimplicitvarxstep').value='0.02';$id('plotimplicitvarystep').value='0.02';$id('plotimplicitlevel').value='[-3,-2,-1,0,1,2,3]'">Exemple 2</button>
  </div>
  <div id="assistant_plotfield" style="display:none">
    Champ des tangentes pour une &eacute;quation dy/dt=f(t,y) ou un
    syst&egrave;me autonome 2-d d[x,y]/dt=f(x,y)<br>
    f=<textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                id="plotfieldexprf" title="Expression, par exemple x^3+x-y^2-1" rows=1></textarea><br>
    Variable t (ou x)<textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                               id="plotfieldvarx" title="Premi&egrave;re variable, par exemple t===-3..3" rows=1>t===-3..3</textarea><br>
    Variable y<textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                        id="plotfieldvary" title="Deuxi&egrave;me variable, par exemple y===-3..3" rows=1>y===-3..3</textarea><br>
    xstep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                    id="plotfieldvarxstep" title="Pas entre 2 &eacute;valuations successives de l'expression" rows=1>0.25</textarea><br>
    ystep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                    id="plotfieldvarystep" title="Pas entre 2 &eacute;valuations successives de l'expression" rows=1>0.25</textarea><br>
    init=<textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                   id="plotfieldinit" title="Liste de conditions initiales optionnelles" rows=1></textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_plotfield_ok();">Ok</button>
    <button class="bouton"
            onclick="UI.focused=UI.savefocused;$id('assistant_plotfield').style.display='none'">Annul.
    </button>
    <button class="bouton"
            onclick="$id('plotfieldexprf').value='';$id('plotfieldvarx').value='x';$id('plotfieldvary').value='y';$id('plotfieldvarxstep').value='';$id('plotfieldvarystep').value='';$id('plotfieldinit').value=''">Effacer
    </button>
    <button class="bouton" onclick="$id('plotfieldexprf').value='sin(t*y)';$id('plotfieldvarx').value='t===-3..3';$id('plotfieldvary').value='y===-3..3';$id('plotfieldvarxstep').value='0.25';$id('plotfieldvarystep').value='0.25';$id('plotfieldinit').value='[[0,1],[0,2]]'">Exemple 1d</button>
    <button class="bouton" onclick="$id('plotfieldexprf').value='[[0.2,-1],[1,0.2]]*[x,y]';$id('plotfieldvarx').value='x===-3..3';$id('plotfieldvary').value='y===-3..3';$id('plotfieldvarxstep').value='0.25';$id('plotfieldvarystep').value='0.25';$id('plotfieldinit').value='seq([0,j],j,-3,3)'">Exemple a 2d</button>
    <button class="bouton" onclick="$id('plotfieldexprf').value='[[0.2,0.5],[0.5,0.2]]*[x,y]';$id('plotfieldvarx').value='x===-3..3';$id('plotfieldvary').value='y===-3..3';$id('plotfieldvarxstep').value='0.25';$id('plotfieldvarystep').value='0.25';$id('plotfieldinit').value='seq([0,j],j,-3,3)'">Exemple b 2d</button>
  </div>
  <div id="assistant_plotpolar" style="display:none">
    Courbe en polaire <br>
    expression <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                         id="plotpolarexpr" title="Expression, par exemple sin(3*t)" rows=1></textarea><br>
    variable θ <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                         id="plotpolarvarname" title="Nom de variable, par exemple t" rows=1>t</textarea><br>
    θmin <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                   id="plotpolarvarmin" title="Valeur de d&eacute;part" rows=1></textarea><br>
    θmax <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                   id="plotpolarvarmax" title="Valeur de fin" rows=1></textarea><br>
    θstep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                    id="plotpolarvarstep" title="Pas entre deux &eacute;valuations" rows=1></textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_plotpolar_ok();">Ok</button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_plotpolar').style.display='none'">Annul.</button>
    <button class="bouton"
            onclick="$id('plotpolarexpr').value='';$id('plotpolarvarname').value='';$id('plotpolarvarmin').value='';$id('plotpolarvarmax').value='';$id('plotpolarvarstep').value='';">Effacer
    </button>
    <button class="bouton" onclick="$id('plotpolarexpr').value='sin(3*t)';$id('plotpolarvarname').value='t';$id('plotpolarvarmin').value='0';$id('plotpolarvarmax').value='pi';$id('plotpolarvarstep').value='';">Exemple</button>
  </div>
</div>
<div id="assistant_calculus" style="display:none">
  <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused; $id('assistant_limit').style.display='block';UI.set_focus('limitexpr') ;" title="limite d'une expression lorsqu'une variable tend vers une limite, par exemple limit(sin(x)/x,x,0). Utiliser un 4eme parametre egal a 1 ou -1 pour une limite a droite ou a gauche.">limit</button>
  <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused;$id('assistant_diff').style.display='block';UI.set_focus('diffexpr') ;" title="Derivee d'une expression. Pour une fonction f, par exemple f(x):=sin(x^2), la derivee de f est f', par exemple g:=f' ou f'(2)">∂</button>
  <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused; $id('assistant_series').style.display='block';UI.set_focus('seriesexpr') ;" title="series calcule le developpement de Taylor d'une expression lorsqu'une variable tend vers un point, par exemple series(sin(x),x=0,5,polynom). Si on omet polynom un terme de reste est renvoye. On peut specifier un developpement a droite ou a gauche en ajoutant 1 ou -1 avant polynom"> series</button>
  <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused;$id('assistant_sum').style.display='block';UI.set_focus('sumexpr') ; " title="Somme d'une expression pour une variable entre deux bornes, par exemple ∑(k,k,1,n) ou ∑(1/n^2,n,1,inf)"> ∑</button>
  <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused; $id('assistant_int').style.display='block';UI.set_focus('intexpr');"
          title="Calcul d'int&eacute;grales, par exemple ∫(x^2*sin(x)*exp(x),x) ou ∫(1/(x^4+1),x,0,inf)">∫
  </button>
  <button class="bouton"
          onmousedown="event.preventDefault()" onClick="UI.funcoff();UI.savefocused=UI.focused;$id('assistant_desolve').style.display='block';UI.set_focus('desolveeq');" title="Resolution d'une equation differentielle, par exemple desolve(y''+y=0), desolve(y'+y=0,y(0)=1)">desolve
  </button>
  <br>
  <button class="bouton" onclick="UI.insert_focused('ilaplace(')"
          title="ilaplace: transform&eacute;e de Laplace inverse">i
  </button>
  <button class="bouton" onclick="UI.insert_focused('laplace(')"
          title="Transform&eacute;e de Laplace">laplace
  </button>
  <button class="bouton" onclick="UI.insert_focused('odesolve(')"
          title="odesolve: r&eacute;solution approch&eacute;e d'&eacute;quation diff&eacute;rentielles">o
  </button>
  <button class="bouton" onclick="UI.insert_focused('desolve(')"
          title="R&eacute;solution exacte d'&eacute;quation diff&eacute;rentielle">desolve
  </button>
  <button class="bouton" onclick="UI.insert_focused('ifft(')"
          title="ifft: transform&eacute;e de Fourier rapide inverse">i
  </button>
  <button class="bouton" onclick="UI.insert_focused('fft(')"
          title="Transform&eacute;e de Fourier rapide">fft
  </button>
  <button class="bouton" onclick="UI.insert_focused('invztrans(')"
          title="invztrans: transform&eacute;e en z inverse d'une fraction rationnelle">inv
  </button>
  <button class="bouton" onclick="UI.insert_focused('ztrans(')"
          title="Transform&eacute;e en z d'une suite">ztrans
  </button>
  <button class="bouton" onclick="UI.insert_focused('grad(')"
          title="Gradient">grad
  </button>
  <button class="bouton" onclick="UI.insert_focused('hessian(')"
          title="Hessien">hess
  </button>
  <button class="bouton" onclick="UI.insert_focused('curl(')"
          title="Rotationnel">rot
  </button>
  <button class="bouton" onclick="UI.insert_focused('divergence(')"
          title="Divergence">div
  </button>
  <button class="bouton" onclick="UI.insert_focused('vpotential(')"
          title="vpotential: potentiel vecteur">v
  </button>
  <button class="bouton" onclick="UI.insert_focused('potential(')"
          title="Potentiel">poten.
  </button>
  <button class="bouton"
          onclick="$id('assistant_calculus').style.display='none'">Annul.
  </button>
  <div id="assistant_desolve" style="display:none">
    &Eacute;quation diff&eacute;rentielle
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="desolveeq" title="Par exemple y'+t*y=t^2" rows=1
              cols=40></textarea>
    <br>
    Variable
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="desolvevar" title="Par exemple t" rows=1 cols=3>t</textarea>,
    inconnue
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="desolvey" title="Par exemple y" rows=1 cols=3>y</textarea>
    <br>
    Conditions initiales optionnelles
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="desolveinit" title="Par exemple y(0)=1,y'(0)=0" rows=1
              cols=20></textarea>
    <br>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.set_focus('desolveeq');UI.insert_focused('t')">t
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.set_focus('desolveeq') ;UI.insert_focused('y\'\'')">y&quote;&quote;
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused('y\'')">y&quote;
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused('y')">y
    </button>
    <br>
    <button class="bouton"
            onclick="UI.assistant_desolve_ok();">Ok
    </button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_desolve').style.display='none'">Annul.</button>
    <button class="bouton" onclick="$id('desolveeq').value='';$id('desolvevar').value='';$id('desolvey').value='';$id('desolveinit').value='';">Effacer</button>
    <button class="bouton" onclick="$id('desolveeq').value='y\'+t*y=t';$id('desolvevar').value='t';$id('desolvey').value='y';$id('desolveinit').value='y(0)=2';">Ordre 1</button>
    <button class="bouton" onclick="$id('desolveeq').value='y\'\'+y=t^2';$id('desolvevar').value='t';$id('desolvey').value='y';$id('desolveinit').value='y(0)=1,y\'(0)=0';">Ordre 2</button>
    <button class="bouton" onclick="$id('desolveeq').value='y\'=[[1,2],[2,1]]*y+[t,t+1]';$id('desolvevar').value='t';$id('desolvey').value='y';$id('desolveinit').value='y(0)=[1,2]'">Syst&egrave;me</button>
  </div>
  <div id="assistant_series" style="display:none">
    D&eacute;veloppement limit&eacute; <br>
    expression <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                         id="seriesexpr" title="Expression, par exemple sin(x)" rows=1></textarea><br>
    variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                       id="seriesvarname" title="Nom de variable, par exemple x" rows=1>x</textarea><br>
    en <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                 id="seriesvarlim" title="Point limite" rows=1></textarea><br>
    ordre <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                    id="seriesvarorder" title="Ordre" rows=1></textarea><br>
    Polynome <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                       id="seriesvarstep" title="L'option polynom supprime le terme de reste du d&eacute;veloppement" rows=1>polynom</textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_series_ok();">Ok</button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_series').style.display='none'">Annul.</button>
    <button class="bouton"
            onclick="$id('seriesexpr').value='';$id('seriesvarname').value='';$id('seriesvarlim').value='';$id('seriesvarorder').value='';">Effacer
    </button>
    <button class="bouton" onclick="$id('seriesexpr').value='sin(x)/x';$id('seriesvarname').value='x';$id('seriesvarlim').value='0';$id('seriesvarorder').value='5';$id('seriesvarstep').value='polynom';">Exemple</button>
  </div>
  <div id="assistant_limit" style="display:none">
    Limite de :<br>
    expression <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                         id="limitexpr" title="Expression, par exemple sin(x)/x" rows=1></textarea><br>
    variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                       id="limitvarname" title="Nom de variable, par exemple x" rows=1>x</textarea><br>
    en <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                 id="limitvarlim" title="Valeur limite" rows=1></textarea><br>
    Direction optionnelle <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                    id="limitvardir" title="-1: limite &agrave; gauche, 1: &agrave; droite" rows=1></textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_limit_ok();">Ok</button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_limit').style.display='none'">Annul.</button>
    <button class="bouton"
            onclick="$id('limitexpr').value='';$id('limitvarname').value='';$id('limitvarlim').value='';$id('limitvardir').value='';">Effacer
    </button>
    <button class="bouton" onclick="$id('limitexpr').value='sin(x)/x';$id('limitvarname').value='x';$id('limitvarlim').value='0';$id('limitvardir').value='1';">Exemple</button>
  </div>
  <div id="assistant_int" style="display:none">
    Int&eacute;grale de <br>
    expression <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                         id="intexpr" title="Expression, par exemple x^2" rows=1></textarea><br>
    variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                       id="intvarname" title="Nom de variable, par exemple x" rows=1>x</textarea><br>
    de (optionnel) <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                             id="intvarmin" title="Borne inf&eacute;rieure" rows=1></textarea><br>
    &agrave; (optionnel) <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                   id="intvarmax" title="Borne sup&eacute;rieure" rows=1></textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_int_ok();">Ok</button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_int').style.display='none'">Annul.</button>
    <button class="bouton"
            onclick="$id('intexpr').value='';$id('intvarname').value='';$id('intvarmin').value='';$id('intvarmax').value='';">Effacer
    </button>
    <button class="bouton" onclick="$id('intexpr').value='1/(1+x^2)^2';$id('intvarname').value='x';$id('intvarmin').value='';$id('intvarmax').value='';">Exemple 1</button>
    <button class="bouton" onclick="$id('intexpr').value='1/(1+x^2)^2';$id('intvarname').value='x';$id('intvarmin').value='0';$id('intvarmax').value='1';">Exemple 2</button>
  </div>
  <div id="assistant_sum" style="display:none">
    Somme de <br>
    expression <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                         id="sumexpr" title="Expression, par exemple j^2" rows=1></textarea><br>
    variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                       id="sumvarname" title="Nom de variable, par exemple j" rows=1>j</textarea><br>
    de (optionnel) <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                             id="sumvarmin" title="Borne inf&eacute;rieure" rows=1></textarea><br>
    &agrave; (optionnel) <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                   id="sumvarmax" title="Borne sup&eacute;rieure" rows=1></textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_sum_ok();">Ok</button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_sum').style.display='none'">Annul.</button>
    <button class="bouton" onclick="$id('sumexpr').value='j^2';$id('sumvarname').value='j';$id('sumvarmin').value='0';$id('sumvarmax').value='n';">Exemple</button>
    <button class="bouton"
            onclick="$id('sumexpr').value='';$id('sumvarname').value='';$id('sumvarmin').value='';$id('sumvarmax').value='';">Effacer
    </button>
  </div>
  <div id="assistant_diff" style="display:none">
    D&eacute;riv&eacute;e de <br>
    expression <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                         id="diffexpr" title="Expression, par exemple sin(x)^2" rows=1></textarea><br>
    variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                       id="diffvarname" title="Nom de variable, par exemple x" rows=1>x</textarea><br>
    Nombre de d&eacute;riv&eacute;es <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                               id="diffnumber" title="Valeur par d&eacute;faut 1" rows=1>1</textarea><br>
    <br>
    <button class="bouton" onclick="UI.assistant_diff_ok();">Ok</button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_diff').style.display='none'">Annul.</button>
    <button class="bouton" onclick="$id('diffexpr').value='sin(x)^2';$id('diffvarname').value='x';$id('diffnumber').value='';">Exemple 1</button>
    <button class="bouton" onclick="$id('diffexpr').value='sin(x^2)';$id('diffvarname').value='x';$id('diffnumber').value='5';">Exemple 2</button>
    <button class="bouton"
            onclick="$id('diffexpr').value='';$id('diffvarname').value='';$id('diffnumber').value='';">Effacer
    </button>
  </div>
</div>
<div id="assistant_geo" style="display:none">
  <button class="bouton" onclick="UI.insert_focused('point(')"
          title="Point donn&eacute; par ses coordonn&eacute;es ou son affixe">point
  </button>
  <button class="bouton" onclick="UI.insert_focused('segment(')"
          title="Segment reliant 2 points ou 2 affixes">segment
  </button>
  <button class="bouton" onclick="UI.insert_focused('droite(')"
          title="Droite passant par 2 points">droite
  </button>
  <button class="bouton" onclick="UI.insert_focused('vecteur(')"
          title="Vecteur">vecteur
  </button>
  <button class="bouton" onclick="UI.insert_focused('equation(')"
          title="&Eacute;quation">equation
  </button>
  <button class="bouton" onclick="UI.insert_focused('parameq(')"
          title="&Eacute;quation param&eacute;trique">param
  </button>
  <button class="bouton" onclick="UI.insert_focused('milieu(')"
          title="Milieu de 2 points">milieu
  </button>
  <button class="bouton" onclick="UI.insert_focused('cercle(')"
          title="Cercle par centre, rayon ou diam&eacute;tre">&#x25ef;
  </button>
  <button class="bouton" onclick="UI.insert_focused('centre(')"
          title="Centre d'un cercle">centre
  </button>
  <button class="bouton" onclick="UI.insert_focused('isobarycentre(')"
          title="Centre de gravit&eacute;">gravit&eacute;
  </button>
  <button class="bouton" onclick="UI.insert_focused('inter(')"
          title="Liste des intersections, utiliser inter_unique pour un point">inter
  </button>
  <button class="bouton" onclick="UI.insert_focused('inter_unique(')"
          title="Premier ou unique point d'intersection">unique
  </button>
  <button class="bouton" onclick="var tmp=$id('assitant_geo_plus'); if(tmp.style.display=='none') tmp.style.display='block'; else tmp.style.display='none';">+</button>
  <div id="assitant_geo_plus" style="display:none">
    <button class="bouton" onclick="UI.insert_focused('triangle(')"
            title="Triangle">&#x25b3;
    </button>
    <button class="bouton" onclick="UI.insert_focused('A:=point(0);\nB:=point(1);\nassume(a=[0.3,-2,2,0.1]);\nassume(b=[0.6,-2,2,0.1]);\nC:=point(a,b);\ntriangle(A,B,C);\n')"
            title="Triangle symbolique">&#x25b3;ABC
    </button>
    <button class="bouton" onclick="UI.insert_focused('pointc(x):=(1+i*x)/(1-i*x);\nassume(a=[0.3,0,2,0.1]);\nassume(b=[0.6,0,2,0.1]);\nP1:=point(-1,display=hidden_name);\nP2:=point(pointc(a),display=hidden_name);\nP3:=point(pointc(-b),display=hidden_name);\nL1:=perpendicular(P1,line(0,P1)):;\nL2:=perpendicular(P2,line(0,P2)):;\nL3:=perpendicular(P3,line(0,P3)):;\nA:=single_inter(L1,L2);\nB:=single_inter(L2,L3);\nC:=single_inter(L3,L1);\ntriangle(A,B,C);circle(0,1);\n')"
            title="Triangle symbolique + cercle inscrit">&#x25ef;in&#x25b3;
    </button>
    <button class="bouton" onclick="UI.insert_focused('pointc(x):=(1+i*x)/(1-i*x);\nassume(b=[0.3,0,2,0.1]);\nassume(c=[0.6,0,2,0.1]);\nA:=point(-1);\nB:=point(pointc(b));\nC:=point(pointc(-c));\ncircle(0,1);triangle(A,B,C);\n')"
            title="Triangle symbolique + cercle circonscrit">&#x25b3;in&#x25ef;
    </button>
    <button class="bouton" onclick="UI.insert_focused('rectangle(')"
            title="Rectangle">&#x25ad;
    </button>
    <button class="bouton" onclick="UI.insert_focused('parallelogramme(')"
            title="Parallelogramme">&#x25b1;
    </button>
    <button class="bouton" onclick="UI.insert_focused('carre(')"
            title="Carre">&#x25a2;
    </button>
    <button class="bouton" onclick="UI.insert_focused('polygone(')"
            title="Polygone">polygone
    </button>
    <button class="bouton" onclick="UI.insert_focused('isopolygone(')"
            title="Polygone r&eacute;gulier">r&eacute;gulier
    </button>
    <button class="bouton" onclick="UI.insert_focused('parallele(')"
            title="Parall&egrave;le">//
    </button>
    <button class="bouton" onclick="UI.insert_focused('perpendiculaire(')"
            title="Perpendiculaire">&perp;
    </button>
    <button class="bouton" onclick="UI.insert_focused('mediatrice(')"
            title="Mediatrice">mediatrice
    </button>
    <button class="bouton" onclick="UI.insert_focused('bissectrice(')"
            title="Bissectrice">biss
    </button>
    <button class="bouton" onclick="UI.insert_focused('hauteur(')"
            title="Hauteur">hauteur
    </button>
    <button class="bouton" onclick="UI.insert_focused('tangent(')"
            title="Tangente &agrave; un graphe">tangent
    </button>
    <button class="bouton" onclick="UI.insert_focused('distance(')"
            title="Distance">dist.
    </button>
    <button class="bouton"
            onclick="$id('assistant_geo').style.display='none'">Annul.
    </button>
  </div>
</div>
<div id="assistant_arit" style="display:none">
  <button class="bouton" onclick="UI.insert_focused('gcd(')"
          title="PGCD d'entiers ou de polynomes">gcd
  </button>
  <button class="bouton" onclick="UI.insert_focused('iquo(')"
          title="iquo: quotient de la division euclidienne d'entiers">&nbsp;&nbsp;i
  </button>
  <button class="bouton" onclick="UI.insert_focused('quo(')"
          title="Quotient euclidien de 2 polynomes">quo
  </button>
  <button class="bouton" onclick="UI.insert_focused('irem(')"
          title="irem: reste de la division euclidienne d'entiers">&nbsp;&nbsp;i
  </button>
  <button class="bouton" onclick="UI.insert_focused('rem(')"
          title="Reste euclidien de 2 polynomes">rem
  </button>
  <button class="bouton" onclick="UI.insert_focused('iabcuv(')"
          title="iabcuv: r&eacute;soudre a*u+b*v=c pour a,b,c donn&eacute;s">&nbsp;&nbsp;i
  </button>
  <button class="bouton" onclick="UI.insert_focused('abcuv(')"
          title="Solution polynomiale de A*U+B*V=C">abcuv
  </button>
  <button class="bouton" onclick="UI.insert_focused('ifactor(')"
          title="ifactor: factorisation d'un entier">&nbsp;&nbsp;i
  </button>
  <button class="bouton" onclick="UI.insert_focused('factor(')"
          title="Factorisation d'un polynome">factor
  </button>
  <br>
  <button class="bouton" onclick="UI.insert_focused('lcm(')"
          title="PPCM d'entiers ou de polynomes">lcm
  </button>
  <button class="bouton" onclick="UI.insert_focused('ichinrem(')"
          title="Restes chinois entiers">ichrem
  </button>
  <button class="bouton" onclick="UI.insert_focused('isprime(')"
          title="Test de pseudo-primalit&eacute;">isprime
  </button>
  <button class="bouton" onclick="UI.insert_focused('nextprime(')"
          title="Prochain entier pseudo-premier">next
  </button>
  <button class="bouton" onclick="UI.insert_focused('powmod(')"
          title="powmod: puissance modulaire rapide">pow
  </button>
  <button class="bouton" onclick="UI.insert_focused('mod(')"
          title="Cr&eacute;ation d'un &eacute;l&eacute;ment de
                Z/nZ">mod
  </button>
  <button class="bouton" onclick="UI.insert_focused('GF(')"
          title="Cr&eacute;ation d'un corps fini non premier">GF
  </button>
  <br>
  <button class="bouton" onclick="UI.insert_focused('lcoeff(')"
          title="lcoeff: coefficient dominant">&nbsp;l
  </button>
  <button class="bouton" onclick="UI.insert_focused('coeff(')" title="Coefficient">coeff</button>
  <button class="bouton" onclick="UI.insert_focused('degree(')" title="Degr&eacute;">degree</button>
  <button class="bouton" onclick="UI.insert_focused('horner(')"
          title="&Eacute;valuation">horner
  </button>
  <button class="bouton" onclick="UI.insert_focused('ptayl(')"
          title="D&eacute;veloppement de Taylor">ptayl
  </button>
  <button class="bouton" onclick="UI.insert_focused('proot(')"
          title="Racines complexes approch&eacute;es d'un polyn&circ;ome">proot
  </button>
  <button class="bouton"
          onclick="$id('assistant_arit').style.display='none'">Annul.
  </button>
</div>
<div id="assistant_linalg" style="display:none">
  <button class="bouton" onclick="UI.insert_focused('dot(')"
          title="Produit scalaire de deux vecteurs">dot
  </button>
  <button class="bouton" onclick="UI.insert_focused('cross(')"
          title="Produit vectoriel de 2 vecteurs de R^2 ou R^3">cross
  </button>
  <button class="bouton" onclick="UI.insert_focused('tran(')"
          title="Transpos&eacute;e d'une matrice, utiliser trn(M) ou M^* pour la transconjugu&eacute;e de M">tran
  </button>
  <button class="bouton" onclick="UI.insert_focused('idn(')"
          title="Matrice identit&eacute; de taille n">idn
  </button>
  <button class="bouton" onclick="UI.insert_focused('matrix(')"
          title="Cr&eacute;e une matrice">matr
  </button>
  <button class="bouton" onclick="UI.insert_focused('hilbert(')"
          title="Matrice de Hilbert de taille n">hilb
  </button>
  <button class="bouton" onclick="UI.insert_focused('vandermonde(')"
          title="Matrice de Vandermonde de taille n">vand
  </button>
  <button class="bouton" onclick="UI.insert_focused('laplace(')"
          title="Matrice du laplacien discret 1-d de taille n">lapl.
  </button>
  <br>
  <button class="bouton" onclick="UI.insert_focused('rref(')"
          title="R&eacute;duction sous forme &eacute;chelonn&eacute;e">rref
  </button>
  <button class="bouton" onclick="UI.insert_focused('ker(')"
          title="ker(M) renvoie une base du noyau d'une application lin&eacute;aire de matrice M">ker
  </button>
  <button class="bouton" onclick="UI.insert_focused('det(')"
          title="D&eacute;terminant d'une matrice carr&eacute;e">det
  </button>
  <button class="bouton" onclick="UI.insert_focused('linsolve(')"
          title="R&eacute;solution d'un syst&egrave;me lin&eacute;aire">linsolve
  </button>
  <button class="bouton" onclick="UI.insert_focused('lu(')"
          title="Factorisation P*A=L*U d'une matrice A">lu
  </button>
  <button class="bouton" onclick="UI.insert_focused('qr(')"
          title="Factorisation A=Q*R d'une matrice A">qr
  </button>
  <button class="bouton" onclick="UI.insert_focused('cholesky(')"
          title="Factorisation de Cholesky A=L*L^* d'une matrice sym&eacute;trique d&eacute;finie positive">chol.
  </button>
  <button class="bouton" onclick="UI.insert_focused('cond(')"
          title="Nombre de condition d'une matrice relativement &agrave; la norme 1, 2 ou inf">cond
  </button>
  <br>
  <button class="bouton" onclick="UI.insert_focused('egv(')"
          title="Vecteurs propres d'une matrice">egv
  </button>
  <button class="bouton" onclick="UI.insert_focused('egvl(')"
          title="Valeurs propres d'une matrice">egvl
  </button>
  <button class="bouton" onclick="UI.insert_focused('jordan(')"
          title="R&eacute;duction de Jordan d'une matrice A*P=P*J">jordan
  </button>
  <button class="bouton" onclick="UI.insert_focused('pcar(')"
          title="Polynome caract&eacute;ristique">pcar
  </button>
  <button class="bouton" onclick="UI.insert_focused('pmin(')"
          title="Polynome minimal">pmin
  </button>
  <button class="bouton" onclick="UI.insert_focused('matrix_norm(')"
          title="Norme matricielle (1, 2 ou inf) ">norm
  </button>
  <button class="bouton"
          onclick="$id('assistant_linalg').style.display='none'">Annul.
  </button>
</div>
<div id="chooselawdiv" style="display:none">
  <form id="chooselawform">
    Loi actuelle <input class="bouton" type="text" id="rand_law" name="rand_law"
                        title="Loi" value='normald'>, param&egrave;tres optionnels
    <input class="bouton" type="number" name="rand_law1" id="rand_law1"
           title="1er param&egrave;tre" value=0 step=0.01>
    <input class="bouton" type="number" name="rand_law2" id="rand_law2"
           title="2&egrave;me param&egrave;tre" value=1 step=0.01>
    <input class="bouton" type="text" name="law_arg" id="law_arg"
           title="argument de la loi, par exemple 1 ou 2 ou 1.3 ou x" value=1>
    <br>
    Choisir une autre loi
    <input type="button" onclick="$id('rand_law').value='uniformd';$id('rand_law1').value=0;$id('rand_law1').step=0.01;$id('rand_law2').value=1;$id('rand_law1').style.display='inline';$id('rand_law2').style.display='inline';" value="uniformd">
    <input type="button" onclick="$id('rand_law').value='normald';$id('rand_law1').value=0;$id('rand_law1').step=0.01;$id('rand_law2').value=1;$id('rand_law1').style.display='inline';$id('rand_law2').style.display='inline';" value="normald">
    <input type="button" onclick="$id('rand_law').value='exponentiald';$id('rand_law1').value=0.5;$id('rand_law1').step=0.01;$id('rand_law1').style.display='inline';$id('rand_law2').style.display='none';" value="exponentiald">
    <input type="button" onclick="$id('rand_law').value='binomial';$id('rand_law1').value=10;$id('rand_law1').step=1;$id('rand_law2').value=0.5;$id('rand_law1').style.display='inline';$id('rand_law2').style.display='inline';" value="binomial">
    <input type="button" onclick="$id('rand_law').value='negbinomial';$id('rand_law1').value=10;$id('rand_law1').step=1;$id('rand_law2').value=0.5;$id('rand_law1').style.display='inline';$id('rand_law2').style.display='inline';" value="negbinomial">
    <input type="button" onclick="$id('rand_law').value='geometric';$id('rand_law1').value=0.5;$id('rand_law1').step=0.01;$id('rand_law1').style.display='inline';$id('rand_law2').style.display='none';" value="geometric">
    <input type="button" onclick="$id('rand_law').value='poisson';$id('rand_law1').value=0.5;$id('rand_law1').step=0.01;$id('rand_law1').style.display='inline';$id('rand_law2').style.display='none';" value="poisson">
  </form>
</div>
<form id="assistant_matr" style="display:none" onsubmit="setTimeout(UI.assistant_matr_ok()); return false">
  <div id="matr_type_chooser">
    <input class="bouton" type="checkbox" name="matr_formule"
           onclick="$id('assistant_matr').matr_formuleshadow.checked=!checked;UI.assistant_matr_setdisplay();"
           title="Cocher pour d&eacute;finir la matrice par une formule">
    <input class="bouton" type="button" value="formule" onclick="$id('assistant_matr').matr_formule.checked=true;$id('assistant_matr').matr_formuleshadow.checked=false;UI.assistant_matr_setdisplay();"> ou
    <input class="bouton" type="checkbox" name="matr_formuleshadow"
           onclick="$id('assistant_matr').matr_formule.checked=!checked;UI.assistant_matr_setdisplay();"
           title="Cocher pour d&eacute;finir la matrice &eacute;l&eacute;ment par &eacute;l&eacute;ment" checked>
    <input class="bouton" type="button" value="case" onclick="$id('assistant_matr').matr_formule.checked=false;$id('assistant_matr').matr_formuleshadow.checked=true;UI.assistant_matr_setdisplay();">
  </div>
  <div id="matr_stats" style="display:none">
    <input class="bouton" type="button"
           onclick="$id('chooselawdiv').style.display='block';$id('law_arg').style.display='inline';$id('matr_stat12').style.display='none';$id('matr_testhyp').style.display='none';$id('risque_alpha').style.display='none';$id('matr').style.display='none';$id('matr_matr').style.display='none';" value="lois usuelles">
    ou <input class="bouton" type="button"
              onclick="$id('chooselawdiv').style.display='block';$id('law_arg').style.display='none';$id('matr_stat12').style.display='none';$id('matr_testhyp').style.display='none';$id('risque_alpha').style.display='block';$id('matr').style.display='none';$id('matr_matr').style.display='none';" value="intervalle de fluctuation">
    ou <input class="bouton" type="button" onclick="$id('matr_stat12').style.display='block';$id('matr').style.display='block'; if(UI.is_sheet){ UI.spreadsheet2matrix(false);UI.matrix2spreadsheet();} UI.assistant_matr_setdisplay();$id('matr_testhyp').style.display='none';$id('risque_alpha').style.display='none';$id('chooselawdiv').style.display='none'; $id('matr_matr').style.display='block';$id('matr_submat').style.display='block';" value="statistiques descriptives">
    ou <input class="bouton" type="button" onclick="$id('matr_stat12').style.display='none';$id('matr').style.display='block'; $id('matr_testhyp').style.display='block';$id('risque_alpha').style.display='block';$id('chooselawdiv').style.display='none'; $id('matr_matr').style.display='block';$id('matr_submat').style.display='block';UI.adequation($id('assistant_matr'))" value="statistiques inf&eacute;rentielles">
    <div id="matr_stat12" style="display:none">
      <input class="bouton" type="checkbox" name="stat_mean">Moyenne,
      <input class="bouton" type="checkbox" name="stat_stddev">Ecart-type,
      <input class="bouton" type="checkbox" name="stat_quartiles">Quartiles,
      <input class="bouton" type="checkbox" name="stat_histo" onclick="form.stat_cmax.value=form.stat_cmin.value;">Histogramme,
      <input class="bouton" type="checkbox" name="stat_moustache">Boite a moustache,
      <br>
      <input class="bouton" type="checkbox" name="stat_scatter" onclick="form.stat_cmax.value=form.stat_cmin.value+1;">Nuage de points
      <input class="bouton" type="checkbox" name="stat_polygonscatter" onclick="form.stat_cmax.value=form.stat_cmin.value+1;">reli&eacute;s,
      <input class="bouton" type="checkbox" name="stat_linreg" onclick="form.stat_cmax.value=form.stat_cmin.value+1;">R&eacute;gression lin&eacute;aire
    </div>
    <div id="risque_alpha" style="display:none">
      Risque &alpha;= <input class="bouton" type="text"
                             id="adequation_alpha" name="adequation_alpha" value=0.05 size=4>
    </div>
    <div id="matr_testhyp" style="display:none">
      <ul>
        <li>
          Intervalle de confiance :
          <input type="button" class="bouton" onclick="form.adequation[0].checked=true;UI.adequation(form)" value="proportion"><input type="radio" name="adequation"
                                                                                                                                      onclick="UI.adequation(form)" title="Intervalle de confiance calcul&eacute; par la loi normale en supposant n*p et n*(1-p)>=5" checked>
          (n=<input name="confiance_n" class="bouton" type="number" value=30
                    min=30 step=1 title="Taille de la population. Pour n&gt;100, utilise sqrt(n/(n-1)*p*(1-p)) comme estimateur de l'ecart-type, sinon on majore par 0.5">&geq;30,
          p=<input name="confiance_p" class="bouton" type="number"
                   title="Proportion dans l'&eacute;chantillon"
                   value=0.5 min=0 max=1 step=0.001>),
          <input type="button" class="bouton" onclick="form.adequation[1].checked=true;UI.adequation(form)" value="Student &mu;&sigma;"><input type="radio"
                                                                                                                                               onclick="UI.adequation(form)" name="adequation" title="Intervalle calcul&eacute par la loi de Student">
          (&mu;=<input name="confiance_mu" class="bouton" type="number"
                       title="Moyenne de l'&eacute;chantillon" value=0
                       step=0.001>, &sigma;=<input name="confiance_sigma" class="bouton" type="number"
                                                   step=0.001 min=0 value=1 title="Ecart-type de la population">
          n=<input name="confiance_n_" class="bouton" type="number" value=30
                   min=30 step=1>)
          <br>
          <input type="button" class="bouton" onclick="form.adequation[2].checked=true;UI.adequation(form)" value="donn&eacute;es"><input type="radio" onclick="UI.adequation(form)" name="adequation"
                                                                                                                                          title="Intervalle calcul&eacute; par la loi de Student sur les donn&eacute;es des lignes et colonnes de la matrice m">,
        </li>
        <li> Ad&eacute;quation data/data :
          <input type="button" class="bouton" onclick="form.adequation[3].checked=true;UI.adequation(form)" value="Chi2"> <input type="radio" onclick="UI.adequation(form)"
                                                                                                                                 name="adequation" value="radio">,
          <input type="button" class="bouton" onclick="form.adequation[4].checked=true;UI.adequation(form)" value="Kolmogorov"> <input onclick="UI.adequation(form)"
                                                                                                                                       type="radio" name="adequation" value="radio" title="test de Kolmogorov-Smirnov d'ad&eacute;quation &agrave; une loi commune continue inconnue">,
          ou
          <input type="button" class="bouton" onclick="form.adequation[5].checked=true;UI.adequation(form)" value="Wilcoxon"> <input onclick="UI.adequation(form)"
                                                                                                                                     type="radio" name="adequation" value="radio" title="test de Wilcoxon-Mann-Whitney">
        </li>
        <li>
          Ad&eacute;quation data/loi : <input type="button" class="bouton" onclick="form.adequation[6].checked=true;UI.adequation(form)" value="normal"> <input type="radio"
                                                                                                                                                                name="adequation" value="radio" onclick="UI.adequation(form)">
          ou
          <input type="button" class="bouton" onclick="form.adequation[7].checked=true;UI.adequation(form)" value="Student"> <input type="radio" onclick="UI.adequation(form)"
                                                                                                                                    name="adequation" value="radio"> :
          &mu;=<input class="bouton" type="text" name="adequation_mu" size=4
                      value=0>
          (&sigma;=<input class="bouton" type="text"
                          name="adequation_sigma" size=4> optionnel),
          <br>
          <span title="Hypoth&egrave;se alternative a H0">Alternative H1 &lt;<input type="radio" name="adequation_alt">,
                            &ne;<input type="radio" name="adequation_alt">,
                            &gt;<input type="radio" name="adequation_alt"></span>
        </li>
      </ul>
    </div>
  </div>
  <div id="matr_matr">
    <input id="matr_name" name="matr_name" class="bouton" type="text"
           value="m" title="Nom de la matrice" size=3>:
    <input class="bouton" type="button" onclick="UI.sheet_rowadd(-1);" value="-">
    <input class="bouton" type="number" id="matr_nrows" name="matr_nrows" onkeypress="if (event.keyCode!=13) return true; UI.assistant_matr_setdisplay(); return false;"
           title="Nombre de lignes de la matrice" value=3 min=1 max=40>
    <input class="bouton" type="button" onclick="UI.sheet_rowadd(1)" value="+">
    par
    <input class="bouton" type="button" onclick="UI.sheet_coladd(-1)" value="-">
    <input class="bouton" type="number" id="matr_ncols" name="matr_ncols" onkeypress="if (event.keyCode!=13) return true; UI.assistant_matr_setdisplay(); return false;"
           title="Nombre de colonnes de la matrice" value=3 min=1 max=6>
    <input class="bouton" type="button" onclick="UI.sheet_coladd(1)" value="+">
  </div>
  <div id="matr_formulediv">
    (j,k)-&gt;<textarea rows="1" cols="20" style="font-size:18px"
                        onclick="UI.focused=this;" id="matr_expr" name="matr_expr" title="Expression de m[j,k] en fonction de j et k"></textarea>
    <input class="bouton" type="checkbox" name="matr_start0"
           title="Cochez pour utiliser les indices commencant a 0" checked>
    (indices de 0 &agrave; taille-1)
    <br>
    <input class="bouton" type="button" title="Matrice identit&eacute;" value="Identit&eacute;" onclick="form.matr_expr.value='si j==k alors 1; sinon 0; fsi';">
    <input class="bouton" type="button" title="Matrice de Hilbert" value="Hilbert" onclick="form.matr_expr.value='1/(j+k+1)';">
    <input class="bouton" type="button" title="Effacer" value="Effacer" onclick="if (form.matr_formule.checked) form.matr_expr.value='';">
  </div>
  <input class="bouton" type="submit" title="ok" value="Ok">
  <input class="bouton" type="button" title="Annuler" value="Annul." onclick="$id('chooselawdiv').style.display='none';form.style.display='none'; UI.focused=UI.savefocused; UI.focused.focus();"> &nbsp;
  <div id="matr" style="display:none">
    <div id="matr_submat" style="display:none">
      Lignes <input id="stat_lmin" name="stat_lmin" class="bouton" type="number" min=0 value=0>
      -
      <input id="stat_lmax" name="stat_lmax" class="bouton" type="number" min=0 value=2>,
      colonnes <input id="stat_cmin" name="stat_cmin" class="bouton" type="number" min=0 value=0>
      -
      <input id="stat_cmax" name="stat_cmax" class="bouton" type="number" min=0 value=1>
    </div>
    <input id="matr_or_sheet" name="matr_or_sheet" class="bouton"
           type="checkbox" title="Cocher pour passer en mode tableur"
           onchange="UI.is_sheet=checked; if (checked) UI.matrix2spreadsheet(); else UI.spreadsheet2matrix(false);" checked>
    <input type="button" onclick="form.matr_or_sheet.checked=!form.matr_or_sheet.checked;if (form.matr_or_sheet.checked) UI.matrix2spreadsheet(); else UI.spreadsheet2matrix(false);" value="Tableur">
    <input class="bouton" type="button"
           onclick="UI.sheet_edit_cmd(0)" onmousedown="event.preventDefault()"
           title="Copier vers le bas" value="cp↓">
    <input class="bouton" type="button"
           onclick="UI.sheet_edit_cmd(1)" onmousedown="event.preventDefault()"
           title="Copier vers la droite" value=" →">
    <input class="bouton" type="button"
           onclick="UI.sheet_edit_cmd(2)" onmousedown="event.preventDefault()"
           title="Ajouter une ligne" value="l+">
    <input class="bouton" type="button"
           onclick="UI.sheet_edit_cmd(3)" onmousedown="event.preventDefault()"
           title="Enlever une ligne" value="l-">
    <input class="bouton" type="button"
           onclick="UI.sheet_edit_cmd(4)" onmousedown="event.preventDefault()"
           title="Ajouter une colonne" value="c+">
    <input class="bouton" type="button"
           onclick="UI.sheet_edit_cmd(5)" onmousedown="event.preventDefault()"
           title="Enlever une colonne" value="c-">
    <input class="bouton" type="button"
           onclick="UI.insert_focused('=')" onmousedown="event.preventDefault()"
           title="Pr&eacute;fixe de formule tableur" value="=">
    <input class="bouton" type="button"
           onclick="UI.insert_focused('$')" onmousedown="event.preventDefault()"
           title="Pr&eacute;fixe de positionnement absolu" value="$">
    <div id="matr_casediv">
    </div>
  </div>
</form>
<form id="assistant_rand" style="display:none">
  G&eacute;n&eacute;rer
  <input class="bouton" type="button" onclick="form.rand_nrows.value--; if(form.rand_nrows.value<0) form.rand_nrows.value=0" value="-">
  <input class="bouton" type="number" id="rand_nrows" name="rand_nrows"
         title="Nombre de lignes de la matrice (0 pour un vecteur)" value=1 min=0>
  <input class="bouton" type="button" onclick="$id('rand_nrows').value++;" value="+">
  par
  <input class="bouton" type="button" onclick="form.rand_ncols.value--; if(form.rand_ncols.value<0) form.rand_ncols.value=0" value="-">
  <input class="bouton" type="number" id="rand_ncols" name="rand_ncols"
         title="Nombre de colonnes de la matrice (0 pour un seul nombre)"
         value=1 min=0>
  <input class="bouton" type="button" onclick="$id('rand_ncols').value++;" value="+">
  nombres
  <input class="bouton" type="checkbox" name="rand_int"
         onclick="$id('assistant_rand').rand_intshadow.checked=!checked;UI.assistant_rand_setdisplay();"
         title="Cocher pour entiers" checked>
  <input class="bouton" type="button" value="entiers"
         onclick="var checked=form.rand_int.checked;form.rand_int.checked=!checked;form.rand_intshadow.checked=checked;UI.assistant_rand_setdisplay();">
  ou selon une
  <input class="bouton" type="checkbox" name="rand_intshadow" value="loi"
         onclick="$id('assistant_rand').rand_int.checked=!checked;UI.assistant_rand_setdisplay();"
         title="Cocher pour choisir une loi">
  <input class="bouton" type="button" value="loi"
         onclick="var checked=form.rand_intshadow.checked;form.rand_intshadow.checked=!checked;form.rand_int.checked=checked;UI.assistant_rand_setdisplay();">
  <div id="rand_intdiv">
    Entiers entre 0 et n ou n et -n avec n=
    <input class="bouton" type="number" id="rand_maxint"
           title="Entier k tel que 0&lt;=k&lt;n ou n&lt;k&lt;-n si n est n&eacute;gatif" value=100>
  </div>
  <br><input class="bouton" type="button" title="ok" value="Ok"
             onclick="UI.assistant_rand_ok()">
  <input class="bouton" type="button" title="r&eacute;el al&eacute;atoire entre 0 et 1"
         value="rand" onclick="UI.insert_focused('rand()');"><input class="bouton" type="button" title="randint(a,b): entier al&eacute;atoire entre a et b inclus"
                                                                       value="int" onclick="UI.insert_focused('randint(');"><input class="bouton" type="button" title="r&eacute;el al&eacute;atoire selon la loi normale (centr&eacute;e r&eacute;duite par d&eacute;faut)"
                                                                                                                                      value="norm" onclick="UI.insert_focused('randNorm(');"><input class="bouton" type="button" title="r&eacute;el al&eacute;atoire selon la loi exponentielle de param&egrave;tre a"
                                                                                                                                                                                                       value="exp" onclick="UI.insert_focused('randexp(');">
  <input class="bouton" type="button" title="Permutation al&eacute;atoire d'une liste ou de n"
         value="perm" onclick="UI.insert_focused('randperm(');">
  <input class="bouton" type="button" title="sample(L,n) tirage de n parmi la liste L sans remise"
         value="sample" onclick="UI.insert_focused('sample(');">
  <input class="bouton" type="button" title="Annuler" value="Annul." onclick="$id('chooselawdiv').style.display='none';form.style.display='none'; UI.focused=UI.savefocused; UI.focused.focus();">
</form>
<div id="assistant_boucle" style="display:none">
  Choisir <strong>type de boucle</strong>
  <button class="bouton" onmousedown="event.preventDefault()" onclick="$id('assistant_pour').style.display='block';UI.set_focus('pourvarname'); $id('assistant_tantque').style.display='none';">pour</button>
  ou
  <button class="bouton" onmousedown="event.preventDefault()" onclick="$id('assistant_pour').style.display='none';$id('assistant_tantque').style.display='block';UI.set_focus('tantquecond'); $id('tantquecond').focus();">tantque</button>
  <div id="assistant_pour" style="display:none">
    pour <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                   id="pourvarname" title="Nom de variable, par exemple j" rows=1></textarea><br>
    de <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                 id="pourvarmin" title="Valeur de d&eacute;part" rows=1></textarea><br>
    jusque <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                     id="pourvarmax" title="Valeur de fin (non comprise en syntaxe Python, comprise en syntaxe Xcas)" rows=1></textarea><br>
    pas optionnel <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                            id="pourvarstep" title="on ajoute le pas &agrave; chaque it&eacute;ration, valeur par d&eacute;faut 1" rows=1></textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_pour_ok();">Ok</button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_boucle').style.display='none';$id('assistant_pour').style.display='none'">Annul.</button>
    <button class="bouton"
            onclick="$id('pourvarname').value='';$id('pourvarmin').value='';$id('pourvarmax').value='';">Effacer
    </button>
    <button class="bouton" onclick="$id('pourvarname').value='j';$id('pourvarmin').value='1';$id('pourvarmax').value='10';">Exemple</button>
  </div>
  <div id="assistant_tantque" style="display:none">
    Tests :
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused('==')">==
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused('!=')">!=
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused('<=')">&lt;=
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused('>=')">&gt;=
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused('<')">&lt
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused('>')">&gt
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused(' et ')">et
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused(' ou ')">ou
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused('!')">!
    </button>
    <br>
    tantque <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="tantquecond" title="Test de continuation de la boucle"
                      rows=1></textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_tantque_ok();">Ok</button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_boucle').style.display='none';$id('assistant_pour').style.display='none'">Annul.</button>
  </div>
</div>
<div id="assistant_solve" style="display:none">
  R&eacute;soudre
  <button class="bouton" id="solvex" title="Cliquez ici pour une r&eacute;solution approch&eacute;e"
          onclick="style.display='none';$id('solvenum').style.display='inline'">exactement
  </button>
  <button class="bouton" style="display:none" id="solvenum" title="Cliquez ici pour une r&eacute;solution exacte"
          onclick="style.display='none';$id('solvex').style.display='inline'">de mani&egrave;re approch&eacute;ee
  </button>
  <button class="bouton" id="solveR" title="Cliquez ici pour une r&eacute;solution sur C"
          onclick="style.display='none';$id('solveC').style.display='inline'">sur R
  </button>
  <button class="bouton" style="display:none" id="solveC" title="Cliquez ici pour une r&eacute;solution sur R"
          onclick="style.display='none';$id('solveR').style.display='inline'">sur C
  </button>
  <br>
  l'&eacute;quation ou le syst&egrave;me
  <br>
  <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
            id="solveeq" title="Par exemple x^2-3x+1=0" rows=1
            cols=30></textarea>
  <br>
  d'inconnue(s)
  <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
            id="solvevar" title="Par exemple x" rows=1 cols=10></textarea>
  <br>
  <button class="bouton" onclick="UI.assistant_solve_ok();">Ok</button>
  <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_solve').style.display='none'">Annul.</button>
  <button class="bouton" onclick="$id('solveeq').value='';$id('solvevar').value='';">Effacer</button>
  <button class="bouton" onclick="$id('solveeq').value='x^2-3x+1';$id('solvevar').value='x';">Exemple</button>
  <button class="bouton" onclick="$id('solveeq').value='[2x^2-y^2=1,x+y=3]';$id('solvevar').value='[x,y]';">Syst&egrave;me</button>
</div>
<div id="assistant_suites" style="display:none">
  Choisir entre
  <button class="bouton"
          onclick="$id('assistant_rsolve').style.display='none';$id('assistant_fixe').style.display='block';UI.set_focus('rsolveexpr') ">&eacute;tude approch&eacute;e de u_(n+1)=f(u_n)
  </button>
  ou
  <button class="bouton"
          onclick="$id('assistant_rsolve').style.display='block';$id('assistant_fixe').style.display='none';UI.set_focus('rsolveeq');">
    trouver u_n en fonction de n
  </button>
  <button class="bouton"
          onclick="UI.focused=UI.savefocused;$id('assistant_suites').style.display='none'">Annul.
  </button>
  <br>
  <div id="assistant_rsolve" style="display:none">
    Relation(s) de r&eacute;currence
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="rsolveeq" title="Par exemple u(n+1)===2*u(n)+3" rows=1
              cols=40></textarea>
    <br>
    Suite(s) inconnue(s)
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="rsolvevar" title="Par exemple u(n)" rows=1 cols=20>u(n)</textarea>
    <br>
    Conditions initiales
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="rsolveinit" title="Par exemple u(0)===1" rows=1
              cols=20>u(0)===1</textarea>
    <br>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.set_focus('rsolveeq') ;UI.insert_focused('u(n+2)')">u(n+2)
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.set_focus('rsolveeq') ;UI.insert_focused('u(n+1)')">u(n+1)
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.insert_focused('u(n)')">u(n)
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.set_focus('rsolveeq') ;UI.insert_focused('u(n-1)')">u(n-1)
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.set_focus('rsolveinit') ;UI.insert_focused('u(0)===')">u(0)=
    </button>
    <button class="bouton" onmousedown="event.preventDefault()"
            onclick="UI.set_focus('rsolveinit');UI.insert_focused('u(1)===')">u(1)=
    </button>
    <br>
    <button class="bouton"
            onclick="UI.assistant_rsolve_ok();">Ok
    </button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_suites').style.display='none'">Annul.</button>
    <button class="bouton" onclick="$id('rsolveeq').value='';$id('rsolvevar').value='';$id('rsolveinit').value='';">Effacer</button>
    <button class="bouton" onclick="$id('rsolveeq').value='u(n+1)===2*u(n)+3';$id('rsolvevar').value='u(n)';$id('rsolveinit').value='u(0)===1';">Arit-geo</button>
    <button class="bouton" onclick="$id('rsolveeq').value='u(n+1)===(u(n)+2)/(u(n)+1)';$id('rsolvevar').value='u(n)';$id('rsolveinit').value='u(0)===1';">Fixe</button>
    <button class="bouton" onclick="$id('rsolveeq').value='u(n+2)===u(n+1)+u(n)';$id('rsolvevar').value='u(n)';$id('rsolveinit').value='u(0)===1,u(1)===1';">Fibonacci</button>
    <button class="bouton" onclick="$id('rsolveeq').value='[u(n+1)===3*v(n)+u(n),v(n+1)===v(n)+u(n)]';$id('rsolvevar').value='[u(n),v(n)]';$id('rsolveinit').value='u(0)===1,v(0)===2'">Syst&egrave;me</button>
  </div>
  <div id="assistant_fixe" style="display:none">
    u_(n+1)=<textarea onkeyup="$id('rsolvefshadow').innerHTML=value;" onclick="UI.focused=this;" style="height:25px;font-size:large"
                      id="rsolvef" title="Nom de la fonction" rows=1
                      cols=2>f</textarea>(u_n) avec
    <span id="rsolvefshadow">f</span>(<textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                                id="rsolvevarf" title="" rows=1 cols=2>x</textarea>):=
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="rsolveexpr" title="Par exemple (x+2)/(x+1)" rows=1 cols=20></textarea>
    et u(0)=
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="rsolveu0" title="Par exemple 1" rows=1
              cols=10></textarea>
    <br>
    Nombre de termes n=
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="rsolven" title="Par exemple 10" rows=1
              cols=3>10</textarea>
    <br>
    Repr&eacute;sentation graphique entre
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="rsolvemin" title="Par exemple 0" rows=1
              cols=3>0</textarea> et
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="rsolvemax" title="Par exemple 2" rows=1
              cols=3>2</textarea>
    <br>
    <button class="bouton"
            onclick="UI.assistant_fixe_ok();">Ok
    </button>
    <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_suites').style.display='none'">Annul.</button>
    <button class="bouton" onclick="$id('rsolvef').value='';$id('rsolvevarf').value='';$id('rsolveexpr').value='';$id('rsolveu0').value='';$id('rsolven').value='';$id('rsolvemin').value='';$id('rsolvemax').value='';">Effacer</button>
    <button class="bouton" onclick="$id('rsolvef').value='f';$id('rsolvevarf').value='x';$id('rsolveexpr').value='(x+2)/(x+1)';$id('rsolveu0').value='1';$id('rsolven').value='10';$id('rsolvemin').value='1';$id('rsolvemax').value='2';">Exemple</button>
  </div>
</div>
<div id="assistant_test" style="display:none">
  Tests :
  <button class="bouton" onmousedown="event.preventDefault()"
          onclick="UI.insert_focused('==')">==
  </button>
  <button class="bouton" onmousedown="event.preventDefault()"
          onclick="UI.insert_focused('!=')">!=
  </button>
  <button class="bouton" onmousedown="event.preventDefault()"
          onclick="UI.insert_focused('<=')">&lt;=
  </button>
  <button class="bouton" onmousedown="event.preventDefault()"
          onclick="UI.insert_focused('>=')">&gt;=
  </button>
  <button class="bouton" onmousedown="event.preventDefault()"
          onclick="UI.insert_focused('<')">&lt
  </button>
  <button class="bouton" onmousedown="event.preventDefault()"
          onclick="UI.insert_focused('>')">&gt
  </button>
  <button class="bouton" onmousedown="event.preventDefault()"
          onclick="UI.insert_focused(' et ')">et
  </button>
  <button class="bouton" onmousedown="event.preventDefault()"
          onclick="UI.insert_focused(' ou ')">ou
  </button>
  <button class="bouton" onmousedown="event.preventDefault()"
          onclick="UI.insert_focused('!')">!
  </button>
  <br>
  si <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
               id="sicond" title="Test, par exemple j!=0"
               rows=1></textarea>
  <br>
  alors <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                  id="sialors" title="Clause vraie, par exemple j:=-j;"
                  rows=1></textarea>
  <br>
  sinon (optionnel) <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                              id="sisinon" title="Clause fausse"
                              rows=1></textarea>
  <br>
  <button class="bouton" onclick="UI.assistant_test_ok();">Ok</button>
  <button class="bouton"
          onclick="UI.focused=UI.savefocused;$id('assistant_test').style.display='none'">Annul.
  </button>
  <button class="bouton"
          onclick="$id('sicond').value='';$id('sialors').value='';">Effacer
  </button>
  <button class="bouton"
          onclick="$id('sicond').value='j<0';$id('sialors').value=UI.python_mode?'j=-j':'j:=-j;';">Exemple 1
  </button>
  <button class="bouton"
          onclick="$id('sicond').value='j<0';$id('sialors').value=UI.python_mode?'absj=-j':'absj:=-j;';$id('sisinon').value=UI.python_mode?'absj=j':'absj:=j;';">Exemple 2
  </button>
</div>
<div id="assistant_prog" style="display:none">
  <strong>Nouvelle fonction</strong><br>
  nom de la fonction <textarea onclick="UI.focused=this;" style="height:25px;font-size:large" id="funcname" title="Nom de la fonction, par exemple f" rows=1>f</textarea><br>
  liste des arguments <textarea onclick="UI.focused=this;" style="height:25px;font-size:large" id="argsname" title="Arguments de la fonction s&eacute;par&eacute;s par des virgules" rows=1>x</textarea><br>
  <span id="localvarspan">variables locales <textarea onclick="UI.focused=this;" style="height:25px;font-size:large" id="localvars" title="Variables locales, s&eacute;par&eacute;es par des virgule. Laisser vide pour une fonction d&eacute;finie par une expression. Pour utiliser des variables locales formelles, purgez-les apr&egrave;s les avoir d&eacute;clar&eacute;." rows=1></textarea><br></span>
  valeur renvoy&eacute;e <textarea onclick="UI.focused=this;" style="height:25px;font-size:large" id="returnedvar" title="Valeur de retour" rows=1></textarea><br>
  <button class="bouton" onclick="UI.assistant_prog_ok();">Ok</button>
  <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_prog').style.display='none'">Annul.</button>
  <button class="bouton"
          onclick="$id('funcname').value='';$id('argsname').value='';$id('localvars').value='';$id('returnedvar').value='';">Effacer
  </button>
  <button class="bouton" onclick="$id('funcname').value='f';$id('argsname').value='x,y';$id('localvars').value='';$id('returnedvar').value='x*y';">Exemple 1</button>
  <button class="bouton" onclick="$id('funcname').value='f';$id('argsname').value='x,y';$id('localvars').value='z';$id('returnedvar').value='x*z';">Exemple 2</button>
</div>
<div id="assistant_seq" style="display:none">
  Cr&eacute;ation d'une s&eacute;quence ou tableau de valeurs, <br>
  expression <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                       id="seqexpr" title="Expression, par exemple j^2" rows=1></textarea><br>
  variable <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                     id="seqvarname" title="Nom de variable, par exemple j" rows=1></textarea><br>
  de <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
               id="seqvarmin" title="Valeur de d&eacute;part" rows=1></textarea><br>
  jusque <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                   id="seqvarmax" title="Valeur de fin" rows=1></textarea><br>
  Pas optionnel <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                          id="seqvarstep" title="on ajoute le pas &agrave; chaque it&eacute;ration, valeur par d&eacute;faut 1" rows=1></textarea>
  <br>
  <button class="bouton" onclick="UI.assistant_seq_ok();">Ok</button>
  <button class="bouton" onclick="UI.focused=UI.savefocused;$id('assistant_seq').style.display='none'">Annul.</button>
  <button class="bouton" onclick="$id('seqexpr').value='j^2';$id('seqvarname').value='j';$id('seqvarmin').value='1';$id('seqvarmax').value='10';$id('seqvarstep').value=''">Exemple 1</button>
  <button class="bouton" onclick="$id('seqexpr').value='[j,j^2]';$id('seqvarname').value='j';$id('seqvarmin').value='-2';$id('seqvarmax').value='2';$id('seqvarstep').value='0.25'">Exemple 2</button>
  <button class="bouton"
          onclick="$id('seqexpr').value='';$id('seqvarname').value='';$id('seqvarmin').value='';$id('seqvarmax').value='';$id('seqvarstep').value=''">Effacer
  </button>
</div>
<div id="assistant_tabvar" style="display:none">
  Choisir entre &eacute;tude de
  <button class="bouton" onclick="$id('assistant_tabvarfunc').style.display='block';UI.xtn='x';$id('assistant_tabvarparam').style.display='none';UI.set_focus('tabvarfuncexpr')">fonction</button>
  ou de
  <button class="bouton"
          onclick="$id('assistant_tabvarfunc').style.display='none';$id('assistant_tabvarparam').style.display='block';UI.xtn='t';UI.set_focus('tabvarparamexprx');">courbe
    param&eacute;tr&eacute;e
  </button>
  <button class="bouton"
          onclick="UI.focused=UI.savefocused;$id('assistant_tabvar').style.display='none'">Annul.
  </button>
  <br>
  <div id="assistant_tabvarfunc" style="display:none">
    &Eacute;tude de fonction (dans la console) et trac&eacute; de <br>
    <textarea rows=1 cols=3 onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="tabvarfuncname" title="Nom de fonction">f</textarea>(
    <textarea rows=1 cols=2 onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="tabvarfuncvarname" title="Nom de variable, par exemple x">x</textarea>)
    :=<textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                id="tabvarfuncexpr" title="Expression, par exemple x^2" rows=1></textarea><br>
    xmin <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                   id="tabvarfuncvarmin" title="Minimum" rows=1>-4</textarea><br>
    xmax <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                   id="tabvarfuncvarmax" title="Maximum" rows=1>4</textarea><br>
    xstep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                    id="tabvarfuncvarstep" title="Pas entre 2 &eacute;valuations successives de l'expression" rows=1>0.0625</textarea>
    <br>
    Option : <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                       id="tabvarfuncopt" title="diff: pas de convexit&eacute;, plot: renvoie le graphe, tabvar: renvoie le tableau de variations, equation ou coordonnees: des points particuliers," rows=1>diff</textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_tabvarfunc_ok();">Ok</button>
    <button class="bouton"
            onclick="UI.focused=UI.savefocused;$id('assistant_tabvar').style.display='none'">Annul.
    </button>
    <button class="bouton"
            onclick="$id('tabvarfuncname').value='';$id('tabvarfuncexpr').value='';$id('tabvarfuncvarname').value='';$id('tabvarfuncvarmin').value='';$id('tabvarfuncvarmax').value='';$id('tabvarfuncvarstep').value='';">Effacer
    </button>
    <button class="bouton" onclick="$id('tabvarfuncname').value='f';$id('tabvarfuncexpr').value='x/(x^2-1)';$id('tabvarfuncvarname').value='x';$id('tabvarfuncvarmin').value='-inf';$id('tabvarfuncvarmax').value='inf';">Exemple</button>
    <button class="bouton"
            onclick="$id('assistant_tabvar').style.display='none';$id('assistant_seq').style.display='block';$id('seqexpr').value= '['+$id('tabvarfuncvarname').value+','+$id('tabvarfuncexpr').value+']';$id('seqvarname').value=$id('tabvarfuncvarname').value;var tmp=$id('tabvarfuncvarmin').value; if(tmp=='-inf') tmp=-5;$id('seqvarmin').value=tmp;tmp=$id('tabvarfuncvarmax').value; if(tmp=='inf') tmp=5;$id('seqvarmax').value=tmp;$id('seqvarstep').value=$id('tabvarfuncxstep').value;">Tableau valeurs
    </button>
    .
  </div>
  <div id="assistant_tabvarparam" style="display:none">
                <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                          id="tabvarparamnamex" title="Nom de la fonction en abscisse"
                          rows=1 cols=3>x1</textarea>
    (<textarea onkeyup="$id('tabvarparamvarnameshadow').innerHTML=value;" onclick="UI.focused=this;" style="height:25px;font-size:large"
               id="tabvarparamvarname" title="Nom de variable, par exemple t"
               rows=1 cols=2>t</textarea>):= <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                                       id="tabvarparamexprx" title="Expression de x(t), par exemple 2*cos(t)" rows=1></textarea><br>
    <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
              id="tabvarparamnamey" title="Nom de la fonction en ordonn&eacute;e"
              rows=1 cols=3>y1</textarea>(<span id="tabvarparamvarnameshadow">t</span>):= <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                                                                                                    id="tabvarparamexpry" title="Expression de y(t), par exemple 3*sin(t)" rows=1></textarea><br>
    tmin <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                   id="tabvarparamvarmin" title="Valeur de d&eacute;part" rows=1>-4</textarea><br>
    tmax <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                   id="tabvarparamvarmax" title="Valeur de fin" rows=1>4</textarea><br>
    tstep <textarea onclick="UI.focused=this;" style="height:25px;font-size:large"
                    id="tabvarparamvarstep" title="Pas entre 2 &eacute;valuations successives" rows=1>0.0625</textarea>
    <br>
    <button class="bouton" onclick="UI.assistant_tabvarparam_ok();">Ok</button>
    <button class="bouton"
            onclick="UI.focused=UI.savefocused;$id('assistant_tabvar').style.display='none'">Annul.
    </button>
    <button class="bouton"
            onclick="$id('tabvarparamnamex').value='';$id('tabvarparamnamey').value='';$id('tabvarparamexprx').value='';$id('tabvarparamexpry').value='';$id('tabvarparamvarname').value='';$id('tabvarparamvarnameshadow').innerHTML='';$id('tabvarparamvarmin').value='';$id('tabvarparamvarmax').value='';$id('tabvarparamvarstep').value='';">Effacer
    </button>
    <button class="bouton" onclick="$id('tabvarparamnamex').value='x1';$id('tabvarparamnamey').value='y1';$id('tabvarparamexprx').value='cos(2t)';$id('tabvarparamexprx').value='cos(2t)';$id('tabvarparamexpry').value='sin(3t)';$id('tabvarparamvarname').value='t';$id('tabvarparamvarnameshadow').innerHTML='t';$id('tabvarparamvarmin').value='-pi';$id('tabvarparamvarmax').value='pi';">Exemple</button>
  </div>
</div>
<table border="0" align="center" summary="" id="alpha_keyboard"
       style="display:none" onmousedown="event.preventDefault()">
  <tr>
    <td>
      <input type="button" id="add_alpha_a" value="a"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_z" value="z"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_e" value="e"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_r" value="r"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_t" value="t"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_y" value="y"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_u" value="u"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_i" value="i"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_o" value="o"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_p" value="p"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
    </td>
  </tr>
  <tr>
    <td>
      <input type="button" id="add_alpha_q" value="q"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_s" value="s"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_d" value="d"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_f" value="f"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_g" value="g"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_h" value="h"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_j" value="j"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_k" value="k"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_l" value="l"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_m" value="m"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
    </td>
  </tr>
  <tr>
    <td>
      <input type="button"
             onmousedown="event.preventDefault()"
             onClick='var kbd_a=["a","b","c","d","e",
                        "f","j","n","r","u","x",
                        "g","k","o","s","v","y",
                        "h","l","p","t","w","z",
                        "i","m","q"];
                        for (var i=0;i<kbd_a.length;i++){
                        var tmp=$id("add_alpha_"+kbd_a[i]);
                        if (tmp.value<="Z") tmp.value=String.fromCharCode(tmp.value.charCodeAt(0)+32); else tmp.value=String.fromCharCode(tmp.value.charCodeAt(0)-32);
                        }' id="add_alpha_" value="maj">
      <input type="button" id="add_alpha_w" value="w"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_x" value="x"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_c" value="c"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_v" value="v"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_b" value="b"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_n" value="n"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_{" value="{"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_}" value="}"
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(value)">
      <input type="button" id="add_alpha_space" value=" "
             onmousedown="event.preventDefault()" onClick="UI.insert_focused(' ')">
    </td>
  </tr>
</table>
<hr>
<div id="divoutput" style="max-height: 400px; overflow:auto">
  <table id="mathoutput" contextmenu="cmdmenu" title="Historique"
         style="max-width:1000px "></table>
</div>
<div id="history4" style="display:none">
  <button class="bouton" onclick="var tmp=$id('variables'); if(tmp.style.display=='inline') tmp.style.display='none'; else {tmp.style.display='inline';UI.listvars(3);}"><strong>Vars</strong></button>
  <span id="variables" style="display:none">
            <button class="bouton" onclick="UI.insert_focused('python(')"
                    title="python(f) affiche la conversion en syntaxe Python d'une fonction stock&eacute; dans la variable f ">→python</button>
            <button class="bouton" onclick="UI.insert_focused('xcas(')"
                    title="xcas(f) affiche la conversion en syntaxe Xcas d'une fonction stock&eacute; dans la variable f ">→xcas</button>
            <button class="bouton" name="add_purge"
                    onmousedown="event.preventDefault()"
                    onClick="UI.insert_focused('purge(')" title="Efface le contenu d'une ou plusieurs variables, par exemple purge(a) ou purge(a,b,c)">efface</button>
            <button class="bouton" onclick="UI.addhelp(' ','rm_all_vars(1)')"
                    title="Effacer le contenu de toutes les variables">tout</button>
            <span id="listvars"> </span>
            <br>
            </span>
  <span id="historique">
            <button class="bouton" onclick="UI.exec($id('mathoutput'),0)"
                    title="Executer toutes les commandes de l'historique">Exec</button>
            <button class="bouton" id="button_show_answers" onclick="UI.show_answers(true)" title="Montrer les r&eacute;ponses">+</button>
            <button class="bouton" id="button_hide_answers" onclick="UI.show_answers(false)" title="Cacher les r&eacute;ponses">-</button>
            <button class="bouton" onclick="UI.erase_all($id('mathoutput'))"
                    title="Placer tout les niveaux de l'historique dans la
                corbeille">→Corbeille</button>
            <button class="bouton" onclick="UI.restoretrash()" title="Restaurer les niveaux plac&eacute;s dans la corbeille">Restaure</button>
            <button class="bouton" onclick="UI.emptytrash()"
                    title="Vider la corbeille">Vide</button>
            </span>
</div>
<div contextmenu="cmdmenu" title="F1: aide sur le mot-clef avant le curseur.">
            <textarea name="entree" id="entree" title="Taper une commande ici puis Entree pour valider" style="font-size:18px;width:98%"
                      rows=1 onclick="UI.focused=this;" onkeypress="UI.focused=this; if (event.keyCode==13 && event.shiftKey){UI.insert(this,'\n'); UI.indentline(this); return false;} if (event.keyCode!=13 || event.shiftKey) return true;UI.eval_cmdline1(value,true); return false;"></textarea>
  <span>
            <button class="bouton" style="color:green" id="button_ok" onclick="if (UI.assistant_ok()) return; if (UI.focused==cmentree || UI.focused==entree) UI.eval_cmdline(); else {UI.reeval(UI.focused,'',false);}" title="Evaluer la ligne de commande">
  <strong>&nbsp;&nbsp;Ok&nbsp;&nbsp;</strong></button>
  <button class="bouton xcas" title="Xcas evaluation" onclick="UI.micropy=0; UI.python_mode=0;$id('button_ok').click();">x</button><button class="bouton cas" title="Xcas Python mode evaluation" onclick="UI.micropy=0; UI.python_mode=1;$id('button_ok').click();">Cas</button><button class="bouton micropy" title="MicroPython evaluation" onclick="UI.micropy=1; UI.python_mode=4;$id('button_ok').click();">Py</button><button class="bouton js" id="bouton_js" title="Javascript evaluation" onclick="UI.micropy=-1; UI.python_mode=0;$id('button_ok').click();">JS</button>
            <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.completion(cmentree)" title="Donne une aide courte et quelques exemples d'utilisation d'une commande.">&nbsp;?&nbsp;</button>
            <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.move_caret_or_focus(UI.focused,-1)" title="Deplace vers la gauche le curseur">&nbsp;&nbsp;←&nbsp;&nbsp;</button><button class="bouton" id="button_droit" onmousedown="event.preventDefault()" onClick="UI.move_caret_or_focus(UI.focused,1)" title="Deplace vers la droite le curseur"> &nbsp;&nbsp;→&nbsp;&nbsp;</button><button class="bouton" onmousedown="event.preventDefault()" onClick="UI.moveCaretUpDown(UI.focused,-1)" title="Deplace vers le haut le curseur">&nbsp;↑&nbsp;&nbsp;</button><button class="bouton" onmousedown="event.preventDefault()" onClick="UI.moveCaretUpDown(UI.focused,1)" title="Deplace vers le bas le curseur">&nbsp;&nbsp;↓&nbsp;</button><button class="bouton" onmousedown="event.preventDefault()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            onClick="UI.indentline(UI.focused)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            title="Indente">→|</button>
            <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.backspace(UI.focused)" title="Efface">&nbsp;&#x232b;&nbsp;</button>
            <button class="bouton" onmousedown="event.preventDefault()" onClick="UI.insert_focused('\n')" title="Saut de ligne">\n</button>
            <button class="bouton" onmousedown="event.preventDefault()" onclick="UI.search(this,6)" title="Annuler"><img width="16" height="16" src="undo.png" alt="Annuler" align="center"></button><button class="bouton" onmousedown="event.preventDefault()" onclick="UI.search(this,7)" title="Refaire"><img width="16" height="16" src="redo.png" alt="Refaire" align="center"></button><button class="bouton" onmousedown="event.preventDefault()" onclick="UI.search(this,0)" title="Rechercher">find</button><button class="bouton" onmousedown="event.preventDefault()" onclick="UI.search(this,1)" title="Rechercher suivant">&#x21D2;</button><button class="bouton" onmousedown="event.preventDefault()" onclick="UI.search(this,2)" title="Rechercher pr&eacute;c&eacute;dent">&#x21D0;</button><button
      class="bouton"
      onmousedown="event.preventDefault()"
      onclick="UI.search(this,3)"
      title="Remplacer">rep</button><button
      class="bouton" onmousedown="event.preventDefault()" onclick="UI.search(this,5)" title="Aller ligne">go</button>
            <button class="bouton" name="select_button"
                    id="select_button" onmousedown="event.preventDefault()"
                    onClick="UI.selectionne()" title="Selectionne la ligne de commande">&nbsp;sel&nbsp;</button>  <button id="stop_button" class="bouton" style="display:none"
                                                                                                                          onclick="if (UI.webworker && confirm('Voulez-vous vraiment terminer la session ?')){
                UI.webworker.terminate(); UI.busy=0;UI.webworker=0; alert('Session redemarree. Toutes les variables ont ete effacees.');}" title="Termine la session en cours">STOP</button>
            </span>
</div>
<div id="restoresession" style="display:none">
  <h1> Restauration de la session en cours</h1>
</div>
<div id="consolediv" style="display:none">
  <hr>
  <h3>Console</h3>
  <button class="bouton" title="Effacer la console (Ctrl-N)" onclick="var field=$id('output');field.innerHTML='';$id('consolediv').style.display='none';UI.set_config_width();">Efface</button>
  <button class="bouton" title="Augmenter le nombre de lignes" onclick="var field=$id('output');var s=field.style.maxHeight; s=s.substr(0,s.length-2);s=eval(s)+20 ;s=s+'px';field.style.maxHeight =s ;">+</button>
  <button class="bouton" title="Diminuer le nombre de lignes" onclick="var field=$id('output');var s=field.style.maxHeight; s=s.substr(0,s.length-2);s=Math.max(eval(s)-20,40) ;s=s+'px';field.style.maxHeight =s ;">-</button>
</div>
<div id="output" style="max-height: 200px; overflow:auto"></div>
<div id="table_3d" style="display:none">
  <hr>
  <table border="0" align="left" summary="">
    <tr>
      <td>
        <button id="boutons_3d0" class="bouton" onclick="
                            if($id('table_3d').style.display=='none'){
                            $id('table_3d').style.display='inherit';
                            }
                            else {
                            $id('table_3d').style.display='none';
                            }"
                title="Montre ou cache le graphe 3d">Graphe 3d
        </button>
        <span id="boutons_3d">
                        <button class="bouton" onclick="UI.giac_renderer('-')">out</button>
                        <button class="bouton" onclick="UI.giac_renderer('+')">in</button>
                        <button class="bouton" onclick="UI.giac_renderer('l')"> ← </button>
                        <button class="bouton" onclick="UI.giac_renderer('r')"> → </button>
                        <button class="bouton" onclick="UI.giac_renderer('u')"> ↑ </button>
                        <button class="bouton" onclick="UI.giac_renderer('d')"> ↓ </button>
                        </span>
      </td>
    </tr>
    <tr>
      <td>
        <canvas id='canvas' width=0 height=0
                onmousedown="UI.canvas_pushed=true;UI.canvas_lastx=event.clientX; UI.canvas_lasty=event.clientY;"
                onmouseup="UI.canvas_pushed=false;">
        </canvas>
      </td>
    </tr>
  </table>
</div>
<div class="emscripten" id="status">Downloading...</div>
<div class="emscripten">
  <progress value="0" max="100" id="progress" hidden=1></progress>
</div>
<script src="w3data.js"></script>
<div w3-include-html="menufr.js"></div>
<script src="FileSaver.js"></script>
<script src="codemirror.js"></script>
<link rel="stylesheet" href="codemirror.css">
<link rel="stylesheet" href="show-hint.css">
<script src="search.js"></script>
<script src="searchcursor.js"></script>
<script src="jump-to-line.js"></script>
<script src="dialog.js"></script>
<link rel="stylesheet" href="dialog.css">
<script src="xcasmode.js"></script>
<script src="python.js"></script>
<script src="micropy.js"></script>
<script src="matchbrackets.js"></script>
<script src="show-hint.js"></script>
<style type="text/css">
  .CodeMirror {
    border: 1px solid black;
    height: auto;
  }

  dt {
    font-family: monospace;
    color: #666;
  }
</style>
<script src="xcas.js"></script>
<script src="numworks.js"></script>
<script src="nws_sig.js"></script>
<script type='text/javascript'>
    // remove existing codemirror field
    prog = $id('prog');
    if (prog && prog.nextSibling) {
        prog.parentNode.removeChild(prog.nextSibling);
    }
    if (entree && entree.nextSibling) {
        entree.parentNode.removeChild(entree.nextSibling);
    }
    $id('canvas').onmousemove = function (event) {
        UI.canvas_mousemove(event, '');
    };
    $id('output').style.display = 'none';
    $id("config").reset();
    // connect to canvas
    var Module = {
        // TOTAL_MEMORY:134217728,
        worker: false,
        htmlcheck: true,
        htmlbuffer: '',
        preRun: [],
        postRun: [],
        lastrefresh:0,
        print: (function () {
            var element = $id('output');
            element.innerHTML = '';// element.value = ''; // clear browser cache
            return function (text) {
                //console.log(text.charCodeAt(0));
                if (text.length == 1 && text.charCodeAt(0) == 12) {
                    element.innerHTML = '';
                    return;
                }
                if (text.length >= 1 && text.charCodeAt(0) == 2) {
                    console.log('STX');
                    Module.htmlcheck = false;
                    htmlbuffer = '';
                    return;
                }
                if (text.length >= 1 && text.charCodeAt(0) == 3) {
                    console.log('ETX');
                    Module.htmlcheck = true;
                    element.style.display = 'inherit';
                    element.innerHTML += htmlbuffer;
                    htmlbuffer = '';
                    element.scrollTop = 99999;
                    return;
                }
                if (Module.htmlcheck) {
                    // These replacements are necessary if you render to raw HTML
                    text = '' + text;
                    console.log(text);
                    text = text.replace(/&/g, "&amp;");
                    text = text.replace(/</g, "&lt;");
                    text = text.replace(/>/g, "&gt;");
                    text = text.replace(/\n/g, '<br>');
                    text += '<br>';
                    var tmp = $id('consolediv');
                    if (tmp.style.display != 'block') {
                        tmp.style.display = 'block';
                        UI.set_config_width();
                    }
                    element.style.display = 'inherit';
                    element.innerHTML += text; // element.value += text + "\n";
                    element.scrollTop = 99999; // focus on bottom
                } else htmlbuffer += text;
                element.scrollIntoView();
           };
        })(),
        printErr: function (text) {
            if (0) { // XXX disabled for safety typeof dump == 'function') {
                dump(text + '\n'); // fast, straight to the real console
            } else {
                console.log(text);
            }
        },
        canvas: $id('canvas'),
        setStatus: function (text) {
            if (Module.setStatus.interval) clearInterval(Module.setStatus.interval);
            var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
            var statusElement = $id('status');
            var progressElement = $id('progress');
            if (m) {
                text = m[1];
                progressElement.value = parseInt(m[2]) * 100;
                progressElement.max = parseInt(m[4]) * 100;
                progressElement.hidden = false;
            } else {
                progressElement.value = null;
                progressElement.max = null;
                progressElement.hidden = true;
            }
            statusElement.innerHTML = text;
        },
        totalDependencies: 0,
        monitorRunDependencies: function (left) {
            this.totalDependencies = Math.max(this.totalDependencies, left);
            Module.setStatus(left ? 'Preparation... (' + (this.totalDependencies - left) + '/' + this.totalDependencies + ')' : 'Telechargements termines.');
        }
    };
    Module.setStatus('T&eacute;l&eacute;chargement et pr&eacute;paration (peut prendre 1 ou 2 minutes la premi&egrave;re fois)');
    Module['onRuntimeInitialized'] = function () {
        console.log('UI is ready');
        UI.ready = true;
    }
</script>
<script type='text/javascript'></script>
<script async>
    var script = document.createElement("script");
    script.type = "text/javascript";
    var supported = (function () {
        try {
            if (typeof WebAssembly === "object" && typeof WebAssembly.instantiate === "function") {
                var module = new WebAssembly.Module(Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00));
                if (module instanceof WebAssembly.Module)
                    return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
            }
        } catch (e) {}
        return false;
    })();
    if (Boolean(window.chrome))
      if (UI.detectmob() || window.location.href.substr(0,4)=='file') supported=false;
    else  
      if (UI.detectmob() && window.location.href.substr(0,4)=='file') supported=false;
    var webAssemblyAvailable = supported;
    /*
    if (Boolean(window.chrome)){
    if (!UI.detectmob()) webAssemblyAvailable = !!window.WebAssembly && window.location.href.substr(0,4)!='file';
    }
    else {
    var ua = window.navigator.userAgent;
    var old_ie = ua.indexOf('MSIE ');
    var new_ie = ua.indexOf('Trident/');
    if (!UI.detectmob() && old_ie<=-1 && new_ie<=-1)
      webAssemblyAvailable =!!window.WebAssembly;
    } */
    if (webAssemblyAvailable) {
        var ck = UI.readCookie('xcas_wasm');
        if (ck) {
            var form = $id('config');
            form.wasm_mode.checked = (ck == '1');
            webAssemblyAvailable = form.wasm_mode.checked;
        }
     }
    //alert(webAssemblyAvailable?'true':'false');
    console.log('wasm ', supported, webAssemblyAvailable);
    if (webAssemblyAvailable) // fixme: enable
        script.src = "giacwasm.js";
    else
        script.src = "giac.js";
    document.getElementsByTagName("head")[0].appendChild(script);
</script>
<script src="longhelp.js"></script>
<script language="javascript">
    $id('thelink').innerHTML='<a href="'+UI.forum_url+'" target=_blank>Forum</a>';
    CodeMirror.registerHelper("hintWords", "simplemode", UI.xcascmd);
    var ua = window.navigator.userAgent;
    var old_ie = ua.indexOf('MSIE ');
    var new_ie = ua.indexOf('Trident/');
    var isSafari = /^((?!chrome|android).)*safari/i.test(ua);
    if ((old_ie > -1) || (new_ie > -1) 
        || Boolean(window.chrome) || isSafari
        ) {
        (function () {
            var script = document.createElement("script");
            script.type = "text/javascript";
            if (0) {script.src = "load-mathjax.js"; UI.mathjax_version=3; } else
            { script.src = "file:///usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"; UI.mathjax_version=2; }
            document.getElementsByTagName("head")[0].appendChild(script);
        })();
    }
</script>
<script language="javascript">
    window.onbeforeunload = function (e) {
        var dialogText = "Etes-vous sur?";
        return dialogText;
    };
    $id('shift_key').style.backgroundColor = "cyan";
    cmentree = entree;
    window.onresize = UI.set_config_width;
    // En ajoutant async a la fin de script src=giac.js on accelere les chargements
    // de la page nue (cache), mais pas si il y a un lien
    window.onload = function (e) {
        console.log('init');
        var mth = $id('bouton_math');
        //mth.style.backgroundImage = "url('logo.png')";
        //mth.style.backgroundSize = '100%';
        //UI.caseval('abc(x=0); [x, y]; z+1;');
        var form = $id('config');
        var hw = window.innerWidth - 50;
        var access = true;
        if (hw >= 900) {
            UI.qa = true;
            UI.usecm = true;
            form.qa.checked = true;
            form.usecm.checked = true;
        } else {
            UI.qa = false;
            UI.usecm = true;
            form.qa.checked = false;
            form.usecm.checked = true;
            access = false;
            $id('button_show_answers').style.display = 'none';
            $id('button_hide_answers').style.display = 'none';
        }
        var ua = window.navigator.userAgent;
        var old_ie = ua.indexOf('MSIE ');
        var new_ie = ua.indexOf('Trident/');
        var isSafari = /^((?!chrome|android).)*safari/i.test(ua);
        if ( (isSafari || Boolean(window.chrome)) && window.location.href.substr(0, 4) != 'file') UI.prettyprint = false;
        if ((old_ie > -1) || (new_ie > -1)) UI.isie = true;
        var bt = UI.browser_type();
        if (UI.isie || (bt!=1 && bt!=2 )) {
            UI.usemathjax = true;
            var alertmsg = "Les calculs seraient plus rapides avec Firefox.";
            if (0 && Boolean(window.chrome)) {
                if (window.location.href.substr(0, 4) == 'file')
                    alertmsg = "Les cookies ne fonctionnent pas en local avec Chrome, la sauvegarde/restauration de sessions est impossible. " + alertmsg;
                else
                    alertmgs = "L'affichage 2d ne fonctionne pas en distant avec Chrome. " + alertmsg;
            }
            //alert(alertmsg);
        }
        //console.log(window.location.href);
        var mobile = UI.detectmob();
        if (mobile) {
            $id('historyload').style.display = 'none';
            $id('loadbutton_cookie').style.display = 'inline';
            $id('loadbutton_file').style.display = 'none';
            $id('bouton_js').style.display = 'none';
        }
        else {
            $id('historyload').style.display = 'inline';
            $id('loadbutton_cookie').style.display = 'none';
            $id('loadbutton_file').style.display = 'inline';
        }
        if (!UI.is_touch_device() && !UI.isie) w3IncludeHTML(); // contextmenu
        //if (bt==1 && hw>=1000 && window.location.href.substr(0,4)=="http") w3IncludeHTML();
        $id('apropos').style.display = 'none';
        $id('help').style.display = 'none';
        console.log("window.onload");
        // config in cookies
        var ck;
        ck = UI.readCookie('xcas_lang');
        if (ck) {
            var test = eval(ck) - 1; //console.log(test);
            if (test >= 0 && test < 5) {
                form.lang[1].checked = false;
                form.lang[test].checked = true;
            }
            if (test >= -1) UI.langue = -test - 1;
        }
        ck = UI.readCookie('xcas_calc');
        if (ck) {
            var test = eval(ck) - 1; //console.log(test);
            if (test >= 0 && test < 3) {
                form.calc[0].checked = false;
                form.calc[test].checked = true;
                UI.set_calc_type(test+1);
            }
        }
        ck = UI.readCookie('xcas_from');
        if (ck) {
            form.from.value = ck;
            UI.from = ck;
        }
        ck = UI.readCookie('xcas_to');
        if (ck) {
            form.to.value = ck;
            UI.mailto = ck;
        }
        ck = UI.readCookie('xcas_digits');
        if (ck) form.digits_mode.value = eval(ck);
        ck = UI.readCookie('xcas_angle_radian');
        if (ck) form.angle_mode.checked = (ck == '1');
        ck = UI.readCookie('xcas_warnpy');
        if (ck) UI.warnpy = form.warnpy_mode.checked = (ck == '1');
        ck = UI.readCookie('xcas_python_mode');
        var hashParams = window.location.hash.substr(1);
        var forcepy=hashParams.substr(0,6)=='python';
        if (forcepy) ck='1';
        if (!ck) {
           var tmp=prompt("Choisir l'interpreteur. 1: Xcas compatible Python (defaut), 0: Xcas en francais, 4: MicroPython");
           if (tmp=='0' || tmp=='4') ck=tmp; else ck='1'; 
           if (tmp=='xcas' || tmp=='Xcas') ck='0';
           if (tmp=='python' || tmp=='Python') ck='4';
           //if (confirm('Voulez-vous activer la compatibilite de syntaxe Python ?')) ck = 1; else ck = 0;
        }
        form.python_mode.checked = (ck == '1' || ck=='4');
        form.python_xor.checked = (ck=='4');
        UI.python_mode = eval(ck);
        if (UI.python_mode==4) UI.micropy=1;
        $id('add_//').value = UI.python_mode ? '#' : '//';
        if (!UI.kbdshift) $id('add_:').value = UI.python_mode ? ':' : ':=';
        UI.createCookie('xcas_python_mode', UI.python_mode, 10000);
        ck = UI.readCookie('xcas_complex_mode');
        if (ck) form.complex_mode.checked = (ck == '1');
        ck = UI.readCookie('xcas_with_sqrt');
        if (ck) form.sqrt_mode.checked = (ck == '1');
        ck = UI.readCookie('xcas_step_infolevel');
        if (ck) form.step_mode.checked = (ck == '1');
        ck = UI.readCookie('xcas_autosimplify');
        if (ck) form.autosimp_level.value = eval(ck);
        ck = UI.readCookie('xcas_docprefix');
        if (ck) UI.docprefix = ck;
        ck = UI.readCookie('xcas_withworker');
        if (ck) form.worker_mode.checked = (ck == '1');
        UI.withworker = form.worker_mode.checked;
        ck = UI.readCookie('xcas_prettyprint');
        if (ck) form.prettyprint.checked = (ck == '1');
        UI.prettyprint = form.prettyprint.checked;
        ck = UI.readCookie('xcas_qa');
        if (ck) form.qa.checked = UI.qa = (ck == '1');
        ck = UI.readCookie('xcas_usecm');
        if (ck) form.usecm.checked = UI.usecm = (ck == '1');
        ck = UI.readCookie('xcas_fixeddel');
        if (ck) form.fixeddel.checked = UI.fixeddel = (ck == '1');
        ck = UI.config_string();
        console.log(ck);
        //UI.sleep(200);
        if (0) UI.caseval(ck); else UI.initconfigstring = ck; //UI.set_config_width();
        ck = UI.readCookie('xcas_canvas_w');
        ck = eval(ck);
        if (ck > 0 && ck <= 1000)
            ;
        else {
            console.log('qa', UI.qa);
            ck = (UI.qa ? Math.floor(window.innerWidth / 2.5) : window.innerWidth - 110);
        }
        console.log('canvas_w', ck);
        UI.canvas_w = ck;
        $id('config').canvas_w.value = ck;
        ck = UI.readCookie('xcas_canvas_h');
        ck = eval(ck);
        if (ck > 0 && ck <= 1000) ; else ck = Math.floor(window.innerHeight / 2);
        if (ck > 200 && mobile) ck = 200;
        console.log('canvas_h', ck);
        UI.canvas_h = ck;
        $id('config').canvas_h.value = ck;
        ck = UI.readCookie('xcas_matrix_maxrows');
        ck = eval(ck);
        if (ck > 0 && ck <= 1000) {
            UI.assistant_matr_maxrows = ck;
            $id('matr_cfg_rows').value = ck;
        }
        ck = UI.readCookie('xcas_matrix_maxcols');
        ck = eval(ck);
        if (ck > 0 && ck <= 100) {
            UI.assistant_matr_maxcols = ck;
            $id('matr_cfg_cols').value = ck;
        }
        ck = UI.readCookie('xcas_matrix_textarea');
        ck = eval(ck);
        if (ck > 0 && ck <= 100) {
            UI.assistant_matr_textarea = ck;
            $id('matr_textarea').checked = ck;
        }
        UI.assistant_matr_setmatrix(UI.assistant_matr_maxrows, UI.assistant_matr_maxcols);
        $id('assistant_matr').adequation[0].checked = true;
        var hist = $id('mathoutput');
        var doexec = false;
        var asked = false;
        if (hist.firstChild) {
            asked = true;
            if (!UI.withworker && confirm('Voulez-vous executer les commandes de l\'historique?')) {
                doexec = true;
            }
            // else {alert('Historique non execute');}
        }
        // substr(1) to remove the `#`
        if (UI.readCookie('xcas_session') != null) {
            $id('startup_restore').style.display = 'inline';
            $id('startup1').style.display = 'none';
        }
        else { if (!forcepy) $id('help').style.display = 'block'; }
        //UI.restoresession(hashParams,hist,asked,doexec);
        //console.log(UI.wasm_mode);
        var cons = $id('restoresession');
        cons.style.display = 'inherit';
        if (1 || UI.ready)
            window.setTimeout(UI.restoresession, 0, hashParams, hist, asked, doexec);
        else
            window.setTimeout(UI.restoresession, (UI.wasm_mode ? 10 : 400), hashParams, hist, asked, doexec);
        if (access)
            $id('startup2').style.display = 'block';
    };
</script>
</body>
</html>