Skip to content

Commit ae0ef66

Browse files
committed
Version 1.8.0
1 parent d9c14c9 commit ae0ef66

23 files changed

Lines changed: 1993 additions & 751 deletions

.github/workflows/Test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE by Peter O:
2-
# This file was contributed by GitHub user Happypig375
2+
# Modified from a file that was contributed by GitHub user Happypig375
33
# at: https://github.com/peteroupc/Numbers/pull/10
44
name: Test
55

@@ -17,10 +17,10 @@ jobs:
1717
- name: Setup .NET Core
1818
uses: actions/setup-dotnet@v1
1919
with:
20-
dotnet-version: '3.1.301'
20+
dotnet-version: '2.2.402'
2121
- name: Test
2222
run: |
2323
dotnet add Test package Microsoft.NET.Test.Sdk # Update is required for GitHubActionsTestLogger to print anything
2424
dotnet add Test package GitHubActionsTestLogger
2525
dotnet add Test package NUnit3TestAdapter
26-
dotnet test Test -c Release -l GitHubActions
26+
dotnet test Test -c Release

Numbers.nuspec

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
11
<package
2-
><metadata><version>1.7.3</version><id>PeterO.Numbers</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 1.7.3
2+
><metadata><version>1.8.0</version><id>PeterO.Numbers</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 1.8
33

4-
- Fix bugs and regressions involving EInteger&apos;s Pow, Root, and new Gcd
5-
6-
Version 1.7.2
7-
8-
- Improve performance of EInteger&apos;s Gcd method for large integers
9-
10-
Version 1.7.1
11-
12-
- Fix bugs in new char[] and byte[] overloads of FromString
13-
14-
Version 1.7.0
15-
16-
- Added overloads to string-to-number methods that take char[] and byte[] arrays.
17-
- Added methods that convert EDecimal, EFloat, and ERational to and from raw bits that follow IEEE 754 binary floating-point formats (To/FromDoubleBits, To/FromSingleBits).
18-
- Added Log1P and ExpM1 methods to EDecimal and EFloat
19-
- Added &apos;long&apos; overloads to several arithmetic methods
20-
- Added implication and equivalence (Imp/Eqv) methods and an nth-root method to EInteger</releaseNotes><summary></summary><license type='expression'>CC0-1.0</license><projectUrl>https://github.com/peteroupc/Numbers</projectUrl><authors>Peter Occil</authors><description>A C# library that supports arbitrary-precision binary and decimal floating-point numbers and rational numbers with arbitrary-precision components, and supports arithmetic with these numbers.</description><owners>Peter Occil</owners><title>Arbitrary-Precision Number Library</title><tags>numbers arithmetic decimal math</tags><dependencies><group targetFramework='.NETStandard1.0' /><group targetFramework='.NETFramework2.0' /><group targetFramework='.NETFramework4.0' /></dependencies></metadata><files><file src='Numbers/bin/Release/netstandard1.0/Numbers.dll' target='/lib/netstandard1.0' /><file src='Numbers/bin/Release/netstandard1.0/Numbers.xml' target='/lib/netstandard1.0' /><file src='Numbers20/bin/Release/Numbers.dll' target='/lib/net20' /><file src='Numbers20/bin/Release/Numbers.xml' target='/lib/net20' /><file src='Numbers40/bin/Release/Numbers.dll' target='/lib/net40' /><file src='Numbers40/bin/Release/Numbers.xml' target='/lib/net40' /></files></package
21-
>
4+
- Add LowBits family of methods to EInteger
5+
- Add FromInt64AsUnsigned to EInteger, EDecimal, EFloat, and ERational
6+
- Add overload to FromBytes method of EInteger
7+
- Bug fixes</releaseNotes><summary></summary><license type='expression'>CC0-1.0</license><projectUrl>https://github.com/peteroupc/Numbers</projectUrl><authors>Peter Occil</authors><description>A C# library that supports arbitrary-precision binary and decimal floating-point numbers and rational numbers with arbitrary-precision components, and supports arithmetic with these numbers.</description><owners>Peter Occil</owners><title>Arbitrary-Precision Number Library</title><tags>numbers arithmetic decimal math</tags><dependencies><group targetFramework='.NETStandard1.0' /><group targetFramework='.NETFramework2.0' /><group targetFramework='.NETFramework4.0' /></dependencies></metadata><files><file src='Numbers/bin/Release/netstandard1.0/Numbers.dll' target='/lib/netstandard1.0' /><file src='Numbers/bin/Release/netstandard1.0/Numbers.xml' target='/lib/netstandard1.0' /><file src='Numbers20/bin/Release/Numbers.dll' target='/lib/net20' /><file src='Numbers20/bin/Release/Numbers.xml' target='/lib/net20' /><file src='Numbers40/bin/Release/Numbers.dll' target='/lib/net40' /><file src='Numbers40/bin/Release/Numbers.xml' target='/lib/net40' /></files></package
8+
>

Numbers/PeterO/Numbers/EDecimal.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ public static EDecimal FromInt32(int valueSmaller) {
11031103
/// instead.</returns>
11041104
public static EDecimal FromInt64AsUnsigned(long longerValue) {
11051105
return longerValue >= 0 ? FromInt64(longerValue) :
1106-
FromEInteger(EInteger.FromInt64AsUnsigned(longerValue));
1106+
FromEInteger(EInteger.FromInt64AsUnsigned(longerValue));
11071107
}
11081108

11091109
/// <summary>Creates an arbitrary-precision decimal number from a
@@ -1363,7 +1363,12 @@ public static EDecimal FromString(
13631363
if (chars == null) {
13641364
throw new ArgumentNullException(nameof(chars));
13651365
}
1366-
return EDecimalCharArrayString.FromString(chars, offset, length, ctx);
1366+
return EDecimalCharArrayString.FromString(
1367+
chars,
1368+
offset,
1369+
length,
1370+
ctx,
1371+
true);
13671372
}
13681373

13691374
/// <summary>Creates an arbitrary-precision decimal number from a
@@ -1499,7 +1504,12 @@ public static EDecimal FromString(
14991504
if (bytes == null) {
15001505
throw new ArgumentNullException(nameof(bytes));
15011506
}
1502-
return EDecimalByteArrayString.FromString(bytes, offset, length, ctx);
1507+
return EDecimalByteArrayString.FromString(
1508+
bytes,
1509+
offset,
1510+
length,
1511+
ctx,
1512+
true);
15031513
}
15041514

15051515
/// <summary>Creates an arbitrary-precision decimal number from a text
@@ -1632,7 +1642,7 @@ public static EDecimal FromString(
16321642
if (str == null) {
16331643
throw new ArgumentNullException(nameof(str));
16341644
}
1635-
return EDecimalTextString.FromString(str, offset, length, ctx);
1645+
return EDecimalTextString.FromString(str, offset, length, ctx, true);
16361646
}
16371647

16381648
internal static EDecimal SignalUnderflow(EContext ec, bool negative, bool

0 commit comments

Comments
 (0)