t_id
1227
t_adddate
2004/01/13
t_result
0
t_knownrunerror
0
tr_id | run | tr_ok | tr_skip | tr_result |
---|---|---|---|---|
949654937 | 1015615 | False | False | Failed to run |
Record count: 1
1: 134213632 2: 268427264 3: 536854528 4: 1073709056 5: 2147418112 6: 4294836224 7: 8589672448 8: 17179344896 9: 34358689792 10: 68717379584 11: 137434759168 12: 274869518336 13: 549739036672 14: 1099478073344 15: 2198956146688 16: 4397912293376 17: 8795824586752 18: 17591649173504 19: 35183298347008 20: 70366596694016 21: 140733193388032 22: 281466386776064 23: 562932773552128 24: 1125865547104256 25: 2251731094208512 26: 4503462188417024 27: 9006924376834048 28: 18013848753668096 29: 36027697507336192 30: 72055395014672384 31: 144110790029344768 32: 288221580058689536 33: 576443160117379072 34: 1152886320234758144 35: 2305772640469516288 36: 4611545280939032576 37: 9223090561878065152 38: 18446181123756130304 qword multiplication overflow detection failed
{$q+} {$mode objfpc} uses sysutils; type tqwordrec = packed record {$ifndef ENDIAN_BIG} low,high : dword; {$else} high, low : dword; {$endif} end; procedure assignqword(h,l : dword;var q : qword); begin tqwordrec(q).high:=h; tqwordrec(q).low:=l; end; procedure testmulqword; var q1, q2, q3, q4: qword; c: cardinal; loops: longint; begin assignqword(0,$1000,q1); assignqword(0,$7fff,q2); c := $1000 * $7fff; q4 := c; loops := 0; try repeat q3 := q1 * q2; if q3 <> q4 then begin writeln('qword multiplication of shift error'); halt(1); end; inc(loops); if (loops >= 39) then begin writeln('qword multiplication overflow detection failed'); halt(1); end; q1 := q1 shl 1; q4 := q4 shl 1; writeln(loops,': ',q3); until false; except on eintoverflow do begin if loops < 38 then begin writeln('false qword multiplication overflow detected'); halt(1); end; end; end; end; begin testmulqword; end.