Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Name: dbT83986 Date: 02/10/99 If I do anything vaguely low-level with Java's primitive types, I end up with some powers of two in my code. Would it not be clearer (esp. for novice programmers) to have constants such as Integer.NUMBEROFBITS rather than having to bear the actual numbers in mind? And though I can do without the above, it'd be nice to have bitmasks for IEEE floating-point, such as constants called e.g. SIGN, MANTISSA and EXPONENT in classes Float and Double (of type int and long respectively, and so accessible via floatToIntBits and doubleToLongBits). And having a constants so I don't have to remember that e.g. doubles have 53 bits precision would be nice too. (I see that the Win32 JDK has a class FloatDecimal with these constants already in: could they be moved/copied to some public classes?) (Review ID: 35635) ======================================================================
|