Skip to content

Commit

Permalink
Version 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peteroupc committed Apr 29, 2021
1 parent d9c14c9 commit ae0ef66
Show file tree
Hide file tree
Showing 23 changed files with 1,993 additions and 751 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# NOTE by Peter O:
# This file was contributed by GitHub user Happypig375
# Modified from a file that was contributed by GitHub user Happypig375
# at: https://github.com/peteroupc/Numbers/pull/10
name: Test

Expand All @@ -17,10 +17,10 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.301'
dotnet-version: '2.2.402'
- name: Test
run: |
dotnet add Test package Microsoft.NET.Test.Sdk # Update is required for GitHubActionsTestLogger to print anything
dotnet add Test package GitHubActionsTestLogger
dotnet add Test package NUnit3TestAdapter
dotnet test Test -c Release -l GitHubActions
dotnet test Test -c Release
25 changes: 6 additions & 19 deletions Numbers.nuspec
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
<package
><metadata><version>1.7.3</version><id>PeterO.Numbers</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 1.7.3
><metadata><version>1.8.0</version><id>PeterO.Numbers</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 1.8

- Fix bugs and regressions involving EInteger&apos;s Pow, Root, and new Gcd

Version 1.7.2

- Improve performance of EInteger&apos;s Gcd method for large integers

Version 1.7.1

- Fix bugs in new char[] and byte[] overloads of FromString

Version 1.7.0

- Added overloads to string-to-number methods that take char[] and byte[] arrays.
- 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).
- Added Log1P and ExpM1 methods to EDecimal and EFloat
- Added &apos;long&apos; overloads to several arithmetic methods
- 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
>
- Add LowBits family of methods to EInteger
- Add FromInt64AsUnsigned to EInteger, EDecimal, EFloat, and ERational
- Add overload to FromBytes method of EInteger
- 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
>
18 changes: 14 additions & 4 deletions Numbers/PeterO/Numbers/EDecimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ public static EDecimal FromInt32(int valueSmaller) {
/// instead.</returns>
public static EDecimal FromInt64AsUnsigned(long longerValue) {
return longerValue >= 0 ? FromInt64(longerValue) :
FromEInteger(EInteger.FromInt64AsUnsigned(longerValue));
FromEInteger(EInteger.FromInt64AsUnsigned(longerValue));
}

/// <summary>Creates an arbitrary-precision decimal number from a
Expand Down Expand Up @@ -1363,7 +1363,12 @@ public static EDecimal FromString(
if (chars == null) {
throw new ArgumentNullException(nameof(chars));
}
return EDecimalCharArrayString.FromString(chars, offset, length, ctx);
return EDecimalCharArrayString.FromString(
chars,
offset,
length,
ctx,
true);
}

/// <summary>Creates an arbitrary-precision decimal number from a
Expand Down Expand Up @@ -1499,7 +1504,12 @@ public static EDecimal FromString(
if (bytes == null) {
throw new ArgumentNullException(nameof(bytes));
}
return EDecimalByteArrayString.FromString(bytes, offset, length, ctx);
return EDecimalByteArrayString.FromString(
bytes,
offset,
length,
ctx,
true);
}

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

internal static EDecimal SignalUnderflow(EContext ec, bool negative, bool
Expand Down
Loading

0 comments on commit ae0ef66

Please sign in to comment.