Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,6 @@ private String format(final NumericValue number, final DecimalFormat decimalForm
final int minimumExponentSize = subPicture.getMinimumExponentSize();
if (minimumExponentSize > 0) {
formatted.append(decimalFormat.exponentSeparator);
if (exp < 0) {
formatted.append(decimalFormat.minusSign);
}

final CodePointString expStr = new CodePointString(String.valueOf(exp));

Expand Down
13 changes: 13 additions & 0 deletions exist-core/src/test/xquery/numbers/format-numbers.xql
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,17 @@ declare
%test:assertEquals("0.0")
function fd:decimal-zeros($picture as xs:string) {
format-number(0, $picture)
};

declare
%test:args(1.234567E10,"0.000e0")
%test:assertEquals("1.235e10")
%test:args(1.234567E-10,"0.000e0")
%test:assertEquals("1.235e-10")
%test:args(0.000000000123456,"0.000e0")
%test:assertEquals("1.235e-10")
%test:args(1.234567e-10,"0.000e0")
%test:assertEquals("1.235e-10")
function fd:exponent-fails($number as xs:double, $picture as xs:string) {
format-number($number, $picture)
};
Loading