aspose file tools*
The moose likes Beginning Java and the fly likes Confusion about floating point value sets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Confusion about floating point value sets" Watch "Confusion about floating point value sets" New topic
Author

Confusion about floating point value sets

Ranji Sura
Ranch Hand

Joined: Oct 28, 2012
Posts: 84

4.2.3 Floating-Point Types, Formats, and Values - JLS
Every implementation of the Java programming language is required to support two
standard sets of floating-point values, called the float value set and the double value
set. In addition, an implementation of the Java programming language may support
either or both of two extended-exponent floating-point value sets, called the floatextended-
exponent value set and the double-extended-exponent value set. These
extended-exponent value sets may, under certain circumstances, be used instead
of the standard value sets to represent the values of expressions of type float or
double (§5.1.13, §15.4).


What are the value sets talking here... ? Where they have been specified ? ...in JLS ? Please help me to understand this...
Thank you.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7652
    
  19

Ranjith Suranga wrote:What are the value sets talking here... ? Where they have been specified ? ...in JLS ? Please help me to understand this...

I'm not exactly sure, but I suspect that it may be referring to 'denormal' or 'subnormal' values; which are part of the IEEE 754 standard.

To be honest, I've never delved into the JLS as deeply as you seem to be.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 3007
    
    9
Ranjith Suranga wrote:What are the value sets talking here... ? Where they have been specified ? ...in JLS ?

The are being defined in the JLS, in the section you're quoting from. If you look at the actual JLS entry that you quoted, you see that the four terms (e.g. "float value set") are all in italics the first time they are used. In the JLS, that indicates that they are in the process of defining a new term - the term in italics. You need to read the rest of 4.2.3 carefully to see how those four terms are defined.
Ranji Sura
Ranch Hand

Joined: Oct 28, 2012
Posts: 84
Mike Simmons wrote:
The are being defined in the JLS, in the section you're quoting from. If you look at the actual JLS entry that you quoted, you see that the four terms (e.g. "float value set") are all in italics the first time they are used. In the JLS, that indicates that they are in the process of defining a new term - the term in italics. You need to read the rest of 4.2.3 carefully to see how those four terms are defined.


Dear sir.. I have read it.. but I can't point out this... could you please point this out for me... ?
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4363
    
    8

Look at the paragraph after the one you quoted, and Table 4.1
Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 3007
    
    9
[responding to Ranjith before I saw Matthew's response, which is basically the same thing]

JLS 4.2.3 is all about these four value sets. It's all part of the definition. I suppose if I had to pick out one part that is most critical, it's this:
The finite nonzero values of any floating-point value set can all be expressed in the form s · m · 2^(e - N + 1)[...]

combined with table 4.1, which tells you what the values are for N, K, Emax, and Emin, for each of the four value sets being defined. They're defining all four value sets simultaneously.
Ranji Sura
Ranch Hand

Joined: Oct 28, 2012
Posts: 84
It is extremely thank you to both of you Mike Simmons, Matthew Brown. Thank you sir... once again. I got it...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Confusion about floating point value sets