Skip to content

Commit 5b74a99

Browse files
committed
version 1.5.0
1 parent 108f3b4 commit 5b74a99

5 files changed

Lines changed: 36 additions & 52 deletions

File tree

Numbers.nuspec

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
11
<package
2-
><metadata><version>1.4.3</version><id>PeterO.Numbers</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 1.4.3
3-
4-
- Fix accuracy issue with Log, especially where 1 &lt; x &lt; 1.07
5-
- Remove StyleCop.Analyzers, which is used only in development, as dependency in .NET version
6-
7-
Version 1.4.2
8-
9-
- Bug fix in the EInteger.CanFitInInt64 method
10-
11-
Version 1.4.1
12-
13-
- Added EDecimals and EFloats classes to .NET 2.0 and .NET 4.0 versions; those classes were inadvertently omitted there
14-
15-
Version 1.4.0
16-
17-
- Added EDecimals and EFloats class that implements more methods for arbitrary-precision decimal and binary numbers
18-
- Increment and decrement operators added to EInteger, EDecimal, EFloat, and ERational classes
19-
- Allowed EDecimal values in (-1, 0) to EDecimal&apos;s *Checked methods, to conform to documentation.
20-
- Added WithNoFlagsOrTraps method and HasFlagsOrTraps property to EContext
21-
- Add Mod(int), Pow(int), and FromBoolean methods to EInteger
22-
- Add And, Not, Xor, and Or methods to EInteger.cs
23-
- Add Copy method to EDecimal, EFloat, and ERational
24-
- Add CompareToTotalMagnitude overload to EDecimal, EFloat, and ERational
25-
- Deprecated Odd and ZeroFiveUp rounding modes
26-
- Bug fixes and performance improvements</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 /></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
2+
><metadata><version>1.5.0</version><id>PeterO.Numbers</id><requireLicenseAcceptance>false</requireLicenseAcceptance><releaseNotes>Version 1.5.0
3+
4+
- Major performance improvements in certain number parsing and generating methods, including the FromString methods of EInteger, EDecimal, EFloat, and ERational, and the ToEFloat method of EDecimal, especially where they take an arithmetic context (EContext) that specifies a limited precision and exponent range.
5+
- There were also performance improvements in digit count calculation and in rounding many-digit-long numbers.
6+
- Add int overloads to EDecimal.Pow and EFloat.Pow.
7+
- Add int overloads to several ERational methods.
8+
- Add CompareTo overloads and CompareToValue (which implements current CompareTo) in EDecimal, EFloat, and ERational. In a future version, CompareTo&apos;s behavior might change to CompareToTotal in each of these classes. Also certain CompareTo* methods now have consistent behavior when they receive a null argument.
9+
- ETrapException now has an Errors property that holds all errors that occur at the same time as the primary error.
10+
- Fixed edge cases when ToShortestString might return an incorrect result.
11+
- Fixed bug when some ETrapExceptions aren&apos;t thrown as they should.
12+
- Other 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 /></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
2713
>

Numbers/PeterO/Numbers/ETrapException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public ETrapException(int flag, EContext ctx, Object result)
162162
/// that triggered the trap. Can be null.</param>
163163
/// <param name='result'>The defined result of the operation that
164164
/// caused the trap.</param>
165-
/// <exception cref='ArgumentException'>The parameter <paramref
165+
/// <exception cref="ArgumentException">The parameter <paramref
166166
/// name='flags'/> doesn't include all the flags in the <paramref
167167
/// name='flag'/> parameter.</exception>
168168
public ETrapException(int flags, int flag, EContext ctx, Object result)
@@ -179,8 +179,8 @@ public ETrapException(int flags, int flag, EContext ctx, Object result)
179179
#if NET20 || NET40
180180
private ETrapException(
181181
System.Runtime.Serialization.SerializationInfo info,
182-
System.Runtime.Serialization.StreamingContext context):
183-
base (info, context) {
182+
System.Runtime.Serialization.StreamingContext context)
183+
: base(info, context) {
184184
}
185185
#endif
186186
}
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
using System.Reflection;
22
[assembly: System.CLSCompliant(true)]
3-
[assembly: AssemblyInformationalVersion("1.4.3")]
4-
[assembly: AssemblyVersion("1.4.3.0")]
5-
[assembly: AssemblyFileVersion("1.4.3.0")]
3+
[assembly: AssemblyInformationalVersion("1.5.0")]
4+
[assembly: AssemblyVersion("1.5.0.0")]
5+
[assembly: AssemblyFileVersion("1.5.0.0")]
66
[assembly: AssemblyProduct("Arbitrary-Precision Number Library")]
77
[assembly: AssemblyTitle("Arbitrary-Precision Number Library")]
88
[assembly: AssemblyDescription("A C# library that supports arbitrary-pre" +
9-
"cision binary and decimal floating-point" +
10-
" numbers and rational numbers with arbit" +
11-
"rary-precision components, and supports " +
12-
"arithmetic with these numbers.")]
9+
"cision binary and decimal floating-point" +
10+
" numbers and rational numbers with arbit" +
11+
"rary-precision components, and supports " +
12+
"arithmetic with these numbers.")]
1313
[assembly: AssemblyCompany("Peter Occil")]
14-
[assembly: AssemblyCopyright("http://creativecommons.org/publicdomain/" +
15-
"zero/1.0/")]
14+
[assembly: AssemblyCopyright("CC0-1.0")]
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
using System.Reflection;
22
[assembly: System.CLSCompliant(true)]
3-
[assembly: AssemblyInformationalVersion("1.4.3")]
4-
[assembly: AssemblyVersion("1.4.3.0")]
5-
[assembly: AssemblyFileVersion("1.4.3.0")]
3+
[assembly: AssemblyInformationalVersion("1.5.0")]
4+
[assembly: AssemblyVersion("1.5.0.0")]
5+
[assembly: AssemblyFileVersion("1.5.0.0")]
66
[assembly: AssemblyProduct("Arbitrary-Precision Number Library")]
77
[assembly: AssemblyTitle("Arbitrary-Precision Number Library")]
88
[assembly: AssemblyDescription("A C# library that supports arbitrary-pre" +
9-
"cision binary and decimal floating-point" +
10-
" numbers and rational numbers with arbit" +
11-
"rary-precision components, and supports " +
12-
"arithmetic with these numbers.")]
9+
"cision binary and decimal floating-point" +
10+
" numbers and rational numbers with arbit" +
11+
"rary-precision components, and supports " +
12+
"arithmetic with these numbers.")]
1313
[assembly: AssemblyCompany("Peter Occil")]
14-
[assembly: AssemblyCopyright("http://creativecommons.org/publicdomain/" +
15-
"zero/1.0/")]
14+
[assembly: AssemblyCopyright("CC0-1.0")]

Test/EFloatTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,8 @@ public static void TestDoubleRounding(
12531253
return;
12541254
}
12551255
if (input.ToDouble() != expectedDouble) {
1256-
string msg = "\ninputDouble\nexpectedDbl " + OutputDouble(expectedDouble) +
1256+
string msg = "\ninputDouble\nexpectedDbl " +
1257+
OutputDouble(expectedDouble) +
12571258
",\ngot----- " + OutputDouble(input.ToDouble()) +
12581259
"\nsrc-----=" + OutputEF(src) + "\nexpected=" +
12591260
OutputEF(expected) + "\ninput---=" + OutputEF(input);
@@ -1262,12 +1263,11 @@ public static void TestDoubleRounding(
12621263
string str = input.ToString();
12631264
double inputDouble = EFloat.FromString(str, EContext.Binary64).ToDouble();
12641265
if (inputDouble != expectedDouble) {
1265-
string msg = "\ninputString\nexpectedDbl " + OutputDouble(expectedDouble) +
1266+
string msg = "\ninputString\nexpectedDbl " +
1267+
OutputDouble(expectedDouble) +
12661268
",\ngot----- " + OutputDouble(inputDouble) +
1267-
"\nsrc-----=" + OutputEF(src) +
1268-
"\nstr------=" + str +
1269-
"\nexpected=" +
1270-
OutputEF(expected) + "\ninput---=" + OutputEF(input);
1269+
"\nsrc-----=" + OutputEF(src) + "\nstr------=" + str +
1270+
"\nexpected=" + OutputEF(expected) + "\ninput---=" + OutputEF(input);
12711271
Assert.Fail(msg);
12721272
}
12731273
}

0 commit comments

Comments
 (0)