Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between float-extended-exponent and float in java

The section 2.8.2. Floating-Point Modes of the Java Virtual Machine Specification describes about float-extended-exponent and float value sets.

  1. What does it mean?
  2. In what way does it affect the floating point representation in the program ?
  3. What are floating-point modes?
  4. Which representation is supported by most implementations ?
like image 450
Igor Bobko Avatar asked Mar 18 '26 01:03

Igor Bobko


1 Answers

See section 2.3.2, and Table 2.1, of the page you linked. The different "value sets" can represent different ranges of numbers.

The finite nonzero values of any floating-point value set can all be expressed in the form s ⋅ m ⋅ 2^{e − N + 1}, where s is +1 or −1, m is a positive integer less than 2N, and e is an integer between Emin = −(2^{K−1}−2) and Emax = 2^{K−1}−1, inclusive, and where N and K are parameters that depend on the value set.

The "extended-exponent" value sets have larger K values than the non-extended-exponent. That means they can handle numbers that are larger in magnitude than the non-extended-exponent value sets.

like image 119
cxw Avatar answered Mar 20 '26 13:03

cxw



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!