wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes float/double extended exponent value sets-Can someone answer this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "float/double extended exponent value sets-Can someone answer this?" Watch "float/double extended exponent value sets-Can someone answer this?" New topic
Author

float/double extended exponent value sets-Can someone answer this?

sanjana narayanan
Ranch Hand

Joined: Nov 25, 2003
Posts: 142
Hi,
I have a problem understanding the float exponent extended value and double extended exponded value. Can someone explain this to me?
This following para is taken from JLS 4.2.3 UNDER THE Topic Types,Values and variables. I do not understand even a single part of it.
The finite nonzero values of any floating-point value set can all be expressed in the form , where s is +1 or -1, m is a positive integer less than , and e is an integer between and , inclusive, and where N and K are parameters that depend on the value set. Some values can be represented in this form in more than one way; for example, supposing that a value v in a value set might be represented in this form using certain values for s, m, and e, then if it happened that m were even and e were less than , one could halve m and increase e by 1 to produce a second representation for the same value v. A representation in this form is called normalized if ; otherwise the representation is said to be denormalized. If a value in a value set cannot be represented in such a way that , then the value is said to be a denormalized value, because it has no normalized representation.
-Sanjana
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Hi Sanjana,
The following URL might help:
http://www.javaworld.com/javaworld/jw-10-1996/jw-10-hood_p.html
Gian Franco


"Eppur si muove!"
Rolf W. Rasmussen
Author
Greenhorn

Joined: Nov 04, 2003
Posts: 5
Ahh, you're looking at shorthand description of the IEEE Floating Point
Standard (IEEE 754) that the Java Language specification uses to
describe the behavior of the float and double types.
The formulas in the text you pasted got lost, making the text even harder
to interpret than it already was.
First off, let me assure you that you don't have to understand these
formulas to pass the certification exam.
Things relevant for the exam are:
  • The upper and lower bound of the types.
  • Knowing which operations will result in NaN, and +/- INF.
  • Knowing that loss of precision can occur.


  • For a bit more readable presentation of the IEEE Floating Point
    Standard (IEEE 754) representation, you can read:
    http://en.wikipedia.org/wiki/IEEE_Floating_Point_Standard
    http://www.d6.com/users/checker/pdfs/gdmfp.pdf
    Just keep in mind that the bit patterns presented does not necessarily
    directly correspond to the in-memory patterns used by the Java VM.
    The only thing that is guaranteed is that the externally visible effect
    of the mathematical operations are identical to the ones specified
    by IEEE 754.


    "Plurality should not be posited without necessity."<br /> William of Ockham
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: float/double extended exponent value sets-Can someone answer this?
     
    Similar Threads
    FP Strict ??
    Problem understanding autoboxing
    double and long
    ArithmeticException
    Array