numberstring.js revision 6:5a1b0714df0e
166200Simp/*
252506Simp * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
352506Simp * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
452506Simp *
552506Simp * This code is free software; you can redistribute it and/or modify it
652506Simp * under the terms of the GNU General Public License version 2 only, as
752506Simp * published by the Free Software Foundation.
852506Simp *
952506Simp * This code is distributed in the hope that it will be useful, but WITHOUT
1052506Simp * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1152506Simp * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1252506Simp * version 2 for more details (a copy is included in the LICENSE file that
1352506Simp * accompanied this code).
1452506Simp *
1552506Simp * You should have received a copy of the GNU General Public License version
1652506Simp * 2 along with this work; if not, write to the Free Software Foundation,
1752506Simp * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1852506Simp *
1952506Simp * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2052506Simp * or visit www.oracle.com if you need additional information or have any
2152506Simp * questions.
2252506Simp */
2352506Simp
2452506Simp/**
2552506Simp * Number to string test
2652506Simp *
2752506Simp * @test
2852506Simp * @run
2952506Simp */
3052506Simp
3152506Simpprint(1.0/0.0);
3252506Simpprint(-1.0/0.0);
3352506Simpprint(0.0/0.0);
3452506Simpprint(12345678901234567890.0);
3552506Simpprint(0.12345678901234567890);
3652506Simp
3752506Simpfor (d = 1; d < 1E30; d *= 10.0) {
3852506Simp    print(123456.0 * d);
3952506Simp}
4052506Simp
4152506Simpfor (d = 1; d < 1E30; d *= 10.0) {
4252506Simp    print(123456.0 / d);
4352506Simp}
4452506Simp