bdiv_u32.inc 18 KB

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