File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 33:title: JSR 354 (Money & Currency) - Specification
44:revnumber: 1.0-SNAPSHOT
55:revremark: Public Final Draft
6- :revdate: November 2014
6+ :revdate: January 2015
77:longversion: {revnumber} ({revremark}) {revdate}
88:authorinitials: ATR
99:author: Anatole Tresch, Credit Suisse
@@ -813,7 +813,16 @@ Hereby
813813 +BigDecimal+, +long+ or something else. The only constraint is that the numeric value can be exposed as +NumberValue+
814814 and that the +MonetaryContext+ returned reflects the numeric capabilities accordingly.
815815
816- Implementations of +MonetaryAmount<T>+
816+ When dealing with +double+ values additional aspects must be considered:
817+
818+ * multiplying/adding/subtracting with POSITIVE_INFINITY should throw ArithmeticException because it overflows
819+ * multiplying/adding/subtracting with NEGATIVE_INFINITY should throw ArithmeticException because it overflows
820+ * multiplying/adding/subtracting with NaN should throw ArithmeticException because the result is NaN
821+ * dividing by POSITIVE_INFINITY returns 0
822+ * dividing by NEGATIVE_INFINITY returns 0
823+ * dividing/multiplying/adding/subtracting by NaN should throw ArithmeticException because the result is NaN
824+
825+ Finally implementations of +MonetaryAmount<T>+
817826
818827. must implement +equals/hashCode+, hereby it is recommended considering
819828 .. its implementation type
You can’t perform that action at this time.
0 commit comments