Skip to content

Commit

Permalink
Version 1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
peteroupc committed Jul 5, 2020
1 parent 1f2e081 commit 735aff4
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 19 deletions.
8 changes: 6 additions & 2 deletions Numbers.nuspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<package
><metadata><version>1.7.0</version><id>PeterO.Numbers</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 1.7.0
><metadata><version>1.7.1</version><id>PeterO.Numbers</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>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
>
>
6 changes: 3 additions & 3 deletions Numbers20/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Reflection;
[assembly: System.CLSCompliant(true)]
[assembly: AssemblyInformationalVersion("1.7.0")]
[assembly: AssemblyVersion("1.7.0.0")]
[assembly: AssemblyFileVersion("1.7.0.0")]
[assembly: AssemblyInformationalVersion("1.7.1")]
[assembly: AssemblyVersion("1.7.1.0")]
[assembly: AssemblyFileVersion("1.7.1.0")]
[assembly: AssemblyProduct("Arbitrary-Precision Number Library")]
[assembly: AssemblyTitle("Arbitrary-Precision Number Library")]
[assembly: AssemblyDescription("A C# library that supports arbitrary-pre" +
Expand Down
6 changes: 3 additions & 3 deletions Numbers40/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Reflection;
[assembly: System.CLSCompliant(true)]
[assembly: AssemblyInformationalVersion("1.7.0")]
[assembly: AssemblyVersion("1.7.0.0")]
[assembly: AssemblyFileVersion("1.7.0.0")]
[assembly: AssemblyInformationalVersion("1.7.1")]
[assembly: AssemblyVersion("1.7.1.0")]
[assembly: AssemblyFileVersion("1.7.1.0")]
[assembly: AssemblyProduct("Arbitrary-Precision Number Library")]
[assembly: AssemblyTitle("Arbitrary-Precision Number Library")]
[assembly: AssemblyDescription("A C# library that supports arbitrary-pre" +
Expand Down
24 changes: 18 additions & 6 deletions Test/DecTestUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,16 @@ public static void AssertFlagsRestricted(
"DivideByZero: " + str);
}

private static bool Contains(string str, string sub) {
return (sub.Length == 1) ?
(str.IndexOf(sub[0], StringComparison.Ordinal) >= 0) :
(str.IndexOf(sub, StringComparison.Ordinal) >= 0);
public static bool Contains(string str, string sub) {
if (sub.Length == 1) {
for (var i = 0; i < str.Length; ++i) {
if (str[i] == sub[0]) {
return true;
}
}
return false;
}
return str.IndexOf(sub, StringComparison.Ordinal) >= 0;
}

private static bool StartsWith(string str, string sub) {
Expand Down Expand Up @@ -969,10 +975,16 @@ public bool IsZeroValue() {

internal static int ParseLineInput(string ln) {
if (ln.Length == 0) {
{ return 0;
return 0;
}
int ix = -1;
for (var i = 0; i < ln.Length; ++i) {
if (ln[i] == '\u0020') {
// Space found
ix = i;
break;
}
}
int ix = ln.IndexOf(' ', StringComparison.Ordinal);
// NOTE: ix < 2 includes cases where space is not found
if (ix < 2 || (ln[ix - 1] != 'd' && ln[ix - 1] != 's' &&
ln[ix - 1] != 'q')) {
Expand Down
10 changes: 5 additions & 5 deletions Test/ExtensiveTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ public void TestParser() {
++x;
var context = new Dictionary<string, string>();
var lowerF = DecTestUtil.ToLowerCaseAscii(f);
var isinput = lowerF.Contains(".input");
if (!lowerF.Contains(".input") &&
!lowerF.Contains(".txt") &&
!lowerF.Contains(".dectest") &&
!lowerF.Contains(".fptest")) {
var isinput = DecTestUtil.Contains(lowerF, ".input");
if (!DecTestUtil.Contains(lowerF, ".input") &&
!DecTestUtil.Contains(lowerF, ".txt") &&
!DecTestUtil.Contains(lowerF, ".dectest") &&
!DecTestUtil.Contains(lowerF, ".fptest")) {
continue;
}
using (var w = new StreamReader(f)) {
Expand Down

0 comments on commit 735aff4

Please sign in to comment.