daboe01 and Martin Carlberg
7bd8bf02f6
Fixed: Typo in function call to _CPDecimalSetZero and made the test case work properly ( #2820 )
2019-06-13 16:09:17 +02:00
Andrew Hankinson
7bef84e4e9
Allow CPDecimal to handle decimal numbers with leading zeros
...
Without this fix, CPDecimal will return NaN for numbers that have leading zeros, e.g., 0123.
This fix changes the matching regex to allow leading zeros to pass. This is then converted to a proper number later on, e.g., "0123" => 123. This is in line with Cocoa behaviour.
This commit also includes updated unit tests.
2013-03-07 00:26:02 -05:00
Aparajita Fishman
63ae5848f6
Formatting, fixes for CPDecimal/CPDecimalNumber
...
- CPDecimalRound should return a result in all cases
- Fixed test of CPDecimalRound with CPDecimalNoScale
2013-02-11 14:05:52 -05:00
Eric Wong
175c70d99e
fix a new bug in CPDecimalMakeWithString and remove some test cases
2012-08-05 08:37:44 +08:00
Eric Wong
9f1a8fa7a2
enable '.003' or '-.003' style number in CPDecimalMakeWithString function and add new test cases
2012-08-04 23:04:40 +08:00
Alexander Ljungberg
3a2bf36359
Very basic CPNumberFormattercurrency style.
2012-08-04 13:37:42 +01:00
Alexander Ljungberg
4218c49a7e
Refs #1529 . Verify that the actual issue error is gone.
2012-05-10 00:17:25 +01:00
Alexander Ljungberg
27fa01648f
Code formatting, delete stray */.
2012-05-10 00:01:03 +01:00
Stephen Ierodiaconou
2fe8845842
CPDecimalString returns NaN for a NaN and Fix Compare of NaNs and Cocoa compatable handling of overflow/underflows when no exception
2011-01-15 19:29:55 +02:00
Stephen Ierodiaconou
27ad98e160
Initialiser fixes and docs
...
Fix tests for new initialisers
2011-01-15 16:40:11 +02:00
Stephen Ierodiaconou
6a6256bdb4
CPCoding support for CPDecimalNumber and test
2011-01-15 14:15:31 +02:00
Stephen Ierodiaconou
5a0cfc1595
Make default number hanler file global only and Improvements and optimisations for CPDecimalNumber
2011-01-15 11:49:20 +02:00
stevegeek
00532fe7ac
First CPDecimal and CPDecimalNumber commits (and tests).
...
These implementations are mostly complete but require optimisation.
2009-09-28 13:59:18 +01:00