float bug (Kaffe 0.8.4, Digital UNIX 3.2) (fwd)

Piotr Wojtowicz wojtowic at x4u2.desy.de
Tue Sep 30 05:39:58 PDT 1997


Hi,
 
  There is a very strange bug in Kaffe (at least 0.8.4 running
on Digital Unix 3.2, compiled with gcc 2.7.2) concerning floats
(doubles are OK). In most cases values of all floats are just
equal to 2.09203 (YES! - I'm serious).

  Try the following example:

class FloatBug 
{
  float val;

  static public void main( String[] arg )
  {
    FloatBug floatBug = new FloatBug();

    //whatever you assign here...
    floatBug.val = 0f; 

    //...you always get 2.09203 here (!!!sic!!!)
    System.out.println( floatBug.val );
  }
}

Any comments?

	Peter




More information about the kaffe mailing list