bdiv_u32.inc 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  1. type
  2. { TUInt32Bit1Test }
  3. TUInt32Bit1Test = class(TUInt32DivTest)
  4. protected
  5. function GetDivisor: Cardinal; override;
  6. procedure DoTestIteration(Iteration: Integer); override;
  7. public
  8. function TestTitle: shortstring; override;
  9. end;
  10. { TUInt32Bit1ModTest }
  11. TUInt32Bit1ModTest = class(TUInt32ModTest)
  12. protected
  13. function GetDivisor: Cardinal; override;
  14. procedure DoTestIteration(Iteration: Integer); override;
  15. public
  16. function TestTitle: shortstring; override;
  17. end;
  18. { TUInt32Bit2Test }
  19. TUInt32Bit2Test = class(TUInt32DivTest)
  20. protected
  21. function GetDivisor: Cardinal; override;
  22. procedure DoTestIteration(Iteration: Integer); override;
  23. public
  24. function TestTitle: shortstring; override;
  25. end;
  26. { TUInt32Bit2ModTest }
  27. TUInt32Bit2ModTest = class(TUInt32ModTest)
  28. protected
  29. function GetDivisor: Cardinal; override;
  30. procedure DoTestIteration(Iteration: Integer); override;
  31. public
  32. function TestTitle: shortstring; override;
  33. end;
  34. { TUInt32Bit3Test }
  35. TUInt32Bit3Test = class(TUInt32DivTest)
  36. protected
  37. function GetDivisor: Cardinal; override;
  38. procedure DoTestIteration(Iteration: Integer); override;
  39. public
  40. function TestTitle: shortstring; override;
  41. end;
  42. { TUInt32Bit3ModTest }
  43. TUInt32Bit3ModTest = class(TUInt32ModTest)
  44. protected
  45. function GetDivisor: Cardinal; override;
  46. procedure DoTestIteration(Iteration: Integer); override;
  47. public
  48. function TestTitle: shortstring; override;
  49. end;
  50. { TUInt32Bit7Test }
  51. TUInt32Bit7Test = class(TUInt32DivTest)
  52. protected
  53. function GetDivisor: Cardinal; override;
  54. procedure DoTestIteration(Iteration: Integer); override;
  55. public
  56. function TestTitle: shortstring; override;
  57. end;
  58. { TUInt32Bit7ModTest }
  59. TUInt32Bit7ModTest = class(TUInt32ModTest)
  60. protected
  61. function GetDivisor: Cardinal; override;
  62. procedure DoTestIteration(Iteration: Integer); override;
  63. public
  64. function TestTitle: shortstring; override;
  65. end;
  66. { TUInt32Bit10Test }
  67. TUInt32Bit10Test = class(TUInt32DivTest)
  68. protected
  69. function GetDivisor: Cardinal; override;
  70. procedure DoTestIteration(Iteration: Integer); override;
  71. public
  72. function TestTitle: shortstring; override;
  73. end;
  74. { TUInt32Bit10ModTest }
  75. TUInt32Bit10ModTest = class(TUInt32ModTest)
  76. protected
  77. function GetDivisor: Cardinal; override;
  78. procedure DoTestIteration(Iteration: Integer); override;
  79. public
  80. function TestTitle: shortstring; override;
  81. end;
  82. { TUInt32Bit100Test }
  83. TUInt32Bit100Test = class(TUInt32DivTest)
  84. protected
  85. function GetDivisor: Cardinal; override;
  86. procedure DoTestIteration(Iteration: Integer); override;
  87. public
  88. function TestTitle: shortstring; override;
  89. end;
  90. { TUInt32Bit100ModTest }
  91. TUInt32Bit100ModTest = class(TUInt32ModTest)
  92. protected
  93. function GetDivisor: Cardinal; override;
  94. procedure DoTestIteration(Iteration: Integer); override;
  95. public
  96. function TestTitle: shortstring; override;
  97. end;
  98. { TUInt32Bit1000Test }
  99. const
  100. FU32_1000Input: array[$0..$F] of Cardinal =
  101. (0, 1, 999, 1000, 1001, 1999, 2000, 2001,
  102. 4294958999, 4294959000, 4294959001,
  103. $7FFFFFFE, $7FFFFFFF, $80000000, $80000001, $FFFFFFFF);
  104. type
  105. TUInt32Bit1000Test = class(TUInt32DivTest)
  106. protected
  107. function GetDivisor: Cardinal; override;
  108. procedure DoTestIteration(Iteration: Integer); override;
  109. public
  110. function TestTitle: shortstring; override;
  111. end;
  112. { TUInt32Bit1000ModTest }
  113. TUInt32Bit1000ModTest = class(TUInt32ModTest)
  114. protected
  115. function GetDivisor: Cardinal; override;
  116. procedure DoTestIteration(Iteration: Integer); override;
  117. public
  118. function TestTitle: shortstring; override;
  119. end;
  120. { TUInt32Bit60000Test }
  121. const
  122. FU32_60000Input: array[$0..$F] of Cardinal =
  123. (0, 1, 59999, 60000, 60001, 119999, 120000, 120001,
  124. 4294919999, 4294920000, 4294920001,
  125. $7FFFFFFE, $7FFFFFFF, $80000000, $80000001, $FFFFFFFF);
  126. type
  127. TUInt32Bit60000Test = class(TUInt32DivTest)
  128. protected
  129. function GetDivisor: Cardinal; override;
  130. procedure DoTestIteration(Iteration: Integer); override;
  131. public
  132. function TestTitle: shortstring; override;
  133. end;
  134. { TUInt32Bit60000ModTest }
  135. TUInt32Bit60000ModTest = class(TUInt32ModTest)
  136. protected
  137. function GetDivisor: Cardinal; override;
  138. procedure DoTestIteration(Iteration: Integer); override;
  139. public
  140. function TestTitle: shortstring; override;
  141. end;
  142. { TUInt32Bit146097Test }
  143. const
  144. FU32_146097Input: array[$0..$F] of Cardinal =
  145. (0, 1, 146096, 146097, 146098, 292193, 292194, 292195,
  146. 4294959605, 4294959606, 4294959607,
  147. $7FFFFFFE, $7FFFFFFF, $80000000, $80000001, $FFFFFFFF);
  148. type
  149. TUInt32Bit146097Test = class(TUInt32DivTest)
  150. protected
  151. function GetDivisor: Cardinal; override;
  152. procedure DoTestIteration(Iteration: Integer); override;
  153. public
  154. function TestTitle: shortstring; override;
  155. end;
  156. { TUInt32Bit146097ModTest }
  157. TUInt32Bit146097ModTest = class(TUInt32ModTest)
  158. protected
  159. function GetDivisor: Cardinal; override;
  160. procedure DoTestIteration(Iteration: Integer); override;
  161. public
  162. function TestTitle: shortstring; override;
  163. end;
  164. { TUInt32Bit3600000Test }
  165. const
  166. FU32_3600000Input: array[$0..$F] of Cardinal =
  167. (0, 1, 3599999, 3600000, 3600001, 7199999, 7200000, 7200001,
  168. 3600000000, 4294799999, 4294800000, 4294800001,
  169. $7FFFFFFF, $80000000, $80000001, $FFFFFFFF);
  170. type
  171. TUInt32Bit3600000Test = class(TUInt32DivTest)
  172. protected
  173. function GetDivisor: Cardinal; override;
  174. procedure DoTestIteration(Iteration: Integer); override;
  175. public
  176. function TestTitle: shortstring; override;
  177. end;
  178. { TUInt32Bit3600000ModTest }
  179. TUInt32Bit3600000ModTest = class(TUInt32ModTest)
  180. protected
  181. function GetDivisor: Cardinal; override;
  182. procedure DoTestIteration(Iteration: Integer); override;
  183. public
  184. function TestTitle: shortstring; override;
  185. end;
  186. { TUInt32Bit1Test }
  187. function TUInt32Bit1Test.TestTitle: shortstring;
  188. begin
  189. Result := 'Unsigned 32-bit division by 1';
  190. end;
  191. function TUInt32Bit1Test.GetDivisor: Cardinal;
  192. begin
  193. Result := 1;
  194. end;
  195. procedure TUInt32Bit1Test.DoTestIteration(Iteration: Integer);
  196. var
  197. Numerator, Answer: Cardinal;
  198. Index, X: Integer;
  199. begin
  200. Index := Iteration and $FF;
  201. case Index of
  202. 253:
  203. Numerator := 4294967293;
  204. 254:
  205. Numerator := 4294967294;
  206. 255:
  207. Numerator := 4294967295;
  208. else
  209. Numerator := Cardinal(Index);
  210. end;
  211. FInputArray[Index] := Numerator;
  212. for X := 0 to INTERNAL_LOOPS - 1 do
  213. Answer := Numerator div 1;
  214. FResultArray[Index] := Answer;
  215. end;
  216. { TUInt32Bit1Test }
  217. function TUInt32Bit1ModTest.TestTitle: shortstring;
  218. begin
  219. Result := 'Unsigned 32-bit modulus by 1';
  220. end;
  221. function TUInt32Bit1ModTest.GetDivisor: Cardinal;
  222. begin
  223. Result := 1;
  224. end;
  225. procedure TUInt32Bit1ModTest.DoTestIteration(Iteration: Integer);
  226. var
  227. Numerator, Answer: Cardinal;
  228. Index, X: Integer;
  229. begin
  230. Index := Iteration and $FF;
  231. case Index of
  232. 253:
  233. Numerator := 4294967293;
  234. 254:
  235. Numerator := 4294967294;
  236. 255:
  237. Numerator := 4294967295;
  238. else
  239. Numerator := Cardinal(Index);
  240. end;
  241. FInputArray[Index] := Numerator;
  242. for X := 0 to INTERNAL_LOOPS - 1 do
  243. Answer := Numerator mod 1;
  244. FResultArray[Index] := Answer;
  245. end;
  246. { TUInt32Bit2Test }
  247. function TUInt32Bit2Test.TestTitle: shortstring;
  248. begin
  249. Result := 'Unsigned 32-bit division by 2';
  250. end;
  251. function TUInt32Bit2Test.GetDivisor: Cardinal;
  252. begin
  253. Result := 2;
  254. end;
  255. procedure TUInt32Bit2Test.DoTestIteration(Iteration: Integer);
  256. var
  257. Numerator, Answer: Cardinal;
  258. Index, X: Integer;
  259. begin
  260. Index := Iteration and $FF;
  261. case Index of
  262. 253:
  263. Numerator := 4294967293;
  264. 254:
  265. Numerator := 4294967294;
  266. 255:
  267. Numerator := 4294967295;
  268. else
  269. Numerator := Cardinal(Index);
  270. end;
  271. FInputArray[Index] := Numerator;
  272. for X := 0 to INTERNAL_LOOPS - 1 do
  273. Answer := Numerator div 2;
  274. FResultArray[Index] := Answer;
  275. end;
  276. { TUInt32Bit2ModTest }
  277. function TUInt32Bit2ModTest.TestTitle: shortstring;
  278. begin
  279. Result := 'Unsigned 32-bit modulus by 2';
  280. end;
  281. function TUInt32Bit2ModTest.GetDivisor: Cardinal;
  282. begin
  283. Result := 2;
  284. end;
  285. procedure TUInt32Bit2ModTest.DoTestIteration(Iteration: Integer);
  286. var
  287. Numerator, Answer: Cardinal;
  288. Index, X: Integer;
  289. begin
  290. Index := Iteration and $FF;
  291. case Index of
  292. 253:
  293. Numerator := 4294967293;
  294. 254:
  295. Numerator := 4294967294;
  296. 255:
  297. Numerator := 4294967295;
  298. else
  299. Numerator := Cardinal(Index);
  300. end;
  301. FInputArray[Index] := Numerator;
  302. for X := 0 to INTERNAL_LOOPS - 1 do
  303. Answer := Numerator mod 2;
  304. FResultArray[Index] := Answer;
  305. end;
  306. { TUInt32Bit3Test }
  307. function TUInt32Bit3Test.TestTitle: shortstring;
  308. begin
  309. Result := 'Unsigned 32-bit division by 3';
  310. end;
  311. function TUInt32Bit3Test.GetDivisor: Cardinal;
  312. begin
  313. Result := 3;
  314. end;
  315. procedure TUInt32Bit3Test.DoTestIteration(Iteration: Integer);
  316. var
  317. Numerator, Answer: Cardinal;
  318. Index, X: Integer;
  319. begin
  320. Index := Iteration and $FF;
  321. case Index of
  322. 254:
  323. Numerator := 4294967294;
  324. 255:
  325. Numerator := 4294967295;
  326. else
  327. Numerator := Cardinal(Index);
  328. end;
  329. FInputArray[Index] := Numerator;
  330. for X := 0 to INTERNAL_LOOPS - 1 do
  331. Answer := Numerator div 3;
  332. FResultArray[Index] := Answer;
  333. end;
  334. { TUInt32Bit3ModTest }
  335. function TUInt32Bit3ModTest.TestTitle: shortstring;
  336. begin
  337. Result := 'Unsigned 32-bit modulus by 3';
  338. end;
  339. function TUInt32Bit3ModTest.GetDivisor: Cardinal;
  340. begin
  341. Result := 3;
  342. end;
  343. procedure TUInt32Bit3ModTest.DoTestIteration(Iteration: Integer);
  344. var
  345. Numerator, Answer: Cardinal;
  346. Index, X: Integer;
  347. begin
  348. Index := Iteration and $FF;
  349. case Index of
  350. 254:
  351. Numerator := 4294967294;
  352. 255:
  353. Numerator := 4294967295;
  354. else
  355. Numerator := Cardinal(Index);
  356. end;
  357. FInputArray[Index] := Numerator;
  358. for X := 0 to INTERNAL_LOOPS - 1 do
  359. Answer := Numerator mod 3;
  360. FResultArray[Index] := Answer;
  361. end;
  362. { TUInt32Bit7Test }
  363. function TUInt32Bit7Test.TestTitle: shortstring;
  364. begin
  365. Result := 'Unsigned 32-bit division by 7';
  366. end;
  367. function TUInt32Bit7Test.GetDivisor: Cardinal;
  368. begin
  369. Result := 7;
  370. end;
  371. procedure TUInt32Bit7Test.DoTestIteration(Iteration: Integer);
  372. var
  373. Numerator, Answer: Cardinal;
  374. Index, X: Integer;
  375. begin
  376. Index := Iteration and $FF;
  377. case Index of
  378. 254:
  379. Numerator := 4294967294;
  380. 255:
  381. Numerator := 4294967295;
  382. else
  383. Numerator := Cardinal(Index);
  384. end;
  385. FInputArray[Index] := Numerator;
  386. for X := 0 to INTERNAL_LOOPS - 1 do
  387. Answer := Numerator div 7;
  388. FResultArray[Index] := Answer;
  389. end;
  390. { TUInt32Bit7ModTest }
  391. function TUInt32Bit7ModTest.TestTitle: shortstring;
  392. begin
  393. Result := 'Unsigned 32-bit modulus by 7';
  394. end;
  395. function TUInt32Bit7ModTest.GetDivisor: Cardinal;
  396. begin
  397. Result := 7;
  398. end;
  399. procedure TUInt32Bit7ModTest.DoTestIteration(Iteration: Integer);
  400. var
  401. Numerator, Answer: Cardinal;
  402. Index, X: Integer;
  403. begin
  404. Index := Iteration and $FF;
  405. case Index of
  406. 252:
  407. Numerator := 4294967291;
  408. 253:
  409. Numerator := 4294967292;
  410. 254:
  411. Numerator := 4294967293;
  412. 255:
  413. Numerator := 4294967295;
  414. else
  415. Numerator := Cardinal(Index);
  416. end;
  417. FInputArray[Index] := Numerator;
  418. for X := 0 to INTERNAL_LOOPS - 1 do
  419. Answer := Numerator mod 7;
  420. FResultArray[Index] := Answer;
  421. end;
  422. { TUInt32Bit10Test }
  423. function TUInt32Bit10Test.TestTitle: shortstring;
  424. begin
  425. Result := 'Unsigned 32-bit division by 10';
  426. end;
  427. function TUInt32Bit10Test.GetDivisor: Cardinal;
  428. begin
  429. Result := 10;
  430. end;
  431. procedure TUInt32Bit10Test.DoTestIteration(Iteration: Integer);
  432. var
  433. Numerator, Answer: Cardinal;
  434. Index, X: Integer;
  435. begin
  436. Index := Iteration and $FF;
  437. case Index of
  438. 253:
  439. Numerator := 4294967289;
  440. 254:
  441. Numerator := 4294967290;
  442. 255:
  443. Numerator := 4294967295;
  444. else
  445. Numerator := Cardinal(Index);
  446. end;
  447. FInputArray[Index] := Numerator;
  448. for X := 0 to INTERNAL_LOOPS - 1 do
  449. Answer := Numerator div 10;
  450. FResultArray[Index] := Answer;
  451. end;
  452. { TUInt32Bit10ModTest }
  453. function TUInt32Bit10ModTest.TestTitle: shortstring;
  454. begin
  455. Result := 'Unsigned 32-bit modulus by 10';
  456. end;
  457. function TUInt32Bit10ModTest.GetDivisor: Cardinal;
  458. begin
  459. Result := 10;
  460. end;
  461. procedure TUInt32Bit10ModTest.DoTestIteration(Iteration: Integer);
  462. var
  463. Numerator, Answer: Cardinal;
  464. Index, X: Integer;
  465. begin
  466. Index := Iteration and $FF;
  467. case Index of
  468. 253:
  469. Numerator := 4294967289;
  470. 254:
  471. Numerator := 4294967290;
  472. 255:
  473. Numerator := 4294967295;
  474. else
  475. Numerator := Cardinal(Index);
  476. end;
  477. FInputArray[Index] := Numerator;
  478. for X := 0 to INTERNAL_LOOPS - 1 do
  479. Answer := Numerator mod 10;
  480. FResultArray[Index] := Answer;
  481. end;
  482. { TUInt32Bit100Test }
  483. function TUInt32Bit100Test.TestTitle: shortstring;
  484. begin
  485. Result := 'Unsigned 32-bit division by 100';
  486. end;
  487. function TUInt32Bit100Test.GetDivisor: Cardinal;
  488. begin
  489. Result := 100;
  490. end;
  491. procedure TUInt32Bit100Test.DoTestIteration(Iteration: Integer);
  492. var
  493. Numerator, Answer: Cardinal;
  494. Index, X: Integer;
  495. begin
  496. Index := Iteration and $FF;
  497. case Index of
  498. 253:
  499. Numerator := 4294967199;
  500. 254:
  501. Numerator := 4294967200;
  502. 255:
  503. Numerator := 4294967295;
  504. else
  505. Numerator := Cardinal(Index);
  506. end;
  507. FInputArray[Index] := Numerator;
  508. for X := 0 to INTERNAL_LOOPS - 1 do
  509. Answer := Numerator div 100;
  510. FResultArray[Index] := Answer;
  511. end;
  512. { TUInt32Bit100ModTest }
  513. function TUInt32Bit100ModTest.TestTitle: shortstring;
  514. begin
  515. Result := 'Unsigned 32-bit modulus by 100';
  516. end;
  517. function TUInt32Bit100ModTest.GetDivisor: Cardinal;
  518. begin
  519. Result := 100;
  520. end;
  521. procedure TUInt32Bit100ModTest.DoTestIteration(Iteration: Integer);
  522. var
  523. Numerator, Answer: Cardinal;
  524. Index, X: Integer;
  525. begin
  526. Index := Iteration and $FF;
  527. case Index of
  528. 253:
  529. Numerator := 4294967199;
  530. 254:
  531. Numerator := 4294967200;
  532. 255:
  533. Numerator := 4294967295;
  534. else
  535. Numerator := Cardinal(Index);
  536. end;
  537. FInputArray[Index] := Numerator;
  538. for X := 0 to INTERNAL_LOOPS - 1 do
  539. Answer := Numerator mod 100;
  540. FResultArray[Index] := Answer;
  541. end;
  542. { TUInt32Bit1000Test }
  543. function TUInt32Bit1000Test.TestTitle: shortstring;
  544. begin
  545. Result := 'Unsigned 32-bit division by 1,000';
  546. end;
  547. function TUInt32Bit1000Test.GetDivisor: Cardinal;
  548. begin
  549. Result := 1000;
  550. end;
  551. procedure TUInt32Bit1000Test.DoTestIteration(Iteration: Integer);
  552. var
  553. Numerator, Answer: Cardinal;
  554. Index, X: Integer;
  555. begin
  556. Index := Iteration and $FF;
  557. Numerator := FU32_1000Input[Index and $F];
  558. FInputArray[Index] := Numerator;
  559. for X := 0 to INTERNAL_LOOPS - 1 do
  560. Answer := Numerator div 1000;
  561. FResultArray[Index] := Answer;
  562. end;
  563. { TUInt32Bit1000ModTest }
  564. function TUInt32Bit1000ModTest.TestTitle: shortstring;
  565. begin
  566. Result := 'Unsigned 32-bit modulus by 1,000';
  567. end;
  568. function TUInt32Bit1000ModTest.GetDivisor: Cardinal;
  569. begin
  570. Result := 1000;
  571. end;
  572. procedure TUInt32Bit1000ModTest.DoTestIteration(Iteration: Integer);
  573. var
  574. Numerator, Answer: Cardinal;
  575. Index, X: Integer;
  576. begin
  577. Index := Iteration and $FF;
  578. Numerator := FU32_1000Input[Index and $F];
  579. FInputArray[Index] := Numerator;
  580. for X := 0 to INTERNAL_LOOPS - 1 do
  581. Answer := Numerator mod 1000;
  582. FResultArray[Index] := Answer;
  583. end;
  584. { TUInt32Bit60000Test }
  585. function TUInt32Bit60000Test.TestTitle: shortstring;
  586. begin
  587. Result := 'Unsigned 32-bit division by 60,000';
  588. end;
  589. function TUInt32Bit60000Test.GetDivisor: Cardinal;
  590. begin
  591. Result := 60000;
  592. end;
  593. procedure TUInt32Bit60000Test.DoTestIteration(Iteration: Integer);
  594. var
  595. Numerator, Answer: Cardinal;
  596. Index, X: Integer;
  597. begin
  598. Index := Iteration and $FF;
  599. Numerator := FU32_60000Input[Index and $F];
  600. FInputArray[Index] := Numerator;
  601. for X := 0 to INTERNAL_LOOPS - 1 do
  602. Answer := Numerator div 60000;
  603. FResultArray[Index] := Answer;
  604. end;
  605. { TUInt32Bit60000ModTest }
  606. function TUInt32Bit60000ModTest.TestTitle: shortstring;
  607. begin
  608. Result := 'Unsigned 32-bit modulus by 60,000';
  609. end;
  610. function TUInt32Bit60000ModTest.GetDivisor: Cardinal;
  611. begin
  612. Result := 60000;
  613. end;
  614. procedure TUInt32Bit60000ModTest.DoTestIteration(Iteration: Integer);
  615. var
  616. Numerator, Answer: Cardinal;
  617. Index, X: Integer;
  618. begin
  619. Index := Iteration and $FF;
  620. Numerator := FU32_60000Input[Index and $F];
  621. FInputArray[Index] := Numerator;
  622. for X := 0 to INTERNAL_LOOPS - 1 do
  623. Answer := Numerator mod 60000;
  624. FResultArray[Index] := Answer;
  625. end;
  626. { TUInt32Bit146097Test }
  627. function TUInt32Bit146097Test.TestTitle: shortstring;
  628. begin
  629. Result := 'Unsigned 32-bit division by 146,097';
  630. end;
  631. function TUInt32Bit146097Test.GetDivisor: Cardinal;
  632. begin
  633. Result := 146097;
  634. end;
  635. procedure TUInt32Bit146097Test.DoTestIteration(Iteration: Integer);
  636. var
  637. Numerator, Answer: Cardinal;
  638. Index, X: Integer;
  639. begin
  640. Index := Iteration and $FF;
  641. Numerator := FU32_146097Input[Index and $F];
  642. FInputArray[Index] := Numerator;
  643. for X := 0 to INTERNAL_LOOPS - 1 do
  644. Answer := Numerator div 146097;
  645. FResultArray[Index] := Answer;
  646. end;
  647. { TUInt32Bit146097ModTest }
  648. function TUInt32Bit146097ModTest.TestTitle: shortstring;
  649. begin
  650. Result := 'Unsigned 32-bit modulus by 146,097';
  651. end;
  652. function TUInt32Bit146097ModTest.GetDivisor: Cardinal;
  653. begin
  654. Result := 146097;
  655. end;
  656. procedure TUInt32Bit146097ModTest.DoTestIteration(Iteration: Integer);
  657. var
  658. Numerator, Answer: Cardinal;
  659. Index, X: Integer;
  660. begin
  661. Index := Iteration and $FF;
  662. Numerator := FU32_146097Input[Index and $F];
  663. FInputArray[Index] := Numerator;
  664. for X := 0 to INTERNAL_LOOPS - 1 do
  665. Answer := Numerator mod 146097;
  666. FResultArray[Index] := Answer;
  667. end;
  668. { TUInt32Bit3600000Test }
  669. function TUInt32Bit3600000Test.TestTitle: shortstring;
  670. begin
  671. Result := 'Unsigned 32-bit division by 3,600,000';
  672. end;
  673. function TUInt32Bit3600000Test.GetDivisor: Cardinal;
  674. begin
  675. Result := 3600000;
  676. end;
  677. procedure TUInt32Bit3600000Test.DoTestIteration(Iteration: Integer);
  678. var
  679. Numerator, Answer: Cardinal;
  680. Index, X: Integer;
  681. begin
  682. Index := Iteration and $FF;
  683. Numerator := FU32_3600000Input[Index and $F];
  684. FInputArray[Index] := Numerator;
  685. for X := 0 to INTERNAL_LOOPS - 1 do
  686. Answer := Numerator div 3600000;
  687. FResultArray[Index] := Answer;
  688. end;
  689. { TUInt32Bit3600000ModTest }
  690. function TUInt32Bit3600000ModTest.TestTitle: shortstring;
  691. begin
  692. Result := 'Unsigned 32-bit modulus by 3,600,000';
  693. end;
  694. function TUInt32Bit3600000ModTest.GetDivisor: Cardinal;
  695. begin
  696. Result := 3600000;
  697. end;
  698. procedure TUInt32Bit3600000ModTest.DoTestIteration(Iteration: Integer);
  699. var
  700. Numerator, Answer: Cardinal;
  701. Index, X: Integer;
  702. begin
  703. Index := Iteration and $FF;
  704. Numerator := FU32_3600000Input[Index and $F];
  705. FInputArray[Index] := Numerator;
  706. for X := 0 to INTERNAL_LOOPS - 1 do
  707. Answer := Numerator mod 3600000;
  708. FResultArray[Index] := Answer;
  709. end;