Commit ac3ef43b authored by simonpj's avatar simonpj
Browse files

[project @ 2004-06-21 16:10:45 by simonpj]

Accept Show for rationals without space round %
parent f07f8197
......@@ -8,5 +8,5 @@
[131.94689145077132,135.0884841043611,138.23007675795088,141.3716694115407,144.51326206513048,147.6548547187203,150.79644737231007,153.93804002589985,157.07963267948966,160.22122533307945,163.36281798666926,166.50441064025904,169.64600329384882,172.78759594743863,175.92918860102841,179.0707812546182,182.212373908208,185.3539665617978,188.49555921538757,191.63715186897738,194.77874452256717,197.92033717615698,201.06192982974676,204.20352248333654,207.34511513692635,210.48670779051614,213.62830044410595,216.76989309769573,219.9114857512855,223.05307840487532,226.1946710584651,229.3362637120549,232.4778563656447,235.61944901923448,238.76104167282426,241.90263432641407,245.04422698000386,248.18581963359367,251.32741228718345,254.46900494077323,257.610597594363,260.75219024795285,263.89378290154264,267.0353755551324,270.1769682087222,273.318560862312,276.46015351590177,279.6017461694916,282.7433388230814,285.88493147667117,289.02652413026095,292.16811678385073,295.3097094374406,298.45130209103036,301.59289474462014,304.7344873982099,307.8760800517997,311.01767270538954,314.1592653589793,317.3008580125691,320.4424506661589,323.5840433197487,326.7256359733385,329.8672286269283,333.0088212805181,336.15041393410786,339.29200658769764,342.4335992412874,345.57519189487726,348.71678454846705,351.85837720205683,354.9999698556466,358.1415625092364,361.28315516282623,364.424747816416,367.5663404700058,370.7079331235956,373.84952577718536,376.99111843077515,380.132711084365,383.27430373795477,386.41589639154455,389.55748904513433,392.6990816987241,395.84067435231395,398.98226700590374,402.1238596594935,405.2654523130833,408.4070449666731,411.5486376202629,414.6902302738527,417.8318229274425,420.97341558103227,424.11500823462205,427.2566008882119,430.3981935418017,433.53978619539146,436.68137884898124,439.822971502571,442.9645641561608,446.10615680975064,449.2477494633404,452.3893421169302,455.53093477052,458.6725274241098,461.8141200776996,464.9557127312894,468.0973053848792,471.23889803846896,474.38049069205874,477.5220833456485,480.66367599923836,483.80526865282815,486.94686130641793,490.0884539600077,493.2300466135975,496.37163926718733,499.5132319207771,502.6548245743669,505.7964172279567,508.93800988154646,512.0796025351362,515.221195188726,518.3627878423158,521.5043804959057,524.6459731494955,527.7875658030853,530.929158456675,534.0707511102648,537.2123437638546,540.3539364174444,543.4955290710342,546.637121724624,549.7787143782137,552.9203070318035,556.0618996853934,559.2034923389832,562.345084992573,565.4866776461628,568.6282702997526,571.7698629533423,574.9114556069321,578.0530482605219,581.1946409141117,584.3362335677015,587.4778262212914,590.6194188748811,593.7610115284709,596.9026041820607,600.0441968356505,603.1857894892403,606.3273821428301,609.4689747964198,612.6105674500096,615.7521601035994,618.8937527571892,622.0353454107791,625.1769380643689,628.3185307179587,631.4601233715484,634.6017160251382,637.743308678728,640.8849013323178,644.0264939859076,647.1680866394973,650.3096792930871,653.451271946677,656.5928646002668,659.7344572538566,662.8760499074464,666.0176425610362,669.1592352146259,672.3008278682157,675.4424205218055,678.5840131753953,681.7256058289851,684.8671984825748,688.0087911361647,691.1503837897545,694.2919764433443,697.4335690969341,700.5751617505239,703.7167544041137,706.8583470577034,709.9999397112932,713.141532364883,716.2831250184728,719.4247176720626,722.5663103256525,725.7079029792422,728.849495632832,731.9910882864218,735.1326809400116,738.2742735936014,741.4158662471912,744.557458900781,747.6990515543707,750.8406442079605,753.9822368615503,757.1238295151402,760.26542216873,763.4070148223198,766.5486074759095,769.6902001294993,772.8317927830891,775.9733854366789,779.1149780902687,782.2565707438584,785.3981633974482,788.5397560510381,791.6813487046279,794.8229413582177,797.9645340118075,801.1061266653973,804.247719318987,807.3893119725768,810.5309046261666,813.6724972797564,816.8140899333462,819.955682586936,823.0972752405258,826.2388678941156,829.3804605477054,832.5220532012952,835.663645854885,838.8052385084748,841.9468311620645,845.0884238156543,848.2300164692441,851.3716091228339,854.5132017764238,857.6547944300136,860.7963870836033,863.9379797371931,867.0795723907829,870.2211650443727,873.3627576979625,876.5043503515523,879.645943005142,882.7875356587318,885.9291283123216,889.0707209659115,892.2123136195013,895.3539062730911,898.4954989266809,901.6370915802706,904.7786842338604,907.9202768874502,911.06186954104,914.2034621946298,917.3450548482195,920.4866475018093,923.6282401553992,926.769832808989,929.9114254625788,933.0530181161686,936.1946107697584,939.3362034233481,942.4777960769379,945.6193887305277,948.7609813841175,951.9025740377073,955.044166691297,958.185759344887,961.3273519984767,964.4689446520665,967.6105373056563,970.7521299592461,973.8937226128359,977.0353152664256,980.1769079200154,983.3185005736052,986.460093227195,989.6016858807849,992.7432785343747,995.8848711879644,999.0264638415542,1002.168056495144,1005.3096491487338,1008.4512418023236,1011.5928344559134,1014.7344271095031,1017.8760197630929,1021.0176124166827,1024.1592050702725,1027.3007977238624,1030.442390377452,1033.583983031042,1036.7255756846316,1039.8671683382215,1043.0087609918114,1046.150353645401,1049.291946298991,1052.4335389525806,1055.5751316061705,1058.7167242597602,1061.85831691335,1064.9999095669398,1068.1415022205297,1071.2830948741193,1074.4246875277092,1077.5662801812991,1080.7078728348888,1083.8494654884787,1086.9910581420684,1090.1326507956583,1093.274243449248,1096.4158361028378,1099.5574287564275,1102.6990214100174,1105.840614063607,1108.982206717197,1112.1237993707869,1115.2653920243765,1118.4069846779664,1121.548577331556,1124.690169985146,1127.8317626387357,1130.9733552923256,1134.1149479459152,1137.2565405995051,1140.398133253095,1143.5397259066847,1146.6813185602746,1149.8229112138642,1152.9645038674541,1156.1060965210438,1159.2476891746337,1162.3892818282234,1165.5308744818133,1168.672467135403,1171.8140597889928,1174.9556524425827,1178.0972450961724,1181.2388377497623,1184.380430403352,1187.5220230569419,1190.6636157105315,1193.8052083641214,1196.946801017711,1200.088393671301,1203.2299863248907,1206.3715789784806,1209.5131716320705,1212.6547642856601,1215.79635693925,1218.9379495928397,1222.0795422464296,1225.2211349000193,1228.3627275536091,1231.5043202071988,1234.6459128607887,1237.7875055143784,1240.9290981679683,1244.0706908215582,1247.2122834751478,1250.3538761287377,1253.4954687823274,1256.6370614359173,1259.778654089507,1262.9202467430969,1266.0618393966865,1269.2034320502764,1272.345024703866,1275.486617357456,1278.628210011046,1281.7698026646356,1284.9113953182255,1288.0529879718151,1291.194580625405,1294.3361732789947,1297.4777659325846,1300.6193585861743,1303.7609512397642,1306.902543893354]
[1764 % 1,1849 % 1,1936 % 1,2025 % 1,2116 % 1,2209 % 1,2304 % 1,2401 % 1,2500 % 1,2601 % 1,2704 % 1,2809 % 1,2916 % 1,3025 % 1,3136 % 1,3249 % 1,3364 % 1,3481 % 1,3600 % 1,3721 % 1,3844 % 1,3969 % 1,4096 % 1,4225 % 1,4356 % 1,4489 % 1,4624 % 1,4761 % 1,4900 % 1,5041 % 1,5184 % 1,5329 % 1,5476 % 1,5625 % 1,5776 % 1,5929 % 1,6084 % 1,6241 % 1,6400 % 1,6561 % 1,6724 % 1,6889 % 1,7056 % 1,7225 % 1,7396 % 1,7569 % 1,7744 % 1,7921 % 1,8100 % 1,8281 % 1,8464 % 1,8649 % 1,8836 % 1,9025 % 1,9216 % 1,9409 % 1,9604 % 1,9801 % 1,10000 % 1,10201 % 1,10404 % 1,10609 % 1,10816 % 1,11025 % 1,11236 % 1,11449 % 1,11664 % 1,11881 % 1,12100 % 1,12321 % 1,12544 % 1,12769 % 1,12996 % 1,13225 % 1,13456 % 1,13689 % 1,13924 % 1,14161 % 1,14400 % 1,14641 % 1,14884 % 1,15129 % 1,15376 % 1,15625 % 1,15876 % 1,16129 % 1,16384 % 1,16641 % 1,16900 % 1,17161 % 1,17424 % 1,17689 % 1,17956 % 1,18225 % 1,18496 % 1,18769 % 1,19044 % 1,19321 % 1,19600 % 1,19881 % 1,20164 % 1,20449 % 1,20736 % 1,21025 % 1,21316 % 1,21609 % 1,21904 % 1,22201 % 1,22500 % 1,22801 % 1,23104 % 1,23409 % 1,23716 % 1,24025 % 1,24336 % 1,24649 % 1,24964 % 1,25281 % 1,25600 % 1,25921 % 1,26244 % 1,26569 % 1,26896 % 1,27225 % 1,27556 % 1,27889 % 1,28224 % 1,28561 % 1,28900 % 1,29241 % 1,29584 % 1,29929 % 1,30276 % 1,30625 % 1,30976 % 1,31329 % 1,31684 % 1,32041 % 1,32400 % 1,32761 % 1,33124 % 1,33489 % 1,33856 % 1,34225 % 1,34596 % 1,34969 % 1,35344 % 1,35721 % 1,36100 % 1,36481 % 1,36864 % 1,37249 % 1,37636 % 1,38025 % 1,38416 % 1,38809 % 1,39204 % 1,39601 % 1,40000 % 1,40401 % 1,40804 % 1,41209 % 1,41616 % 1,42025 % 1,42436 % 1,42849 % 1,43264 % 1,43681 % 1,44100 % 1,44521 % 1,44944 % 1,45369 % 1,45796 % 1,46225 % 1,46656 % 1,47089 % 1,47524 % 1,47961 % 1,48400 % 1,48841 % 1,49284 % 1,49729 % 1,50176 % 1,50625 % 1,51076 % 1,51529 % 1,51984 % 1,52441 % 1,52900 % 1,53361 % 1,53824 % 1,54289 % 1,54756 % 1,55225 % 1,55696 % 1,56169 % 1,56644 % 1,57121 % 1,57600 % 1,58081 % 1,58564 % 1,59049 % 1,59536 % 1,60025 % 1,60516 % 1,61009 % 1,61504 % 1,62001 % 1,62500 % 1,63001 % 1,63504 % 1,64009 % 1,64516 % 1,65025 % 1,65536 % 1,66049 % 1,66564 % 1,67081 % 1,67600 % 1,68121 % 1,68644 % 1,69169 % 1,69696 % 1,70225 % 1,70756 % 1,71289 % 1,71824 % 1,72361 % 1,72900 % 1,73441 % 1,73984 % 1,74529 % 1,75076 % 1,75625 % 1,76176 % 1,76729 % 1,77284 % 1,77841 % 1,78400 % 1,78961 % 1,79524 % 1,80089 % 1,80656 % 1,81225 % 1,81796 % 1,82369 % 1,82944 % 1,83521 % 1,84100 % 1,84681 % 1,85264 % 1,85849 % 1,86436 % 1,87025 % 1,87616 % 1,88209 % 1,88804 % 1,89401 % 1,90000 % 1,90601 % 1,91204 % 1,91809 % 1,92416 % 1,93025 % 1,93636 % 1,94249 % 1,94864 % 1,95481 % 1,96100 % 1,96721 % 1,97344 % 1,97969 % 1,98596 % 1,99225 % 1,99856 % 1,100489 % 1,101124 % 1,101761 % 1,102400 % 1,103041 % 1,103684 % 1,104329 % 1,104976 % 1,105625 % 1,106276 % 1,106929 % 1,107584 % 1,108241 % 1,108900 % 1,109561 % 1,110224 % 1,110889 % 1,111556 % 1,112225 % 1,112896 % 1,113569 % 1,114244 % 1,114921 % 1,115600 % 1,116281 % 1,116964 % 1,117649 % 1,118336 % 1,119025 % 1,119716 % 1,120409 % 1,121104 % 1,121801 % 1,122500 % 1,123201 % 1,123904 % 1,124609 % 1,125316 % 1,126025 % 1,126736 % 1,127449 % 1,128164 % 1,128881 % 1,129600 % 1,130321 % 1,131044 % 1,131769 % 1,132496 % 1,133225 % 1,133956 % 1,134689 % 1,135424 % 1,136161 % 1,136900 % 1,137641 % 1,138384 % 1,139129 % 1,139876 % 1,140625 % 1,141376 % 1,142129 % 1,142884 % 1,143641 % 1,144400 % 1,145161 % 1,145924 % 1,146689 % 1,147456 % 1,148225 % 1,148996 % 1,149769 % 1,150544 % 1,151321 % 1,152100 % 1,152881 % 1,153664 % 1,154449 % 1,155236 % 1,156025 % 1,156816 % 1,157609 % 1,158404 % 1,159201 % 1,160000 % 1,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5]
[1764%1,1849%1,1936%1,2025%1,2116%1,2209%1,2304%1,2401%1,2500%1,2601%1,2704%1,2809%1,2916%1,3025%1,3136%1,3249%1,3364%1,3481%1,3600%1,3721%1,3844%1,3969%1,4096%1,4225%1,4356%1,4489%1,4624%1,4761%1,4900%1,5041%1,5184%1,5329%1,5476%1,5625%1,5776%1,5929%1,6084%1,6241%1,6400%1,6561%1,6724%1,6889%1,7056%1,7225%1,7396%1,7569%1,7744%1,7921%1,8100%1,8281%1,8464%1,8649%1,8836%1,9025%1,9216%1,9409%1,9604%1,9801%1,10000%1,10201%1,10404%1,10609%1,10816%1,11025%1,11236%1,11449%1,11664%1,11881%1,12100%1,12321%1,12544%1,12769%1,12996%1,13225%1,13456%1,13689%1,13924%1,14161%1,14400%1,14641%1,14884%1,15129%1,15376%1,15625%1,15876%1,16129%1,16384%1,16641%1,16900%1,17161%1,17424%1,17689%1,17956%1,18225%1,18496%1,18769%1,19044%1,19321%1,19600%1,19881%1,20164%1,20449%1,20736%1,21025%1,21316%1,21609%1,21904%1,22201%1,22500%1,22801%1,23104%1,23409%1,23716%1,24025%1,24336%1,24649%1,24964%1,25281%1,25600%1,25921%1,26244%1,26569%1,26896%1,27225%1,27556%1,27889%1,28224%1,28561%1,28900%1,29241%1,29584%1,29929%1,30276%1,30625%1,30976%1,31329%1,31684%1,32041%1,32400%1,32761%1,33124%1,33489%1,33856%1,34225%1,34596%1,34969%1,35344%1,35721%1,36100%1,36481%1,36864%1,37249%1,37636%1,38025%1,38416%1,38809%1,39204%1,39601%1,40000%1,40401%1,40804%1,41209%1,41616%1,42025%1,42436%1,42849%1,43264%1,43681%1,44100%1,44521%1,44944%1,45369%1,45796%1,46225%1,46656%1,47089%1,47524%1,47961%1,48400%1,48841%1,49284%1,49729%1,50176%1,50625%1,51076%1,51529%1,51984%1,52441%1,52900%1,53361%1,53824%1,54289%1,54756%1,55225%1,55696%1,56169%1,56644%1,57121%1,57600%1,58081%1,58564%1,59049%1,59536%1,60025%1,60516%1,61009%1,61504%1,62001%1,62500%1,63001%1,63504%1,64009%1,64516%1,65025%1,65536%1,66049%1,66564%1,67081%1,67600%1,68121%1,68644%1,69169%1,69696%1,70225%1,70756%1,71289%1,71824%1,72361%1,72900%1,73441%1,73984%1,74529%1,75076%1,75625%1,76176%1,76729%1,77284%1,77841%1,78400%1,78961%1,79524%1,80089%1,80656%1,81225%1,81796%1,82369%1,82944%1,83521%1,84100%1,84681%1,85264%1,85849%1,86436%1,87025%1,87616%1,88209%1,88804%1,89401%1,90000%1,90601%1,91204%1,91809%1,92416%1,93025%1,93636%1,94249%1,94864%1,95481%1,96100%1,96721%1,97344%1,97969%1,98596%1,99225%1,99856%1,100489%1,101124%1,101761%1,102400%1,103041%1,103684%1,104329%1,104976%1,105625%1,106276%1,106929%1,107584%1,108241%1,108900%1,109561%1,110224%1,110889%1,111556%1,112225%1,112896%1,113569%1,114244%1,114921%1,115600%1,116281%1,116964%1,117649%1,118336%1,119025%1,119716%1,120409%1,121104%1,121801%1,122500%1,123201%1,123904%1,124609%1,125316%1,126025%1,126736%1,127449%1,128164%1,128881%1,129600%1,130321%1,131044%1,131769%1,132496%1,133225%1,133956%1,134689%1,135424%1,136161%1,136900%1,137641%1,138384%1,139129%1,139876%1,140625%1,141376%1,142129%1,142884%1,143641%1,144400%1,145161%1,145924%1,146689%1,147456%1,148225%1,148996%1,149769%1,150544%1,151321%1,152100%1,152881%1,153664%1,154449%1,155236%1,156025%1,156816%1,157609%1,158404%1,159201%1,160000%1,3%5,3%5,3%5,3%5,3%5,3%5,3%5,3%5,3%5,3%5,3%5,3%5,3%5,3%5,3%5,3%5]
......@@ -171,60 +171,60 @@ Testing Enum Bool:
take 7 ([True,True .. False]) = []
take 7 ([True,True .. True]) = [True,True,True,True,True,True,True]
Testing Enum Rational:
(succ (0::Rational)) = 1 % 1
(succ ((-1)::Rational)) = 0 % 1
pred (1::Rational) = 0 % 1
pred (0::Rational) = (-1) % 1
(map (toEnum::Int->Rational) [1,minBound,maxBound]) = [1 % 1,(-2147483648) % 1,2147483647 % 1]
(succ (0::Rational)) = 1%1
(succ ((-1)::Rational)) = 0%1
pred (1::Rational) = 0%1
pred (0::Rational) = (-1)%1
(map (toEnum::Int->Rational) [1,minBound,maxBound]) = [1%1,(-2147483648)%1,2147483647%1]
(map fromEnum [(1::Rational),42,45]) = [1,42,45]
(take 7 [(1::Rational)..]) = [1 % 1,2 % 1,3 % 1,4 % 1,5 % 1,6 % 1,7 % 1]
(take 7 [(-5::Rational)..]) = [(-5) % 1,(-4) % 1,(-3) % 1,(-2) % 1,(-1) % 1,0 % 1,1 % 1]
(take 7 [(1::Rational),2..]) = [1 % 1,2 % 1,3 % 1,4 % 1,5 % 1,6 % 1,7 % 1]
(take 7 [(1::Rational),7..]) = [1 % 1,7 % 1,13 % 1,19 % 1,25 % 1,31 % 1,37 % 1]
(take 7 [(1::Rational),1..]) = [1 % 1,1 % 1,1 % 1,1 % 1,1 % 1,1 % 1,1 % 1]
(take 7 [(1::Rational),0..]) = [1 % 1,0 % 1,(-1) % 1,(-2) % 1,(-3) % 1,(-4) % 1,(-5) % 1]
(take 7 [(5::Rational),2..]) = [5 % 1,2 % 1,(-1) % 1,(-4) % 1,(-7) % 1,(-10) % 1,(-13) % 1]
(take 7 ([(1::Rational) .. 5])) = [1 % 1,2 % 1,3 % 1,4 % 1,5 % 1]
(take 4 ([(1::Rational) .. 1])) = [1 % 1]
(take 7 [(1::Rational)..]) = [1%1,2%1,3%1,4%1,5%1,6%1,7%1]
(take 7 [(-5::Rational)..]) = [(-5)%1,(-4)%1,(-3)%1,(-2)%1,(-1)%1,0%1,1%1]
(take 7 [(1::Rational),2..]) = [1%1,2%1,3%1,4%1,5%1,6%1,7%1]
(take 7 [(1::Rational),7..]) = [1%1,7%1,13%1,19%1,25%1,31%1,37%1]
(take 7 [(1::Rational),1..]) = [1%1,1%1,1%1,1%1,1%1,1%1,1%1]
(take 7 [(1::Rational),0..]) = [1%1,0%1,(-1)%1,(-2)%1,(-3)%1,(-4)%1,(-5)%1]
(take 7 [(5::Rational),2..]) = [5%1,2%1,(-1)%1,(-4)%1,(-7)%1,(-10)%1,(-13)%1]
(take 7 ([(1::Rational) .. 5])) = [1%1,2%1,3%1,4%1,5%1]
(take 4 ([(1::Rational) .. 1])) = [1%1]
(take 7 ([(1::Rational) .. 0])) = []
(take 7 ([(5::Rational) .. 0])) = []
(take 7 [(5::Rational),4..1]) = [5 % 1,4 % 1,3 % 1,2 % 1,1 % 1]
(take 7 [(5::Rational),3..1]) = [5 % 1,3 % 1,1 % 1]
(take 7 [(5::Rational),3..2]) = [5 % 1,3 % 1,1 % 1]
(take 7 [(1::Rational),2..1]) = [1 % 1]
(take 7 [(2::Rational),1..2]) = [2 % 1]
(take 7 [(2::Rational),1..1]) = [2 % 1,1 % 1]
(take 7 [(5::Rational),4..1]) = [5%1,4%1,3%1,2%1,1%1]
(take 7 [(5::Rational),3..1]) = [5%1,3%1,1%1]
(take 7 [(5::Rational),3..2]) = [5%1,3%1,1%1]
(take 7 [(1::Rational),2..1]) = [1%1]
(take 7 [(2::Rational),1..2]) = [2%1]
(take 7 [(2::Rational),1..1]) = [2%1,1%1]
(take 7 [(2::Rational),3..1]) = []
Testing Enum (Ratio Int):
(succ (0::Ratio Int)) = 1 % 1
(succ ((-1)::Ratio Int)) = 0 % 1
pred (1::Ratio Int) = 0 % 1
pred (0::Ratio Int) = (-1) % 1
(map (toEnum::Int->Ratio Int) [1,minBound,maxBound]) = [1 % 1,(-2147483648) % 1,2147483647 % 1]
(succ (0::Ratio Int)) = 1%1
(succ ((-1)::Ratio Int)) = 0%1
pred (1::Ratio Int) = 0%1
pred (0::Ratio Int) = (-1)%1
(map (toEnum::Int->Ratio Int) [1,minBound,maxBound]) = [1%1,(-2147483648)%1,2147483647%1]
(map fromEnum [(1::Ratio Int),42,45]) = [1,42,45]
(take 7 [(1::Ratio Int)..]) = [1 % 1,2 % 1,3 % 1,4 % 1,5 % 1,6 % 1,7 % 1]
(take 7 [(-5::Ratio Int)..]) = [(-5) % 1,(-4) % 1,(-3) % 1,(-2) % 1,(-1) % 1,0 % 1,1 % 1]
(take 7 [((toEnum ((maxBound::Int)-5))::Ratio Int)..]) = [2147483642 % 1,2147483643 % 1,2147483644 % 1,2147483645 % 1,2147483646 % 1,2147483647 % 1,(-2147483648) % 1]
(take 7 [(1::Ratio Int),2..]) = [1 % 1,2 % 1,3 % 1,4 % 1,5 % 1,6 % 1,7 % 1]
(take 7 [(1::Ratio Int),7..]) = [1 % 1,7 % 1,13 % 1,19 % 1,25 % 1,31 % 1,37 % 1]
(take 7 [(1::Ratio Int),1..]) = [1 % 1,1 % 1,1 % 1,1 % 1,1 % 1,1 % 1,1 % 1]
(take 7 [(1::Ratio Int),0..]) = [1 % 1,0 % 1,(-1) % 1,(-2) % 1,(-3) % 1,(-4) % 1,(-5) % 1]
(take 7 [(5::Ratio Int),2..]) = [5 % 1,2 % 1,(-1) % 1,(-4) % 1,(-7) % 1,(-10) % 1,(-13) % 1]
(take 7 [x, x-1 ..]) = [(-2147483647) % 1,(-2147483648) % 1,2147483647 % 1,2147483646 % 1,2147483645 % 1,2147483644 % 1,2147483643 % 1]
(take 7 [x, x-1 ..]) = [(-2147483643) % 1,(-2147483644) % 1,(-2147483645) % 1,(-2147483646) % 1,(-2147483647) % 1,(-2147483648) % 1,2147483647 % 1]
(take 7 [x, (x+1) ..]) = [2147483642 % 1,2147483643 % 1,2147483644 % 1,2147483645 % 1,2147483646 % 1,2147483647 % 1,(-2147483648) % 1]
(take 7 ([(1::Ratio Int) .. 5])) = [1 % 1,2 % 1,3 % 1,4 % 1,5 % 1]
(take 4 ([(1::Ratio Int) .. 1])) = [1 % 1]
(take 7 [(1::Ratio Int)..]) = [1%1,2%1,3%1,4%1,5%1,6%1,7%1]
(take 7 [(-5::Ratio Int)..]) = [(-5)%1,(-4)%1,(-3)%1,(-2)%1,(-1)%1,0%1,1%1]
(take 7 [((toEnum ((maxBound::Int)-5))::Ratio Int)..]) = [2147483642%1,2147483643%1,2147483644%1,2147483645%1,2147483646%1,2147483647%1,(-2147483648)%1]
(take 7 [(1::Ratio Int),2..]) = [1%1,2%1,3%1,4%1,5%1,6%1,7%1]
(take 7 [(1::Ratio Int),7..]) = [1%1,7%1,13%1,19%1,25%1,31%1,37%1]
(take 7 [(1::Ratio Int),1..]) = [1%1,1%1,1%1,1%1,1%1,1%1,1%1]
(take 7 [(1::Ratio Int),0..]) = [1%1,0%1,(-1)%1,(-2)%1,(-3)%1,(-4)%1,(-5)%1]
(take 7 [(5::Ratio Int),2..]) = [5%1,2%1,(-1)%1,(-4)%1,(-7)%1,(-10)%1,(-13)%1]
(take 7 [x, x-1 ..]) = [(-2147483647)%1,(-2147483648)%1,2147483647%1,2147483646%1,2147483645%1,2147483644%1,2147483643%1]
(take 7 [x, x-1 ..]) = [(-2147483643)%1,(-2147483644)%1,(-2147483645)%1,(-2147483646)%1,(-2147483647)%1,(-2147483648)%1,2147483647%1]
(take 7 [x, (x+1) ..]) = [2147483642%1,2147483643%1,2147483644%1,2147483645%1,2147483646%1,2147483647%1,(-2147483648)%1]
(take 7 ([(1::Ratio Int) .. 5])) = [1%1,2%1,3%1,4%1,5%1]
(take 4 ([(1::Ratio Int) .. 1])) = [1%1]
(take 7 ([(1::Ratio Int) .. 0])) = []
(take 7 ([(5::Ratio Int) .. 0])) = []
(take 7 ([x..y])) = [2147483642 % 1,2147483643 % 1,2147483644 % 1,2147483645 % 1,2147483646 % 1,2147483647 % 1]
(take 7 ([x..y])) = [2147483642%1,2147483643%1,2147483644%1,2147483645%1,2147483646%1,2147483647%1]
(take 7 ([x..y])) = []
(take 7 [(5::Ratio Int),4..1]) = [5 % 1,4 % 1,3 % 1,2 % 1,1 % 1]
(take 7 [(5::Ratio Int),3..1]) = [5 % 1,3 % 1,1 % 1]
(take 7 [(5::Ratio Int),3..2]) = [5 % 1,3 % 1,1 % 1]
(take 7 [(1::Ratio Int),2..1]) = [1 % 1]
(take 7 [(2::Ratio Int),1..2]) = [2 % 1]
(take 7 [(2::Ratio Int),1..1]) = [2 % 1,1 % 1]
(take 7 [(5::Ratio Int),4..1]) = [5%1,4%1,3%1,2%1,1%1]
(take 7 [(5::Ratio Int),3..1]) = [5%1,3%1,1%1]
(take 7 [(5::Ratio Int),3..2]) = [5%1,3%1,1%1]
(take 7 [(1::Ratio Int),2..1]) = [1%1]
(take 7 [(2::Ratio Int),1..2]) = [2%1]
(take 7 [(2::Ratio Int),1..1]) = [2%1,1%1]
(take 7 [(2::Ratio Int),3..1]) = []
(take 7 [x,(x+1)..y]) = [2147483643 % 1,2147483644 % 1,2147483645 % 1,2147483646 % 1,2147483647 % 1]
(take 7 [x,(x-1)..y]) = [(-2147483643) % 1,(-2147483644) % 1,(-2147483645) % 1,(-2147483646) % 1,(-2147483647) % 1,(-2147483648) % 1]
(take 7 [x,(x+1)..y]) = [2147483643%1,2147483644%1,2147483645%1,2147483646%1,2147483647%1]
(take 7 [x,(x-1)..y]) = [(-2147483643)%1,(-2147483644)%1,(-2147483645)%1,(-2147483646)%1,(-2147483647)%1,(-2147483648)%1]
42 % 1
42%1
42, 1
42.0, 1.0
5910974510923776, -47
......
[0 % 1,0 % 1,0 % 1,2 % 1,2 % 1,(-2) % 1,(-2) % 1,22 % 7,1 % 5000]
[0%1,0%1,0%1,2%1,2%1,(-2)%1,(-2)%1,22%7,1%5000]
[0,0,0,2,2,-2,-2,22,1,1,1,1,1,1,1,1,7,5000]
[0 % 1,0 % 1,0 % 1,2 % 1,2 % 1,(-2) % 1,(-2) % 1,22 % 7,1 % 5000]
[0%1,0%1,0%1,2%1,2%1,(-2)%1,(-2)%1,22%7,1%5000]
[0,0,0,2,2,-2,-2,22,1,1,1,1,1,1,1,1,7,5000]
......@@ -594,13 +594,13 @@ negate 2 = -2
negate 3 = -3
#
testReal
toRational -3 = (-3) % 1
toRational -2 = (-2) % 1
toRational -1 = (-1) % 1
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
toRational -3 = (-3)%1
toRational -2 = (-2)%1
toRational -1 = (-1)%1
toRational 0 = 0%1
toRational 1 = 1%1
toRational 2 = 2%1
toRational 3 = 3%1
#
testIntegral
-3 `divMod` -3 = (1,0)
......@@ -2110,13 +2110,13 @@ negate 2 = -2
negate 3 = -3
#
testReal
toRational -3 = (-3) % 1
toRational -2 = (-2) % 1
toRational -1 = (-1) % 1
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
toRational -3 = (-3)%1
toRational -2 = (-2)%1
toRational -1 = (-1)%1
toRational 0 = 0%1
toRational 1 = 1%1
toRational 2 = 2%1
toRational 3 = 3%1
#
testIntegral
-3 `divMod` -3 = (1,0)
......@@ -3626,13 +3626,13 @@ negate 2 = -2
negate 3 = -3
#
testReal
toRational -3 = (-3) % 1
toRational -2 = (-2) % 1
toRational -1 = (-1) % 1
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
toRational -3 = (-3)%1
toRational -2 = (-2)%1
toRational -1 = (-1)%1
toRational 0 = 0%1
toRational 1 = 1%1
toRational 2 = 2%1
toRational 3 = 3%1
#
testIntegral
-3 `divMod` -3 = (1,0)
......@@ -5142,13 +5142,13 @@ negate 2 = -2
negate 3 = -3
#
testReal
toRational -3 = (-3) % 1
toRational -2 = (-2) % 1
toRational -1 = (-1) % 1
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
toRational -3 = (-3)%1
toRational -2 = (-2)%1
toRational -1 = (-1)%1
toRational 0 = 0%1
toRational 1 = 1%1
toRational 2 = 2%1
toRational 3 = 3%1
#
testIntegral
-3 `divMod` -3 = (1,0)
......@@ -6658,13 +6658,13 @@ negate 2 = -2
negate 3 = -3
#
testReal
toRational -3 = (-3) % 1
toRational -2 = (-2) % 1
toRational -1 = (-1) % 1
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
toRational -3 = (-3)%1
toRational -2 = (-2)%1
toRational -1 = (-1)%1
toRational 0 = 0%1
toRational 1 = 1%1
toRational 2 = 2%1
toRational 3 = 3%1
#
testIntegral
-3 `divMod` -3 = (1,0)
......@@ -8174,13 +8174,13 @@ negate 2 = 254
negate 3 = 253
#
testReal
toRational 253 = 253 % 1
toRational 254 = 254 % 1
toRational 255 = 255 % 1
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
toRational 253 = 253%1
toRational 254 = 254%1
toRational 255 = 255%1
toRational 0 = 0%1
toRational 1 = 1%1
toRational 2 = 2%1
toRational 3 = 3%1
#
testIntegral
253 `divMod` 253 = (1,0)
......@@ -9690,13 +9690,13 @@ negate 2 = 65534
negate 3 = 65533
#
testReal
toRational 65533 = 65533 % 1
toRational 65534 = 65534 % 1
toRational 65535 = 65535 % 1
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
toRational 65533 = 65533%1
toRational 65534 = 65534%1
toRational 65535 = 65535%1
toRational 0 = 0%1
toRational 1 = 1%1
toRational 2 = 2%1
toRational 3 = 3%1
#
testIntegral
65533 `divMod` 65533 = (1,0)
......@@ -11206,13 +11206,13 @@ negate 2 = 4294967294
negate 3 = 4294967293
#
testReal
toRational 4294967293 = 4294967293 % 1
toRational 4294967294 = 4294967294 % 1
toRational 4294967295 = 4294967295 % 1
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
toRational 4294967293 = 4294967293%1
toRational 4294967294 = 4294967294%1
toRational 4294967295 = 4294967295%1
toRational 0 = 0%1
toRational 1 = 1%1
toRational 2 = 2%1
toRational 3 = 3%1
#
testIntegral
4294967293 `divMod` 4294967293 = (1,0)
......@@ -12722,13 +12722,13 @@ negate 2 = 18446744073709551614
negate 3 = 18446744073709551613
#
testReal
toRational 18446744073709551613 = 18446744073709551613 % 1
toRational 18446744073709551614 = 18446744073709551614 % 1
toRational 18446744073709551615 = 18446744073709551615 % 1
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
toRational 18446744073709551613 = 18446744073709551613%1
toRational 18446744073709551614 = 18446744073709551614%1
toRational 18446744073709551615 = 18446744073709551615%1
toRational 0 = 0%1
toRational 1 = 1%1
toRational 2 = 2%1
toRational 3 = 3%1
#
testIntegral
18446744073709551613 `divMod` 18446744073709551613 = (1,0)
......@@ -14235,13 +14235,13 @@ negate 2 = -2
negate 3 = -3
#
testReal
toRational -3 = (-3) % 1
toRational -2 = (-2) % 1
toRational -1 = (-1) % 1
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
toRational -3 = (-3)%1
toRational -2 = (-2)%1
toRational -1 = (-1)%1
toRational 0 = 0%1
toRational 1 = 1%1
toRational 2 = 2%1
toRational 3 = 3%1
#
testIntegral
-3 `divMod` -3 = (1,0)
......
......@@ -18,7 +18,7 @@ start test test_fromInteger
135
end test test_fromInteger
start test test_fromRational
189 % 2
189%2
end test test_fromRational
start test test_negate
15
......@@ -33,11 +33,11 @@ start test test_fromInteger_pattern 9
(a + 7)=35
end test test_fromInteger_pattern 9
start test test_fromRational_pattern 0.5
0.5=3 % 2
0.5=3%2
end test test_fromRational_pattern 0.5
start test test_fromRational_pattern (-0.7)
(-0.7)=21 % 10
(-0.7)=21%10
end test test_fromRational_pattern (-0.7)
start test test_fromRational_pattern 1.7
_=51 % 10
_=51%10
end test test_fromRational_pattern 1.7
......@@ -18,7 +18,7 @@ start test test_fromInteger
135
end test test_fromInteger
start test test_fromRational
189 % 2
189%2
end test test_fromRational
start test test_negate
15
......@@ -33,11 +33,11 @@ start test test_fromInteger_pattern 9
(a + 7)=35
end test test_fromInteger_pattern 9
start test test_fromRational_pattern 0.5
0.5=3 % 2
0.5=3%2
end test test_fromRational_pattern 0.5
start test test_fromRational_pattern (-0.7)
(-0.7)=21 % 10
(-0.7)=21%10
end test test_fromRational_pattern (-0.7)
start test test_fromRational_pattern 1.7
_=51 % 10
_=51%10
end test test_fromRational_pattern 1.7
......@@ -18,7 +18,7 @@ start test test_fromInteger
135
end test test_fromInteger
start test test_fromRational
189 % 2
189%2
end test test_fromRational
start test test_negate
15
......@@ -33,11 +33,11 @@ start test test_fromInteger_pattern 9
(a + 7)=35
end test test_fromInteger_pattern 9
start test test_fromRational_pattern 0.5
0.5=3 % 2
0.5=3%2
end test test_fromRational_pattern 0.5
start test test_fromRational_pattern (-0.7)
(-0.7)=21 % 10
(-0.7)=21%10
end test test_fromRational_pattern (-0.7)
start test test_fromRational_pattern 1.7
_=51 % 10
_=51%10
end test test_fromRational_pattern 1.7
......@@ -18,7 +18,7 @@ start test test_fromInteger
135
end test test_fromInteger
start test test_fromRational
189 % 2
189%2
end test test_fromRational
start test test_negate
15
......@@ -33,11 +33,11 @@ start test test_fromInteger_pattern 9
(a + 7)=35
end test test_fromInteger_pattern 9
start test test_fromRational_pattern 0.5
0.5=3 % 2
0.5=3%2
end test test_fromRational_pattern 0.5
start test test_fromRational_pattern (-0.7)
(-0.7)=21 % 10
(-0.7)=21%10
end test test_fromRational_pattern (-0.7)
start test test_fromRational_pattern 1.7
_=51 % 10
_=51%10
end test test_fromRational_pattern 1.7
......@@ -18,7 +18,7 @@ start test test_fromInteger
135
end test test_fromInteger
start test test_fromRational
189 % 2
189%2
end test test_fromRational
start test test_negate
15
......@@ -33,11 +33,11 @@ start test test_fromInteger_pattern 9
(a + 7)=35
end test test_fromInteger_pattern 9
start test test_fromRational_pattern 0.5
0.5=3 % 2
0.5=3%2
end test test_fromRational_pattern 0.5
start test test_fromRational_pattern (-0.7)
(-0.7)=21 % 10
(-0.7)=21%10
end test test_fromRational_pattern (-0.7)
start test test_fromRational_pattern 1.7
_=51 % 10
_=51%10
end test test_fromRational_pattern 1.7
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment