1 /* |
1 /* |
2 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
1164 // Float can not accurately store 1e6 * PI. |
1164 // Float can not accurately store 1e6 * PI. |
1165 test("%.3f", "3141.593", mult(pi, 1000.0)); |
1165 test("%.3f", "3141.593", mult(pi, 1000.0)); |
1166 test("%.3f", "-3141.593", mult(pi, -1000.0)); |
1166 test("%.3f", "-3141.593", mult(pi, -1000.0)); |
1167 |
1167 |
1168 test("%,.2f", "3,141.59", mult(pi, 1000.0)); |
1168 test("%,.2f", "3,141.59", mult(pi, 1000.0)); |
1169 test(Locale.FRANCE, "%,.2f", "3\u00a0141,59", mult(pi, 1000.0)); |
1169 test(Locale.FRANCE, "%,.2f", "3\u202f141,59", mult(pi, 1000.0)); |
1170 test("%,.2f", "-3,141.59", mult(pi, -1000.0)); |
1170 test("%,.2f", "-3,141.59", mult(pi, -1000.0)); |
1171 test("%(.2f", "3141.59", mult(pi, 1000.0)); |
1171 test("%(.2f", "3141.59", mult(pi, 1000.0)); |
1172 test("%(.2f", "(3141.59)", mult(pi, -1000.0)); |
1172 test("%(.2f", "(3141.59)", mult(pi, -1000.0)); |
1173 test("%(,.2f", "3,141.59", mult(pi, 1000.0)); |
1173 test("%(,.2f", "3,141.59", mult(pi, 1000.0)); |
1174 test("%(,.2f", "(3,141.59)", mult(pi, -1000.0)); |
1174 test("%(,.2f", "(3,141.59)", mult(pi, -1000.0)); |