-
Notifications
You must be signed in to change notification settings - Fork 20.8k
Description
What would you like to Propose?
A Java-based utility for converting numeric values into their English word representations. Whether you need to convert a small number, a large number with millions and billions, or even a number with decimal places, this utility has you covered.
Issue details
The feature should be able to convert a BigDecimal Number into its word representation including the fractional part.
Test cases:
BigDecimal[] testCases = {
null, // Invalid input
BigDecimal.ZERO, // Zero
new BigDecimal("-0.0"), // Negative zero
new BigDecimal("0.001"), // Small positive fraction
new BigDecimal("-0.001"), // Small negative fraction
new BigDecimal("1.0"), // Simple whole number
new BigDecimal("-1.0"), // Negative whole number
new BigDecimal("1000"), // Thousand
new BigDecimal("1000000"), // Million
new BigDecimal("1234567.890"), // Complex number
new BigDecimal("-1234567890.98765"), // Large negative number
new BigDecimal("999999999.999"), // Maximum billion with decimals
new BigDecimal("1000000000"), // One billion
new BigDecimal("1000000000000.01"), // One trillion with fraction
new BigDecimal("-9876543210987.012345"), // Large negative trillions with fraction
new BigDecimal("0.0000001"), // Very small fraction
new BigDecimal("999999999999999.999999") // Near limit for precision
};
Additional Information
No response