Ticket #20056

Illegal result of cast.

오픈 날짜: 2009-12-30 00:25 마지막 업데이트: 2010-03-05 23:59

Reporter:
소유자:
Type:
Status:
Closed
Component:
MileStone:
Priority:
9 - Highest
Severity:
9 - Highest
Resolution:
Fixed
File:
None

Details

Cast result of float -> int is incorrect.

public class FloatCastTest
{
  public static void main(String[] args) throws Exception
  {
    float f = Integer.MAX_VALUE + 0.0f;
    int i = (int) f;
    System.out.println("f=" + f + " i=" + i);
  }
}

Results:

f=2.1474836E9 i=-2147483648

Ticket History (3/4 Histories)

2009-12-30 00:25 Updated by: freebeans
  • New Ticket "Illegal result of cast." created
2009-12-30 00:25 Updated by: freebeans
  • Severity Update from 5 - Medium to 9 - Highest
2010-02-02 01:46 Updated by: freebeans
  • Resolution Update from None to Fixed
  • Milestone Update from (None) to jvm0.4.8
댓글 올리기

Fixed f2i, d2i, d2f, d2l instructions.

2010-03-05 23:59 Updated by: freebeans
  • Status Update from Open to Closed
  • Ticket Close date is changed to 2010-03-05 23:59

Attachment File List

No attachments

Edit

Please login to add comment to this ticket » Login