Commit graph

  • 6a616473ab
    Merge 9340ba9187 into 447b833d1e François Pons 2026-10-22 12:35:46 +02:00
  • 9340ba9187 docs: add aytechnet/decimal to the alternative libraries François Pons 2026-10-22 12:30:55 +02:00
  • 5800f1c734
    Merge 53ed891466 into 447b833d1e Muhammad Naufal Mahdi 2026-10-22 10:21:00 +07:00
  • 53ed891466 chore: update actions/checkout and actions/setup-go to v7 katsugtgz 2026-10-22 10:20:42 +07:00
  • 4cd3d3b897
    Merge 9f344a0e4e into 447b833d1e Kyon 2026-10-22 02:09:35 +09:00
  • 9f344a0e4e docs: keep the Decimal representation comment internal s.kyon 2026-10-22 02:09:22 +09:00
  • 6db44b59ba
    Merge f8a55f956b into 447b833d1e Yang Bai 2026-10-18 18:00:32 -05:00
  • f8a55f956b fix: ExpTaylor rounds correctly, computed with error bounds like Ln ybai08 2026-10-18 16:19:18 -05:00
  • 447b833d1e
    docs: changelog for v1.6.0 (#477) master v1.6.0 Mateusz Wos 2026-10-18 17:33:05 +02:00
  • b4d091197c docs: changelog for v1.6.0 mwoss 2026-10-18 17:31:33 +02:00
  • 4ce352fe15
    fix: reject overflowing division precision (#472) Yusuf Efe 2026-10-18 18:29:12 +03:00
  • 96888f762e Fold the MinInt32 check into the existing overflow check mwoss 2026-10-18 17:26:50 +02:00
  • 540b915359
    docs: add udecimal to the alternative libraries (#476) Mateusz Wos 2026-10-18 17:19:27 +02:00
  • ac3ad4c8b8 docs: add udecimal to the alternative libraries mwoss 2026-10-18 17:18:15 +02:00
  • 54748831b6
    docs: show how to control the JSON format of one field (#475) Mateusz Wos 2026-10-18 17:16:13 +02:00
  • 577c96440a docs: show how to control the JSON format of one field mwoss 2026-10-18 17:14:20 +02:00
  • ddb96d1ae7
    fix: clearer error when scanning NULL into a Decimal (#474) Mateusz Wos 2026-10-18 16:56:12 +02:00
  • e3d77ab7a3 fix: clearer error when scanning NULL into a Decimal mwoss 2026-10-18 16:50:14 +02:00
  • 59f775d55c
    README: Fix URLs for the official Go pages (#264) Ryoya Sekino 2026-10-18 23:47:19 +09:00
  • 42c9e220af Merge master into PR #264 mwoss 2026-10-18 16:45:37 +02:00
  • 100aebf14a
    feat: add Root and RootRound (#473) Mateusz Wos 2026-10-18 16:44:29 +02:00
  • 2cfe8254c9 feat: add Root and RootRound mwoss 2026-10-18 16:42:15 +02:00
  • d56f107f7a fix: reject overflowing division precision Yusuf Efe 2026-10-18 17:30:11 +03:00
  • b9dfc00f4c
    Merge 6e8c4f56de into bed77f5cb6 piyongcai 2026-10-18 16:29:23 +02:00
  • 3073e38a32
    Merge afac94241f into bed77f5cb6 Elirehema Paul 2026-10-18 16:29:19 +02:00
  • 9be28fd7d4
    Merge 1b31f22216 into bed77f5cb6 yijiong 2026-10-18 16:29:15 +02:00
  • 67127d6c6d
    Merge cccf43f936 into bed77f5cb6 chentong 2026-10-18 16:29:11 +02:00
  • 4f065f49dc
    Merge 32e97db84f into bed77f5cb6 chentong 2026-10-18 16:29:10 +02:00
  • 8702fb1923
    Merge 418c15dcc1 into bed77f5cb6 chentong 2026-10-18 16:29:09 +02:00
  • bed77f5cb6
    fix: Ln rounds correctly, computed with error bounds like Pow (#471) Mateusz Wos 2026-10-17 23:45:12 +02:00
  • dd895e2d90 fix: Ln rounds correctly, computed with error bounds like Pow mwoss 2026-10-17 23:42:56 +02:00
  • 37aad64c5a
    feat: add NewFromBigFloat constructor (#457) adam magued 2026-10-18 00:29:19 +03:00
  • 0c95b7c0c1 refactor: drop RequireFromBigFloat, document what NewFromBigFloat returns mwoss 2026-10-17 23:26:09 +02:00
  • 262eee0d34 Merge master into PR #457 mwoss 2026-10-17 23:24:46 +02:00
  • 78a38f8f6f
    perf: NewFromFloat uses strconv, drop the vendored strconv copy (#431) Raiven Kao 2026-10-18 05:21:43 +08:00
  • e58ad3ab55 refactor: use strconv on every Go version, drop the vendored strconv copy mwoss 2026-10-17 21:52:19 +02:00
  • 11444e0e54 Merge master into PR #431 mwoss 2026-10-17 21:51:27 +02:00
  • 4fef1ec699
    fix: ExpHullAbrham returns the requested number of significant figures for large inputs (#470) Mateusz Wos 2026-10-17 21:32:15 +02:00
  • c819406fab fix: ExpHullAbrham returns the requested number of significant figures for large inputs mwoss 2026-10-17 21:31:08 +02:00
  • 77f8f075c2
    fix: ExpHullAbrham drops significant figures for results below 1 (#429) Bing Gao 2026-10-17 21:30:33 +02:00
  • 7359c0e7a3 Merge master into PR #429 mwoss 2026-10-17 21:21:06 +02:00
  • 5bc569143a
    feat: Scan accepts Decimal, big.Int and all integer sizes (#469) Mateusz Wos 2026-10-17 21:00:54 +02:00
  • 35dbe814a9 feat: Scan accepts Decimal, big.Int and all integer sizes mwoss 2026-10-17 20:59:01 +02:00
  • 9e64f2e188
    docs: fix doc examples that were wrong or didn't compile (#468) Mateusz Wos 2026-10-17 20:47:30 +02:00
  • a6d35c1ad1 docs: fix doc examples that were wrong or didn't compile mwoss 2026-10-17 20:46:23 +02:00
  • 175974ac6b
    test: fix benchmarks that measured setup or the wrong function (#467) Mateusz Wos 2026-10-17 20:36:28 +02:00
  • 4053145826 test: fix benchmarks that measured setup or the wrong function mwoss 2026-10-17 20:34:49 +02:00
  • 1863390911
    perf: use Sign() instead of Cmp(zeroInt) in IsInteger and Ceil cdpzyafk 2026-10-17 05:15:40 +08:00
  • 08e7ee6132 Merge master into PR #299 mwoss 2026-10-16 23:03:02 +02:00
  • 0146aff76d
    docs: warn that global settings are not goroutine-safe, list them in the README (#466) Mateusz Wos 2026-10-16 22:52:22 +02:00
  • 65567d905c docs: warn that global settings are not goroutine-safe, list them in the README mwoss 2026-10-16 22:48:40 +02:00
  • 2d97fa9ba3
    feat: add Sqrt and SqrtRound (#465) Mateusz Wos 2026-10-16 18:21:15 +02:00
  • 6ab8b4ec43 feat: add Sqrt and SqrtRound mwoss 2026-10-16 18:20:03 +02:00
  • c5d65cf1e9
    feat: add Normalize method (#464) Mateusz Wos 2026-10-16 14:43:08 +02:00
  • 67ff3df755 perf: count trailing zeros with integer math in Normalize, add its benchmark mwoss 2026-10-16 14:40:08 +02:00
  • 771c46b2cb feat: add Normalize mwoss 2026-10-16 13:22:32 +02:00
  • ec4943b1a3
    feat: implement fmt.Formatter (#463) Mateusz Wos 2026-10-15 20:05:04 +02:00
  • 9d6b468ada fix: ignore stale fmt widths on old Go, skip String() for %#v, print big %#v values with Shift mwoss 2026-10-15 14:57:50 +02:00
  • 2c823d1b64 feat: implement fmt.Formatter mwoss 2026-10-15 14:38:11 +02:00
  • c11c40c4ef fix: correct constant approximation precision vera-rubin 2026-10-15 06:16:44 +00:00
  • e799c20820
    feat: BSON Decimal128 support for the MongoDB Go driver v2 (#460) Mateusz Wos 2026-10-14 19:27:42 +02:00
  • 9228846dc9 fix: decode BSON null and undefined as zero, read non-canonical Decimal128 as zero, tidy the BSON tests mwoss 2026-10-14 14:39:39 +02:00
  • e8706d35da feat: BSON Decimal128 support for the MongoDB Go driver v2 mwoss 2026-10-14 14:28:57 +02:00
  • 356c647744 Explain division precision in the README AC 2026-10-13 12:59:05 +08:00
  • 511ed65a12
    chore: turn off the strings.ReplaceAll lint check, it needs Go 1.12 (#458) Mateusz Wos 2026-10-10 23:17:59 +02:00
  • 970f0b7bae
    fix: accept Unicode minus in NewFromString (#428) Archit Goyal 2026-10-11 02:47:16 +05:30
  • 1a3c378fc0 chore: turn off the strings.ReplaceAll lint check, it needs Go 1.12 mwoss 2026-10-10 23:15:43 +02:00
  • 1fc621e247 Merge branch 'master' into fix/unicode-minus-newfromstring mwoss 2026-10-10 23:14:58 +02:00
  • 7bf76debaa feat: add NewFromBigFloat constructor AdamMagued 2026-10-09 14:45:31 +03:00
  • 92776553a7 fix(round): prevent RoundUp from incrementing exact numbers with trailing zeros AdamMagued 2026-10-09 14:44:57 +03:00
  • f658fbf1eb
    docs: changelog for v1.5.0 (#455) v1.5.0 Mateusz Wos 2026-10-05 14:11:08 +02:00
  • 5bac6976cd docs: changelog for v1.5.0 mwoss 2026-10-05 14:07:24 +02:00
  • b2609858ef
    ci: test on Go 1.26 and 1.27 instead of 1.22 and 1.23 (#454) Mateusz Wos 2026-10-05 13:53:53 +02:00
  • d25658fa8d
    chore: lint with golangci-lint in CI instead of Go Report Card (#453) Mateusz Wos 2026-10-05 13:53:41 +02:00
  • 2349e9ca93 ci: test on Go 1.26 and 1.27 instead of 1.22 and 1.23 mwoss 2026-10-05 13:49:38 +02:00
  • 104eba5c30 chore: lint with golangci-lint in CI instead of Go Report Card mwoss 2026-10-05 13:18:21 +02:00
  • fc257b4a95
    chore: split decimal.go into math.go and encoding.go (#452) Mateusz Wos 2026-10-05 13:05:34 +02:00
  • 62a125a07d chore: split decimal.go into math.go and encoding.go mwoss 2026-10-05 12:57:52 +02:00
  • aed8543466
    fix: RoundCash with a low DivisionPrecision and NullDecimal.Valid after errors (#443) Mateusz Wos 2026-10-05 11:58:31 +02:00
  • 811854c508
    perf: faster QuoRem, DivRound, Round, RoundBank, RoundUp, RoundCeil and RoundFloor (#446) Mateusz Wos 2026-10-05 11:58:08 +02:00
  • 9b6d1186ce
    perf: raise the ExpHullAbrham sum to its power by squaring (#450) Mateusz Wos 2026-10-05 11:57:46 +02:00
  • cc8953c6b3
    perf: build trig constants once (#449) Mateusz Wos 2026-10-05 11:57:34 +02:00
  • 84990cbfac
    perf: faster String, MarshalJSON and NewFromString; reject a sign after the decimal point (#447) Mateusz Wos 2026-10-05 11:57:10 +02:00
  • e8f9520aff fix: RoundCash with a low DivisionPrecision and NullDecimal.Valid after errors mwoss 2026-10-05 10:14:20 +02:00
  • 71ebcfdcdf
    Fix the scale of the small-input exponential result (#433) Jake Wang 2026-10-05 04:13:05 -04:00
  • f1d1c0012b
    perf: int64 fast paths in NumDigits, IntPart, IsInteger and Float64 (#448) Mateusz Wos 2026-10-04 21:07:30 +02:00
  • 51fe3c95dc
    fix: keep the zero representation of rescale results (#451) Mateusz Wos 2026-10-04 21:06:56 +02:00
  • 8a6d7582fa
    perf: fewer allocations in Add, Sub, Cmp, Sum and Shift (#445) Mateusz Wos 2026-10-04 21:06:15 +02:00
  • b833bbbfc4 fix: Shift of zero keeps the zero representation mwoss 2026-10-04 20:40:56 +02:00
  • 709e3ee302 fix: keep the zero representation of RoundCeil and RoundFloor results mwoss 2026-10-04 20:39:18 +02:00
  • e69343dbb7 fix: keep the zero representation of rescale results mwoss 2026-10-04 20:39:18 +02:00
  • cf7fe236e7 fix: keep the zero representation of Shift and Sum results mwoss 2026-10-04 20:20:57 +02:00
  • e78fe0e8ac
    perf: use cached powers of ten in rescale, Floor, Ceil and Rat (#444) Mateusz Wos 2026-10-04 19:56:28 +02:00
  • 68ef857533 perf: raise the ExpHullAbrham sum to its power by squaring mwoss 2026-10-04 18:54:26 +02:00
  • 32287ccb8e perf: build trig constants once mwoss 2026-10-04 18:54:11 +02:00
  • dd26b3dbff perf: int64 fast paths in NumDigits, IntPart, IsInteger and Float64 mwoss 2026-10-04 18:53:48 +02:00
  • 2272409d90 perf: faster String, MarshalJSON and NewFromString; reject a sign after the decimal point mwoss 2026-10-04 18:53:10 +02:00
  • 77060c3a14 perf: faster QuoRem, DivRound, Round, RoundBank, RoundUp, RoundCeil and RoundFloor mwoss 2026-10-04 18:52:28 +02:00
  • c7123ca71f perf: fewer allocations in Add, Sub, Cmp, Sum and Shift mwoss 2026-10-04 18:52:08 +02:00
  • 32c519d8ef perf: use cached powers of ten in rescale, Floor, Ceil and Rat mwoss 2026-10-04 18:51:42 +02:00
  • a37fbe42be
    fix: panic when Shift overflows the exponent (#437) Sash 2026-10-04 16:31:52 +01:00
  • 853f233310
    Address the Shift overflow review. Sasha Mitchell 2026-10-04 21:11:45 +07:00
  • f6cc580f80
    docs: explain that NewFromFloat can change large whole numbers (#442) Mateusz Wos 2026-10-04 10:25:56 +02:00
  • b3ca9d119f docs: explain that NewFromFloat can change large whole numbers mwoss 2026-10-04 10:07:06 +02:00
  • 0911c5f1b5
    fix: directed rounding always returns the requested exponent (#441) Mateusz Wos 2026-10-04 09:53:38 +02:00
  • df1db0230f fix: directed rounding always returns the requested exponent mwoss 2026-10-04 09:50:19 +02:00
  • fdefb63ebc
    fix: normalize exponent in RoundUp/RoundDown/RoundFloor/RoundCeil and support negative precision in Truncate (#426) Amit Mishra 2026-10-04 13:17:36 +05:30
  • 71ca20d594
    fix: limit exponents accepted by NewFromString and UnmarshalBinary (#440) Mateusz Wos 2026-10-04 09:37:51 +02:00
  • 684fe9e21d
    fix: Float64 hangs on decimals with huge exponents (#438) phuoc14.dev 2026-10-04 14:29:49 +07:00
  • 532488dbf2 docs: explain the Float64 magnitude bounds orinnz 2026-10-04 12:15:40 +07:00
  • eceacb5d50 fix: rename limit to MaxDecodeExponent and lower its default to 10000 mwoss 2026-10-04 01:36:11 +02:00
  • 116945ff8e fix: limit exponents accepted by NewFromString and UnmarshalBinary mwoss 2026-10-04 01:03:36 +02:00
  • e0621cba7b
    fix: correctly round Pow results and speed up Pow (#439) Mateusz Wos 2026-10-04 00:39:46 +02:00
  • a5a628f1b8 docs: clarify Pow rounding docs mwoss 2026-10-04 00:35:40 +02:00
  • 3130f2f261 fix: handle tiny results, near ties and overflow in Pow mwoss 2026-10-04 00:19:00 +02:00
  • d39f80247b fix: correctly round Pow results and speed up Pow mwoss 2026-10-03 23:15:56 +02:00
  • 85f1f27126 fix: Float64 hangs on decimals with huge exponents orinnz 2026-10-03 19:08:30 +07:00
  • 5749a3e386
    fix: panic when Shift overflows the exponent Sasha Mitchell 2026-10-03 04:09:14 +07:00
  • 47e9116ddb fix: preserve precision in Pow with large negative exponents AdamMagued 2026-10-02 19:01:18 +00:00
  • 160d6a2416 feat: support negative precision in Decimal.Truncate AdamMagued 2026-10-02 14:44:05 +00:00
  • 59b42c5aef Keep existing unrelated test formatting agammann 2026-09-20 14:44:16 -07:00
  • 9e4534ab04 Use float32 precision when scanning float32 values agammann 2026-09-20 14:43:40 -07:00
  • d1fec50520 Fix the scale of the small-input exponential result Jake Wang 2026-09-18 21:06:46 -04:00
  • 718e49e2ad
    Merge 5da0fa3a8e into ca47408237 Daniel Hilton 2026-08-31 21:34:15 +05:30
  • 0139296080
    Merge 81b6afad9b into ca47408237 Sofya Mikhaylova 2026-08-31 21:33:48 +05:30
  • ae2f9ec096
    Merge cd5465e26b into ca47408237 Ali J. Alaee 2026-08-31 21:33:34 +05:30
  • 1bec99d1e1 perf: delegate NewFromFloat shortest-decimal conversion to strconv omegaatt36 2026-08-27 21:20:55 +08:00
  • ca47408237
    fix: ExpTaylor race condition (#414) natan streppel 2026-08-19 18:07:36 -03:00
  • 617cdd762d fix: ExpTaylor race condition natan.streppel 2026-01-26 11:43:01 -03:00
  • cd917b4ccd Updates MarshalYAML interface to use 'any' Chad Skeeters 2024-11-11 10:30:39 -06:00
  • 1f6017bbc9
    Merge 73b5850215 into 3090cc487f Solaris-star 2026-07-21 20:31:12 +08:00
  • 73b5850215 fix: keep exact negative powers of ten under default precision Solaris-star 2026-07-21 20:31:01 +08:00
  • 9ffde15778
    fix: ExpHullAbrham drops significant figures for results below 1 Vincent Gao 2026-07-18 17:36:07 +02:00
  • 2944234a97 fix: accept Unicode minus in NewFromString Archit Goyal 2026-07-17 22:24:14 +05:30
  • 9462855038 feat: add ExpMaxLimit and ExpMinLimit to prevent OOM / DoS via huge exponents Lovepreet Singh 2026-07-12 17:32:53 +05:30
  • caffd51dc4 fix: normalize exponent in RoundUp/RoundDown/RoundFloor/RoundCeil and support negative precision in Truncate Amit Mishra 2026-07-06 23:04:59 +05:30
  • 3090cc487f
    fix: NumDigits underreports for some exact powers of ten (#425) Charlie Tonneslan 2026-06-29 05:58:29 -04:00
  • 60edf4b45e
    fix: NumDigits underreports for some exact powers of ten Charlie Tonneslan 2026-05-25 12:20:48 -04:00
  • 40826314e6
    Update URLs to the Go website in README Oleksandr Redko 2026-05-24 20:33:42 +03:00
  • 418c15dcc1 Add comprehensive tests for Sum and Avg functions walle250ai 2026-04-29 14:57:14 +08:00
  • 32e97db84f Add comprehensive tests for RoundBank (Banker's Rounding) walle250ai 2026-04-29 14:40:53 +08:00
  • cccf43f936 Add comprehensive tests for RoundBank (Banker's Rounding) walle250ai 2026-04-29 14:39:12 +08:00
  • 688ae13d7e Add Clamp method for Decimal type walle250ai 2026-04-29 14:26:21 +08:00
  • 0ae7f92b0d fix: support negative precision in Truncate Yanhu007 2026-04-14 14:10:13 +08:00
  • 3566ce11b0 Perform an exact decimal expansion strictly based on the true binary floating-point value (rather than the shortest round-trip representation). yangjianyang 2026-04-13 16:57:52 +08:00
  • 36904b256e fix: NewFromFloat matches NewFromInt when int64 round-trip is exact yangjianyang 2026-04-13 15:38:27 +08:00
  • 400829b4bf
    chore: rename AvoidScientificNotation to UseScientificNotation (#416) Mateusz Wos 2026-03-15 23:07:00 +01:00
  • 50bf04be9b chore: rename AvoidScientificNotation to UseScientificNotation mwoss 2026-03-15 23:04:41 +01:00
  • 6540310a7d
    Add support for omitzero struct tag (#415) Mateusz Wos 2026-03-08 23:42:36 +01:00
  • 7373bd8e85 handle nil pointer dereference in ScientificNotationString mwoss 2026-03-08 23:37:49 +01:00