From 053c7a344a1dc3d17e4e99bd3419fb1cf024aedc Mon Sep 17 00:00:00 2001
From: Drew Kersnar <18474647+dakersnar@users.noreply.github.com>
Date: Tue, 15 Nov 2022 16:46:28 -0600
Subject: [PATCH 01/39] Add IDecimalFloatingPointIEE754 and Decimal32
---
.../Numerics/IDecimalFloatingPointIeee754.cs | 26 +++
.../src/System/Numerics/Decimal32.cs | 163 ++++++++++++++++++
2 files changed, 189 insertions(+)
create mode 100644 src/libraries/System.Private.CoreLib/src/System/Numerics/IDecimalFloatingPointIeee754.cs
create mode 100644 src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecimalFloatingPointIeee754.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecimalFloatingPointIeee754.cs
new file mode 100644
index 00000000000000..d5295412b3d19c
--- /dev/null
+++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecimalFloatingPointIeee754.cs
@@ -0,0 +1,26 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+namespace System.Numerics
+{
+ /// Defines an IEEE 754 floating-point type that is represented in a base-10 format.
+ /// The type that implements the interface.
+ public interface IDecimalFloatingPointIeee754
+ : IFloatingPointIeee754
+ where TSelf : IDecimalFloatingPointIeee754
+ {
+ // 5.3.2
+ static abstract TSelf Quantize(TSelf x, TSelf y);
+ static abstract TSelf Quantum(TSelf x);
+
+ // 5.5.2
+ // TODO put these in BitConverter
+/* TOther EncodeDecimal(TSelf x);
+ TSelf DecodeDecimal(TOther x);
+ TOther EncodeBinary(TSelf x);
+ TSelf DecodeBinary(TOther x);*/
+
+ // 5.7.3
+ static abstract bool SameQuantum(TSelf x, TSelf y);
+ }
+}
diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
new file mode 100644
index 00000000000000..72960086aab846
--- /dev/null
+++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace System.Numerics
+{
+ [Serializable]
+ [StructLayout(LayoutKind.Sequential)]
+ public readonly struct Decimal32
+ : IComparable,
+ IComparable,
+ ISpanFormattable,
+ ISpanParsable,
+ IEquatable,
+ IConvertible,
+ IDecimalFloatingPointIeee754,
+ IMinMaxValue
+ {
+ private readonly uint _value;
+
+ public static Decimal32 Epsilon => throw new NotImplementedException();
+
+ public static Decimal32 NaN => throw new NotImplementedException();
+
+ public static Decimal32 NegativeInfinity => throw new NotImplementedException();
+
+ public static Decimal32 NegativeZero => throw new NotImplementedException();
+
+ public static Decimal32 PositiveInfinity => throw new NotImplementedException();
+
+ public static Decimal32 NegativeOne => throw new NotImplementedException();
+
+ public static Decimal32 E => throw new NotImplementedException();
+
+ public static Decimal32 Pi => throw new NotImplementedException();
+
+ public static Decimal32 Tau => throw new NotImplementedException();
+
+ public static Decimal32 One => throw new NotImplementedException();
+
+ public static int Radix => throw new NotImplementedException();
+
+ public static Decimal32 Zero => throw new NotImplementedException();
+
+ public static Decimal32 AdditiveIdentity => throw new NotImplementedException();
+
+ public static Decimal32 MultiplicativeIdentity => throw new NotImplementedException();
+
+ public static Decimal32 Abs(Decimal32 value) => throw new NotImplementedException();
+ public static Decimal32 Acos(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Acosh(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 AcosPi(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Asin(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Asinh(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 AsinPi(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Atan(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Atan2(Decimal32 y, Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Atan2Pi(Decimal32 y, Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Atanh(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 AtanPi(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 BitDecrement(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 BitIncrement(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Cbrt(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Cos(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Cosh(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 CosPi(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Exp(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Exp10(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Exp2(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 FusedMultiplyAdd(Decimal32 left, Decimal32 right, Decimal32 addend) => throw new NotImplementedException();
+ public static Decimal32 Hypot(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
+ public static Decimal32 Ieee754Remainder(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static int ILogB(Decimal32 x) => throw new NotImplementedException();
+ public static bool IsCanonical(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsComplexNumber(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsEvenInteger(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsFinite(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsImaginaryNumber(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsInfinity(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsInteger(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsNaN(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsNegative(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsNegativeInfinity(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsNormal(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsOddInteger(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsPositive(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsPositiveInfinity(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsRealNumber(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsSubnormal(Decimal32 value) => throw new NotImplementedException();
+ public static bool IsZero(Decimal32 value) => throw new NotImplementedException();
+ public static Decimal32 Log(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Log(Decimal32 x, Decimal32 newBase) => throw new NotImplementedException();
+ public static Decimal32 Log10(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Log2(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 MaxMagnitude(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
+ public static Decimal32 MaxMagnitudeNumber(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
+ public static Decimal32 MinMagnitude(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
+ public static Decimal32 MinMagnitudeNumber(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
+ public static Decimal32 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) => throw new NotImplementedException();
+ public static Decimal32 Parse(string s, NumberStyles style, IFormatProvider? provider) => throw new NotImplementedException();
+ public static Decimal32 Parse(ReadOnlySpan s, IFormatProvider? provider) => throw new NotImplementedException();
+ public static Decimal32 Parse(string s, IFormatProvider? provider) => throw new NotImplementedException();
+ public static Decimal32 Pow(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
+ public static Decimal32 Quantize(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
+ public static Decimal32 Quantum(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 RootN(Decimal32 x, int n) => throw new NotImplementedException();
+ public static Decimal32 Round(Decimal32 x, int digits, MidpointRounding mode) => throw new NotImplementedException();
+ public static bool SameQuantum(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
+ public static Decimal32 ScaleB(Decimal32 x, int n) => throw new NotImplementedException();
+ public static Decimal32 Sin(Decimal32 x) => throw new NotImplementedException();
+ public static (Decimal32 Sin, Decimal32 Cos) SinCos(Decimal32 x) => throw new NotImplementedException();
+ public static (Decimal32 SinPi, Decimal32 CosPi) SinCosPi(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Sinh(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 SinPi(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Sqrt(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Tan(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 Tanh(Decimal32 x) => throw new NotImplementedException();
+ public static Decimal32 TanPi(Decimal32 x) => throw new NotImplementedException();
+ public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
+ public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
+ public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
+ public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
+ static bool INumberBase.TryConvertFromChecked(TOther value, out Decimal32 result) => throw new NotImplementedException();
+ static bool INumberBase.TryConvertFromSaturating(TOther value, out Decimal32 result) => throw new NotImplementedException();
+ static bool INumberBase.TryConvertFromTruncating(TOther value, out Decimal32 result) => throw new NotImplementedException();
+ static bool INumberBase.TryConvertToChecked(Decimal32 value, out TOther result) => throw new NotImplementedException();
+ static bool INumberBase.TryConvertToSaturating(Decimal32 value, out TOther result) => throw new NotImplementedException();
+ static bool INumberBase.TryConvertToTruncating(Decimal32 value, out TOther result) => throw new NotImplementedException();
+ public int CompareTo(object? obj) => throw new NotImplementedException();
+ public int CompareTo(Decimal32 other) => throw new NotImplementedException();
+ public bool Equals(Decimal32 other) => throw new NotImplementedException();
+ public int GetExponentByteCount() => throw new NotImplementedException();
+ public int GetExponentShortestBitLength() => throw new NotImplementedException();
+ public int GetSignificandBitLength() => throw new NotImplementedException();
+ public int GetSignificandByteCount() => throw new NotImplementedException();
+ public string ToString(string? format, IFormatProvider? formatProvider) => throw new NotImplementedException();
+ public bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) => throw new NotImplementedException();
+ public bool TryWriteExponentBigEndian(Span destination, out int bytesWritten) => throw new NotImplementedException();
+ public bool TryWriteExponentLittleEndian(Span destination, out int bytesWritten) => throw new NotImplementedException();
+ public bool TryWriteSignificandBigEndian(Span destination, out int bytesWritten) => throw new NotImplementedException();
+ public bool TryWriteSignificandLittleEndian(Span destination, out int bytesWritten) => throw new NotImplementedException();
+
+ public static Decimal32 operator +(Decimal32 value) => throw new NotImplementedException();
+ public static Decimal32 operator +(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static Decimal32 operator -(Decimal32 value) => throw new NotImplementedException();
+ public static Decimal32 operator -(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static Decimal32 operator ++(Decimal32 value) => throw new NotImplementedException();
+ public static Decimal32 operator --(Decimal32 value) => throw new NotImplementedException();
+ public static Decimal32 operator *(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static Decimal32 operator /(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static Decimal32 operator %(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static bool operator ==(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static bool operator !=(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static bool operator <(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static bool operator >(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static bool operator <=(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ public static bool operator >=(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+ }
+}
From dcf9ca46cf539f27e8b0d1a7bc43cdf3d5f70d85 Mon Sep 17 00:00:00 2001
From: Drew Kersnar <18474647+dakersnar@users.noreply.github.com>
Date: Wed, 16 Nov 2022 12:12:27 -0600
Subject: [PATCH 02/39] fix initial Decimal32 surface, fix ref files
---
.../ref/System.Runtime.Numerics.cs | 135 +++++++++++++++++-
.../src/System/Numerics/Decimal32.cs | 31 ++--
.../System.Runtime/ref/System.Runtime.cs | 6 +
3 files changed, 162 insertions(+), 10 deletions(-)
diff --git a/src/libraries/System.Runtime.Numerics/ref/System.Runtime.Numerics.cs b/src/libraries/System.Runtime.Numerics/ref/System.Runtime.Numerics.cs
index 0d371c4d7886c6..dd63fe15427dce 100644
--- a/src/libraries/System.Runtime.Numerics/ref/System.Runtime.Numerics.cs
+++ b/src/libraries/System.Runtime.Numerics/ref/System.Runtime.Numerics.cs
@@ -194,10 +194,10 @@ namespace System.Numerics
public static System.Numerics.BigInteger RotateLeft(System.Numerics.BigInteger value, int rotateAmount) { throw null; }
public static System.Numerics.BigInteger RotateRight(System.Numerics.BigInteger value, int rotateAmount) { throw null; }
public static System.Numerics.BigInteger Subtract(System.Numerics.BigInteger left, System.Numerics.BigInteger right) { throw null; }
- static bool System.Numerics.IBinaryInteger.TryReadBigEndian(System.ReadOnlySpan source, bool isUnsigned, out System.Numerics.BigInteger value) { throw null; }
- static bool System.Numerics.IBinaryInteger.TryReadLittleEndian(System.ReadOnlySpan source, bool isUnsigned, out System.Numerics.BigInteger value) { throw null; }
int System.Numerics.IBinaryInteger.GetByteCount() { throw null; }
int System.Numerics.IBinaryInteger.GetShortestBitLength() { throw null; }
+ static bool System.Numerics.IBinaryInteger.TryReadBigEndian(System.ReadOnlySpan source, bool isUnsigned, out System.Numerics.BigInteger value) { throw null; }
+ static bool System.Numerics.IBinaryInteger.TryReadLittleEndian(System.ReadOnlySpan source, bool isUnsigned, out System.Numerics.BigInteger value) { throw null; }
bool System.Numerics.IBinaryInteger.TryWriteBigEndian(System.Span destination, out int bytesWritten) { throw null; }
bool System.Numerics.IBinaryInteger.TryWriteLittleEndian(System.Span destination, out int bytesWritten) { throw null; }
static bool System.Numerics.INumberBase.IsCanonical(System.Numerics.BigInteger value) { throw null; }
@@ -382,4 +382,135 @@ namespace System.Numerics
public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Numerics.Complex result) { throw null; }
public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.Numerics.Complex result) { throw null; }
}
+ public readonly partial struct Decimal32 : System.IComparable, System.IComparable, System.IEquatable, System.IFormattable, System.IParsable, System.ISpanFormattable, System.ISpanParsable, System.Numerics.IAdditionOperators, System.Numerics.IAdditiveIdentity, System.Numerics.IComparisonOperators, System.Numerics.IDecimalFloatingPointIeee754, System.Numerics.IDecrementOperators, System.Numerics.IDivisionOperators, System.Numerics.IEqualityOperators, System.Numerics.IExponentialFunctions, System.Numerics.IFloatingPoint, System.Numerics.IFloatingPointConstants, System.Numerics.IFloatingPointIeee754, System.Numerics.IHyperbolicFunctions, System.Numerics.IIncrementOperators, System.Numerics.ILogarithmicFunctions, System.Numerics.IMinMaxValue, System.Numerics.IModulusOperators, System.Numerics.IMultiplicativeIdentity, System.Numerics.IMultiplyOperators, System.Numerics.INumber, System.Numerics.INumberBase, System.Numerics.IPowerFunctions, System.Numerics.IRootFunctions, System.Numerics.ISignedNumber, System.Numerics.ISubtractionOperators, System.Numerics.ITrigonometricFunctions, System.Numerics.IUnaryNegationOperators, System.Numerics.IUnaryPlusOperators
+ {
+ private readonly int _dummyPrimitive;
+ public static System.Numerics.Decimal32 AdditiveIdentity { get { throw null; } }
+ public static System.Numerics.Decimal32 E { get { throw null; } }
+ public static System.Numerics.Decimal32 Epsilon { get { throw null; } }
+ public static System.Numerics.Decimal32 MaxValue { get { throw null; } }
+ public static System.Numerics.Decimal32 MinValue { get { throw null; } }
+ public static System.Numerics.Decimal32 MultiplicativeIdentity { get { throw null; } }
+ public static System.Numerics.Decimal32 NaN { get { throw null; } }
+ public static System.Numerics.Decimal32 NegativeInfinity { get { throw null; } }
+ public static System.Numerics.Decimal32 NegativeOne { get { throw null; } }
+ public static System.Numerics.Decimal32 NegativeZero { get { throw null; } }
+ public static System.Numerics.Decimal32 One { get { throw null; } }
+ public static System.Numerics.Decimal32 Pi { get { throw null; } }
+ public static System.Numerics.Decimal32 PositiveInfinity { get { throw null; } }
+ public static int Radix { get { throw null; } }
+ public static System.Numerics.Decimal32 Tau { get { throw null; } }
+ public static System.Numerics.Decimal32 Zero { get { throw null; } }
+ public static System.Numerics.Decimal32 Abs(System.Numerics.Decimal32 value) { throw null; }
+ public static System.Numerics.Decimal32 Acos(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Acosh(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 AcosPi(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Asin(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Asinh(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 AsinPi(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Atan(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Atan2(System.Numerics.Decimal32 y, System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Atan2Pi(System.Numerics.Decimal32 y, System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Atanh(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 AtanPi(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 BitDecrement(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 BitIncrement(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Cbrt(System.Numerics.Decimal32 x) { throw null; }
+ public int CompareTo(System.Numerics.Decimal32 other) { throw null; }
+ public int CompareTo(object? obj) { throw null; }
+ public static System.Numerics.Decimal32 Cos(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Cosh(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 CosPi(System.Numerics.Decimal32 x) { throw null; }
+ public bool Equals(System.Numerics.Decimal32 other) { throw null; }
+ public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+ public static System.Numerics.Decimal32 Exp(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Exp10(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Exp2(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 FusedMultiplyAdd(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right, System.Numerics.Decimal32 addend) { throw null; }
+ public int GetExponentByteCount() { throw null; }
+ public int GetExponentShortestBitLength() { throw null; }
+ public override int GetHashCode() { throw null; }
+ public int GetSignificandBitLength() { throw null; }
+ public int GetSignificandByteCount() { throw null; }
+ public System.TypeCode GetTypeCode() { throw null; }
+ public static System.Numerics.Decimal32 Hypot(System.Numerics.Decimal32 x, System.Numerics.Decimal32 y) { throw null; }
+ public static System.Numerics.Decimal32 Ieee754Remainder(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static int ILogB(System.Numerics.Decimal32 x) { throw null; }
+ public static bool IsCanonical(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsComplexNumber(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsEvenInteger(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsFinite(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsImaginaryNumber(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsInfinity(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsInteger(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsNaN(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsNegative(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsNegativeInfinity(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsNormal(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsOddInteger(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsPositive(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsPositiveInfinity(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsRealNumber(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsSubnormal(System.Numerics.Decimal32 value) { throw null; }
+ public static bool IsZero(System.Numerics.Decimal32 value) { throw null; }
+ public static System.Numerics.Decimal32 Log(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Log(System.Numerics.Decimal32 x, System.Numerics.Decimal32 newBase) { throw null; }
+ public static System.Numerics.Decimal32 Log10(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Log2(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 MaxMagnitude(System.Numerics.Decimal32 x, System.Numerics.Decimal32 y) { throw null; }
+ public static System.Numerics.Decimal32 MaxMagnitudeNumber(System.Numerics.Decimal32 x, System.Numerics.Decimal32 y) { throw null; }
+ public static System.Numerics.Decimal32 MinMagnitude(System.Numerics.Decimal32 x, System.Numerics.Decimal32 y) { throw null; }
+ public static System.Numerics.Decimal32 MinMagnitudeNumber(System.Numerics.Decimal32 x, System.Numerics.Decimal32 y) { throw null; }
+ public static System.Numerics.Decimal32 operator +(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static System.Numerics.Decimal32 operator --(System.Numerics.Decimal32 value) { throw null; }
+ public static System.Numerics.Decimal32 operator /(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static bool operator ==(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static bool operator >(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static bool operator >=(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static System.Numerics.Decimal32 operator ++(System.Numerics.Decimal32 value) { throw null; }
+ public static bool operator !=(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static bool operator <(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static bool operator <=(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static System.Numerics.Decimal32 operator %(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static System.Numerics.Decimal32 operator *(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static System.Numerics.Decimal32 operator -(System.Numerics.Decimal32 left, System.Numerics.Decimal32 right) { throw null; }
+ public static System.Numerics.Decimal32 operator -(System.Numerics.Decimal32 value) { throw null; }
+ public static System.Numerics.Decimal32 operator +(System.Numerics.Decimal32 value) { throw null; }
+ public static System.Numerics.Decimal32 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; }
+ public static System.Numerics.Decimal32 Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; }
+ public static System.Numerics.Decimal32 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; }
+ public static System.Numerics.Decimal32 Parse(string s, System.IFormatProvider? provider) { throw null; }
+ public static System.Numerics.Decimal32 Pow(System.Numerics.Decimal32 x, System.Numerics.Decimal32 y) { throw null; }
+ public static System.Numerics.Decimal32 Quantize(System.Numerics.Decimal32 x, System.Numerics.Decimal32 y) { throw null; }
+ public static System.Numerics.Decimal32 Quantum(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 RootN(System.Numerics.Decimal32 x, int n) { throw null; }
+ public static System.Numerics.Decimal32 Round(System.Numerics.Decimal32 x, int digits, System.MidpointRounding mode) { throw null; }
+ public static bool SameQuantum(System.Numerics.Decimal32 x, System.Numerics.Decimal32 y) { throw null; }
+ public static System.Numerics.Decimal32 ScaleB(System.Numerics.Decimal32 x, int n) { throw null; }
+ public static System.Numerics.Decimal32 Sin(System.Numerics.Decimal32 x) { throw null; }
+ public static (System.Numerics.Decimal32 Sin, System.Numerics.Decimal32 Cos) SinCos(System.Numerics.Decimal32 x) { throw null; }
+ public static (System.Numerics.Decimal32 SinPi, System.Numerics.Decimal32 CosPi) SinCosPi(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Sinh(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 SinPi(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Sqrt(System.Numerics.Decimal32 x) { throw null; }
+ static bool System.Numerics.INumberBase.TryConvertFromChecked(TOther value, out System.Numerics.Decimal32 result) { throw null; }
+ static bool System.Numerics.INumberBase.TryConvertFromSaturating(TOther value, out System.Numerics.Decimal32 result) { throw null; }
+ static bool System.Numerics.INumberBase.TryConvertFromTruncating(TOther value, out System.Numerics.Decimal32 result) { throw null; }
+ static bool System.Numerics.INumberBase.TryConvertToChecked(System.Numerics.Decimal32 value, out TOther result) { throw null; }
+ static bool System.Numerics.INumberBase.TryConvertToSaturating(System.Numerics.Decimal32 value, out TOther result) { throw null; }
+ static bool System.Numerics.INumberBase.TryConvertToTruncating(System.Numerics.Decimal32 value, out TOther result) { throw null; }
+ public static System.Numerics.Decimal32 Tan(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 Tanh(System.Numerics.Decimal32 x) { throw null; }
+ public static System.Numerics.Decimal32 TanPi(System.Numerics.Decimal32 x) { throw null; }
+ public string ToString(string? format, System.IFormatProvider? formatProvider) { throw null; }
+ public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format, System.IFormatProvider? provider) { throw null; }
+ public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out System.Numerics.Decimal32 result) { throw null; }
+ public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out System.Numerics.Decimal32 result) { throw null; }
+ public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out System.Numerics.Decimal32 result) { throw null; }
+ public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out System.Numerics.Decimal32 result) { throw null; }
+ public bool TryWriteExponentBigEndian(System.Span destination, out int bytesWritten) { throw null; }
+ public bool TryWriteExponentLittleEndian(System.Span destination, out int bytesWritten) { throw null; }
+ public bool TryWriteSignificandBigEndian(System.Span destination, out int bytesWritten) { throw null; }
+ public bool TryWriteSignificandLittleEndian(System.Span destination, out int bytesWritten) { throw null; }
+ }
}
diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
index 72960086aab846..7ba8971da6585d 100644
--- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
+++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
@@ -14,14 +14,17 @@ public readonly struct Decimal32
: IComparable,
IComparable,
ISpanFormattable,
- ISpanParsable,
+ ISpanParsable,
IEquatable,
- IConvertible,
IDecimalFloatingPointIeee754,
IMinMaxValue
{
private readonly uint _value;
+ public static Decimal32 MaxValue => throw new NotImplementedException();
+
+ public static Decimal32 MinValue => throw new NotImplementedException();
+
public static Decimal32 Epsilon => throw new NotImplementedException();
public static Decimal32 NaN => throw new NotImplementedException();
@@ -100,10 +103,10 @@ public readonly struct Decimal32
public static Decimal32 MaxMagnitudeNumber(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
public static Decimal32 MinMagnitude(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
public static Decimal32 MinMagnitudeNumber(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
- public static Decimal32 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) => throw new NotImplementedException();
- public static Decimal32 Parse(string s, NumberStyles style, IFormatProvider? provider) => throw new NotImplementedException();
public static Decimal32 Parse(ReadOnlySpan s, IFormatProvider? provider) => throw new NotImplementedException();
public static Decimal32 Parse(string s, IFormatProvider? provider) => throw new NotImplementedException();
+ public static Decimal32 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) => throw new NotImplementedException();
+ public static Decimal32 Parse(string s, NumberStyles style, IFormatProvider? provider) => throw new NotImplementedException();
public static Decimal32 Pow(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
public static Decimal32 Quantize(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
public static Decimal32 Quantum(Decimal32 x) => throw new NotImplementedException();
@@ -120,24 +123,24 @@ public readonly struct Decimal32
public static Decimal32 Tan(Decimal32 x) => throw new NotImplementedException();
public static Decimal32 Tanh(Decimal32 x) => throw new NotImplementedException();
public static Decimal32 TanPi(Decimal32 x) => throw new NotImplementedException();
- public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
- public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
+ public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
+ public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
static bool INumberBase.TryConvertFromChecked(TOther value, out Decimal32 result) => throw new NotImplementedException();
static bool INumberBase.TryConvertFromSaturating(TOther value, out Decimal32 result) => throw new NotImplementedException();
static bool INumberBase.TryConvertFromTruncating(TOther value, out Decimal32 result) => throw new NotImplementedException();
static bool INumberBase.TryConvertToChecked(Decimal32 value, out TOther result) => throw new NotImplementedException();
static bool INumberBase.TryConvertToSaturating(Decimal32 value, out TOther result) => throw new NotImplementedException();
static bool INumberBase.TryConvertToTruncating(Decimal32 value, out TOther result) => throw new NotImplementedException();
- public int CompareTo(object? obj) => throw new NotImplementedException();
public int CompareTo(Decimal32 other) => throw new NotImplementedException();
+ public int CompareTo(object? obj) => throw new NotImplementedException();
public bool Equals(Decimal32 other) => throw new NotImplementedException();
public int GetExponentByteCount() => throw new NotImplementedException();
public int GetExponentShortestBitLength() => throw new NotImplementedException();
public int GetSignificandBitLength() => throw new NotImplementedException();
public int GetSignificandByteCount() => throw new NotImplementedException();
- public string ToString(string? format, IFormatProvider? formatProvider) => throw new NotImplementedException();
+ public TypeCode GetTypeCode() => throw new NotImplementedException();
public bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) => throw new NotImplementedException();
public bool TryWriteExponentBigEndian(Span destination, out int bytesWritten) => throw new NotImplementedException();
public bool TryWriteExponentLittleEndian(Span destination, out int bytesWritten) => throw new NotImplementedException();
@@ -159,5 +162,17 @@ public readonly struct Decimal32
public static bool operator >(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
public static bool operator <=(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
public static bool operator >=(Decimal32 left, Decimal32 right) => throw new NotImplementedException();
+
+ public override bool Equals([NotNullWhen(true)] object? obj)
+ {
+ return obj is Decimal32 && Equals((Decimal32)obj);
+ }
+
+ public override int GetHashCode()
+ {
+ throw new NotImplementedException();
+ }
+
+ public string ToString(string? format, IFormatProvider? formatProvider) => throw new NotImplementedException();
}
}
diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs
index c26b436f41097a..592f9a53db7f32 100644
--- a/src/libraries/System.Runtime/ref/System.Runtime.cs
+++ b/src/libraries/System.Runtime/ref/System.Runtime.cs
@@ -10288,6 +10288,12 @@ public partial interface IComparisonOperators : System.N
static abstract TResult operator <(TSelf left, TOther right);
static abstract TResult operator <=(TSelf left, TOther right);
}
+ public partial interface IDecimalFloatingPointIeee754 : System.IComparable, System.IComparable, System.IEquatable, System.IFormattable, System.IParsable, System.ISpanFormattable, System.ISpanParsable, System.Numerics.IAdditionOperators, System.Numerics.IAdditiveIdentity, System.Numerics.IComparisonOperators, System.Numerics.IDecrementOperators, System.Numerics.IDivisionOperators, System.Numerics.IEqualityOperators, System.Numerics.IExponentialFunctions, System.Numerics.IFloatingPoint, System.Numerics.IFloatingPointConstants, System.Numerics.IFloatingPointIeee754, System.Numerics.IHyperbolicFunctions, System.Numerics.IIncrementOperators, System.Numerics.ILogarithmicFunctions, System.Numerics.IModulusOperators, System.Numerics.IMultiplicativeIdentity, System.Numerics.IMultiplyOperators, System.Numerics.INumber, System.Numerics.INumberBase, System.Numerics.IPowerFunctions, System.Numerics.IRootFunctions, System.Numerics.ISignedNumber, System.Numerics.ISubtractionOperators, System.Numerics.ITrigonometricFunctions, System.Numerics.IUnaryNegationOperators, System.Numerics.IUnaryPlusOperators where TSelf : System.Numerics.IDecimalFloatingPointIeee754
+ {
+ static abstract TSelf Quantize(TSelf x, TSelf y);
+ static abstract TSelf Quantum(TSelf x);
+ static abstract bool SameQuantum(TSelf x, TSelf y);
+ }
public partial interface IDecrementOperators where TSelf : System.Numerics.IDecrementOperators?
{
static virtual TSelf operator checked --(TSelf value) { throw null; }
From 543bf3d4577680a80ee9c7e6fd959d4a74e513f4 Mon Sep 17 00:00:00 2001
From: Drew Kersnar <18474647+dakersnar@users.noreply.github.com>
Date: Wed, 16 Nov 2022 12:14:45 -0600
Subject: [PATCH 03/39] Automatic updates to sln and projitems files
---
.../System.Private.CoreLib.sln | 11 +-
.../System.Private.CoreLib.Shared.projitems | 7 +-
.../src/System.Runtime.Numerics.csproj | 10 +-
.../System.Runtime/System.Runtime.sln | 221 +++++++++---------
4 files changed, 127 insertions(+), 122 deletions(-)
diff --git a/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.sln b/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.sln
index 66c65e680d4693..a0a5851a6ffd71 100644
--- a/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.sln
+++ b/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.28902.138
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.32818.431
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "System.Private.CoreLib.csproj", "{3DA06C3A-2E7B-4CB7-80ED-9B12916013F9}"
EndProject
@@ -9,10 +9,6 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\..\libraries\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{7196828B-5E00-4BC6-9A1E-492C948E41A3}"
EndProject
Global
- GlobalSection(SharedMSBuildProjectFiles) = preSolution
- ..\..\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{3da06c3a-2e7b-4cb7-80ed-9b12916013f9}*SharedItemsImports = 5
- ..\..\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{845c8b26-350b-4e63-bd11-2c8150444e28}*SharedItemsImports = 13
- EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Checked|amd64 = Checked|amd64
Checked|Any CPU = Checked|Any CPU
@@ -95,4 +91,7 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DA05075A-7CDA-4F65-AF6A-CB5DB6CF936F}
EndGlobalSection
+ GlobalSection(SharedMSBuildProjectFiles) = preSolution
+ ..\..\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{845c8b26-350b-4e63-bd11-2c8150444e28}*SharedItemsImports = 13
+ EndGlobalSection
EndGlobal
diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
index b368c8675292c0..c032a8259e687d 100644
--- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
+++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
@@ -1278,13 +1278,13 @@
Common\System\SR.cs
- System\Collections\Concurrent\IProducerConsumerQueue.cs
+ System\Collections\Concurrent\IProducerConsumerQueue.cs
- System\Collections\Concurrent\MultiProducerMultiConsumerQueue.cs
+ System\Collections\Concurrent\MultiProducerMultiConsumerQueue.cs
- System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs
+ System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs
Common\System\Collections\Generic\EnumerableHelpers.cs
@@ -2479,6 +2479,7 @@
+
diff --git a/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj b/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj
index 7634a2ce9d800b..23f147615ff226 100644
--- a/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj
+++ b/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj
@@ -5,6 +5,7 @@
$(NetCoreAppCurrent)
+
@@ -22,12 +23,9 @@
-
-
-
+
+
+
diff --git a/src/libraries/System.Runtime/System.Runtime.sln b/src/libraries/System.Runtime/System.Runtime.sln
index 728d9bfa0e103d..9c4f81e5043a03 100644
--- a/src/libraries/System.Runtime/System.Runtime.sln
+++ b/src/libraries/System.Runtime/System.Runtime.sln
@@ -1,4 +1,8 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.32818.431
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\..\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj", "{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities.Unicode", "..\Common\tests\TestUtilities.Unicode\TestUtilities.Unicode.csproj", "{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}"
@@ -67,17 +71,23 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{F362E63A-2B1
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Checked|Any CPU = Checked|Any CPU
+ Checked|x64 = Checked|x64
+ Checked|x86 = Checked|x86
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
- Checked|Any CPU = Checked|Any CPU
- Checked|x64 = Checked|x64
- Checked|x86 = Checked|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.ActiveCfg = Checked|x64
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.Build.0 = Checked|x64
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.ActiveCfg = Checked|x64
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.Build.0 = Checked|x64
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.ActiveCfg = Checked|x86
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.Build.0 = Checked|x86
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|Any CPU.ActiveCfg = Debug|x64
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|Any CPU.Build.0 = Debug|x64
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|x64.ActiveCfg = Debug|x64
@@ -90,12 +100,9 @@ Global
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x64.Build.0 = Release|x64
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x86.ActiveCfg = Release|x86
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x86.Build.0 = Release|x86
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.ActiveCfg = Checked|x64
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.Build.0 = Checked|x64
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.ActiveCfg = Checked|x64
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.Build.0 = Checked|x64
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.ActiveCfg = Checked|x86
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.Build.0 = Checked|x86
+ {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|x86.ActiveCfg = Debug|Any CPU
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -108,9 +115,9 @@ Global
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Release|x64.Build.0 = Release|Any CPU
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Release|x86.ActiveCfg = Release|Any CPU
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Release|x86.Build.0 = Release|Any CPU
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {FB17AC52-1633-4845-932B-9218DF895957}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {FB17AC52-1633-4845-932B-9218DF895957}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {FB17AC52-1633-4845-932B-9218DF895957}.Checked|x86.ActiveCfg = Debug|Any CPU
{FB17AC52-1633-4845-932B-9218DF895957}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FB17AC52-1633-4845-932B-9218DF895957}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB17AC52-1633-4845-932B-9218DF895957}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,9 +130,9 @@ Global
{FB17AC52-1633-4845-932B-9218DF895957}.Release|x64.Build.0 = Release|Any CPU
{FB17AC52-1633-4845-932B-9218DF895957}.Release|x86.ActiveCfg = Release|Any CPU
{FB17AC52-1633-4845-932B-9218DF895957}.Release|x86.Build.0 = Release|Any CPU
- {FB17AC52-1633-4845-932B-9218DF895957}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FB17AC52-1633-4845-932B-9218DF895957}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FB17AC52-1633-4845-932B-9218DF895957}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|x86.ActiveCfg = Debug|Any CPU
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -138,9 +145,9 @@ Global
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Release|x64.Build.0 = Release|Any CPU
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Release|x86.ActiveCfg = Release|Any CPU
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Release|x86.Build.0 = Release|Any CPU
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|x86.ActiveCfg = Debug|Any CPU
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -153,9 +160,9 @@ Global
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Release|x64.Build.0 = Release|Any CPU
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Release|x86.ActiveCfg = Release|Any CPU
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Release|x86.Build.0 = Release|Any CPU
- {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|x86.ActiveCfg = Debug|Any CPU
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -168,9 +175,9 @@ Global
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Release|x64.Build.0 = Release|Any CPU
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Release|x86.ActiveCfg = Release|Any CPU
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Release|x86.Build.0 = Release|Any CPU
- {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|x86.ActiveCfg = Debug|Any CPU
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -183,9 +190,9 @@ Global
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Release|x64.Build.0 = Release|Any CPU
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Release|x86.ActiveCfg = Release|Any CPU
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Release|x86.Build.0 = Release|Any CPU
- {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|x86.ActiveCfg = Debug|Any CPU
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -198,9 +205,9 @@ Global
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Release|x64.Build.0 = Release|Any CPU
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Release|x86.ActiveCfg = Release|Any CPU
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Release|x86.Build.0 = Release|Any CPU
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Checked|x86.ActiveCfg = Debug|Any CPU
{E64D31D0-8F38-4FDF-B60D-F955D2475566}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E64D31D0-8F38-4FDF-B60D-F955D2475566}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E64D31D0-8F38-4FDF-B60D-F955D2475566}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -213,9 +220,9 @@ Global
{E64D31D0-8F38-4FDF-B60D-F955D2475566}.Release|x64.Build.0 = Release|Any CPU
{E64D31D0-8F38-4FDF-B60D-F955D2475566}.Release|x86.ActiveCfg = Release|Any CPU
{E64D31D0-8F38-4FDF-B60D-F955D2475566}.Release|x86.Build.0 = Release|Any CPU
- {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|x86.ActiveCfg = Debug|Any CPU
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -228,9 +235,9 @@ Global
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Release|x64.Build.0 = Release|Any CPU
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Release|x86.ActiveCfg = Release|Any CPU
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Release|x86.Build.0 = Release|Any CPU
- {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|x86.ActiveCfg = Debug|Any CPU
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -243,9 +250,9 @@ Global
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Release|x64.Build.0 = Release|Any CPU
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Release|x86.ActiveCfg = Release|Any CPU
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Release|x86.Build.0 = Release|Any CPU
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|x86.ActiveCfg = Debug|Any CPU
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -258,9 +265,9 @@ Global
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Release|x64.Build.0 = Release|Any CPU
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Release|x86.ActiveCfg = Release|Any CPU
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Release|x86.Build.0 = Release|Any CPU
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x86.ActiveCfg = Debug|Any CPU
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -273,9 +280,9 @@ Global
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x64.Build.0 = Release|Any CPU
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x86.ActiveCfg = Release|Any CPU
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x86.Build.0 = Release|Any CPU
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x86.ActiveCfg = Debug|Any CPU
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -288,9 +295,9 @@ Global
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x64.Build.0 = Release|Any CPU
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x86.ActiveCfg = Release|Any CPU
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x86.Build.0 = Release|Any CPU
- {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x86.ActiveCfg = Debug|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -303,9 +310,9 @@ Global
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Release|x64.Build.0 = Release|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Release|x86.ActiveCfg = Release|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Release|x86.Build.0 = Release|Any CPU
- {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x86.ActiveCfg = Debug|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -318,9 +325,9 @@ Global
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x64.Build.0 = Release|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x86.ActiveCfg = Release|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x86.Build.0 = Release|Any CPU
- {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x86.ActiveCfg = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -333,9 +340,9 @@ Global
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|x64.Build.0 = Release|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|x86.ActiveCfg = Release|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|x86.Build.0 = Release|Any CPU
- {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x86.ActiveCfg = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -348,9 +355,9 @@ Global
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|x64.Build.0 = Release|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|x86.ActiveCfg = Release|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|x86.Build.0 = Release|Any CPU
- {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x64.ActiveCfg = Debug|Any CPU
- {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x86.ActiveCfg = Debug|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -363,9 +370,9 @@ Global
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Release|x64.Build.0 = Release|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Release|x86.ActiveCfg = Release|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Release|x86.Build.0 = Release|Any CPU
- {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|x86.ActiveCfg = Debug|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -378,9 +385,9 @@ Global
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Release|x64.Build.0 = Release|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Release|x86.ActiveCfg = Release|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Release|x86.Build.0 = Release|Any CPU
- {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|x86.ActiveCfg = Debug|Any CPU
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -393,9 +400,9 @@ Global
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Release|x64.Build.0 = Release|Any CPU
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Release|x86.ActiveCfg = Release|Any CPU
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Release|x86.Build.0 = Release|Any CPU
- {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|x86.ActiveCfg = Debug|Any CPU
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -408,9 +415,9 @@ Global
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Release|x64.Build.0 = Release|Any CPU
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Release|x86.ActiveCfg = Release|Any CPU
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Release|x86.Build.0 = Release|Any CPU
- {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|x86.ActiveCfg = Debug|Any CPU
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -423,9 +430,9 @@ Global
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Release|x64.Build.0 = Release|Any CPU
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Release|x86.ActiveCfg = Release|Any CPU
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Release|x86.Build.0 = Release|Any CPU
- {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|x86.ActiveCfg = Debug|Any CPU
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -438,9 +445,9 @@ Global
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Release|x64.Build.0 = Release|Any CPU
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Release|x86.ActiveCfg = Release|Any CPU
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Release|x86.Build.0 = Release|Any CPU
- {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|x86.ActiveCfg = Debug|Any CPU
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -453,9 +460,9 @@ Global
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|x64.Build.0 = Release|Any CPU
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|x86.ActiveCfg = Release|Any CPU
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|x86.Build.0 = Release|Any CPU
- {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|x86.ActiveCfg = Debug|Any CPU
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -468,9 +475,9 @@ Global
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Release|x64.Build.0 = Release|Any CPU
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Release|x86.ActiveCfg = Release|Any CPU
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Release|x86.Build.0 = Release|Any CPU
- {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|x64.ActiveCfg = Debug|Any CPU
- {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|x86.ActiveCfg = Debug|Any CPU
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -483,9 +490,9 @@ Global
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Release|x64.Build.0 = Release|Any CPU
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Release|x86.ActiveCfg = Release|Any CPU
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Release|x86.Build.0 = Release|Any CPU
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {82728202-1098-4E16-B598-5762EAF67D08}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {82728202-1098-4E16-B598-5762EAF67D08}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {82728202-1098-4E16-B598-5762EAF67D08}.Checked|x86.ActiveCfg = Debug|Any CPU
{82728202-1098-4E16-B598-5762EAF67D08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82728202-1098-4E16-B598-5762EAF67D08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82728202-1098-4E16-B598-5762EAF67D08}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -498,9 +505,9 @@ Global
{82728202-1098-4E16-B598-5762EAF67D08}.Release|x64.Build.0 = Release|Any CPU
{82728202-1098-4E16-B598-5762EAF67D08}.Release|x86.ActiveCfg = Release|Any CPU
{82728202-1098-4E16-B598-5762EAF67D08}.Release|x86.Build.0 = Release|Any CPU
- {82728202-1098-4E16-B598-5762EAF67D08}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {82728202-1098-4E16-B598-5762EAF67D08}.Checked|x64.ActiveCfg = Debug|Any CPU
- {82728202-1098-4E16-B598-5762EAF67D08}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|x86.ActiveCfg = Debug|Any CPU
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -513,24 +520,25 @@ Global
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Release|x64.Build.0 = Release|Any CPU
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Release|x86.ActiveCfg = Release|Any CPU
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Release|x86.Build.0 = Release|Any CPU
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|x64.ActiveCfg = Debug|Any CPU
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|x86.ActiveCfg = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9} = {28140562-A65A-48E9-ABAB-53BA939084F0}
+ {9DF0247E-5B81-4EF3-82CA-3E70B3A56742} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
+ {FB17AC52-1633-4845-932B-9218DF895957} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
+ {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD} = {28140562-A65A-48E9-ABAB-53BA939084F0}
+ {9C41B325-1225-43CA-9436-549AFF6D90A1} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B} = {28140562-A65A-48E9-ABAB-53BA939084F0}
+ {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC} = {28140562-A65A-48E9-ABAB-53BA939084F0}
+ {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
+ {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
+ {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{A83A8520-F5E2-49B4-83BC-0F82A412951D} = {28140562-A65A-48E9-ABAB-53BA939084F0}
- {F6A8185B-07C6-401D-9B40-3C560239E05F} = {28140562-A65A-48E9-ABAB-53BA939084F0}
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13} = {28140562-A65A-48E9-ABAB-53BA939084F0}
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA} = {28140562-A65A-48E9-ABAB-53BA939084F0}
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
- {FB17AC52-1633-4845-932B-9218DF895957} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{4EE36055-AD7C-4779-B3F6-08687960DCC3} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{C3F25EEF-04B4-407A-960B-0C1CE9C04430} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
@@ -539,19 +547,18 @@ Global
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
- {9C41B325-1225-43CA-9436-549AFF6D90A1} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
- {E64D31D0-8F38-4FDF-B60D-F955D2475566} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
+ {F6A8185B-07C6-401D-9B40-3C560239E05F} = {28140562-A65A-48E9-ABAB-53BA939084F0}
+ {EC777939-BE30-4ED9-9FE1-451DD7472467} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
{25E8AB9D-2D10-44F5-9F83-5A5134526771} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
+ {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13} = {28140562-A65A-48E9-ABAB-53BA939084F0}
{82728202-1098-4E16-B598-5762EAF67D08} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
- {EC777939-BE30-4ED9-9FE1-451DD7472467} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
+ {069C2B51-069A-4FBB-BFE9-42D573F1CEEA} = {28140562-A65A-48E9-ABAB-53BA939084F0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {19706846-1F47-42ED-B649-B0982EE96E6B}
EndGlobalSection
+ GlobalSection(SharedMSBuildProjectFiles) = preSolution
+ ..\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{71ab8240-f179-4b21-a8be-8be6cd774ed9}*SharedItemsImports = 5
+ EndGlobalSection
EndGlobal
From 19c046315e8a5a719dabc4f2c5061b8e4bac356f Mon Sep 17 00:00:00 2001
From: Drew Kersnar <18474647+dakersnar@users.noreply.github.com>
Date: Fri, 9 Dec 2022 17:20:14 -0600
Subject: [PATCH 04/39] Making progress
---
.../src/System/Numerics/Decimal32.cs | 214 ++++++++++++++++--
1 file changed, 195 insertions(+), 19 deletions(-)
diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
index 7ba8971da6585d..30aeddb18ab657 100644
--- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
+++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
@@ -8,7 +8,10 @@
namespace System.Numerics
{
- [Serializable]
+ ///
+ /// An IEEE 754 compliant float16 type.
+ ///
+ [Serializable] // TODO do we need this? Half doesn't have it, Single does.
[StructLayout(LayoutKind.Sequential)]
public readonly struct Decimal32
: IComparable,
@@ -19,23 +22,152 @@ public readonly struct Decimal32
IDecimalFloatingPointIeee754,
IMinMaxValue
{
- private readonly uint _value;
+ // Constants for manipulating the private bit-representation
+ // TODO I think adding masks that help us "triage" the type of encoding will be useful.
- public static Decimal32 MaxValue => throw new NotImplementedException();
+ internal const uint SignMask = 0x8000_0000;
+ internal const int SignShift = 31;
- public static Decimal32 MinValue => throw new NotImplementedException();
+ internal const uint CombinationMask = 0x7FF0_0000;
+ internal const int CombinationShift = 20;
- public static Decimal32 Epsilon => throw new NotImplementedException();
+ // TODO figure out if these three are useful, I don't think they are
+ internal const uint NaNMask = 0x7C00_0000;
+ internal const uint InfinityMask = 0x7800_0000;
+ internal const uint TrailingSignificandMask = 0x000F_FFFF;
- public static Decimal32 NaN => throw new NotImplementedException();
+ // TODO I think these might be useless in Decimal
+/* internal const ushort MinCombination = 0x0000;
+ internal const ushort MaxCombination = 0x07FF;*/
- public static Decimal32 NegativeInfinity => throw new NotImplementedException();
+ internal const sbyte EMax = 96;
+ internal const sbyte EMin = -95;
- public static Decimal32 NegativeZero => throw new NotImplementedException();
+ internal const byte Precision = 7;
+ internal const byte ExponentBias = 101;
- public static Decimal32 PositiveInfinity => throw new NotImplementedException();
+ internal const sbyte MaxQExponent = EMax - Precision + 1;
+ internal const sbyte MinQExponent = EMin - Precision + 1;
- public static Decimal32 NegativeOne => throw new NotImplementedException();
+ // TODO I think these might be useless in Decimal
+ /* internal const uint MinTrailingSignificand = 0x0000_0000;
+ internal const uint MaxTrailingSignificand = 0x000F_FFFF; // TODO double check this, might be artificially bounded below this*/
+
+ // Constants representing the private bit-representation for various default values.
+ // See either IEEE-754 2019 section 3.5 or https://en.wikipedia.org/wiki/Decimal32_floating-point_format for a breakdown of the encoding.
+
+ // PositiveZero Bits
+ // Hex: 0x0000_0000
+ // Binary: 0000_0000_0000_0000_0000_0000_0000_0000
+ // Split into sections: 0 | 000_0000_0 | 000_0000_0000_0000_0000_0000
+ // 0 | 0000_0000 | 000_0000_0000_0000_0000_0000
+ // Section labels: a | b | c
+ //
+ // a. Sign bit.
+ // b. Biased Exponent, which is q + 101. 0000_0000 == 0 == -101 + 101, so this is encoding a q of -101.
+ // c. Significand, set to 0.
+ //
+ // Encoded value: 0 x 10^-101
+
+ private const uint PositiveZeroBits = 0x0000_0000;
+ private const uint NegativeZeroBits = SignMask | PositiveZeroBits;
+
+
+ // Epsilon Bits
+ // Hex: 0x0000_0001
+ // Binary: 0000_0000_0000_0000_0000_0000_0000_0001
+ // Split into sections: 0 | 000_0000_0 | 000_0000_0000_0000_0000_0001
+ // 0 | 0000_0000 | 000_0000_0000_0000_0000_0001
+ // Section labels: a | b | c
+ //
+ // a. Sign bit.
+ // b. Biased Exponent, which is q + 101. 0000_0000 == 0 == -101 + 101, so this is encoding a q of -101.
+ // c. Significand, set to 1.
+ //
+ // Encoded value: 1 x 10^-101
+
+ private const uint EpsilonBits = 0x0000_0001;
+
+ // PositiveInfinityBits
+ // Hex: 0x7800_0000
+ // Binary: 0111_1000_0000_0000_0000_0000_0000_0000
+ // Split into sections: 0 | 111_1000_0000 | 0000_0000_0000_0000_0000
+ // Section labels: a | b | c
+ //
+ // a. Sign bit.
+ // b. Combination field G0 through G10. G0-G4 == 11110 encodes infinity.
+ // c. Trailing significand.
+ // Note: Canonical infinity has everything after G5 set to 0.
+ private const uint PositiveInfinityBits = 0x7800_0000;
+ private const uint NegativeInfinityBits = SignMask | PositiveInfinityBits;
+
+
+ // QNanBits
+ // Hex: 0x7C00_0000
+ // Binary: 0111_1100_0000_0000_0000_0000_0000_0000
+ // Split into sections: 0 | 111_1100_0000 | 0000_0000_0000_0000_0000
+ // Section labels: a | b | c
+ //
+ // a. Sign bit (ignored for NaN).
+ // b. Combination field G0 through G10. G0-G4 == 11111 encodes NaN.
+ // c. Trailing significand. Can be used to encode a payload, to distinguish different NaNs.
+ // Note: Canonical NaN has G6-G10 as 0 and the encoding of the payload also canonical.
+ private const uint QNanBits = 0x7C00_0000; // TODO I used a "positive" NaN here, should it be negative?
+ private const uint SNanBits = 0x7E00_0000;
+
+
+ // MaxValueBits
+ // Hex: 0x77F8_967F
+ // Binary: 0111_0111_1111_1000_1001_0110_0111_1111
+ // Split into sections: 0 | 11 | 1_0111_111 | 1_1000_1001_0110_0111_1111
+ // 0 | 11 | 1011_1111 | [100]1_1000_1001_0110_0111_1111
+ // Section labels: a | b | c | d
+ //
+ // a. Sign bit.
+ // b. G0 and G1 of the combination field, "11" indicates this version of encoding.
+ // c. Biased Exponent, which is q + 101. 1011_1111 == 191 == 90 + 101, so this is encoding an q of 90.
+ // d. Significand. Section b. indicates an implied prefix of [100]. [100]1_1000_1001_0110_0111_1111 == 9,999,999.
+ //
+ // Encoded value: 9,999,999 x 10^90
+ private const uint MaxValueBits = 0x77F8_967F;
+ private const uint MinValueBits = SignMask | MaxValueBits;
+
+ // PositiveOneBits Bits
+ // Hex: 0x3280_0001
+ // Binary: 0011_0010_1000_0000_0000_0000_0000_0001
+ // Split into sections: 0 | 011_0010_1 | 000_0000_0000_0000_0000_0001
+ // 0 | 0110_0101 | 000_0000_0000_0000_0000_0001
+ // Section labels: a | b | c
+ //
+ // a. Sign bit.
+ // b. Biased Exponent, which is q + 101. 0110_0101 == 101 == 0 + 101, so this is encoding an q of 0.
+ // c. Significand, set to 1.
+ //
+ // Encoded value: 1 x 10^0
+ private const uint PositiveOneBits = 0x3280_0001;
+ private const uint NegativeOneBits = SignMask | PositiveOneBits;
+ /*
+ private const uint EBits = 0; // TODO
+ private const uint PiBits = 0; // TODO
+ private const uint TauBits = 0; // TODO*/
+
+ // Well-defined and commonly used values
+
+ public static Decimal32 MaxValue => new Decimal32(MaxValueBits); // 9.999999E90
+
+ public static Decimal32 MinValue => new Decimal32(MinValueBits); // -9.999999E90
+
+ public static Decimal32 Epsilon => new Decimal32(EpsilonBits); // 1E-101
+
+ public static Decimal32 NaN => new Decimal32(QNanBits); // 0.0 / 0.0
+
+ public static Decimal32 NegativeInfinity => new Decimal32(NegativeInfinityBits); // -1.0 / 0.0
+
+ public static Decimal32 NegativeZero => new Decimal32(NegativeZeroBits); // -0E-101
+
+ public static Decimal32 PositiveInfinity => new Decimal32(PositiveInfinityBits); // 1.0 / 0.0
+
+ public static Decimal32 NegativeOne => new Decimal32(NegativeOneBits); // -1E0
public static Decimal32 E => throw new NotImplementedException();
@@ -43,17 +175,38 @@ public readonly struct Decimal32
public static Decimal32 Tau => throw new NotImplementedException();
- public static Decimal32 One => throw new NotImplementedException();
+ public static Decimal32 One => new Decimal32(PositiveOneBits); // 1E0
- public static int Radix => throw new NotImplementedException();
+ public static int Radix => 10;
- public static Decimal32 Zero => throw new NotImplementedException();
+ public static Decimal32 Zero => new Decimal32(PositiveZeroBits); // -0E-101
- public static Decimal32 AdditiveIdentity => throw new NotImplementedException();
+ public static Decimal32 AdditiveIdentity => new Decimal32(PositiveZeroBits); // TODO do we want to make sure this is a zero such that the quantum of any other value is preserved on addition?
- public static Decimal32 MultiplicativeIdentity => throw new NotImplementedException();
+ public static Decimal32 MultiplicativeIdentity => new Decimal32(PositiveZeroBits); // TODO do we want to make sure this is a zero such that the quantum of any other value is preserved on addition?
+
+ internal readonly uint _value; // TODO: Single places this at the top, Half places it here. Also, Single has this as private, Half has it as internal. What do we want?
+
+ // Private Constructors
+
+ internal Decimal32(uint value)
+ {
+ _value = value;
+ }
+
+ private Decimal32(bool sign, uint combination, uint trailing_sig) => _value = (uint)(((sign ? 1 : 0) << SignShift) + (combination << CombinationShift) + trailing_sig); // TODO do we need this?
+ private Decimal32(bool sign, uint q, uint sig)
+ {
+ // Edge conditions: MinQExponent <= q <= MaxQExponent, 0 <= sig <= 9999999
+ _value = 0; // TODO
+ }
+
+ ///
+ public static Decimal32 Abs(Decimal32 value)
+ {
+ return new Decimal32(value._value & ~SignMask);
+ }
- public static Decimal32 Abs(Decimal32 value) => throw new NotImplementedException();
public static Decimal32 Acos(Decimal32 x) => throw new NotImplementedException();
public static Decimal32 Acosh(Decimal32 x) => throw new NotImplementedException();
public static Decimal32 AcosPi(Decimal32 x) => throw new NotImplementedException();
@@ -65,6 +218,7 @@ public readonly struct Decimal32
public static Decimal32 Atan2Pi(Decimal32 y, Decimal32 x) => throw new NotImplementedException();
public static Decimal32 Atanh(Decimal32 x) => throw new NotImplementedException();
public static Decimal32 AtanPi(Decimal32 x) => throw new NotImplementedException();
+ ///
public static Decimal32 BitDecrement(Decimal32 x) => throw new NotImplementedException();
public static Decimal32 BitIncrement(Decimal32 x) => throw new NotImplementedException();
public static Decimal32 Cbrt(Decimal32 x) => throw new NotImplementedException();
@@ -127,9 +281,31 @@ public readonly struct Decimal32
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
- static bool INumberBase.TryConvertFromChecked(TOther value, out Decimal32 result) => throw new NotImplementedException();
- static bool INumberBase.TryConvertFromSaturating(TOther value, out Decimal32 result) => throw new NotImplementedException();
- static bool INumberBase.TryConvertFromTruncating(TOther value, out Decimal32 result) => throw new NotImplementedException();
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ static bool INumberBase.TryConvertFromChecked(TOther value, out Decimal32 result)
+ {
+ return TryConvertFrom(value, out result);
+ }
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ static bool INumberBase.TryConvertFromSaturating(TOther value, out Decimal32 result)
+ {
+ return TryConvertFrom(value, out result);
+ }
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ static bool INumberBase.TryConvertFromTruncating(TOther value, out Decimal32 result)
+ {
+ return TryConvertFrom(value, out result);
+ }
+ private static bool TryConvertFrom(TOther value, out Decimal32 result)
+ where TOther : INumberBase
+ {
+ // TODO
+ }
static bool INumberBase.TryConvertToChecked(Decimal32 value, out TOther result) => throw new NotImplementedException();
static bool INumberBase.TryConvertToSaturating(Decimal32 value, out TOther result) => throw new NotImplementedException();
static bool INumberBase.TryConvertToTruncating(Decimal32 value, out TOther result) => throw new NotImplementedException();
From 142221d55089aa4277ce110d84371264e70e4eb5 Mon Sep 17 00:00:00 2001
From: Drew Kersnar <18474647+dakersnar@users.noreply.github.com>
Date: Wed, 14 Dec 2022 20:06:02 -0600
Subject: [PATCH 05/39] Started fleshing out IeeeDecimalNumber.cs
---
.../src/System/Numerics/IeeeDecimalNumber.cs | 254 ++++++++++++++++++
1 file changed, 254 insertions(+)
create mode 100644 src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs
diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs
new file mode 100644
index 00000000000000..f8d70f4da9654f
--- /dev/null
+++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs
@@ -0,0 +1,254 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+// The IeeeDecimalNumber class implements methods for formatting and parsing IEEE decimal types.
+// If these types lived in the System namespace, these methods would live in Number.Parsing.cs and Number.Formatting.cs,
+// just like Single, Double, and Half.
+
+using System.Buffers;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Runtime.CompilerServices;
+
+namespace System.Numerics
+{
+ internal static class IeeeDecimalNumber
+ {
+
+ // IeeeDecimalNumberBuffer
+
+ internal const int Decimal32BufferLength = 0 + 1 + 1; // TODO: X for the longest input + 1 for rounding (+1 for the null terminator)
+
+ internal unsafe ref struct IeeeDecimalNumberBuffer
+ {
+ public int DigitsCount;
+ public int Scale;
+ public bool IsNegative;
+ public bool HasNonZeroTail;
+ public Span Digits;
+
+ public IeeeDecimalNumberBuffer(byte* digits, int digitsLength) : this(new Span(digits, digitsLength))
+ {
+ Debug.Assert(digits != null);
+ }
+
+ /// Initializes the NumberBuffer.
+ /// The digits scratch space. The referenced memory must not be movable, e.g. stack memory, pinned array, etc.
+ public IeeeDecimalNumberBuffer(Span digits)
+ {
+ Debug.Assert(!digits.IsEmpty);
+
+ DigitsCount = 0;
+ Scale = 0;
+ IsNegative = false;
+ HasNonZeroTail = false;
+ Digits = digits;
+#if DEBUG
+ Digits.Fill(0xCC);
+#endif
+ Digits[0] = (byte)'\0';
+ CheckConsistency();
+ }
+
+#pragma warning disable CA1822
+ [Conditional("DEBUG")]
+ public void CheckConsistency() // TODO do we want this?
+ {
+#if DEBUG
+ Debug.Assert(Digits[0] != '0', "Leading zeros should never be stored in a IeeeDecimalNumber");
+
+ int numDigits;
+ for (numDigits = 0; numDigits < Digits.Length; numDigits++)
+ {
+ byte digit = Digits[numDigits];
+
+ if (digit == 0)
+ {
+ break;
+ }
+
+ Debug.Assert(char.IsAsciiDigit((char)digit), $"Unexpected character found in IeeeDecimalNumber: {digit}");
+ }
+
+ Debug.Assert(numDigits == DigitsCount, "Null terminator found in unexpected location in IeeeDecimalNumber");
+ Debug.Assert(numDigits < Digits.Length, "Null terminator not found in IeeeDecimalNumber");
+#endif // DEBUG
+ }
+#pragma warning restore CA1822
+
+#pragma warning disable CA1822 // TODO I don't know why this is required, it isn't for Number.NumberBuffer.cs
+ public byte* GetDigitsPointer() // TODO this is complaining that the method could be static, but it is wrong
+ {
+ // This is safe to do since we are a ref struct
+ return (byte*)(Unsafe.AsPointer(ref Digits[0]));
+ }
+#pragma warning restore CA1822
+
+ //
+ // Code coverage note: This only exists so that Number displays nicely in the VS watch window. So yes, I know it works.
+ //
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+
+ sb.Append('[');
+ sb.Append('"');
+
+ for (int i = 0; i < Digits.Length; i++)
+ {
+ byte digit = Digits[i];
+
+ if (digit == 0)
+ {
+ break;
+ }
+
+ sb.Append((char)(digit));
+ }
+
+ sb.Append('"');
+ sb.Append(", Length = ").Append(DigitsCount);
+ sb.Append(", Scale = ").Append(Scale);
+ sb.Append(", IsNegative = ").Append(IsNegative);
+ sb.Append(", HasNonZeroTail = ").Append(HasNonZeroTail);
+ sb.Append(']');
+
+ return sb.ToString();
+ }
+ }
+
+ // IeeeDecimalNumber Parsing TODO potentially rewrite this
+
+ // The Parse methods provided by the numeric classes convert a
+ // string to a numeric value. The optional style parameter specifies the
+ // permitted style of the numeric string. It must be a combination of bit flags
+ // from the NumberStyles enumeration. The optional info parameter
+ // specifies the NumberFormatInfo instance to use when parsing the
+ // string. If the info parameter is null or omitted, the numeric
+ // formatting information is obtained from the current culture.
+ //
+ // Numeric strings produced by the Format methods using the Currency,
+ // Decimal, Engineering, Fixed point, General, or Number standard formats
+ // (the C, D, E, F, G, and N format specifiers) are guaranteed to be parseable
+ // by the Parse methods if the NumberStyles.Any style is
+ // specified. Note, however, that the Parse methods do not accept
+ // NaNs or Infinities.
+
+ [DoesNotReturn]
+ internal static void ThrowFormatException(ParsingStatus status, ReadOnlySpan value, TypeCode type = 0) => throw new FormatException(SR.Format(SR.Format_InvalidStringWithValue, value.ToString()));
+
+ internal static Half ParseDecimal32(ReadOnlySpan value, NumberStyles styles, NumberFormatInfo info)
+ {
+ if (!TryParseDecimal32(value, styles, info, out Decimal32 result))
+ {
+ ThrowFormatException(ParsingStatus.Failed, value);
+ }
+
+ return result;
+ }
+
+ internal static unsafe bool TryParseDecimal32(ReadOnlySpan value, NumberStyles styles, NumberFormatInfo info, out Decimal32 result)
+ {
+ IeeeDecimalNumberBuffer number = new IeeeDecimalNumberBuffer(NumberBufferKind.FloatingPoint, stackalloc byte[HalfNumberBufferLength]);
+
+ if (!TryStringToNumber(value, styles, ref number, info))
+ {
+ ReadOnlySpan valueTrim = value.Trim();
+
+ // This code would be simpler if we only had the concept of `InfinitySymbol`, but
+ // we don't so we'll check the existing cases first and then handle `PositiveSign` +
+ // `PositiveInfinitySymbol` and `PositiveSign/NegativeSign` + `NaNSymbol` last.
+ //
+ // Additionally, since some cultures ("wo") actually define `PositiveInfinitySymbol`
+ // to include `PositiveSign`, we need to check whether `PositiveInfinitySymbol` fits
+ // that case so that we don't start parsing things like `++infini`.
+
+ if (valueTrim.EqualsOrdinalIgnoreCase(info.PositiveInfinitySymbol))
+ {
+ result = Half.PositiveInfinity;
+ }
+ else if (valueTrim.EqualsOrdinalIgnoreCase(info.NegativeInfinitySymbol))
+ {
+ result = Half.NegativeInfinity;
+ }
+ else if (valueTrim.EqualsOrdinalIgnoreCase(info.NaNSymbol))
+ {
+ result = Half.NaN;
+ }
+ else if (valueTrim.StartsWith(info.PositiveSign, StringComparison.OrdinalIgnoreCase))
+ {
+ valueTrim = valueTrim.Slice(info.PositiveSign.Length);
+
+ if (!info.PositiveInfinitySymbol.StartsWith(info.PositiveSign, StringComparison.OrdinalIgnoreCase) && valueTrim.EqualsOrdinalIgnoreCase(info.PositiveInfinitySymbol))
+ {
+ result = Half.PositiveInfinity;
+ }
+ else if (!info.NaNSymbol.StartsWith(info.PositiveSign, StringComparison.OrdinalIgnoreCase) && valueTrim.EqualsOrdinalIgnoreCase(info.NaNSymbol))
+ {
+ result = Half.NaN;
+ }
+ else
+ {
+ result = Half.Zero;
+ return false;
+ }
+ }
+ else if (valueTrim.StartsWith(info.NegativeSign, StringComparison.OrdinalIgnoreCase) &&
+ !info.NaNSymbol.StartsWith(info.NegativeSign, StringComparison.OrdinalIgnoreCase) &&
+ valueTrim.Slice(info.NegativeSign.Length).EqualsOrdinalIgnoreCase(info.NaNSymbol))
+ {
+ result = Half.NaN;
+ }
+ else if (info.AllowHyphenDuringParsing && SpanStartsWith(valueTrim, '-') && !info.NaNSymbol.StartsWith(info.NegativeSign, StringComparison.OrdinalIgnoreCase) &&
+ !info.NaNSymbol.StartsWith('-') && valueTrim.Slice(1).EqualsOrdinalIgnoreCase(info.NaNSymbol))
+ {
+ result = Half.NaN;
+ }
+ else
+ {
+ result = Half.Zero;
+ return false; // We really failed
+ }
+ }
+ else
+ {
+ result = NumberToHalf(ref number);
+ }
+
+ return true;
+ }
+
+ internal static Decimal32 NumberToDecimal32(ref NumberBuffer number)
+ {
+ number.CheckConsistency();
+ Decimal32 result;
+
+ if ((number.DigitsCount == 0) || (number.Scale < Decimal32MinExponent))
+ {
+ result = default;
+ }
+ else if (number.Scale > Decimal32MaxExponent)
+ {
+ result = Decimal32.PositiveInfinity;
+ }
+ else
+ {
+ ushort bits = NumberToDecimal32FloatingPointBits(ref number, in FloatingPointInfo.Decimal32);
+ result = new Decimal32(bits);
+ }
+
+ return number.IsNegative ? Decimal32.Negate(result) : result;
+ }
+
+ internal enum ParsingStatus // No Overflow because these types can represent Infinity
+ {
+ OK,
+ Failed
+ }
+
+ // IeeeDecimalNumber Formatting
+ }
+}
From 0c592f2021f7b03a5c9e7880634a9ed7e2ecc6ca Mon Sep 17 00:00:00 2001
From: Drew Kersnar <18474647+dakersnar@users.noreply.github.com>
Date: Wed, 14 Dec 2022 20:06:19 -0600
Subject: [PATCH 06/39] More progress including Parse and TryParse
---
.../src/System/Numerics/Decimal32.cs | 621 +++++++++++++++++-
1 file changed, 601 insertions(+), 20 deletions(-)
diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
index 30aeddb18ab657..1913335a1d1812 100644
--- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
+++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
@@ -257,10 +257,71 @@ public static Decimal32 Abs(Decimal32 value)
public static Decimal32 MaxMagnitudeNumber(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
public static Decimal32 MinMagnitude(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
public static Decimal32 MinMagnitudeNumber(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
- public static Decimal32 Parse(ReadOnlySpan s, IFormatProvider? provider) => throw new NotImplementedException();
- public static Decimal32 Parse(string s, IFormatProvider? provider) => throw new NotImplementedException();
- public static Decimal32 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) => throw new NotImplementedException();
- public static Decimal32 Parse(string s, NumberStyles style, IFormatProvider? provider) => throw new NotImplementedException();
+
+ //
+ // Parsing (INumberBase, IParsable, ISpanParsable)
+ //
+
+ ///
+ public static Decimal32 Parse(ReadOnlySpan s, IFormatProvider? provider)
+ {
+ // NumberFormatInfo.ValidateParseStyleFloatingPoint(NumberStyles.Number); // TODO, it won't let me call this because it's internal to System.
+ return IeeeDecimalNumber.ParseDecimal32(s, NumberStyles.Number, NumberFormatInfo.GetInstance(provider));
+ }
+
+ ///
+ public static Decimal32 Parse(string s, IFormatProvider? provider)
+ {
+ // if (s == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s); // TODO, it won't let me call this because it's internal to System.
+ return IeeeDecimalNumber.ParseDecimal32(s, NumberStyles.Number, NumberFormatInfo.GetInstance(provider));
+ }
+
+ ///
+ public static Decimal32 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider = null) // TODO what should the default for NumberStyles be?
+ {
+ // NumberFormatInfo.ValidateParseStyleFloatingPoint(style); // TODO, it won't let me call this because it's internal to System.
+ return IeeeDecimalNumber.ParseDecimal32(s, style, NumberFormatInfo.GetInstance(provider));
+ }
+
+ ///
+ public static Decimal32 Parse(string s, NumberStyles style, IFormatProvider? provider)
+ {
+ // NumberFormatInfo.ValidateParseStyleFloatingPoint(style); // TODO, it won't let me call these because they are internal to System.
+ // if (s == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
+ return IeeeDecimalNumber.ParseDecimal32(s, style, NumberFormatInfo.GetInstance(provider));
+ }
+
+ ///
+ public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result)
+ {
+ // NumberFormatInfo.ValidateParseStyleFloatingPoint(NumberStyles.Number); // TODO
+ return IeeeDecimalNumber.TryParseDecimal32(s, NumberStyles.Number, NumberFormatInfo.GetInstance(provider), out result) == IeeeDecimalNumber.ParsingStatus.OK;
+ }
+
+ ///
+ public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => TryParse(s, NumberStyles.Number, provider, out result);
+
+ ///
+ public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result)
+ {
+ // NumberFormatInfo.ValidateParseStyleFloatingPoint(style); // TODO
+ return IeeeDecimalNumber.TryParseDecimal32(s, style, NumberFormatInfo.GetInstance(provider), out result) == IeeeDecimalNumber.ParsingStatus.OK;
+ }
+
+ ///
+ public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result)
+ {
+ // NumberFormatInfo.ValidateParseStyleFloatingPoint(style); // TODO
+
+ if (s == null)
+ {
+ result = 0;
+ return false;
+ }
+
+ return IeeeDecimalNumber.TryParseDecimal32(s, style, NumberFormatInfo.GetInstance(provider), out result) == IeeeDecimalNumber.ParsingStatus.OK;
+ }
+
public static Decimal32 Pow(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
public static Decimal32 Quantize(Decimal32 x, Decimal32 y) => throw new NotImplementedException();
public static Decimal32 Quantum(Decimal32 x) => throw new NotImplementedException();
@@ -277,38 +338,558 @@ public static Decimal32 Abs(Decimal32 value)
public static Decimal32 Tan(Decimal32 x) => throw new NotImplementedException();
public static Decimal32 Tanh(Decimal32 x) => throw new NotImplementedException();
public static Decimal32 TanPi(Decimal32 x) => throw new NotImplementedException();
- public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
- public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
- public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
- public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => throw new NotImplementedException();
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Decimal32 CreateChecked(TOther value) // TODO these are copy-pastes of the DIM. Do we still want them?
+ where TOther : INumberBase
+ {
+ Decimal32 result;
+
+ if (typeof(TOther) == typeof(Decimal32))
+ {
+ result = (Decimal32)(object)value;
+ }
+ else if (!TryConvertFromChecked(value, out result) && !TOther.TryConvertToChecked(value, out result))
+ {
+ ThrowHelper.ThrowNotSupportedException();
+ }
+
+ return result;
+ }
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Decimal32 CreateSaturating(TOther value)
+ where TOther : INumberBase
+ {
+ Decimal32 result;
+
+ if (typeof(TOther) == typeof(Decimal32))
+ {
+ result = (Decimal32)(object)value;
+ }
+ else if (!TryConvertFromSaturating(value, out result) && !TOther.TryConvertToSaturating(value, out result))
+ {
+ ThrowHelper.ThrowNotSupportedException();
+ }
+
+ return result;
+ }
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Decimal32 CreateTruncating(TOther value)
+ where TOther : INumberBase
+ {
+ Decimal32 result;
+
+ if (typeof(TOther) == typeof(Decimal32))
+ {
+ result = (Decimal32)(object)value;
+ }
+ else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result))
+ {
+ ThrowHelper.ThrowNotSupportedException();
+ }
+
+ return result;
+ }
+
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- static bool INumberBase.TryConvertFromChecked(TOther value, out Decimal32 result)
+ static bool INumberBase.TryConvertFromChecked(TOther value, out Decimal32 result) => TryConvertFromChecked(value, out result);
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static bool TryConvertFromChecked(TOther value, out Decimal32 result)
+ where TOther : INumberBase
{
- return TryConvertFrom(value, out result);
+ if (typeof(TOther) == typeof(byte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(char))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(decimal))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(double))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Half))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(short))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(int))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(long))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Int128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(sbyte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(float))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ushort))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(uint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ulong))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(UInt128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nuint))
+ {
+ throw new NotImplementedException();
+ }
+ else
+ {
+ result = default;
+ return false;
+ }
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- static bool INumberBase.TryConvertFromSaturating(TOther value, out Decimal32 result)
+ static bool INumberBase.TryConvertFromSaturating(TOther value, out Decimal32 result) => TryConvertFromSaturating(value, out result);
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static bool TryConvertFromSaturating(TOther value, out Decimal32 result)
+ where TOther : INumberBase
{
- return TryConvertFrom(value, out result);
+ if (typeof(TOther) == typeof(byte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(char))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(decimal))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(double))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Half))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(short))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(int))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(long))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Int128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(sbyte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(float))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ushort))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(uint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ulong))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(UInt128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nuint))
+ {
+ throw new NotImplementedException();
+ }
+ else
+ {
+ result = default;
+ return false;
+ }
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- static bool INumberBase.TryConvertFromTruncating(TOther value, out Decimal32 result)
+ static bool INumberBase.TryConvertFromTruncating(TOther value, out Decimal32 result) => TryConvertFromTruncating(value, out result);
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static bool TryConvertFromTruncating(TOther value, out Decimal32 result)
+ where TOther : INumberBase
{
- return TryConvertFrom(value, out result);
+ if (typeof(TOther) == typeof(byte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(char))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(decimal))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(double))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Half))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(short))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(int))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(long))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Int128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(sbyte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(float))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ushort))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(uint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ulong))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(UInt128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nuint))
+ {
+ throw new NotImplementedException();
+ }
+ else
+ {
+ result = default;
+ return false;
+ }
}
- private static bool TryConvertFrom(TOther value, out Decimal32 result)
- where TOther : INumberBase
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ static bool INumberBase.TryConvertToChecked(Decimal32 value, [MaybeNullWhen(false)] out TOther result)
+ {
+ if (typeof(TOther) == typeof(byte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(char))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(decimal))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(double))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Half))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(short))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(int))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(long))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Int128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(sbyte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(float))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ushort))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(uint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ulong))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(UInt128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nuint))
+ {
+ throw new NotImplementedException();
+ }
+ else
+ {
+ result = default;
+ return false;
+ }
+ }
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ static bool INumberBase.TryConvertToSaturating(Decimal32 value, [MaybeNullWhen(false)] out TOther result)
+ {
+ if (typeof(TOther) == typeof(byte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(char))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(decimal))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(double))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Half))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(short))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(int))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(long))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Int128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Complex))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(sbyte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(float))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ushort))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(uint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ulong))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(UInt128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nuint))
+ {
+ throw new NotImplementedException();
+ }
+ else
+ {
+ result = default;
+ return false;
+ }
+ }
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ static bool INumberBase.TryConvertToTruncating(Decimal32 value, [MaybeNullWhen(false)] out TOther result)
{
- // TODO
+ if (typeof(TOther) == typeof(byte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(char))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(decimal))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(double))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Half))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(short))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(int))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(long))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Int128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(Complex))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(sbyte))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(float))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ushort))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(uint))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(ulong))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(UInt128))
+ {
+ throw new NotImplementedException();
+ }
+ else if (typeof(TOther) == typeof(nuint))
+ {
+ throw new NotImplementedException();
+ }
+ else
+ {
+ result = default;
+ return false;
+ }
}
- static bool INumberBase.TryConvertToChecked(Decimal32 value, out TOther result) => throw new NotImplementedException();
- static bool INumberBase.TryConvertToSaturating(Decimal32 value, out TOther result) => throw new NotImplementedException();
- static bool INumberBase.TryConvertToTruncating(Decimal32 value, out TOther result) => throw new NotImplementedException();
+
public int CompareTo(Decimal32 other) => throw new NotImplementedException();
public int CompareTo(object? obj) => throw new NotImplementedException();
public bool Equals(Decimal32 other) => throw new NotImplementedException();
From e60fbfa8951c40b53ac40ed0125482d7eb6dc551 Mon Sep 17 00:00:00 2001
From: Drew Kersnar <18474647+dakersnar@users.noreply.github.com>
Date: Fri, 16 Dec 2022 17:04:47 -0600
Subject: [PATCH 07/39] continue to work on parsing
---
.../src/System/Numerics/Decimal32.cs | 6 +
.../src/System/Numerics/IeeeDecimalNumber.cs | 426 +++++++++++++++++-
2 files changed, 415 insertions(+), 17 deletions(-)
diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
index 1913335a1d1812..91c1a10a7259e4 100644
--- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
+++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Decimal32.cs
@@ -931,5 +931,11 @@ public override int GetHashCode()
}
public string ToString(string? format, IFormatProvider? formatProvider) => throw new NotImplementedException();
+
+ // IEEE 754 specifies NaNs to be propagated
+ internal static Decimal32 Negate(Decimal32 value)
+ {
+ return IsNaN(value) ? value : new Decimal32((ushort)(value._value ^ SignMask));
+ }
}
}
diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs
index f8d70f4da9654f..0274b3ed1c14f8 100644
--- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs
+++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs
@@ -120,7 +120,7 @@ public override string ToString()
}
}
- // IeeeDecimalNumber Parsing TODO potentially rewrite this
+ // IeeeDecimalNumber Parsing TODO potentially rewrite this description
// The Parse methods provided by the numeric classes convert a
// string to a numeric value. The optional style parameter specifies the
@@ -140,7 +140,7 @@ public override string ToString()
[DoesNotReturn]
internal static void ThrowFormatException(ParsingStatus status, ReadOnlySpan value, TypeCode type = 0) => throw new FormatException(SR.Format(SR.Format_InvalidStringWithValue, value.ToString()));
- internal static Half ParseDecimal32(ReadOnlySpan value, NumberStyles styles, NumberFormatInfo info)
+ internal static Decimal32 ParseDecimal32(ReadOnlySpan value, NumberStyles styles, NumberFormatInfo info)
{
if (!TryParseDecimal32(value, styles, info, out Decimal32 result))
{
@@ -152,7 +152,7 @@ internal static Half ParseDecimal32(ReadOnlySpan value, NumberStyles style
internal static unsafe bool TryParseDecimal32(ReadOnlySpan value, NumberStyles styles, NumberFormatInfo info, out Decimal32 result)
{
- IeeeDecimalNumberBuffer number = new IeeeDecimalNumberBuffer(NumberBufferKind.FloatingPoint, stackalloc byte[HalfNumberBufferLength]);
+ IeeeDecimalNumberBuffer number = new IeeeDecimalNumberBuffer(stackalloc byte[Decimal32BufferLength]);
if (!TryStringToNumber(value, styles, ref number, info))
{
@@ -168,15 +168,15 @@ internal static unsafe bool TryParseDecimal32(ReadOnlySpan value, NumberSt
if (valueTrim.EqualsOrdinalIgnoreCase(info.PositiveInfinitySymbol))
{
- result = Half.PositiveInfinity;
+ result = Decimal32.PositiveInfinity;
}
else if (valueTrim.EqualsOrdinalIgnoreCase(info.NegativeInfinitySymbol))
{
- result = Half.NegativeInfinity;
+ result = Decimal32.NegativeInfinity;
}
else if (valueTrim.EqualsOrdinalIgnoreCase(info.NaNSymbol))
{
- result = Half.NaN;
+ result = Decimal32.NaN;
}
else if (valueTrim.StartsWith(info.PositiveSign, StringComparison.OrdinalIgnoreCase))
{
@@ -184,15 +184,15 @@ internal static unsafe bool TryParseDecimal32(ReadOnlySpan value, NumberSt
if (!info.PositiveInfinitySymbol.StartsWith(info.PositiveSign, StringComparison.OrdinalIgnoreCase) && valueTrim.EqualsOrdinalIgnoreCase(info.PositiveInfinitySymbol))
{
- result = Half.PositiveInfinity;
+ result = Decimal32.PositiveInfinity;
}
else if (!info.NaNSymbol.StartsWith(info.PositiveSign, StringComparison.OrdinalIgnoreCase) && valueTrim.EqualsOrdinalIgnoreCase(info.NaNSymbol))
{
- result = Half.NaN;
+ result = Decimal32.NaN;
}
else
{
- result = Half.Zero;
+ result = Decimal32.Zero;
return false;
}
}
@@ -200,37 +200,350 @@ internal static unsafe bool TryParseDecimal32(ReadOnlySpan value, NumberSt
!info.NaNSymbol.StartsWith(info.NegativeSign, StringComparison.OrdinalIgnoreCase) &&
valueTrim.Slice(info.NegativeSign.Length).EqualsOrdinalIgnoreCase(info.NaNSymbol))
{
- result = Half.NaN;
+ result = Decimal32.NaN;
}
else if (info.AllowHyphenDuringParsing && SpanStartsWith(valueTrim, '-') && !info.NaNSymbol.StartsWith(info.NegativeSign, StringComparison.OrdinalIgnoreCase) &&
!info.NaNSymbol.StartsWith('-') && valueTrim.Slice(1).EqualsOrdinalIgnoreCase(info.NaNSymbol))
{
- result = Half.NaN;
+ result = Decimal32.NaN;
}
else
{
- result = Half.Zero;
+ result = Decimal32.Zero;
return false; // We really failed
}
}
else
{
- result = NumberToHalf(ref number);
+ result = NumberToDecimal32(ref number);
}
return true;
}
- internal static Decimal32 NumberToDecimal32(ref NumberBuffer number)
+ internal static unsafe bool TryStringToNumber(ReadOnlySpan value, NumberStyles styles, ref IeeeDecimalNumberBuffer number, NumberFormatInfo info)
+ {
+ Debug.Assert(info != null);
+ fixed (char* stringPointer = &MemoryMarshal.GetReference(value))
+ {
+ char* p = stringPointer;
+ if (!TryParseNumber(ref p, p + value.Length, styles, ref number, info)
+ || ((int)(p - stringPointer) < value.Length && !TrailingZeros(value, (int)(p - stringPointer))))
+ {
+ number.CheckConsistency();
+ return false;
+ }
+ }
+
+ number.CheckConsistency();
+ return true;
+ }
+
+ // This is almost a direct copy paste of the one in Number.Parsing.cs
+ private static unsafe bool TryParseNumber(scoped ref char* str, char* strEnd, NumberStyles styles, ref IeeeDecimalNumberBuffer number, NumberFormatInfo info)
+ {
+ Debug.Assert(str != null);
+ Debug.Assert(strEnd != null);
+ Debug.Assert(str <= strEnd);
+ Debug.Assert((styles & NumberStyles.AllowHexSpecifier) == 0);
+
+ const int StateSign = 0x0001;
+ const int StateParens = 0x0002;
+ const int StateDigits = 0x0004;
+ const int StateNonZero = 0x0008;
+ const int StateDecimal = 0x0010;
+ const int StateCurrency = 0x0020;
+
+ Debug.Assert(number.DigitsCount == 0);
+ Debug.Assert(number.Scale == 0);
+ Debug.Assert(!number.IsNegative);
+ Debug.Assert(!number.HasNonZeroTail);
+
+ number.CheckConsistency();
+
+ string decSep; // decimal separator from NumberFormatInfo.
+ string groupSep; // group separator from NumberFormatInfo.
+ string? currSymbol = null; // currency symbol from NumberFormatInfo.
+
+ bool parsingCurrency = false;
+ if ((styles & NumberStyles.AllowCurrencySymbol) != 0)
+ {
+ currSymbol = info.CurrencySymbol;
+
+ // The idea here is to match the currency separators and on failure match the number separators to keep the perf of VB's IsNumeric fast.
+ // The values of decSep are setup to use the correct relevant separator (currency in the if part and decimal in the else part).
+ decSep = info.CurrencyDecimalSeparator;
+ groupSep = info.CurrencyGroupSeparator;
+ parsingCurrency = true;
+ }
+ else
+ {
+ decSep = info.NumberDecimalSeparator;
+ groupSep = info.NumberGroupSeparator;
+ }
+
+ int state = 0;
+ char* p = str;
+ char ch = p < strEnd ? *p : '\0';
+ char* next;
+
+ while (true)
+ {
+ // Eat whitespace unless we've found a sign which isn't followed by a currency symbol.
+ // "-Kr 1231.47" is legal but "- 1231.47" is not.
+ if (!IsWhite(ch) || (styles & NumberStyles.AllowLeadingWhite) == 0 || ((state & StateSign) != 0 && ((state & StateCurrency) == 0 && info.NumberNegativePattern != 2)))
+ {
+ if ((((styles & NumberStyles.AllowLeadingSign) != 0) && (state & StateSign) == 0) && ((next = MatchChars(p, strEnd, info.PositiveSign)) != null || ((next = MatchNegativeSignChars(p, strEnd, info)) != null && (number.IsNegative = true))))
+ {
+ state |= StateSign;
+ p = next - 1;
+ }
+ else if (ch == '(' && ((styles & NumberStyles.AllowParentheses) != 0) && ((state & StateSign) == 0))
+ {
+ state |= StateSign | StateParens;
+ number.IsNegative = true;
+ }
+ else if (currSymbol != null && (next = MatchChars(p, strEnd, currSymbol)) != null)
+ {
+ state |= StateCurrency;
+ currSymbol = null;
+ // We already found the currency symbol. There should not be more currency symbols. Set
+ // currSymbol to NULL so that we won't search it again in the later code path.
+ p = next - 1;
+ }
+ else
+ {
+ break;
+ }
+ }
+ ch = ++p < strEnd ? *p : '\0';
+ }
+
+ int digCount = 0;
+ int digEnd = 0;
+ int maxDigCount = number.Digits.Length - 1;
+ int numberOfTrailingZeros = 0;
+
+ while (true)
+ {
+ if (IsDigit(ch))
+ {
+ state |= StateDigits;
+
+ if (ch != '0' || (state & StateNonZero) != 0)
+ {
+ if (digCount < maxDigCount)
+ {
+ number.Digits[digCount] = (byte)(ch);
+ if ((ch != '0') || (number.Kind != NumberBufferKind.Integer))
+ {
+ digEnd = digCount + 1;
+ }
+ }
+ else if (ch != '0')
+ {
+ // For decimal and binary floating-point numbers, we only
+ // need to store digits up to maxDigCount. However, we still
+ // need to keep track of whether any additional digits past
+ // maxDigCount were non-zero, as that can impact rounding
+ // for an input that falls evenly between two representable
+ // results.
+
+ number.HasNonZeroTail = true;
+ }
+
+ if ((state & StateDecimal) == 0)
+ {
+ number.Scale++;
+ }
+
+ if (digCount < maxDigCount)
+ {
+ // Handle a case like "53.0". We need to ignore trailing zeros in the fractional part for floating point numbers, so we keep a count of the number of trailing zeros and update digCount later
+ if (ch == '0')
+ {
+ numberOfTrailingZeros++;
+ }
+ else
+ {
+ numberOfTrailingZeros = 0;
+ }
+ }
+ digCount++;
+ state |= StateNonZero;
+ }
+ else if ((state & StateDecimal) != 0)
+ {
+ number.Scale--;
+ }
+ }
+ else if (((styles & NumberStyles.AllowDecimalPoint) != 0) && ((state & StateDecimal) == 0) && ((next = MatchChars(p, strEnd, decSep)) != null || (parsingCurrency && (state & StateCurrency) == 0) && (next = MatchChars(p, strEnd, info.NumberDecimalSeparator)) != null))
+ {
+ state |= StateDecimal;
+ p = next - 1;
+ }
+ else if (((styles & NumberStyles.AllowThousands) != 0) && ((state & StateDigits) != 0) && ((state & StateDecimal) == 0) && ((next = MatchChars(p, strEnd, groupSep)) != null || (parsingCurrency && (state & StateCurrency) == 0) && (next = MatchChars(p, strEnd, info.NumberGroupSeparator)) != null))
+ {
+ p = next - 1;
+ }
+ else
+ {
+ break;
+ }
+ ch = ++p < strEnd ? *p : '\0';
+ }
+
+ bool negExp = false;
+ number.DigitsCount = digEnd;
+ number.Digits[digEnd] = (byte)('\0');
+ if ((state & StateDigits) != 0)
+ {
+ if ((ch == 'E' || ch == 'e') && ((styles & NumberStyles.AllowExponent) != 0))
+ {
+ char* temp = p;
+ ch = ++p < strEnd ? *p : '\0';
+ if ((next = MatchChars(p, strEnd, info._positiveSign)) != null)
+ {
+ ch = (p = next) < strEnd ? *p : '\0';
+ }
+ else if ((next = MatchNegativeSignChars(p, strEnd, info)) != null)
+ {
+ ch = (p = next) < strEnd ? *p : '\0';
+ negExp = true;
+ }
+ if (IsDigit(ch))
+ {
+ int exp = 0;
+ do
+ {
+ exp = exp * 10 + (ch - '0');
+ ch = ++p < strEnd ? *p : '\0';
+ if (exp > 1000)
+ {
+ exp = 9999;
+ while (IsDigit(ch))
+ {
+ ch = ++p < strEnd ? *p : '\0';
+ }
+ }
+ } while (IsDigit(ch));
+ if (negExp)
+ {
+ exp = -exp;
+ }
+ number.Scale += exp;
+ }
+ else
+ {
+ p = temp;
+ ch = p < strEnd ? *p : '\0';
+ }
+ }
+
+ if (number.Kind == NumberBufferKind.FloatingPoint && !number.HasNonZeroTail)
+ {
+ // Adjust the number buffer for trailing zeros
+ int numberOfFractionalDigits = digEnd - number.Scale;
+ if (numberOfFractionalDigits > 0)
+ {
+ numberOfTrailingZeros = Math.Min(numberOfTrailingZeros, numberOfFractionalDigits);
+ Debug.Assert(numberOfTrailingZeros >= 0);
+ number.DigitsCount = digEnd - numberOfTrailingZeros;
+ number.Digits[number.DigitsCount] = (byte)('\0');
+ }
+ }
+
+ while (true)
+ {
+ if (!IsWhite(ch) || (styles & NumberStyles.AllowTrailingWhite) == 0)
+ {
+ if ((styles & NumberStyles.AllowTrailingSign) != 0 && ((state & StateSign) == 0) && ((next = MatchChars(p, strEnd, info.PositiveSign)) != null || (((next = MatchNegativeSignChars(p, strEnd, info)) != null) && (number.IsNegative = true))))
+ {
+ state |= StateSign;
+ p = next - 1;
+ }
+ else if (ch == ')' && ((state & StateParens) != 0))
+ {
+ state &= ~StateParens;
+ }
+ else if (currSymbol != null && (next = MatchChars(p, strEnd, currSymbol)) != null)
+ {
+ currSymbol = null;
+ p = next - 1;
+ }
+ else
+ {
+ break;
+ }
+ }
+ ch = ++p < strEnd ? *p : '\0';
+ }
+ if ((state & StateParens) == 0)
+ {
+ if ((state & StateNonZero) == 0)
+ {
+ if (number.Kind != NumberBufferKind.Decimal)
+ {
+ number.Scale = 0;
+ }
+ if ((number.Kind == NumberBufferKind.Integer) && (state & StateDecimal) == 0)
+ {
+ number.IsNegative = false;
+ }
+ }
+ str = p;
+ return true;
+ }
+ }
+ str = p;
+ return false;
+ }
+
+ private static unsafe char* MatchChars(char* p, char* pEnd, string value)
+ {
+ Debug.Assert(p != null && pEnd != null && p <= pEnd && value != null);
+ fixed (char* stringPointer = value)
+ {
+ char* str = stringPointer;
+ if (*str != '\0')
+ {
+ // We only hurt the failure case
+ // This fix is for French or Kazakh cultures. Since a user cannot type 0xA0 or 0x202F as a
+ // space character we use 0x20 space character instead to mean the same.
+ while (true)
+ {
+ char cp = p < pEnd ? *p : '\0';
+ if (cp != *str && !(IsSpaceReplacingChar(*str) && cp == '\u0020'))
+ {
+ break;
+ }
+ p++;
+ str++;
+ if (*str == '\0')
+ return p;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private static bool IsSpaceReplacingChar(char c) => c == '\u00a0' || c == '\u202f';
+
+ private static bool IsWhite(int ch) => ch == 0x20 || (uint)(ch - 0x09) <= (0x0D - 0x09);
+
+ private static bool IsDigit(int ch) => ((uint)ch - '0') <= 9;
+
+ internal static Decimal32 NumberToDecimal32(ref IeeeDecimalNumberBuffer number)
{
number.CheckConsistency();
Decimal32 result;
- if ((number.DigitsCount == 0) || (number.Scale < Decimal32MinExponent))
+ if ((number.DigitsCount == 0) || (number.Scale < Decimal32.MinQExponent))
{
result = default;
}
- else if (number.Scale > Decimal32MaxExponent)
+ else if (number.Scale > Decimal32.MaxQExponent)
{
result = Decimal32.PositiveInfinity;
}
@@ -243,7 +556,86 @@ internal static Decimal32 NumberToDecimal32(ref NumberBuffer number)
return number.IsNegative ? Decimal32.Negate(result) : result;
}
- internal enum ParsingStatus // No Overflow because these types can represent Infinity
+ private static ushort NumberToDecimal32FloatingPointBits(ref IeeeDecimalNumberBuffer number, in FloatingPointInfo info)
+ {
+ Debug.Assert(info.DenormalMantissaBits == 10);
+
+ Debug.Assert(number.GetDigitsPointer()[0] != '0');
+
+ Debug.Assert(number.Scale <= FloatingPointMaxExponent);
+ Debug.Assert(number.Scale >= FloatingPointMinExponent);
+
+ Debug.Assert(number.DigitsCount != 0);
+
+ // The input is of the form 0.Mantissa x 10^Exponent, where 'Mantissa' are
+ // the decimal digits of the mantissa and 'Exponent' is the decimal exponent.
+ // We decompose the mantissa into two parts: an integer part and a fractional
+ // part. If the exponent is positive, then the integer part consists of the
+ // first 'exponent' digits, or all present digits if there are fewer digits.
+ // If the exponent is zero or negative, then the integer part is empty. In
+ // either case, the remaining digits form the fractional part of the mantissa.
+
+ uint totalDigits = (uint)(number.DigitsCount);
+ uint positiveExponent = (uint)(Math.Max(0, number.Scale));
+
+ uint integerDigitsPresent = Math.Min(positiveExponent, totalDigits);
+ uint fractionalDigitsPresent = totalDigits - integerDigitsPresent;
+
+ int exponent = (int)(number.Scale - integerDigitsPresent - fractionalDigitsPresent);
+ int fastExponent = Math.Abs(exponent);
+
+ // Above 19 digits, we rely on slow path
+ if (totalDigits <= 19)
+ {
+ byte* src = number.GetDigitsPointer();
+
+ // When the number of significant digits is less than or equal to MaxMantissaFastPath and the
+ // scale is less than or equal to MaxExponentFastPath, we can take some shortcuts and just rely
+ // on floating-point arithmetic to compute the correct result. This is
+ // because each floating-point precision values allows us to exactly represent
+ // different whole integers and certain powers of 10, depending on the underlying
+ // formats exact range. Additionally, IEEE operations dictate that the result is
+ // computed to the infinitely precise result and then rounded, which means that
+ // we can rely on it to produce the correct result when both inputs are exact.
+ // This is known as Clinger's fast path
+
+ ulong mantissa = DigitsToUInt64(src, (int)(totalDigits));
+
+ if ((mantissa <= info.MaxMantissaFastPath) && (fastExponent <= info.MaxExponentFastPath))
+ {
+ double mantissa_d = mantissa;
+ double scale = s_Pow10DoubleTable[fastExponent];
+
+ if (fractionalDigitsPresent != 0)
+ {
+ mantissa_d /= scale;
+ }
+ else
+ {
+ mantissa_d *= scale;
+ }
+
+ return BitConverter.HalfToUInt16Bits((Half)(mantissa_d));
+ }
+
+ // Number Parsing at a Gigabyte per Second, Software: Practice and Experience 51(8), 2021
+ // https://arxiv.org/abs/2101.11408
+ (int Exponent, ulong Mantissa) am = ComputeFloat(exponent, mantissa, info);
+
+ // If we called ComputeFloat and we have an invalid power of 2 (Exponent < 0),
+ // then we need to go the slow way around again. This is very uncommon.
+ if (am.Exponent > 0)
+ {
+ ulong word = am.Mantissa;
+ word |= (ulong)(uint)(am.Exponent) << info.DenormalMantissaBits;
+ return (ushort)word;
+ }
+
+ }
+ return (ushort)NumberToFloatingPointBitsSlow(ref number, in info, positiveExponent, integerDigitsPresent, fractionalDigitsPresent);
+ }
+
+ internal enum ParsingStatus // No ParsingStatus.Overflow because these types can represent infinity
{
OK,
Failed
From 474cdcb996a3d48e2e78a61988ad0b01e22eede8 Mon Sep 17 00:00:00 2001
From: Drew Kersnar <18474647+dakersnar@users.noreply.github.com>
Date: Mon, 19 Dec 2022 11:23:44 -0600
Subject: [PATCH 08/39] Make AllowHyphenDuringParsing public
---
.../System/Globalization/NumberFormatInfo.cs | 2 +-
.../src/System/Numerics/IeeeDecimalNumber.cs | 26 +++++++++++++++++--
.../System.Runtime/ref/System.Runtime.cs | 1 +
3 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/NumberFormatInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/NumberFormatInfo.cs
index 3d2c60fd01550b..b3ab95500b35c8 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/NumberFormatInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/NumberFormatInfo.cs
@@ -136,7 +136,7 @@ private static void VerifyDigitSubstitution(DigitShapes digitSub, string propert
}
internal bool HasInvariantNumberSigns => _hasInvariantNumberSigns;
- internal bool AllowHyphenDuringParsing => _allowHyphenDuringParsing;
+ public bool AllowHyphenDuringParsing => _allowHyphenDuringParsing;
private void InitializeInvariantAndNegativeSignFlags()
{
diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs
index 0274b3ed1c14f8..fd96fb37f75954 100644
--- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs
+++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/IeeeDecimalNumber.cs
@@ -15,9 +15,19 @@
namespace System.Numerics
{
- internal static class IeeeDecimalNumber
+
+
+/* // Extension of NumberFormatInfo to bring in internal helpers, if needed
+ internal static class NumberFormatInfoExtension
{
+ public static bool Extension_AllowHyphenDuringParsing(this NumberFormatInfo formatInfo)
+ {
+ return formatInfo.AllowHyphenDuringParsing;
+ }
+ }*/
+ internal static class IeeeDecimalNumber
+ {
// IeeeDecimalNumberBuffer
internal const int Decimal32BufferLength = 0 + 1 + 1; // TODO: X for the longest input + 1 for rounding (+1 for the null terminator)
@@ -402,7 +412,7 @@ private static unsafe bool TryParseNumber(scoped ref char* str, char* strEnd, Nu
{
char* temp = p;
ch = ++p < strEnd ? *p : '\0';
- if ((next = MatchChars(p, strEnd, info._positiveSign)) != null)
+ if ((next = MatchChars(p, strEnd, info.PositiveSign)) != null)
{
ch = (p = next) < strEnd ? *p : '\0';
}
@@ -499,6 +509,18 @@ private static unsafe bool TryParseNumber(scoped ref char* str, char* strEnd, Nu
return false;
}
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static unsafe char* MatchNegativeSignChars(char* p, char* pEnd, NumberFormatInfo info)
+ {
+ char* ret = MatchChars(p, pEnd, info.NegativeSign);
+ if (ret == null && info.AllowHyphenDuringParsing && p < pEnd && *p == '-')
+ {
+ ret = p + 1;
+ }
+
+ return ret;
+ }
+
private static unsafe char* MatchChars(char* p, char* pEnd, string value)
{
Debug.Assert(p != null && pEnd != null && p <= pEnd && value != null);
diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs
index e0d5586ee46573..095c4a3f0e0fce 100644
--- a/src/libraries/System.Runtime/ref/System.Runtime.cs
+++ b/src/libraries/System.Runtime/ref/System.Runtime.cs
@@ -8736,6 +8736,7 @@ public KoreanLunisolarCalendar() { }
public sealed partial class NumberFormatInfo : System.ICloneable, System.IFormatProvider
{
public NumberFormatInfo() { }
+ public bool AllowHyphenDuringParsing { get { throw null; } }
public int CurrencyDecimalDigits { get { throw null; } set { } }
public string CurrencyDecimalSeparator { get { throw null; } set { } }
public string CurrencyGroupSeparator { get { throw null; } set { } }
From c327401407a39266afe6e3539cafdfa8f3743d72 Mon Sep 17 00:00:00 2001
From: Drew Kersnar <18474647+dakersnar@users.noreply.github.com>
Date: Mon, 19 Dec 2022 13:42:03 -0600
Subject: [PATCH 09/39] Fix csproj file to include IeeeDecimalNumber.cs
---
.../System.Runtime.Numerics/src/System.Runtime.Numerics.csproj | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj b/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj
index 23f147615ff226..be5c8efa5eab43 100644
--- a/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj
+++ b/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj
@@ -1,4 +1,4 @@
-
+