@@ -1488,8 +1488,17 @@ public double ToDouble() {
14881488 /**
14891489 * Creates a decimal number from a 32-bit floating-point number. This method
14901490 * computes the exact value of the floating point number, not an
1491- * approximation, as is often the case by converting the number to a
1492- * string.
1491+ * approximation, as is often the case by converting the floating point
1492+ * number to a string first. Remember, though, that the exact value of a
1493+ * 32-bit floating-point number is not always the value you get when you
1494+ * pass a literal decimal number (for example, calling
1495+ * <code>ExtendedDecimal.FromSingle(0.1f)</code>), since not all decimal
1496+ * numbers can be converted to exact binary numbers (in the example
1497+ * given, the resulting ExtendedDecimal will be the the value of the
1498+ * closest "float" to 0.1, not 0.1 exactly). To create an
1499+ * ExtendedDecimal number from a decimal number, use FromString instead
1500+ * in most cases (for example: <code>ExtendedDecimal.FromString("0.1")</code>
1501+ *).
14931502 * @param flt A 32-bit floating-point number.
14941503 * @return A decimal number with the same value as {@code flt} .
14951504 */
@@ -1585,8 +1594,16 @@ public static ExtendedDecimal FromInt32(int valueSmaller) {
15851594 /**
15861595 * Creates a decimal number from a 64-bit floating-point number. This method
15871596 * computes the exact value of the floating point number, not an
1588- * approximation, as is often the case by converting the number to a
1589- * string.
1597+ * approximation, as is often the case by converting the floating point
1598+ * number to a string first. Remember, though, that the exact value of a
1599+ * 64-bit floating-point number is not always the value you get when you
1600+ * pass a literal decimal number (for example, calling
1601+ * <code>ExtendedDecimal.FromDouble(0.1f)</code>), since not all decimal
1602+ * numbers can be converted to exact binary numbers (in the example
1603+ * given, the resulting ExtendedDecimal will be the value of the closest
1604+ * "double" to 0.1, not 0.1 exactly). To create an ExtendedDecimal
1605+ * number from a decimal number, use FromString instead in most cases
1606+ * (for example: <code>ExtendedDecimal.FromString("0.1")</code>).
15901607 * @param dbl A 64-bit floating-point number.
15911608 * @return A decimal number with the same value as {@code dbl} .
15921609 */
0 commit comments