-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.1.8
-
x86
-
other
Name: yyT116575 Date: 11/09/2000
java version "1.1.8"
The following mathematical expression generate different results under AIX4.3.3
with older microchannel (ex. 3AT) machines and newer pci machines(ex. 140, 150,
260). Under windows the results are identical to newer rs6000-machines. All
tests are made with java-version 1.1.8. The OS and JAVA-Runtime, program
conditions are the same!
qs1=0;
for (i=0; i < key.length(); i++)
{
// Abfrage gerade Zahl
qs1 = qs1 + (-1) * ((qs1%2==1)?1:-1) * key.charAt(i);
System.out.print(IntToStr(qs1)+" ");
}
When I debug the qs1 step by step for every run of the loop, I get the right
result:
50 98 146 194 240 289 241 195 146 202 278 383 261 160 270 392 497 387 285 174 28
8 397 300 416 521 410 520 578 610 642 715 605 489 388 502 612 713 681 595 494 60
8 723 618 729 619 587 487 386 500 532 602 699 653 621 538 637 533 414 519 409 30
9 193 161 94 159 91 44 111 46 123 73 25 -23 26 72 120 172 218 267 211
qs1: 211
or false result:
50 98 146 194 240 289 241 195 146 202 278 383 261 160 270 392 497 387 285 174 28
8 397 300 416 521 410 520 578 610 642 715 605 489 388 502 612 713 681 595 494 60
8 723 618 729 619 587 487 386 500 532 602 699 653 621 538 637 533 414 519 409 30
9 193 161 94 159 91 44 111 46 123 73 25 -23 -72 -26 22 74 120 169 113
qs1: 113
(Review ID: 112037)
======================================================================