test/tools/javac/HexThree.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4920023
  27  * @summary Test hex floating-point literals
  28  * @author darcy
  29  *
  30  * @compile -source 1.5 HexThree.java
  31  * @run main HexThree
  32  */
  33 
  34 public class HexThree {
  35 
  36     public static void main(String argv[]) {
  37         double [] testValues = {
  38             +0X.0030000000000P+12,
  39             +0X.0030000000000P+12D,
  40             +0X.0030000000000P+12F,
  41             +0X.0030000000000P+12d,
  42             +0X.0030000000000P+12f,
  43             +0X.0030000000000P12,
  44             +0X.0030000000000P12D,
  45             +0X.0030000000000P12F,
  46             +0X.0030000000000P12d,
  47             +0X.0030000000000P12f,
  48             +0X.0030000000000p+12,
  49             +0X.0030000000000p+12D,
  50             +0X.0030000000000p+12F,
  51             +0X.0030000000000p+12d,




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4920023
  27  * @summary Test hex floating-point literals
  28  * @author darcy



  29  */
  30 
  31 public class HexThree {
  32 
  33     public static void main(String argv[]) {
  34         double [] testValues = {
  35             +0X.0030000000000P+12,
  36             +0X.0030000000000P+12D,
  37             +0X.0030000000000P+12F,
  38             +0X.0030000000000P+12d,
  39             +0X.0030000000000P+12f,
  40             +0X.0030000000000P12,
  41             +0X.0030000000000P12D,
  42             +0X.0030000000000P12F,
  43             +0X.0030000000000P12d,
  44             +0X.0030000000000P12f,
  45             +0X.0030000000000p+12,
  46             +0X.0030000000000p+12D,
  47             +0X.0030000000000p+12F,
  48             +0X.0030000000000p+12d,