OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [Float_1.java] - Blame information for rev 778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
/*
2
 
3
Date: 25 Aug 1998 16:04:00 -0000
4
From: Andrew Haley <aph@pasanda.cygnus.co.uk>
5
To: java-project@cygnus.com
6
Subject: Help: vtable problem?
7
 
8
My little program:
9
 
10
-----------------------------------------------------------------------
11
import java.lang.*;
12
 
13
  public class widget
14
  {
15
    public static void main (String argv[])
16
    {
17
      int test = Float.floatToIntBits((float)2.0);
18
      String s = Integer.toHexString(test);
19
 
20
      System.out.print (s+"\n");
21
    }
22
 
23
  }
24
-----------------------------------------------------------------------
25
prints out
26
 
27
40000000
28
 
29
with Sun's interpreter, but prints out
30
 
31
true
32
 
33
when compiled with gcj; PrintStream dispatches a string arg as a
34
boolean rather than as a String.  I've tried to rebuild everything.
35
 
36
?
37
 
38
Thanks,
39
Andrew.
40
 
41
*/
42
 
43
public class Float_1
44
{
45
  public static void main (String argv[])
46
    {
47
      int test = Float.floatToIntBits((float)2.0);
48
      String s = Integer.toHexString(test);
49
 
50
      System.out.print (s+"\n");
51
    }
52
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.