diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cbd62be --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +**/obj +**/bin +.vs/ +packages/ diff --git a/DecimalSharp.Core/BigDecimalArgument.cs b/DecimalSharp.Core/BigDecimalArgument.cs new file mode 100644 index 0000000..464c450 --- /dev/null +++ b/DecimalSharp.Core/BigDecimalArgument.cs @@ -0,0 +1,109 @@ +using System.Numerics; + +namespace DecimalSharp.Core +{ + public struct BigDecimalArgument + { + readonly double _value0; + readonly decimal _value1; + readonly long _value2; + readonly int _value3; + readonly string? _value4; + readonly BigInteger _value5; + readonly TBigDecimal? _value6; + readonly int _index; + + BigDecimalArgument(int index, double value0 = default, decimal value1 = default, long value2 = default, int value3 = default, string? value4 = default, BigInteger value5 = default, TBigDecimal? value6 = default) + { + _index = index; + _value0 = value0; + _value1 = value1; + _value2 = value2; + _value3 = value3; + _value4 = value4; + _value5 = value5; + _value6 = value6; + } + + public static implicit operator BigDecimalArgument(double t) => new(0, value0: t); + public static implicit operator BigDecimalArgument(decimal t) => new(1, value1: t); + public static implicit operator BigDecimalArgument(long t) => new(2, value2: t); + public static implicit operator BigDecimalArgument(int t) => new(3, value3: t); + public static implicit operator BigDecimalArgument(string? t) => new(4, value4: t); + public static implicit operator BigDecimalArgument(BigInteger t) => new(5, value5: t); + public static implicit operator BigDecimalArgument(TBigDecimal? t) => new(6, value6: t); + + public void Switch(Action f0, Action f1, Action f2, Action f3, Action f4, Action f5, Action f6) + { + if (_index == 0 && f0 != null) + { + f0(_value0); + return; + } + if (_index == 1 && f1 != null) + { + f1(_value1); + return; + } + if (_index == 2 && f2 != null) + { + f2(_value2); + return; + } + if (_index == 3 && f3 != null) + { + f3(_value3); + return; + } + if (_index == 4 && f4 != null) + { + f4(_value4); + return; + } + if (_index == 5 && f5 != null) + { + f5(_value5); + return; + } + if (_index == 6 && f6 != null) + { + f6(_value6); + return; + } + throw new InvalidOperationException(); + } + + public TResult Match(Func f0, Func f1, Func f2, Func f3, Func f4, Func f5, Func f6) + { + if (_index == 0 && f0 != null) + { + return f0(_value0); + } + if (_index == 1 && f1 != null) + { + return f1(_value1); + } + if (_index == 2 && f2 != null) + { + return f2(_value2); + } + if (_index == 3 && f3 != null) + { + return f3(_value3); + } + if (_index == 4 && f4 != null) + { + return f4(_value4); + } + if (_index == 5 && f5 != null) + { + return f5(_value5); + } + if (_index == 6 && f6 != null) + { + return f6(_value6); + } + throw new InvalidOperationException(); + } + } +} diff --git a/DecimalSharp.Core/BigDecimalDivisionFunctions.cs b/DecimalSharp.Core/BigDecimalDivisionFunctions.cs new file mode 100644 index 0000000..4b3edd2 --- /dev/null +++ b/DecimalSharp.Core/BigDecimalDivisionFunctions.cs @@ -0,0 +1,66 @@ +using DecimalSharp.Core.Extensions; + +namespace DecimalSharp.Core +{ + public class BigDecimalDivisionFunctions + { + // Assumes non-zero x and k, and hence non-zero result. + protected static int[] multiplyInteger(int[] x, long k, int @base) + { + long temp; + int carry = 0; + long i = x.LongLength; + + for (x = x.Slice(); i--.IsTrue();) + { + temp = (long)x[i] * k + carry; + x[i] = (int)(temp % @base) | 0; + carry = (int)(temp / @base) | 0; + } + + if (carry.IsTrue()) ArrayExtensions.Unshift(ref x, carry); + + return x; + } + + protected static int compare(int[] a, int[] b, long aL, long bL) + { + long i; + int r; + + if (aL != bL) + { + r = aL > bL ? 1 : -1; + } + else + { + for (i = r = 0; i < aL; i++) + { + if (a[i] != b[i]) + { + r = a[i] > b[i] ? 1 : -1; + break; + } + } + } + + return r; + } + + protected static void subtract(ref int[] a, int[] b, long aL, int @base) + { + var i = 0; + + // Subtract b from a. + for (; aL--.IsTrue();) + { + a[aL] -= i; + i = a[aL] < b[aL] ? 1 : 0; + a[aL] = i * @base + a[aL] - b[aL]; + } + + // Remove leading zeros. + for (; !a[0].IsTrue() && a.LongLength > 1;) ArrayExtensions.Shift(ref a); + } + } +} diff --git a/DecimalSharp.Core/BigDecimalException.cs b/DecimalSharp.Core/BigDecimalException.cs new file mode 100644 index 0000000..41316ae --- /dev/null +++ b/DecimalSharp.Core/BigDecimalException.cs @@ -0,0 +1,12 @@ +namespace DecimalSharp.Core; + +public class BigDecimalException : Exception +{ + public static string DecimalError = "[DecimalError] "; + public static string InvalidArgument = DecimalError + "Invalid argument: "; + public static string PrecisionLimitExceeded = DecimalError + "Precision limit exceeded"; + public static string ExponentOutOfRange = DecimalError + "Exponent out of range: "; + + public BigDecimalException() : base() { } + public BigDecimalException(string message) : base(message) { } +} diff --git a/DecimalSharp.Core/DecimalSharp.Core.csproj b/DecimalSharp.Core/DecimalSharp.Core.csproj new file mode 100644 index 0000000..2d4b03e --- /dev/null +++ b/DecimalSharp.Core/DecimalSharp.Core.csproj @@ -0,0 +1,35 @@ + + + + net6.0 + enable + enable + True + 1.0.0 + XeroXP + + An arbitrary-precision Decimal type for C#. + Port of [decimal.js](https://github.com/MikeMcl/decimal.js/). + + Copyright (c) $(Authors) 2022 + https://github.com/XeroXP/DecimalSharp + README.md + https://github.com/XeroXP/DecimalSharp.git + git + decimal, arbitrary-precision, bigdecimal, bignumber, significant-digits, trigonometric-functions, decimal-places + LICENSE + False + + + + + True + \ + + + True + \ + + + + diff --git a/DecimalSharp.Core/Extensions/ArrayExtensions.cs b/DecimalSharp.Core/Extensions/ArrayExtensions.cs new file mode 100644 index 0000000..4625ce1 --- /dev/null +++ b/DecimalSharp.Core/Extensions/ArrayExtensions.cs @@ -0,0 +1,115 @@ +namespace DecimalSharp.Core.Extensions +{ + public static class ArrayExtensions + { + public static void Resize(ref T[] numbers, long newSize) + { + var newNumbers = new T[newSize]; + Array.Copy(numbers, 0, newNumbers, 0, Math.Min(numbers.LongLength, newSize)); + numbers = newNumbers; + } + + public static void Reverse(ref T[] numbers) + { + Array.Reverse(numbers); + /*for (long i = 0; i < numbers.LongLength / 2; i++) + { + var tmp = numbers[i]; + numbers[i] = numbers[numbers.LongLength - i - 1]; + numbers[numbers.LongLength - i - 1] = tmp; + }*/ + } + + public static void Pop(ref T[] numbers) + { + Resize(ref numbers, numbers.LongLength - 1); + } + + public static void Push(ref T[] numbers, T value) + { + AddElementAt(ref numbers, numbers.LongLength, value); + } + + public static T[] Slice(this T[] numbers, long start = 0, long length = 0) + { + if (length == 0) length = numbers.LongLength - start; + + if (length > numbers.LongLength - start) length = numbers.LongLength - start; + T[] destfoo = new T[length]; + Array.Copy(numbers, start, destfoo, 0, length); + return destfoo; + } + + public static T[] StringSlice(this T[] numbers, long start = 0, long end = 0) + { + if (start >= numbers.LongLength) return new T[0]; + + if (end == 0) end = numbers.LongLength; + if (end > numbers.LongLength) end = numbers.LongLength; + + var length = end - start; + + T[] destfoo = new T[length]; + Array.Copy(numbers, start, destfoo, 0, length); + return destfoo; + } + + public static T Shift(ref T[] numbers) + { + if (numbers.LongLength == 0) + return default(T); + + T[] cloneArray = (T[])numbers.Clone(); + Resize(ref numbers, numbers.LongLength - 1); + for(long i = 1; i < cloneArray.LongLength; i++) + { + numbers[i-1] = cloneArray[i]; + } + return cloneArray[0]; + } + + public static void Unshift(ref T[] numbers, params T[] values) + { + foreach (var value in values.Reverse()) + { + AddElementAt(ref numbers, 0, value); + } + } + + /// + /// Add element at nth position in array + /// + /// Source Array + /// Position Number + /// the value to be entered + public static void AddElementAt(ref T[] numbers, long index, T value) + { + //first resize it + Resize(ref numbers, numbers.LongLength + 1); + + long orginalLength = numbers.LongLength; + //clone the array + T[] cloneArray = (T[])numbers.Clone(); + for (long i = 0; i < orginalLength; i++) + { + if (i == index) + { + //copy element from the position + var element = cloneArray[index]; + numbers[index] = value; + if (i + 1 < orginalLength) + numbers[index + 1] = element; + } + else if (i > index) + { + if (i + 1 < orginalLength) + numbers[i + 1] = cloneArray[i]; + } + else + { + numbers[i] = cloneArray[i]; + } + } + } + } +} diff --git a/DecimalSharp.Core/Extensions/NumberExtensions.cs b/DecimalSharp.Core/Extensions/NumberExtensions.cs new file mode 100644 index 0000000..bae814a --- /dev/null +++ b/DecimalSharp.Core/Extensions/NumberExtensions.cs @@ -0,0 +1,46 @@ +using System.Globalization; + +namespace DecimalSharp.Core.Extensions +{ + public static class NumberExtensions + { + public static string ToExponential(this double? value, int? fractionDigits = null) + { + if (!value.HasValue) return ""; + + return value.Value.ToExponential(fractionDigits); + } + + public static string ToExponential(this double value, int? fractionDigits = null) + { + if (!fractionDigits.HasValue) + { + return value.ToString("0.####################e+0", CultureInfo.InvariantCulture); + } + + return value.ToString("0." + string.Empty.PadRight(fractionDigits.Value, '0') + "e+0", CultureInfo.InvariantCulture); + } + + /*public static bool IsTrue(this T[] value) + { + return value.LongLength != 0; + }*/ + + public static bool IsTrue(this T[]? value) + { + return value != null && value.LongLength != 0; + } + + public static bool IsTrue(this T value) where T : struct + { + return !value.Equals(default(T)); + } + + public static bool IsTrue(this T? value) where T : struct + { + if (value == null) return false; + + return value.HasValue && !value.Value.Equals(default(T)); + } + } +} diff --git a/DecimalSharp.Core/Extensions/StringExtensions.cs b/DecimalSharp.Core/Extensions/StringExtensions.cs new file mode 100644 index 0000000..8c2e78e --- /dev/null +++ b/DecimalSharp.Core/Extensions/StringExtensions.cs @@ -0,0 +1,15 @@ +namespace DecimalSharp.Core.Extensions +{ + public static class StringExtensions + { + public static string Slice(this string str, int start = 0, int end = 0) + { + if (start >= str.Length) return ""; + + if (end == 0) end = str.Length; + if (end > str.Length) end = str.Length; + + return str.Substring(start, end - start); + } + } +} diff --git a/DecimalSharp.Core/LongString.cs b/DecimalSharp.Core/LongString.cs new file mode 100644 index 0000000..fbef5a2 --- /dev/null +++ b/DecimalSharp.Core/LongString.cs @@ -0,0 +1,172 @@ +using System.Globalization; + +namespace DecimalSharp.Core +{ + public class LongString + { + internal char[] chars; + + public int Length + { + get { return this.chars.Length; } + } + + public long LongLength + { + get { return this.chars.LongLength; } + } + + public LongString(char[]? chars = null) + { + if (chars != null) this.chars = chars; + else this.chars = new char[0]; + } + + public LongString Slice(long start = 0, long end = 0) + { + if (start >= chars.LongLength) return ""; + + if (end == 0) end = chars.LongLength; + if (end > chars.Length) end = chars.LongLength; + + var length = end - start; + + char[] destfoo = new char[length]; + Array.Copy(chars, start, destfoo, 0, length); + return new LongString(destfoo); + } + + public string Replace(string oldValue, string? newValue) + { + return ToString().Replace(oldValue, newValue); + } + + public string ToLowerInvariant() + { + return ToString().ToLowerInvariant(); + } + + public long IndexOf(char ch, StringComparison? stringComparison = null) + { + return Array.FindIndex(chars, c => + { + if (stringComparison == StringComparison.InvariantCultureIgnoreCase + || stringComparison == StringComparison.OrdinalIgnoreCase + || stringComparison == StringComparison.CurrentCultureIgnoreCase) + return c.ToString().ToLowerInvariant() == ch.ToString().ToLowerInvariant(); + return c == ch; + }); + } + + public long IndexOf(string ch, StringComparison? stringComparison = null) + { + var x = chars; + var y = ch.ToCharArray(); + return (from i in Enumerable.Range(0, 1 + x.Length - y.Length) + where x.Skip(i).Take(y.Length).SequenceEqual(y, new CharComparer(stringComparison)) + select (int?)i).FirstOrDefault().GetValueOrDefault(-1); + } + + public char ElementAt(long index) + { + return chars[index]; + } + + public override string ToString() + { + return new string(chars); + } + + public override bool Equals(object? obj) + { + if (obj != null) + { + if (obj is LongString objLongString) + { + return Enumerable.SequenceEqual(chars, objLongString.chars); + } + else if (obj is string objString) + { + return Enumerable.SequenceEqual(chars, objString.ToCharArray()); + } + else if (obj is char[] objCharArr) + { + return Enumerable.SequenceEqual(chars, objCharArr); + } + } + + return false; + } + + public override int GetHashCode() + { + return ToString().GetHashCode(); + } + + public static LongString operator +(LongString a, LongString b) + { + LongString newLS = new(); + newLS.chars = new char[a.chars.LongLength + b.chars.LongLength]; + Array.Copy(a.chars, 0, newLS.chars, 0, a.chars.LongLength); + Array.Copy(b.chars, 0, newLS.chars, a.chars.LongLength, b.chars.LongLength); + return newLS; + } + + public static LongString operator +(LongString a, string b0) + { + var b = b0.ToCharArray(); + LongString newLS = new(); + newLS.chars = new char[a.chars.LongLength + b.LongLength]; + Array.Copy(a.chars, 0, newLS.chars, 0, a.chars.LongLength); + Array.Copy(b, 0, newLS.chars, a.chars.LongLength, b.LongLength); + return newLS; + } + + public static LongString operator +(LongString a, long? b0) => a + (b0?.ToString(CultureInfo.InvariantCulture) ?? ""); + public static LongString operator +(LongString a, int? b0) => a + (b0?.ToString(CultureInfo.InvariantCulture) ?? ""); + public static LongString operator +(LongString a, char? b0) => a + (b0?.ToString(CultureInfo.InvariantCulture) ?? ""); + + public static implicit operator LongString(string? value) + { + return new LongString(value?.ToCharArray()); + } + public static implicit operator string(LongString v) { return v.ToString(); } + public static bool operator ==(LongString a, LongString b) + { + if (a is null) + { + return b is null; + } + + return a.Equals(b); + } + public static bool operator !=(LongString a, LongString b) + { + return !(a == b); + } + + internal class CharComparer : IEqualityComparer + { + StringComparison? stringComparison; + + public CharComparer(StringComparison? stringComparison = null) : base() + { + this.stringComparison = stringComparison; + } + + public bool Equals(char x, char y) + { + if (stringComparison == StringComparison.InvariantCultureIgnoreCase + || stringComparison == StringComparison.OrdinalIgnoreCase + || stringComparison == StringComparison.CurrentCultureIgnoreCase) + return x.ToString().ToLowerInvariant() == y.ToString().ToLowerInvariant(); + return x == y; + } + + public int GetHashCode(char obj) + { + return obj.GetHashCode(); + } + } + } +} diff --git a/DecimalSharp.Core/RoundingMode.cs b/DecimalSharp.Core/RoundingMode.cs new file mode 100644 index 0000000..f48b465 --- /dev/null +++ b/DecimalSharp.Core/RoundingMode.cs @@ -0,0 +1,42 @@ +namespace DecimalSharp.Core +{ + public enum RoundingMode + { + /// + /// Away from zero. + /// + ROUND_UP, + /// + /// Towards zero. + /// + ROUND_DOWN, + /// + /// Towards +Infinity. + /// + ROUND_CEIL, + /// + /// Towards -Infinity. + /// + ROUND_FLOOR, + /// + /// Towards nearest neighbour. If equidistant, up. + /// + ROUND_HALF_UP, + /// + /// Towards nearest neighbour. If equidistant, down. + /// + ROUND_HALF_DOWN, + /// + /// Towards nearest neighbour. If equidistant, towards even neighbour. + /// + ROUND_HALF_EVEN, + /// + /// Towards nearest neighbour. If equidistant, towards +Infinity. + /// + ROUND_HALF_CEIL, + /// + /// Towards nearest neighbour. If equidistant, towards -Infinity. + /// + ROUND_HALF_FLOOR + } +} diff --git a/DecimalSharp.Light/BigDecimalLight.cs b/DecimalSharp.Light/BigDecimalLight.cs new file mode 100644 index 0000000..ce37d81 --- /dev/null +++ b/DecimalSharp.Light/BigDecimalLight.cs @@ -0,0 +1,1131 @@ +using DecimalSharp.Core; +using DecimalSharp.Core.Extensions; +using System.Globalization; +using System.Numerics; +using System.Text.RegularExpressions; + +namespace DecimalSharp +{ + public class BigDecimalLight + { + public BigDecimalLightConfig Config; + + public int[] d; + public int s; + public long e; + + protected BigDecimalLight(BigDecimalLightConfig? config = null) + { + this.Config = config ?? new BigDecimalLightConfig(); + + this.s = 0; + this.e = 0; + this.d = new int[0]; + } + public BigDecimalLight(BigDecimalArgument v, BigDecimalLightConfig? config = null) : this(config) + { + v.Switch( + @double => _BigDecimalLight(@double), + @decimal => _BigDecimalLight(@decimal), + @long => _BigDecimalLight(@long), + @int => _BigDecimalLight(@int), + @string => _BigDecimalLight(@string), + bigInteger => _BigDecimalLight(bigInteger.ToString(CultureInfo.InvariantCulture)), + bigDecimal => _BigDecimalLight(bigDecimal) + ); + } + internal void _BigDecimalLight(string? v) + { + if (v == null) + throw new BigDecimalException(BigDecimalException.InvalidArgument + v); + + int? i = null; + // Minus sign? + if (v.Length > 0 && (i = v.ElementAt(0)) == 45) + { + v = v.Slice(1); + this.s = -1; + } + else + { + this.s = 1; + } + + var isDec = Regex.IsMatch(v, BigDecimalLightHelperFunctions.isDecimal, RegexOptions.IgnoreCase); + if (isDec) + { + _BigDecimalLight(BigDecimalLightHelperFunctions.parseDecimal(this, v)); + } + else + { + throw new BigDecimalException(BigDecimalException.InvalidArgument + v); + } + } + internal void _BigDecimalLight(int v) + { + if (v > 0) + { + this.s = 1; + } + else if (v < 0) + { + v = -v; + this.s = -1; + } + else + { + this.s = 0; + this.e = 0; + this.d = new int[] { 0 }; + return; + } + + // Fast path for small integers. + if (v == ~~v && v < 1e7) + { + this.e = 0; + this.d = new int[] { v }; + return; + } + + _BigDecimalLight(BigDecimalLightHelperFunctions.parseDecimal(this, v.ToString(CultureInfo.InvariantCulture))); + } + internal void _BigDecimalLight(long v) + { + if (v > 0) + { + this.s = 1; + } + else if (v < 0) + { + v = -v; + this.s = -1; + } + else + { + this.s = 0; + this.e = 0; + this.d = new int[] { 0 }; + return; + } + + // Fast path for small integers. + if (v == ~~v && v < 1e7) + { + this.e = 0; + this.d = new int[] { (int)v }; + return; + } + + _BigDecimalLight(BigDecimalLightHelperFunctions.parseDecimal(this, v.ToString(CultureInfo.InvariantCulture))); + } + + internal void _BigDecimalLight(double v) + { + if (double.IsNaN(v) || double.IsInfinity(v)) + throw new BigDecimalException(BigDecimalException.InvalidArgument + v); + + if (v > 0) + { + this.s = 1; + } + else if (v < 0) + { + v = -v; + this.s = -1; + } + else + { + this.s = 0; + this.e = 0; + this.d = new int[] { 0 }; + return; + } + + _BigDecimalLight(BigDecimalLightHelperFunctions.parseDecimal(this, v.ToString(CultureInfo.InvariantCulture))); + } + + internal void _BigDecimalLight(decimal v) + { + if (v > 0) + { + this.s = 1; + } + else if (v < 0) + { + v = -v; + this.s = -1; + } + else + { + this.s = 0; + this.e = 0; + this.d = new int[] { 0 }; + return; + } + + _BigDecimalLight(BigDecimalLightHelperFunctions.parseDecimal(this, v.ToString(CultureInfo.InvariantCulture))); + } + internal void _BigDecimalLight(BigDecimalLight? v) + { + if (v == null) + throw new BigDecimalException(BigDecimalException.InvalidArgument + v); + + this.s = v.s; + this.e = v.e; + this.d = v.d.IsTrue() ? v.d.Slice() : v.d; + } + + + // Decimal prototype methods + + + /* + * absoluteValue abs + * comparedTo cmp + * decimalPlaces dp + * dividedBy div + * dividedToIntegerBy idiv + * equals eq + * exponent + * greaterThan gt + * greaterThanOrEqualTo gte + * isInteger isint + * isNegative isneg + * isPositive ispos + * isZero + * lessThan lt + * lessThanOrEqualTo lte + * logarithm log + * minus sub + * modulo mod + * naturalExponential exp + * naturalLogarithm ln + * negated neg + * plus add + * precision sd + * squareRoot sqrt + * times mul + * toDecimalPlaces todp + * toExponential + * toFixed + * toInteger toint + * toNumber + * toPower pow + * toPrecision + * toSignificantDigits tosd + * toString + * valueOf val + */ + + + /// + /// + /// + /// A new BigDecimalLight whose value is the absolute value of this BigDecimalLight. + public BigDecimalLight Abs() + { + var x = new BigDecimalLight(this, this.Config); + if (x.s.IsTrue()) x.s = 1; + return x; + } + /// + public BigDecimalLight AbsoluteValue() => Abs(); + + + /// + /// + /// + /// + /// 1 if the value of this BigDecimalLight is greater than the value of `y`, + ///
-1 if the value of this BigDecimalLight is less than the value of `y`, + ///
0 if they have the same value.
+ public int Cmp(BigDecimalArgument y) => _cmp(new BigDecimalLight(y, this.Config)); + private int _cmp(BigDecimalLight y) + { + long i, j, xdL, ydL; + var x = this; + + // Signs differ? + if (x.s != y.s) return x.s.IsTrue() ? x.s : -y.s; + + // Compare exponents. + if (x.e != y.e) return x.e > y.e ^ x.s < 0 ? 1 : -1; + + xdL = x.d.LongLength; + ydL = y.d.LongLength; + + // Compare digit by digit. + for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) + { + if (x.d[i] != y.d[i]) return x.d[i] > y.d[i] ^ x.s < 0 ? 1 : -1; + } + + // Compare lengths. + return xdL == ydL ? 0 : xdL > ydL ^ x.s < 0 ? 1 : -1; + } + /// + public int ComparedTo(BigDecimalArgument y) => Cmp(y); + + + /// + /// + /// + /// The number of decimal places of the value of this BigDecimalLight. + public long Dp() + { + var x = this; + long w = x.d.LongLength - 1; + var dp = (w - x.e) * BigDecimalLightHelperFunctions.LOG_BASE; + + // Subtract the number of trailing zeros of the last word. + w = x.d[w]; + if (w.IsTrue()) for (; w % 10 == 0; w /= 10) dp--; + + return dp < 0 ? 0 : dp; + } + /// + public long DecimalPlaces() => Dp(); + + + /// + /// + /// + /// + /// A new BigDecimalLight whose value is the value of this BigDecimalLight divided by `y`, truncated to + /// `precision` significant digits. + public BigDecimalLight Div(BigDecimalArgument y) => _div(new BigDecimalLight(y, this.Config)); + private BigDecimalLight _div(BigDecimalLight y) + { + return BigDecimalLightHelperFunctions.divide(this, y); + } + /// + public BigDecimalLight DividedBy(BigDecimalArgument y) => Div(y); + + + /// + /// + /// + /// + /// A new BigDecimalLight whose value is the integer part of dividing the value of this BigDecimalLight + /// by the value of `y`, truncated to `precision` significant digits. + public BigDecimalLight Idiv(BigDecimalArgument y) => _idiv(new BigDecimalLight(y, this.Config)); + private BigDecimalLight _idiv(BigDecimalLight y) + { + var x = this; + var Ctor = x.Config; + return BigDecimalLightHelperFunctions.round(BigDecimalLightHelperFunctions.divide(x, y, 0, 1), Ctor.Precision); + } + /// + public BigDecimalLight DividedToIntegerBy(BigDecimalArgument y) => Idiv(y); + + + /// + /// + /// + /// + /// True if the value of this BigDecimalLight is equal to the value of `y`, otherwise false. + public bool Eq(BigDecimalArgument y) + { + return !this.Cmp(y).IsTrue(); + } + /// + public bool Equals(BigDecimalArgument y) => Eq(y); + + + /// + /// + /// + /// The (base 10) exponent value of this BigDecimalLight (this.e is the base 10000000 exponent). + public long Exponent() + { + return BigDecimalLightHelperFunctions.getBase10Exponent(this); + } + + + /// + /// + /// + /// + /// True if the value of this BigDecimalLight is greater than the value of `y`, otherwise + /// false. + public bool Gt(BigDecimalArgument y) + { + return this.Cmp(y) > 0; + } + /// + public bool GreaterThan(BigDecimalArgument y) => Gt(y); + + + /// + /// + /// + /// + /// True if the value of this BigDecimalLight is greater than or equal to the value of `y`, + /// otherwise false. + public bool Gte(BigDecimalArgument y) + { + return this.Cmp(y) >= 0; + } + /// + public bool GreaterThanOrEqualTo(BigDecimalArgument y) => Gte(y); + + + /// + /// + /// + /// True if the value of this BigDecimalLight is an integer, otherwise false. + public bool IsInt() + { + return this.e > this.d.LongLength - 2; + } + public bool IsInteger() => IsInt(); + + + /// + /// + /// + /// True if the value of this BigDecimalLight is negative, otherwise false. + public bool IsNeg() + { + return this.s < 0; + } + /// + public bool IsNegative() => IsNeg(); + + + /// + /// + /// + /// True if the value of this BigDecimalLight is positive, otherwise false. + public bool IsPos() + { + return this.s > 0; + } + /// + public bool IsPositive() => IsPos(); + + + /// + /// + /// + /// True if the value of this BigDecimalLight is 0, otherwise false. + public bool IsZero() + { + return this.s == 0; + } + + + /// + /// + /// + /// + /// True if the value of this BigDecimalLight is less than `y`, otherwise false. + public bool Lt(BigDecimalArgument y) + { + return this.Cmp(y) < 0; + } + /// + public bool LessThan(BigDecimalArgument y) => Lt(y); + + + /// + /// + /// + /// + /// True if the value of this BigDecimalLight is less than or equal to `y`, otherwise false. + public bool Lte(BigDecimalArgument y) + { + return this.Cmp(y) < 1; + } + /// + public bool LessThanOrEqualTo(BigDecimalArgument y) => Lte(y); + + + /// + /// The maximum error of the result is 1 ulp (unit in the last place). + /// + /// The base of the logarithm. Default = 10. + /// The logarithm of the value of this BigDecimalLight to the specified base, truncated to + /// `precision` significant digits.

+ /// If no base is specified, default base = 10 used.
+ public BigDecimalLight Log(BigDecimalArgument @base) + { + return @base.Match( + @double => _log(new BigDecimalLight(@double, this.Config)), + @decimal => _log(new BigDecimalLight(@decimal, this.Config)), + @long => _log(new BigDecimalLight(@long, this.Config)), + @int => _log(new BigDecimalLight(@int, this.Config)), + @string => + { + if (string.IsNullOrEmpty(@string)) return _log(new BigDecimalLight(10, this.Config)); + return _log(new BigDecimalLight(@string, this.Config)); + }, + bigInteger => _log(new BigDecimalLight(bigInteger, this.Config)), + bigDecimal => { + if (bigDecimal == null) return _log(new BigDecimalLight(10, this.Config)); + return _log(new BigDecimalLight(bigDecimal, this.Config)); + } + ); + } + private BigDecimalLight _log(BigDecimalLight @base) + { + BigDecimalLight r; + var x = this; + var Ctor = x.Config; + var pr = Ctor.Precision; + var wpr = pr + 5; + + // log[-b](x) = NaN + // log[0](x) = NaN + // log[1](x) = NaN + if (@base.s < 1 || @base.Eq(BigDecimalLightHelperFunctions.ONE)) + throw new BigDecimalException(BigDecimalException.DecimalError + "NaN"); + + // log[b](-x) = NaN + // log[b](0) = -Infinity + if (x.s < 1) throw new BigDecimalException(BigDecimalException.DecimalError + (x.s.IsTrue() ? "NaN" : "-Infinity")); + + // log[b](1) = 0 + if (x.Eq(BigDecimalLightHelperFunctions.ONE)) return new BigDecimalLight(0, Ctor); + + Ctor.external = false; + r = BigDecimalLightHelperFunctions.divide(BigDecimalLightHelperFunctions.ln(x, wpr), BigDecimalLightHelperFunctions.ln(@base, wpr), wpr); + Ctor.external = true; + + return BigDecimalLightHelperFunctions.round(r, pr); + } + /// + public BigDecimalLight Logarithm(BigDecimalArgument @base) => Log(@base); + + + /// + /// + /// + /// + /// A new BigDecimalLight whose value is the value of this BigDecimalLight minus `y`, truncated to + /// `precision` significant digits. + public BigDecimalLight Sub(BigDecimalArgument y) => _sub(new BigDecimalLight(y, this.Config)); + private BigDecimalLight _sub(BigDecimalLight y) + { + var x = this; + + if (x.s == y.s) return BigDecimalLightHelperFunctions.subtract(x, y); + else + { + y.s = -y.s; + return BigDecimalLightHelperFunctions.add(x, y); + } + } + /// + public BigDecimalLight Minus(BigDecimalArgument y) => Sub(y); + + + /// + /// + /// + /// + /// A new BigDecimalLight whose value is the value of this BigDecimalLight modulo `y`, truncated to + /// `precision` significant digits. + public BigDecimalLight Mod(BigDecimalArgument y) => _mod(new BigDecimalLight(y, this.Config)); + private BigDecimalLight _mod(BigDecimalLight y) + { + BigDecimalLight q; + var x = this; + var Ctor = x.Config; + var pr = Ctor.Precision; + + // x % 0 = NaN + if (!y.s.IsTrue()) throw new BigDecimalException(BigDecimalException.DecimalError + "NaN"); + + // Return x if x is 0. + if (!x.s.IsTrue()) return BigDecimalLightHelperFunctions.round(new BigDecimalLight(x, Ctor), pr); + + // Prevent rounding of intermediate calculations. + Ctor.external = false; + q = BigDecimalLightHelperFunctions.divide(x, y, 0, 1).Times(y); + Ctor.external = true; + + return x.Minus(q); + } + /// + public BigDecimalLight Modulo(BigDecimalArgument y) => Mod(y); + + + /// + /// + /// + /// A new BigDecimalLight whose value is the natural exponential of the value of this BigDecimalLight, + /// i.e. the base e raised to the power the value of this BigDecimalLight, truncated to `precision` + /// significant digits. + public BigDecimalLight Exp() + { + return BigDecimalLightHelperFunctions.exp(this); + } + /// + public BigDecimalLight NaturalExponential() => Exp(); + + + /// + /// + /// + /// A new BigDecimalLight whose value is the natural logarithm of the value of this BigDecimalLight, + /// truncated to `precision` significant digits. + public BigDecimalLight Ln() + { + return BigDecimalLightHelperFunctions.ln(this); + } + public BigDecimalLight NaturalLogarithm() => Ln(); + + + /// + /// + /// + /// a new BigDecimalLight whose value is the value of this BigDecimalLight negated, i.e. as if multiplied by + /// -1. + public BigDecimalLight Neg() + { + var x = new BigDecimalLight(this, this.Config); + x.s = -x.s; + return x; + } + /// + public BigDecimalLight Negated() => Neg(); + + + /// + /// + /// + /// + /// A new BigDecimalLight whose value is the value of this BigDecimalLight plus `y`, truncated to + /// `precision` significant digits. + public BigDecimalLight Add(BigDecimalArgument y) => _add(new BigDecimalLight(y, this.Config)); + private BigDecimalLight _add(BigDecimalLight y) + { + var x = this; + if (x.s == y.s) return BigDecimalLightHelperFunctions.add(x, y); + else + { + y.s = -y.s; + return BigDecimalLightHelperFunctions.subtract(x, y); + } + } + /// + public BigDecimalLight Plus(BigDecimalArgument y) => Add(y); + + + /// + /// + /// + /// Whether to count integer-part trailing zeros. + /// The number of significant digits of the value of this BigDecimalLight. + public long Sd(bool? z = null) => Sd(z.HasValue && z.Value ? 1 : 0); + /// + public long Sd(long? z) + { + long e, sd, w; + var x = this; + + if (z != null && z != 1 && z != 0) throw new BigDecimalException(BigDecimalException.InvalidArgument + z); + + e = BigDecimalLightHelperFunctions.getBase10Exponent(x) + 1; + w = x.d.LongLength - 1; + sd = w * BigDecimalLightHelperFunctions.LOG_BASE + 1; + w = x.d[w]; + + // If non-zero... + if (w.IsTrue()) + { + + // Subtract the number of trailing zeros of the last word. + for (; w % 10 == 0; w /= 10) sd--; + + // Add the number of digits of the first word. + for (w = x.d[0]; w >= 10; w /= 10) sd++; + } + + return z.IsTrue() && e > sd ? e : sd; + } + /// + public long Precision(bool? z = null) => Sd(z); + /// + public long Precision(long? z) => Sd(z); + + + /// + /// + /// + /// A new BigDecimalLight whose value is the square root of this BigDecimalLight, truncated to `precision` + /// significant digits. + public BigDecimalLight Sqrt() + { + LongString n; + long e, pr, wpr; + double s; + BigDecimalLight r, t; + var x = this; + var Ctor = x.Config; + + // Negative or zero? + if (x.s < 1) + { + if (!x.s.IsTrue()) return new BigDecimalLight(0, Ctor); + + // sqrt(-x) = NaN + throw new BigDecimalException(BigDecimalException.DecimalError + "NaN"); + } + + e = BigDecimalLightHelperFunctions.getBase10Exponent(x); + Ctor.external = false; + + // Initial estimate. + s = Math.Sqrt(x.ToNumber()); + + // Math.sqrt underflow/overflow? + // Pass x to Math.sqrt as integer, then adjust the exponent of the result. + if (s == 0 || s == double.PositiveInfinity) + { + n = BigDecimalLightHelperFunctions.digitsToString(x.d); + if ((n.LongLength + e) % 2 == 0) n += '0'; + s = Math.Sqrt(double.Parse(n, CultureInfo.InvariantCulture)); + e = (long)Math.Floor(((double)e + 1) / 2) - ((e < 0 || (e % 2).IsTrue()) ? 1 : 0); + + if (s == double.PositiveInfinity) + { + n = "5e" + e; + } + else + { + n = s.ToExponential(); + n = n.Slice(0, n.IndexOf('e') + 1) + e; + } + + r = new BigDecimalLight(n.ToString(), Ctor); + } + else + { + r = new BigDecimalLight(s.ToString(CultureInfo.InvariantCulture), Ctor); + } + + pr = Ctor.Precision; + s = wpr = pr + 3; + + // Newton-Raphson iteration. + for (; ; ) + { + t = r; + r = t.Plus(BigDecimalLightHelperFunctions.divide(x, t, wpr + 2)).Times(0.5); + + if (BigDecimalLightHelperFunctions.digitsToString(t.d).Slice(0, wpr) == (n = BigDecimalLightHelperFunctions.digitsToString(r.d)).Slice(0, wpr)) + { + n = n.Slice(wpr - 3, wpr + 1); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or + // 4999, i.e. approaching a rounding boundary, continue the iteration. + if (s == wpr && n == "4999") + { + + // On the first iteration only, check to see if rounding up gives the exact result as the + // nines may infinitely repeat. + BigDecimalLightHelperFunctions.round(t, pr + 1, 0); + + if (t.Times(t).Eq(x)) + { + r = t; + break; + } + } + else if (n != "9999") + { + break; + } + + wpr += 4; + } + } + + Ctor.external = true; + + return BigDecimalLightHelperFunctions.round(r, pr); + } + /// + public BigDecimalLight SquareRoot() => Sqrt(); + + + /// + /// + /// + /// + /// A new BigDecimalLight whose value is this BigDecimalLight times `y`, truncated to + /// `precision` significant digits. + public BigDecimalLight Mul(BigDecimalArgument y) => _mul(new BigDecimalLight(y, this.Config)); + private BigDecimalLight _mul(BigDecimalLight y) + { + int carry = 0; + long e, i, k, rL, t, xdL, ydL; + int[] r; + var x = this; + var Ctor = x.Config; + var xd = x.d; + var yd = y.d; + + // Return 0 if either is 0. + if (!x.s.IsTrue() || !y.s.IsTrue()) return new BigDecimalLight(0, Ctor); + + y.s *= x.s; + e = x.e + y.e; + xdL = xd.LongLength; + ydL = yd.LongLength; + + // Ensure xd points to the longer array. + if (xdL < ydL) + { + r = xd; + xd = yd; + yd = r; + rL = xdL; + xdL = ydL; + ydL = rL; + } + + // Initialise the result array with zeros. + r = new int[0]; + rL = xdL + ydL; + for (i = rL; i--.IsTrue();) ArrayExtensions.Push(ref r, 0); + + // Multiply! + for (i = ydL; --i >= 0;) + { + carry = 0; + for (k = xdL + i; k > i;) + { + t = r[k] + (long)yd[i] * xd[k - i - 1] + carry; + r[k--] = (int)(t % BigDecimalLightHelperFunctions.BASE) | 0; + carry = (int)(t / BigDecimalLightHelperFunctions.BASE) | 0; + } + + r[k] = (r[k] + carry) % BigDecimalLightHelperFunctions.BASE | 0; + } + + // Remove trailing zeros. + for (; !r[--rL].IsTrue();) ArrayExtensions.Pop(ref r); + + if (carry.IsTrue()) ++e; + else ArrayExtensions.Shift(ref r); + + y.d = r; + y.e = e; + + return Ctor.external ? BigDecimalLightHelperFunctions.round(y, Ctor.Precision) : y; + } + /// + public BigDecimalLight Times(BigDecimalArgument y) => Mul(y); + + + /// + /// + /// + /// Decimal places. + /// Rounding mode. + /// A new BigDecimalLight whose value is the value of this BigDecimalLight rounded to a maximum of `dp` + /// decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.

+ /// If `dp` is omitted, return a new BigDecimalLight whose value is the value of this BigDecimalLight.
+ public BigDecimalLight ToDP(long? dp = null, RoundingMode? rm = null) + { + var x = this; + var Ctor = x.Config; + + x = new BigDecimalLight(x, Ctor); + if (dp == null) return x; + + BigDecimalLightHelperFunctions.checkInt32(dp.Value, 0, BigDecimalLightHelperFunctions.MAX_DIGITS); + + if (rm == null) rm = Ctor.Rounding; + + return BigDecimalLightHelperFunctions.round(x, dp.Value + BigDecimalLightHelperFunctions.getBase10Exponent(x) + 1, rm); + } + /// + public BigDecimalLight ToDecimalPlaces(long? dp = null, RoundingMode? rm = null) => ToDP(dp, rm); + + + /// + /// + /// + /// Decimal places. + /// Rounding mode. + /// A string representing the value of this BigDecimalLight in exponential notation rounded to + /// `dp` fixed decimal places using rounding mode `rounding`. + public string ToExponential(long? dp = null, RoundingMode? rm = null) + { + LongString str; + var x = this; + var Ctor = x.Config; + + if (dp == null) + { + str = BigDecimalLightHelperFunctions.toString(x, true); + } + else + { + BigDecimalLightHelperFunctions.checkInt32(dp.Value, 0, BigDecimalLightHelperFunctions.MAX_DIGITS); + + if (rm == null) rm = Ctor.Rounding; + + x = BigDecimalLightHelperFunctions.round(new BigDecimalLight(x, Ctor), dp.Value + 1, rm); + str = BigDecimalLightHelperFunctions.toString(x, true, dp + 1); + } + + return str; + } + + + /// + /// + /// + /// Decimal places. + /// Rounding mode. + /// A string representing the value of this BigDecimalLight in normal (fixed-point) notation to + /// `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is + /// omitted. + public string ToFixed(long? dp = null, RoundingMode? rm = null) + { + LongString str; + BigDecimalLight y; + var x = this; + var Ctor = x.Config; + + if (dp == null) return BigDecimalLightHelperFunctions.toString(x); + + BigDecimalLightHelperFunctions.checkInt32(dp.Value, 0, BigDecimalLightHelperFunctions.MAX_DIGITS); + + if (rm == null) rm = Ctor.Rounding; + + y = BigDecimalLightHelperFunctions.round(new BigDecimalLight(x, Ctor), dp.Value + BigDecimalLightHelperFunctions.getBase10Exponent(x) + 1, rm); + str = BigDecimalLightHelperFunctions.toString(y.Abs(), false, dp.Value + BigDecimalLightHelperFunctions.getBase10Exponent(y) + 1); + + // To determine whether to add the minus sign look at the value before it was rounded, + // i.e. look at `x` rather than `y`. + return x.IsNeg() && !x.IsZero() ? "-" + str : str; + } + + + /// + /// + /// + /// A new BigDecimalLight whose value is the value of this BigDecimalLight rounded to a whole number using + /// rounding mode `rounding`. + public BigDecimalLight ToInt() + { + var x = this; + var Ctor = x.Config; + return BigDecimalLightHelperFunctions.round(new BigDecimalLight(x, Ctor), BigDecimalLightHelperFunctions.getBase10Exponent(x) + 1, Ctor.Rounding); + } + /// + public BigDecimalLight ToInteger() => ToInt(); + + + /// + /// + /// + /// The value of this BigDecimalLight converted to a number primitive. + public double ToNumber() + { + var n = double.Parse(this.ToString(), CultureInfo.InvariantCulture); + return n; + } + + + /// + /// For non-integer or very large exponents Pow(x, y) is calculated using

+ /// x^y = Exp(y * ln(x))

+ /// The maximum error is 1 ulp (unit in last place). + ///
+ /// The power to which to raise this BigDecimalLight. + /// A new BigDecimalLight whose value is the value of this BigDecimal raised to the power `y`, + /// truncated to `precision` significant digits. + public BigDecimalLight Pow(BigDecimalArgument y) => _pow(new BigDecimalLight(y, this.Config)); + private BigDecimalLight _pow(BigDecimalLight y) + { + long e, k, pr; + BigDecimalLight r; + int sign; + bool yIsInt; + var x = this; + var Ctor = x.Config; + var guard = 12; + var yn = y.ToNumber(); + + // pow(x, 0) = 1 + if (!y.s.IsTrue()) return new BigDecimalLight(BigDecimalLightHelperFunctions.ONE, Ctor); + + x = new BigDecimalLight(x, Ctor); + + // pow(0, y > 0) = 0 + // pow(0, y < 0) = Infinity + if (!x.s.IsTrue()) + { + if (y.s < 1) throw new BigDecimalException(BigDecimalException.DecimalError + "Infinity"); + return x; + } + + // pow(1, y) = 1 + if (x.Eq(BigDecimalLightHelperFunctions.ONE)) return x; + + pr = Ctor.Precision; + + // pow(x, 1) = x + if (y.Eq(BigDecimalLightHelperFunctions.ONE)) return BigDecimalLightHelperFunctions.round(x, pr); + + e = y.e; + k = y.d.LongLength - 1; + yIsInt = e >= k; + sign = x.s; + + var k0 = double.IsInfinity(yn) ? BigDecimalLightHelperFunctions.MAX_SAFE_INTEGER + 1 : new BigInteger(yn); + k0 = (k0 < 0 ? -k0 : k0); + + if (!yIsInt) + { + + // pow(x < 0, y non-integer) = NaN + if (sign < 0) throw new BigDecimalException(BigDecimalException.DecimalError + "NaN"); + + // If y is a small integer use the 'exponentiation by squaring' algorithm. + } + else if (k0 <= BigDecimalLightHelperFunctions.MAX_SAFE_INTEGER) + { + k = (long)k0; + + r = new BigDecimalLight(BigDecimalLightHelperFunctions.ONE, Ctor); + + // Max k of 9007199254740991 takes 53 loop iterations. + // Maximum digits array length; leaves [28, 34] guard digits. + e = (long)Math.Ceiling((double)pr / BigDecimalLightHelperFunctions.LOG_BASE + 4); + + Ctor.external = false; + + for (; ; ) + { + if ((k % 2).IsTrue()) + { + r = r.Times(x); + BigDecimalLightHelperFunctions.truncate(ref r.d, e); + } + + k = (long)Math.Floor((double)k / 2); + if (k == 0) break; + + x = x.Times(x); + BigDecimalLightHelperFunctions.truncate(ref x.d, e); + } + + Ctor.external = true; + + return y.s < 0 ? new BigDecimalLight(BigDecimalLightHelperFunctions.ONE, Ctor).Div(r) : BigDecimalLightHelperFunctions.round(r, pr); + } + + // Result is negative if x is negative and the last digit of integer y is odd. + sign = sign < 0 && (y.d[Math.Max(e, k)] & 1).IsTrue() ? -1 : 1; + + x.s = 1; + Ctor.external = false; + r = y.Times(BigDecimalLightHelperFunctions.ln(x, pr + guard)); + Ctor.external = true; + r = BigDecimalLightHelperFunctions.exp(r); + r.s = sign; + + return r; + } + /// + public BigDecimalLight ToPower(BigDecimalArgument y) => Pow(y); + + + /// + /// + /// + /// Significant digits. + /// Rounding mode. + /// A string representing the value of this BigDecimalLight rounded to `sd` significant digits + /// using rounding mode `rounding`.

+ /// Exponential notation if `sd` is less than the number of digits necessary to represent + /// the integer part of the value in normal notation.
+ public string ToPrecision(long? sd = null, RoundingMode? rm = null) + { + long e; + LongString str; + var x = this; + var Ctor = x.Config; + + if (sd == null) + { + e = BigDecimalLightHelperFunctions.getBase10Exponent(x); + str = BigDecimalLightHelperFunctions.toString(x, e <= Ctor.ToExpNeg || e >= Ctor.ToExpPos); + } + else + { + BigDecimalLightHelperFunctions.checkInt32(sd.Value, 1, BigDecimalLightHelperFunctions.MAX_DIGITS); + + if (rm == null) rm = Ctor.Rounding; + + x = BigDecimalLightHelperFunctions.round(new BigDecimalLight(x, Ctor), sd.Value, rm); + e = BigDecimalLightHelperFunctions.getBase10Exponent(x); + str = BigDecimalLightHelperFunctions.toString(x, sd <= e || e <= Ctor.ToExpNeg, sd); + } + + return str; + } + + + /// + /// + /// + /// Significant digits. + /// Rounding mode. + /// A new BigDecimalLight whose value is the value of this BigDecimalLight rounded to a maximum of `sd` + /// significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if + /// omitted. + public BigDecimalLight ToSD(long? sd = null, RoundingMode? rm = null) + { + var x = this; + var Ctor = x.Config; + + if (sd == null) + { + sd = Ctor.Precision; + rm = Ctor.Rounding; + } + else + { + BigDecimalLightHelperFunctions.checkInt32(sd.Value, 1, BigDecimalLightHelperFunctions.MAX_DIGITS); + + if (rm == null) rm = Ctor.Rounding; + } + + return BigDecimalLightHelperFunctions.round(new BigDecimalLight(x, Ctor), sd.Value, rm); + } + /// + public BigDecimalLight ToSignificantDigits(long? sd = null, RoundingMode? rm = null) => ToSD(sd, rm); + + + /// + /// + /// + /// A string representing the value of this BigDecimalLight.

+ /// Exponential notation if this BigDecimalLight has a positive exponent equal to or greater than + /// `ToExpPos`, or a negative exponent equal to or less than `ToExpNeg`.
+ public override string ToString() + { + var x = this; + var Ctor = x.Config; + var e = BigDecimalLightHelperFunctions.getBase10Exponent(x); + + return BigDecimalLightHelperFunctions.toString(x, e <= Ctor.ToExpNeg || e >= Ctor.ToExpPos); + } + /// + public string ValueOf() => ToString(); + /// + public string Val() => ToString(); + /// + public string ToJSON() => ToString(); + } +} \ No newline at end of file diff --git a/DecimalSharp.Light/BigDecimalLightConfig.cs b/DecimalSharp.Light/BigDecimalLightConfig.cs new file mode 100644 index 0000000..d38a0b6 --- /dev/null +++ b/DecimalSharp.Light/BigDecimalLightConfig.cs @@ -0,0 +1,68 @@ +using DecimalSharp.Core; + +namespace DecimalSharp +{ + public class BigDecimalLightConfig + { + // 1 to MAX_DIGITS + private long _precision = 20; + /// + /// The maximum number of significant digits of the result of a calculation or base conversion. + /// + public long Precision { + get { return _precision; } + set { + if (value < 1 || value > BigDecimalLightHelperFunctions.MAX_DIGITS) + throw new BigDecimalException(BigDecimalException.InvalidArgument + nameof(Precision) + ": " + value); + _precision = value; + } + } + + /// + /// The rounding mode used when rounding to `precision`. + /// + public RoundingMode Rounding { get; set; } = RoundingMode.ROUND_HALF_UP; + + // 0 to -MAX_E + private long _toExpNeg = -7; + /// + /// The exponent value at and beneath which `ToString` returns exponential notation. + /// + public long ToExpNeg { + get { return _toExpNeg; } + set { + if (value < -BigDecimalLightHelperFunctions.MAX_E || value > 0) + throw new BigDecimalException(BigDecimalException.InvalidArgument + nameof(ToExpNeg) + ": " + value); + _toExpNeg = value; + } + } + + // 0 to MAX_E + private long _toExpPos = 21; + /// + /// The exponent value at and above which `ToString` returns exponential notation. + /// + public long ToExpPos { + get { return _toExpPos; } + set { + if (value < 0 || value > BigDecimalLightHelperFunctions.MAX_E) + throw new BigDecimalException(BigDecimalException.InvalidArgument + nameof(ToExpPos) + ": " + value); + _toExpPos = value; + } + } + + internal bool external = true; + + public BigDecimalLightConfig Clone() + { + return new BigDecimalLightConfig + { + Precision = Precision, + Rounding = Rounding, + ToExpNeg = ToExpNeg, + ToExpPos = ToExpPos, + external = external + }; + } + } +} diff --git a/DecimalSharp.Light/BigDecimalLightDivision.cs b/DecimalSharp.Light/BigDecimalLightDivision.cs new file mode 100644 index 0000000..36ad7f3 --- /dev/null +++ b/DecimalSharp.Light/BigDecimalLightDivision.cs @@ -0,0 +1,220 @@ +using DecimalSharp.Core; +using DecimalSharp.Core.Extensions; + +namespace DecimalSharp +{ + internal class BigDecimalLightDivision : BigDecimalDivisionFunctions + { + public static BigDecimalLight Divide(BigDecimalLight x, BigDecimalLight y, long? pr, long? dp) + { + long cmp, e, i, k, prodL, remL, rem0, sd, xi, xL, yd0, yL; + double t; + BigDecimalLight q; + int[] qd, prod, rem, yz; + var Ctor = x.Config; + var sign = x.s == y.s ? 1 : -1; + var xd = x.d; + var yd = y.d; + + // Either 0? + if (!x.s.IsTrue()) return new BigDecimalLight(x, Ctor); + if (!y.s.IsTrue()) throw new BigDecimalException(BigDecimalException.DecimalError + "Division by zero"); + + e = x.e - y.e; + yL = yd.LongLength; + xL = xd.LongLength; + q = new BigDecimalLight(sign, Ctor); + qd = q.d = new int[0]; + + // Result exponent may be one less than e. + for (i = 0; i < yd.LongLength && yd[i] == (i < xd.LongLength ? xd[i] : 0);) ++i; + if (i < yd.LongLength && yd[i] > (i < xd.LongLength ? xd[i] : 0)) --e; + + if (pr == null) + { + pr = Ctor.Precision; + sd = pr.Value; + } + else if (dp.IsTrue()) + { + sd = pr.Value + (BigDecimalLightHelperFunctions.getBase10Exponent(x) - BigDecimalLightHelperFunctions.getBase10Exponent(y)) + 1; + } + else + { + sd = pr.Value; + } + + if (sd < 0) return new BigDecimalLight(0, Ctor); + + + // Convert precision in number of @base 10 digits to @base 1e7 digits. + sd = sd / BigDecimalLightHelperFunctions.LOG_BASE + 2 | 0; + i = 0; + + // divisor < 1e7 + if (yL == 1) + { + k = 0; + yd0 = yd[0]; + sd++; + + // k is the carry. + for (; (i < xL || k.IsTrue()) && sd--.IsTrue(); i++) + { + t = (long)k * BigDecimalLightHelperFunctions.BASE + (xd.LongLength > i ? xd[i] : 0); + if (qd.LongLength <= i) ArrayExtensions.Resize(ref qd, i + 1); + qd[i] = (int)(t / yd0) | 0; + k = (long)(t % yd0) | 0; + } + + // divisor >= 1e7 + } + else + { + // Normalise xd and yd so highest order digit of yd is >= @base/2 + k = BigDecimalLightHelperFunctions.BASE / (yd[0] + 1) | 0; + + if (k > 1) + { + yd = multiplyInteger(yd, k, BigDecimalLightHelperFunctions.BASE); + xd = multiplyInteger(xd, k, BigDecimalLightHelperFunctions.BASE); + yL = yd.LongLength; + xL = xd.LongLength; + } + + xi = yL; + rem = xd.Slice(0, yL); + remL = rem.LongLength; + + // Add zeros to make remainder as long as divisor. + for (; remL < yL;) + { + if (rem.LongLength <= remL) ArrayExtensions.Resize(ref rem, remL + 1); + rem[remL++] = 0; + } + + yz = yd.Slice(); + ArrayExtensions.Unshift(ref yz, 0); + yd0 = yd[0]; + + if (yd[1] >= BigDecimalLightHelperFunctions.BASE / 2) ++yd0; + + do + { + k = 0; + + // Compare divisor and remainder. + cmp = compare(yd, rem, yL, remL); + + // If divisor < remainder. + if (cmp < 0) + { + + // Calculate trial digit, k. + rem0 = rem[0]; + if (yL != remL) rem0 = rem0 * BigDecimalLightHelperFunctions.BASE + (rem.LongLength > 1 ? rem[1] : 0); + + // k will be how many times the divisor goes into the current remainder. + k = (long)(rem0 / yd0) | 0; + + // Algorithm: + // 1. product = divisor * trial digit (k) + // 2. if product > remainder: product -= divisor, k-- + // 3. remainder -= product + // 4. if product was < remainder at 2: + // 5. compare new remainder and divisor + // 6. If remainder > divisor: remainder -= divisor, k++ + + if (k > 1) + { + if (k >= BigDecimalLightHelperFunctions.BASE) k = BigDecimalLightHelperFunctions.BASE - 1; + + // product = divisor * trial digit. + prod = multiplyInteger(yd, k, BigDecimalLightHelperFunctions.BASE); + prodL = prod.LongLength; + remL = rem.LongLength; + + // Compare product and remainder. + cmp = compare(prod, rem, prodL, remL); + + // product > remainder. + if (cmp == 1) + { + k--; + + // Subtract divisor from product. + subtract(ref prod, yL < prodL ? yz : yd, prodL, BigDecimalLightHelperFunctions.BASE); + } + } + else + { + + // cmp is -1. + // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1 + // to avoid it. If k is 1 there is a need to compare yd and rem again below. + if (k == 0) cmp = k = 1; + prod = yd.Slice(); + } + + prodL = prod.LongLength; + if (prodL < remL) ArrayExtensions.Unshift(ref prod, 0); + + // Subtract product from remainder. + subtract(ref rem, prod, remL, BigDecimalLightHelperFunctions.BASE); + + // If product was < previous remainder. + if (cmp == -1) + { + remL = rem.LongLength; + + // Compare divisor and new remainder. + cmp = compare(yd, rem, yL, remL); + + // If divisor < new remainder, subtract divisor from remainder. + if (cmp < 1) + { + k++; + + // Subtract divisor from remainder. + subtract(ref rem, yL < remL ? yz : yd, remL, BigDecimalLightHelperFunctions.BASE); + } + } + + remL = rem.LongLength; + } + else if (cmp == 0) + { + k++; + rem = new[] { 0 }; + } // if cmp == 1, k will be 0 + + // Add the next digit, k, to the result array. + if (qd.LongLength <= i) ArrayExtensions.Resize(ref qd, i + 1); + qd[i++] = (int)k; + + // Update the remainder. + if (cmp.IsTrue() && rem[0].IsTrue()) + { + if (rem.LongLength <= remL) ArrayExtensions.Resize(ref rem, remL + 1); + rem[remL++] = xd.LongLength > xi ? xd[xi] : 0; + } + else + { + rem = xd.LongLength > xi ? new[] { xd[xi] } : new int[0]; + remL = 1; + } + + } while ((xi++ < xL || rem.LongLength > 0) && sd--.IsTrue()); + } + + // Leading zero? + if (!qd[0].IsTrue()) ArrayExtensions.Shift(ref qd); + + + q.d = qd; + q.e = e; + + return BigDecimalLightHelperFunctions.round(q, dp.IsTrue() ? pr.Value + BigDecimalLightHelperFunctions.getBase10Exponent(q) + 1 : pr.Value); + } + } +} diff --git a/DecimalSharp.Light/BigDecimalLightFactory.cs b/DecimalSharp.Light/BigDecimalLightFactory.cs new file mode 100644 index 0000000..609ae97 --- /dev/null +++ b/DecimalSharp.Light/BigDecimalLightFactory.cs @@ -0,0 +1,36 @@ +using DecimalSharp.Core; + +namespace DecimalSharp +{ + public class BigDecimalLightFactory + { + public BigDecimalLightConfig Config { get; set; } + + public BigDecimalLightFactory(BigDecimalLightConfig? config = null) + { + this.Config = config ?? new BigDecimalLightConfig(); + } + + public BigDecimalLight BigDecimal(BigDecimalArgument v) + { + return new BigDecimalLight(v, this.Config); + } + + // BigDecimalLightFactory methods + + + /* + * clone + */ + + + /// + /// + /// + /// A new BigDecimalLightFactory with the same configuration properties as this BigDecimalLightFactory. + public BigDecimalLightFactory Clone() + { + return new BigDecimalLightFactory(this.Config.Clone()); + } + } +} diff --git a/DecimalSharp.Light/BigDecimalLightHelperFunctions.cs b/DecimalSharp.Light/BigDecimalLightHelperFunctions.cs new file mode 100644 index 0000000..01e2b19 --- /dev/null +++ b/DecimalSharp.Light/BigDecimalLightHelperFunctions.cs @@ -0,0 +1,909 @@ +using DecimalSharp.Core; +using DecimalSharp.Core.Extensions; +using System.Globalization; +using System.Numerics; + +namespace DecimalSharp +{ + internal class BigDecimalLightHelperFunctions + { + // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ // + + /// + /// The limit on the value of `precision`, and on the value of the first argument to
+ /// `ToDecimalPlaces`, `ToExponential`, `ToFixed`, `ToPrecision` and `ToSignificantDigits`. + ///
+ internal static long MAX_DIGITS = (long)1e9; // 0 to 1e9 + + internal static double LN10d = 2.302585092994046; + /// + /// The natural logarithm of 10 (1025 digits). + /// + internal static string LN10 = "2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"; + + // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- // + + internal static BigDecimalLight ONE = new BigDecimalLight(1); + internal static int BASE = (int)1e7; + internal static int LOG_BASE = 7; + internal static long MAX_SAFE_INTEGER = 9007199254740991; + internal static long MAX_E = (long)9e15;//(long)Math.Floor((double)MAX_SAFE_INTEGER / LOG_BASE); + + internal static string isDecimal = @"^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$"; + + // Helper functions for BigDecimalLight.prototype (P) and/or BigDecimalLight methods, and their callers. + + + /* + * add P.minus, P.plus + * checkInt32 P.todp, P.toExponential, P.toFixed, P.toPrecision, P.tosd + * digitsToString P.log, P.sqrt, P.pow, toString, exp, ln + * divide P.div, P.idiv, P.log, P.mod, P.sqrt, exp, ln + * exp P.exp, P.pow + * getBase10Exponent P.exponent, P.sd, P.toint, P.sqrt, P.todp, P.toFixed, P.toPrecision, + * P.toString, divide, round, toString, exp, ln + * getLn10 P.log, ln + * getZeroString digitsToString, toString + * ln P.log, P.ln, P.pow, exp + * parseDecimal BigDecimalLight + * round P.abs, P.idiv, P.log, P.minus, P.mod, P.neg, P.plus, P.toint, P.sqrt, + * P.times, P.todp, P.toExponential, P.toFixed, P.pow, P.toPrecision, P.tosd, + * divide, getLn10, exp, ln + * subtract P.minus, P.plus + * toString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf + * truncate P.pow + * + * Throws: P.log, P.mod, P.sd, P.sqrt, P.pow, checkInt32, divide, round, + * getLn10, exp, ln, parseDecimal, BigDecimalLight, config + */ + + + internal static BigDecimalLight add(BigDecimalLight x, BigDecimalLight y) + { + int carry; + long e, i, k, len; + int[] d, xd, yd; + var Ctor = x.Config; + var pr = Ctor.Precision; + + // If either is zero... + if (!x.s.IsTrue() || !y.s.IsTrue()) + { + + // Return x if y is zero. + // Return y if y is non-zero. + if (!y.s.IsTrue()) y = new BigDecimalLight(x, Ctor); + return Ctor.external ? round(y, pr) : y; + } + + xd = x.d; + yd = y.d; + + // x and y are finite, non-zero numbers with the same sign. + + k = x.e; + e = y.e; + xd = xd.Slice(); + i = k - e; + + // If base 1e7 exponents differ... + if (i.IsTrue()) + { + bool isYd = false; + if (i < 0) + { + d = xd; + i = -i; + len = yd.LongLength; + } + else + { + d = yd; + e = k; + len = xd.LongLength; + isYd = true; + } + + // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1. + k = (long)Math.Ceiling((double)pr / LOG_BASE); + len = k > len ? k + 1 : len + 1; + + if (i > len) + { + i = len; + ArrayExtensions.Resize(ref d, 1); + } + + // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts. + ArrayExtensions.Reverse(ref d); + for (; i--.IsTrue();) ArrayExtensions.Push(ref d, 0); + ArrayExtensions.Reverse(ref d); + + if (isYd) yd = d; + else xd = d; + } + + len = xd.LongLength; + i = yd.LongLength; + + // If yd is longer than xd, swap xd and yd so xd points to the longer array. + if (len - i < 0) + { + i = len; + d = yd; + yd = xd; + xd = d; + } + + // Only start adding at yd.length - 1 as the further digits of xd can be left as they are. + for (carry = 0; i.IsTrue();) + { + carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0; + xd[i] %= BASE; + } + + if (carry.IsTrue()) + { + ArrayExtensions.Unshift(ref xd, carry); + ++e; + } + + // Remove trailing zeros. + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + for (len = xd.LongLength; xd[--len] == 0;) ArrayExtensions.Pop(ref xd); + + y.d = xd; + y.e = e; + + return Ctor.external ? round(y, pr) : y; + } + + + internal static void checkInt32(long i, long min, long max) + { + if (i != ~~i || i < min || i > max) + { + throw new BigDecimalException(BigDecimalException.InvalidArgument + i); + } + } + + internal static LongString digitsToString(int[] d) + { + long i, k; + LongString ws; + var indexOfLastWord = d.LongLength - 1; + LongString str = ""; + var w = d[0]; + + if (indexOfLastWord > 0) + { + str += w; + for (i = 1; i < indexOfLastWord; i++) + { + ws = d[i] + ""; + k = LOG_BASE - ws.LongLength; + if (k.IsTrue()) str += getZeroString(k); + str += ws; + } + + w = d[i]; + ws = w + ""; + k = LOG_BASE - ws.LongLength; + if (k.IsTrue()) str += getZeroString(k); + } + else if (w == 0) + { + return "0"; + } + + // Remove trailing zeros of last w. + for (; w % 10 == 0;) w /= 10; + + return str + w; + } + + + /// + /// Perform division in the specified base. + /// + /// + /// + /// + /// + /// + internal static BigDecimalLight divide(BigDecimalLight x, BigDecimalLight y, long? pr = null, long? dp = null) + { + return BigDecimalLightDivision.Divide(x, y, pr, dp); + } + + + /// + /// Taylor/Maclaurin series.

+ /// Exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...

+ /// Argument reduction:
+ /// Repeat x = x / 32, k += 5, until |x| < 0.1
+ /// Exp(x) = Exp(x / 2^k)^(2^k)

+ /// Previously, the argument was initially reduced by
+ /// Exp(x) = Exp(r) * 10^k where r = x - k * ln10, k = Floor(x / ln10)
+ /// to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was
+ /// found to be slower than just dividing repeatedly by 32 as above.

+ /// (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)

+ /// Exp(x) is non-terminating for any finite, non-zero x.

+ ///
+ /// + /// + /// A new BigDecimalLight whose value is the natural exponential of `x` rounded to `sd` significant + /// digits. + internal static BigDecimalLight exp(BigDecimalLight x, long? sd = null) + { + long guard, wpr, + i = 0, + k = 0; + BigDecimalLight denominator, sum, t, pow; + var Ctor = x.Config; + var pr = Ctor.Precision; + + if (getBase10Exponent(x) > 16) throw new BigDecimalException(BigDecimalException.ExponentOutOfRange + getBase10Exponent(x)); + + // exp(0) = 1 + if (!x.s.IsTrue()) return new BigDecimalLight(ONE, Ctor); + + if (sd == null) + { + Ctor.external = false; + wpr = pr; + } + else + { + wpr = sd.Value; + } + + t = new BigDecimalLight(0.03125, Ctor); + + while (x.Abs().Gte(0.1)) + { + x = x.Times(t); // x = x / 2^5 + k += 5; + } + + // Estimate the precision increase necessary to ensure the first 4 rounding digits are correct. + guard = (long)(Math.Log(Math.Pow(2, k)) / LN10d * 2 + 5) | 0; + wpr += guard; + denominator = pow = sum = new BigDecimalLight(ONE, Ctor); + Ctor.Precision = wpr; + + for (; ; ) + { + pow = round(pow.Times(x), wpr); + denominator = denominator.Times(++i); + t = sum.Plus(divide(pow, denominator, wpr)); + + if (digitsToString(t.d).Slice(0, wpr) == digitsToString(sum.d).Slice(0, wpr)) + { + while (k--.IsTrue()) sum = round(sum.Times(sum), wpr); + Ctor.Precision = pr; + if (sd == null) + { + Ctor.external = true; return round(sum, pr); + } + else return sum; + } + + sum = t; + } + } + + + /// + /// Calculate the base 10 exponent from the base 1e7 exponent. + /// + /// + /// + /// + internal static long getBase10Exponent(BigDecimalLight x) + { + var e = x.e * LOG_BASE; + var w = x.d[0]; + + // Add the number of digits of the first word of the digits array. + for (; w >= 10; w /= 10) e++; + return e; + } + + + internal static BigDecimalLight getLn10(BigDecimalLightConfig Ctor, long sd, long? pr = null) + { + if (sd > LN10.Length - 1) + { + // Reset global state in case the exception is caught. + Ctor.external = true; + if (pr.IsTrue()) Ctor.Precision = pr.Value; + throw new BigDecimalException(BigDecimalException.DecimalError + "LN10 precision limit exceeded"); + } + + return round(new BigDecimalLight(LN10, Ctor), sd); + } + + + internal static LongString getZeroString(long k) + { + var zs = ""; + for (; k--.IsTrue();) zs += "0"; + return zs; + } + + + /// + /// Ln(n) (n != 1) is non-terminating. + /// + /// + /// + /// A new BigDecimalLight whose value is the natural logarithm of `x` truncated to `sd` significant + /// digits. + /// + internal static BigDecimalLight ln(BigDecimalLight y, long? sd = null) + { + LongString c; + char c0; + long denominator, e, wpr; + BigDecimalLight numerator, sum, t, x2; + var n = 1; + var guard = 10; + var x = y; + var xd = x.d; + var Ctor = x.Config; + var pr = Ctor.Precision; + + // ln(-x) = NaN + // ln(0) = -Infinity + if (x.s < 1) throw new BigDecimalException(BigDecimalException.DecimalError + (x.s.IsTrue() ? "NaN" : "-Infinity")); + + // ln(1) = 0 + if (x.Eq(ONE)) return new BigDecimalLight(0, Ctor); + + if (sd == null) + { + Ctor.external = false; + wpr = pr; + } + else + { + wpr = sd.Value; + } + + if (x.Eq(10)) + { + if (sd == null) Ctor.external = true; + return getLn10(Ctor, wpr); + } + + wpr += guard; + Ctor.Precision = wpr; + c = digitsToString(xd); + c0 = c.ElementAt(0); + e = getBase10Exponent(x); + + if (Math.Abs(e) < 1.5e15) + { + + // Argument reduction. + // The series converges faster the closer the argument is to 1, so using + // Ln(a^b) = b * Ln(a), Ln(a) = Ln(a^b) / b + // multiply the argument by itself until the leading digits of the significand are 7, 8, 9, + // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can + // later be divided by this number, then separate out the power of 10 using + // Ln(a*10^b) = Ln(a) + b*ln(10). + + // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14). + //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) { + // max n is 6 (gives 0.7 - 1.3) + while ((int)(c0 - '0') < 7 && (int)(c0 - '0') != 1 || (int)(c0 - '0') == 1 && c.LongLength > 1 && (int)(c.ElementAt(1) - '0') > 3) + { + x = x.Times(y); + c = digitsToString(x.d); + c0 = c.ElementAt(0); + n++; + } + + e = getBase10Exponent(x); + + if ((int)(c0 - '0') > 1) + { + x = new BigDecimalLight(("0." + c).ToString(), Ctor); + e++; + } + else + { + x = new BigDecimalLight((c0 + "." + c.Slice(1)).ToString(), Ctor); + } + } + else + { + + // The argument reduction method above may result in overflow if the argument y is a massive + // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this + // function using Ln(x*10^e) = Ln(x) + e*ln(10). + t = getLn10(Ctor, wpr + 2, pr).Times(e.ToString(CultureInfo.InvariantCulture)); + x = ln(new BigDecimalLight((c0 + "." + c.Slice(1)).ToString(), Ctor), wpr - guard).Plus(t); + + Ctor.Precision = pr; + if (sd == null) { + Ctor.external = true; + return round(x, pr); + } + else return x; + } + + // x reduced to a value near 1. + + // Taylor series. + // Ln(y) = Ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...) + // where x = (y - 1)/(y + 1) (|x| < 1) + sum = numerator = x = divide(x.Minus(ONE), x.Plus(ONE), wpr); + x2 = round(x.Times(x), wpr); + denominator = 3; + + for (; ; ) + { + numerator = round(numerator.Times(x2), wpr); + t = sum.Plus(divide(numerator, new BigDecimalLight(denominator, Ctor), wpr)); + + if (digitsToString(t.d).Slice(0, wpr) == digitsToString(sum.d).Slice(0, wpr)) + { + sum = sum.Times(2); + + // Reverse the argument reduction. Check that e is not 0 because, besides preventing an + // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0. + if (e != 0) sum = sum.Plus(getLn10(Ctor, wpr + 2, pr).Times(e.ToString(CultureInfo.InvariantCulture))); + sum = divide(sum, new BigDecimalLight(n, Ctor), wpr); + + + Ctor.Precision = pr; + if (sd == null) + { + Ctor.external = true; + return round(sum, pr); + } + else return sum; + } + + sum = t; + denominator += 2; + } + } + + /// + /// Parse the value of a new BigDecimalLight `x` from string `str`. + /// + /// + /// + /// + internal static BigDecimalLight parseDecimal(BigDecimalLight x, LongString str) + { + BigInteger e; + long i, len; + var Ctor = x.Config; + + // Decimal point? + if ((e = str.IndexOf(".")) > -1) str = str.Replace(".", ""); + + // Exponential form? + if ((i = str.IndexOf("e", StringComparison.InvariantCultureIgnoreCase)) > 0) + { + + // Determine exponent. + if (e < 0) e = i; + e += BigInteger.Parse(str.Slice(i + 1)); + str = str.Slice(0, i); + } + else if (e < 0) + { + + // Integer. + e = str.LongLength; + } + + // Determine leading zeros. + for (i = 0; i < str.LongLength && str.ElementAt(i) == 48; i++) ; + + // Determine trailing zeros. + for (len = str.LongLength; (len - 1) >= 0 && str.ElementAt(len - 1) == 48; --len) ; + str = str.Slice(i, len); + + if (!string.IsNullOrEmpty(str)) + { + len -= i; + e = e - i - 1; + x.e = (long)Math.Floor((double)e / LOG_BASE) > MAX_E ? MAX_E + 1 : (long)Math.Floor((double)e / LOG_BASE) < -MAX_E ? -MAX_E - 1 : (long)Math.Floor((double)e / LOG_BASE); + x.d = new int[0]; + + // Transform @base + + // e is the @base 10 exponent. + // i is where to slice str to get the first word of the digits array. + i = (long)((e + 1) % LOG_BASE); + if (e < 0) i += LOG_BASE; + + if (i < len) + { + if (i.IsTrue()) ArrayExtensions.Push(ref x.d, int.Parse(str.Slice(0, i), CultureInfo.InvariantCulture)); + for (len -= LOG_BASE; i < len;) ArrayExtensions.Push(ref x.d, int.Parse(str.Slice(i, i += LOG_BASE), CultureInfo.InvariantCulture)); + str = str.Slice(i); + i = LOG_BASE - str.LongLength; + } + else + { + i -= len; + } + + for (; i--.IsTrue();) str += "0"; + ArrayExtensions.Push(ref x.d, int.Parse(str, CultureInfo.InvariantCulture)); + + if (Ctor.external && (x.e > MAX_E || x.e < -MAX_E)) throw new BigDecimalException(BigDecimalException.ExponentOutOfRange + e); + } + else + { + + // Zero. + x.s = 0; + x.e = 0; + x.d = new int[] { 0 }; + } + + return x; + } + + + /// + /// Round `x` to `sd` significant digits, using rounding mode `rm` if present (truncate otherwise). + /// + /// + /// + /// + /// + /// + internal static BigDecimalLight round(BigDecimalLight x, long sd, RoundingMode? rm = null) + { + long i, j, k, n, rd, w, xdi; + bool doRound = false; + var Ctor = x.Config; + var xd = x.d; + + // rd: the rounding digit, i.e. the digit after the digit that may be rounded up. + // w: the word of xd which contains the rounding digit, a base 1e7 number. + // xdi: the index of w within xd. + // n: the number of digits of w. + // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if + // they had leading zeros) + // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero). + + // Get the length of the first word of the digits array xd. + for (n = 1, k = xd[0]; k >= 10; k /= 10) n++; + i = sd - n; + + // Is the rounding digit in the first word of xd? + if (i < 0) + { + i += LOG_BASE; + j = sd; + w = xd[xdi = 0]; + } + else + { + xdi = (long)Math.Ceiling(((double)i + 1) / LOG_BASE); + k = xd.LongLength; + if (xdi >= k) return x; + w = k = xd[xdi]; + + // Get the number of digits of w. + for (n = 1; k >= 10; k /= 10) n++; + + // Get the index of rd within w. + i %= LOG_BASE; + + // Get the index of rd within w, adjusted for leading zeros. + // The number of leading zeros of w is given by LOG_BASE - n. + j = i - LOG_BASE + n; + } + + if (rm != null) { + k = (long)Math.Pow(10, n - j - 1); + + // Get the rounding digit at index j of w. + rd = w / k % 10 | 0; + + // Are there any non-zero digits after the rounding digit? + doRound = sd < 0 || xd.LongLength > xdi + 1 || (w % k).IsTrue(); + + // The expression `w % mathpow(10, n - j - 1)` returns all the digits of w to the right of the + // digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression will give + // 714. + + doRound = rm < RoundingMode.ROUND_HALF_UP + ? (rd.IsTrue() || doRound) && (rm == RoundingMode.ROUND_UP || rm == (x.s < 0 ? RoundingMode.ROUND_FLOOR : RoundingMode.ROUND_CEIL)) + : rd > 5 || rd == 5 && (rm == RoundingMode.ROUND_HALF_UP || doRound || rm == RoundingMode.ROUND_HALF_EVEN && + + // Check whether the digit to the left of the rounding digit is odd. + (((i > 0 ? j > 0 ? (long)(w / Math.Pow(10, n - j)) : 0 : xd.LongLength > xdi - 1 && xdi >= 1 ? xd[xdi - 1] : 0) % 10) & 1).IsTrue() || + rm == (x.s < 0 ? RoundingMode.ROUND_HALF_FLOOR : RoundingMode.ROUND_HALF_CEIL)); + } + + if (sd < 1 || !xd[0].IsTrue()) + { + if (doRound) + { + k = getBase10Exponent(x); + ArrayExtensions.Resize(ref xd, 1); + + // Convert sd to decimal places. + sd = sd - k - 1; + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + xd[0] = (int)Math.Pow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE); + x.e = (long)Math.Floor((double)-sd / LOG_BASE); + } + else + { + ArrayExtensions.Resize(ref xd, 1); + + // Zero. + x.e = x.s = 0; + xd[0] = 0; + } + x.d = xd; + + return x; + } + + // Remove excess digits. + if (i == 0) + { + ArrayExtensions.Resize(ref xd, xdi); + k = 1; + xdi--; + } + else + { + ArrayExtensions.Resize(ref xd, xdi + 1); + k = (long)Math.Pow(10, LOG_BASE - i); + + // E.g. 56700 becomes 56000 if 7 is the rounding digit. + // j > 0 means i > number of leading zeros of w. + xd[xdi] = j > 0 ? (int)(((long)(w / Math.Pow(10, n - j) % Math.Pow(10, j)) | 0) * k) : 0; + } + + if (doRound) + { + for (; ; ) + { + + // Is the digit to be rounded up in the first word of xd? + if (xdi == 0) + { + if ((xd[0] += (int)k) == BASE) + { + xd[0] = 1; + ++x.e; + } + + break; + } + else + { + xd[xdi] += (int)k; + if (xd[xdi] != BASE) break; + xd[xdi--] = 0; + k = 1; + } + } + } + + // Remove trailing zeros. + for (i = xd.LongLength; i >= 0 && xd[--i] == 0;) ArrayExtensions.Pop(ref xd); + + if (Ctor.external && (x.e > MAX_E || x.e < -MAX_E)) + { + throw new BigDecimalException(BigDecimalException.ExponentOutOfRange + getBase10Exponent(x)); + } + + x.d = xd; + + return x; + } + + + internal static BigDecimalLight subtract(BigDecimalLight x, BigDecimalLight y) + { + long e, i, j, k, len, xe; + int[] d, xd, yd; + bool xLTy; + var Ctor = x.Config; + var pr = Ctor.Precision; + + // Return y negated if x is zero. + // Return x if y is zero and x is non-zero. + if (!x.s.IsTrue() || !y.s.IsTrue()) + { + if (y.s.IsTrue()) y.s = -y.s; + else y = new BigDecimalLight(x, Ctor); + return Ctor.external ? round(y, pr) : y; + } + + xd = x.d; + yd = y.d; + + // x and y are non-zero numbers with the same sign. + + e = y.e; + xe = x.e; + xd = xd.Slice(); + k = xe - e; + + // If exponents differ... + if (k.IsTrue()) + { + xLTy = k < 0; + + if (xLTy) + { + d = xd; + k = -k; + len = yd.LongLength; + } + else + { + d = yd; + e = xe; + len = xd.LongLength; + } + + // Numbers with massively different exponents would result in a very high number of zeros + // needing to be prepended, but this can be avoided while still ensuring correct rounding by + // limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`. + i = Math.Max((long)Math.Ceiling((double)pr / LOG_BASE), len) + 2; + + if (k > i) + { + k = i; + ArrayExtensions.Resize(ref d, 1); + } + + // Prepend zeros to equalise exponents. + ArrayExtensions.Reverse(ref d); + for (i = k; i--.IsTrue();) ArrayExtensions.Push(ref d, 0); + ArrayExtensions.Reverse(ref d); + + if (xLTy) xd = d; + else yd = d; + // Base 1e7 exponents equal. + } + else + { + + // Check digits to determine which is the bigger number. + + i = xd.LongLength; + len = yd.LongLength; + xLTy = i < len; + if (xLTy) len = i; + + for (i = 0; i < len; i++) + { + if (xd[i] != yd[i]) + { + xLTy = xd[i] < yd[i]; + break; + } + } + + k = 0; + } + + if (xLTy) + { + d = xd; + xd = yd; + yd = d; + y.s = -y.s; + } + + len = xd.LongLength; + + // Append zeros to xd if shorter. + // Don't add zeros to yd if shorter as subtraction only needs to start at yd length. + for (i = yd.LongLength - len; i > 0; --i) + { + if (xd.LongLength <= len) ArrayExtensions.Resize(ref xd, len + 1); + xd[len++] = 0; + } + + // Subtract yd from xd. + for (i = yd.LongLength; i > k;) + { + if (xd[--i] < yd[i]) + { + for (j = i; j.IsTrue() && xd[--j] == 0;) xd[j] = BASE - 1; + --xd[j]; + xd[i] += BASE; + } + + xd[i] -= yd[i]; + } + + // Remove trailing zeros. + for (; len > 0 && xd[--len] == 0;) ArrayExtensions.Pop(ref xd); + + // Remove leading zeros and adjust exponent accordingly. + for (; xd.LongLength > 0 && xd[0] == 0; ArrayExtensions.Shift(ref xd)) --e; + + // Zero? + if (xd.LongLength == 0 || !xd[0].IsTrue()) return new BigDecimalLight(0, Ctor); + + y.d = xd; + y.e = e; + + //return external && xd.length >= pr / LOG_BASE ? round(y, pr) : y; + return Ctor.external ? round(y, pr) : y; + } + + + internal static string toString(BigDecimalLight x, bool isExp = false, long? sd = null) + { + long k, e = getBase10Exponent(x); + var str = digitsToString(x.d); + var len = str.LongLength; + + if (isExp) + { + if (sd.IsTrue() && (k = sd.Value - len) > 0) + { + str = str.ElementAt(0) + "." + str.Slice(1) + getZeroString(k); + } + else if (len > 1) + { + str = str.ElementAt(0) + "." + str.Slice(1); + } + + str = str + (e < 0 ? "e" : "e+") + e; + } + else if (e < 0) + { + str = "0." + getZeroString(-e - 1) + str; + if (sd.IsTrue() && (k = sd.Value - len) > 0) str += getZeroString(k); + } + else if (e >= len) + { + str += getZeroString(e + 1 - len); + if (sd.IsTrue() && (k = sd.Value - e - 1) > 0) str = str + "." + getZeroString(k); + } + else + { + if ((k = e + 1) < len) str = str.Slice(0, k) + "." + str.Slice(k); + if (sd.IsTrue() && (k = sd.Value - len) > 0) + { + if (e + 1 == len) str += "."; + str += getZeroString(k); + } + } + + return x.s < 0 ? "-" + str : str; + } + + + /// + /// Does not strip trailing zeros. + /// + /// + /// + /// + internal static bool truncate(ref int[] arr, long len) + { + if (arr.LongLength > len) + { + ArrayExtensions.Resize(ref arr, len); + return true; + } + return false; + } + } +} diff --git a/DecimalSharp.Light/DecimalSharp.Light.csproj b/DecimalSharp.Light/DecimalSharp.Light.csproj new file mode 100644 index 0000000..08aa205 --- /dev/null +++ b/DecimalSharp.Light/DecimalSharp.Light.csproj @@ -0,0 +1,39 @@ + + + + net6.0 + enable + enable + True + 1.0.0 + XeroXP + + An arbitrary-precision Decimal type for C#. + Port of [decimal.js](https://github.com/MikeMcl/decimal.js/). + + Copyright (c) $(Authors) 2022 + https://github.com/XeroXP/DecimalSharp + README.md + https://github.com/XeroXP/DecimalSharp.git + git + decimal, arbitrary-precision, bigdecimal, bignumber, significant-digits, trigonometric-functions, decimal-places + LICENSE + False + + + + + True + \ + + + True + \ + + + + + + + + diff --git a/DecimalSharp.Tests/BigDecimalAbsTests.cs b/DecimalSharp.Tests/BigDecimalAbsTests.cs new file mode 100644 index 0000000..1001141 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalAbsTests.cs @@ -0,0 +1,156 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalAbs")] + public class BigDecimalAbsTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Abs() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument value) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(value).Abs().ValueOf()); + }; + + t("0", 0); + t("0", "0"); + t("0", -0); + t("0", "-0"); + t("1", 1); + t("1", -1); + t("1", "-1"); + t("0.5", "0.5"); + t("0.5", "-0.5"); + t("0.1", 0.1); + t("0.1", -0.1); + t("1.1", 1.1); + t("1.1", -1.1); + t("1.5", "1.5"); + t("1.5", "-1.5"); + + t("0.00001", "-1e-5"); + t("9000000000", "-9e9"); + t("123456.7891011", "123456.7891011"); + t("123456.7891011", -123456.7891011); + t("99", "99"); + t("99", -99); + t("999.999", 999.999); + t("999.999", "-999.999"); + t("1", bigDecimalFactory.BigDecimal(-1)); + t("1", bigDecimalFactory.BigDecimal("-1")); + t("0.001", bigDecimalFactory.BigDecimal(0.001)); + t("0.001", bigDecimalFactory.BigDecimal("-0.001")); + + t("Infinity", double.PositiveInfinity); + t("Infinity", double.NegativeInfinity); + t("Infinity", "Infinity"); + t("Infinity", "-Infinity"); + t("NaN", double.NaN); + t("NaN", -double.NaN); + t("NaN", "NaN"); + t("NaN", "-NaN"); + + t("11.121", "11.121"); + t("0.023842", "-0.023842"); + t("1.19", "-1.19"); + t("9.622e-11", "-0.00000000009622"); + t("5.09e-10", "-0.000000000509"); + t("3838.2", "3838.2"); + t("127", "127.0"); + t("4.23073", "4.23073"); + t("2.5469", "-2.5469"); + t("29949", "-29949"); + t("277.1", "-277.10"); + t("4.97898e-15", "-0.00000000000000497898"); + t("53.456", "53.456"); + t("100564", "-100564"); + t("12431.9", "-12431.9"); + t("97633.7", "-97633.7"); + t("220", "220"); + t("18.72", "18.720"); + t("2817", "-2817"); + t("44535", "-44535"); + + var bigDecimalFactory2 = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = 0, + ToExpPos = 0, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + t = (string expected, BigDecimalArgument value) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory2.BigDecimal(value).Abs().ValueOf()); + }; + + t("5.2452468128e+1", "-5.2452468128e+1"); + t("1.41525905257189365008396e+16", "1.41525905257189365008396e+16"); + t("2.743068083928e+11", "2.743068083928e+11"); + t("1.52993064722314247378724599e+26", "-1.52993064722314247378724599e+26"); + t("3.7205576746e+10", "3.7205576746e+10"); + t("2.663e-10", "-2.663e-10"); + t("1.26574209965030360615518e+17", "-1.26574209965030360615518e+17"); + t("1.052e+3", "1.052e+3"); + t("4.452945872502e+6", "-4.452945872502e+6"); + t("2.95732460816619226e+13", "2.95732460816619226e+13"); + t("1.1923100194288654481424e+18", "-1.1923100194288654481424e+18"); + t("8.99315449050893705e+6", "8.99315449050893705e+6"); + t("5.200726538434486963e+8", "5.200726538434486963e+8"); + t("1.182618278949368566264898065e+18", "1.182618278949368566264898065e+18"); + t("3.815873266712e-20", "-3.815873266712e-20"); + t("1.316675370382742615e+6", "-1.316675370382742615e+6"); + t("2.1032502e+6", "-2.1032502e+6"); + t("1.8e+1", "1.8e+1"); + t("1.033525906631680944018544811261e-13", "1.033525906631680944018544811261e-13"); + t("1.102361746443461856816e+14", "-1.102361746443461856816e+14"); + t("8.595358491143959e+1", "8.595358491143959e+1"); + t("1.226806049797304683867e-18", "1.226806049797304683867e-18"); + t("5e+0", "-5e+0"); + t("1.091168788407093537887970016e+15", "-1.091168788407093537887970016e+15"); + t("3.87166413612272027e+12", "3.87166413612272027e+12"); + t("1.411514e+5", "1.411514e+5"); + t("1.0053454672509859631996e+22", "1.0053454672509859631996e+22"); + t("6.9265714e+0", "6.9265714e+0"); + t("1.04627709e+4", "1.04627709e+4"); + t("2.285650225267766689304972e+5", "2.285650225267766689304972e+5"); + t("4.5790517211306242e+7", "4.5790517211306242e+7"); + t("3.0033340092338313923473428e+16", "-3.0033340092338313923473428e+16"); + t("2.83879929283797623e+1", "-2.83879929283797623e+1"); + t("4.5266377717178121183759377414e-5", "4.5266377717178121183759377414e-5"); + t("5.3781e+4", "-5.3781e+4"); + t("6.722035208213298413522819127e-18", "-6.722035208213298413522819127e-18"); + t("3.02865707828281230987116e+23", "-3.02865707828281230987116e+23"); + + t("1e-9000000000000000", "1e-9000000000000000"); + t("1e-9000000000000000", "-1e-9000000000000000"); + t("0e+0", "-9.9e-9000000000000001"); + t("9.999999e+9000000000000000", "9.999999e+9000000000000000"); + t("9.999999e+9000000000000000", "-9.999999e+9000000000000000"); + t("Infinity", "1E9000000000000001"); + t("Infinity", "-1e+9000000000000001"); + t("5.5879983320336874473209567979e+287894365", "-5.5879983320336874473209567979e+287894365"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalAcosTests.cs b/DecimalSharp.Tests/BigDecimalAcosTests.cs new file mode 100644 index 0000000..b7410b2 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalAcosTests.cs @@ -0,0 +1,1023 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalAcos")] + public class BigDecimalAcosTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Acos() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Acos().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("1.0000000000000001", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("2", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-1.0000000000000001", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-2", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("1", 40, RoundingMode.ROUND_HALF_UP, "0"); + t("-1", 40, RoundingMode.ROUND_HALF_UP, "3.141592653589793238462643383279502884197"); + t("0", 20, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192"); + t("-0", 20, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192"); + + t("-0.6403", 7, RoundingMode.ROUND_DOWN, "2.265685"); + t("-0.53", 2, RoundingMode.ROUND_CEIL, "2.2"); + t("0.4396178420823739355530719404", 10, RoundingMode.ROUND_UP, "1.115623176"); + t("0.496420101927875989152448746035981", 1, RoundingMode.ROUND_HALF_DOWN, "1"); + t("0.1", 2, RoundingMode.ROUND_UP, "1.5"); + t("-0.20878679", 6, RoundingMode.ROUND_CEIL, "1.78114"); + t("-0.541191262571486130575708261722416873899", 6, RoundingMode.ROUND_HALF_DOWN, "2.14265"); + t("0.5", 7, RoundingMode.ROUND_DOWN, "1.047197"); + t("-0.409325859", 10, RoundingMode.ROUND_CEIL, "1.992511392"); + t("0.551", 5, RoundingMode.ROUND_HALF_EVEN, "0.98723"); + t("0.5", 7, RoundingMode.ROUND_CEIL, "1.047198"); + t("-0.43419432724217379874620877899386037437997149166291587557428756984642427", 3, RoundingMode.ROUND_DOWN, "2.01"); + t("0.553", 9, RoundingMode.ROUND_FLOOR, "0.984835716"); + t("0.7809790373261734623688348400648923431479560079817", 6, RoundingMode.ROUND_DOWN, "0.674564"); + t("0.75824031", 9, RoundingMode.ROUND_UP, "0.710186479"); + t("-0.8", 8, RoundingMode.ROUND_CEIL, "2.4980916"); + t("0.0799", 3, RoundingMode.ROUND_HALF_DOWN, "1.49"); + t("-0.38393812134692277325859", 4, RoundingMode.ROUND_DOWN, "1.964"); + t("-0.3907773773285398604336", 1, RoundingMode.ROUND_DOWN, "1"); + t("-0.69992716948032572772435", 9, RoundingMode.ROUND_HALF_UP, "2.34609185"); + t("-0.66158215731029676878636733180177567", 8, RoundingMode.ROUND_UP, "2.2937231"); + t("0.9147368246772431874", 37, RoundingMode.ROUND_DOWN, "0.415940230269184272745464503534348965"); + t("-0.4553", 27, RoundingMode.ROUND_DOWN, "2.04350546255828224507689468"); + t("-0.028011903303708804768053896701975443", 56, RoundingMode.ROUND_DOWN, "1.5988118947274791447123927148057628240666865110752680848"); + t("0.4065777430651635458256706", 14, RoundingMode.ROUND_HALF_EVEN, "1.1520912372989"); + t("-0.78468834561401325", 40, RoundingMode.ROUND_HALF_EVEN, "2.472989536549809027410129361828086088366"); + t("-0.04164046779", 31, RoundingMode.ROUND_CEIL, "1.61244883758340629332195244831"); + t("-0.117424541", 82, RoundingMode.ROUND_DOWN, "1.688492407881140013543521665402011226342602786603530341844248637463449252725522796"); + t("-0.1870116529272128766435079579825546176806042554995693356583", 108, RoundingMode.ROUND_HALF_EVEN, "1.75891557205606890020875163685374748628399727002149491921316335140511350243361347958082966501905347526802867"); + t("0.0769104749433424068", 66, RoundingMode.ROUND_DOWN, "1.49380982556189042854757067055954756775240858876530364274625200666"); + t("-0.027096519359", 92, RoundingMode.ROUND_FLOOR, "1.5978961630571391095050365835267438779450813578907877311954803581546591891147373364143685647"); + t("-0.8", 33, RoundingMode.ROUND_HALF_EVEN, "2.49809154479650885165983415456218"); + t("0.67487482885692802659376964747029780872121304015294984476148189310252027478897761772", 54, RoundingMode.ROUND_FLOOR, "0.830001261924669662461861851080065080704764574011647298"); + t("-0.0804595260228093312276197203", 26, RoundingMode.ROUND_DOWN, "1.6513429189757672993077865"); + t("0.50408248676517825230780010554261667827445182236535818843176765834864294167168", 73, RoundingMode.ROUND_HALF_UP, "1.042477051429539838709819977914186923616698698550378124843462531977088459"); + t("0.92980935280344761170800142822446189257", 42, RoundingMode.ROUND_UP, "0.376901826310506133287494991222901254976804"); + t("0.41923186648524998285699814886092351368793359300547574", 42, RoundingMode.ROUND_FLOOR, "1.13819724675000902666504291062053681280681"); + t("-0.19508761025300975791021816036", 27, RoundingMode.ROUND_DOWN, "1.76714310275532020878366926"); + t("0.0623252416", 19, RoundingMode.ROUND_UP, "1.508430664767542249"); + + /* + t("0.95", 6, RoundingMode.ROUND_HALF_DOWN, "0.31756"); + t("0.6782122461122354137218760145906432", 10, RoundingMode.ROUND_FLOOR, "0.8254691932"); + t("0.9", 2, RoundingMode.ROUND_UP, "0.46"); + t("0.8439967", 6, RoundingMode.ROUND_HALF_EVEN, "0.566105"); + t("-0.59046118436", 9, RoundingMode.ROUND_DOWN, "2.20242648"); + t("-0.00438975", 7, RoundingMode.ROUND_CEIL, "1.575187"); + t("-0.7", 4, RoundingMode.ROUND_HALF_DOWN, "2.346"); + t("-0.54048", 5, RoundingMode.ROUND_HALF_UP, "2.1418"); + t("-0.1", 9, RoundingMode.ROUND_DOWN, "1.67096374"); + t("-0.03", 1, RoundingMode.ROUND_HALF_UP, "2"); + t("0.477", 2, RoundingMode.ROUND_DOWN, "1"); + t("0.86633", 8, RoundingMode.ROUND_HALF_UP, "0.52298926"); + t("-0.18", 4, RoundingMode.ROUND_HALF_EVEN, "1.752"); + t("-0.8", 9, RoundingMode.ROUND_FLOOR, "2.49809154"); + t("0.13725829263605", 1, RoundingMode.ROUND_DOWN, "1"); + t("0.1", 3, RoundingMode.ROUND_HALF_DOWN, "1.47"); + t("-0.1", 4, RoundingMode.ROUND_FLOOR, "1.67"); + t("0.8", 4, RoundingMode.ROUND_FLOOR, "0.6435"); + t("0.6497", 1, RoundingMode.ROUND_HALF_UP, "0.9"); + t("0.1", 6, RoundingMode.ROUND_CEIL, "1.47063"); + t("-0.593190985978055", 4, RoundingMode.ROUND_HALF_EVEN, "2.206"); + t("-0.6771975", 5, RoundingMode.ROUND_HALF_UP, "2.3147"); + t("0.5", 10, RoundingMode.ROUND_FLOOR, "1.047197551"); + t("0.411", 6, RoundingMode.ROUND_CEIL, "1.14725"); + t("-0.4809827781413082812652", 5, RoundingMode.ROUND_HALF_DOWN, "2.0726"); + t("-0.952638735551551392839093035764802", 1, RoundingMode.ROUND_HALF_DOWN, "3"); + t("-0.6015876026815245199418429601227", 4, RoundingMode.ROUND_HALF_EVEN, "2.216"); + t("0.5", 6, RoundingMode.ROUND_UP, "1.0472"); + t("-0.76", 2, RoundingMode.ROUND_CEIL, "2.5"); + t("-0.6013", 1, RoundingMode.ROUND_HALF_UP, "2"); + t("-0.9619020953156049811208600576084629099216448796", 9, RoundingMode.ROUND_FLOOR, "2.8646728"); + t("-0.3", 4, RoundingMode.ROUND_UP, "1.876"); + t("0.337084216260134216861133323767946303807138899466200313856035", 4, RoundingMode.ROUND_CEIL, "1.227"); + t("-0.75767230234522", 10, RoundingMode.ROUND_HALF_DOWN, "2.430535406"); + t("0.4", 9, RoundingMode.ROUND_HALF_UP, "1.15927948"); + t("-0.737", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("0.8233161", 5, RoundingMode.ROUND_CEIL, "0.60357"); + t("-0.1", 2, RoundingMode.ROUND_DOWN, "1.6"); + t("0.6", 9, RoundingMode.ROUND_HALF_UP, "0.927295218"); + t("0.76", 2, RoundingMode.ROUND_DOWN, "0.7"); + t("-0.587319056", 5, RoundingMode.ROUND_DOWN, "2.1985"); + t("-0.5425", 9, RoundingMode.ROUND_UP, "2.14420658"); + t("-0.613", 2, RoundingMode.ROUND_DOWN, "2.2"); + t("-0.733", 7, RoundingMode.ROUND_DOWN, "2.393518"); + t("0.58568", 4, RoundingMode.ROUND_CEIL, "0.9451"); + t("-0.46", 10, RoundingMode.ROUND_UP, "2.048791526"); + t("-0.62", 9, RoundingMode.ROUND_UP, "2.23953903"); + t("0.35313", 4, RoundingMode.ROUND_HALF_UP, "1.21"); + t("-0.278790639682828162964860311", 7, RoundingMode.ROUND_HALF_EVEN, "1.853331"); + t("0.67962813723803580884418361", 7, RoundingMode.ROUND_DOWN, "0.8235407"); + t("-0.86771990862867", 8, RoundingMode.ROUND_HALF_UP, "2.6213929"); + t("0.616", 5, RoundingMode.ROUND_HALF_DOWN, "0.90714"); + t("-0.298192829", 5, RoundingMode.ROUND_HALF_UP, "1.8736"); + t("0.45246", 4, RoundingMode.ROUND_HALF_DOWN, "1.101"); + t("-0.8100687881", 2, RoundingMode.ROUND_HALF_UP, "2.5"); + t("-0.6055836687", 9, RoundingMode.ROUND_UP, "2.22129545"); + t("-0.20522811988416665729178720937411834014759998394524", 2, RoundingMode.ROUND_HALF_EVEN, "1.8"); + t("0.76781", 10, RoundingMode.ROUND_FLOOR, "0.695380468"); + t("0.088", 2, RoundingMode.ROUND_FLOOR, "1.4"); + t("-0.620448", 3, RoundingMode.ROUND_DOWN, "2.24"); + t("0.341092619", 5, RoundingMode.ROUND_DOWN, "1.2227"); + t("0.394", 9, RoundingMode.ROUND_FLOOR, "1.16581673"); + t("-0.9358665715688378541360271216842", 10, RoundingMode.ROUND_UP, "2.781506787"); + t("0.9075", 4, RoundingMode.ROUND_FLOOR, "0.4335"); + t("0.83", 9, RoundingMode.ROUND_CEIL, "0.591688643"); + t("0.062739", 3, RoundingMode.ROUND_FLOOR, "1.5"); + t("-0.82857137318719627851264048744030581", 8, RoundingMode.ROUND_FLOOR, "2.5473475"); + t("0.1", 1, RoundingMode.ROUND_HALF_DOWN, "1"); + t("0.63084461862774261096711391638623678987624404553597536466391646597157202402476445757", 10, RoundingMode.ROUND_DOWN, "0.8881550428"); + t("0.2284220686229836933172652354606909080856597257455321", 7, RoundingMode.ROUND_HALF_EVEN, "1.34034"); + t("0.4228867310325098114", 1, RoundingMode.ROUND_UP, "2"); + t("-0.222929803381779674485", 4, RoundingMode.ROUND_UP, "1.796"); + t("-0.951181739863743076901092296297469029", 2, RoundingMode.ROUND_CEIL, "2.9"); + t("0.094471294813741920908218807598153918875347786", 3, RoundingMode.ROUND_UP, "1.48"); + t("0.076", 3, RoundingMode.ROUND_UP, "1.5"); + t("0.7", 2, RoundingMode.ROUND_CEIL, "0.8"); + t("-0.86546", 5, RoundingMode.ROUND_HALF_UP, "2.6169"); + t("0.83", 5, RoundingMode.ROUND_FLOOR, "0.59168"); + t("-0.9235418987963690856937924948640127834721109271761628", 4, RoundingMode.ROUND_HALF_UP, "2.748"); + t("0.487524009901115874295499714788", 2, RoundingMode.ROUND_HALF_EVEN, "1.1"); + t("0.8078522", 9, RoundingMode.ROUND_HALF_EVEN, "0.630297503"); + t("0.577343", 6, RoundingMode.ROUND_CEIL, "0.955326"); + t("0.2", 6, RoundingMode.ROUND_UP, "1.36944"); + t("-0.8", 4, RoundingMode.ROUND_HALF_DOWN, "2.498"); + t("-0.84662830373", 7, RoundingMode.ROUND_UP, "2.580414"); + t("-0.19700436573237763730516494933957191921146286", 2, RoundingMode.ROUND_FLOOR, "1.7"); + t("0.3836295855006759034334943790438844484723154048614634089922502442080631201", 6, RoundingMode.ROUND_CEIL, "1.17708"); + t("-0.849485756377747570925803744679347155004858131625176072190759001257457647517968002", 5, RoundingMode.ROUND_HALF_UP, "2.5858"); + t("0.597582781241077407", 4, RoundingMode.ROUND_CEIL, "0.9304"); + t("0.31834", 3, RoundingMode.ROUND_HALF_DOWN, "1.25"); + t("-0.367", 3, RoundingMode.ROUND_HALF_EVEN, "1.95"); + t("0.893808596797515523019879332290496896237067857221860489", 7, RoundingMode.ROUND_FLOOR, "0.4650289"); + t("0.374872972069827886017", 10, RoundingMode.ROUND_DOWN, "1.186536576"); + t("-0.5613162575574577608415066581055940977630188561133164966", 9, RoundingMode.ROUND_UP, "2.16677172"); + t("0.3678323679973177279659849134961285470583517301775754709620886174544308257638", 1, RoundingMode.ROUND_FLOOR, "1"); + t("0.346", 8, RoundingMode.ROUND_FLOOR, "1.2174919"); + t("-0.11", 9, RoundingMode.ROUND_UP, "1.68101938"); + t("-0.5", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("0.03", 6, RoundingMode.ROUND_FLOOR, "1.54079"); + t("-0.2564536384147918999674", 4, RoundingMode.ROUND_HALF_DOWN, "1.83"); + t("0.9029", 5, RoundingMode.ROUND_UP, "0.44433"); + t("0.17044875172902250879349842138284811", 4, RoundingMode.ROUND_FLOOR, "1.399"); + t("-0.04", 6, RoundingMode.ROUND_DOWN, "1.6108"); + t("-0.72", 6, RoundingMode.ROUND_HALF_DOWN, "2.3746"); + t("-0.374445", 3, RoundingMode.ROUND_HALF_DOWN, "1.95"); + t("-0.756994371", 6, RoundingMode.ROUND_HALF_DOWN, "2.4295"); + t("-0.9081387325585673018085467898219", 2, RoundingMode.ROUND_FLOOR, "2.7"); + t("-0.35829780053537939", 6, RoundingMode.ROUND_HALF_UP, "1.93724"); + t("0.94562511157430461974286", 4, RoundingMode.ROUND_DOWN, "0.3312"); + t("-0.268461392639090381541081", 8, RoundingMode.ROUND_DOWN, "1.8425917"); + t("0.818901", 2, RoundingMode.ROUND_DOWN, "0.61"); + t("-0.659675659513922964174536723050240843462", 9, RoundingMode.ROUND_UP, "2.29118345"); + t("-0.23", 8, RoundingMode.ROUND_HALF_EVEN, "1.802874"); + t("-0.25683", 5, RoundingMode.ROUND_HALF_UP, "1.8305"); + t("0.61811813899141487671644935007974504701896579769778704828587593327313038460755", 9, RoundingMode.ROUND_HALF_EVEN, "0.904449849"); + t("0.11", 7, RoundingMode.ROUND_CEIL, "1.460574"); + t("0.54", 1, RoundingMode.ROUND_HALF_DOWN, "1"); + t("0.45841299739334041851760970804079873999270095487034", 6, RoundingMode.ROUND_UP, "1.09459"); + t("0.18682442", 9, RoundingMode.ROUND_HALF_DOWN, "1.38286767"); + t("0.463108773900948823577630041761", 6, RoundingMode.ROUND_HALF_EVEN, "1.0893"); + t("0.36", 9, RoundingMode.ROUND_UP, "1.20252844"); + t("0.69167132409296405543909913923530533152982653044406335774061454983821414578034849", 6, RoundingMode.ROUND_DOWN, "0.806995"); + t("-0.48221", 7, RoundingMode.ROUND_DOWN, "2.073971"); + t("-0.8397196", 8, RoundingMode.ROUND_HALF_EVEN, "2.567563"); + t("0.2", 4, RoundingMode.ROUND_HALF_DOWN, "1.369"); + t("0.3", 5, RoundingMode.ROUND_HALF_DOWN, "1.2661"); + t("-0.8716217373065117836099194492152290209261081", 10, RoundingMode.ROUND_UP, "2.629297438"); + t("-0.235137992858192325004712921493793310063869506755", 10, RoundingMode.ROUND_HALF_DOWN, "1.808156866"); + t("0.74", 10, RoundingMode.ROUND_HALF_EVEN, "0.7377259685"); + t("-0.8", 5, RoundingMode.ROUND_CEIL, "2.4981"); + t("-0.75", 3, RoundingMode.ROUND_UP, "2.42"); + t("0.12", 4, RoundingMode.ROUND_HALF_EVEN, "1.451"); + t("0.249534", 8, RoundingMode.ROUND_HALF_DOWN, "1.3185973"); + t("0.6", 7, RoundingMode.ROUND_UP, "0.9272953"); + t("0.692812647977054453571424905868707335897749486748180167", 10, RoundingMode.ROUND_DOWN, "0.8054141439"); + t("0.22313303955564242995", 10, RoundingMode.ROUND_DOWN, "1.345768959"); + t("0.788581266389683", 4, RoundingMode.ROUND_HALF_EVEN, "0.6623"); + t("0.270395797", 5, RoundingMode.ROUND_HALF_EVEN, "1.297"); + t("-0.213", 9, RoundingMode.ROUND_DOWN, "1.78544072"); + t("0.731726836", 4, RoundingMode.ROUND_DOWN, "0.7499"); + t("0.9", 6, RoundingMode.ROUND_HALF_DOWN, "0.451027"); + t("0.21819724676955491867", 8, RoundingMode.ROUND_DOWN, "1.3508295"); + t("0.6", 6, RoundingMode.ROUND_UP, "0.927296"); + t("0.5", 8, RoundingMode.ROUND_UP, "1.0471976"); + t("-0.5687", 8, RoundingMode.ROUND_FLOOR, "2.1757208"); + t("-0.205008836049605", 3, RoundingMode.ROUND_FLOOR, "1.77"); + t("0.21815471602", 5, RoundingMode.ROUND_FLOOR, "1.3508"); + t("0.6775921772444159658049243505289898942363754194629369209188593145100238910233763", 18, RoundingMode.ROUND_DOWN, "0.826312649886108325"); + t("0.8", 10, RoundingMode.ROUND_HALF_DOWN, "0.6435011088"); + t("-0.3894", 1, RoundingMode.ROUND_CEIL, "2"); + t("0.695", 10, RoundingMode.ROUND_HALF_EVEN, "0.802376426"); + t("-0.4789", 10, RoundingMode.ROUND_FLOOR, "2.070197576"); + t("-0.257", 19, RoundingMode.ROUND_HALF_UP, "1.830712974317097882"); + t("-0.310869", 16, RoundingMode.ROUND_HALF_DOWN, "1.886903523783146"); + t("0.857378962252028391821219384", 19, RoundingMode.ROUND_HALF_EVEN, "0.5406409645523838012"); + t("0.2926612128408878223404892798081685677264279726117999272", 1, RoundingMode.ROUND_HALF_DOWN, "1"); + t("0.3", 1, RoundingMode.ROUND_CEIL, "2"); + t("-0.67425957", 10, RoundingMode.ROUND_HALF_EVEN, "2.310757949"); + t("-0.35", 12, RoundingMode.ROUND_CEIL, "1.92836743045"); + t("0.343097163897999328539202318652314827417671587533443281589", 8, RoundingMode.ROUND_DOWN, "1.220584"); + t("-0.47278", 14, RoundingMode.ROUND_CEIL, "2.0632393031958"); + t("-0.553", 9, RoundingMode.ROUND_CEIL, "2.15675694"); + t("0.8", 4, RoundingMode.ROUND_HALF_UP, "0.6435"); + t("0.82334138087823235917019871914520451457890998921366467128994864994757", 7, RoundingMode.ROUND_FLOOR, "0.6035227"); + t("-0.49", 5, RoundingMode.ROUND_UP, "2.0829"); + t("-0.60599962528016354469467517115896723145207184671771676378971221483536", 14, RoundingMode.ROUND_UP, "2.2218182489755"); + t("0.13", 20, RoundingMode.ROUND_DOWN, "1.4404273470917511062"); + t("0.848677597574937211649010988442521035223542264485067207668", 1, RoundingMode.ROUND_DOWN, "0.5"); + t("0.1427835401559015373454", 19, RoundingMode.ROUND_HALF_EVEN, "1.42752312293440072"); + t("0.8940799877", 1, RoundingMode.ROUND_UP, "0.5"); + t("-0.6414958", 5, RoundingMode.ROUND_HALF_DOWN, "2.2672"); + t("-0.174395124142928078882432653", 17, RoundingMode.ROUND_CEIL, "1.7460877721215552"); + t("0.77", 1, RoundingMode.ROUND_FLOOR, "0.6"); + t("0.993512018914577263250830193986713809523494639", 10, RoundingMode.ROUND_CEIL, "0.1139737593"); + t("0.525", 7, RoundingMode.ROUND_CEIL, "1.018082"); + t("0.71059635665084660234827", 6, RoundingMode.ROUND_UP, "0.780451"); + t("-0.3832", 18, RoundingMode.ROUND_UP, "1.96405460206347454"); + t("-0.876573822667242", 19, RoundingMode.ROUND_CEIL, "2.639492630186552352"); + t("-0.658049576261108648722957575603", 6, RoundingMode.ROUND_HALF_UP, "2.28902"); + t("-0.88", 15, RoundingMode.ROUND_DOWN, "2.64665852724889"); + t("0.0617850401147", 4, RoundingMode.ROUND_HALF_UP, "1.509"); + t("-0.44696060526747270690531041467035958398", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("-0.638", 15, RoundingMode.ROUND_CEIL, "2.26269450893194"); + t("0.76808982171163819", 16, RoundingMode.ROUND_CEIL, "0.6949435946866321"); + t("0.15", 13, RoundingMode.ROUND_UP, "1.420228054019"); + t("-0.3165", 19, RoundingMode.ROUND_HALF_UP, "1.892833854735544125"); + t("-0.076053568152984328506148855", 2, RoundingMode.ROUND_CEIL, "1.7"); + t("0.31", 12, RoundingMode.ROUND_HALF_EVEN, "1.25560329435"); + t("-0.534346270088392", 4, RoundingMode.ROUND_HALF_UP, "2.135"); + t("0.166", 18, RoundingMode.ROUND_HALF_UP, "1.40402433239928283"); + t("0.812526806058078610617925321538", 11, RoundingMode.ROUND_DOWN, "0.6223225045"); + t("-0.585", 7, RoundingMode.ROUND_FLOOR, "2.195676"); + t("-0.4", 5, RoundingMode.ROUND_UP, "1.9824"); + t("-0.37375109360492", 19, RoundingMode.ROUND_HALF_EVEN, "1.953846247754098002"); + t("0.3", 14, RoundingMode.ROUND_UP, "1.2661036727795"); + t("-0.5", 17, RoundingMode.ROUND_UP, "2.0943951023931955"); + t("-0.861442", 19, RoundingMode.ROUND_HALF_DOWN, "2.608898585907231241"); + t("0.79216439705858813560085919779023", 15, RoundingMode.ROUND_HALF_UP, "0.656449044348769"); + t("-0.4803", 13, RoundingMode.ROUND_DOWN, "2.071793041769"); + t("0.3", 9, RoundingMode.ROUND_FLOOR, "1.26610367"); + t("0.9541394184", 5, RoundingMode.ROUND_FLOOR, "0.30402"); + t("-0.28183", 8, RoundingMode.ROUND_HALF_UP, "1.8564972"); + t("0.9976436658898658296", 14, RoundingMode.ROUND_UP, "0.068662363447803"); + t("-0.03", 4, RoundingMode.ROUND_HALF_UP, "1.601"); + t("0.8", 13, RoundingMode.ROUND_HALF_DOWN, "0.6435011087933"); + t("0.862204474381801", 5, RoundingMode.ROUND_DOWN, "0.53119"); + t("-0.68227", 11, RoundingMode.ROUND_HALF_DOWN, "2.3216593903"); + t("-0.29955379438877625151779", 5, RoundingMode.ROUND_CEIL, "1.8751"); + t("0.70189454", 10, RoundingMode.ROUND_HALF_EVEN, "0.7927424822"); + t("-0.0422", 3, RoundingMode.ROUND_HALF_DOWN, "1.61"); + t("0.33649602321990285156925", 2, RoundingMode.ROUND_HALF_EVEN, "1.2"); + t("0.82324854841987959282", 10, RoundingMode.ROUND_CEIL, "0.6036863388"); + t("-0.4542", 16, RoundingMode.ROUND_UP, "2.042270366560878"); + t("-0.1881511386654035", 16, RoundingMode.ROUND_HALF_EVEN, "1.7600756503428"); + t("-0.6", 5, RoundingMode.ROUND_HALF_DOWN, "2.2143"); + t("0.94", 14, RoundingMode.ROUND_HALF_EVEN, "0.34816602127296"); + t("-0.24223", 13, RoundingMode.ROUND_HALF_DOWN, "1.815459971244"); + t("0.94039650137245854", 18, RoundingMode.ROUND_FLOOR, "0.347001988302835689"); + t("0.567", 10, RoundingMode.ROUND_UP, "0.9679370805"); + t("0.817132", 11, RoundingMode.ROUND_UP, "0.6143782725"); + t("0.6", 14, RoundingMode.ROUND_HALF_UP, "0.92729521800161"); + t("-0.799", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("-0.87", 15, RoundingMode.ROUND_HALF_EVEN, "2.6259986473437"); + t("0.98020631547840323825958", 7, RoundingMode.ROUND_CEIL, "0.1992955"); + t("0.969879", 3, RoundingMode.ROUND_HALF_DOWN, "0.246"); + t("-0.2", 2, RoundingMode.ROUND_UP, "1.8"); + t("0.2338", 13, RoundingMode.ROUND_CEIL, "1.334812148601"); + t("-0.6052271710195", 20, RoundingMode.ROUND_UP, "2.2208475350684965405"); + t("0.35", 18, RoundingMode.ROUND_CEIL, "1.21322522314938634"); + t("-0.842", 4, RoundingMode.ROUND_FLOOR, "2.571"); + t("-0.87", 3, RoundingMode.ROUND_UP, "2.63"); + t("-0.9655321240665159038181161557768210603975229399719262078509071", 4, RoundingMode.ROUND_DOWN, "2.878"); + t("-0.5", 11, RoundingMode.ROUND_HALF_DOWN, "2.0943951024"); + t("0.0434470587364821086", 20, RoundingMode.ROUND_DOWN, "1.5273355876501416888"); + t("-0.9023189765", 18, RoundingMode.ROUND_FLOOR, "2.6959155095591904"); + t("0.38472069", 6, RoundingMode.ROUND_FLOOR, "1.17589"); + t("0.440445631", 13, RoundingMode.ROUND_CEIL, "1.114701343472"); + t("-0.814594975783447641302854969927109083375663", 19, RoundingMode.ROUND_FLOOR, "2.522826897687134364"); + t("0.418635603", 15, RoundingMode.ROUND_DOWN, "1.13885391246007"); + t("-0.4", 8, RoundingMode.ROUND_UP, "1.9823132"); + t("-0.6268181837797543172087172579737915560087499381571", 11, RoundingMode.ROUND_HALF_UP, "2.2482591769"); + t("-0.5472", 16, RoundingMode.ROUND_FLOOR, "2.149811619074141"); + t("0.593461545109287", 9, RoundingMode.ROUND_HALF_UP, "0.935443479"); + t("0.40718907579454", 19, RoundingMode.ROUND_HALF_EVEN, "1.151422002415415093"); + t("-0.245018", 12, RoundingMode.ROUND_UP, "1.81833458521"); + t("0.44892", 9, RoundingMode.ROUND_DOWN, "1.10523998"); + t("-0.53", 13, RoundingMode.ROUND_HALF_UP, "2.129396892138"); + t("-0.985380589907607895709633253258680714418853594643583209591678569023201332", 16, RoundingMode.ROUND_UP, "2.970390020375099"); + t("0.9981032", 18, RoundingMode.ROUND_CEIL, "0.0616019471315393363"); + t("-0.73", 11, RoundingMode.ROUND_FLOOR, "2.3891182774"); + t("-0.4346623785953887710213039936159041301176386609468082123968425209464899", 17, RoundingMode.ROUND_HALF_DOWN, "2.0204596819508992"); + t("-0.702707075434218899650761988295540056760882930878615738869968", 7, RoundingMode.ROUND_HALF_EVEN, "2.349992"); + t("-0.1333913959628289", 13, RoundingMode.ROUND_FLOOR, "1.704586502162"); + t("-0.1192760278033", 19, RoundingMode.ROUND_DOWN, "1.690356999485319758"); + t("-0.41863394314", 19, RoundingMode.ROUND_FLOOR, "2.002736913401431522"); + t("0.57534149", 10, RoundingMode.ROUND_UP, "0.9577747264"); + t("-0.27020352178646799", 10, RoundingMode.ROUND_UP, "1.844400737"); + t("0.0749", 4, RoundingMode.ROUND_DOWN, "1.495"); + t("-0.01", 17, RoundingMode.ROUND_DOWN, "1.5807964934690637"); + t("-0.56933496", 7, RoundingMode.ROUND_UP, "2.176494"); + t("0.0543359319531926926616300067219154081091311532", 9, RoundingMode.ROUND_FLOOR, "1.51643362"); + t("0.537208531389992347851842642220403924987048182", 14, RoundingMode.ROUND_DOWN, "1.0036723051327"); + t("-0.9", 6, RoundingMode.ROUND_UP, "2.69057"); + t("-0.65196", 2, RoundingMode.ROUND_DOWN, "2.2"); + t("-0.596369", 14, RoundingMode.ROUND_FLOOR, "2.2097663690323"); + t("-0.81969737060322512599445554200607707", 14, RoundingMode.ROUND_HALF_DOWN, "2.5316788092947"); + t("0.7158013121084596", 12, RoundingMode.ROUND_HALF_DOWN, "0.773025382289"); + t("-0.48691272770447642687701691564767553210087668067888595005573562004647034891284152127623904", 14, RoundingMode.ROUND_HALF_UP, "2.0793480133353"); + t("-0.652459334707362898", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("0.71518316684475522312650454100299950718622177628", 20, RoundingMode.ROUND_HALF_UP, "0.77391019054722174405"); + t("-0.4", 13, RoundingMode.ROUND_FLOOR, "1.982313172862"); + t("0.6", 9, RoundingMode.ROUND_UP, "0.927295219"); + t("0.86051013", 9, RoundingMode.ROUND_FLOOR, "0.534526132"); + t("-0.5990292", 10, RoundingMode.ROUND_FLOOR, "2.213084487"); + t("0.503872932770429800477102963908324723723750975878", 8, RoundingMode.ROUND_DOWN, "1.0427196"); + t("-0.9", 8, RoundingMode.ROUND_HALF_UP, "2.6905658"); + t("0.076649293894779676736624", 12, RoundingMode.ROUND_CEIL, "1.49407177989"); + t("0.296691062886738", 11, RoundingMode.ROUND_HALF_UP, "1.2695704984"); + t("-0.1", 7, RoundingMode.ROUND_UP, "1.670964"); + t("-0.31752634972187205360626021192211627", 9, RoundingMode.ROUND_DOWN, "1.89391602"); + t("-0.81985", 17, RoundingMode.ROUND_FLOOR, "2.5319453235267068"); + t("-0.8", 20, RoundingMode.ROUND_DOWN, "2.4980915447965088516"); + t("-0.55930690734709168137685108430804676248632899467905651835984911076", 7, RoundingMode.ROUND_UP, "2.164346"); + t("-0.116997", 19, RoundingMode.ROUND_CEIL, "1.688061899409209783"); + t("0.0592209012227646877316245910628199623", 10, RoundingMode.ROUND_FLOOR, "1.511540755"); + t("-0.0268", 3, RoundingMode.ROUND_CEIL, "1.6"); + t("0.842", 16, RoundingMode.ROUND_HALF_EVEN, "0.5698164693561026"); + t("-0.8194571472489072894183365737", 20, RoundingMode.ROUND_HALF_DOWN, "2.5312595483958324092"); + t("0.9315217768190996504603342581382273458", 17, RoundingMode.ROUND_HALF_EVEN, "0.37222133562664327"); + t("-0.166", 16, RoundingMode.ROUND_HALF_DOWN, "1.73756832119051"); + t("0.62506424277363108339572043488301", 5, RoundingMode.ROUND_UP, "0.89559"); + t("-0.3", 18, RoundingMode.ROUND_HALF_DOWN, "1.87548898081029413"); + t("-0.3", 2, RoundingMode.ROUND_CEIL, "1.9"); + t("0.73664112061341491382261246495032839844086363068023119132", 17, RoundingMode.ROUND_FLOOR, "0.74270616791967784"); + t("0.1363116363910698633", 15, RoundingMode.ROUND_HALF_DOWN, "1.43405898997327"); + t("-0.6412", 3, RoundingMode.ROUND_DOWN, "2.26"); + t("-0.65520448008523004450718", 11, RoundingMode.ROUND_CEIL, "2.2852495882"); + t("-0.1", 11, RoundingMode.ROUND_UP, "1.670963748"); + t("-0.5", 7, RoundingMode.ROUND_DOWN, "2.094395"); + t("-0.715944185372", 15, RoundingMode.ROUND_DOWN, "2.3687718931402"); + t("-0.052008519540913639299413025155059232", 17, RoundingMode.ROUND_CEIL, "1.6228283211074864"); + t("-0.3929169056735", 19, RoundingMode.ROUND_HALF_EVEN, "1.974597796614285806"); + t("0.387", 14, RoundingMode.ROUND_HALF_DOWN, "1.1734204790473"); + t("-0.30415385", 1, RoundingMode.ROUND_HALF_UP, "2"); + t("0.1638705685", 2, RoundingMode.ROUND_DOWN, "1.4"); + t("-0.0116", 17, RoundingMode.ROUND_HALF_UP, "1.5823965869599838"); + t("0.5", 10, RoundingMode.ROUND_CEIL, "1.047197552"); + t("-0.669195320584918483", 6, RoundingMode.ROUND_HALF_DOWN, "2.30392"); + t("-0.7", 16, RoundingMode.ROUND_UP, "2.34619382340565"); + t("-0.20965423961596854766427", 3, RoundingMode.ROUND_FLOOR, "1.78"); + t("-0.3024517405802118186370971321888114487505427564342271246956948673272685264325594", 19, RoundingMode.ROUND_HALF_DOWN, "1.878060145630610698"); + t("0.5273934544340106053598398649874301142779", 3, RoundingMode.ROUND_HALF_EVEN, "1.02"); + t("0.4683", 21, RoundingMode.ROUND_FLOOR, "1.08343054581451120153"); + t("0.30954842721709487429800843717695846301791", 17, RoundingMode.ROUND_UP, "1.2560782291134293"); + t("-0.888883921", 16, RoundingMode.ROUND_DOWN, "2.665699560033124"); + t("0.33", 6, RoundingMode.ROUND_FLOOR, "1.23449"); + t("-0.68368", 13, RoundingMode.ROUND_FLOOR, "2.323589730068"); + t("0.93", 34, RoundingMode.ROUND_CEIL, "0.3763834823177282451373449774361505"); + t("0.3698", 29, RoundingMode.ROUND_UP, "1.192002574767283291061864894"); + t("0.355441709936171846454531663", 39, RoundingMode.ROUND_HALF_DOWN, "1.20740973250614205677034142380633077623"); + t("0.517281812929938845773741996797199819632431620265311173775606", 37, RoundingMode.ROUND_HALF_DOWN, "1.027124574195724397997651700469089434"); + t("0.276034638", 14, RoundingMode.ROUND_DOWN, "1.2911303295406"); + t("-0.427378167812", 18, RoundingMode.ROUND_HALF_UP, "2.01238708626475883"); + t("0.7700912257488174", 32, RoundingMode.ROUND_FLOOR, "0.69181218555632259942452962895323"); + t("0.65400722679265650897967", 30, RoundingMode.ROUND_FLOOR, "0.857926796441501086370244464773"); + t("-0.623273844710841661", 28, RoundingMode.ROUND_DOWN, "2.2437185634166815917813569"); + t("-0.26081553123", 25, RoundingMode.ROUND_DOWN, "1.834663203274733703635477"); + t("-0.4", 27, RoundingMode.ROUND_FLOOR, "1.98231317286238463861605958"); + t("0.8847", 11, RoundingMode.ROUND_FLOOR, "0.484946264"); + t("-0.00705453784616009713900280021204402727", 18, RoundingMode.ROUND_UP, "1.57785092315564841"); + t("-0.552994", 31, RoundingMode.ROUND_CEIL, "2.156749735981633261782975084481"); + t("0.3458218138135", 9, RoundingMode.ROUND_HALF_UP, "1.21768183"); + t("0.6", 19, RoundingMode.ROUND_HALF_EVEN, "0.9272952180016122324"); + t("0.2", 40, RoundingMode.ROUND_FLOOR, "1.369438406004565827776196139422128031858"); + t("0.009", 1, RoundingMode.ROUND_CEIL, "2"); + t("0.078144520570218640488786936480763017912996575464647691", 16, RoundingMode.ROUND_HALF_UP, "1.492572054428754"); + t("0.7471798900635237048453219283651", 8, RoundingMode.ROUND_DOWN, "0.7269876"); + t("0.441089398925", 30, RoundingMode.ROUND_DOWN, "1.11398415020876780936358454628"); + t("0.628", 37, RoundingMode.ROUND_HALF_DOWN, "0.891815777954216557189787158458505882"); + t("-0.68023958721527", 8, RoundingMode.ROUND_FLOOR, "2.3188857"); + t("0.71248072864836", 3, RoundingMode.ROUND_HALF_EVEN, "0.778"); + t("-0.3223260041", 10, RoundingMode.ROUND_FLOOR, "1.898981934"); + t("0.90324", 39, RoundingMode.ROUND_UP, "0.44353573953946010617241116802156115809"); + t("0.43979", 34, RoundingMode.ROUND_DOWN, "1.115431493591550771565404132943007"); + t("-0.96777723022207210864", 12, RoundingMode.ROUND_HALF_DOWN, "2.88704472691"); + t("-0.548906189625", 31, RoundingMode.ROUND_UP, "2.151851434325739845071909666811"); + t("0.7986831312105023986463", 19, RoundingMode.ROUND_HALF_DOWN, "0.6456926898464239449"); + t("0.36027708292732470568972", 5, RoundingMode.ROUND_FLOOR, "1.2022"); + t("0.1239759983305", 5, RoundingMode.ROUND_UP, "1.4466"); + t("0.07901753495496", 3, RoundingMode.ROUND_HALF_DOWN, "1.49"); + t("0.413", 30, RoundingMode.ROUND_HALF_DOWN, "1.14505065822496118579891230509"); + t("0.91068968477719", 15, RoundingMode.ROUND_UP, "0.425845755053204"); + t("0.30263", 14, RoundingMode.ROUND_HALF_UP, "1.2633454839218"); + t("0.78", 10, RoundingMode.ROUND_HALF_EVEN, "0.6761305096"); + t("0.2006478079819", 14, RoundingMode.ROUND_HALF_EVEN, "1.368777195082"); + t("-0.914938674", 11, RoundingMode.ROUND_DOWN, "2.7261522711"); + t("-0.5733890985458260015744265648331", 4, RoundingMode.ROUND_HALF_UP, "2.181"); + t("-0.8817362", 11, RoundingMode.ROUND_HALF_DOWN, "2.6503263583"); + t("-0.691179745360921842839463887", 29, RoundingMode.ROUND_HALF_DOWN, "2.3339165602051750154716850506"); + t("-0.86013434148320042160096", 13, RoundingMode.ROUND_HALF_DOWN, "2.606329320599"); + t("-0.56321", 38, RoundingMode.ROUND_UP, "2.169061729824108952082619451199536328"); + t("-0.3809686109181847", 35, RoundingMode.ROUND_HALF_UP, "1.9616400110348963327898415391047344"); + t("-0.3674578693097749751321416", 35, RoundingMode.ROUND_CEIL, "1.9470705107419238730588826138179517"); + t("-0.6789714412976", 13, RoundingMode.ROUND_FLOOR, "2.317157060405"); + t("0.4636951", 21, RoundingMode.ROUND_UP, "1.08863509185224814681"); + t("0.17", 6, RoundingMode.ROUND_FLOOR, "1.39996"); + t("-0.16347979344782383279", 23, RoundingMode.ROUND_HALF_UP, "1.7350132034366210424417"); + t("0.13", 34, RoundingMode.ROUND_UP, "1.440427347091751106292071921279421"); + t("-0.4568311689455543481026372487467605716426168950490411", 30, RoundingMode.ROUND_HALF_DOWN, "2.04522598154871269469009608479"); + t("0.685", 4, RoundingMode.ROUND_HALF_EVEN, "0.8162"); + t("-0.39129255528511", 34, RoundingMode.ROUND_FLOOR, "1.972832045588394975667410811377315"); + t("-0.57773716940117270440026", 28, RoundingMode.ROUND_FLOOR, "2.18674996894552465533518379"); + t("-0.603138491308", 15, RoundingMode.ROUND_HALF_UP, "2.21822634845737"); + t("-0.9118", 25, RoundingMode.ROUND_HALF_EVEN, "2.718442734073602010844598"); + t("-0.739574055431132880066", 16, RoundingMode.ROUND_UP, "2.403233631361862"); + t("0.9731758", 28, RoundingMode.ROUND_CEIL, "0.2321421471498522462072000972"); + t("-0.59136105962890922019258161304658081566077026481343525054927313558", 37, RoundingMode.ROUND_CEIL, "2.203541932655967820115276584046538404"); + t("0.43", 29, RoundingMode.ROUND_FLOOR, "1.1263035498590775804770150842"); + t("0.64295009", 12, RoundingMode.ROUND_CEIL, "0.872452504133"); + t("-0.378642", 24, RoundingMode.ROUND_HALF_EVEN, "1.95912493565735372489359"); + t("0.5741547035626488891023197557536", 6, RoundingMode.ROUND_HALF_EVEN, "0.959225"); + t("-0.7", 35, RoundingMode.ROUND_HALF_EVEN, "2.3461938234056496829716750443547386"); + t("-0.2877360645666564500650426183", 14, RoundingMode.ROUND_FLOOR, "1.8626584166978"); + t("0.533704", 31, RoundingMode.ROUND_UP, "1.007821832304399887189667801188"); + t("0.0820877959282842675093", 15, RoundingMode.ROUND_DOWN, "1.48861606004085"); + t("0.062", 14, RoundingMode.ROUND_HALF_UP, "1.508756536594"); + t("-0.6185123976596686777", 19, RoundingMode.ROUND_HALF_UP, "2.237644450495232272"); + t("0.65222505744961845", 19, RoundingMode.ROUND_DOWN, "0.8602802496276147447"); + t("-0.6280221005", 35, RoundingMode.ROUND_HALF_EVEN, "2.2498052749859371174322830128160322"); + t("0.8", 30, RoundingMode.ROUND_UP, "0.643501108793284386802809228718"); + t("-0.58073372925", 25, RoundingMode.ROUND_HALF_UP, "2.19042601172867598461061"); + t("-0.2436111158334656566835968915745483254361591561617894670931192993333281623", 29, RoundingMode.ROUND_FLOOR, "1.8168837343521768429429978149"); + t("0.32594603", 29, RoundingMode.ROUND_HALF_DOWN, "1.2387840924146365397084174317"); + t("-0.193", 33, RoundingMode.ROUND_HALF_EVEN, "1.76501504375806061758352773230609"); + t("0.84", 29, RoundingMode.ROUND_HALF_DOWN, "0.57351310442309675318190659631"); + t("0.5", 11, RoundingMode.ROUND_UP, "1.0471975512"); + t("0.871", 36, RoundingMode.ROUND_CEIL, "0.513562177804354568548134557993420381"); + t("0.368982751361", 14, RoundingMode.ROUND_UP, "1.1928820234029"); + t("0.1712", 19, RoundingMode.ROUND_DOWN, "1.398748804302325495"); + t("0.351270337501", 29, RoundingMode.ROUND_HALF_DOWN, "1.2118687670050583986698607212"); + t("-0.699225736349584631222591036", 35, RoundingMode.ROUND_CEIL, "2.3451102127031281962517387533766992"); + t("0.715", 19, RoundingMode.ROUND_DOWN, "0.7741722202788552068"); + t("0.3978", 24, RoundingMode.ROUND_HALF_DOWN, "1.16167862378453247801912"); + t("0.881533524564683538241186834202082230656252462120637976630481", 39, RoundingMode.ROUND_HALF_DOWN, "0.491695754181683639872008304433188603628"); + t("0.5576285618788362", 18, RoundingMode.ROUND_HALF_DOWN, "0.979270119860829926"); + t("0.47266909170552866482099697420334488643275907789", 22, RoundingMode.ROUND_HALF_DOWN, "1.078479209455072593699"); + t("0.924", 23, RoundingMode.ROUND_CEIL, "0.39238416526344147749216"); + t("0.4266148979496838153", 7, RoundingMode.ROUND_FLOOR, "1.130049"); + t("0.95248930149898237254354792", 4, RoundingMode.ROUND_CEIL, "0.3095"); + t("-0.3803755463230198292", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("0.63616257964482086511746610058781965642", 39, RoundingMode.ROUND_UP, "0.881281940373848573942912523070348525246"); + t("0.91107573183933620233506198986647507310508", 22, RoundingMode.ROUND_FLOOR, "0.424910257848777432042"); + t("0.230881620049", 14, RoundingMode.ROUND_UP, "1.3378126399691"); + t("-0.15194967302", 23, RoundingMode.ROUND_UP, "1.7233368799846040718366"); + t("-0.98527666990776435190818735", 37, RoundingMode.ROUND_DOWN, "2.969781117147644790754445904859984188"); + t("-0.712674566242116630639454394595571196172785", 4, RoundingMode.ROUND_CEIL, "2.365"); + t("0.973676", 16, RoundingMode.ROUND_CEIL, "0.2299578648860333"); + t("0.14932", 5, RoundingMode.ROUND_FLOOR, "1.4209"); + t("-0.627966", 19, RoundingMode.ROUND_HALF_UP, "2.249733186586581012"); + t("0.7019097158651", 37, RoundingMode.ROUND_HALF_UP, "0.792721175973902008928241143163213154"); + t("-0.67646550115434538573", 10, RoundingMode.ROUND_CEIL, "2.313749103"); + t("-0.7797435409217004", 19, RoundingMode.ROUND_DOWN, "2.465052425253286585"); + t("0.74491145527156867967", 4, RoundingMode.ROUND_HALF_DOWN, "0.7304"); + t("-0.7877586763196865", 24, RoundingMode.ROUND_HALF_DOWN, "2.47795820366566342997867"); + t("-0.9", 14, RoundingMode.ROUND_CEIL, "2.6905658417936"); + t("-0.12616755686940592231911937110254067742012318982260845535", 24, RoundingMode.ROUND_HALF_EVEN, "1.69730103219510438995958"); + t("0.85640125204661617", 18, RoundingMode.ROUND_HALF_DOWN, "0.542537595459998583"); + t("-0.6843352797718666022519805948705590458990070846", 7, RoundingMode.ROUND_FLOOR, "2.324488"); + t("-0.1144005475", 30, RoundingMode.ROUND_UP, "1.68544789136862551495698303192"); + t("-0.9962406107327604060336197185492663754065722", 11, RoundingMode.ROUND_HALF_DOWN, "3.0548545751"); + t("-0.49239853349174", 31, RoundingMode.ROUND_FLOOR, "2.085639701902881014513268549248"); + t("-0.38703", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("-0.30989558207886659738122408437494", 10, RoundingMode.ROUND_DOWN, "1.885879532"); + t("0.2344", 6, RoundingMode.ROUND_HALF_DOWN, "1.33419"); + t("0.5240142239", 4, RoundingMode.ROUND_CEIL, "1.02"); + t("-0.263516968905", 12, RoundingMode.ROUND_UP, "1.83746255576"); + t("-0.417122759184410023369", 16, RoundingMode.ROUND_UP, "2.001073535012708"); + t("-0.2416", 30, RoundingMode.ROUND_HALF_UP, "1.81481068579491635442787452699"); + t("-0.739909163261513917297879", 40, RoundingMode.ROUND_UP, "2.403731643412244193737225862530426516613"); + t("0.1356394", 7, RoundingMode.ROUND_UP, "1.434738"); + t("-0.869620076510242247721951533264707151124", 39, RoundingMode.ROUND_HALF_EVEN, "2.62522861536152362801748375884439701208"); + t("-0.339602624", 23, RoundingMode.ROUND_HALF_EVEN, "1.9172907073969835576848"); + t("0.017511694193718879310386", 32, RoundingMode.ROUND_HALF_DOWN, "1.5532837374566082550189775183611"); + t("0.73", 12, RoundingMode.ROUND_FLOOR, "0.752474376163"); + t("0.8767728451712575183140357919352558920865793840897121645508226631430124767821137087464982830694", 1, RoundingMode.ROUND_HALF_EVEN, "0.5"); + t("-0.62945736", 35, RoundingMode.ROUND_UP, "2.2516509937592804949618979578515389"); + t("-0.67496777075", 15, RoundingMode.ROUND_HALF_DOWN, "2.31171734801165"); + t("0.5541237285795442464136605749", 11, RoundingMode.ROUND_HALF_EVEN, "0.98348639126"); + t("0.4936701", 29, RoundingMode.ROUND_HALF_DOWN, "1.0544913973024303579736166248"); + t("0.7359626422679", 26, RoundingMode.ROUND_DOWN, "0.74370886543893828317996244"); + t("-0.81258482880823975964300849035305", 27, RoundingMode.ROUND_CEIL, "2.51936969343983255122864705"); + t("-0.798", 18, RoundingMode.ROUND_FLOOR, "2.49476558001885526"); + t("0.303", 14, RoundingMode.ROUND_FLOOR, "1.2629572563861"); + t("-0.531761150559325539159653135765", 4, RoundingMode.ROUND_DOWN, "2.131"); + t("0.21837132095563811659499349682271", 3, RoundingMode.ROUND_CEIL, "1.36"); + t("-0.87654669349386316544", 10, RoundingMode.ROUND_HALF_UP, "2.639436263"); + t("0.55599881124100880914905", 20, RoundingMode.ROUND_DOWN, "0.98123216878659329909"); + t("-0.9", 1, RoundingMode.ROUND_HALF_DOWN, "3"); + t("-0.0994585", 16, RoundingMode.ROUND_HALF_UP, "1.670419534835628"); + t("0.3835353", 4, RoundingMode.ROUND_UP, "1.178"); + t("0.074133851949109824042", 21, RoundingMode.ROUND_HALF_DOWN, "1.49659440187496306562"); + t("-0.5695297", 18, RoundingMode.ROUND_CEIL, "2.1767299070415695"); + t("-0.082294578832285565874", 31, RoundingMode.ROUND_HALF_DOWN, "1.653184078461796469957188779589"); + t("0.706931407957631528223644779278372246930532671142356259208913361850607887211902", 4, RoundingMode.ROUND_HALF_EVEN, "0.7856"); + t("0.9092254690272470335455059983367495206862722434884170271786431469657", 31, RoundingMode.ROUND_FLOOR, "0.4293765549955734780236766825731"); + t("-0.26363", 40, RoundingMode.ROUND_DOWN, "1.83757973021581530828722378967886237641"); + t("0.3", 4, RoundingMode.ROUND_CEIL, "1.267"); + t("-0.269", 13, RoundingMode.ROUND_HALF_EVEN, "1.843150937025"); + t("0.15378831594967867896020917", 36, RoundingMode.ROUND_UP, "1.41639526280774981412175814145636564"); + t("-0.04", 29, RoundingMode.ROUND_HALF_EVEN, "1.610807001148885545451942411"); + t("0.94146", 6, RoundingMode.ROUND_CEIL, "0.343862"); + t("0.872727", 17, RoundingMode.ROUND_FLOOR, "0.51003586214771626"); + t("0.9041", 4, RoundingMode.ROUND_HALF_UP, "0.4415"); + t("-0.2155827054536651047278", 33, RoundingMode.ROUND_CEIL, "1.78808485475341321435268125597743"); + t("0.24653472795149645605718818651000016078379434910037274479162362359749", 29, RoundingMode.ROUND_HALF_EVEN, "1.3216933447961048324572334663"); + t("0.349199369821701078117730067023243004429147382796990269201806253992646024667487755", 37, RoundingMode.ROUND_FLOOR, "1.214079776377668998200248616829951619"); + t("0.58", 2, RoundingMode.ROUND_HALF_EVEN, "0.95"); + t("0.4209", 13, RoundingMode.ROUND_DOWN, "1.136359069683"); + t("-0.41038477", 45, RoundingMode.ROUND_DOWN, "1.99367228637117662280634121443861751831918764"); + t("-0.31116045577869746913649", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("-0.89458959182595172982179132950365568935504520270574607", 58, RoundingMode.ROUND_DOWN, "2.678308315849602650979083916715169161293523872627488328763"); + t("-0.38177389251070463249295986289", 45, RoundingMode.ROUND_HALF_DOWN, "1.96251113013628840959999167084372012939265891"); + t("-0.297381368600690904", 32, RoundingMode.ROUND_HALF_EVEN, "1.8727450896484376106658245085839"); + t("0.96447860914282823", 64, RoundingMode.ROUND_HALF_DOWN, "0.2673338764583965056595452664757075342884110212933760072354323873"); + t("0.7", 38, RoundingMode.ROUND_CEIL, "0.79539883018414355549096833892476432855"); + t("0.5", 28, RoundingMode.ROUND_HALF_EVEN, "1.047197551196597746154214461"); + t("-0.941784995618647171108964", 73, RoundingMode.ROUND_CEIL, "2.798696834162398096824273566291833434835832045019504923062443786838796813"); + t("-0.1268166341092523321644606274393", 2, RoundingMode.ROUND_DOWN, "1.6"); + t("0.3732681688551236665680712", 64, RoundingMode.ROUND_CEIL, "1.18826700853646079710327722407745626055482945258180979790985196"); + t("-0.6147842718726245423041825", 74, RoundingMode.ROUND_DOWN, "2.2329087388214741515376633784834342239661875971468312676882930081671382864"); + t("0.814265392667839756993", 59, RoundingMode.ROUND_FLOOR, "0.61933374656480991812912324224654554610639223399922810126199"); + t("0.385363198262368965", 78, RoundingMode.ROUND_DOWN, "1.17519493877750912826759101146202237112944933735187012538178951532649372996811"); + t("0.550692810464868714823007119560439980698985", 32, RoundingMode.ROUND_HALF_EVEN, "0.98760231256273164061236863606379"); + t("-0.818803565578189207029", 9, RoundingMode.ROUND_UP, "2.53012013"); + t("0.3", 5, RoundingMode.ROUND_DOWN, "1.2661"); + t("-0.62530074898142534880415533586145", 20, RoundingMode.ROUND_HALF_UP, "2.2463131862128663993"); + t("0.5872273691893032238", 4, RoundingMode.ROUND_DOWN, "0.9431"); + t("-0.74360419595807", 56, RoundingMode.ROUND_FLOOR, "2.409241148137024575316420804409775448076859223033864812"); + t("-0.5682509980325305493060138", 5, RoundingMode.ROUND_FLOOR, "2.1751"); + t("-0.5095748702244839264", 47, RoundingMode.ROUND_UP, "2.1054869527222323195892250907167080326451668515"); + t("0.77776470400275813159552917191573137608163", 24, RoundingMode.ROUND_CEIL, "0.679694618889250742773173"); + t("-0.8144074444023626453596890757995337858332033098894", 49, RoundingMode.ROUND_HALF_EVEN, "2.522503657913783335788994869448783061589079249114"); + t("-0.1321046778270826380798707409211872848", 72, RoundingMode.ROUND_UP, "1.70328829455603295162468625103917574443928143901258355139973017789991673"); + t("-0.959996893544", 56, RoundingMode.ROUND_HALF_EVEN, "2.8577874501067501906025870017562795735496078149396156855"); + t("-0.8", 20, RoundingMode.ROUND_HALF_UP, "2.4980915447965088517"); + t("-0.1412739085555074250696029139926107809501328922704958892373", 7, RoundingMode.ROUND_DOWN, "1.712544"); + t("0.6444908832122089099631985005111186", 8, RoundingMode.ROUND_HALF_DOWN, "0.87043908"); + t("0.023662116110526488758", 2, RoundingMode.ROUND_DOWN, "1.5"); + t("0.093414546026", 11, RoundingMode.ROUND_HALF_EVEN, "1.4772453843"); + t("-0.811935856242164773371267032443195866963447", 31, RoundingMode.ROUND_DOWN, "2.518257095665134397783009681201"); + t("-0.59517", 30, RoundingMode.ROUND_HALF_EVEN, "2.20827350700798996951507449987"); + t("-0.6106017434248", 28, RoundingMode.ROUND_DOWN, "2.227616532053828926595975852"); + t("0.2741", 43, RoundingMode.ROUND_UP, "1.293142590996333937911977608339668283498147"); + t("-0.8", 66, RoundingMode.ROUND_HALF_UP, "2.49809154479650885165983415456218024615565880825979343810933847359"); + t("-0.47371231194093762185", 49, RoundingMode.ROUND_DOWN, "2.064297629936015347130397124408414753491259257453"); + t("-0.04672398050288533857", 40, RoundingMode.ROUND_DOWN, "1.617537324777891244966149115165882928282"); + t("0.89687349800848360067214181405", 32, RoundingMode.ROUND_HALF_DOWN, "0.45814721827896360127759832503169"); + t("0.96151905592028982725822141785324969386810594790551", 67, RoundingMode.ROUND_DOWN, "0.278317464581809994254319824232402607470075238222846969096216952612"); + t("-0.3820600582", 43, RoundingMode.ROUND_HALF_DOWN, "1.962820767370997983830720540261225757661841"); + t("-0.9826568", 75, RoundingMode.ROUND_HALF_DOWN, "2.95507957497508074872380794355949520849228092652015138084170881464628067728"); + t("0.577", 55, RoundingMode.ROUND_HALF_EVEN, "0.9557455434855830843034185091026689267871037026347882646"); + t("0.2996", 80, RoundingMode.ROUND_FLOOR, "1.2665229590830443727084509746595013836893715784203029306336973581027122731096411"); + t("0.963033254856637598696157174043586213908", 39, RoundingMode.ROUND_FLOOR, "0.272751806828551377877161905656760692886"); + t("-0.7008592688571630410206184760241583012689532", 23, RoundingMode.ROUND_HALF_UP, "2.3473977511325660471012"); + t("-0.747035999607994360670377876253838750920241442523", 80, RoundingMode.ROUND_UP, "2.4143885707580698694184865756438011562404687632972577365924385379096135615648965"); + t("0.799", 16, RoundingMode.ROUND_CEIL, "0.6451659284796948"); + t("0.51552377", 53, RoundingMode.ROUND_HALF_EVEN, "1.0291775340422775021748573208335423987852461966422823"); + t("0.07518", 77, RoundingMode.ROUND_UP, "1.4955453260960560276684184003208069026700110641786550193147659999746474523676"); + t("-0.9891089139730374476043012642000835692995536636929603", 17, RoundingMode.ROUND_HALF_DOWN, "2.9938705297425854"); + t("0.8089359456348634", 56, RoundingMode.ROUND_HALF_DOWN, "0.62845640598870408215406015073840480957872762783685047049"); + t("0.4", 59, RoundingMode.ROUND_FLOOR, "1.1592794807274085998465837940224158372428835645605270587035"); + t("0.892825002088385459769459625633707454703531406255004315063136951962546", 33, RoundingMode.ROUND_DOWN, "0.467217475965535618102551544528223"); + t("0.891960252246473775508532863093464574", 70, RoundingMode.ROUND_FLOOR, "0.4691337812597733909248681063986149331783456566266652952524294252317377"); + t("-0.132222079443366921569265850830309383557904463446262183152554935828652", 74, RoundingMode.ROUND_UP, "1.7034067351395591259675062798433543215130066643204537034600483502522668922"); + t("0.35775973624261579803408099721007988618781244697", 70, RoundingMode.ROUND_FLOOR, "1.204928587114612461725960999140753909944904546240802347787781772207922"); + t("-0.9738443991953", 42, RoundingMode.ROUND_HALF_EVEN, "2.91237475699298829381913988063436412037139"); + t("-0.4", 69, RoundingMode.ROUND_DOWN, "1.982313172862384638616059589257087046954285834814578762271419076854"); + t("0.941734093658941607", 74, RoundingMode.ROUND_HALF_EVEN, "0.34304718405883004924377455940151589638114516012043759173233415870637897075"); + t("-0.0104659663637400274026", 31, RoundingMode.ROUND_FLOOR, "1.581262484235525489606957483601"); + t("-0.75870968723763548064918905372612612874074927467649971610664611", 52, RoundingMode.ROUND_FLOOR, "2.432126408214800716705530666206580397000943257396207"); + t("0.9760176242392313884969058", 14, RoundingMode.ROUND_HALF_UP, "0.21944863924159"); + t("-0.0869699331087373410576368294343599051075628217", 14, RoundingMode.ROUND_DOWN, "1.6578762715137"); + t("0.9828713209120633505788915362943463337775979747619538744323382844115833295061", 26, RoundingMode.ROUND_DOWN, "0.18535264921046748860031794"); + t("-0.824263", 4, RoundingMode.ROUND_HALF_DOWN, "2.54"); + t("-0.814604127378602393518166", 33, RoundingMode.ROUND_HALF_UP, "2.52284267565292177787476068818384"); + t("-0.7167", 1, RoundingMode.ROUND_DOWN, "2"); + t("0.0960637", 7, RoundingMode.ROUND_UP, "1.474585"); + t("-0.96", 39, RoundingMode.ROUND_UP, "2.85779854438146539283694014907439671819"); + t("-0.36379", 24, RoundingMode.ROUND_FLOOR, "1.94312979317772281291045"); + t("-0.9147643832304884", 69, RoundingMode.ROUND_UP, "2.72572063435772287060570214407728562761045739911794970181874397892663"); + t("-0.4232763219360933070190045943360291382", 44, RoundingMode.ROUND_FLOOR, "2.0078548519078586315279235612984333833366902"); + t("-0.006031213670345208667624564", 71, RoundingMode.ROUND_CEIL, "1.5768275770306143837687610726175302600901738706800959136551669317069487"); + t("0.069", 36, RoundingMode.ROUND_HALF_EVEN, "1.50174145765903806624107047987393651"); + t("0.06616803042572538805115983509534257927", 34, RoundingMode.ROUND_HALF_DOWN, "1.504579918091063981237911125067135"); + t("0.54991852517259554", 42, RoundingMode.ROUND_HALF_UP, "0.988529641199323997650643102205815531892187"); + t("-0.62773266787726255742299551", 59, RoundingMode.ROUND_HALF_UP, "2.2494334028741534996711485347914580044326289844636031009177"); + t("-0.250414731", 20, RoundingMode.ROUND_HALF_EVEN, "1.8239049379733639368"); + t("0.23976", 79, RoundingMode.ROUND_HALF_UP, "1.328677693896657977849544696049099311673556676252969072639181835978873057438341"); + t("-0.440977353949844730560344659051585187697506087", 77, RoundingMode.ROUND_UP, "2.0274836608896403409980147120164289717641208329148076015978252288647590090354"); + t("0.87612374381941091382959062", 57, RoundingMode.ROUND_CEIL, "0.503034423325508597032033889492934190105195304571999312983"); + t("0.32481526634558839", 62, RoundingMode.ROUND_FLOOR, "1.2399799299076323503828694428318075815713883836112449969531349"); + t("0.27397915175001", 28, RoundingMode.ROUND_CEIL, "1.293268249659131553452424186"); + t("0.04053884543308894304365341634441987538014552844165051753118914548", 79, RoundingMode.ROUND_FLOOR, "1.530246369566171346124147978508443351824905061221292790494838258221931509644268"); + t("0.174089184487019751360968827828758746478", 80, RoundingMode.ROUND_HALF_EVEN, "1.3958155738381918908558246870833074886054402097147893996568914435836644022887351"); + t("-0.10194886029145684717521095458380859", 57, RoundingMode.ROUND_DOWN, "1.672922620324321811404494496701644310708218910174794537"); + t("-0.1274004827057525711608030542194140046350664250927884627658564069683447", 30, RoundingMode.ROUND_DOWN, "1.69854398834010132705743627032"); + t("-0.95455117759434022735987442780868831125842656754664202735210404899007480855", 8, RoundingMode.ROUND_CEIL, "2.8389466"); + t("0.016907949327511976057114414688337107", 10, RoundingMode.ROUND_UP, "1.553887572"); + t("-0.3217642590211733", 33, RoundingMode.ROUND_HALF_EVEN, "1.89838857801843494622622493657628"); + t("-0.423818083", 44, RoundingMode.ROUND_HALF_DOWN, "2.0084529053417197117713655958461449346046221"); + t("0.84273512060120259130952920734614096744023421", 23, RoundingMode.ROUND_HALF_DOWN, "0.56845236392986854462418"); + t("0.84", 49, RoundingMode.ROUND_CEIL, "0.5735131044230967531819065963145374827514347145194"); + t("-0.598", 73, RoundingMode.ROUND_HALF_DOWN, "2.211799772360693822846565077879486841931208002182007031934506787785326709"); + t("0.84667288307645509597693", 56, RoundingMode.ROUND_HALF_EVEN, "0.56109513385578413806039095933473567253118524040767696116"); + t("0.4633382152", 4, RoundingMode.ROUND_HALF_DOWN, "1.089"); + t("-0.821240849233283062200419918536744142946078481441", 46, RoundingMode.ROUND_HALF_DOWN, "2.534378663539126599977910757548121252669110429"); + t("0.1782796243430462510314130349750854257229782", 54, RoundingMode.ROUND_HALF_UP, "1.39155853847118572151230243859732186801788148524914491"); + t("0.0346677814563954408416453336703552431999124619055726", 6, RoundingMode.ROUND_HALF_EVEN, "1.53612"); + t("-0.2262991014529", 48, RoundingMode.ROUND_HALF_DOWN, "1.79907285730314637753804908303859548770795659337"); + t("-0.56270012731432884428668436471468157399411105", 80, RoundingMode.ROUND_UP, "2.1684448146235967762951293641691790797658622607486932564532596565781470731749366"); + t("0.94213383053997433", 75, RoundingMode.ROUND_HALF_EVEN, "0.341856774171689048584164195957701766777948867824850365033388574844952022382"); + t("-0.48877686839481567290504311702982", 70, RoundingMode.ROUND_CEIL, "2.08148351166758872919216516401124505180199160053655780114998352338592"); + t("0.920122", 6, RoundingMode.ROUND_HALF_UP, "0.402404"); + t("-0.73056823618", 73, RoundingMode.ROUND_DOWN, "2.389950073692985728953220800630620960300478006549524556056790844961548958"); + t("-0.434", 34, RoundingMode.ROUND_HALF_UP, "2.019724321162058362686353783759916"); + t("0.057245677227009681", 31, RoundingMode.ROUND_CEIL, "1.513519337044599366129295124267"); + t("-0.5770686483808800676", 77, RoundingMode.ROUND_HALF_DOWN, "2.1859311638676329561283221407360656523926793558485706321658724144400215181124"); + t("0.23194156351510905933472", 70, RoundingMode.ROUND_HALF_EVEN, "1.336723122511693349219241362845568980871286105099095494028659455998131"); + t("-0.16132784732273326", 69, RoundingMode.ROUND_HALF_EVEN, "1.73283230405568567848521323160946346079242897158360010518958506558185"); + t("-0.56477067105458714459638478310487690503899580950121626332", 41, RoundingMode.ROUND_HALF_EVEN, "2.170951662963568249680855866084598523972"); + t("-0.192", 26, RoundingMode.ROUND_HALF_EVEN, "1.7639959842119960163209638"); + t("-0.373912337363509284455226", 59, RoundingMode.ROUND_UP, "1.9540200961194170958685844882634861400179225721194278619888"); + t("0.366", 10, RoundingMode.ROUND_HALF_UP, "1.196089192"); + t("0.26392", 70, RoundingMode.ROUND_FLOOR, "1.303712275705943801139766350563625513837507702730593308264540887097278"); + t("-0.1024396351529", 67, RoundingMode.ROUND_DOWN, "1.673415978184507652957110416235042090377403238657255271980324673824"); + t("-0.8969469581738383621279", 25, RoundingMode.ROUND_HALF_UP, "2.683611554854624298157742"); + t("-0.217879690484219885926133", 46, RoundingMode.ROUND_UP, "1.790437765989200396935090980754178638116052855"); + t("0.774", 31, RoundingMode.ROUND_UP, "0.6856620756439576790439867507044"); + t("0.1", 46, RoundingMode.ROUND_HALF_DOWN, "1.470628905633336822885798512187058123529908727"); + t("0.90722796814082093245169236477", 12, RoundingMode.ROUND_HALF_EVEN, "0.434149870078"); + t("0.6913801099169900959224", 9, RoundingMode.ROUND_UP, "0.807398806"); + t("0.0513598582945", 55, RoundingMode.ROUND_UP, "1.519413861849747925316114762776072854986408058656090736"); + t("-0.47053741453574802106194", 57, RoundingMode.ROUND_FLOOR, "2.06069605707371986078585229034829183417808469379926116665"); + t("-0.808290075589992330895181051160074826850861462", 37, RoundingMode.ROUND_HALF_EVEN, "2.512038465217457018717674485489475545"); + t("0.264", 47, RoundingMode.ROUND_UP, "1.3036293340668398294182059461387160012504644841"); + t("0.318321562733552055745994261888", 46, RoundingMode.ROUND_CEIL, "1.246837902629252714754183903853658996606280493"); + t("-0.7144260143438044083550607906843292", 36, RoundingMode.ROUND_DOWN, "2.36659977119955665488513292493900708"); + t("0.52207258958068207", 48, RoundingMode.ROUND_DOWN, "1.02151713142137520132630986203315247977307767646"); + t("-0.52846", 56, RoundingMode.ROUND_CEIL, "2.127581877818602343608464692588797335181826758121656533"); + t("-0.77042362", 3, RoundingMode.ROUND_HALF_DOWN, "2.45"); + t("0.888058866863", 41, RoundingMode.ROUND_HALF_DOWN, "0.47769086641702688570735986783004822739602"); + t("0.61", 3, RoundingMode.ROUND_HALF_UP, "0.915"); + t("0.00134527223413953711322592774674317", 70, RoundingMode.ROUND_CEIL, "1.569451054154987358470767990867942591022235784726998525970968293719521"); + t("0.30972", 6, RoundingMode.ROUND_HALF_DOWN, "1.2559"); + t("0.17031504", 28, RoundingMode.ROUND_DOWN, "1.399646955406458103981480746"); + t("-0.002950946518912", 20, RoundingMode.ROUND_FLOOR, "1.5737472775966744309"); + t("0.778661667594228939922725240149031436", 68, RoundingMode.ROUND_DOWN, "0.67826633266484973186767371753328618612283001219279116957149814679474"); + t("-0.1267633036936784698573608505706039575", 73, RoundingMode.ROUND_DOWN, "1.697901600986480068248608172620606620126315170225235965843518633339815384"); + t("-0.2624934890966", 46, RoundingMode.ROUND_DOWN, "1.836401728845610789406085539024830996102617622"); + t("-0.315334467691854303189053816314480843708", 37, RoundingMode.ROUND_DOWN, "1.891605409668230447830162984731250645"); + t("0.542445001220153", 31, RoundingMode.ROUND_UP, "0.9974515434959153005513581487683"); + t("-0.52729798873038805548827852", 34, RoundingMode.ROUND_HALF_EVEN, "2.126213710313848857619978925378265"); + t("0.523460046648967763118115", 44, RoundingMode.ROUND_HALF_UP, "1.0198895696481273457016749244165476323645976"); + t("-0.2", 30, RoundingMode.ROUND_HALF_UP, "1.77215424758522741068644724386"); + t("-0.40040763712932062696772310749", 45, RoundingMode.ROUND_UP, "1.98275798462481025732566356713143501277642995"); + t("0.77112", 16, RoundingMode.ROUND_HALF_UP, "0.6901979458415838"); + t("0.60907444272122434170209804", 6, RoundingMode.ROUND_UP, "0.915904"); + t("-0.49700115359", 23, RoundingMode.ROUND_UP, "2.0909357804748627690874"); + t("0.173341594", 11, RoundingMode.ROUND_HALF_EVEN, "1.3965747063"); + t("0.701550222218832032974", 23, RoundingMode.ROUND_DOWN, "0.79322576883716962563875"); + t("0.97742084960693534545482703", 42, RoundingMode.ROUND_DOWN, "0.21290671863396340029344575266193118961659"); + t("0.28341520704468202358001111532661548775335354128165408498195685010203204407339454964", 33, RoundingMode.ROUND_UP, "1.28344285516330838072685555525306"); + t("0.837711815968035609", 68, RoundingMode.ROUND_DOWN, "0.57771661848546532049738308839796797930209707983823912469564373413401"); + t("-0.021", 57, RoundingMode.ROUND_CEIL, "1.59179787060128462410937058563698098796834367863978741824"); + t("-0.940083359", 1, RoundingMode.ROUND_HALF_EVEN, "3"); + t("-0.74500571461207884237077", 44, RoundingMode.ROUND_HALF_UP, "2.4113397347401420478032656537224828938630945"); + t("-0.273370399", 59, RoundingMode.ROUND_FLOOR, "1.8476914878826149462128694514986204151636789860397267318107"); + t("-0.998530855124571097454050742041068407778875285692847505184755236251664978780833132086835", 160, RoundingMode.ROUND_HALF_DOWN, "3.087380021343445207063597723447589225243315966330486565870147753913770229719702466149787763563881186420696559433719687805860337690771104894006466113176500291181"); + t("-0.969203993566514887267928904076363252172", 11, RoundingMode.ROUND_UP, "2.8927739117"); + t("-0.594935953115484459834050449808165218294506", 26, RoundingMode.ROUND_HALF_UP, "2.2079822903543834570661034"); + t("-0.303363441644917", 124, RoundingMode.ROUND_UP, "1.879016789955838580781193296741381352064753120600060749762404225091206584746211664086759630681869120894242081834775660855607"); + t("-0.25497", 160, RoundingMode.ROUND_DOWN, "1.828613004452711776803409844947989706748509423853951137667423610937748608132595176087330752161802685517468729762122554870617678756091622275488559002979034320657"); + t("0.5313521989908", 83, RoundingMode.ROUND_HALF_DOWN, "1.0106003866753127992381185934110106069727238545556783963467840580345474003274786731"); + t("0.571615329133539575166769409182152812078571", 39, RoundingMode.ROUND_HALF_DOWN, "0.962323157444591782340864631585422389484"); + t("0.308736875290380848061", 71, RoundingMode.ROUND_UP, "1.2569315819837357496139460796844660294711115191142531909519821919127715"); + t("-0.600494622752337363648678605808331945915799369330861579079", 111, RoundingMode.ROUND_HALF_DOWN, "2.21491585748513291847034470233136414422001555198960356342260724132258776396368999583800216133866436243414522453"); + t("0.640564864799", 136, RoundingMode.ROUND_UP, "0.8755626937213258164687162609370738455269367604525385089616093647673064650363022228775376728326400630999479754026542103713105898000608485"); + t("0.0625", 21, RoundingMode.ROUND_CEIL, "1.50825556499840522844"); + t("0.254119201305002041308584149183230251166007296757", 25, RoundingMode.ROUND_HALF_EVEN, "1.313859426831512910592291"); + t("0.305473958878289941980240702955496416309106350814154153028603799835986193157650064464117948597449533334365590072574028033502957278931764828146832485", 79, RoundingMode.ROUND_CEIL, "1.260360186061142547924369665075996057444067811977697913301630102312706292933717"); + t("0.2751628311269842542432112551152090750907", 88, RoundingMode.ROUND_FLOOR, "1.292037259329894735524281742443307396104626425179750845600170909593809357628306113192597"); + t("-0.759737646784374846578693276219778319738938594082032892534", 60, RoundingMode.ROUND_UP, "2.43370586892176967977484496155100115990495649232337587431598"); + t("-0.5935256093849329632970921096892335802572192", 149, RoundingMode.ROUND_UP, "2.2062287733789378049362618601962143685038222061499871253642432612620633335192180786504819031630794514775070914508763943843880175087017179559691641877"); + t("0.186268549244814320360437", 160, RoundingMode.ROUND_CEIL, "1.383433476336729922531195985998145697019147836124229291951483382807237184136587252813638450259579903097767787311265161816241227801859497021213873791628246362008"); + t("0.424970410427476727965", 110, RoundingMode.ROUND_UP, "1.1318671296107427043377288313797810787945611421220084948240531416219934806500058408110492877708901760896565096"); + t("-0.54801697", 15, RoundingMode.ROUND_FLOOR, "2.15078799794379"); + t("0.296220990759424275253164856164638327199552048824", 24, RoundingMode.ROUND_CEIL, "1.27006269660765514875131"); + t("0.2831595410221361607802", 22, RoundingMode.ROUND_FLOOR, "1.283709441893810365672"); + t("0.380368780310292752933", 78, RoundingMode.ROUND_HALF_DOWN, "1.18060131041366539312553100127677636737531515076314619509238454861084762659682"); + t("0.31340747665", 43, RoundingMode.ROUND_HALF_DOWN, "1.252017151276346115739503723034520209878567"); + t("-0.0274912", 114, RoundingMode.ROUND_UP, "1.59829099079251135163856432707927201931954929078275944348989444768909631838739179896293864808452773527567687564812"); + t("-0.724238289937326670922613036700413603", 87, RoundingMode.ROUND_CEIL, "2.38072543089389942123787156491521060290682598964101121908856486703586204041471687997466"); + t("0.72817943572865", 72, RoundingMode.ROUND_HALF_UP, "0.755134397198269497645291728662780084724244757703956053379942705980932943"); + t("0.159314498534385484436396373516522470452444733821967250009026359307430946322427694109296168866302290593865330089622806954832356373998", 150, RoundingMode.ROUND_CEIL, "1.41080008284864341472891839347735746276964010519686181554889094729024886046587535386686689466959469389253754037002429463231602114920602298486346069072"); + t("-0.98763035059220634929326902447509667484813", 153, RoundingMode.ROUND_UP, "2.98414275531774628310529408837645252646380556603010043564723450626758712246883497327868036649836943514230879546901087281330149378597008027545992380694973"); + t("0.121695039326", 61, RoundingMode.ROUND_HALF_DOWN, "1.448798890335260690740992681806763734590683875137187183076346"); + t("-0.819144495664383150257182552172823299849381", 32, RoundingMode.ROUND_DOWN, "2.5307142548900689918952680308521"); + t("-0.1984822714822705688714749520148290876570485254682596565950435360526985", 51, RoundingMode.ROUND_HALF_UP, "1.77060546660271090130648202296894323030568365456471"); + t("0.2104", 9, RoundingMode.ROUND_HALF_DOWN, "1.35881223"); + t("-0.7176741292", 84, RoundingMode.ROUND_HALF_DOWN, "2.37125292220905748701842038243015919721893683594685877641875110346563802067516550568"); + t("-0.991154", 41, RoundingMode.ROUND_UP, "3.0084831287201148791202830107078454718405"); + t("0.33950736550284648647337696777060532089581717510848448379945167458623923870334718378773", 107, RoundingMode.ROUND_HALF_DOWN, "1.2244032218620593728880028130347363452677440040905678245836918947025379617457455703982288905613389105922498"); + t("0.95892955777523879571445784025475358379", 18, RoundingMode.ROUND_FLOOR, "0.287592394367756097"); + t("0.2", 6, RoundingMode.ROUND_HALF_EVEN, "1.36944"); + t("-0.75738649974702787373775526977960759188936238184245264729677678636788629837500066421873", 97, RoundingMode.ROUND_UP, "2.430097595945076490918420552451293909896532995663373144359055890556348211283777047075828840407628"); + t("0.96", 100, RoundingMode.ROUND_CEIL, "0.2837941092083278456257032342051061660155635174569281447562600587268832535198623218883837232684930363"); + t("-0.079091562014880104224687574744505287", 114, RoundingMode.ROUND_DOWN, "1.64997058101469873025222809972736074807905440661275716164988863009045179553293355321265657886361849170390712654644"); + t("0.866035955242659449391366149705127070147", 101, RoundingMode.ROUND_UP, "0.52357767229617184155093135419032171967642357370418618112452655300059963490131782635797047626259714705"); + t("-0.5831", 87, RoundingMode.ROUND_HALF_DOWN, "2.19333566789282847919628841844223510128635918665443434678963129143857838751167596262165"); + t("0.03198168807431579", 95, RoundingMode.ROUND_HALF_EVEN, "1.5388091842466703023217028582926553058250086562093337871092591504698367145403083144826946606544"); + t("0.237152116452735443", 1, RoundingMode.ROUND_HALF_UP, "1"); + t("-0.252035", 87, RoundingMode.ROUND_DOWN, "1.82557889303026528986081561473117130426494739376645996546263059112350258043649623290234"); + t("0.92067649744097043192499857", 12, RoundingMode.ROUND_FLOOR, "0.400986211138"); + t("0.7966721", 111, RoundingMode.ROUND_HALF_UP, "0.649027277941610002406943361401840667419363611999506355180646482450203750692974466839173235320010746234653518208"); + t("-0.1344545842344403", 72, RoundingMode.ROUND_CEIL, "1.70565935502332265994887623815437522273348932153760502094528496615528602"); + t("-0.230577573087792998430323655033", 92, RoundingMode.ROUND_FLOOR, "1.8034675353410381992822628799645639198750087725728868100720969706418224489356791551279340985"); + t("-0.73071478309803907782748428479731797238", 50, RoundingMode.ROUND_HALF_DOWN, "2.3901647122798606064350685056778949094908994530399"); + t("-0.55356739529528850775615917747188525437583444693501116051578838401906", 22, RoundingMode.ROUND_DOWN, "2.157438089938618781136"); + t("-0.78879778003968027699896379170101318503584267401833559347493590490320136681", 79, RoundingMode.ROUND_DOWN, "2.479646928541474391160197481386668587759542759060582529971547801154982656272904"); + t("0.49240978", 156, RoundingMode.ROUND_HALF_DOWN, "1.05594003011190024134686462301008403852509311501974964831390428832621978981101695244375153152503517653237492920156989770438194978119373390765497926087752547"); + t("-0.5149686861351071841805287114918579", 21, RoundingMode.ROUND_UP, "2.11176744561946149204"); + t("0.5786671400596005567410329870488957662035179716", 90, RoundingMode.ROUND_HALF_DOWN, "0.953702865857541655763314277538260197470603577283939333962556907515409717868162938406938605"); + t("0.54043435103748299", 49, RoundingMode.ROUND_HALF_DOWN, "0.9998430702599774871063041273985799466189665219237"); + t("0.803667941044632544916155836793", 45, RoundingMode.ROUND_HALF_UP, "0.637362715332678496439877787972469940730233932"); + t("-0.3276548651861843377348757679419577608208242046182932369605385296013443296275626702790169989268459654191795641611", 21, RoundingMode.ROUND_UP, "1.90461667407363768597"); + t("0.43177974259109353198116663442780977764778659487396656584419223", 102, RoundingMode.ROUND_UP, "1.12433132671947380949525829564893686015887130497759790348813346605477359067877216442702209368547357543"); + t("0.2299", 78, RoundingMode.ROUND_HALF_DOWN, "1.33882139747605490088216904615713243536655145924065751370808651241545311233943"); + t("-0.449167106962", 160, RoundingMode.ROUND_DOWN, "2.036629223617219209143960928973869894777758629207319222840208524973412431452781936121200328006119321482901508105979657403899843465588017622316408701204519150872"); + t("-0.0914716000349082895796275569273750935496889194700689778600919528736417", 45, RoundingMode.ROUND_DOWN, "1.66239596747701726311622627785952724370674901"); + t("0.720992635511896394873282602286049064250227031502466998416191563337805853568539655366211897508718212556", 92, RoundingMode.ROUND_HALF_UP, "0.765562580466423584537369624048709466625359747106377596679983267290012312401942182582344447"); + t("0.059152410840096218080423272224375865", 92, RoundingMode.ROUND_HALF_UP, "1.5116093657356910196245928346767412738475286996124956692935014130002387376978935764354950183"); + t("0.1644159366508", 140, RoundingMode.ROUND_HALF_UP, "1.405630466215101837597069929073374653383610647761583460590172463920616854520610146182957630433964276288688247974794581150309371743251582474"); + t("-0.840602523380349961322019948305823387344144789359702", 83, RoundingMode.ROUND_FLOOR, "2.5691909708949548583916235356053786596430665700395381878518065247381953297908452124"); + t("-0.43124805501811319764556332173594058436018653889203382264613249875154136280073", 22, RoundingMode.ROUND_CEIL, "2.016671942234676674718"); + t("-0.11951541897328786662304239165546739", 154, RoundingMode.ROUND_FLOOR, "1.690598115419409133759300641607048045337261572010636106629530075883625158565650704211784427251934915548425641941745161710050206991294284883050444310641196"); + t("-0.9572275011938", 50, RoundingMode.ROUND_FLOOR, "2.8480592154389515890234415123483375360352458797806"); + t("-0.448035559288703883872533078165916376994300284798978979139318270876503921141775067902", 60, RoundingMode.ROUND_HALF_DOWN, "2.03536313060824418858858116615139400167898952917003509291282"); + t("0.04889972137864273", 125, RoundingMode.ROUND_HALF_UP, "1.521877096388230907478537518979862355114403720752436516463286853306653871259137676545320902793610407574554171969640034772433"); + t("0.504022", 131, RoundingMode.ROUND_UP, "1.0425470857523073529669656592865680596907528404722655123861864288380537843956412479501841500397641405901171523866418316208619596518"); + t("0.6278057527810758737261613839071", 48, RoundingMode.ROUND_DOWN, "0.89206535946614211946820503964803546263605229253"); + t("0.73616474016943104986336813613048890080158882089477605766064645020406414708428526961274052674433217", 26, RoundingMode.ROUND_DOWN, "0.74341030695621125391633157"); + t("0.6160135035838929884963155091266353098922877296340082387012133331056630384795495219625320359676513518609893532589331199458719424", 1, RoundingMode.ROUND_HALF_DOWN, "0.9"); + t("-0.060112286716019952197066194246617079641451272702707517010399664502299901152720176251059631374", 27, RoundingMode.ROUND_FLOOR, "1.63094487500018037003595741"); + t("-0.979798385268993348268190580648141300657263210706487329512281388604", 67, RoundingMode.ROUND_UP, "2.940247173957211229073331991566024364698686667396874686236909016139"); + t("-0.661621598975443283291286795947432091996163", 68, RoundingMode.ROUND_UP, "2.2937756293701963903554479837234565841121610495560161113970677793765"); + t("-0.381957507172600177593742878928868890505667500121818818823654866479", 152, RoundingMode.ROUND_CEIL, "1.9627098004686142379405205789858680784775437896414925418021878281224296981204546457249280875353611336078777482050711953604950283516694808215786669908294"); + t("-0.1461", 73, RoundingMode.ROUND_HALF_DOWN, "1.717421139459972039223418269368011136726068522643476906878057407011346714"); + t("-0.0739544028841431025", 117, RoundingMode.ROUND_HALF_DOWN, "1.64481830869992186545493815311712812652487775164253726511322231430769265047416498240633337882090593842061347759286712"); + t("-0.447811612731740115903364", 83, RoundingMode.ROUND_CEIL, "2.0351126512316121201591139760290119133194829627419793448710702923205807932696973027"); + t("0.8896519443202153", 19, RoundingMode.ROUND_HALF_DOWN, "0.4742139355830590341"); + t("0.0143951057472458845622163499397556758", 34, RoundingMode.ROUND_HALF_UP, "1.556400723844549533752809952361696"); + t("0.40685832552", 133, RoundingMode.ROUND_HALF_UP, "1.151784104348191440371545859066406734030002954774199380426814420181889313375065696573068527079460053682318608729396554845374911686711"); + t("-0.44234", 61, RoundingMode.ROUND_DOWN, "2.029002465906458514560520791214937725768600676294060514461325"); + t("-0.27311272386979559886696274699", 147, RoundingMode.ROUND_DOWN, "1.8474236191265275191421412861715355641917280545368634656936546954118173694452322945153588872884527865046967413964095593484135967836850485844102724"); + t("-0.6536220618384623160583653101718337985753111239252605279712312508474956640656440696608", 127, RoundingMode.ROUND_FLOOR, "2.28315682053997575884078958784329270527132836324917401020990384561406192483136081434665562260004372194441766422759133931899155"); + t("0.280664645365458563627447192079659707", 137, RoundingMode.ROUND_HALF_UP, "1.2863098086920056876517328991201911711126595619092080210784742925206990034491033299477497416817169074166579326651084392317237468569424434"); + t("0.135031606632336203851052308598608290642072494531517485548778009391023605786384696360046604390491662969333546610478125851559497018208185140719", 7, RoundingMode.ROUND_HALF_EVEN, "1.435351"); + t("-0.91312998334725114341", 11, RoundingMode.ROUND_HALF_DOWN, "2.7216933197"); + t("0.5108137113587456", 147, RoundingMode.ROUND_CEIL, "1.03466528677807172643403629603435967325429301512961694818034399144618065587021174698982032367885121478010574425117717959408072140227163807607016002"); + t("-0.161104", 67, RoundingMode.ROUND_FLOOR, "1.732605489811316116320881172247963953528749039350724721438380344509"); + t("-0.2018964432338658983364730072931", 117, RoundingMode.ROUND_FLOOR, "1.77409018057680247183951421153645663963857836471318655457044976919129749315015167997143754918055669911247710975345398"); + t("-0.5235758456925839965052", 74, RoundingMode.ROUND_CEIL, "2.1218389959756991086820206291979231469778294143499018870406333297034161575"); + t("0.767326", 27, RoundingMode.ROUND_FLOOR, "0.696135576619553683501483467"); + t("-0.770160021982382575", 115, RoundingMode.ROUND_FLOOR, "2.449888317335091696446361468908483327153938316802225943842958551992634999969307753982276394366924269857279428536424"); + t("-0.8", 49, RoundingMode.ROUND_HALF_DOWN, "2.49809154479650885165983415456218024615565880826"); + t("0.09575772001754856497162607028", 109, RoundingMode.ROUND_FLOOR, "1.474891657220093717369457649377702711569899035826724746119760508824424943835194656281618306011728167963199183"); + t("0.6014333037838", 96, RoundingMode.ROUND_UP, "0.925502381963847870315863097711110793143050093231048091854459206150649523780830676011449078014287"); + t("-0.81086327578934629643373061563891411322443919008089601972867040471669005259959135303031", 2, RoundingMode.ROUND_UP, "2.6"); + t("-0.8979207664239745250510882151788419021875073450977947429632125491326102558477328433", 19, RoundingMode.ROUND_UP, "2.685818996888976823"); + t("-0.115312893238553374595145659632383543602501456974242485315013343131037024109061476870649012599252175827186451104428394136175", 88, RoundingMode.ROUND_FLOOR, "1.686366315206685297739054615739424058883900402087314173320598143818070418664058481225494"); + t("-0.6606777950396020221244349198822216350190434852187988575125", 92, RoundingMode.ROUND_FLOOR, "2.2925176498970702126613448318462300339314977794221853243958597351706123425056891469697461844"); + t("-0.87388", 114, RoundingMode.ROUND_CEIL, "2.63392349576842298394109239097405132297562465136878379474438907119022310777653832967478826456420534765172132532384"); + t("0.006684365986905605", 14, RoundingMode.ROUND_FLOOR, "1.5641119110299"); + t("0.7825684737", 66, RoundingMode.ROUND_HALF_DOWN, "0.6720155060008838006636723945252566941764197408181969289516645268"); + t("-0.713068797064084727223388122438655279171355935534485701258397711058309190834522137860790849914771887413114422277910550612208804", 89, RoundingMode.ROUND_HALF_UP, "2.3646620042733311442205233508700499891538391534549055012734414250381451832995643032725658"); + t("-0.66481971026295404377351319084273028012", 90, RoundingMode.ROUND_HALF_EVEN, "2.29804876838881540991879481366011931847124332742218736620270999908384410329318354042151955"); + t("0.11889078072958761893179392173377867565897725485813028984713345567521500161", 131, RoundingMode.ROUND_HALF_UP, "1.4516236621471918282346786152240802639585317866902416068256837896085335822180007818317717669942735894548890910328244092194982275935"); + t("0.898745373844", 126, RoundingMode.ROUND_CEIL, "0.45389662312733916172584281756651263506427911911032926844024357515241417252401060554838499801965747500993837660281074367501405"); + t("-0.71999713578703107", 115, RoundingMode.ROUND_HALF_DOWN, "2.374594518474489276650288380060021896206854604279350724471452600714976268696566268033201244504065283673311257268114"); + t("0.05476181", 92, RoundingMode.ROUND_HALF_UP, "1.5160071093305605541679218157112714944033928629426191122772159156824146110100572475942620361"); + t("-0.2131390022833902540930655808518576124702354109286", 54, RoundingMode.ROUND_HALF_UP, "1.78558299393916816515653738365200727616344007410134346"); + t("-0.413633700736544703856257934751006717720479699077841132691605440363011308994", 69, RoundingMode.ROUND_HALF_DOWN, "1.99723792070470430945360524298382948224549650366223782822672632765227"); + t("0.67306387026192230399822207982313562628029111874277480296", 64, RoundingMode.ROUND_DOWN, "0.8324526153760856251585432848751794622974289590062442028198520065"); + t("0.904216280170708359982831202900039023001015149926962916333764719184745877", 1, RoundingMode.ROUND_HALF_UP, "0.4"); + t("0.43125172383642430996781402073609971209769522911513496468", 154, RoundingMode.ROUND_UP, "1.124916644977324678956379402218251503251479687154110046664502141470228259210330873292408995097607991664591059812351811622154490409710828825593150901733124"); + t("0.229967814517", 64, RoundingMode.ROUND_UP, "1.338751715928841725837546358249176235006960378477752112211168397"); + t("0.719", 106, RoundingMode.ROUND_DOWN, "0.7684339088689119674557688064676175120341113234173883516866340937679242543316069796328778627319271122733227"); + t("0.046994093476232470642073506535764900177", 148, RoundingMode.ROUND_DOWN, "1.523784918795565263319880380980297061863133417930703389774776074842204280299506554502802316443280650031121829765755183614979972424797937937978750055"); + t("-0.0470959703263", 11, RoundingMode.ROUND_FLOOR, "1.6179097245"); + t("0.8905465064453331158489489644567216545435308688995472167019624316329618798292650452", 18, RoundingMode.ROUND_HALF_UP, "0.472251168819759681"); + t("-0.5522645947720219959779846477612467475579496232530074274409246", 22, RoundingMode.ROUND_CEIL, "2.155874548200469547336"); + t("0.2065704842043886", 156, RoundingMode.ROUND_HALF_EVEN, "1.36272778719557083310369987579707451036578014066320797846193934762629922656600957718500732130949286304729593764115629594333817721895349988689234339314715666"); + t("0.4346232826374749253060577", 89, RoundingMode.ROUND_HALF_EVEN, "1.1211763825109721676949756102555179575836573779667600913398717978393552154047548466233883"); + t("0.712", 35, RoundingMode.ROUND_FLOOR, "0.77845394015561802673043749084781691"); + t("-0.72867365444923334376595", 100, RoundingMode.ROUND_HALF_UP, "2.387179613159754456900062775008894809908743025186288969800229525615508468681610791130361877970210559"); + t("0.91081446", 116, RoundingMode.ROUND_HALF_DOWN, "0.42554360189360406285448289505111878326499798355507643407378770372500297397589059534347330367247373919639922140436053"); + t("-0.659026819202040245132173157411458764818977557269327151313930646896992902353226724248346279798785489256276942458873205528597989013428380237", 59, RoundingMode.ROUND_HALF_EVEN, "2.2903204350815404324481489993267346829006032384869979526097"); + t("-0.0927", 8, RoundingMode.ROUND_HALF_DOWN, "1.6636296"); + t("-0.6382820272462251468928235900841619909575470238688226787630659782984627014834858552223465589303234442117457", 180, RoundingMode.ROUND_HALF_EVEN, "2.26306081638175282619222006578215238602736032247585910711452019452401355329399282976743060562833506495679738787513347099788589739984766429547405695151623417320772379259288897767884"); + t("0.73872188141197", 70, RoundingMode.ROUND_HALF_DOWN, "0.7396242334764833618091498609992599112485163846112326069853346600262214"); + t("0.1188488654746663107287428889283662344452917996930825633889968501252763508928759598", 231, RoundingMode.ROUND_HALF_DOWN, "1.45166587670980530337094484275967846408411600372081669193814831965162619195285054558095680805374737565871966251889865704524481198054766721793919016178908579194115200187194839105092431724279755005113851505446105744753937842032414703"); + t("-0.767", 207, RoundingMode.ROUND_HALF_EVEN, "2.44494885513240006745987736113732706212268703540492693149634150316662272477318188435315373323792864448360575512080963251098462961156915714200907099826564060337658153623026206886418426101891487394147409078777"); + t("0.923393188393151829389539019031943757876967824530708810551626752051065322", 33, RoundingMode.ROUND_HALF_UP, "0.393968016786584027796052105173914"); + t("0.710088294117", 293, RoundingMode.ROUND_CEIL, "0.78117272766081844487780394779256392648583494462736385733473101269183187309961455195068901531342257125543120665943427994220091682721958252431954027607686956299882426573115010159591013890402928603481300561999945329473443459224791102210326179212284734538436672963768058093593002210007670564952297"); + t("0.332904710781211308", 252, RoundingMode.ROUND_FLOOR, "1.23141400369551057739953646004969942424521182960160354625713231806995093516946260127118268100720383958248331843534949936561085831027660813846785191471810291160025938514867977905911276149618351028487386293964937567662815131780708734663279081853846034308"); + t("0.77704944635044481194808529", 263, RoundingMode.ROUND_HALF_DOWN, "0.68083175778078794026645287666199242122858619692713311524539685218809596599387081696598622768651184114160931174567127575293800322636261401601021964462210194554178322407266734038588470118034705732045763006655751930719958875567971625092842072816714589183376269228333"); + t("0.9344089150224766246070010703517785782215749436301847008722194897305907749679845507930869755816174716832577495292223508507742540435811", 268, RoundingMode.ROUND_HALF_UP, "0.3642002993462258543860986997231019836812617153856475277351847239592828408372033220950360711847940705411234548266151923368245480786952709302946934636392141268462657896997602875421619868039245712393661543499322441920950804551472118411042211072512026898932743189916695158"); + t("-0.3302368139030543600182354657269961881272815400141353485691893606312", 72, RoundingMode.ROUND_HALF_DOWN, "1.90735078020562052815880791567293760985949401549600862681834150143963168"); + t("-0.901425680927926676249627035936397434868909909394827", 250, RoundingMode.ROUND_HALF_UP, "2.693847703306722528032170317352055995758628458478554475084362448564107635967539909171303632191496415436043303462193766766418308594294837889654876895816136069932230156329053391943825011974077171138371996135289056527509118494796489336229640945466482633"); + t("-0.8029119494155364793530794563267292038649857491625505272246364857703812238858844060703742700934874292868676729295491155493816177000407948288301824150772212886860010045008214981724195806592025", 44, RoundingMode.ROUND_UP, "2.5029606182814545492316884326024915671275362"); + t("-0.9674161", 183, RoundingMode.ROUND_UP, "2.88561450768824852411809268486192187132280036744482598621648186004411428655783858168189594594443785992306891285793547912655284771064876977578210218009144517358027996579964615585400427"); + t("-0.6618212077055", 163, RoundingMode.ROUND_FLOOR, "2.294041863156667849970120337953407337263696509965927535183568301849552488301836148203338883681376846510540769570728408232325547370654544505384596938304181770032881"); + t("0.8128", 303, RoundingMode.ROUND_DOWN, "0.621853689831827629043711307708582662736216506146860073743573314291244730941889106600125949643970975175814580792238657357831612486987794611114237477837408590321795204996561888730437081326738983645953934519966716525779618036750625245975482093471605676839061459354116348909967846537955686570323188819958238"); + t("0.05260534420866396814944600565616719411629116458", 112, RoundingMode.ROUND_UP, "1.518166689665715268051380131681363016949821661029175335107020375834113449809575329955166153107550240905047468601"); + t("0.407023806900686817542809701958977309980584313560413100364959314927", 140, RoundingMode.ROUND_CEIL, "1.1516029443709710433020886608615546632772007211804268163591290860699079363585318602409725674887578779270965727778930447298409453588356674486"); + t("0.794554214400613507121550855174975", 224, RoundingMode.ROUND_CEIL, "0.65252327457618440688569599533636448138671479266189816369296254251702808998705761639316444465304148427727850101639696651873329882266567145764836377309039659453218601651128407018031658456436514779165101511786186223602728135295"); + t("0.6469218435", 14, RoundingMode.ROUND_UP, "0.86725546507622"); + t("-0.093678585", 134, RoundingMode.ROUND_HALF_EVEN, "1.6646124712251458856513384824597882929291192383218096573160175992600092347044156382955041369648056296416915753759318180565211022503548"); + t("0.3924812820677700716850844069389291089661896615133315855608374582780076404720512884810882209382233401500945489161173579244101095", 185, RoundingMode.ROUND_FLOOR, "1.1674685323428983973993578047599640101188639421128396574195795300745060731441460198041573395148746688719234363995369243238145479056458641907401055228913291246596162403548942001270094302"); + t("0.59561", 60, RoundingMode.ROUND_UP, "0.932771499280400988722491079992739984169798458218471414398034"); + t("0.44040840461420326110587738674216", 285, RoundingMode.ROUND_UP, "1.11474280801393135466613963918168814176144824526594807463640842411113450130453255652977792907234004189247115148309003191820137817621426669743496167421966763234011079615104140417925000709175909517750339302939592304500256622852401339782063272180685161276407891994150463834423340995826012"); + t("0.6705235162207143876366305207552053691428810075312401384356771297826220581040025360805827040585992", 10, RoundingMode.ROUND_CEIL, "0.8358821105"); + t("-0.1", 122, RoundingMode.ROUND_DOWN, "1.6709637479564564155768448710924447606672606719171824518784961511903108767939670509679552770305629889467341341767377392918"); + t("0.227666607755", 253, RoundingMode.ROUND_HALF_UP, "1.341115639615689547243809021052302587470178529515075367976671807994849941857698125465933583135327014519341890282264810297325203993320600883978825275539680234833321985583831500270425232823811998285196438296916592322992487063114003861965299409933455056574"); + t("-0.014757609905429833122705981234645537", 267, RoundingMode.ROUND_HALF_UP, "1.58555447242221911700723428170394218376319503073672078976815978011049493730508982504182508928199311797957036040652702166028563253355386454011770597258516123157107253614288122725874231856250073479690695497657233593944937264002768575643232111935276216990638764996506602"); + t("-0.880175240296030356339193293913398473910258140686", 139, RoundingMode.ROUND_UP, "2.647027600822527550072155350442025447737939627426107081864190259414251012912723512815900570439492258671758273051995363820600842296089000542"); + t("0.133090532285494822008319320003585643077519722544488343829688762797803380444712006784559769", 244, RoundingMode.ROUND_HALF_DOWN, "1.437309721839051756442075425743428699450176650881680236212373057041468648166042542826009517804322994677003695317933655118964093952885579130034716317224690895362071928471934343960645711219126384565587225041838830423249525501220478383134568422279"); + t("0.65193193321070831302331543913927364924418973254554503630138777974270086436816397224076300272714430321423847109164564221968743797337323853027888235296795141030627167618004011883119511946522053443143675828468975086002727943476460431860911862", 207, RoundingMode.ROUND_DOWN, "0.860666879820060042252465353739704456844038823215338037965794549943693411647110222211816573897267349748079031088028212328083703756817551638038267445371957872455794037689400957799506253817597585320801196809924"); + t("0.212554723953471812305587858170083298095004263849182239671448975407", 220, RoundingMode.ROUND_UP, "1.356607640377456334041662780898718621018958226378420242336942891418767095600704367254657910690886351046813734009406709917754680791598131360275135793003875280005855768378579497830087623396539029314475095906418333491048209"); + t("-0.665046972018957759", 57, RoundingMode.ROUND_HALF_UP, "2.29835304062831707480557783537948257583515212002040463799"); + t("-0.92093", 249, RoundingMode.ROUND_UP, "2.74125640354283006641388781824769352205818197790150492297528330123812984818122105216558102132552635296196125244485851418947076917679454929481056002954459017969537272074297922037642118434922586161474330961133530824021830773067327442755004456553197988"); + t("0.68535542610405071175951929148624112349539388420752340055", 318, RoundingMode.ROUND_HALF_UP, "0.815704657242983365331208816689921078801599179729138107987309059416930689267797152716305457058979730702096596664048735786477940882804938668125621302215427380491469898925728241748106327245320507622597063705531360224033027836436782131944471933245345990314170479087933219140639340677234052370185004701728379077102176228338"); + t("0.49845940188189411015074906405598653383249068001558853843170102", 66, RoundingMode.ROUND_HALF_DOWN, "1.04897556900769504250242067804383445574519066554283354581343165217"); + t("0.508660119767", 105, RoundingMode.ROUND_DOWN, "1.03716850289261782862767223551696256061299795292578369421271375839146451087522611291701651289412409445951"); + t("-0.779224320115242323348742764154152561457981416268941467942241080658", 44, RoundingMode.ROUND_HALF_UP, "2.4642235579639323466017112487755142365915651"); + t("-0.7152102897395072756554115944925209764167157484496233767652107453410998989641502236410781", 14, RoundingMode.ROUND_HALF_UP, "2.3677212697308"); + t("-0.55495911847829", 74, RoundingMode.ROUND_HALF_EVEN, "2.1591101484529818278937734992102582170441518797193469117169721011998535785"); + t("-0.893683514503696242", 262, RoundingMode.ROUND_HALF_DOWN, "2.676284888744369248739299296749444378847556868444386933854611880655454738851072007698009611171959278797486673769425052387457573762892570689457704524442120272906957453775380582109082848677422533929681108005986869237003265219197078650309048716185488246889500968028"); + t("-0.76132", 130, RoundingMode.ROUND_FLOOR, "2.436142870384473292044323020218002697728275879765254184958207414100089081918836500456467752501769779584656697039650742278140337523"); + t("0.2274630890480566480660484655658912854", 311, RoundingMode.ROUND_HALF_EVEN, "1.3413246419319014240275610872514478480239730182972226945539338672740565817234461350532754367412396369643367993747569129948268582529299981963552054934101680332478953515279904970252842379640185265005026889494546183376332868790332543515695470116496548670029130853120175455025233795105096203497117664862879562798213"); + t("0.392570363812", 112, RoundingMode.ROUND_CEIL, "1.167371677091476681744850563993741737388213299847958498014284043769771516062917915401524979681440260162238843253"); + t("-0.351134691054373041436125523322865968330312991741716867057940847379648", 147, RoundingMode.ROUND_HALF_UP, "1.92957901152746893103387344015334626952050434447494932318326591596348574284495930386533065956448949134386934703289813223958246973805763044973104341"); + t("-0.71072087851", 35, RoundingMode.ROUND_HALF_DOWN, "2.3613187470437525841149443413634537"); + t("0.91", 318, RoundingMode.ROUND_HALF_UP, "0.427512264944869586970008347692942211349754186322044387545030981138660976114883678116737830166081841143582428029372529009811147175923525574931181121337483224153571872690723088340322509320864255173828109651042703649300506727238626490244701942096579039531780514988359524071512872978185520408878727673751769441693298629057"); + t("-0.566110783293866", 16, RoundingMode.ROUND_HALF_UP, "2.172576457551446"); + t("0.3", 155, RoundingMode.ROUND_HALF_EVEN, "1.2661036727794991112593187304122222751440246679807765230944943474074352106310713398754174554396953852593390866258556063987502368813428722376754958736080904"); + t("-0.3352147614", 107, RoundingMode.ROUND_HALF_UP, "1.9126294978568461937353869487026835122524383568057098889045743967321450572432384470136805460976302677484216"); + t("0.032178285606642150945178090324141959881903547", 109, RoundingMode.ROUND_DOWN, "1.538612485474105365377470624143198333917548847842318602480599015405764125116924005862020882132045598286911099"); + t("-0.5677714497218306546809356014106986295638353", 314, RoundingMode.ROUND_FLOOR, "2.1745924215395240284687492627475815801464724845240865659663691911458716554484196949579716513768226957252088627197990640193702092256316407104589114099741433078816084818628016877376694969554942256292695237987158858400036030642283489406482736918628965902014493726078853101352100610769335168043675263350577485989672116"); + t("0.64092385529718940931392171633338719180367557322561407343548127204", 122, RoundingMode.ROUND_FLOOR, "0.87509510857289456376464307749132753859118498085989644000640805516750689909474597994366764960202404453750749882950986359528"); + t("0.41825457900719504562951767362035916463017722979110686662078236973092550313691005025122184963190518040112154879366780803206948312056058216897966567149655980705464", 17, RoundingMode.ROUND_UP, "1.1392734305586714"); + t("-0.0496510841709263312020124673801193301328", 230, RoundingMode.ROUND_UP, "1.6204678338551738094110631028104389232458396604783803626472176696414709732664269280577706165235902186357118652403052127761563476617405021072016717141290850707025057317062889725396580194061640656622149620389137027381912259763540621"); + t("-0.88626013068047376794338298364226349", 117, RoundingMode.ROUND_DOWN, "2.66000385760667640490595506284994809117134632133385754272057335926944341085456346913855235272292795414560303456636251"); + t("-0.47297806342", 292, RoundingMode.ROUND_CEIL, "2.063464087296454183786198345452555730491745896026439874472146853522017432667866178192116543512468378799143177509191912606736952722129115433838531576349244605853328349773823772072258571400024127139415877563239088587696109552684037576415659484825947853993939851072530815338822784952934228012156"); + t("-0.35", 287, RoundingMode.ROUND_HALF_EVEN, "1.9283674304404069059461601839603940099453260246770406737388850047842873158665757722585803570234278962139658655261027688616137799378799946514682191698095073630991955131598594270940758439903750935437496600601721893079726078455357999997823561735873059814127513391306403374385185590312228605"); + t("0.324341159910898123540095048716961469945698527748665339870387531540472575752266", 147, RoundingMode.ROUND_HALF_DOWN, "1.24048117429124846439578545373999630426355045230685510964055886798371999067558590498300440420285009575721223083067446642458590694734030010659094097"); + t("0.6208", 274, RoundingMode.ROUND_CEIL, "0.9010335868350647250640668447424903117641845857464504080890214720617070834481303950000043220353142596436129112691272296411807268848557546306700859828653983938656999369765211926226949749585573862817338993130600245265746978004143183998193549345813225551178480455808521960770796"); + t("0.814036557254769352332051", 69, RoundingMode.ROUND_UP, "0.619727846529946752480424411491032281228574630563955228633703251334406"); + t("-0.56287168256179", 84, RoundingMode.ROUND_FLOOR, "2.16865235719271966873624200961947350538696194021496618149589356616743255619405374226"); + t("0.2922289535307753", 319, RoundingMode.ROUND_FLOOR, "1.274239624294988113135680297268601711414222286192159978827952154848505182747141031657978637476129121351035807782388308110491560119599348956516200040305850269942760980948611053322193371050640209631629830650410608213850398713622323345439626860188954154685210783271199254078512885082097682334842628412795692919069633462773"); + t("0.4041079941099973454724047491", 3, RoundingMode.ROUND_FLOOR, "1.15"); + t("-0.132369929486107644952706585954821224213916538128943735419611998781657528807689527000313500355130302792133872310963479100151085686", 167, RoundingMode.ROUND_HALF_DOWN, "1.7035558962709346112659744601021796705948318281875682672884014142187285638786901561954644450777723687233829468069733360743418675267244846572609838284953006844492825316"); + t("0.826143026143165947418530674810690364264479695496677609092020939378734709308843780167963626063175021080647101113236372467624613855926438999989023854978102344600260661512274686867679926422591991008", 320, RoundingMode.ROUND_UP, "0.59856855067896697666314293809733853525770781843627066169441358685286459683321903624161582895514646578375583421331537720655285411270447822642759241678126324750413193577365277023505904105719969270288604406183299695809199042575486726606181649363165843374947421434949397333399125124687989979132035862231875454406777492484201"); + t("-0.89681002594581245485900478190386364785298741043229142325472442031730653885089321873525837599041444062792347767222253362158917387755978588764100341765541275632027211459955807765614489896287958946555833707024107035389241955211924284537757867712396930653657716299737302157", 27, RoundingMode.ROUND_DOWN, "2.68330194746761005509988882"); + t("0.669946243473", 136, RoundingMode.ROUND_UP, "0.8366599498849809517437499988442199241358644191324008672073862790613823489108136471836550727337842190256821787493293353126115085529794223"); + t("0.29", 183, RoundingMode.ROUND_CEIL, "1.27656948904591413987398597594696897741159560899220860620644628387340967180708163820294386727162911156271240538673487718970208244756734583354878358238990988623945517750173456442760053"); + t("0.7385669422419576364", 119, RoundingMode.ROUND_HALF_UP, "0.73985408106406417974210390222534301450431768661988965920808480784506447740642449442237027619088202382404137178166265038"); + t("0.801587460441496046356485833430888928728354490901128749012667252251113887097737428044338099212676718589188177902450992361597268360799252991890337891601641469", 187, RoundingMode.ROUND_HALF_EVEN, "0.6408506550202004394026187757169137104499857065072304404695397317623558226127400373909162902529838681545175003350694278245867374547235635364651888143933966626027658874904485783030024157416"); + t("-0.74479550088469198425324", 224, RoundingMode.ROUND_CEIL, "2.4110246546053988488988408923419562183631961183535245757956595129472755503412743926970575768016799547951093838663110992393475299746362166311934042658566117573313876464160911691162341201369237322519655500846062820565606204909"); + t("-0.312458", 319, RoundingMode.ROUND_HALF_UP, "1.888575816690415930897863309331725979175727779384558802433686021217404971624969681341996700860809837652362124902097836208029184382045270837090564008001214693920210733782845067360282097004533217148180164128327150312977702949850975330582001158237003300825774708456120404130531099096457462480813518869121809528904260844406"); + t("-0.61639", 221, RoundingMode.ROUND_HALF_UP, "2.234946287898429631762937377329599153075633865840350295508563673146118502348311380409842809106237191618031144081678897258315801728590457573353740881361766478356847901824067744325162738844710926221537607502416384257386494"); + t("-0.61418940266925687389773678248018043331329961099128447572814759394857589486450377", 267, RoundingMode.ROUND_UP, "2.23215471571424527579765023581666026183529710201580295330570398618242073041810631497893724386387388879927529625316222325466841139510558953822141786494046953221556271623691251432265529999023868539693262165787517099498612599388063071254099711208037802364155106835377888"); + t("0.87161333687619183133911947665122788315770698593229677931462835671472802085635", 184, RoundingMode.ROUND_HALF_EVEN, "0.5123123537814753061341315923333946955209786206236265274529716653865860077010475250728707670487149265977994825232145230031194805513782638530142357468946721751710066962694878749794710909"); + t("-0.54492614437367078707836463072883616277139652176955501527744", 259, RoundingMode.ROUND_CEIL, "2.147097356682361990789573337716565515277448627804116404415332674469355820399379001751308754721278308084361700487881948959953671933557554155494006054860817767545798417293793144639215144894252021164760416378589470814344767585296407960189081268738439509307303019"); + t("-0.36827139907977142540600480861706753815165492907195239700879384009244581232831726375508059967898495850369984792950287331227105485689039055388012741957872383277720259230683233018189443186317301851832485625693365", 39, RoundingMode.ROUND_CEIL, "1.94794538747255048880860438372027566055"); + t("-0.310788960947458997385701581170061772370856278116485941733948080339445467514014594", 88, RoundingMode.ROUND_CEIL, "1.886819313443551334393267875766376955090085962205287363063498508603998482155232336251061"); + t("-0.6835784623393568105409864645", 85, RoundingMode.ROUND_UP, "2.323450604884502055975789421591130055613269582595529949371094506889203198872410901683"); + t("0.06303", 312, RoundingMode.ROUND_DOWN, "1.50772451794449895001896495665834645314865622268904335176608647112227029743356320933276191310895796826131700228358374833121561592213609047385829265104826621981230917395633535606472801114928528070994555710804213607092343037038453308642080807073993177321196610750642598963326519559684302931003280253455854492204352"); + t("0.14159754097308047869876797058007264698706651268303919655410203089475779265237281439683597537168040229221538955730691785275603244179178689951775360943231267040034810415770734364100418753277739938815991845226741142322137986682491162412984578388465023522118107685281157333765764302761451605345", 97, RoundingMode.ROUND_HALF_EVEN, "1.428721296468117260131447719720120643606935242558780263592325885438857357592285346271786768052748"); + t("0.983917740445305717582383639617968771764688514342620130177", 55, RoundingMode.ROUND_HALF_DOWN, "0.1795859231375598185134751941162039220772037511346722299"); + t("0.7462", 285, RoundingMode.ROUND_UP, "0.72846074738336186314512555153160539133242615393707445289901011812090296188728003776057340146894560054492669387284857011928727497351428642240635519496614181873485442803347764060215185209828488045163519633049971351266944625788622648036160055937189063317867353807668938674608089843640791"); + t("-0.63749036152486630898846609673853134621500136003116148836827386144728211331717654238362157539948576547769124995113771383113684978310713010733296683395874574529618130248789", 319, RoundingMode.ROUND_FLOOR, "2.262032853349759419918810907175156571405272498714925554314338174135289616528339831906633591023746460061766802912484892869936613103256557390410894536409782986272488579105382186907968862032051875703332974065975816937156110304827912286747358048774351206951955183273104313549191193175673565829813777239444645060801523176667"); + t("-0.1141640343354315506556", 222, RoundingMode.ROUND_DOWN, "1.68520981842495050014147615975290158004109836337259187899336659348167046906214885549764347867588666249176275094806885892849781527105675161716777061370410863873999947455303198268020735011287502347527478952210680516344569612"); + t("0.5713795014721887461409", 248, RoundingMode.ROUND_UP, "0.96261054052090653212760877361525181084824095846114312040413793508787828711552912421361287019229283556885900055754028149595849659123000470439918004592998497271147101773137937907677227508600324945668581571552069920220441685103990779743035650718632769"); + t("0.5491133720273159649194824398117994872752823770525898898819015041671032178104895841440753727765", 77, RoundingMode.ROUND_HALF_DOWN, "0.98949333884286849008807576455779377967416280087815217664373094177941943884053"); + t("-0.9876904840211732250219417223595731532614339786372", 262, RoundingMode.ROUND_FLOOR, "2.984526723253686403150537692104940666485166931745810210839133121154517397411645230584614445801511828969383930135063760693941761422389258010813892908333773910886617137395269538154993005587184430708251353764401476343946200186994099277241414589857752442824968378283"); + t("0.11682931883635741045903553898433234", 18, RoundingMode.ROUND_FLOOR, "1.45369959321867178"); + t("0.63042933689029129894608253565803239760460329863128285190253972", 163, RoundingMode.ROUND_HALF_EVEN, "0.8886901459775789183682921972337580564350001748316808184510177611323289617204199351338740313146949311822120862201104740352821636246484482711229682670044232753263609"); + t("0.055575723515231106292771871615830403377041525831563911941565703401932780379023147401043552303406738571431099020062224745327447214221902483097732886347861247921004849881147855677233787949058431280721497688249722565580530982", 195, RoundingMode.ROUND_HALF_EVEN, "1.5151919543473259206688692942472887716013493745964634193306099467285192605087398047595166751936410577438285656145795372551570700737166046114809637441351166175733025260538265125671387421155772442"); + t("-0.67081376663963892286350154076279356563598903", 123, RoundingMode.ROUND_HALF_UP, "2.30610184432817058958468471212978417010364203579941061734075532058158918487957012149012316120396828430047057303502683065048"); + t("-0.6197190977426961", 120, RoundingMode.ROUND_UP, "2.23918106174383411174766245654407117198225627426434114941545005956876053014246202782550433076636756757647149243774330378"); + t("0.554628263532835327211555422", 79, RoundingMode.ROUND_HALF_DOWN, "0.9828801730931808037431529962501619412035167051557435246013536615234714429546733"); + t("-0.6073479814995807", 112, RoundingMode.ROUND_UP, "2.223514399898826079680274470297228910209613217147979929582411320895148824204403513968642735395435991584931544758"); + t("0.42679237203546629185516043966661351024724843359242687551905432458591776036", 183, RoundingMode.ROUND_HALF_EVEN, "1.12985342005461814907383712049897636264869323670817157190786962687478218751090413001820865328915882157517951645217565760274165682104407613470892093992239897075701034240926231182365144"); + t("0.7952372172676414174131713786434740692126405212887205840294730181390513199113507546229304014416456997266056201078377373483356251722576889846254682845964201", 216, RoundingMode.ROUND_HALF_UP, "0.651397592654873580352434828214057351738081427543986284689410954536856994138804034606403481651414294095532600553527233012987540285042096024644116067523256891312472273766658438481141107125649244701326007562141002038488"); + t("0.36915243012482195395438480369914644684836788745515660849", 158, RoundingMode.ROUND_DOWN, "1.1926994558353250041870431947540847400670232144751164265745772322264361020111236426890092297554374858184262972921107713958534764683144090242596626752092546927"); + t("-0.0720938927831676742856206151027539199732879632516921283", 304, RoundingMode.ROUND_DOWN, "1.642952817786686948683315383725901379806443257102725457208689982317729573072036049991983638431825701757948685311911608435627169719963055756527088269561621088918034346141416460523000298152074697779726807838134079963409899300774069992263214024703457046580319821464299130154749942095168507764115971382958892"); + t("-0.9611784169813900148373575165761377445", 5, RoundingMode.ROUND_FLOOR, "2.862"); + t("-0.752204", 290, RoundingMode.ROUND_UP, "2.4221968655648808282939541988169255418567230769362207317812862899335601605320229931653475124012608156274039087174395584011068527783819007800776467687260118135652702154541238614809018877520820269252198155650487671861250263973523098719973357247322207357932195398673822549970272121690126503978"); + t("-0.892", 282, RoundingMode.ROUND_HALF_DOWN, "2.67254679532470759629979138284737589812438365090806948160348760517043959726357642342387715205321666298768750727073323271869629513482899459250693279289097687528111672001626167771411185315972525797563103433510303127335971545795241572726390302882813687240313906716146853715673772186565"); + t("0.0194921274212323871771974373448472", 243, RoundingMode.ROUND_HALF_DOWN, "1.55130296484624988166566681772233143934873698294538848609787950995402575054752744246282793271185753315837617870428978354015220029797298181253062922302144934032918933541702492327957297718961037130711142564132166720657134679164123617133275472923"); + t("-0.04462059883716291018479516912", 272, RoundingMode.ROUND_DOWN, "1.6154317454997373154321183620932351929193913381196803523158021315924591916241378154717161993762172689567252634331165643892900730384789517526690129350521052601439652417525743100119602534857673171212133062160602622981009843127837437916452951298506016085595430840464646690742"); + t("0.3711973677704709358828676984922672505522568703368870008818216630246896", 309, RoundingMode.ROUND_HALF_EVEN, "1.19049814073163239832878058434521236689058207699871836509925861169431783812433096191540941983413537188233101135120340130240412759396522859753550681519981686550945243311268935717573252853540511635218537367075653864087894672738076297395070844234167514038021871454183804351183541226375090246976681895044470480721"); + t("0.9775875709", 298, RoundingMode.ROUND_CEIL, "0.2121162539357906417928657971621930651029300750651970541067770042502738516145767538620746196531796426206501114523151248214506200917068186136172382457542153878985621929156752261130734536918116868365004019523896334956087999323991107085567008728869918014274010820352452754370956557681811223143842731048"); + t("0.752434946326829409086623615631163306368641526396283709565028", 23, RoundingMode.ROUND_CEIL, "0.71904523114474343306493"); + t("0.99165003788387843245445647311313221560765051771358078533", 235, RoundingMode.ROUND_HALF_EVEN, "0.1293182769096382894026279210494087006198103635579328484628022464736521524968382441621257387073904309785860947382994159630081513474815048849755287125093988786024403266760703042225488266176244504618832740955920965682457824521594605287848"); + t("-0.77188", 320, RoundingMode.ROUND_HALF_DOWN, "2.4525892459727082170155051480682822575174052734525359103781774926886313582575827171911161892272357283452234219363024030408021294796200286451418304461985421319344289714840808792098210837612916331137749164463725496853322339629262703074946235242165490996003476701411809101563503801998676541867924149926776720078537565300128"); + t("0.8", 46, RoundingMode.ROUND_HALF_DOWN, "0.6435011087932843868028092287173226380415105911"); + t("-0.61815613117244051", 276, RoundingMode.ROUND_HALF_EVEN, "2.23719113633919874775435047420561691373974860455669202144317982325117805147416652811252764365723425297335543123518432603335997146588321873841485252110660119851393336205515626980377449546048932802841906723052460398657643410911610675007406896703543669861518121603189995378722942"); + t("-0.33643301", 59, RoundingMode.ROUND_FLOOR, "1.9139228587757703197708140317847003896833314566646423404753"); + t("-0.69155478574641753001164026010589358105401549263773127394888911585259606123602", 132, RoundingMode.ROUND_CEIL, "2.33443564475284995704834857317210713999410316463348547913521093067050444856479246726014598655923810619577037792286983955790139849253"); + t("0.483499109114031625546347445285492629564860978018815796041445725623402437217970904566424964465644023592852826953877791436191840784721807187722251489449186553406332607980703796084903948734587138079950532833463137593891470805082529455528401742407245273107", 57, RoundingMode.ROUND_UP, "1.06614860077659800418307759080630658113283713836288525756"); + t("-0.988304191282080650953802621", 83, RoundingMode.ROUND_FLOOR, "2.9885000100721732869699054378956254043820550812677438678976996689347689911714373758"); + t("-0.8804302880564177900810117157080474426202357177031513372735693327741439152202812638991207123", 256, RoundingMode.ROUND_HALF_EVEN, "2.647565208696149929451849105861047087145060274026807895560052204114265578356552789877764753665507162268053062061372800187626268970860668862340649148766673878305201917312647545477234901090088195516505439148904626876405366261384867999746245383324795961910684"); + t("0.42428032756570609862714848506721882329999054474326535853286", 180, RoundingMode.ROUND_CEIL, "1.13262934123485525754578618576872205349992592340322819122159726606473783030143359647669512297887579729955558322548091681893040420357398542453141122638953020675719819960277346368265"); + t("-0.87318117", 300, RoundingMode.ROUND_HALF_UP, "2.63248784505978229810212545554199470270741978807337413697303411378814057722542001505167719269527598618428437606200441585881939991278814228255343291130608330682589254932446737151871702502051354818566978075200413633590284250102801369535791009702624169689710926456425351981417797343490217837426827523693"); + t("0.96889471", 92, RoundingMode.ROUND_CEIL, "0.25007158021436624794295153555382985318245242967011242899770086982678963442358037144655804477"); + t("0.53216570798594932806587532135216", 129, RoundingMode.ROUND_UP, "1.00963980910583087839185652832587623794456891336855034618993516577165927675014495654249287231937320099711676555111950756786757744"); + t("-0.23712039778801183346243928238731697651456485920903533540882746017103", 314, RoundingMode.ROUND_UP, "1.8101969618023819731939959317484638854484246342492762694000108320209486314022486329865542980787051107012872292008241291295246234532537105462444023532727278135454852590199911089531394603998407522495677819779835759456565197095016259510717678677982416978353359344430097817021972723875854504125043448450461659456010344"); + t("0.060312058960001006620729476004837145265085470875758549911566521877222631766673172", 239, RoundingMode.ROUND_DOWN, "1.5104476432198999871836000685572952922608257333998098204455171531757541963014824612851677814769158136692776817254075293790293074344376791688577594298132948170973180097992385228973042788643185280481929062300919049521900258014626953232177415"); + t("-0.6092217264", 298, RoundingMode.ROUND_FLOOR, "2.225875117696767611798434160842362208705179294486716468847048390499475515617808925689327516321797702120209023594786108981694192208281057189770532263065168519340373233361799994992421135641496398387221491275842879078323129111751254133356701280589961193536939217056893714413159871621402184462662909479"); + t("-0.8417541936749089651704696216", 149, RoundingMode.ROUND_FLOOR, "2.5713207083662755169543018953542102403269001777416467988567909257029089778187807384053545361354329110128556112979090137399683464572932024275703291812"); + t("-0.5871491050733172484161708781930905121749636124540215233046677776", 87, RoundingMode.ROUND_HALF_UP, "2.19832876070812716511230158211618329354535920964613744602062246787263030759008081521551"); + t("-0.277085743814551299013979575277428980903866161057731677175001378157448277129948259", 267, RoundingMode.ROUND_HALF_EVEN, "1.85155609054366023894305664277402055671646457369622532691169979979236491580847908362855772271035220542814056613024656797342473866388172838373205956416622350841390735877479320143626913144462913196802994570340752235406237826319149596443932238414382180415263763761583741"); + t("0.843765307415754624620893987805", 93, RoundingMode.ROUND_DOWN, "0.56653581055128743262884354069486315172159146109161090591955302455595691492222052244432289179"); + t("0.99227053001504270707153079654558", 271, RoundingMode.ROUND_HALF_DOWN, "0.1244142114981200916755875252263227200822082352213824752041820617987391411786837215459425757477808148970167446400969726695598367945330544180429788248837472195067871595209280340452585143772532409997477171983908355797967048729038970277883954572434175003011182064116479061784"); + t("0.8916190290031362370660457184995432248124460390015213375481019673409564154191249153329003227717266154126518545400451128", 166, RoundingMode.ROUND_UP, "0.4698879489033527110099584795383708408135922237461366438738377386586957015058903691654089703633649095558514053574879043965387260343269284353962592958620127238556191528"); + t("0.053", 292, RoundingMode.ROUND_HALF_EVEN, "1.517771482544358388242817093052857085306026025381738900487504616010309353836731453760893662121532297422577745513902819652753794495226559510725715267932273346070946662132803589780075591959296218712174180957337622341958566544208335137145863565062078255980236396142568927715312874643034114715603"); + t("0.398796971155411047390810642159207635220398152038513972073846138332312984648049948499514107", 268, RoundingMode.ROUND_UP, "1.160591717422262385064884232125924156313523468328523151403606303340022652673125292059165184582888180400608042102783455151236262385626752477121635321200596269332248486983740560231852946019718172259983235670357591665194971488935163824613291603392885425492686616376482795"); + t("-0.6557865", 194, RoundingMode.ROUND_HALF_DOWN, "2.2860202723094013533806445018264828293623128815820404122598815812540264519992972576890573970023926790207885059004361134545991829387761743015599358412241217875289662490342062341471799120269585512"); + t("-0.6812043690008459604413941888598292520741891519", 125, RoundingMode.ROUND_FLOOR, "2.3202028081451919410413719757522179849649386000074945672305247857877010408286226699795867212434956111836742523363280469117115"); + t("-0.9234752", 110, RoundingMode.ROUND_DOWN, "2.7478383440460332112966515441918214447413819586755899194425547667826353831096714151900237190186169488334882775"); + t("0.285587081446806", 117, RoundingMode.ROUND_HALF_DOWN, "1.28117736018107567939628956225702475862966862151034667491699756631348792163014435902650756015380766264732028097025524"); + t("0.13819504238824579343", 50, RoundingMode.ROUND_CEIL, "1.4321575887704496221908186825707853385894826968968"); + t("-0.87088432912375114572763546302668725975693196", 305, RoundingMode.ROUND_UP, "2.6277950783829523655376501555612165658978703527269592241549573760619180066557759743935095729039244585109591115342954615025625502912414261323239685934485409870957514187672089242294766814885932365265993794899793412194891940057651102588359432775299523228135446808402159857946697659146517765582551370632468776"); + t("0.08823194083430274508726439434669253642392152158773663374909397164", 160, RoundingMode.ROUND_HALF_EVEN, "1.482449503939088896690597964423680503507425766873722635967873639816786043531410813509390246940709897785350045255724481571102070115396790364245538570280736524387"); + t("-0.4782350986149213223137075215227283", 209, RoundingMode.ROUND_UP, "2.069440329491666823368829738330133890917048270254692515552666794440743064212644756784461766290185491309936280116773443413771855462729472715257786786592510529817401749835772340808303006119114840372074816699568"); + t("-0.2904291356767990672663969769818813256736389145509262938123890442512869616388398097073972998", 220, RoundingMode.ROUND_UP, "1.865471600177256160841755343573079021480900579809941981435575198730816828223164397465182652600858480436382194535277523895290318359241525994579691849237416813186256582053721221858748911101879760730733644400625342817959603"); + t("-0.97", 116, RoundingMode.ROUND_FLOOR, "2.8960271360745012304805194387355191452231610922687838587442287877772463030269677185690125636193327601684590363875111"); + t("0.64406641838727362832048634692006", 285, RoundingMode.ROUND_HALF_EVEN, "0.870994088184606218032856018230384348672398234965897958708138388678442642625049163249686273971233817835515549148344148268350143207052115551177156040327348972401335588215953696887536582040009378864053812838839767842444818895936100772429085359222574841874108401619657798149436333075430981"); + t("-0.255497879378386206529349560080073437056905", 72, RoundingMode.ROUND_HALF_UP, "1.8291589664675264680392682574143193990176444937797416276953057483639527"); + t("0.13736053075325015589431757537003544287024030864690661953290082856326766722949797355755839528830859467258891", 28, RoundingMode.ROUND_FLOOR, "1.433000135662117306310376376"); + t("0.98", 158, RoundingMode.ROUND_HALF_EVEN, "0.20033484232311959269104635890538663713735194445925908278204771007280534730172510330787572871900890991132018184019317193656613714611693604055581634894163193067"); + t("0.285240699184324875469699323998456346535460266242954848425596184046483391444787686704954176945347768730989028617730321686864722621185397651677284056837487505492834524081566587967538357989373661144847881697423362", 159, RoundingMode.ROUND_HALF_EVEN, "1.28153877575936981514828884705656932194745590215359116881777970452418012738053160747644045072827400589404204122956916037521899051936034859376026053003385567941"); + t("0.870885920899394843427595453559619421", 62, RoundingMode.ROUND_FLOOR, "0.51379433651106699777184143963408910975793416371794737910603043"); + t("0.22188789676081649237243800127", 253, RoundingMode.ROUND_CEIL, "1.347046120402577112535530917655143767892732910457439488486932441045302606637138097804650010451632153661994733536016427392831818754294662744543007759025992402965982617699020774651969755506626758290159115577988294806339034942230395292869389659871867239555"); + t("-0.20325165840739489878", 261, RoundingMode.ROUND_DOWN, "1.77547408850854089743198994679778700328968580104357495970002519071688653345045996210264749955429047077887716613197444286232868888314681933726192087753660062552179051596607259764994400604543771017200901564058205784756171450307745638796023879678104097658443152865"); + t("0.857414843516717240627", 278, RoundingMode.ROUND_CEIL, "0.54057124559153480250756402419679382562791635772938182739452725254706797441291141273149804905164659865734797480206355089220227651658135807741234396019513091627199800759787749579227670181272959419244872701919679455667810149411092491944694932281136030173068028369249503650823396519"); + t("-0.423524346905325485896185", 200, RoundingMode.ROUND_HALF_EVEN, "2.0081286274715512634849484937805659607728178462144990461598778928561649948317204157683509413265813598264596367547787485358622333336596704743401483897162382632056180971822839953638432758891580460517347"); + t("0.413005758679023316787848706252173623675061017446440007199455", 223, RoundingMode.ROUND_HALF_DOWN, "1.145044335076719558065541584128477329597355586178076311778094502014552803180480645530413043828985265166646826445662244803902880964228755136226705052251066453744827767134227184786929306022462501527822933967432962426330174114"); + t("0.60303396912878463481820757880149243536964122123", 74, RoundingMode.ROUND_UP, "0.92349733850886719511782404713538203887217672251996140824604328139845013166"); + t("-0.5009004854786", 269, RoundingMode.ROUND_CEIL, "2.0954352059408460514318026547309433198738255688061450644617174160314436547867283717629140442256930156388608876640976758377708167203988724854611214814544001386962797047563887209619201816436375743858810756575589094720903844577003117436991158536314585137130782865903593605"); + t("0.051982", 192, RoundingMode.ROUND_CEIL, "1.51879088794395444868710618321273480388836835436859563148267673127351041936037021104920053999562569315683939991260086992737535681210803545257257762676298776611312728382326725537299116519307078"); + t("0.6346406587004958214299660742336408318928652761581435881815894816", 193, RoundingMode.ROUND_CEIL, "0.8832528773049009261667990998627157166711351563781864065099463634933306183056548641126151808787129383294481781530192258364476994810649388254730407553512514399805136221571869647138857340680299531"); + t("0.5808863207143779486419360991243495310519417125497680874674241928465718557439232384069462701463652467773787097469591729677973812273202622932378878206677139017689899138902", 114, RoundingMode.ROUND_FLOOR, "0.950979192071296118882561680089797212373025625430682323609489650779266948836074124065928224284024624698950727879061"); + t("0.6", 251, RoundingMode.ROUND_HALF_DOWN, "0.92729521800161223242851246292242880405707410857224052762186617744039572833148341060120056796977578511305970450238167502701163636325002231094306113988821124143867253232976020306500551197585161103370777833495647457307758783602503439896802791167637023019"); + t("0.329008830627035518820451", 176, RoundingMode.ROUND_FLOOR, "1.2355425479656791188459013451665743465397529721125321299610420962095734449665049666456976063909031459823081837975455689839295482599636313257647464048053432262047441910829923808"); + t("0.31503731586271512953987", 175, RoundingMode.ROUND_DOWN, "1.250300355040444140384875969127128388865582776679385514007352971948442243497048855209710989127061157111853695806290441906793238123959427914022156720058162558731327402523044166"); + t("-0.07853007897317622293045558522251526660194271081717322978", 173, RoundingMode.ROUND_HALF_EVEN, "1.6494073460738196727474653405568328128478576667816496188558018754785734688662650493515246411034101302768235838373499639808407336300758786703980995090099910486541663777946303"); + */ + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalAcoshTests.cs b/DecimalSharp.Tests/BigDecimalAcoshTests.cs new file mode 100644 index 0000000..8657919 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalAcoshTests.cs @@ -0,0 +1,1044 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalAcosh")] + public class BigDecimalAcoshTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Acosh() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Acosh().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0.9999999999999999999999999", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-1", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("1", 40, RoundingMode.ROUND_HALF_UP, "0"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "Infinity"); + + t("3.3", 2, RoundingMode.ROUND_HALF_UP, "1.9"); + t("4608888.8834", 7, RoundingMode.ROUND_DOWN, "16.03664"); + t("145005612624726799", 7, RoundingMode.ROUND_DOWN, "40.20869"); + t("644444444487588842435356055860541441083823652904922222222222222", 2, RoundingMode.ROUND_HALF_EVEN, "150"); + t("9.28", 1, RoundingMode.ROUND_HALF_DOWN, "3"); + t("76", 10, RoundingMode.ROUND_UP, "5.023837236"); + t("28099999969999999491999992999999999999.9999999999999939697", 4, RoundingMode.ROUND_DOWN, "86.92"); + t("585287364", 7, RoundingMode.ROUND_HALF_EVEN, "20.88076"); + t("7", 3, RoundingMode.ROUND_DOWN, "2.63"); + t("43999099999999099999999999999999999997999999999999999999999990993999999.999099999999999699999", 10, RoundingMode.ROUND_DOWN, "163.3556877"); + t("557921.15371560132973597030139633138927112983", 9, RoundingMode.ROUND_CEIL, "13.9251202"); + t("222222270476", 7, RoundingMode.ROUND_DOWN, "26.82009"); + t("9925", 4, RoundingMode.ROUND_CEIL, "9.896"); + t("51156203358371111111111111111111.88888888888888185816094145162589", 5, RoundingMode.ROUND_UP, "73.706"); + t("920.33", 5, RoundingMode.ROUND_HALF_DOWN, "7.5179"); + t("398.29", 4, RoundingMode.ROUND_UP, "6.681"); + t("300000000000000000000000", 8, RoundingMode.ROUND_HALF_UP, "54.751217"); + t("2077", 8, RoundingMode.ROUND_CEIL, "8.331827"); + t("466660000000000000000000.666663813047981223086678888888888888", 5, RoundingMode.ROUND_CEIL, "55.194"); + t("1481.596575", 2, RoundingMode.ROUND_UP, "8"); + t("51843625827420648103724841829104208766358144", 6, RoundingMode.ROUND_HALF_UP, "101.35"); + t("66.49", 6, RoundingMode.ROUND_HALF_EVEN, "4.89014"); + t("30564048384", 13, RoundingMode.ROUND_DOWN, "24.83623744632"); + t("7", 48, RoundingMode.ROUND_DOWN, "2.63391579384963341725009269461593688805396394293"); + t("97574340", 32, RoundingMode.ROUND_CEIL, "19.08927228754035088993028581182"); + t("59258006", 62, RoundingMode.ROUND_HALF_UP, "18.590558631774124907454170672852196556349238888846297909065851"); + t("2", 29, RoundingMode.ROUND_DOWN, "1.3169578969248167086250463473"); + t("47824727144130804625931275592321416135112742535362856133451607743134653532851722527764075063.55842730879104516021234131120280682177076228198214593563443436114750010543987134572764385", 33, RoundingMode.ROUND_FLOOR, "211.793348360036258224908114351528"); + t("28888888888888888888005555555555", 63, RoundingMode.ROUND_HALF_UP, "73.1341570240606241766246193827749684596026580789070620470111545"); + t("53333333332333333333333333333333333333333.3333333333238", 44, RoundingMode.ROUND_DOWN, "94.470527333874694216410397776492923242508444"); + t("372499047371205457405389940445944981761906694426814657494361227129962080514219995743180551139499492754067", 40, RoundingMode.ROUND_HALF_UP, "241.4770611463762121239476457202278064235"); + t("2800646674524111760613114531", 29, RoundingMode.ROUND_HALF_EVEN, "63.892795037101476241199480935"); + t("582502684111672632668804", 18, RoundingMode.ROUND_HALF_UP, "55.4147679267811784"); + t("59.9999999999194977", 38, RoundingMode.ROUND_FLOOR, "4.7874222911013468319935340554530121378"); + t("3623643157643492007800000000000000000", 54, RoundingMode.ROUND_UP, "84.8736904452442702624435580686958522860590865192215031"); + t("23885562764027262", 28, RoundingMode.ROUND_DOWN, "38.40519778343449888592577782"); + t("676263", 32, RoundingMode.ROUND_DOWN, "14.117484513177343902058185404775"); + t("47551685235102870485407214.46883446439928999925", 58, RoundingMode.ROUND_DOWN, "59.81700664210749659679029308727990790424880703317942061059"); + t("2082819111111111111111.66668634223026707142169092", 34, RoundingMode.ROUND_HALF_EVEN, "49.78115645138172332225379630123395"); + t("7531.926725308", 22, RoundingMode.ROUND_HALF_DOWN, "9.620053337431944749948"); + t("3100000000000000000000000000000000070000080000000000000000000300000000000000000000000000000000080", 6, RoundingMode.ROUND_HALF_EVEN, "222.873"); + t("49844937529139.9399", 55, RoundingMode.ROUND_UP, "32.23308523365993666498473649670539223213853202660291314"); + t("36666666666999999999999.91929310391451604503565774644", 28, RoundingMode.ROUND_HALF_DOWN, "52.64930221056830211957060803"); + + /* + t("688794659750592416", 10, RoundingMode.ROUND_HALF_UP, "41.76686678"); + t("2", 9, RoundingMode.ROUND_FLOOR, "1.31695789"); + t("59690", 1, RoundingMode.ROUND_FLOOR, "10"); + t("185157101054393517830827", 2, RoundingMode.ROUND_UP, "55"); + t("7339333333333333.3339", 10, RoundingMode.ROUND_HALF_UP, "37.22517159"); + t("143293", 10, RoundingMode.ROUND_DOWN, "12.56579394"); + t("62318899.42132781822551066", 6, RoundingMode.ROUND_HALF_DOWN, "18.6409"); + t("209993.13964675979087777312767201615918", 7, RoundingMode.ROUND_UP, "12.94798"); + t("8344444444444444444444444444443444344444444444444.44444444623", 3, RoundingMode.ROUND_HALF_DOWN, "113"); + t("5654929.9999", 7, RoundingMode.ROUND_HALF_UP, "16.24119"); + t("3551", 4, RoundingMode.ROUND_HALF_DOWN, "8.868"); + t("10", 10, RoundingMode.ROUND_DOWN, "2.993222846"); + t("2932424523822944651143728066593172499992979349088", 4, RoundingMode.ROUND_DOWN, "112.2"); + t("6.39", 5, RoundingMode.ROUND_FLOOR, "2.5417"); + t("35554664", 8, RoundingMode.ROUND_HALF_UP, "18.079729"); + t("6162345253079358700", 10, RoundingMode.ROUND_CEIL, "43.95813629"); + t("7322091622521.519767109364013654", 6, RoundingMode.ROUND_HALF_UP, "30.3151"); + t("5", 7, RoundingMode.ROUND_HALF_UP, "2.292432"); + t("399999999999999999935316411018604918039599999999999999999999.36939115746638208018", 8, RoundingMode.ROUND_HALF_EVEN, "137.93196"); + t("2000000000000000748", 8, RoundingMode.ROUND_HALF_DOWN, "42.832826"); + t("9.12", 1, RoundingMode.ROUND_HALF_UP, "3"); + t("443571.841448", 3, RoundingMode.ROUND_FLOOR, "13.6"); + t("8.6891576", 9, RoundingMode.ROUND_HALF_UP, "2.85189541"); + t("62666", 2, RoundingMode.ROUND_CEIL, "12"); + t("8572", 9, RoundingMode.ROUND_CEIL, "9.74940354"); + t("9825", 9, RoundingMode.ROUND_HALF_DOWN, "9.88583261"); + t("34930332322753463339602158973222066786428322", 1, RoundingMode.ROUND_HALF_UP, "100"); + t("33809999999999", 5, RoundingMode.ROUND_FLOOR, "31.844"); + t("364300000.0000005000000000000000000000000000000000000006100008000000000000000004", 7, RoundingMode.ROUND_HALF_UP, "20.40664"); + t("66322.733", 5, RoundingMode.ROUND_HALF_UP, "11.795"); + t("41111.1111111450094213682059581804", 9, RoundingMode.ROUND_FLOOR, "11.3171808"); + t("6382684751355812260550286012768053775172785382718996890699347000000000000000", 9, RoundingMode.ROUND_FLOOR, "175.240617"); + t("899898784", 8, RoundingMode.ROUND_CEIL, "21.310941"); + t("95851434098223440189.9999999999112787642593208233262777777777777777777", 3, RoundingMode.ROUND_CEIL, "46.8"); + t("2.1", 5, RoundingMode.ROUND_HALF_UP, "1.3729"); + t("7.03247", 7, RoundingMode.ROUND_FLOOR, "2.638591"); + t("42074415192304513830847567527805489757200654475924", 9, RoundingMode.ROUND_DOWN, "114.956671"); + t("18926441693", 10, RoundingMode.ROUND_HALF_EVEN, "24.35697299"); + t("83.5", 2, RoundingMode.ROUND_HALF_UP, "5.1"); + t("98026.9", 9, RoundingMode.ROUND_HALF_UP, "12.1861444"); + t("2.222222222222222222502937", 4, RoundingMode.ROUND_CEIL, "1.437"); + t("6297484644.4", 9, RoundingMode.ROUND_HALF_DOWN, "23.2565633"); + t("485975802458987968981230993431574741136807777777777", 2, RoundingMode.ROUND_FLOOR, "110"); + t("26.66666666666666666666670416422187810665421327039", 8, RoundingMode.ROUND_CEIL, "3.9762098"); + t("7", 2, RoundingMode.ROUND_UP, "2.7"); + t("4812.1111111111111111111109", 5, RoundingMode.ROUND_DOWN, "9.172"); + t("7210142909", 3, RoundingMode.ROUND_FLOOR, "23.3"); + t("8550429999999999999999999999999.9999299999999999999959999999999", 10, RoundingMode.ROUND_CEIL, "71.91668155"); + t("729250190.57908800914344534791386405739736678231141402397319236581853117776727058", 4, RoundingMode.ROUND_FLOOR, "21.1"); + t("3.6381043101384038035400919576", 8, RoundingMode.ROUND_CEIL, "1.965163"); + t("8219031139", 6, RoundingMode.ROUND_HALF_EVEN, "23.5229"); + t("213", 7, RoundingMode.ROUND_HALF_DOWN, "6.054434"); + t("1.3", 8, RoundingMode.ROUND_HALF_EVEN, "0.75643291"); + t("28.4", 6, RoundingMode.ROUND_HALF_DOWN, "4.03923"); + t("979000", 8, RoundingMode.ROUND_HALF_UP, "14.487434"); + t("9099882222222222222.88888", 7, RoundingMode.ROUND_CEIL, "44.34795"); + t("50.0009", 9, RoundingMode.ROUND_HALF_EVEN, "4.60508817"); + t("57918824268321306191403.639719313", 1, RoundingMode.ROUND_HALF_UP, "50"); + t("302886700", 2, RoundingMode.ROUND_UP, "21"); + t("90911", 7, RoundingMode.ROUND_DOWN, "12.11078"); + t("8.1", 9, RoundingMode.ROUND_HALF_DOWN, "2.78117888"); + t("7333333339574354800153039260402793737734657.99992", 7, RoundingMode.ROUND_UP, "99.39416"); + t("383955931730937604", 6, RoundingMode.ROUND_FLOOR, "41.1824"); + t("3479959517.9590905451212", 10, RoundingMode.ROUND_DOWN, "22.66343367"); + t("1259.24", 5, RoundingMode.ROUND_HALF_EVEN, "7.8314"); + t("7150862477018.38294089660523", 2, RoundingMode.ROUND_UP, "31"); + t("366666666666666666678514444444", 7, RoundingMode.ROUND_FLOOR, "68.76739"); + t("7264742348252172662795558", 10, RoundingMode.ROUND_UP, "57.93822225"); + t("61466967667003533", 10, RoundingMode.ROUND_CEIL, "39.3504235"); + t("5.1", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("277.7777777777777777777777777777777777777779", 7, RoundingMode.ROUND_HALF_UP, "6.319965"); + t("88999999.9999999999999999969979999949999999912999999999999999995", 10, RoundingMode.ROUND_DOWN, "18.9972941"); + t("74470", 2, RoundingMode.ROUND_DOWN, "11"); + t("1822222222222222222222.7777779", 3, RoundingMode.ROUND_FLOOR, "49.6"); + t("86.155", 1, RoundingMode.ROUND_CEIL, "6"); + t("3300000000", 8, RoundingMode.ROUND_DOWN, "22.610335"); + t("6352311968376696.550668309", 10, RoundingMode.ROUND_HALF_EVEN, "37.08074241"); + t("450000000000000900000.000000002200053", 4, RoundingMode.ROUND_UP, "48.25"); + t("20.75", 9, RoundingMode.ROUND_FLOOR, "3.72511228"); + t("9531111112222222222222222222.111111111111", 10, RoundingMode.ROUND_HALF_DOWN, "65.11750599"); + t("1333333.5558", 7, RoundingMode.ROUND_HALF_UP, "14.79634"); + t("6426", 9, RoundingMode.ROUND_FLOOR, "9.46125471"); + t("3", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("55709330.834715245752457138070117472389817859371577879445647713355041196", 5, RoundingMode.ROUND_HALF_UP, "18.529"); + t("1", 6, RoundingMode.ROUND_CEIL, "0"); + t("8569803134.829", 2, RoundingMode.ROUND_HALF_UP, "24"); + t("5", 9, RoundingMode.ROUND_CEIL, "2.29243167"); + t("29216030850742921269080222332244252306", 5, RoundingMode.ROUND_CEIL, "86.961"); + t("71111111121111111111121111511121111111111111.1111111111111111111611111272", 4, RoundingMode.ROUND_DOWN, "101.6"); + t("4123748.30991539798604850558116", 5, RoundingMode.ROUND_HALF_EVEN, "15.925"); + t("1137.71942931123672005865923849506285507", 7, RoundingMode.ROUND_HALF_DOWN, "7.729928"); + t("41901994757638791662401297", 1, RoundingMode.ROUND_HALF_UP, "60"); + t("4", 6, RoundingMode.ROUND_HALF_UP, "2.06344"); + t("7023080293863491033849058332911858160065", 1, RoundingMode.ROUND_HALF_EVEN, "90"); + t("4", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("4581184000000000006", 5, RoundingMode.ROUND_FLOOR, "43.661"); + t("2370.4537450762082343879772090696", 9, RoundingMode.ROUND_HALF_EVEN, "8.46398381"); + t("92348696.0789388695753918836531632296673154362245799313886801633", 1, RoundingMode.ROUND_DOWN, "10"); + t("7.2", 8, RoundingMode.ROUND_CEIL, "2.6623705"); + t("3191.913286478573", 8, RoundingMode.ROUND_UP, "8.761523"); + t("16937179424805646671818546532718996103544004742402952", 6, RoundingMode.ROUND_HALF_UP, "120.954"); + t("5", 7, RoundingMode.ROUND_CEIL, "2.292432"); + t("4", 2, RoundingMode.ROUND_UP, "2.1"); + t("7186", 10, RoundingMode.ROUND_CEIL, "9.573037144"); + t("288888888888888879293326377258623961960181", 9, RoundingMode.ROUND_CEIL, "96.160008"); + t("132.412", 9, RoundingMode.ROUND_HALF_UP, "5.5790512"); + t("7.815504405398309331795693", 8, RoundingMode.ROUND_HALF_EVEN, "2.7451385"); + t("3030000000008.009", 4, RoundingMode.ROUND_HALF_EVEN, "29.43"); + t("656633333333333333333333333333333333233333333333333333333333333333333333.333333388", 1, RoundingMode.ROUND_HALF_DOWN, "200"); + t("6", 10, RoundingMode.ROUND_CEIL, "2.477888731"); + t("848804345996441702.69111673174", 5, RoundingMode.ROUND_HALF_EVEN, "41.976"); + t("257003.9", 2, RoundingMode.ROUND_FLOOR, "13"); + t("691.84", 7, RoundingMode.ROUND_HALF_UP, "7.232501"); + t("5566734", 2, RoundingMode.ROUND_FLOOR, "16"); + t("31.3996", 6, RoundingMode.ROUND_HALF_DOWN, "4.13969"); + t("680570817991604801232717809312109580370199", 8, RoundingMode.ROUND_FLOOR, "97.016897"); + t("1.57091", 1, RoundingMode.ROUND_DOWN, "1"); + t("6393.3", 4, RoundingMode.ROUND_HALF_UP, "9.456"); + t("87082084344581241478620.17429184906262032232746139175", 7, RoundingMode.ROUND_HALF_EVEN, "53.51429"); + t("4.1", 8, RoundingMode.ROUND_DOWN, "2.0889188"); + t("6.3475", 3, RoundingMode.ROUND_FLOOR, "2.53"); + t("51387777777777777.561792576841996021680552554078", 9, RoundingMode.ROUND_HALF_UP, "39.1713239"); + t("7", 7, RoundingMode.ROUND_FLOOR, "2.633915"); + t("3", 7, RoundingMode.ROUND_UP, "1.762748"); + t("48888810857344814329607780730572594654538212906554820830939508611854021189481344222", 6, RoundingMode.ROUND_HALF_UP, "191.092"); + t("8444444444444444444420325506716748175309262499111111", 1, RoundingMode.ROUND_HALF_DOWN, "100"); + t("70000000080000050500000.0000001", 2, RoundingMode.ROUND_DOWN, "53"); + t("89333333332333337333333333.331333333413333333333332333333333333333233333333316333333333333", 8, RoundingMode.ROUND_HALF_UP, "60.447564"); + t("5", 3, RoundingMode.ROUND_UP, "2.3"); + t("6043333333334333335133333333333.335333333133393333333334", 4, RoundingMode.ROUND_HALF_EVEN, "71.57"); + t("7", 7, RoundingMode.ROUND_FLOOR, "2.633915"); + t("82222222222222222222.222222222222222222222222", 2, RoundingMode.ROUND_UP, "47"); + t("244730931839123673209878", 5, RoundingMode.ROUND_DOWN, "54.547"); + t("5", 5, RoundingMode.ROUND_UP, "2.2925"); + t("9", 1, RoundingMode.ROUND_UP, "3"); + t("7232555555555555555.888888888888775794001018177603398", 1, RoundingMode.ROUND_FLOOR, "40"); + t("2.489937600116761", 4, RoundingMode.ROUND_CEIL, "1.563"); + t("166666666674871849769108495054364444444.80828377042757112817483666001735224658867678505538888", 5, RoundingMode.ROUND_DOWN, "88.702"); + t("3999999999999.2", 10, RoundingMode.ROUND_CEIL, "29.71046266"); + t("64560268495084511111.99999999999911111", 10, RoundingMode.ROUND_HALF_EVEN, "46.30727804"); + t("733333333333332180750727264961494503517297", 7, RoundingMode.ROUND_UP, "97.09157"); + t("9481510951080291281011730141950557543113128179169591821423729222222222222222222", 3, RoundingMode.ROUND_HALF_DOWN, "183"); + t("4", 7, RoundingMode.ROUND_HALF_UP, "2.063437"); + t("9837.503", 7, RoundingMode.ROUND_UP, "9.887105"); + t("21.22222222222222222211111111111111163401341559", 3, RoundingMode.ROUND_CEIL, "3.75"); + t("763.756445520805", 7, RoundingMode.ROUND_CEIL, "7.331396"); + t("2599999999999999999999999999999999.9", 11, RoundingMode.ROUND_FLOOR, "77.633966694"); + t("8839000000", 9, RoundingMode.ROUND_DOWN, "23.5955867"); + t("3353941193.20510874412", 4, RoundingMode.ROUND_UP, "22.63"); + t("80059999999999999999999", 19, RoundingMode.ROUND_DOWN, "53.43021048699933223"); + t("49064140362236749728704271199451859640", 19, RoundingMode.ROUND_CEIL, "87.47933895746407069"); + t("5377150453333333333333333333.3", 19, RoundingMode.ROUND_UP, "64.54510326974159099"); + t("1405500000", 15, RoundingMode.ROUND_UP, "21.7568061288709"); + t("5287913568230499", 3, RoundingMode.ROUND_UP, "36.9"); + t("25643078378317969065240841", 12, RoundingMode.ROUND_UP, "59.1994630989"); + t("74107777777771111111111111111111.55555555555555555557777777", 2, RoundingMode.ROUND_HALF_UP, "74"); + t("4.52", 2, RoundingMode.ROUND_DOWN, "2.1"); + t("1", 7, RoundingMode.ROUND_HALF_UP, "0"); + t("61", 2, RoundingMode.ROUND_HALF_EVEN, "4.8"); + t("770", 11, RoundingMode.ROUND_UP, "7.3395372738"); + t("26009816628915839.48106802232293", 15, RoundingMode.ROUND_DOWN, "38.4903976048838"); + t("29999999991099.9999999991999999999996593", 7, RoundingMode.ROUND_UP, "31.72537"); + t("799999999977221292744819555555555555555", 7, RoundingMode.ROUND_CEIL, "90.27083"); + t("1", 7, RoundingMode.ROUND_CEIL, "0"); + t("76.4", 20, RoundingMode.ROUND_HALF_DOWN, "5.0290870434659643206"); + t("14005075084515997", 15, RoundingMode.ROUND_HALF_EVEN, "37.8713433454333"); + t("9", 20, RoundingMode.ROUND_DOWN, "2.8872709503576206849"); + t("811111111100723596188348.111111111111166555555555", 18, RoundingMode.ROUND_CEIL, "55.7458391832223613"); + t("6999994.9999", 20, RoundingMode.ROUND_UP, "16.454567173279272505"); + t("689889.9899", 7, RoundingMode.ROUND_DOWN, "14.13743"); + t("172411633.5814807", 13, RoundingMode.ROUND_UP, "19.65854257465"); + t("59002539284", 16, RoundingMode.ROUND_UP, "25.49399349919781"); + t("88", 7, RoundingMode.ROUND_HALF_UP, "5.170452"); + t("3", 11, RoundingMode.ROUND_UP, "1.7627471741"); + t("956047954792273470461890103655", 4, RoundingMode.ROUND_CEIL, "69.73"); + t("3000309999.1", 16, RoundingMode.ROUND_FLOOR, "22.5151286338693"); + t("221235021260937.750724969", 8, RoundingMode.ROUND_HALF_EVEN, "33.723394"); + t("71046488.8853376", 8, RoundingMode.ROUND_HALF_EVEN, "18.771992"); + t("44499999.442", 15, RoundingMode.ROUND_HALF_EVEN, "18.3041469151571"); + t("317086.1974355232512", 20, RoundingMode.ROUND_HALF_DOWN, "13.3600761126547556"); + t("488887777777777777.111881565057225", 10, RoundingMode.ROUND_HALF_EVEN, "41.42405655"); + t("409000000000002400.04", 1, RoundingMode.ROUND_UP, "50"); + t("41843.503", 7, RoundingMode.ROUND_UP, "11.33484"); + t("640098", 16, RoundingMode.ROUND_HALF_EVEN, "14.06252374917275"); + t("5.6004", 4, RoundingMode.ROUND_FLOOR, "2.407"); + t("22554533117680", 17, RoundingMode.ROUND_HALF_UP, "31.440104367408607"); + t("299092", 17, RoundingMode.ROUND_DOWN, "13.301653677910096"); + t("54117646771868637437148805854834158730824569839138899999999999999999", 12, RoundingMode.ROUND_HALF_UP, "156.654923639"); + t("9", 14, RoundingMode.ROUND_FLOOR, "2.8872709503576"); + t("5972682", 16, RoundingMode.ROUND_HALF_DOWN, "16.295853811279"); + t("802005416", 15, RoundingMode.ROUND_HALF_DOWN, "21.1957730994851"); + t("980", 12, RoundingMode.ROUND_DOWN, "7.58069949191"); + t("37777.77", 1, RoundingMode.ROUND_HALF_EVEN, "10"); + t("523603.34373281", 8, RoundingMode.ROUND_FLOOR, "13.861636"); + t("779999999.99999999", 10, RoundingMode.ROUND_UP, "21.16795166"); + t("32", 19, RoundingMode.ROUND_HALF_UP, "4.158638853279167201"); + t("6976.99", 8, RoundingMode.ROUND_HALF_EVEN, "9.54352"); + t("9333333333333333337162799129172126314655704899149242475651934102388981417960449094742033333333333333", 5, RoundingMode.ROUND_DOWN, "230.88"); + t("7", 4, RoundingMode.ROUND_CEIL, "2.634"); + t("896.1998", 5, RoundingMode.ROUND_DOWN, "7.4913"); + t("447351998978633272059897777855555555555", 15, RoundingMode.ROUND_FLOOR, "89.6895562828183"); + t("73.039", 4, RoundingMode.ROUND_UP, "4.985"); + t("6369177597222222222222222", 2, RoundingMode.ROUND_DOWN, "57"); + t("558888888111111.8", 11, RoundingMode.ROUND_FLOOR, "34.65011898"); + t("5610829", 9, RoundingMode.ROUND_HALF_EVEN, "16.2333562"); + t("61035.9", 17, RoundingMode.ROUND_FLOOR, "11.712364675125771"); + t("78019099.572499", 2, RoundingMode.ROUND_CEIL, "19"); + t("7098000000500060000000300000900.028", 18, RoundingMode.ROUND_FLOOR, "71.7305130246760713"); + t("31595", 1, RoundingMode.ROUND_FLOOR, "10"); + t("67.7", 14, RoundingMode.ROUND_CEIL, "4.9081788100445"); + t("30008", 12, RoundingMode.ROUND_UP, "11.0023664721"); + t("819", 17, RoundingMode.ROUND_HALF_DOWN, "7.4012308917018109"); + t("198286254683875638023754059108303270", 5, RoundingMode.ROUND_CEIL, "81.969"); + t("652361.415", 14, RoundingMode.ROUND_HALF_UP, "14.081501185376"); + t("3", 7, RoundingMode.ROUND_FLOOR, "1.762747"); + t("5", 7, RoundingMode.ROUND_HALF_EVEN, "2.292432"); + t("4888888887436680888888888888.777777777777777777151", 7, RoundingMode.ROUND_DOWN, "64.4499"); + t("4.7", 14, RoundingMode.ROUND_HALF_UP, "2.229195247679"); + t("52477708090980557820", 3, RoundingMode.ROUND_HALF_EVEN, "46.1"); + t("574999999969.7999979", 13, RoundingMode.ROUND_HALF_UP, "27.77078305825"); + t("49000000", 5, RoundingMode.ROUND_HALF_UP, "18.4"); + t("9288384", 9, RoundingMode.ROUND_UP, "16.7374224"); + t("22682.126567", 1, RoundingMode.ROUND_DOWN, "10"); + t("5444444444444444444717719046150070257602965299084327644053398857004444444444444444444", 9, RoundingMode.ROUND_HALF_UP, "195.804891"); + t("83662.6626663666666668", 16, RoundingMode.ROUND_UP, "12.02769525224759"); + t("27452474533965122852969512675794759546408", 20, RoundingMode.ROUND_HALF_DOWN, "93.806422118177108963"); + t("7033", 15, RoundingMode.ROUND_UP, "9.55151581181369"); + t("1", 16, RoundingMode.ROUND_CEIL, "0"); + t("5167894160.77496943103516", 6, RoundingMode.ROUND_HALF_EVEN, "23.0589"); + t("2057110276674016259763027395492619", 2, RoundingMode.ROUND_UP, "78"); + t("988563064118972848719798803.34613", 8, RoundingMode.ROUND_CEIL, "62.851442"); + t("3999999999999999999539818660311111", 1, RoundingMode.ROUND_HALF_EVEN, "80"); + t("1999999.59999956", 1, RoundingMode.ROUND_CEIL, "20"); + t("49126", 1, RoundingMode.ROUND_HALF_EVEN, "10"); + t("36677449719367071998469329009963366", 16, RoundingMode.ROUND_HALF_DOWN, "80.28061736650922"); + t("42369896728775635.2603541628125783538247824456799236", 17, RoundingMode.ROUND_HALF_UP, "38.978361702739492"); + t("650", 11, RoundingMode.ROUND_DOWN, "7.1701189517"); + t("76.3", 17, RoundingMode.ROUND_UP, "5.0277771732271599"); + t("919978945.418589024455379", 10, RoundingMode.ROUND_HALF_DOWN, "21.33300852"); + t("8893575", 10, RoundingMode.ROUND_CEIL, "16.69398685"); + t("1111111111111111111111111111111111111111111111111111.11111111111119", 1, RoundingMode.ROUND_HALF_UP, "100"); + t("2", 18, RoundingMode.ROUND_HALF_UP, "1.31695789692481671"); + t("25", 14, RoundingMode.ROUND_HALF_UP, "3.9116227652146"); + t("17964.505548552851604783483558429595213", 11, RoundingMode.ROUND_FLOOR, "10.489300355"); + t("9000", 10, RoundingMode.ROUND_UP, "9.798127034"); + t("768818888888888888.88888888", 5, RoundingMode.ROUND_CEIL, "41.877"); + t("444777347338", 7, RoundingMode.ROUND_HALF_EVEN, "27.51399"); + t("358.974586", 14, RoundingMode.ROUND_DOWN, "6.5763968354018"); + t("780.3", 14, RoundingMode.ROUND_DOWN, "7.3528252310844"); + t("5", 5, RoundingMode.ROUND_FLOOR, "2.2924"); + t("299.99999", 15, RoundingMode.ROUND_HALF_EVEN, "6.39692684409328"); + t("3", 14, RoundingMode.ROUND_DOWN, "1.762747174039"); + t("83784768867990", 4, RoundingMode.ROUND_FLOOR, "32.75"); + t("112725.5", 3, RoundingMode.ROUND_HALF_EVEN, "12.3"); + t("3", 9, RoundingMode.ROUND_CEIL, "1.76274718"); + t("2777777777777777.78777777777", 10, RoundingMode.ROUND_HALF_DOWN, "36.25357482"); + t("9539988497.17692805781324828", 7, RoundingMode.ROUND_CEIL, "23.67191"); + t("922935211", 17, RoundingMode.ROUND_HALF_DOWN, "21.336216776630534"); + t("4618555555555555.4883", 15, RoundingMode.ROUND_CEIL, "36.7620055813664"); + t("431454987847885709788742740", 2, RoundingMode.ROUND_HALF_DOWN, "62"); + t("8640", 6, RoundingMode.ROUND_FLOOR, "9.7573"); + t("873", 19, RoundingMode.ROUND_FLOOR, "7.465082408370928985"); + t("61.27767", 7, RoundingMode.ROUND_HALF_DOWN, "4.808496"); + t("253678340782509684625443992327148876342696020", 10, RoundingMode.ROUND_HALF_EVEN, "102.9377882"); + t("2952091", 12, RoundingMode.ROUND_DOWN, "15.5911714713"); + t("58.19", 9, RoundingMode.ROUND_UP, "4.75678686"); + t("77489.4060920964", 9, RoundingMode.ROUND_FLOOR, "11.9510436"); + t("8", 3, RoundingMode.ROUND_DOWN, "2.76"); + t("6139149828702444444444.5741193384639201876", 1, RoundingMode.ROUND_FLOOR, "50"); + t("80400000060000000300000000000000000000000.0000000004000000600000000000000000000000000005", 5, RoundingMode.ROUND_UP, "94.881"); + t("89999386760685029044", 11, RoundingMode.ROUND_CEIL, "46.639481711"); + t("493", 14, RoundingMode.ROUND_HALF_DOWN, "6.8936553260019"); + t("5565555555555555555595.5655255555559", 17, RoundingMode.ROUND_FLOOR, "50.76403094346821"); + t("59999999999999999999999999999999999969.999999999999999999999999999", 2, RoundingMode.ROUND_HALF_UP, "88"); + t("527594720781512.43163112373214476666666666", 11, RoundingMode.ROUND_UP, "34.592496712"); + t("21", 13, RoundingMode.ROUND_FLOOR, "3.737102242198"); + t("3933604967702", 7, RoundingMode.ROUND_HALF_EVEN, "29.69372"); + t("400000000.000000000000000000000000000000005", 1, RoundingMode.ROUND_HALF_UP, "20"); + t("81138.56", 8, RoundingMode.ROUND_DOWN, "11.99706"); + t("33333333333333333.333333", 19, RoundingMode.ROUND_HALF_DOWN, "38.73848147279061225"); + t("754", 15, RoundingMode.ROUND_HALF_DOWN, "7.31853910882625"); + t("1854.13613026373033695347983285210097", 7, RoundingMode.ROUND_UP, "8.218322"); + t("36", 12, RoundingMode.ROUND_DOWN, "4.27647316194"); + t("25438994574049", 14, RoundingMode.ROUND_UP, "31.56045151272"); + t("81374.8649123536830012739613993141318574470909821274221525492674243872", 12, RoundingMode.ROUND_HALF_DOWN, "11.9999689"); + t("6348226.1207463", 13, RoundingMode.ROUND_DOWN, "16.35683316133"); + t("515771.3625286218471198636866006610274", 13, RoundingMode.ROUND_DOWN, "13.84656603095"); + t("20000000050000000000000000000.0000000060000000000005000000000000000000000000000000009", 8, RoundingMode.ROUND_DOWN, "65.858676"); + t("67250722715744897672930587456073962887591224237", 4, RoundingMode.ROUND_HALF_DOWN, "108.5"); + t("59999999999999699999999199999.99995999999999999999979999099999999999999", 19, RoundingMode.ROUND_HALF_EVEN, "66.95728925362127446"); + t("556.5", 6, RoundingMode.ROUND_FLOOR, "7.01481"); + t("41772704", 12, RoundingMode.ROUND_HALF_DOWN, "18.2409008504"); + t("9062980899032359103861773818870194606913914800000000000000000000", 17, RoundingMode.ROUND_DOWN, "147.96020612267854"); + t("9765558.55195555555", 13, RoundingMode.ROUND_HALF_UP, "16.7875195006"); + t("5", 17, RoundingMode.ROUND_UP, "2.2924316695611777"); + t("5241.59", 10, RoundingMode.ROUND_HALF_DOWN, "9.257527338"); + t("19384667.18102", 18, RoundingMode.ROUND_DOWN, "17.4731401406072814"); + t("3222222222222222600894057266144", 10, RoundingMode.ROUND_HALF_EVEN, "70.94077122"); + t("6000000", 19, RoundingMode.ROUND_DOWN, "16.30041720775226746"); + t("27844386714766.44444666666", 17, RoundingMode.ROUND_CEIL, "31.650799688319587"); + t("641875390333287539866278126167", 20, RoundingMode.ROUND_DOWN, "69.32733888019599383"); + t("9030000.000006", 13, RoundingMode.ROUND_DOWN, "16.70921010595"); + t("78", 8, RoundingMode.ROUND_HALF_EVEN, "5.0498149"); + t("3000000000", 13, RoundingMode.ROUND_UP, "22.51502530618"); + t("522276333.7777777777777777777333333", 13, RoundingMode.ROUND_DOWN, "20.76685456139"); + t("547.51002750772", 17, RoundingMode.ROUND_UP, "6.9985271231840144"); + t("56666666666666666.6666666666666666666666666", 8, RoundingMode.ROUND_DOWN, "39.269109"); + t("20783795783373318190658285827", 22, RoundingMode.ROUND_CEIL, "65.89711832561389428339"); + t("57493662.855", 28, RoundingMode.ROUND_UP, "18.56033246903643030590458284"); + t("2362.5", 32, RoundingMode.ROUND_FLOOR, "8.4606227951362609359503843479658"); + t("78158633908238185853457189410727460579757716", 23, RoundingMode.ROUND_UP, "101.76046161574730423851"); + t("442", 10, RoundingMode.ROUND_UP, "6.784455783"); + t("48867.638", 30, RoundingMode.ROUND_CEIL, "11.4900178372412032109872706908"); + t("681707021389209213540", 23, RoundingMode.ROUND_DOWN, "48.664278832591273859923"); + t("81300.174", 29, RoundingMode.ROUND_HALF_EVEN, "11.999050616277136117846286638"); + t("8253740684128450567625", 2, RoundingMode.ROUND_FLOOR, "51"); + t("5718408217", 14, RoundingMode.ROUND_HALF_DOWN, "23.160103500429"); + t("2279", 26, RoundingMode.ROUND_UP, "8.4246391616716920725623049"); + t("445462625.65868593268537434678710487", 29, RoundingMode.ROUND_FLOOR, "20.607771088893837681580476655"); + t("421111111111111111711111116111111111.91111141181111111511117111", 26, RoundingMode.ROUND_HALF_UP, "82.72135197010370553248049"); + t("6363147631159", 30, RoundingMode.ROUND_DOWN, "30.174691461972276712796663461"); + t("82222222227930600001148491445484369425724116611111111111", 39, RoundingMode.ROUND_HALF_DOWN, "129.442167811169834517629373803410924838"); + t("2395606649221.9", 24, RoundingMode.ROUND_HALF_EVEN, "29.1978047934905326604021"); + t("285.2774428848831159151305", 30, RoundingMode.ROUND_HALF_UP, "6.34660629920663772981413954482"); + t("43493", 12, RoundingMode.ROUND_HALF_DOWN, "11.373502465"); + t("2300000000.000000000006", 7, RoundingMode.ROUND_HALF_UP, "22.24932"); + t("21", 9, RoundingMode.ROUND_CEIL, "3.73710225"); + t("6", 29, RoundingMode.ROUND_HALF_UP, "2.4778887302884750048139507451"); + t("9455555555555555555555.1174413511718437477325149994749035890609339739117616771743245793037554", 12, RoundingMode.ROUND_HALF_EVEN, "51.2940365917"); + t("8060209938624425679089226", 37, RoundingMode.ROUND_DOWN, "58.04212901557209726301936643403738545"); + t("855555555555555555555.5555555555555555555555555575555555555535555555555", 18, RoundingMode.ROUND_HALF_UP, "48.8914298849583235"); + t("900", 40, RoundingMode.ROUND_CEIL, "7.495541635242137861700342505711552690807"); + t("37.62", 12, RoundingMode.ROUND_CEIL, "4.32050631218"); + t("7899999999999999999999999799999999.99996", 34, RoundingMode.ROUND_UP, "78.74531800883642869216590418752279"); + t("6228813", 7, RoundingMode.ROUND_HALF_DOWN, "16.33784"); + t("4692379381873326605192095142687652329126673142739786727032", 13, RoundingMode.ROUND_CEIL, "133.486437266"); + t("50806000000000000000000000000000000000000000000000800000000000000.0000000000000000000000000000005", 13, RoundingMode.ROUND_CEIL, "149.6840224971"); + t("655220909203068791644856.0666770845209662883483914904", 39, RoundingMode.ROUND_HALF_EVEN, "55.5324065781676613121205192374047441786"); + t("4.69754954696457222410850721701", 34, RoundingMode.ROUND_HALF_DOWN, "2.228661511423570498229774094059837"); + t("744444444444.44311617171", 35, RoundingMode.ROUND_CEIL, "28.029051245549192726247762477982657"); + t("599.666572", 40, RoundingMode.ROUND_HALF_DOWN, "7.089520272759238082142051507835946883525"); + t("26913093827328008876685631162519080431049132420236425548348598622436420025896", 29, RoundingMode.ROUND_DOWN, "176.67964208267247065948406295"); + t("399899949999999.99399991", 21, RoundingMode.ROUND_HALF_UP, "34.3153826873100005485"); + t("966666666666393982829571662824767733333333333333333333.185933749269", 1, RoundingMode.ROUND_CEIL, "200"); + t("283965108696842854259", 12, RoundingMode.ROUND_HALF_DOWN, "47.7885302284"); + t("4.0000000000000000000900000000100008", 21, RoundingMode.ROUND_FLOOR, "2.06343706889556054675"); + t("455.44", 9, RoundingMode.ROUND_FLOOR, "6.81440995"); + t("7486693", 37, RoundingMode.ROUND_DOWN, "16.52178491652441950043043482511510107"); + t("2554441762861809", 35, RoundingMode.ROUND_HALF_UP, "36.169757287137583718978264152800537"); + t("58812222222212262222222.2222292222", 24, RoundingMode.ROUND_UP, "53.1217838276613748739474"); + t("899.99991", 33, RoundingMode.ROUND_HALF_DOWN, "7.49554153524207113323853218901942"); + t("87771666666666666.44444444444444444444577479428478034853138996354979748322222222222", 38, RoundingMode.ROUND_CEIL, "39.706662320918711491721449735597665395"); + t("7683.31488245447708474", 30, RoundingMode.ROUND_HALF_EVEN, "9.63995353466294761318164419226"); + t("2543430714794751207109390536104751", 23, RoundingMode.ROUND_UP, "77.611969094168832202415"); + t("948668.36781935465387262136170388", 7, RoundingMode.ROUND_HALF_UP, "14.45596"); + t("5.5555557", 16, RoundingMode.ROUND_UP, "2.399745410046718"); + t("202", 24, RoundingMode.ROUND_FLOOR, "6.00140875105453306775285"); + t("654", 30, RoundingMode.ROUND_HALF_EVEN, "7.17625394751663622557455779756"); + t("7.15", 11, RoundingMode.ROUND_DOWN, "2.6553330563"); + t("23192105636911.1", 13, RoundingMode.ROUND_DOWN, "31.46798024298"); + t("18715015583280969971394525473508147066666666666666666", 25, RoundingMode.ROUND_DOWN, "121.0543130972749427798072"); + t("850784888488885988888888.882888888888888", 21, RoundingMode.ROUND_FLOOR, "55.7935934550716151588"); + t("555551624764.77777777777777744444444444444", 9, RoundingMode.ROUND_HALF_EVEN, "27.7363746"); + t("977.731658", 25, RoundingMode.ROUND_FLOOR, "7.578382173105494277554113"); + t("513359999999999999999.949999", 24, RoundingMode.ROUND_HALF_UP, "48.3806562078950275014831"); + t("475214225368504435743900", 32, RoundingMode.ROUND_FLOOR, "55.211199836575062578332207259495"); + t("4000000", 3, RoundingMode.ROUND_HALF_DOWN, "15.9"); + t("1.2", 35, RoundingMode.ROUND_HALF_UP, "0.62236250371477866780685115857913059"); + t("7510918801207835413135591963200120055425848503007753019336896436217399685954597393612788", 29, RoundingMode.ROUND_FLOOR, "203.03440807303735710363524384"); + t("7.239741491578", 25, RoundingMode.ROUND_FLOOR, "2.667928457894097454723437"); + t("708983541860", 30, RoundingMode.ROUND_HALF_EVEN, "27.9802453305955703036220800107"); + t("5694816766.3", 3, RoundingMode.ROUND_FLOOR, "23.1"); + t("3000000000000000000000000000000000000000000000", 24, RoundingMode.ROUND_CEIL, "105.408088653960110781623"); + t("80000.000075351079395133171776466666666666666", 21, RoundingMode.ROUND_HALF_DOWN, "11.9829290951187899658"); + t("65799982.880001", 13, RoundingMode.ROUND_CEIL, "18.69527731668"); + t("3888888888888888431602193181777652527777777777.72522847176624010024756017", 12, RoundingMode.ROUND_HALF_EVEN, "105.667599849"); + t("32", 13, RoundingMode.ROUND_FLOOR, "4.158638853279"); + t("1274002927.1", 38, RoundingMode.ROUND_UP, "21.658576872220407661971685810438407436"); + t("889999999999999999999.99", 32, RoundingMode.ROUND_HALF_DOWN, "48.930900317178953144076874065176"); + t("7.95286990705358103646", 1, RoundingMode.ROUND_HALF_EVEN, "3"); + t("510870725873133.851844190063817705987041725973", 4, RoundingMode.ROUND_CEIL, "34.57"); + t("2309.766666666466666666665", 7, RoundingMode.ROUND_HALF_UP, "8.438049"); + t("61000081.0000005", 32, RoundingMode.ROUND_HALF_EVEN, "18.619532930565509633753111279232"); + t("581514", 26, RoundingMode.ROUND_CEIL, "13.96653750687662802604073"); + t("15567000600000000002.007", 4, RoundingMode.ROUND_CEIL, "44.89"); + t("3287841070", 23, RoundingMode.ROUND_HALF_DOWN, "22.606644157157353879532"); + t("70600", 10, RoundingMode.ROUND_FLOOR, "11.8579326"); + t("7.248088765792676", 8, RoundingMode.ROUND_DOWN, "2.6690919"); + t("527777204469", 5, RoundingMode.ROUND_HALF_UP, "27.685"); + t("605452.850565230629731348", 37, RoundingMode.ROUND_CEIL, "14.006879150906810214375519545924622"); + t("5", 38, RoundingMode.ROUND_CEIL, "2.2924316695611776878007873113480154317"); + t("1.4", 31, RoundingMode.ROUND_CEIL, "0.8670147264905651039505202695015"); + t("75555575516595912104851575982414976543346266", 21, RoundingMode.ROUND_DOWN, "101.726589571334002153"); + t("2735555.5555585552728555", 21, RoundingMode.ROUND_FLOOR, "15.5149922819453706406"); + t("103268717.69665038139", 2, RoundingMode.ROUND_DOWN, "19"); + t("93552555555555555.555555555255", 11, RoundingMode.ROUND_CEIL, "39.770446946"); + t("3626666666666.06666266666666666666666666666", 15, RoundingMode.ROUND_HALF_UP, "29.612482249248"); + t("42222222222222807736331954584326257", 34, RoundingMode.ROUND_FLOOR, "80.42140192474767882010415168976016"); + t("13.332313159866168469878581", 7, RoundingMode.ROUND_CEIL, "3.281929"); + t("68888188.8988", 23, RoundingMode.ROUND_HALF_UP, "18.741142478029060806198"); + t("66355565555558.55558555", 29, RoundingMode.ROUND_HALF_DOWN, "32.519195935520625293459012293"); + t("21847734193912439", 38, RoundingMode.ROUND_DOWN, "38.31602079341608733151211885202759983"); + t("14663131522875", 23, RoundingMode.ROUND_DOWN, "31.009504580154385854738"); + t("610", 40, RoundingMode.ROUND_UP, "7.10660546586422256259205731286867392587"); + t("78042586050836434.29", 2, RoundingMode.ROUND_HALF_DOWN, "40"); + t("5466.666", 29, RoundingMode.ROUND_CEIL, "9.2995713753873400986219378863"); + t("90.03908", 1, RoundingMode.ROUND_HALF_DOWN, "5"); + t("6444444455555555.4494348809681611111111111111", 23, RoundingMode.ROUND_HALF_UP, "37.095142010404968436578"); + t("71085100", 23, RoundingMode.ROUND_UP, "18.772535489377438272718"); + t("36000.00008000003", 16, RoundingMode.ROUND_FLOOR, "11.18442140002751"); + t("11893037", 40, RoundingMode.ROUND_DOWN, "16.98461084133822739880630108970024046177"); + t("396645173988888888888888888.99999999", 23, RoundingMode.ROUND_UP, "61.938231525165254827578"); + t("56500000080030.0003", 21, RoundingMode.ROUND_DOWN, "32.358408936057348958"); + t("4316321611057467.45598", 34, RoundingMode.ROUND_UP, "36.69432713609067955868915699108864"); + t("47573032886666666666666", 35, RoundingMode.ROUND_FLOOR, "52.909700198135726624393228043153839"); + t("25505073629437392980342296549044.1316504395405246012733400255242", 12, RoundingMode.ROUND_FLOOR, "73.0095773686"); + t("5.81", 36, RoundingMode.ROUND_HALF_DOWN, "2.44523802683985658743286515936458208"); + t("710287", 2, RoundingMode.ROUND_DOWN, "14"); + t("29918", 17, RoundingMode.ROUND_HALF_DOWN, "10.999362765215049"); + t("15098745939089136", 36, RoundingMode.ROUND_HALF_EVEN, "37.9465352654511865526984995938866965"); + t("7", 38, RoundingMode.ROUND_HALF_EVEN, "2.6339157938496334172500926946159368881"); + t("9.8", 24, RoundingMode.ROUND_HALF_DOWN, "2.9729162609330438353561"); + t("7104020327231710192222222.8715208", 2, RoundingMode.ROUND_HALF_UP, "58"); + t("89999991863333333333.9", 25, RoundingMode.ROUND_FLOOR, "46.63948843437562119439854"); + t("64062501.5856370106479309595347923", 29, RoundingMode.ROUND_DOWN, "18.668516932608353357172244893"); + t("60000000.00000000010000010000030000000000090000000000000000000050000000000000005", 23, RoundingMode.ROUND_HALF_EVEN, "18.603002300746320030578"); + t("350095309000.04", 1, RoundingMode.ROUND_HALF_DOWN, "30"); + t("1700", 40, RoundingMode.ROUND_DOWN, "8.131530624099051221559980534496351033572"); + t("25800000", 9, RoundingMode.ROUND_HALF_EVEN, "17.7590322"); + t("111111.4", 3, RoundingMode.ROUND_FLOOR, "12.3"); + t("2006899459785102405616918445435405.22228115531599", 35, RoundingMode.ROUND_HALF_EVEN, "77.375046223147135058707859637650197"); + t("603299714.621", 11, RoundingMode.ROUND_UP, "20.911071851"); + t("19999999999999999699999999999999999999999999999997999999999.6", 8, RoundingMode.ROUND_HALF_EVEN, "134.93623"); + t("9676877.9999999999991", 1, RoundingMode.ROUND_CEIL, "20"); + t("2.3876", 19, RoundingMode.ROUND_UP, "1.516377988855881991"); + t("8.2040544391860208424426138336", 30, RoundingMode.ROUND_HALF_DOWN, "2.79404043833071443023764808272"); + t("444.2222222222244444418527113548", 33, RoundingMode.ROUND_DOWN, "6.7894708513900939219741556360654"); + t("155555555963333333333333.7", 32, RoundingMode.ROUND_HALF_UP, "54.094437074323463841555759884423"); + t("71483.17269060631716468", 34, RoundingMode.ROUND_UP, "11.87036453451014464767309772125707"); + t("81055245093630003669331307380188344709542996668713059671339999999999", 19, RoundingMode.ROUND_HALF_DOWN, "157.0588942785500158"); + t("174909999.999", 37, RoundingMode.ROUND_DOWN, "19.67292929443747395640583835855643387"); + t("72389726667648937978.95830476", 19, RoundingMode.ROUND_FLOOR, "46.42174324692044937"); + t("130331539707084054280229937028032408765495183123", 19, RoundingMode.ROUND_CEIL, "109.1795578746763325"); + t("2389.75708170159", 20, RoundingMode.ROUND_FLOOR, "8.4720941370888186499"); + t("400000000000000.00007", 33, RoundingMode.ROUND_FLOOR, "34.315632843596475504678576729954"); + t("85432282404487044444444444444444", 39, RoundingMode.ROUND_DOWN, "74.2184240138505726220714669889583672213"); + t("955637601125390730411111111111111111.38922", 30, RoundingMode.ROUND_CEIL, "83.5408340122257834914502291611"); + t("593568266996", 21, RoundingMode.ROUND_HALF_EVEN, "27.8025652493658771352"); + t("31994628083219964815323947873588354325896483161322064035639786789", 32, RoundingMode.ROUND_HALF_EVEN, "149.22157605549302547006587180157"); + t("72005172621424", 23, RoundingMode.ROUND_FLOOR, "32.600906254888260731124"); + t("939999999999999", 12, RoundingMode.ROUND_HALF_DOWN, "35.1700481718"); + t("838499999899919999999999999991.9996959999999999999999099", 30, RoundingMode.ROUND_CEIL, "69.5945592725430863265558566044"); + t("9916665566666.6666", 5, RoundingMode.ROUND_DOWN, "30.618"); + t("5.36759", 12, RoundingMode.ROUND_DOWN, "2.36473379388"); + t("1680000000", 16, RoundingMode.ROUND_CEIL, "21.93520681092153"); + t("94754530764046933.603934", 26, RoundingMode.ROUND_HALF_EVEN, "39.7832132363801229723966"); + t("78.66666666666666666666", 18, RoundingMode.ROUND_UP, "5.05832629659506946"); + t("3177531972", 33, RoundingMode.ROUND_CEIL, "22.5725178035356333977594690856642"); + t("43", 35, RoundingMode.ROUND_HALF_DOWN, "4.4542120606027113335780195417851821"); + t("16666666666636666666660666666666666666666666.66666668666666666666661", 25, RoundingMode.ROUND_UP, "100.2151318030681004053961"); + t("99906891879943737715", 34, RoundingMode.ROUND_HALF_UP, "46.74391752551495210415801805458335"); + t("52.786", 25, RoundingMode.ROUND_UP, "4.659303449785841695619066"); + t("734557015475.92555555555", 6, RoundingMode.ROUND_CEIL, "28.0157"); + t("70050000000000000000000000000000", 20, RoundingMode.ROUND_UP, "74.01990924316433184"); + t("97966954933.201", 21, RoundingMode.ROUND_HALF_DOWN, "26.0010432447548866219"); + t("220", 8, RoundingMode.ROUND_CEIL, "6.0867696"); + t("443786303", 1, RoundingMode.ROUND_HALF_EVEN, "20"); + t("2658.7112219", 26, RoundingMode.ROUND_CEIL, "8.5787439265140948747775106"); + t("313.371", 6, RoundingMode.ROUND_UP, "6.44054"); + t("60084724496857256894441.8529363741447990955344106873326611", 31, RoundingMode.ROUND_FLOOR, "53.14318977456434289121348040513"); + t("8828.47889", 11, RoundingMode.ROUND_HALF_DOWN, "9.77888519"); + t("30", 25, RoundingMode.ROUND_DOWN, "4.09406666863208512766772"); + t("2747.1726076", 9, RoundingMode.ROUND_HALF_UP, "8.61147467"); + t("26014495379288528098", 7, RoundingMode.ROUND_HALF_UP, "45.39833"); + t("9171761155525466666666", 13, RoundingMode.ROUND_UP, "51.26356345749"); + t("8938338345188.2228888888", 44, RoundingMode.ROUND_CEIL, "30.514518000969814699923641606764039527375296"); + t("768282499898726855", 39, RoundingMode.ROUND_DOWN, "41.8760810793921410281161108738756248606"); + t("48815741324.5300828046569472", 77, RoundingMode.ROUND_FLOOR, "25.304465846477161630573234169214391160850523010870967883563157200984307414098"); + t("24196444.0454544", 70, RoundingMode.ROUND_HALF_EVEN, "17.69486342061960114953535208586209672585965472913061773781996208605337"); + t("847317015401917", 8, RoundingMode.ROUND_HALF_EVEN, "35.066243"); + t("5999999999999999999999999999999999.9999999999929994999990999999999999999999999999", 38, RoundingMode.ROUND_HALF_EVEN, "78.470214718591507882823427484422897692"); + t("776777777777.222222222222222222226", 58, RoundingMode.ROUND_CEIL, "28.07156732668140703729803192141364600386912754974132216043"); + t("889112.0000000000000000900000090000000000009", 74, RoundingMode.ROUND_CEIL, "14.391125671372289803097018465974313403559190631839978724405376819075811612"); + t("832171411221867614626497877784504", 70, RoundingMode.ROUND_HALF_DOWN, "76.49473841308588563157657646059722500813066544405616857779969740991285"); + t("745606001360", 40, RoundingMode.ROUND_CEIL, "28.03061032987967935486003117349283469885"); + t("44840460835121811098.97", 13, RoundingMode.ROUND_HALF_DOWN, "45.94278972993"); + t("3943797154951.7025503782406", 52, RoundingMode.ROUND_UP, "29.69631230060596956901470095466552588852734350192919"); + t("8", 61, RoundingMode.ROUND_UP, "2.768659383313573832732001409383745519872057893445600633657278"); + t("339258006.28206206542", 65, RoundingMode.ROUND_UP, "20.335418636907848295370352390759348271696383638466727072541405726"); + t("954929080435.6733181587", 15, RoundingMode.ROUND_HALF_UP, "28.2780500939057"); + t("81288.20178584267212558629630013", 56, RoundingMode.ROUND_UP, "11.998903346041831701460193148216002753365781699052918708"); + t("1542406580719.555555555", 41, RoundingMode.ROUND_UP, "28.757512207898890957091145657301885474088"); + t("2000000000000000000000000000000000000000000000000000000000000000000", 71, RoundingMode.ROUND_DOWN, "153.35691049872690576402190025208439083782369851821952692644100148284657"); + t("700002000000000000000000800610000000000000000000000000000.74", 73, RoundingMode.ROUND_FLOOR, "131.5838253944205924375087108307003662777373304206388002806269900674853124"); + t("170.6", 48, RoundingMode.ROUND_HALF_DOWN, "5.83246022572854424522995950984825372202265097044"); + t("61630992031693693681645018448018518909067573434757061", 54, RoundingMode.ROUND_DOWN, "122.246151784672251162106251252548556474750670747320834"); + t("20000000000.200000000000000000000000000000000000000000000000000000000000000000002", 54, RoundingMode.ROUND_CEIL, "24.4121452910703474590137037897600080454953477124040737"); + t("5301.662", 39, RoundingMode.ROUND_HALF_UP, "9.26892280695396343092210195195345376548"); + t("379161.4324826016075607712124988714457228279287", 22, RoundingMode.ROUND_DOWN, "13.5388645171605667375"); + t("869599.94699999999999999", 14, RoundingMode.ROUND_HALF_EVEN, "14.368935734401"); + t("5.58406697", 48, RoundingMode.ROUND_HALF_UP, "2.40494886749449615751276287848939832547789093282"); + t("120150229357.68498888138999733859", 9, RoundingMode.ROUND_HALF_EVEN, "26.2051559"); + t("19.29995819", 64, RoundingMode.ROUND_CEIL, "3.652578271585085623824201600249540414914865550792071747379834773"); + t("99999999999999999999999999.99999999999999999999999999999999999299999999999999999999", 68, RoundingMode.ROUND_DOWN, "60.56035959840513309388500994325164596570413883870835260598720536465"); + t("86.669366661666666666816", 8, RoundingMode.ROUND_UP, "5.1552144"); + t("5222222222222222228775239777", 46, RoundingMode.ROUND_HALF_DOWN, "64.51586771577301798318829474265036651467219809"); + t("808428236065003", 68, RoundingMode.ROUND_HALF_UP, "35.019260209741728798666680318306137040311907110272455193244463656411"); + t("566666666666666286666666666666666666.88888888823975903074522705594997258464", 63, RoundingMode.ROUND_HALF_EVEN, "83.0182264907396499683129871222436527623327347014182884855456321"); + t("45.427", 76, RoundingMode.ROUND_FLOOR, "4.50913265368539261256037479084466170954947062088782553263541261759886882346"); + t("98681285", 28, RoundingMode.ROUND_HALF_UP, "19.10055305198952520533436779"); + t("27090492777342226402359540019471962362608942221246364236930491603820341", 18, RoundingMode.ROUND_CEIL, "162.87070144345874"); + t("4222222222222222253007249141104988", 34, RoundingMode.ROUND_HALF_UP, "78.11881683175361927593790979159436"); + t("299.999981876999999999", 20, RoundingMode.ROUND_HALF_UP, "6.3969268170164570069"); + t("96548651750771140561", 3, RoundingMode.ROUND_HALF_DOWN, "46.7"); + t("399999999999999999999999999999999999999999999999999999999999999.99999999999999999999999999999999999954", 50, RoundingMode.ROUND_HALF_EVEN, "144.83971730731066833736716655480511057549479269806"); + t("5.929358078871196868", 53, RoundingMode.ROUND_HALF_EVEN, "2.4658751678685554076646546249382756046731256573231434"); + t("68071814409707382348764390068978504613223487.29635432163018324", 14, RoundingMode.ROUND_UP, "101.62228432848"); + t("823636064", 13, RoundingMode.ROUND_CEIL, "21.22238650097"); + t("9429403", 36, RoundingMode.ROUND_HALF_DOWN, "16.752490524575901750367433411572786"); + t("50176000859", 79, RoundingMode.ROUND_UP, "25.33194985935403749177354968558409920023699512930684100128798387958355811421296"); + t("60004000000000000000000000000000", 28, RoundingMode.ROUND_DOWN, "73.86511119704795971972597953"); + t("5577537924897616428.0333333333", 22, RoundingMode.ROUND_HALF_EVEN, "43.85842630137726068627"); + t("855777774777777777777787771776777777777777777777777777.7777777778", 66, RoundingMode.ROUND_DOWN, "124.876997656789327040025905039163683669487035160398019813093899339"); + t("347681479.7979158226693500931831", 59, RoundingMode.ROUND_DOWN, "20.359944511229896065805264676838175661585870668054507001072"); + t("16466.66666666666663666656066662", 65, RoundingMode.ROUND_HALF_EVEN, "10.402240594145854372965969489848271000860777549055628692117392922"); + t("7977777.777779777777777777777776777777777777777777777777777777777771", 61, RoundingMode.ROUND_UP, "16.5853176372424252975187065748869421157994967318462801359976"); + t("4956192265692501357", 15, RoundingMode.ROUND_HALF_UP, "43.7403166119975"); + t("333643027314494671423.5096704", 73, RoundingMode.ROUND_HALF_UP, "47.94975049538078976184014550104194248141114283427163379251530131791574901"); + t("59.8768767098533", 27, RoundingMode.ROUND_HALF_EVEN, "4.78536784197059742937982664"); + t("21.568132", 21, RoundingMode.ROUND_DOWN, "3.76382618031436466644"); + t("99321349251378983965415", 67, RoundingMode.ROUND_HALF_EVEN, "53.64579467887364570944440763695096025805043724873491849399005863274"); + t("654904834245", 79, RoundingMode.ROUND_HALF_DOWN, "27.90090295135680768232157402030518366169815855407448261109534752236526730032983"); + t("60007.096700204", 25, RoundingMode.ROUND_CEIL, "11.6953652930371574027332"); + t("21622558.0697507661", 24, RoundingMode.ROUND_DOWN, "17.5823948633360122508469"); + t("1400000000", 6, RoundingMode.ROUND_CEIL, "21.7529"); + t("3720826.22151497", 14, RoundingMode.ROUND_DOWN, "15.822603484705"); + t("4376817990679715433746665069090469860.45237247251976642992911992857763899012079", 45, RoundingMode.ROUND_HALF_UP, "85.0625325025688222279975128668465676255112089"); + t("649400", 17, RoundingMode.ROUND_HALF_UP, "14.076951319210235"); + t("539.989994", 74, RoundingMode.ROUND_UP, "6.984696932945263884457779873213006707301547394563950394559247304351619527"); + t("634824734.659130806326200685838625713", 31, RoundingMode.ROUND_CEIL, "20.96200669090876172776908344965"); + t("100500000.00040800040009000007", 41, RoundingMode.ROUND_FLOOR, "19.11881546602740953589492748233514372087"); + t("970257912536908892148386809813.79782283132588447580592664", 7, RoundingMode.ROUND_UP, "69.74051"); + t("111111111111111111112735802", 4, RoundingMode.ROUND_CEIL, "60.67"); + t("7.1458635582181542814702778", 24, RoundingMode.ROUND_HALF_DOWN, "2.65474861802689656638805"); + t("26503642236033.4444444444444427408888", 48, RoundingMode.ROUND_HALF_DOWN, "31.6014504629054508476238153915057904225072357905"); + t("866666666666668292340", 62, RoundingMode.ROUND_DOWN, "48.90433328979423321962945861816774784187515621001922463727794"); + t("4.161649742730688095", 14, RoundingMode.ROUND_DOWN, "2.1043010448258"); + t("4804.47740517416093971868618377927298887716668566920024163162448153376544398464", 46, RoundingMode.ROUND_DOWN, "9.170450724589264830449798143054033639278108396"); + t("200.9432687359", 80, RoundingMode.ROUND_HALF_DOWN, "5.9961636121676812248757832499215794759139877290930275985873863239952961856829968"); + t("1229333333333333333333", 63, RoundingMode.ROUND_HALF_UP, "49.2539061504611423769699834768286424536734290025054557740893388"); + t("677777777777777723487509694344575868233120178292237795387378888888888888888888888.8", 26, RoundingMode.ROUND_FLOOR, "186.81360390692069181671705"); + t("231.035", 25, RoundingMode.ROUND_UP, "6.135711711072862859353363"); + t("6258384523.4", 28, RoundingMode.ROUND_DOWN, "23.25033510595965370247864387"); + t("469358438219159270715646506", 29, RoundingMode.ROUND_CEIL, "62.106556149560129546986427449"); + t("999999999999999999999999999999999999999999999999999.999999999999999999999999", 20, RoundingMode.ROUND_HALF_DOWN, "118.12498692325627519"); + t("70000000", 15, RoundingMode.ROUND_HALF_UP, "18.7571529805736"); + t("17436335918609123305289280.1187313", 6, RoundingMode.ROUND_HALF_DOWN, "58.8137"); + t("7", 42, RoundingMode.ROUND_FLOOR, "2.63391579384963341725009269461593688805396"); + t("7793427761562210468702986164870463604186321815608664487325403737901864", 23, RoundingMode.ROUND_UP, "161.62479938099071129233"); + t("5", 7, RoundingMode.ROUND_HALF_DOWN, "2.292432"); + t("322262222422222222622222222222322.22222222222221222222222222222222922222229", 36, RoundingMode.ROUND_UP, "75.546065539866833584196614245638605"); + t("9444711979", 61, RoundingMode.ROUND_DOWN, "23.66186802344748161179198590267900452850055784980761728579321"); + t("1000000000000001.64297469833894830805290421111111", 33, RoundingMode.ROUND_HALF_UP, "35.2319235754706322126618022806703"); + t("76.1142654", 46, RoundingMode.ROUND_FLOOR, "5.025339728353915415325732669653160002326598441"); + t("588888888088.488", 11, RoundingMode.ROUND_DOWN, "27.794650538"); + t("2841771514127", 80, RoundingMode.ROUND_HALF_DOWN, "29.368595926776285890263220170460817227897508216809699750500566425671184125203302"); + t("161717494675.88749", 36, RoundingMode.ROUND_CEIL, "26.5022639704194248262716004162930028"); + t("889427842999.5999909949999", 10, RoundingMode.ROUND_HALF_DOWN, "28.2069914"); + t("922222222222224881308159942236950279691100312607497180570459854888888888888", 50, RoundingMode.ROUND_HALF_UP, "173.30606009257970735077977904527010368793549799723"); + t("720.7777777771758442355944444444444444", 1, RoundingMode.ROUND_HALF_UP, "7"); + t("633333033333333333333303333.3333833333333333333333333334333333332", 66, RoundingMode.ROUND_HALF_EVEN, "62.4061858152191411477818764090316204442766891038295114613682814615"); + t("80.29", 59, RoundingMode.ROUND_HALF_EVEN, "5.0787534776710317707128482336541142608868065104362104839446"); + t("24366793404928330068408", 18, RoundingMode.ROUND_UP, "52.2406554128056494"); + t("54966664666666663661666666666666264566666.6666666666", 1, RoundingMode.ROUND_HALF_EVEN, "90"); + t("3233.333333332333338333336333333392", 60, RoundingMode.ROUND_UP, "8.77441603246972514919714362545736405823779576428779256154367"); + t("5999999.999999999", 52, RoundingMode.ROUND_FLOOR, "16.30041720775226730322654709675928630862732081540597"); + t("3580000.000000000070900000300000020006000006", 8, RoundingMode.ROUND_FLOOR, "15.78402"); + t("2111111111114.46480156173191", 43, RoundingMode.ROUND_FLOOR, "29.07138269832030318506511717517815427822474"); + t("210.30999264505718020566509119828496051908", 9, RoundingMode.ROUND_HALF_UP, "6.04172413"); + t("27777777777724015343367898444444444444.4911", 4, RoundingMode.ROUND_DOWN, "86.91"); + t("1768699.984839", 47, RoundingMode.ROUND_HALF_UP, "15.078902543410917971144758198395829337884732221"); + t("4183405755555555555555.22222222222244523661768913305579351770136738888", 6, RoundingMode.ROUND_HALF_UP, "50.4786"); + t("90809.371593336083980845799", 47, RoundingMode.ROUND_DOWN, "12.109664951173438790433935608614379576287358092"); + t("8439548544689", 65, RoundingMode.ROUND_HALF_UP, "30.45709711369996173513309931961257455186125867905743707351375417"); + t("2778", 16, RoundingMode.ROUND_HALF_EVEN, "8.622633671479416"); + t("4.31371111911111511", 64, RoundingMode.ROUND_HALF_DOWN, "2.141231626768932091343370714625890127680274889507801990791119695"); + t("64.5850595040297407051027231423699896933299141512480951316", 79, RoundingMode.ROUND_HALF_EVEN, "4.861070347822366991687571506968334346498441351210607148535245277843121748913689"); + t("43.09", 1, RoundingMode.ROUND_UP, "5"); + t("14444443111111111.88888899934907761444444444444444", 67, RoundingMode.ROUND_HALF_UP, "37.90223335628229709276665937412252746880024738190824212662729033445"); + t("82526.540452715118290567661", 77, RoundingMode.ROUND_UP, "12.014022403568023068029230059363917254352687452887254008714619978286115304391"); + t("6", 50, RoundingMode.ROUND_HALF_DOWN, "2.4778887302884750048139507450745054494563976572947"); + t("463790300.0002", 40, RoundingMode.ROUND_HALF_EVEN, "20.6480902489402276252595479201292900649"); + t("144300158827924999999999", 23, RoundingMode.ROUND_UP, "54.019329699892745043947"); + t("825725702992510270.63874086554285", 17, RoundingMode.ROUND_FLOOR, "41.948186215139705"); + t("83932044187438299450749", 4, RoundingMode.ROUND_FLOOR, "53.47"); + t("638800000060000000000000000000000000020000000.064", 67, RoundingMode.ROUND_HALF_DOWN, "103.8613125027446475182528756196765027947814643463271024675988525447"); + t("7000000000000000000000000000000", 43, RoundingMode.ROUND_FLOOR, "71.71661011943662913506232850543228252574562"); + t("85173153778518767096017630289679076579476302841422222222222", 48, RoundingMode.ROUND_HALF_EVEN, "136.385183768906229098787163097875767409283061206"); + t("11111111148525296.555555590706161111", 57, RoundingMode.ROUND_DOWN, "37.6398691874897792392633234000198068788836986608908055392"); + t("529999999.99999799999998999999999999", 65, RoundingMode.ROUND_CEIL, "20.781534745070383157212720474954530347548453760686643047125313706"); + t("280269539408.486852858883956009016751", 15, RoundingMode.ROUND_CEIL, "27.0521647983788"); + t("58052400244.68488287", 76, RoundingMode.ROUND_HALF_UP, "25.47775907267977860456091179429799292836751261391568303518790151302720970567"); + t("21525861401744686345122338136290015086146124444444444444444", 17, RoundingMode.ROUND_CEIL, "135.00975254939772"); + t("186847280228837293086025099723488561533351172374", 12, RoundingMode.ROUND_FLOOR, "109.539767965"); + t("981576085965865", 31, RoundingMode.ROUND_HALF_UP, "35.21332782728796600816634880236"); + t("84371000", 39, RoundingMode.ROUND_HALF_EVEN, "18.9438814791857392108713630135372588033"); + t("76525380797426132572999.5555555555555", 65, RoundingMode.ROUND_HALF_EVEN, "53.385056594371950157998197281363587992459600288618078132426815225"); + t("59.757126901528", 39, RoundingMode.ROUND_UP, "4.78336562550900011129477724795249387493"); + t("796.66", 60, RoundingMode.ROUND_DOWN, "7.37357477467404924870168825135914472931756383657102939159157"); + t("10167656724507185887010784388542621885443670453789321", 7, RoundingMode.ROUND_DOWN, "120.4441"); + t("62.478512452", 63, RoundingMode.ROUND_DOWN, "4.82790582723873276594995284956211159215367329801430003205397668"); + t("88.5205000000000000000000005", 57, RoundingMode.ROUND_HALF_DOWN, "5.17634943811526589480603012710958575744376529215619151757"); + t("42531267340930412687856751439255.3", 54, RoundingMode.ROUND_HALF_EVEN, "73.5209394779550686401613113000309464743306618089382804"); + t("778.5932633849243297627430147225601360664389789994", 57, RoundingMode.ROUND_FLOOR, "7.35063555108293761259064192862131692115181005254366689253"); + t("4333333333333333333348300838", 29, RoundingMode.ROUND_DOWN, "64.329281760192605822564697642"); + t("8004194091", 43, RoundingMode.ROUND_HALF_DOWN, "23.496378683184209935442495315385822870438"); + t("8113000000.806", 75, RoundingMode.ROUND_CEIL, "23.5098807310186311548566408132789930195928276516447363276058594016180615654"); + t("862.93288", 52, RoundingMode.ROUND_DOWN, "7.453483757689003433460872521310871353021728319575152"); + t("3700070000000001000000000000000000000000000", 40, RoundingMode.ROUND_FLOOR, "98.71007282470000149833250629738477932392"); + t("860600", 56, RoundingMode.ROUND_DOWN, "14.358532279946244074320350077249431415699277591579624988"); + t("373", 40, RoundingMode.ROUND_HALF_DOWN, "6.61472380330538712734069807905030986175"); + t("37885.00861585094722419", 52, RoundingMode.ROUND_FLOOR, "11.23545794217237835850752954036613313974320593251109"); + t("47771213299999999999999999999", 61, RoundingMode.ROUND_HALF_DOWN, "66.7293679172643544145090352620235764612720414362631857184773"); + t("244.4444444444", 64, RoundingMode.ROUND_CEIL, "6.192131058659396231924168116235525417323685573155993373447452911"); + t("30000000000000000000000000000000000000000000000000000000000000000000000.00000000000000000000003", 39, RoundingMode.ROUND_HALF_UP, "162.972715978811252882071879186286196805"); + t("729122", 34, RoundingMode.ROUND_DOWN, "14.19274353008611935938471721174377"); + t("893", 15, RoundingMode.ROUND_CEIL, "7.48773344793663"); + t("8752", 80, RoundingMode.ROUND_HALF_DOWN, "9.7701847019578938140306269651060199976048821340893142682307303476558056686812564"); + t("6804", 60, RoundingMode.ROUND_HALF_EVEN, "9.5184131286754783199219005857614557711174088445710501106427"); + t("69428256478096947251996885410371373340", 54, RoundingMode.ROUND_UP, "87.8265044668567747267894700541159337196332013668502918"); + t("40.2", 58, RoundingMode.ROUND_UP, "4.386859441133728137729739969457164287983748198530264406331"); + t("59999999.9990999999999999999999", 15, RoundingMode.ROUND_DOWN, "18.6030023007313"); + t("689457892092807603121002663482554287", 55, RoundingMode.ROUND_HALF_DOWN, "83.21436087452572303874062224859754091950298971441110094"); + t("3970804111111.712626626611", 77, RoundingMode.ROUND_HALF_DOWN, "29.703136917557267375169990360122262068539926083174777749434802378458904704107"); + t("50414113.13327141165729045000527", 65, RoundingMode.ROUND_HALF_DOWN, "18.42892889688810748384524564146722393452379799385248519278174647"); + t("95891238.2150413", 2, RoundingMode.ROUND_HALF_EVEN, "19"); + t("3588739898.086354266707742682753157086195134965", 28, RoundingMode.ROUND_HALF_EVEN, "22.69421415507189615620890672"); + t("88467584890590280582488", 27, RoundingMode.ROUND_UP, "53.5300703459319523413898183"); + t("1832710221.5016129293972911", 17, RoundingMode.ROUND_CEIL, "22.022208884123715"); + t("2638658", 113, RoundingMode.ROUND_UP, "15.47892819310388446550214666941956663688075643053708241251359367352912050906976681631927742152988559828017095759"); + t("1786396", 74, RoundingMode.ROUND_FLOOR, "15.08885792092527508913524048216150329484990188301172174413263008971169256"); + t("22875914443644444444444444.4844", 16, RoundingMode.ROUND_FLOOR, "59.08527399845806"); + t("766666666666666666666866661.6666666666666666663666666664666666666666", 39, RoundingMode.ROUND_CEIL, "62.5972415256661730932967784011827946404"); + t("103777.76798777", 11, RoundingMode.ROUND_FLOOR, "12.243154226"); + t("58961996316390008", 9, RoundingMode.ROUND_HALF_EVEN, "39.3088167"); + t("5769260977747675203474551195320727444080382875531808825548963111549677132367746619868996693435411218633631791866403671224034502134565723555791563099193741", 69, RoundingMode.ROUND_HALF_EVEN, "354.741210400852930488775090946961251890584253346738387845484224202884"); + t("9641329859135147369813307875553.0252214817665086881400525400325391949", 150, RoundingMode.ROUND_UP, "72.0367590216816840729041770213898172222794079915865702561896407914521008669014785382513279140451010930321695767962254803492078774675977227343899518026"); + t("39999999999999999999952530137763727947615", 148, RoundingMode.ROUND_FLOOR, "94.18284526144166328897016780519319120696093424404799082536781288852456076015928525905821094430401190363165284079282281148195193265398762094564431523"); + t("9777777777777512040240881322267051147543612415791737335333333333333", 122, RoundingMode.ROUND_HALF_DOWN, "154.94387555530892036642518046125609288063840664450845423927906000941524555259205067010196013799554929408932697742252209764"); + t("31474.36314847974634", 25, RoundingMode.ROUND_HALF_UP, "11.05007580544846263884902"); + t("8000000000000681265593.3333333573121383", 33, RoundingMode.ROUND_DOWN, "51.126875675114825760245915697248"); + t("7888888888888888844637999999999999999", 18, RoundingMode.ROUND_UP, "85.651665828050686"); + t("411111111451684902785982765504247507459102648281255986394987709935066.555559431142835058814620227305540037405132402", 102, RoundingMode.ROUND_HALF_UP, "158.682626840291479620381558686930498057364378653091371870052242364504572858477377847853204134154631533"); + t("576346768451315357", 113, RoundingMode.ROUND_HALF_DOWN, "41.58863308358133880463792401763859672393909489031191277166452974395927443387240567600032234165470089130821350248"); + t("68349440538766794118.30536405534314271", 120, RoundingMode.ROUND_HALF_DOWN, "46.3643122323480680917175987335352237426333205291432721562766874758426479503943615455706996174006862548194650599377218599"); + t("198.1083495013065625905600558072507610771481167268213442307684618221978606740405147733524", 32, RoundingMode.ROUND_UP, "5.9819549113001715795686824014732"); + t("7444444444444444444444444444444444344444.44444444444444444444454444464444444444836", 100, RoundingMode.ROUND_UP, "92.50143384938247366299848037666705199235757415756327536502916213162455448198811511717570744253483732"); + t("3043999999999999.999999999999999999999999999999996999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", 17, RoundingMode.ROUND_HALF_DOWN, "36.34509601547007"); + t("15213368329504069322051900609124185206028387937847.78583471775890434327615999999", 123, RoundingMode.ROUND_DOWN, "113.939406180959049974734230399897489586099093291987479084192234705056167952455131844575906879899848692146914777024279819619"); + t("99999313879467966666", 93, RoundingMode.ROUND_DOWN, "46.7448421792120004795462713798227650121773308547958317428601736249357515261611483786925833483"); + t("962200000001026079020.0000008", 101, RoundingMode.ROUND_HALF_UP, "49.008901183719187340541348379809295364211442600287264078824696116715218623219482664546855141683651622"); + t("148791951.37610429302513926644226427019813", 45, RoundingMode.ROUND_HALF_DOWN, "19.5112067692459296257389875964755475021560135"); + t("511111111111111111112277777777777777.11111111111111153847970515823144627756580624042873713087689011661920155005214177777777777777777777", 87, RoundingMode.ROUND_UP, "82.9150422545044198674827101235298972839456446169451866541149090491972503205404925073327"); + t("47998.610038242153727179479264932016206969959699132462100251589608261341092913546617661412622932701103857903254492585241469357614899587863486", 102, RoundingMode.ROUND_HALF_EVEN, "11.4720745123855607064778487982855780378166444871148568237984096099770213493208482669807470836380315926"); + t("785851760865507310163617.91878063740458858563590474", 14, RoundingMode.ROUND_FLOOR, "55.714202308669"); + t("47364324017285", 53, RoundingMode.ROUND_UP, "32.182037583937203537355453152604833700184688198563553"); + t("99", 123, RoundingMode.ROUND_DOWN, "5.28824152211725815139565594987875385416896196956981246451977365192026310533215652700224135146153625714043889715263895313257"); + t("499.88", 156, RoundingMode.ROUND_HALF_DOWN, "6.90751424969585392293953541908318975224494982388987612277851717480326895376803817738265038547032635666628800636238069103445267857651860096914335276043944845"); + t("81349250584797061870760666", 119, RoundingMode.ROUND_UP, "60.35394103380606083232211219582862767993353319993910124969951795916433496632123656914061117329536959506704639250851093"); + t("62784808", 115, RoundingMode.ROUND_HALF_UP, "18.64837087190520270799091873935786992530108861777142184574495398876133273141364367029861553777957111261395523086438"); + t("3434008559005080.777141447382284045859", 132, RoundingMode.ROUND_HALF_EVEN, "36.465651830372942440238225632276549055341315013300926525210584005230082047225348944944077357087251237606560909691028293272846801304"); + t("943162652634324", 21, RoundingMode.ROUND_DOWN, "35.1734070484840179733"); + t("3200755555.999999999999999999955", 120, RoundingMode.ROUND_FLOOR, "22.5797999106921629812819624702843090661397051495827234704133312913186939122017369917900822282029602753290447715617913443"); + t("515555555655355555555555555555.5555555585555055", 47, RoundingMode.ROUND_FLOOR, "69.108189759476837930170863307755652478684046111"); + t("8513555625052828598363422803386624199470363562955164158871585169383365148559138262436788130944099718559480027626297886127", 44, RoundingMode.ROUND_HALF_EVEN, "279.1450180124493791340525382214394203663702"); + t("63333333.333333333333333333333", 55, RoundingMode.ROUND_DOWN, "18.65706952201659580383008469311460204353554813381753627"); + t("3.1", 129, RoundingMode.ROUND_HALF_EVEN, "1.79745656826768650363900505309219353597478153524984078126195878737880094454847191781327677896317072266659955803179967359728250538"); + t("9093299659584060863269742713134899750465494201328", 27, RoundingMode.ROUND_HALF_DOWN, "113.424769485449513224036481"); + t("1050000000", 108, RoundingMode.ROUND_DOWN, "21.4652031816757884684177722482261066233609300412371144694007554132671545848811941937438220267513766719820103"); + t("5725662957131093072204723120414656205848634936868762013850212352877555", 40, RoundingMode.ROUND_UP, "161.3164769402572986499344763430727151956"); + t("901559095648", 51, RoundingMode.ROUND_HALF_DOWN, "28.2205386105780685718677771910840820862574238435286"); + t("13000", 64, RoundingMode.ROUND_HALF_UP, "10.16585181552432915341384345586810750661939113900768378294320095"); + t("85815410667430945", 100, RoundingMode.ROUND_HALF_EVEN, "39.68412217734485052270363448152781085907200427823044928220323903958647400170245897658798937710312851"); + t("855555555555558670977917296136739352872859131323006256787665242606362267919999999999999.22222222222222222203626222016401574941566666666666666666666", 85, RoundingMode.ROUND_DOWN, "200.8620460225653422427440635478741071967014832473027697642153674035135183493925054186"); + t("8059999999999999599959.99994999", 68, RoundingMode.ROUND_FLOOR, "51.134347689953441547526199299390471237322975863844381303507865600214"); + t("3486539478.450171451612777703127198834487830042277", 8, RoundingMode.ROUND_HALF_DOWN, "22.665323"); + t("57108061", 285, RoundingMode.ROUND_FLOOR, "18.5536030186021950395135699256018804243512756336090877638024288147415104918588377841521157349906964734386117524371274170845971074073616851135056936714103132696820388125746637572013174531497417919856852444272227657768154986365888153373309455979687239835031412918961348310964537999359268"); + t("3187855731000630043780438091642337349345142644991621388888888888", 71, RoundingMode.ROUND_HALF_EVEN, "146.91535654532489173837826460282689732922589098952424617111582542942864"); + t("753635", 132, RoundingMode.ROUND_UP, "14.225810625462048908924866351698424733206278962124495496668362783985319297344381995783287774992010091143288902473471904649107317318"); + t("65360000", 89, RoundingMode.ROUND_HALF_UP, "18.68856818907596679870120059856765839122427436548534027001594161362193214567150828003646"); + t("39.9999999999992599999999", 180, RoundingMode.ROUND_CEIL, "4.38187034804004848117916882176533235126146184467319830603391176128833992346694051030431118583662173748087574107043825164257058194331545091689393675098307727157613833576203636636209"); + t("4808987918343901600596893368235900813573794205928493", 44, RoundingMode.ROUND_UP, "119.69547357324752239173278566344498838445606"); + t("5408010014898259777777777777777777", 220, RoundingMode.ROUND_HALF_EVEN, "78.36633643996968290869475443801356092928426979075644708323899746166916100643744739095754810738412581019566868855490917642124551007160340115929554074198269272017970112616063804442304698021891826175222168647333225134594055"); + t("5537334532608604949028757684519663.068044198697282266678987250887714023336126384812163248", 235, RoundingMode.ROUND_DOWN, "78.38996850304375790751318479493775481879573470978124410255877825265638262552138890973402341482383001447954335158533605752713428309593630121858943570366747500915062968147696540344407106607658570716956392135937942492453185812136217606843"); + t("369999999999999999999799999999999.9999", 222, RoundingMode.ROUND_FLOOR, "75.6842029760195859583425223471643736267989129121170048800579248960101539387008079567209354709731369906633877270372642015854626990369092438157811166669081034096901980347956114494255917906565642795918600976442876636356004299"); + t("39999.99999999979999999999999999999999999999999999999999999999499999999999999999999999999999999999999999999999999999", 279, RoundingMode.ROUND_FLOOR, "11.2897819134997636642870395268367701446400134446967819312331111110313622971967652444636058108236532270080503968298851050663280919921783535114032895729032860440408387610637335367727286155854831811609959618661693371225344667585853220439485528118209179198172143719315396541096198117"); + t("79207837.0397323650927376478606390981", 107, RoundingMode.ROUND_CEIL, "18.880732984970994992769470543742458490217362388744766083020908891443598606434082921553276251844261208335001"); + t("1884330796085744171618182702334693708384101395678329685037", 63, RoundingMode.ROUND_CEIL, "132.574070223748531251892049931707898489382185954147307794359262"); + t("71999.89999899996949", 287, RoundingMode.ROUND_HALF_DOWN, "11.877567189606169502022605349148163159581524044599229071786656322936957638328752879587760359698581194421352469551278523418584657491339782582113707027055421570842276526246977622074068597209492739781382622055934987608787674297976794125138846784231492761567122790433219761143939105119839776"); + t("854281845390041010454938128876664191335348313172562438316286927048598592172206972868842548938607948234618253", 127, RoundingMode.ROUND_CEIL, "249.214843114006206864051649799084045941757711644219898072589338345966533569504072519153713562979577891079615311913074809203184"); + t("7999799999994999999999999999999999999999999.9", 199, RoundingMode.ROUND_HALF_EVEN, "99.48113762767656974236818721598884354406518612413691477242761149443027204714124560578369419210150670867740893289944042648785086523904974864308949936786236257577485996949632366023722422996105481682914"); + t("82793376132982.2039", 2, RoundingMode.ROUND_HALF_UP, "33"); + t("85340295502238345696586507721.955403106699", 150, RoundingMode.ROUND_HALF_UP, "67.3095914317993741083689775456708207966548644954251762534348017431576693180334369016640579447046537936208784096920149855495544329644479647066734690521"); + t("1080268652838848659097446677655799479957646245153", 138, RoundingMode.ROUND_HALF_DOWN, "111.294441407105024735788131066735095339916269848807500977517682690620510593845174479912481647482862243817182757330099230984043457036563055"); + t("6539499403823423238465132.8888888888888888888854888888888888888888", 85, RoundingMode.ROUND_DOWN, "57.83305003119863977115968584039168088437263982056245765590979042573813745725158736826"); + t("170005000003000000000000000000000000000000000040.000000000000000000000000008000904000000000000000006", 92, RoundingMode.ROUND_HALF_UP, "109.44530421369209780581165504796408715759166875475884985843867421392970320586689647591332409"); + t("20784.77", 121, RoundingMode.ROUND_HALF_DOWN, "10.63512296593440346913253874351365570927438011697526023641862924478285157685938268871786916815249619629282315099564523374"); + t("48888888888015150.4364183421996603869479354551535", 81, RoundingMode.ROUND_HALF_UP, "39.1214737250288461109194100401690219816512638040339039709101396131320781069205125"); + t("21907598017.0601", 151, RoundingMode.ROUND_CEIL, "24.50324653557682378700719657420514692383748586018341702430719808141571137668630452302562110521195016685264457009624301462892698550198766765073916420909"); + t("6257700478758391837989440337245428999927136689829872577099625877", 138, RoundingMode.ROUND_HALF_UP, "147.58982082115096091273577561457043334976481396730025060420825087012264750608845431875166646648975358370318159388994718092605218689019741"); + t("648873527443526978014061389.26506773", 67, RoundingMode.ROUND_UP, "62.43042723716255628683242710084397148602677128888490845488707342517"); + t("614413682.62487431747608759136911462472721507932942288069116207374491806", 160, RoundingMode.ROUND_FLOOR, "20.92932619000696771953662121292379329990314154014133970973320067673300631737468722921469741746739158841229757015292727261804767190161428562519280191814899272219"); + t("4.5890154167489796371823906", 78, RoundingMode.ROUND_DOWN, "2.20472415082266547669293891148130580356150215352093591130697811562722384512557"); + t("4444444444444421131092245176637725244667.7706291360802217169694097999999", 74, RoundingMode.ROUND_HALF_EVEN, "91.985620684105438660676619242633777121634534828685308110796932207376516556"); + t("108888888888888888888888888888888888888.88888888888888838888888888888888888888888888", 64, RoundingMode.ROUND_CEIL, "88.27653852267398815492036307927913686737094369150333409033204726"); + t("788.999999999999888888888889244616666666", 150, RoundingMode.ROUND_HALF_UP, "7.36391309981269950433313062560610464301843794609202549791390814436230701932989960952815561649851061992034546695280337058476001665649373837014421663475"); + t("8590129214922680567378442752110795707461854123532964914868748653888684675670437619721947918627909280770522756363203144390882", 50, RoundingMode.ROUND_FLOOR, "286.06172739719285926434759117235862624141424637293"); + t("559999999999999.9999991999994999999999999999909999999499999999999999999999999999999999999999199999999919999999999999299999999999999999999999599999999949999999999", 133, RoundingMode.ROUND_FLOOR, "34.65210508021768843500674156785039493544728113373646934231937477056172566924120713309803898704258865431315216531030418409638863287741"); + t("11600812369159439627423710726062092106663.63232691025283623", 121, RoundingMode.ROUND_HALF_DOWN, "92.94504093481202186184164900262903893893552998858898408735740181588975611727700149631106895774101185497338703347799070009"); + t("34005003.7602792994490773183690546", 108, RoundingMode.ROUND_HALF_EVEN, "18.0351654217320032829726571222824391328393824341969055878447447477327380708485879361940743936010736339958869"); + t("11643.45370163656827051068940176144637496491521", 73, RoundingMode.ROUND_DOWN, "10.05564656575426386072251906640308575904982436709661519373533956851309961"); + t("6", 78, RoundingMode.ROUND_HALF_UP, "2.47788873028847500481395074507450544945639765729473202957479273981302913373275"); + t("899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.99999999999999999999999999399", 123, RoundingMode.ROUND_UP, "242.359221429276915830078833882477105567885036067398143665056170377395933614851570593896804165942105892682591079550256275094"); + t("58473481613275520003697652728583213067895245986790460645323722958141804205", 66, RoundingMode.ROUND_HALF_DOWN, "170.54784722183895724631957411289880663886607996018046197321962591"); + t("1999999.999", 94, RoundingMode.ROUND_UP, "15.20180491858410222281735046512144982835572246708599977877159673465720290860338001910659561605"); + t("5592918256577289695168.9536129633076617725261929698426400032", 45, RoundingMode.ROUND_CEIL, "50.7689353338586450964755315016740231029431448"); + t("35.4672167591542557992378338583260980283353747968450402311981028037985136180520122594451983777833634201897123190085370112230101532", 48, RoundingMode.ROUND_UP, "4.26155717930188460715437739143711948118890841155"); + t("55555555555555555555555557555.5555555555555", 13, RoundingMode.ROUND_HALF_EVEN, "66.88032821249"); + t("55555555555552184821996972176.43075165111090221638788417320779419111111", 122, RoundingMode.ROUND_HALF_DOWN, "66.880328212485090464545198664021009503338437703124747123574734718838856742725723040619315358528672854158889815409604771011"); + t("7942020578650838466612.01532423934255852", 110, RoundingMode.ROUND_CEIL, "51.119601857257560173019773187827904647383980415704204332360235216196895633852095028527509188793508500339025056"); + t("30862.6788570822046", 153, RoundingMode.ROUND_HALF_DOWN, "11.0304501092223260862292986286556451941814799452059776325701249215933027093854872556808819661607946516026732989929169032661686122578468745497309943936919"); + t("890003143048357687308938099178599420637313220187789927733372704155783816461982", 46, RoundingMode.ROUND_CEIL, "180.1782541493483299860812289206792496741789997"); + t("995982196.50966571238", 64, RoundingMode.ROUND_HALF_EVEN, "21.41238712095876263464576406617698817683504240059715324751405457"); + t("25555555555555575847310084192844533333333333333", 22, RoundingMode.ROUND_HALF_DOWN, "107.5503310968789778763"); + t("279", 104, RoundingMode.ROUND_UP, "6.3243557506907572870885029268461322615499808849989843121133777930290171132105180622953534921613632707671"); + t("90000000.00800000007", 111, RoundingMode.ROUND_HALF_DOWN, "19.0084674089433733391321813020303613252978564852602103448246490492401677317823582027792109515618390851860181955"); + t("78639228446728915464562950891101829870182254745", 88, RoundingMode.ROUND_HALF_UP, "108.6743470298763846912264870103915482230780260387746588747326821681852408542416375628049"); + t("89993999999999.99929999999999", 153, RoundingMode.ROUND_HALF_UP, "32.8239112979297709174037925268138656106782007612589309581583480566845461351755778295105518480392080050457824787922604416129985853866416830773450325903124"); + t("2278729913692.012842937003080789", 85, RoundingMode.ROUND_UP, "29.14778652884360041397291587671310565776618893179212443811876288537019747393036396877"); + t("89", 149, RoundingMode.ROUND_UP, "5.1817519871262655543124356199610887882284307783664481769021802048653824117482286534232138809302224218805088959787900246793617894131995666816742413182"); + t("6555555555555555555555.555555555555555555555555555555555555555555555555555555555555555555555555555555555", 76, RoundingMode.ROUND_HALF_EVEN, "50.92774700000440474162061256970447114246699706343214949579455552811142455228"); + t("4999999999959999999.9999999999499999999999999999999999999999", 42, RoundingMode.ROUND_DOWN, "43.7491167668788679963418056389929197737441"); + t("3", 22, RoundingMode.ROUND_UP, "1.762747174039086050466"); + t("804322500528653940703514372772180541695", 28, RoundingMode.ROUND_UP, "90.27621083715792625725581342"); + t("5444444.4", 110, RoundingMode.ROUND_DOWN, "16.203253451135352867517519541123253817812728332531788496023975485605748894859172319170947867894438150953659017"); + t("899999999999999.99999999999999969999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999909999999999", 141, RoundingMode.ROUND_DOWN, "35.1265630598128042684596029608836849084772601154999338467480169107990809569671221783269231057369689770942822474074003480333926549699069091634"); + t("233454417.88009828", 44, RoundingMode.ROUND_DOWN, "19.961644584071797872935928057040104101133745"); + t("7", 110, RoundingMode.ROUND_HALF_DOWN, "2.6339157938496334172500926946159368880539639429350329595369445138409203708328879521484380269002035671129308731"); + t("5972206434306133092400266891.722709723671404676703", 118, RoundingMode.ROUND_HALF_EVEN, "64.65006113750919453759069309604203253273239625732236551071122208256964030112189101334791363820393934022036965895811648"); + t("91753463779946944869043836789", 100, RoundingMode.ROUND_DOWN, "67.38204992999124959504054908088265148425555831951628190558967990459140365907923461861838469942622257"); + t("33049121.413878", 116, RoundingMode.ROUND_HALF_DOWN, "18.0066527209247836665882812318777789898646141170829020294472657116829080980561692618962716688014063838914985157769"); + t("90000000000000000.000000000000000000000000000000000000000000600000000007", 28, RoundingMode.ROUND_HALF_EVEN, "39.73173324580089563649558587"); + t("3922487335", 106, RoundingMode.ROUND_HALF_DOWN, "22.78313899431803639615654372238529649806176914668842657897268458022125686918628826905431190619947270687498"); + t("55555555555555537", 40, RoundingMode.ROUND_HALF_DOWN, "39.24930709655660259553335571047344846852"); + t("80.1514206028237610174524702", 159, RoundingMode.ROUND_HALF_DOWN, "5.07702586644180780803079710666434604723135859438145239668836076836635246162979243230413653114889222743786854223098420813626293208600824644101608067560884669054"); + t("96217701624130066577657709.036196520020678229792065510656314668", 109, RoundingMode.ROUND_DOWN, "60.52180276172804331003521495055250329629740547879419081456915488748736877101064253101650383476674515723632112"); + t("755555555555555555512527919630246207741112832545628837821481360271961333", 98, RoundingMode.ROUND_HALF_UP, "166.19897191097707619093118544932661296279483812598856823703515231851978930278940487112238425552668"); + t("49747573286", 152, RoundingMode.ROUND_UP, "25.323374701750410307309233139926722374055883642487698757753873269915225049161782712086418386850883077274078337706044681945263431417117173802994863586543"); + t("88.087360196941062", 27, RoundingMode.ROUND_HALF_UP, "5.17144401150508240878313913"); + t("7999999999999999999999999999999999999999.9999999999999999999999", 84, RoundingMode.ROUND_FLOOR, "92.5734073490075629143705952185229103687449585939631670817825081632089062652955255877"); + t("98937224505092379001687046669156404348.8560468215281389287997105753893757654035960862809973093979299", 135, RoundingMode.ROUND_FLOOR, "88.1806960814481860066893559869516176018657227840558910436689910308476482635984253401529303982257484939855630020949960718922588286860145"); + t("1", 59, RoundingMode.ROUND_HALF_DOWN, "0"); + t("122222222222222164819807946719932815155232829957311601393224183113642130183552646181545875371633371966476827652286514531", 58, RoundingMode.ROUND_HALF_EVEN, "274.9014439423135323991735515334532988168784570961539209306"); + t("65590000", 115, RoundingMode.ROUND_DOWN, "18.69208098382986348027903520927392773951028645745182907254969323801996559609439502570463765685214803139328985414932"); + t("600400190000000000090000000.12", 123, RoundingMode.ROUND_HALF_UP, "62.3527858286319947454357526024668611205688668090585734041888250793465517933168281481158717765926017487812237004268849292128"); + t("67777777777777772345700930787574967155365092096224024877903254", 142, RoundingMode.ROUND_HALF_DOWN, "143.0644871400338238203302133836508135282658641710099835509346010583034084445668878789643189338006515612602742866911442511254613455200815806388"); + t("8999999919999999999999999999999999399699999999699999.999999999999995999", 144, RoundingMode.ROUND_FLOOR, "120.322211491703605648730224821700085345453607831871521957549706753135579622451122797324460255183794604673158645854794700935136984239123619538046"); + t("36580609807769420490049844442514580653545.2600891033349457929944005058", 39, RoundingMode.ROUND_FLOOR, "94.0934841206755360018174453967703337945"); + t("500000000000000400009000000080000000000000000", 158, RoundingMode.ROUND_HALF_UP, "103.61632918473205658082761546095606932764940486046258210841292645640626965150146346469259656676923683554588889939759397549342852937830145827034078780631609856"); + t("6.99122541130746456319162411650454549346654", 50, RoundingMode.ROUND_HALF_DOWN, "2.6326484800387942995543793641395730147339926108367"); + t("8669359897151097461672560377426128030037391327302055843161339247258136505000000000000000000", 140, RoundingMode.ROUND_CEIL, "210.08560050846594884469820426605147546571100849352829812125233385546705169832908584462677081042303393931773055674380404426500355591451918951"); + t("8026802952637172050888888888888.00000000000000000009648505662518690942760643381496178474722306762889587334404685643469656886754623126666666666666666666", 33, RoundingMode.ROUND_FLOOR, "71.853486281158831647953372138411"); + t("86449.4146014547980102609103871", 81, RoundingMode.ROUND_HALF_EVEN, "12.0604619000875864238741471909201197416949020319207145814138009441402851691197584"); + t("1061673432651413342226759435", 156, RoundingMode.ROUND_HALF_UP, "62.9227910647189511813907400896382179147189733804413330974134798853085220343357521657730521073102099954954717009227286541023809358929659857440475615521013599"); + t("8000000000000000000000000000000000000000000000000000000", 90, RoundingMode.ROUND_HALF_EVEN, "127.112183743918248174640467038788373482761480923394761722282426690222495410455812795167302"); + t("1999999999999999999999999999999999999999999999999.9699999999999999999999999999999", 77, RoundingMode.ROUND_UP, "111.91037882483408345169805406776583510100387172290159835784109926543027250846"); + t("2810804", 70, RoundingMode.ROUND_FLOOR, "15.54212830194147725781966656961241186760556152664006569924377706641191"); + t("8016079112", 157, RoundingMode.ROUND_UP, "23.49786243106164165512953717820603688865850200450632174887901591887650079066379236839690285218215186712806578945925635622789691179633938194632967355377279353"); + t("521.1", 117, RoundingMode.ROUND_HALF_UP, "6.94908822181683695358755980752559433466338405950821820051761506254864728450753584121966839327289195244674796175983085"); + t("199999999999999999.99999599999999999999999999999999999999999999999909999999999999999999999999999", 148, RoundingMode.ROUND_DOWN, "40.53024094201866724714029897255054465911972557520965110080768433543101888319396492105701238380460428017433781028945672286032959327963256390262970853"); + t("76225.1140047365844", 145, RoundingMode.ROUND_DOWN, "11.93459344800671341099155075936791310493278569968870849712274005650502191627758251249763144766389419997178041262406197314511397678862463893739381"); + t("55463129055683048735127251212137527", 122, RoundingMode.ROUND_HALF_UP, "80.69417370800430588297189879688212814640012615956249510515316759421263537063778648594990496494091244561485241607340942064"); + t("1666666596482.00000000000000026969605039", 80, RoundingMode.ROUND_UP, "28.834993878143683314178880372167960588515244276913324725226026472908086982002409"); + t("954519658818723423714052790288311111111111111111.00000000027702596", 50, RoundingMode.ROUND_HALF_UP, "111.17068460417941716123653112224726475500857212535"); + t("62761726", 37, RoundingMode.ROUND_HALF_UP, "18.64800316760426088167883940702895016"); + t("3379", 144, RoundingMode.ROUND_HALF_EVEN, "8.81848224537829298437549993531960545708496251006001900805651071047950724745095053005651159088560562782341861713654034310473845231263624835176381"); + t("69591151729837363247150008302381626834589694466267844022704040766283323", 24, RoundingMode.ROUND_CEIL, "163.814156026089298884897"); + t("493.6626254463323566969635311891255614", 95, RoundingMode.ROUND_CEIL, "6.8949984941531577481063486952883136541521363842266955148242250212284777936516821338258448154442"); + t("165734773289023156091554326751689109154278799293802237303303874601760181291120374605881483308342", 111, RoundingMode.ROUND_FLOOR, "219.943949588326014442379191458736655223849625904535435435284634824138545503607862493984196428752329432979756531"); + t("133333333333333331972709248157568733733141683458751663923783544751677362792395672252679104936852544611416822", 18, RoundingMode.ROUND_DOWN, "247.357434203374614"); + t("771999994999996991.99995", 33, RoundingMode.ROUND_UP, "41.8809081190187188852058005380962"); + t("199999.9999997999969999999989999999999999399999999999999999999", 6, RoundingMode.ROUND_UP, "12.8993"); + t("126208179536.04054487537113394574225", 97, RoundingMode.ROUND_HALF_DOWN, "26.25434577958634939168356021578568627788612023943761645009691354224156528413405640641195662114902"); + t("30.999999667", 19, RoundingMode.ROUND_DOWN, "4.126874127043592249"); + t("917893.7413272647205592717729684003095843500806520527967061", 133, RoundingMode.ROUND_HALF_EVEN, "14.42298409327454128777882930849573921410284338195742873802134082509790062983979486213672568481721822713540139363818634853210139854567"); + t("66384371030064505555505460558126992784161523662278763117861706411465254238432895875485786452387466666666666666666", 77, RoundingMode.ROUND_HALF_UP, "260.47555415562286825756164014717136511101075476300643292057704002794185892881"); + t("91180.4059838166054267878739048620964499847920442765739008322841353984728", 38, RoundingMode.ROUND_UP, "12.113742486840768486861564087882615446"); + t("16471761672405948326255", 158, RoundingMode.ROUND_DOWN, "51.849081634406252182993176865304866863176638554727700982572450389893059327709434184118962101992185318721668897822878156142517619356713531459334943553498574122"); + t("94", 65, RoundingMode.ROUND_UP, "5.236413668283698450678093565766582167466676104557168467810019853"); + t("30000000", 24, RoundingMode.ROUND_FLOOR, "17.9098551201863745111606"); + t("28119222714104761853855261525875417447624335757006722043419902444595032538986280900368339917156316829375113559401328", 142, RoundingMode.ROUND_HALF_DOWN, "266.5243012066956584907438574654876469275641656164955013648540630021506498566980712883225825048647754569748713150421152249157374126899355785589"); + t("9200000000000000", 27, RoundingMode.ROUND_HALF_UP, "37.4511270595256251953103296"); + t("15151.3", 86, RoundingMode.ROUND_HALF_DOWN, "10.318988795307941984173508890947735121210019525738489930495859613795435019227245657008"); + t("5666826565158024708924052510742627909977914517994417167741", 35, RoundingMode.ROUND_HALF_UP, "133.67512675359138077564204174320199"); + t("4982150688393", 30, RoundingMode.ROUND_HALF_UP, "29.9300299594373024933327251831"); + t("1", 104, RoundingMode.ROUND_HALF_DOWN, "0"); + t("7.42", 10, RoundingMode.ROUND_HALF_DOWN, "2.692754195"); + t("75908229889882877777777777777777777", 41, RoundingMode.ROUND_DOWN, "81.007980358583598146947065310976220120797"); + t("4600745727952166.10150555555555555555", 3, RoundingMode.ROUND_UP, "36.8"); + t("698875.1", 40, RoundingMode.ROUND_UP, "14.15037450197547393209297146362851031997"); + t("26666791004057951333333333333333.48242309829946266732", 52, RoundingMode.ROUND_HALF_DOWN, "73.05411897902839079697648505893145940941891547806172"); + t("7813.353695394136209478621754456705447342693586537733595491483417245474", 137, RoundingMode.ROUND_DOWN, "9.6567367375500861611790810593418812457139286401527739314061759233556200427543929103244063018646143115466936339614195995257487986771378084"); + t("557286644597768434147557134788198014821821838141587294604108481.9765826565758913834896335", 134, RoundingMode.ROUND_HALF_UP, "145.17133249001546084146767519454988711119353582499683341388149009722031106776784227960608347004778277975561347212866819677152085086799"); + t("54444444444444.00000000000222222222259533333333333333333", 243, RoundingMode.ROUND_CEIL, "32.3213491102569382658060299636459069538765031480465023028795003642835084665996971409087298186164499785489199643590265786363108190343280513298802247153035219051792250694126014893361987052862384950809399928027883944417785781325823439485740469256"); + t("2000000000000000000.000000000000000000000000000000000000000000000000000000000000000001", 67, RoundingMode.ROUND_HALF_DOWN, "42.8328260350127129311583104272349088729083270640384240768412622364"); + t("41.352378197359997278133542232527149449873860423141998864", 252, RoundingMode.ROUND_DOWN, "4.41513088495639176536498633424844538036615656178025509899809722824623823360877616891381163278361573622135252031282645414530162383320362274334178975211726804072471650396705670474203891363728518773084973041331219690553183054548299613712947836040574031749"); + t("235919548901597385", 90, RoundingMode.ROUND_UP, "40.6954144278937505419988778354922116315997358692389299473936108523236129095281274117676069"); + t("31.819394645308010603248322281975569001345525802368770942876923854155539175978169497024713473821191726887109902914808118356848389197092828552124880672067871493474981572163643902069760852595832181325654036471", 38, RoundingMode.ROUND_DOWN, "4.1529761674868951650187343612578555121"); + t("9149020", 107, RoundingMode.ROUND_CEIL, "16.72230450825048551165834283578453065337763958750519766647822494673257012144697405409289798953277817826004"); + t("290603217666136586677856271256889481337274904242856429478708818232494546257647117571818565808763803208502764171941186193645655370197076453515316718718003184175454305827376574795437832763", 215, RoundingMode.ROUND_HALF_EVEN, "427.73817802203705555378622431879777877781706758243396472078952663743232573862671579006554868855299605860444369291539532560392567894651714880767820778846449046124106003212183730489215465792321944648838797707410776416"); + t("7469492381942566847992242519349360799753803320569858104462169466449496126391734957565", 71, RoundingMode.ROUND_DOWN, "196.12112203467095980567058374670264390727490722240442944396328778377693"); + t("82222222222995683403878888888888888", 260, RoundingMode.ROUND_HALF_EVEN, "81.087880858234855897341180599865871160439423334760788910431195956654952996971775413983368250861192064980593063899274559940257045144596280175036364857854199889181569013594879840893997482064032451677575409688188582233308643002945979666638185316756013899568159794"); + t("744444444444474444.444444444444444444444", 183, RoundingMode.ROUND_HALF_DOWN, "41.8445618035135089131101310593662187653588744719702560010849320440472083590799874232906815723468058529816201993580415753015090052194988484437427574642950054989456182964553455569137823"); + t("612.508", 23, RoundingMode.ROUND_HALF_DOWN, "7.1107085177457568181265"); + t("592650477679495157795563506760263456011888888888888888.25286536510951911286940333849055211813613499268116107137327148681412417782166469398746536313678066241456311503667974386639211971037706784650171747468914451714269731111606567633413035", 75, RoundingMode.ROUND_UP, "124.509591734787526043476556817048568038049116854086166195288072356161088676"); + t("810845908400000000000009.0000000000009", 229, RoundingMode.ROUND_DOWN, "55.74551216752478302045881765121892669532306567835709955896281646085824322570809789409285832439116992422997870545366474737084801047264313591717245726027076462366245681861534643903809520175005115813060645158290935227254738382125537"); + t("36231896", 226, RoundingMode.ROUND_HALF_DOWN, "18.09859757438319764005274538446683692992741280926390777611454430894634258337814145614258292971267599486909246418909251025388664873911836986475583933223469111502212210031954912573250979985040196986501867451553304025915777186553"); + t("6.2222254444", 83, RoundingMode.ROUND_DOWN, "2.5147540907260319117734468037221843429209367135209839243080601022058790098769088493"); + t("15111811111111191111111.11111111111151111111111111111111", 146, RoundingMode.ROUND_UP, "51.762910764291252803099366270042712063444478090306240252765099786104736098705769640196468687358245844917978556426577442260227917989316741408807083"); + t("25431590230377924980428817021594698764581546742156641005406310922187189262159.250939977531056629520879988932670254171976851278", 320, RoundingMode.ROUND_DOWN, "176.62302126622882156448441947278313601417412268635109619942905690964428906740706034262509910102119532364572050440418403980291821215204676857683488329789968073569476436740714841015171851568122150106090804662231736136660383553351165407086885411634789685571170365620793060988151056221342244789830418053017534912546709752757"); + t("3529893667853713333333333333.81146765175947156222006009954068253985345293989887722237076541976980577777777777", 265, RoundingMode.ROUND_HALF_UP, "64.12421243946965056014827706567205068851151675089284982577294212207825720604062976686981276974566837651717551852994352354478363122324469161879141258376593048291540136665855625509720777377160870509458809855845379306566853809704400729632845210598590229544890531929459"); + t("655555555555555555555277184571775444034687418623652297772302654113666.133783637421383021695696237544342612207267035476665779245697505875858978181885164", 69, RoundingMode.ROUND_UP, "159.149246370724551890465786306165517543161510464579266794758015358981"); + t("6666.666666666666666960666666", 51, RoundingMode.ROUND_HALF_UP, "9.49802243880296361609434673186568175927384494534887"); + t("438792838510644769071637662774181", 305, RoundingMode.ROUND_HALF_UP, "75.854727378026247322009246618351419220998085468471516018077230348062750941943046951017158193695565934054827633862696487301385773329048539033421597191124944257883871195746795903914247678510412413266964204426733105425935851791343180083221746974728232156506814100652995129096968794114044888129705450449807257"); + t("3346100300.99999925524425616833", 248, RoundingMode.ROUND_HALF_EVEN, "22.624208596011424548228590851707167272038726267295552407594576715067257316222801917039905817985102172415401711744989822965901928389761212394816185073124522868687590292732478578767945488716835725698707270756152285843721314366685295063651835819339684"); + t("106666666666666666666666666666666.66666666166666666666666666666666666666666666666666666666666664606866666666666666666666666666666669666666666666", 301, RoundingMode.ROUND_HALF_UP, "74.44040867750697836966588258704182413943960952083074433002255065329564568234748621297884475244213417881503810243181651879540607433035169249192160359251612393074362004238290991979817435770822525984303648426201945987054177786885396825835325332960567887108359193571158556803499705906621404297252973905998"); + t("955742079322446192041319073560203.69279599885", 315, RoundingMode.ROUND_UP, "76.6331880555287248672280010156031798512672164844682590741248824397510374374175921182764509971982091731894924514521462471326753110819429917849160417881189684292259655928463215337823408448273960759418364857346066178714001797717712674147726988086790501719044134261418307784264482700347590864367614808492449812166030306"); + t("77779815944145367353414506062", 7, RoundingMode.ROUND_DOWN, "67.21682"); + t("29999499999992999999992999999999999999999999999999999.9999999991999999999999999999999996", 287, RoundingMode.ROUND_HALF_EVEN, "121.52616763811264013374079011997748175918995994194563023843940683600450447652571325932494959779489873592431729284887620951407285936381791765144784938404415914907669779274484828027938475825417806459751250389217856941894982370790732817029352465679796005767843979548258605267943195987894193"); + t("4.075073580444590926046181762057201005319810165125", 254, RoundingMode.ROUND_HALF_UP, "2.0826295834145035625117002428182579926771198126853779841729098301111631827656771755635580769512397966207296633676475186280383353667509079921715775117373047323607675899800906905227462608449770619738736084161347725274933608842114100203285439205755587431379"); + t("14105444444444444.444444444444444444444444444444444444444444444444444444474444444444444", 280, RoundingMode.ROUND_HALF_UP, "37.87848442913709879270772345589471749573509500416055677074064663396054396434178393976310435009747653864504531473599829635858664795938093264488415863663422684600211486888298239963453748567264547495052822495154211363009939514324378324322188965429313713076901237728153077966248641317"); + t("69120040.47558267719", 169, RoundingMode.ROUND_CEIL, "18.7445024486040882096839396208928079839291109661739143440641150116153671718070594925595017335794762609597386966242660332544684428121077844560066320674768592492121557831"); + t("94216254551051396934421136689219357456824832564555564759904385149741099174397514984595879105797003366536837888", 292, RoundingMode.ROUND_HALF_EVEN, "253.9179299442340360941891279653701787950305647595034420368002965770140913823836476681910472969106820444832455014815424617660047854427062885535330470393649961107497811846146462857063448989907367987171181665985229865517523207563290353135730669703259288169587941247439193461289565606606472860233"); + t("940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000500000000000000000000000000000000000000060000000.00000000000000000000000000000000000000000000000000000000000000000000000000000000006", 188, RoundingMode.ROUND_DOWN, "428.91209907373435506496584257461154104364972467843496213157420214382696563807804686724590214391462769777103743802070097116928839800201284062739572872584365068865121393715310134470324337155"); + t("2214.70734209058848432228614", 138, RoundingMode.ROUND_DOWN, "8.39602267787369463499185550598362694679949128086854711554521208382127230307690613867619826513493199394895343759258019678321128105654895101"); + t("905646", 291, RoundingMode.ROUND_UP, "14.4095509607536745566618767219233413971741575009369263605495645180305077380914690013797224950966619297588100045288071734682274262154384494052922866402786859520707890354345522524690220484285022841888857666006487918421770262073334185456763455279466034085991215216010346313726397965351176001238"); + t("4999999999999998267699", 135, RoundingMode.ROUND_HALF_EVEN, "50.6568720458690047019356120030559525498891407198191430607869080434111835680170038515033758694073212217004946411905099773898210696685681"); + t("22534298978112638626732152079616775080", 288, RoundingMode.ROUND_HALF_EVEN, "86.7012490758664429212618438076404354731727132408895798168718199637133432826286186626959043635700253635273677394296756342580511896808074359621920106982821322893907848099978936598789326179170242907225746702056526839138723462389446267106880875017841913870640138546800851509179674181296074"); + t("4.917112661372375326859164695345725705160924123187231162813004513297861168345305763392", 166, RoundingMode.ROUND_HALF_DOWN, "2.275364540671013849083869958635327771129857098551152861323888875656694515544219462707655737608174646441961145536966879929862487060066703065620664460443602317374762477"); + t("563549067354.51758770352", 78, RoundingMode.ROUND_UP, "27.7506674232458961891792257347312452385053979867196267238798465578139019421016"); + t("830812.993651609354801631411540051011838976114467285499996473519956125432980902", 73, RoundingMode.ROUND_UP, "14.32330719134868527537701604175320796359242581243643816305737932515530472"); + t("542.123", 78, RoundingMode.ROUND_HALF_UP, "6.98863924288436782261099486422728862733151811025649318491610107479750101594563"); + t("4382055.78", 16, RoundingMode.ROUND_HALF_EVEN, "15.98617570896379"); + t("15972666666666666.3333333333336666666666", 81, RoundingMode.ROUND_UP, "38.0028025035116891329653684421707098538237799620494668577438585114569810737007871"); + t("70", 1, RoundingMode.ROUND_HALF_UP, "5"); + t("95161111111171111111111111111111111111111111111711111111111111111111181111111111111111111111111111111113111111111111111111111111111111111111111111111111111111111111.1111111111111111511172", 176, RoundingMode.ROUND_UP, "378.26750360720375122142020384935258000012221498851140673676454661882508658281792842440549608953473119772930181586919377961114781991499424409175992835312148932511364179794638734"); + t("192187296866691881394562541736288097256116", 141, RoundingMode.ROUND_FLOOR, "95.7524362083742070761427721614390085082734503013373965942528336014770346481829194146350591229671181900295217818943865030041644129855973644356"); + t("323343462801822361678864704", 137, RoundingMode.ROUND_CEIL, "61.73390452300869992017775037776722086641122218057531819833790910615093187573711977767569486207987692346062708286660634627188970604522536"); + t("654643679490241446537176289187903442597521184707980054830550.96191815035607607", 151, RoundingMode.ROUND_HALF_DOWN, "138.4245885680554353155343875067847949346288236543877357189120109624223156680358799670898680613325865447043247851566631003024241080218713773466251052099"); + t("97547.66057000757781426525", 79, RoundingMode.ROUND_UP, "12.18124354444197943400829624661626747711710103990407237629198510069337134957426"); + t("330966422653907014432202974912208756386048736844238214052539496507126006287834443953802244470709874286745385", 136, RoundingMode.ROUND_HALF_DOWN, "248.2665988730329924099709903958246239724235964389697534816194167032520539019019323729460933823635273823634739208479626212602340802522772"); + t("48700000050000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 71, RoundingMode.ROUND_FLOOR, "522.66047213533546236482471645884829420553088172496597025327676982280203"); + t("4962019999999999992222.3333333339999999", 267, RoundingMode.ROUND_HALF_UP, "50.6492470493292003079438183167239651756644302466502579021920017628824910170672741213328788979076932463165367951715992554968989339672756935045573898707660419105565176946091851526145160691885299347514958242470836148659855690389545771334274212479486772440520095264962456"); + t("1191006889473747404.51823664878977", 207, RoundingMode.ROUND_HALF_EVEN, "42.3144779294219180903135173366664918219761285269250416062767845401760994831165009061578024678488315900870803917137805077959158110948619518500533015950665646260038484083675453365745156213237719164236530900696"); + t("237.4303896260746527103755309492622981805359928199606649703696371421715634836691994496724537813789733813909044205433675059680949839552229084375", 114, RoundingMode.ROUND_FLOOR, "6.16301723000056716935267577524395056851072759397696230050371528742991419351531640965701891368946937728378211546652"); + t("24700135.4", 83, RoundingMode.ROUND_HALF_EVEN, "17.715466463924502125396060207294420774083427443712580997416255278232299071806025878"); + t("1.7355776652", 101, RoundingMode.ROUND_DOWN, "1.1487059001828354452123386629353234548373478311815798645617265492201433389979864829891874939619314234"); + t("1", 86, RoundingMode.ROUND_HALF_UP, "0"); + t("9515555555555555955555555545555555555555555555555555555555455555555555555555555555555755555555555555555355555555555555555555555555555555555555555555555555555555555455.555555555555555555555355555555555555", 100, RoundingMode.ROUND_HALF_DOWN, "382.8726154109627458789965714010046933388660941963669084277638751033711704046941435744216104049094664"); + t("133821337982", 7, RoundingMode.ROUND_HALF_DOWN, "26.31292"); + t("34444444444444444444444444444414444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444404444444444444.4444444444444444444444444444444444447444444444444444444444444444444444444444444444444444444444444444444444444444444444448444444444444444", 156, RoundingMode.ROUND_FLOOR, "391.066790523702592771596461813812162486074674043587013530104940427953011806020911429939374985005691373765181187955120463976087197574917636702720530635481114"); + t("725334.1", 275, RoundingMode.ROUND_CEIL, "14.18753483583406623913270780877061835709483368669615029185749156218524338492488999979560314505539666814313073998165140693348638437794169321497908415093267164828921736525350977179323552514488716902878059876091064201075555109094078802633030148939839062104439545316801610030509"); + t("6207254259312229204740649583533109215565090044927756723067876176808758406734535823", 242, RoundingMode.ROUND_HALF_UP, "189.02825836298776923699640740130164604845899118215576388881058502279222267754769931963253049257492464383753294560858003283808398526605587566182248172141111139116801224789049032378817029080477146928410168220053495149822339607504310797169254655"); + t("89.3827077131143207089891827393390733153527353973", 89, RoundingMode.ROUND_CEIL, "5.1860431245570264926479658739038443900371282695274704261677530470734616111926055907071658"); + t("258850.994666666666666666", 152, RoundingMode.ROUND_HALF_UP, "13.157155045516184712918040660808015697914645982590791458360826916208061802759047455378167628850495560523540196620765226459247134226130222578672061932208"); + t("153854799109377965.2383191698385974176347999256869452586", 316, RoundingMode.ROUND_FLOOR, "40.26793287018329744396075998699497433504679893760787885707096084877788531578998026305586601910020123952346554157847686441319862606846242032723844526737646785521547175998220738675195220107482660714323110205749047075835516328052487023362592293480914256809770044319921258669068732877284549722409603292984950239179563906"); + t("5.7335690145392405850372718320100204070536531426", 241, RoundingMode.ROUND_HALF_EVEN, "2.431792298586870982677248063204433892405320289708503940016875565597398678525642587848022338998704158900158072207166690834438020139794755586703421302392854029136957949690823433716363867284811228918018359290560575983858237031864640366869850967"); + t("63555385871759838686134965170514150662285896579178816988711069947498681592454493584289767732581761666196.031596482273029606405177978026925513118", 4, RoundingMode.ROUND_HALF_DOWN, "239.7"); + t("38802526147092881", 47, RoundingMode.ROUND_FLOOR, "38.890408926864334293806196801446769472715656777"); + t("7", 176, RoundingMode.ROUND_HALF_DOWN, "2.6339157938496334172500926946159368880539639429350329595369445138409203708328879521484380269002035671129308731312099586396196337242127430654535266914198413538116622575525139163"); + t("71013267675.523150292", 39, RoundingMode.ROUND_DOWN, "25.6792797457592370816398719022588905845"); + t("484387062023528883135317694331894980084666", 122, RoundingMode.ROUND_UP, "96.676850109367406889398734786308993889419503320642296892816976765071543843731040630014418258642173763250841666933259390194"); + t("531", 101, RoundingMode.ROUND_HALF_DOWN, "6.9679083151532607748875067986301174410719856662951782808223909983724535009425668721909679103898594618"); + t("79665277722067292654443647225158", 271, RoundingMode.ROUND_CEIL, "74.14853379904169683002416033866134366538640306675167633548563793248866976934173719714179490512200557484226611636602052518553153996635821205097146979695421564708149759203290257120247538831626669198157820555674504818219302531936511451021909530017930435205857501084646075378"); + t("3765488.372", 265, RoundingMode.ROUND_CEIL, "15.83453530504258576372283695084592175826917919557314581051384998458390134475577378386717348007075867047058217343146057606309935868315006940476486509177238798268708696454849769942720923682946004957027929622019662100392731836399730417829527161793478914270125161489897"); + t("226533333333332333333.633333333303733333333333233333333333333330333333333333333333", 232, RoundingMode.ROUND_HALF_UP, "47.56257095558243047441954050246732610924035840777391113644368236494041140410630192492210082827341080242953865665196719458928190124665088508739733729274595894315790221184646933330301677624947442858083934928330528638687243906204478079"); + t("58", 151, RoundingMode.ROUND_HALF_UP, "4.753515866530498973336682803758840998091535204533907351011231082608497251484701831156287133853557651574450435839888206020477379602893021122283593995385"); + t("86853665.575021029268673543160555450305308757466860937403404238965062211958709445745277028296828256192665541527422129923878798651241163456331214739977894166395710526431264083049704974123960407969154871660044144087173317720957262491098586841005814125844", 244, RoundingMode.ROUND_HALF_DOWN, "18.97288243613555802370085177707039499115246773505239218086610190877157862380772604106135510777257344826974097988619358377668738023319898218961524894058756678238347797528670353532170805084405171184933848843278705587211540703993932657618718440685"); + t("7636672.6111697", 276, RoundingMode.ROUND_HALF_DOWN, "16.5416197247371428955079978560217295868052532380197586973624111681447361113829510105660544038481213496357164253911433824120514922732131344807254511287421865860365881670002968311773010364310722568132879260759367705145293501165019124592052033336818820178804031727317139090160145"); + t("58888888888888888883.8888888788888888888888888888888883888888885888887888888888828", 188, RoundingMode.ROUND_DOWN, "46.215331283662715757028142765097933062236993763283411646822822694837622031963639119021242113167169969668392027478373156756578333332067868306043903144956190635346232360552409795117770748114"); + t("300694344444444444444", 189, RoundingMode.ROUND_DOWN, "47.8457731363037825241702663285610676133470379383979543455097196360734734221303654154221802328337759926657549921506999256357909133537625953583388229226822706475543982346375262024177285140516"); + t("656317923028770327", 148, RoundingMode.ROUND_HALF_DOWN, "41.71856888577865287888959769772967488412298111687072227501742369691120003694584058508349765347076162535190925788940572417966462991891709476444035006"); + t("542.058040622449660038738741098384332687483273608346275720465043379834129064507452980505344936412756539901072341687979569341457423989", 95, RoundingMode.ROUND_HALF_DOWN, "6.9885194114434527100126780981691771829900564062968871097682386585733388234916989496169283188651"); + t("3440116478453720606809618172867160659724417358097318944544243609388888456031249425562873", 317, RoundingMode.ROUND_FLOOR, "202.25355560186960586921376872328853575060231892815547628956802768519204700837226965120454453410207984266373462665789788325406753800278573191954414605283387943533367441519728347324798077972573245029984016325508142207546835000639384729748097945917532141591437307350063998663042697410108383278480366622005043490738732917"); + t("3000000000000000000000000000000.00000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004", 230, RoundingMode.ROUND_HALF_EVEN, "70.869312259049425521352220998911628500756035351046193986855211344380288427731100311781617456720321948817893920244004899367227019895654334559555575176847285538502588441630245079535529434035655539386707659468565728652323714120644132"); + t("60967.25444710416620109", 175, RoundingMode.ROUND_HALF_EVEN, "11.71123936717025024271587431855508032407744051946723763258896101476906258760747113582798774090649129104607800122720527552545399434185358621361599695033578951364813002032224424"); + t("19938", 74, RoundingMode.ROUND_HALF_DOWN, "10.593529917513701495849272569723843245989885916767490060715350710923228977"); + t("2103219188158375579949", 136, RoundingMode.ROUND_FLOOR, "49.79090325114290003906297116015407685247227077913046356766489665760209126755884808073468177480358429385958101210723737076648888607204765"); + t("365082.699", 257, RoundingMode.ROUND_DOWN, "13.50102636006174214748564962210927098456013936667037668210841375238025067983562806280413885512134462710674906997126939755874068415054964250255008804624694168097434538539480177009377040119727678494920988279880342170663111877647382779919423859353260101652462"); + t("11111111111111111117421873530891952679791767650235777689438072712275431774239076370880857327116930490879634543822815272535431678164042038340441953980667480904639371685123119977187212655555.768825408823407476666666666", 314, RoundingMode.ROUND_HALF_EVEN, "431.3819200861043145225771037460538719288075637940536773586256518344982429522488208428677682352964452456149688045683149394415729591217760289704110747127445700708251804364566297605113100679122127215241370021379747866548522081624105735340337239217001736424998479156184141336756201729642028349787566154248807107949352"); + t("26541756998370332235059097559", 308, RoundingMode.ROUND_HALF_EVEN, "66.141663920009893790748922544701136082691101605354596399792168339549790900932135988235091610917239569366996220170848276790749044330985927376944477554430726534210883558735530434531088778070642805734561569242684057031979025659125878096263715047334960018407421659095160290228452027517182783312811598113991782253"); + t("539595952736418745904636627.3845345321779880738727128305218872996", 154, RoundingMode.ROUND_DOWN, "62.24601003623403847062583147777887913964725692883222302451105993400409923243806622674349902632713631111422513780697167846196724424816065625407458524749715"); + t("722222428222222222222222022222222222224222.2222222222222222222722222222222222222220222222272", 208, RoundingMode.ROUND_HALF_UP, "97.07629897110596463449974570136331187860035529623879919538967612451627994208191823672510103900634593251703413957681760360491871897408398915570769186004711532580468652605264155826109721304818219961456651802889"); + t("353274374379557968911439246409153485604433243941458861816316231763007146215181500476880733709870607654815794670706737759604802378233497955840", 225, RoundingMode.ROUND_HALF_UP, "324.317135033289230714771487099261732195653565834562935403429116180471211102880862597019736617726937616166289489101765588234938391697330584640536912505502588016262759139336286970511226422575180933863863798395001923350526972634"); + t("202256276247211699784585671557897404237579834111111111", 140, RoundingMode.ROUND_FLOOR, "123.43452251083804596320440045384375298258854224941389205762974059496196631684945589356542006646029395230026283266866717497333588637951645258"); + t("40000000000000000000000000", 169, RoundingMode.ROUND_CEIL, "59.64406886653097802870148273148363489425403761880009000694523755266949610784289615271752010822921352117516242302511827303629469733434456058775519648237477011014920536855"); + t("820", 248, RoundingMode.ROUND_HALF_UP, "7.4024511490155382381110394301463133553047619307433353275313423818408978020332598750663253246321467663029697100805314346225417571696368364737000513166418620314588116771268477321838976878557919327685421516790738020173763491074643981529087434783576277"); + t("69999999899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.99999999999999999999999999999999999999999999999999999993", 24, RoundingMode.ROUND_CEIL, "288.159608859448352003162"); + t("952.496", 224, RoundingMode.ROUND_DOWN, "7.5522328125183829390644656560359888055483789525096321092851768635601462315101851755900438502971137109985702490588908777175214066705273797465108083234765144879814317545062856969722503898253304619428863666001963228146009617737"); + t("20000000000000000000000000000000000000000000000000000000.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003", 239, RoundingMode.ROUND_HALF_DOWN, "128.02847447579240323982399425055638455421158214330302419007439457220328077619377584419157293392074378389223108436626004630489494105107063273071114680370314484542135159956225031678960829269060926600388949222382477120506477993490165147326772"); + t("3728320804898809628202740817939338592021330518014656737696146821466343469507787823903", 301, RoundingMode.ROUND_UP, "195.4262529379970006247382109985131288682391926104299116037301225764435193523761291431157691436231466739433619544855277282053735634120379939115675699273602785877973782935500392338790041531392784333820432731195071576150014130109772261284241158421195287339201471502283960679141871084416638821846762440534"); + t("42222222222222226163887", 305, RoundingMode.ROUND_UP, "52.790380808819116837804031625067795052666596363897514051985548658113189353290738618937407102026061549501887592827123511600955892349084973569499204504367749440458587352187975716354814968617233716243211317204898051698412256093904839306094560410158608068756213158702655901120368275449999909954074087471666329"); + t("949094878175839592034742591696099422279800950248123487439903778236935090775370353180895545683735351.3668716277537493530078753351535153130123983633762352439709440342902330714537051510276874417414029051601544597556976912157823577418328482108128796394", 92, RoundingMode.ROUND_CEIL, "228.59682487860388354900546879183762407503927627237019647756404754787798490250231005425387394"); + t("421111111111211118111.91111111", 158, RoundingMode.ROUND_UP, "48.182575575193257754428876528083625262744254446747721803414006483216272016813238236310697145443355520347533691936944320295998703366535578387071761712600113739"); + t("651642230486125837.8329778119803361361227", 184, RoundingMode.ROUND_DOWN, "41.71141926054366590528588063230217971509973936740350669811164945971214813906716299272253063747038302497487714834747428342957974073550600606390026914913164778302041717913676130113565314"); + t("9244595347555461590431831070725246747397928036137625070.79989187733852999205236199883783011817269496307127579442639229082206707166472431542859124127456589510897", 2, RoundingMode.ROUND_HALF_EVEN, "130"); + t("111111158385", 263, RoundingMode.ROUND_UP, "26.126944144617183624635178969871434003445579802616446619095446222986761562301567566351159277698755417420808661255067990334097670164348818994899583401201657033561172232823722133720343435078502859797893888237248176410316047049521950051291501626819737276944418545633"); + t("322222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222220222222222222222222224222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222.222222222222222222229", 176, RoundingMode.ROUND_FLOOR, "565.99656621675139253821792007764426762654489664668687955773829743091647518762168677297131417913839402639416809797395270416084155404035772400915902287834662604702946469896465357"); + t("3000000000000000000000000", 238, RoundingMode.ROUND_CEIL, "57.05380170108515141724427227080544325514942641927352835287746618857485276966698543036563422618273215760201314191621333349269695043849082735289118429551648383324666288257769431500313701530973782969782289959439547109666647314102559744418065"); + t("100000000000000000000000000000000000000000000003000000000000000000000", 154, RoundingMode.ROUND_HALF_UP, "157.2689335041550518226406510399949426849504013611468176243869772752883310800296633716536732730886529747958107958960355928055332518613889899853492118503522"); + t("9434382.2937", 210, RoundingMode.ROUND_HALF_UP, "16.7530184455353612813755656351157707588032141566402417688790512215930989623233829379043861275183817002472988076897088241995140707393881368162211446733255243934082031134590597016107848284612076055893297371400339"); + t("99999999999999999999999999999.99999990999999999999199999999999999999999999999999999999999999999999999999999999999999999999999999999999999999997999999999999999919999999999999999999999999", 16, RoundingMode.ROUND_HALF_UP, "67.46811487738727"); + t("2800132.92705308411439864629", 173, RoundingMode.ROUND_HALF_EVEN, "15.538324628526023626473341018553334514742270183420905959360819395058240151991912723398777672871251302021408664934994583417883662899665054154329949690801848935584355767957037"); + t("490000000000200000000000700.00086", 223, RoundingMode.ROUND_UP, "62.14959480352212218334303144317717890944485364335641646511948492140459605954879237699166185191922912674498284654822958101351621944614571253386858090905080290283481762391453635225351488374889165412202573892711891796948400589"); + t("22276772619257871246455282495196786658526667522", 60, RoundingMode.ROUND_HALF_EVEN, "107.413020914349439618955892186241732595156849526174548030474"); + t("696799015936021817783117424295218828333333322222222222.33333333", 67, RoundingMode.ROUND_FLOOR, "124.6714839365318342204823919932713523484558264722793803079781309986"); + t("3473932", 236, RoundingMode.ROUND_CEIL, "15.753944832173415879336625147418246184312973578799407762804609969543939922467156873964428594955270904171295077465949726588277679231666121653682752953176976299848809797907240861945719218200763709198428602610180478920080886236686404771047"); + t("3.474925991", 279, RoundingMode.ROUND_FLOOR, "1.91734235832506568824931562322545193850371200825438826828504193531932352457273289006235067984041997841687311799033820487102476789106873435219820766056885436669060270261302755936524533834284118132214287823035471905624007606792464691690112223946007173582292301433405895828345318726"); + t("308200847.222222269694", 209, RoundingMode.ROUND_CEIL, "20.23940941034293365695916880574406034175325155585320953616081061027344086209724462568342758204179239207499247943812393008638638814873247700756387920002438392149020492650801525049206999794260823931862639144861"); + t("96900000010000000000000.0000000000000000008", 258, RoundingMode.ROUND_HALF_UP, "53.6211136524348243958321482141922531487179913337233031292267513851091264653481398365172547236948005732847515885482048628734110793249048546589216251969902657784868716495051646814330484605156047364986132470882557125622785594444011646470835792792952346993785241"); + t("93738369513498389134974231405611263153696694607", 155, RoundingMode.ROUND_DOWN, "108.84998396392394241128764179627855075561768872352918778127903835701039555044148098373612730600985277270009859916114127637861190781430455562182772403946604"); + t("99999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999989999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999996", 140, RoundingMode.ROUND_HALF_DOWN, "74.37587015636940719799295867135783121131074777048099048718717284043071713164497408315777388986356423448497057037373064200279033511747044677"); + t("8.0361178", 147, RoundingMode.ROUND_CEIL, "2.77319939545496422129989146134973138056318141047291413734626345742879644177270299800937400993043508186757525462948474029608470380630106242859964187"); + t("48931104906116169", 189, RoundingMode.ROUND_UP, "39.1223368618802099426501487137641101047512806198244429473893206985791823135038810313259922437606027418630858087009636876710665231474412276240647356032116648051223734791925154046098833112451"); + t("64073752225583654056112779", 301, RoundingMode.ROUND_CEIL, "60.11522421082299599931462841761749058299218937386243125077490263401534246579610369243745531058866463794303916299675412833407115390721088949457667644285497931904532940358509865565371709839243364368037962751365849088185941733106279827522636928945790614310634901314546226362444319473947787865202398539931"); + t("923", 152, RoundingMode.ROUND_DOWN, "7.5207761216109839419015095673311028305309809768251620605950361092298305276779161331821437070465314375368588426326081228234337517583480615099296670887008"); + t("4111111111111111111.1111111111111111111111111111111111111111111111111111111111111115111111111131184", 254, RoundingMode.ROUND_HALF_DOWN, "43.553372189760772683318683502963128059485631582354433182969152259819666694625738151575549434666593198337096868502447675777208381599490033164996293757955577845345691571646518403065897934525012666083206713906514851944176509486897898223901682653707142863005"); + t("89999999999999999999999999999.99999999999999999999999990999999", 270, RoundingMode.ROUND_HALF_DOWN, "67.3627543617294438447114833264654257902013229316113974855232189285517733040641401206523746038239932433843975165277975627033105096568970643697906628489688971467288707039920755920036517223733732823546299241797962586004527726375329621547839418770237738859689271309550552328"); + t("2", 102, RoundingMode.ROUND_FLOOR, "1.31695789692481670862504634730796844402698197146751647976847225692046018541644397607421901345010178355"); + t("9444444498427239008023958518736215451111111.2222222221081580579333333333333333", 110, RoundingMode.ROUND_CEIL, "99.64714777117978640062929583820630008202833722541617274121651810140334387359697313237277186078707701203091168"); + t("15747510591492060760328875491417233165.3866572", 125, RoundingMode.ROUND_CEIL, "86.342892823441756290056642981379852661818427420967554033322935747269524293373442118482008952066380852056217824336234933501957"); + t("480270219.9733694022", 55, RoundingMode.ROUND_HALF_EVEN, "20.6830066423024438386407472514894714092546271163883015"); + t("69000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000007000000000000000000", 44, RoundingMode.ROUND_HALF_EVEN, "447.0235915400139760230735894895888262518812"); + t("54688621843972517104666258583206.313971540117872953862262908953", 280, RoundingMode.ROUND_HALF_EVEN, "73.77235564800710017674816907890506415634826407639499840471655964956045878122702142457975366794387096591546226544828600021874264282780974246424867477460323754570557223350895309252484264673780400256807393625182604267940108884326075614001381210576145615394820811332592542164265699125"); + t("6550696507769733672381326340498610384974221665074060466395963440807869350837423685688870369.88185066767550159805913067848633183617673070775400721972350594779494073408532490867221964722182376509629401", 93, RoundingMode.ROUND_UP, "209.80537693108191407239449938797446146305125083691590480152975364485766102179901434738386273"); + t("87304661111.6666666", 123, RoundingMode.ROUND_DOWN, "25.8858168708128330744708376918260960166197514906751441562385781692450296791481632408345999478592848106379014959750267446739"); + t("9000", 27, RoundingMode.ROUND_CEIL, "9.79812703379188197688629677"); + t("534995478061", 134, RoundingMode.ROUND_CEIL, "27.698671312144212873662902403290506949838951892285840081939007737120826054269659337734353563723134088647466857693593497902557201516084"); + t("33510010000000000000000000000000000000000000000000000000000020000000000000.00000000000000000000000000600000000000000000000000000000005000000000000000000070000000000000000000000000000000000000000000000000000050000000006", 74, RoundingMode.ROUND_HALF_UP, "169.99111807629879163625974865178022321947192724289646534209273324929519275"); + t("738.245", 160, RoundingMode.ROUND_DOWN, "7.297422469676460057258935714571304875282754408306560497316807162261123406168435263072369509041475105737583484684091946392872408276514681369949082374827023560118"); + */ + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalAsinTests.cs b/DecimalSharp.Tests/BigDecimalAsinTests.cs new file mode 100644 index 0000000..a119fd0 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalAsinTests.cs @@ -0,0 +1,1044 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalAsin")] + public class BigDecimalAsinTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Asin() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Asin().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("1.0000000000000001", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("2", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-1.00000000000000000001", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", 40, RoundingMode.ROUND_HALF_UP, "0"); + t("-0", 40, RoundingMode.ROUND_HALF_UP, "-0"); + + t("0.365496185994558260858326718937", 10, RoundingMode.ROUND_HALF_DOWN, "0.3741658147"); + t("-0.35641389188", 3, RoundingMode.ROUND_UP, "-0.365"); + t("0.68955841424562468594284036990178287693727890663761450264565153347585586987783918662506831", 7, RoundingMode.ROUND_HALF_EVEN, "0.7608791"); + t("-0.8185571137226394757008542835605396", 1, RoundingMode.ROUND_DOWN, "-0.9"); + t("0.3909767220307331413111", 5, RoundingMode.ROUND_FLOOR, "0.40169"); + t("0.4973777625990946249943842344354278064648780030532232700989739966171872596183742540844", 7, RoundingMode.ROUND_UP, "0.5205736"); + t("-0.3220586075", 7, RoundingMode.ROUND_DOWN, "-0.3279031"); + t("-0.4712856183846410563097510893908", 6, RoundingMode.ROUND_HALF_DOWN, "-0.490748"); + t("0.05838677605449046055272817746189607969418472098217185904914", 2, RoundingMode.ROUND_HALF_EVEN, "0.058"); + t("0.8", 9, RoundingMode.ROUND_HALF_DOWN, "0.927295218"); + t("-0.35", 4, RoundingMode.ROUND_HALF_DOWN, "-0.3576"); + t("0.5", 10, RoundingMode.ROUND_DOWN, "0.5235987755"); + t("0.12", 3, RoundingMode.ROUND_DOWN, "0.12"); + t("-0.5434", 8, RoundingMode.ROUND_FLOOR, "-0.57448199"); + t("0.0073911", 6, RoundingMode.ROUND_DOWN, "0.00739116"); + t("0.6413", 9, RoundingMode.ROUND_HALF_DOWN, "0.696191343"); + t("0.6695", 7, RoundingMode.ROUND_HALF_DOWN, "0.7335355"); + t("-0.73867", 9, RoundingMode.ROUND_UP, "-0.831095123"); + t("-0.734541962948526931", 1, RoundingMode.ROUND_DOWN, "-0.8"); + t("0.8124222852789144395978469359524044494", 9, RoundingMode.ROUND_HALF_DOWN, "0.94829454"); + t("0.01", 6, RoundingMode.ROUND_DOWN, "0.0100001"); + t("-0.788421", 4, RoundingMode.ROUND_DOWN, "-0.9082"); + t("-0.3", 2, RoundingMode.ROUND_CEIL, "-0.3"); + t("0.6608633389456637408497420998651914114139088612446", 2, RoundingMode.ROUND_HALF_UP, "0.72"); + t("0.3931549079701655746240375417718660050381124496506720523996527133505517587998", 23, RoundingMode.ROUND_DOWN, "0.40406030213304057779811"); + t("-0.587605525487010465245800314956501132921", 13, RoundingMode.ROUND_FLOOR, "-0.6280963940928"); + t("-0.5", 52, RoundingMode.ROUND_FLOOR, "-0.5235987755982988730771072305465838140328615665625177"); + t("0.7772699", 16, RoundingMode.ROUND_HALF_UP, "0.8903148827665578"); + t("-0.449412073227066332425902525593181", 57, RoundingMode.ROUND_HALF_EVEN, "-0.466107096571843683526424227582248251927561787620454186534"); + t("-0.88842", 56, RoundingMode.ROUND_HALF_UP, "-1.0938915908813483958517153077667620622507918440274546335"); + t("-0.5088737561", 24, RoundingMode.ROUND_FLOOR, "-0.533875977309913500769379"); + t("-0.0765762285855571311226935212468317451162677", 61, RoundingMode.ROUND_UP, "-0.07665126622547200709328366279959297473262965998499827526363485"); + t("0.002058774932399380728", 73, RoundingMode.ROUND_FLOOR, "0.002058776386773685135920502914113033566749664057124819063683489089253866675"); + t("0.6191705648197127900333", 20, RoundingMode.ROUND_FLOOR, "0.6676860026273445248"); + t("0.0451", 71, RoundingMode.ROUND_FLOOR, "0.045115302986200826677187000097752946920986469377743210302486079583770366"); + t("0.156883637", 65, RoundingMode.ROUND_HALF_EVEN, "0.15753442001936249496738123179710495311489551498086102245485050903"); + t("0.163388332624365770456915424679194860444773341061114349237610212142206187981629282902", 67, RoundingMode.ROUND_UP, "0.1641241692993679299065215302292638564718643006858786702204768697199"); + t("-0.1958", 17, RoundingMode.ROUND_HALF_DOWN, "-0.19707317438982823"); + t("0.873332", 19, RoundingMode.ROUND_HALF_DOWN, "1.062001065132184521"); + t("-0.8517325896144402", 29, RoundingMode.ROUND_UP, "-1.0192830764340094095462711303"); + t("-0.5110799", 65, RoundingMode.ROUND_CEIL, "-0.53644070128325494453237503822033662227949443391067147724566337039"); + t("-0.579334355419195148", 31, RoundingMode.ROUND_FLOOR, "-0.617911801796609232511609252874"); + + /* + t("0.63", 1, RoundingMode.ROUND_HALF_DOWN, "0.7"); + t("-0.42", 4, RoundingMode.ROUND_UP, "-0.4335"); + t("-0.3", 3, RoundingMode.ROUND_UP, "-0.305"); + t("-0.23222", 1, RoundingMode.ROUND_DOWN, "-0.2"); + t("-0.4", 10, RoundingMode.ROUND_UP, "-0.4115168461"); + t("-0.61748379107894", 5, RoundingMode.ROUND_HALF_EVEN, "-0.66554"); + t("0.455009815", 10, RoundingMode.ROUND_HALF_EVEN, "0.4723832362"); + t("0.956", 6, RoundingMode.ROUND_CEIL, "1.27305"); + t("-0.1775248228585516175158636575038799642565970877089107679", 1, RoundingMode.ROUND_FLOOR, "-0.2"); + t("0.181008275840890023616378785649", 2, RoundingMode.ROUND_UP, "0.19"); + t("0.891", 3, RoundingMode.ROUND_DOWN, "1.09"); + t("0.1", 5, RoundingMode.ROUND_HALF_DOWN, "0.10017"); + t("-0.686263763995363", 9, RoundingMode.ROUND_FLOOR, "-0.756339763"); + t("0.69724683014091", 8, RoundingMode.ROUND_DOWN, "0.77154953"); + t("0.651298905027729019177629429885652807833687105873545221358407146248004527", 3, RoundingMode.ROUND_DOWN, "0.709"); + t("0.75077", 2, RoundingMode.ROUND_HALF_EVEN, "0.85"); + t("0.16653", 7, RoundingMode.ROUND_DOWN, "0.1673094"); + t("-0.749575", 7, RoundingMode.ROUND_HALF_UP, "-0.8474198"); + t("0.3217488475048627713427457352649954429927", 6, RoundingMode.ROUND_UP, "0.327576"); + t("-0.80544", 6, RoundingMode.ROUND_FLOOR, "-0.936418"); + t("-0.37", 2, RoundingMode.ROUND_FLOOR, "-0.38"); + t("0.5248697728", 10, RoundingMode.ROUND_FLOOR, "0.5525621102"); + t("-0.4", 2, RoundingMode.ROUND_HALF_UP, "-0.41"); + t("0.9", 5, RoundingMode.ROUND_UP, "1.1198"); + t("0.038634", 1, RoundingMode.ROUND_UP, "0.04"); + t("0.3", 5, RoundingMode.ROUND_CEIL, "0.3047"); + t("0.6", 11, RoundingMode.ROUND_HALF_DOWN, "0.64350110879"); + t("0.010641", 12, RoundingMode.ROUND_UP, "0.0106412008253"); + t("-0.552842", 2, RoundingMode.ROUND_FLOOR, "-0.59"); + t("-0.18", 2, RoundingMode.ROUND_FLOOR, "-0.19"); + t("-0.36199", 5, RoundingMode.ROUND_CEIL, "-0.3704"); + t("0.49081206694359", 7, RoundingMode.ROUND_DOWN, "0.5130215"); + t("0.4399", 1, RoundingMode.ROUND_CEIL, "0.5"); + t("0.198085495342229388259", 9, RoundingMode.ROUND_HALF_EVEN, "0.199404326"); + t("-0.522549958932947079997634280434708780792733797601311537182351565434743", 2, RoundingMode.ROUND_CEIL, "-0.54"); + t("0.01833", 7, RoundingMode.ROUND_HALF_UP, "0.01833103"); + t("-0.268", 8, RoundingMode.ROUND_HALF_EVEN, "-0.27131649"); + t("-0.239202451910289658387", 8, RoundingMode.ROUND_UP, "-0.24154438"); + t("0.4591", 3, RoundingMode.ROUND_HALF_EVEN, "0.477"); + t("0.78802262831967252920540970413", 2, RoundingMode.ROUND_HALF_UP, "0.91"); + t("0.9", 3, RoundingMode.ROUND_HALF_UP, "1.12"); + t("-0.88", 5, RoundingMode.ROUND_HALF_DOWN, "-1.0759"); + t("-0.5723", 6, RoundingMode.ROUND_HALF_UP, "-0.609308"); + t("0.7", 6, RoundingMode.ROUND_DOWN, "0.775397"); + t("-0.7", 6, RoundingMode.ROUND_UP, "-0.775398"); + t("-0.4522054", 8, RoundingMode.ROUND_FLOOR, "-0.46923646"); + t("-0.113", 5, RoundingMode.ROUND_UP, "-0.11325"); + t("-0.59544836036780438444908059215410019637924557624130794309", 8, RoundingMode.ROUND_UP, "-0.63782362"); + t("-0.8804947019118704939130792535649732135635599548043341124", 2, RoundingMode.ROUND_CEIL, "-1"); + t("-0.52717431619592748160776804177287921392640260092349058764002", 10, RoundingMode.ROUND_HALF_UP, "-0.5552718383"); + t("-0.829012721483594802508421432835533409949342660577025041776237199892", 4, RoundingMode.ROUND_FLOOR, "-0.9774"); + t("-0.61525293962197", 1, RoundingMode.ROUND_HALF_DOWN, "-0.7"); + t("0.387756961344428886504142532754525460309670339239623120629910689", 4, RoundingMode.ROUND_HALF_EVEN, "0.3982"); + t("0.04847", 10, RoundingMode.ROUND_CEIL, "0.04848899886"); + t("-0.092944756533698", 6, RoundingMode.ROUND_DOWN, "-0.0930791"); + t("-0.6", 10, RoundingMode.ROUND_CEIL, "-0.6435011087"); + t("0.9", 3, RoundingMode.ROUND_FLOOR, "1.11"); + t("0.17313", 5, RoundingMode.ROUND_UP, "0.17401"); + t("0.1439933", 7, RoundingMode.ROUND_UP, "0.1444956"); + t("-0.7770304", 1, RoundingMode.ROUND_HALF_DOWN, "-0.9"); + t("-0.0402", 7, RoundingMode.ROUND_HALF_DOWN, "-0.04021084"); + t("-0.31146236785967723719283", 7, RoundingMode.ROUND_DOWN, "-0.3167315"); + t("-0.9", 5, RoundingMode.ROUND_HALF_UP, "-1.1198"); + t("-0.11931358908883", 4, RoundingMode.ROUND_HALF_UP, "-0.1196"); + t("-0.701", 9, RoundingMode.ROUND_HALF_UP, "-0.776798739"); + t("0.4", 5, RoundingMode.ROUND_UP, "0.41152"); + t("-0.8993689143436422584255355459267605879928490231754075653278668263", 3, RoundingMode.ROUND_FLOOR, "-1.12"); + t("0.34219", 6, RoundingMode.ROUND_HALF_EVEN, "0.349247"); + t("-0.9642", 1, RoundingMode.ROUND_CEIL, "-1"); + t("0.6", 5, RoundingMode.ROUND_UP, "0.64351"); + t("0.22656", 3, RoundingMode.ROUND_UP, "0.229"); + t("0.8", 3, RoundingMode.ROUND_UP, "0.928"); + t("0.555", 6, RoundingMode.ROUND_HALF_EVEN, "0.588363"); + t("-0.9", 7, RoundingMode.ROUND_CEIL, "-1.119769"); + t("0.2945884", 1, RoundingMode.ROUND_HALF_UP, "0.3"); + t("0.120848406", 10, RoundingMode.ROUND_HALF_DOWN, "0.1211445079"); + t("-0.9", 3, RoundingMode.ROUND_HALF_EVEN, "-1.12"); + t("-0.9257", 8, RoundingMode.ROUND_UP, "-1.1828821"); + t("-0.37616471244017872054", 2, RoundingMode.ROUND_CEIL, "-0.38"); + t("-0.1157756923117603310605647347810722526443124459530686783555310338034661982", 2, RoundingMode.ROUND_DOWN, "-0.11"); + t("-0.041", 5, RoundingMode.ROUND_FLOOR, "-0.041012"); + t("0.237293671", 9, RoundingMode.ROUND_HALF_EVEN, "0.239578999"); + t("0.76", 2, RoundingMode.ROUND_DOWN, "0.86"); + t("0.59436831223719718487821431508739825011632107", 6, RoundingMode.ROUND_UP, "0.63648"); + t("0.7336894544510273054523385966830850809044651", 2, RoundingMode.ROUND_HALF_UP, "0.82"); + t("0.351", 5, RoundingMode.ROUND_HALF_DOWN, "0.35864"); + t("0.0786546928746697509652910267068549", 2, RoundingMode.ROUND_FLOOR, "0.078"); + t("0.01", 10, RoundingMode.ROUND_CEIL, "0.01000016668"); + t("0.3200311", 3, RoundingMode.ROUND_HALF_EVEN, "0.326"); + t("-0.216644648381156452509718968216656434", 8, RoundingMode.ROUND_CEIL, "-0.21837617"); + t("0.103", 1, RoundingMode.ROUND_HALF_EVEN, "0.1"); + t("0.28", 7, RoundingMode.ROUND_HALF_DOWN, "0.2837941"); + t("0.0709415", 7, RoundingMode.ROUND_DOWN, "0.07100113"); + t("0.5822318", 7, RoundingMode.ROUND_CEIL, "0.6214711"); + t("-0.96", 7, RoundingMode.ROUND_HALF_DOWN, "-1.287002"); + t("0.34479", 4, RoundingMode.ROUND_DOWN, "0.352"); + t("-0.917444", 9, RoundingMode.ROUND_CEIL, "-1.16160784"); + t("0.57802", 5, RoundingMode.ROUND_HALF_UP, "0.6163"); + t("-0.7688358078701372229283081492614708733791170179074769178295638382044", 9, RoundingMode.ROUND_DOWN, "-0.877018528"); + t("-0.225439883365270672411", 9, RoundingMode.ROUND_FLOOR, "-0.22739452"); + t("-0.21033", 3, RoundingMode.ROUND_HALF_DOWN, "-0.212"); + t("-0.1675", 8, RoundingMode.ROUND_HALF_UP, "-0.16829329"); + t("-0.617", 8, RoundingMode.ROUND_HALF_DOWN, "-0.66492486"); + t("-0.927104", 2, RoundingMode.ROUND_CEIL, "-1.1"); + t("-0.141447", 7, RoundingMode.ROUND_FLOOR, "-0.141923"); + t("-0.050383992801828175", 2, RoundingMode.ROUND_FLOOR, "-0.051"); + t("0.239022117094843113053902548571950140239391202297872832", 6, RoundingMode.ROUND_FLOOR, "0.241358"); + t("0.2586950729", 7, RoundingMode.ROUND_HALF_UP, "0.261671"); + t("0.907964540818538", 2, RoundingMode.ROUND_DOWN, "1.1"); + t("-0.800488044837154421790417180936088835879209324732903904949839162", 4, RoundingMode.ROUND_DOWN, "-0.9281"); + t("0.602643", 7, RoundingMode.ROUND_DOWN, "0.6468089"); + t("0.352142399529899761102056545", 1, RoundingMode.ROUND_CEIL, "0.4"); + t("-0.3752", 8, RoundingMode.ROUND_UP, "-0.38461253"); + t("0.74", 2, RoundingMode.ROUND_CEIL, "0.84"); + t("0.76464", 5, RoundingMode.ROUND_FLOOR, "0.87048"); + t("0.441", 7, RoundingMode.ROUND_FLOOR, "0.4567125"); + t("-0.9", 4, RoundingMode.ROUND_HALF_EVEN, "-1.12"); + t("0.1", 6, RoundingMode.ROUND_HALF_UP, "0.100167"); + t("-0.5", 2, RoundingMode.ROUND_HALF_DOWN, "-0.52"); + t("-0.5", 9, RoundingMode.ROUND_DOWN, "-0.523598775"); + t("0.053327854045759137", 9, RoundingMode.ROUND_FLOOR, "0.0533531626"); + t("-0.459844405135307941547798662", 10, RoundingMode.ROUND_HALF_DOWN, "-0.477819971"); + t("0.9768", 7, RoundingMode.ROUND_HALF_DOWN, "1.354971"); + t("-0.72782", 4, RoundingMode.ROUND_CEIL, "-0.8151"); + t("-0.13193499248", 6, RoundingMode.ROUND_FLOOR, "-0.132321"); + t("-0.08", 2, RoundingMode.ROUND_HALF_EVEN, "-0.08"); + t("-0.109882", 4, RoundingMode.ROUND_CEIL, "-0.1101"); + t("0.712329", 6, RoundingMode.ROUND_DOWN, "0.792811"); + t("0.3661032553135184679354126083298596286480428128162671492434245654", 5, RoundingMode.ROUND_DOWN, "0.37481"); + t("0.49290402205414220423916", 6, RoundingMode.ROUND_HALF_UP, "0.515424"); + t("0.6264647", 8, RoundingMode.ROUND_HALF_EVEN, "0.67700926"); + t("0.9384303835636095432873699", 7, RoundingMode.ROUND_HALF_DOWN, "1.218058"); + t("-0.6148", 10, RoundingMode.ROUND_HALF_EVEN, "-0.6621323541"); + t("0.076711692", 2, RoundingMode.ROUND_DOWN, "0.076"); + t("0.9", 5, RoundingMode.ROUND_UP, "1.1198"); + t("0.777237019", 2, RoundingMode.ROUND_FLOOR, "0.89"); + t("-0.12755969", 1, RoundingMode.ROUND_HALF_EVEN, "-0.1"); + t("0.2", 2, RoundingMode.ROUND_DOWN, "0.2"); + t("-0.09", 8, RoundingMode.ROUND_HALF_DOWN, "-0.090121945"); + t("-0.366567449704574472588", 7, RoundingMode.ROUND_FLOOR, "-0.375317"); + t("-0.2", 5, RoundingMode.ROUND_FLOOR, "-0.20136"); + t("-0.589619105678072950745817997123194797230295830001452460598930192182557551228", 1, RoundingMode.ROUND_DOWN, "-0.6"); + t("0.5", 3, RoundingMode.ROUND_UP, "0.524"); + t("-0.51643922124021909421175831823535", 6, RoundingMode.ROUND_HALF_UP, "-0.542687"); + t("-0.85", 4, RoundingMode.ROUND_CEIL, "-1.015"); + t("0.816306", 1, RoundingMode.ROUND_HALF_DOWN, "1"); + t("-0.296", 12, RoundingMode.ROUND_FLOOR, "-0.300502263485"); + t("0.1189382674147513186598892955332505010958649576995317057162822579400492744199313", 18, RoundingMode.ROUND_FLOOR, "0.119220490682749456"); + t("-0.4", 19, RoundingMode.ROUND_HALF_EVEN, "-0.4115168460674880194"); + t("0.02277511555873663", 16, RoundingMode.ROUND_HALF_DOWN, "0.02277708494955459"); + t("0.900867876943271178105288470109342419889565287226604687286044770547497", 12, RoundingMode.ROUND_HALF_EVEN, "1.12176467209"); + t("-0.1125", 5, RoundingMode.ROUND_HALF_UP, "-0.11274"); + t("-0.2", 9, RoundingMode.ROUND_HALF_EVEN, "-0.201357921"); + t("-0.91", 9, RoundingMode.ROUND_CEIL, "-1.14328406"); + t("-0.93175582866430679075", 1, RoundingMode.ROUND_FLOOR, "-2"); + t("0.255035032969825857910675", 13, RoundingMode.ROUND_FLOOR, "0.2578839340994"); + t("0.728937", 14, RoundingMode.ROUND_HALF_UP, "0.81676788910487"); + t("-0.6437697", 17, RoundingMode.ROUND_CEIL, "-0.69941441931670547"); + t("-0.113056", 7, RoundingMode.ROUND_FLOOR, "-0.1132983"); + t("-0.05", 18, RoundingMode.ROUND_CEIL, "-0.0500208568057700146"); + t("-0.966", 20, RoundingMode.ROUND_HALF_EVEN, "-1.3092836776345883128"); + t("0.3912", 18, RoundingMode.ROUND_UP, "0.401935146489218573"); + t("0.92638514271", 17, RoundingMode.ROUND_UP, "1.1846973510634683"); + t("0.47329567037", 2, RoundingMode.ROUND_CEIL, "0.5"); + t("0.33591814575421702599636", 5, RoundingMode.ROUND_CEIL, "0.34258"); + t("0.5235764", 5, RoundingMode.ROUND_CEIL, "0.55105"); + t("0.3768842", 13, RoundingMode.ROUND_UP, "0.3864301359616"); + t("-0.120235891", 2, RoundingMode.ROUND_HALF_EVEN, "-0.12"); + t("-0.9732390599", 7, RoundingMode.ROUND_FLOOR, "-1.33893"); + t("-0.884287", 19, RoundingMode.ROUND_DOWN, "-1.084964845911474525"); + t("-0.73505", 7, RoundingMode.ROUND_CEIL, "-0.8257404"); + t("0.85", 14, RoundingMode.ROUND_CEIL, "1.0159852938149"); + t("-0.7138415389359997011616777580345310822241", 4, RoundingMode.ROUND_UP, "-0.795"); + t("0.2652139049627332", 18, RoundingMode.ROUND_HALF_EVEN, "0.268425765034485515"); + t("0.53776744497723661", 15, RoundingMode.ROUND_HALF_EVEN, "0.567786813743787"); + t("-0.49486785", 18, RoundingMode.ROUND_DOWN, "-0.517682748142279263"); + t("0.943538782613835870681596", 3, RoundingMode.ROUND_HALF_EVEN, "1.23"); + t("-0.0301", 20, RoundingMode.ROUND_CEIL, "-0.03010454700424480901"); + t("0.7", 12, RoundingMode.ROUND_HALF_UP, "0.775397496611"); + t("-0.83120363", 20, RoundingMode.ROUND_HALF_DOWN, "-0.9812691201257641077"); + t("-0.2303", 8, RoundingMode.ROUND_CEIL, "-0.23238595"); + t("0.3042003933281961", 9, RoundingMode.ROUND_CEIL, "0.30909893"); + t("0.317", 18, RoundingMode.ROUND_HALF_EVEN, "0.322564671042011057"); + t("-0.2", 11, RoundingMode.ROUND_UP, "-0.2013579208"); + t("-0.0834965929059675683890230990563284162647", 20, RoundingMode.ROUND_FLOOR, "-0.083593917149410347054"); + t("-0.084365452438034577900866969139351424273068861100358322133917314597", 8, RoundingMode.ROUND_HALF_EVEN, "-0.084465853"); + t("0.93770496898506", 8, RoundingMode.ROUND_FLOOR, "1.2159646"); + t("-0.195935635516318", 13, RoundingMode.ROUND_HALF_UP, "-0.1972114890182"); + t("-0.3691356798927358359", 10, RoundingMode.ROUND_DOWN, "-0.3780788477"); + t("-0.346206438963729304055013381519396532846", 6, RoundingMode.ROUND_HALF_UP, "-0.353524"); + t("0.92869426364", 6, RoundingMode.ROUND_CEIL, "1.19088"); + t("0.4056", 3, RoundingMode.ROUND_UP, "0.418"); + t("-0.51", 14, RoundingMode.ROUND_UP, "-0.5351847902756"); + t("0.9688100538387653392717235065534415451158", 2, RoundingMode.ROUND_HALF_DOWN, "1.3"); + t("-0.7", 20, RoundingMode.ROUND_FLOOR, "-0.77539749661075306375"); + t("0.98837866022", 13, RoundingMode.ROUND_UP, "1.418192794367"); + t("0.863", 10, RoundingMode.ROUND_DOWN, "1.041178086"); + t("0.01100229", 7, RoundingMode.ROUND_CEIL, "0.01100252"); + t("0.7", 1, RoundingMode.ROUND_CEIL, "0.8"); + t("0.966", 20, RoundingMode.ROUND_CEIL, "1.3092836776345883129"); + t("0.751725706426246874549877085", 17, RoundingMode.ROUND_CEIL, "0.85067497550687094"); + t("-0.4", 10, RoundingMode.ROUND_DOWN, "-0.411516846"); + t("-0.6", 9, RoundingMode.ROUND_CEIL, "-0.643501108"); + t("-0.74115329346113364256", 13, RoundingMode.ROUND_UP, "-0.8347866416024"); + t("-0.87219826167709", 14, RoundingMode.ROUND_HALF_EVEN, "-1.0596784934336"); + t("0.724", 15, RoundingMode.ROUND_HALF_EVEN, "0.809583593564425"); + t("0.0451", 17, RoundingMode.ROUND_UP, "0.045115302986200827"); + t("0.2", 5, RoundingMode.ROUND_FLOOR, "0.20135"); + t("-0.3", 7, RoundingMode.ROUND_HALF_UP, "-0.3046927"); + t("-0.2671348190838033756154768119054559426129215883124539908708797269940573813", 12, RoundingMode.ROUND_FLOOR, "-0.270418570196"); + t("0.7", 17, RoundingMode.ROUND_FLOOR, "0.77539749661075306"); + t("-0.04423891089652", 5, RoundingMode.ROUND_HALF_EVEN, "-0.044253"); + t("0.3", 7, RoundingMode.ROUND_HALF_DOWN, "0.3046927"); + t("0.956820847", 2, RoundingMode.ROUND_HALF_UP, "1.3"); + t("0.28", 7, RoundingMode.ROUND_UP, "0.2837942"); + t("-0.073849036", 16, RoundingMode.ROUND_UP, "-0.07391632610814796"); + t("0.97218219897", 2, RoundingMode.ROUND_HALF_DOWN, "1.3"); + t("0.5", 13, RoundingMode.ROUND_DOWN, "0.5235987755982"); + t("0.567972", 17, RoundingMode.ROUND_HALF_UP, "0.60403974207948756"); + t("0.79208985914074716641427597001334", 15, RoundingMode.ROUND_CEIL, "0.914225160436194"); + t("0.6085", 9, RoundingMode.ROUND_DOWN, "0.654168987"); + t("-0.59", 11, RoundingMode.ROUND_HALF_DOWN, "-0.63105884078"); + t("0.418", 1, RoundingMode.ROUND_DOWN, "0.4"); + t("-0.626", 2, RoundingMode.ROUND_HALF_EVEN, "-0.68"); + t("0.6906329873709", 2, RoundingMode.ROUND_HALF_EVEN, "0.76"); + t("-0.9080967937480431", 8, RoundingMode.ROUND_CEIL, "-1.1387165"); + t("0.524828", 4, RoundingMode.ROUND_HALF_EVEN, "0.5525"); + t("0.5", 2, RoundingMode.ROUND_CEIL, "0.53"); + t("0.286", 20, RoundingMode.ROUND_HALF_UP, "0.29004985708941642842"); + t("0.72037813", 4, RoundingMode.ROUND_FLOOR, "0.8043"); + t("-0.8408235358161428", 14, RoundingMode.ROUND_CEIL, "-0.9988028070372"); + t("-0.9365619", 19, RoundingMode.ROUND_HALF_UP, "-1.212689037111932"); + t("0.510952142014368034735949948", 10, RoundingMode.ROUND_HALF_DOWN, "0.5362920714"); + t("-0.582604186482", 18, RoundingMode.ROUND_UP, "-0.6219291678276465"); + t("0.076248856451812760242578743794169383764890062176767609", 2, RoundingMode.ROUND_HALF_UP, "0.076"); + t("0.926", 4, RoundingMode.ROUND_UP, "1.184"); + t("0.1271530013291553992134351", 13, RoundingMode.ROUND_UP, "0.1274981509594"); + t("0.316685978501828764211964615979572098542307922672217639", 1, RoundingMode.ROUND_HALF_DOWN, "0.3"); + t("-0.8", 15, RoundingMode.ROUND_HALF_UP, "-0.927295218001612"); + t("0.501416369709526604587612814266516597679771317790097", 9, RoundingMode.ROUND_DOWN, "0.525235032"); + t("0.15", 13, RoundingMode.ROUND_HALF_DOWN, "0.1505682727767"); + t("0.3", 1, RoundingMode.ROUND_DOWN, "0.3"); + t("-0.0100114", 20, RoundingMode.ROUND_CEIL, "-0.010011567244860011205"); + t("0.002414", 16, RoundingMode.ROUND_CEIL, "0.002414002344561806"); + t("-0.3", 9, RoundingMode.ROUND_UP, "-0.304692655"); + t("0.61", 5, RoundingMode.ROUND_HALF_UP, "0.65606"); + t("-0.80402863", 9, RoundingMode.ROUND_UP, "-0.934039981"); + t("-0.86", 17, RoundingMode.ROUND_UP, "-1.0352696724805088"); + t("-0.7224104", 14, RoundingMode.ROUND_HALF_UP, "-0.80728193550786"); + t("0.8425709474040469573841295", 8, RoundingMode.ROUND_HALF_EVEN, "1.0020391"); + t("0.04812", 4, RoundingMode.ROUND_HALF_DOWN, "0.04814"); + t("-0.7", 5, RoundingMode.ROUND_HALF_EVEN, "-0.7754"); + t("0.1", 14, RoundingMode.ROUND_CEIL, "0.10016742116156"); + t("0.4", 6, RoundingMode.ROUND_HALF_EVEN, "0.411517"); + t("-0.14493715757691474822", 18, RoundingMode.ROUND_DOWN, "-0.145449459142623526"); + t("-0.1", 1, RoundingMode.ROUND_FLOOR, "-0.2"); + t("0.9329835060074", 1, RoundingMode.ROUND_HALF_DOWN, "1"); + t("-0.003", 5, RoundingMode.ROUND_HALF_EVEN, "-0.003"); + t("-0.59892883", 3, RoundingMode.ROUND_HALF_UP, "-0.642"); + t("-0.98604036642", 12, RoundingMode.ROUND_HALF_DOWN, "-1.4035107411"); + t("0.404938850204554408251963703", 7, RoundingMode.ROUND_HALF_DOWN, "0.416912"); + t("-0.2", 17, RoundingMode.ROUND_DOWN, "-0.20135792079033079"); + t("0.6222455", 14, RoundingMode.ROUND_UP, "0.67160791198287"); + t("0.01", 11, RoundingMode.ROUND_HALF_EVEN, "0.010000166674"); + t("-0.96654", 17, RoundingMode.ROUND_UP, "-1.3113805280620826"); + t("0.91313436995648", 9, RoundingMode.ROUND_HALF_EVEN, "1.15090775"); + t("0.440721", 13, RoundingMode.ROUND_HALF_EVEN, "0.4564017287896"); + t("-0.0136", 1, RoundingMode.ROUND_CEIL, "-0.01"); + t("-0.605985974", 15, RoundingMode.ROUND_DOWN, "-0.651004760907426"); + t("-0.1892907651155950735544427783388814962564826192", 8, RoundingMode.ROUND_FLOOR, "-0.19043981"); + t("-0.65", 1, RoundingMode.ROUND_UP, "-0.8"); + t("0.358809547304", 16, RoundingMode.ROUND_HALF_EVEN, "0.3669922011162105"); + t("0.9728740131913928304769352327438222457436035584095671257", 18, RoundingMode.ROUND_DOWN, "1.33734603980186065"); + t("0.6674832905640981296581763957643626616255", 8, RoundingMode.ROUND_HALF_UP, "0.73082381"); + t("0.3869138", 1, RoundingMode.ROUND_DOWN, "0.3"); + t("0.5251210165548090494719722735418175288479347867385618446425", 14, RoundingMode.ROUND_HALF_UP, "0.55285730737027"); + t("0.47229", 2, RoundingMode.ROUND_UP, "0.5"); + t("-0.30007262878038", 17, RoundingMode.ROUND_FLOOR, "-0.30476879057615387"); + t("0.1674096502983", 4, RoundingMode.ROUND_HALF_DOWN, "0.1682"); + t("0.447988338619292892151980439343745779406731", 17, RoundingMode.ROUND_HALF_EVEN, "0.46451398590137947"); + t("0.730960004089412", 10, RoundingMode.ROUND_UP, "0.8197276565"); + t("0.056277358507938056009558815145654335303", 6, RoundingMode.ROUND_CEIL, "0.0563072"); + t("-0.68749033807172235207573235007834", 16, RoundingMode.ROUND_HALF_UP, "-0.7580274604478765"); + t("0.44", 13, RoundingMode.ROUND_HALF_EVEN, "0.4555986733958"); + t("0.707907", 12, RoundingMode.ROUND_UP, "0.786530485015"); + t("0.458325110549969332", 9, RoundingMode.ROUND_HALF_UP, "0.476109809"); + t("-0.1144302583", 2, RoundingMode.ROUND_UP, "-0.12"); + t("0.1497934612220924612103829458264", 4, RoundingMode.ROUND_UP, "0.1504"); + t("-0.76766908411185811325010984182477443101194230604828", 2, RoundingMode.ROUND_HALF_EVEN, "-0.88"); + t("0.84", 14, RoundingMode.ROUND_DOWN, "0.99728322237179"); + t("-0.3", 8, RoundingMode.ROUND_HALF_DOWN, "-0.30469265"); + t("-0.41071", 15, RoundingMode.ROUND_HALF_DOWN, "-0.4232326342835"); + t("0.3023597279818520303191129677876795836384121479528541036", 15, RoundingMode.ROUND_HALF_DOWN, "0.30716728652672"); + t("-0.4107104336248181501266675061424", 2, RoundingMode.ROUND_FLOOR, "-0.43"); + t("0.7", 1, RoundingMode.ROUND_UP, "0.8"); + t("-0.524", 15, RoundingMode.ROUND_HALF_DOWN, "-0.551540591306578"); + t("0.853673770767818139", 12, RoundingMode.ROUND_CEIL, "1.02299901654"); + t("-0.197", 13, RoundingMode.ROUND_UP, "-0.1982970100688"); + t("0.3", 2, RoundingMode.ROUND_DOWN, "0.3"); + t("-0.22787", 7, RoundingMode.ROUND_HALF_UP, "-0.2298896"); + t("0.7", 14, RoundingMode.ROUND_HALF_EVEN, "0.77539749661075"); + t("-0.709953797174034991", 19, RoundingMode.ROUND_UP, "-0.7894326012973310541"); + t("-0.54919296843773782560297024949968", 3, RoundingMode.ROUND_DOWN, "-0.581"); + t("0.901874471450972", 16, RoundingMode.ROUND_UP, "1.124089123865628"); + t("-0.454621115462736711056810102802204119571763447767392038221175", 16, RoundingMode.ROUND_UP, "-0.4719467823312298"); + t("0.092843970623392", 15, RoundingMode.ROUND_CEIL, "0.0929778765802304"); + t("0.3", 1, RoundingMode.ROUND_UP, "0.4"); + t("-0.549759263815634959544", 14, RoundingMode.ROUND_FLOOR, "-0.58207601525115"); + t("-0.841", 1, RoundingMode.ROUND_HALF_EVEN, "-1"); + t("0.9", 19, RoundingMode.ROUND_HALF_UP, "1.119769514998634187"); + t("0.095929", 12, RoundingMode.ROUND_UP, "0.0960767417038"); + t("-0.214442194739", 38, RoundingMode.ROUND_HALF_EVEN, "-0.21612070327747751292884330498674621216"); + t("0.90456", 26, RoundingMode.ROUND_DOWN, "1.1303465640173503262170021"); + t("0.42514", 34, RoundingMode.ROUND_HALF_EVEN, "0.439116554315784172224232636961289"); + t("-0.11232964063539206000844646913", 27, RoundingMode.ROUND_HALF_DOWN, "-0.112567220382981483856528312"); + t("0.48103337226643477", 31, RoundingMode.ROUND_UP, "0.5018330355139358592630169769839"); + t("-0.86249247016222106729937", 1, RoundingMode.ROUND_CEIL, "-1"); + t("0.294145849001529120445733045", 25, RoundingMode.ROUND_HALF_EVEN, "0.2985617083818435365088161"); + t("-0.09264201259223031224732873656", 13, RoundingMode.ROUND_UP, "-0.09277504435828"); + t("0.1", 37, RoundingMode.ROUND_DOWN, "0.1001674211615597963455231794526933185"); + t("-0.8", 40, RoundingMode.ROUND_UP, "-0.9272952180016122324285124629224288040571"); + t("0.445978250109332766318294", 22, RoundingMode.ROUND_UP, "0.462266926998202347019"); + t("0.9374389978306204625165652372606903259104220700258499", 15, RoundingMode.ROUND_HALF_UP, "1.21519986547048"); + t("-0.137", 17, RoundingMode.ROUND_CEIL, "-0.13743221942503327"); + t("0.45536948061916284200144244035427", 14, RoundingMode.ROUND_UP, "0.47278717578735"); + t("-0.1523262921", 10, RoundingMode.ROUND_DOWN, "-0.152921608"); + t("-0.4846286263675223", 17, RoundingMode.ROUND_HALF_EVEN, "-0.50593855485683549"); + t("-0.254609", 17, RoundingMode.ROUND_CEIL, "-0.25744335677490326"); + t("-0.19168361547215937756370914425751831291252899837161", 1, RoundingMode.ROUND_HALF_UP, "-0.2"); + t("-0.0355405425900098", 36, RoundingMode.ROUND_HALF_UP, "-0.0355480289013274977583242033320119043"); + t("-0.8897", 22, RoundingMode.ROUND_FLOOR, "-1.096687639733042593221"); + t("0.17010191", 7, RoundingMode.ROUND_CEIL, "0.1709331"); + t("-0.025286197", 25, RoundingMode.ROUND_FLOOR, "-0.02528889240660659621831979"); + t("0.49264384408392639909800886326", 17, RoundingMode.ROUND_FLOOR, "0.51512524396478716"); + t("-0.310852086818574548693074656242386195892780798282312718800170341401433990453459563027524", 19, RoundingMode.ROUND_FLOOR, "-0.3160894021721673686"); + t("-0.75819357879475794976304753", 12, RoundingMode.ROUND_HALF_EVEN, "-0.860538175199"); + t("0.39565364759154714638", 9, RoundingMode.ROUND_FLOOR, "0.406779466"); + t("-0.38486773103224246403129838458978046033229", 5, RoundingMode.ROUND_HALF_EVEN, "-0.39506"); + t("-0.08923189127892126448947354638794724", 28, RoundingMode.ROUND_UP, "-0.08935073322351918181359438341"); + t("0.84438612", 21, RoundingMode.ROUND_DOWN, "1.00541826536411643404"); + t("0.137950420517414", 22, RoundingMode.ROUND_FLOOR, "0.1383917505295168633674"); + t("-0.9906267834931096", 8, RoundingMode.ROUND_FLOOR, "-1.4337716"); + t("0.2479552466454144", 16, RoundingMode.ROUND_DOWN, "0.2505690168280783"); + t("0.6570699446206", 18, RoundingMode.ROUND_HALF_UP, "0.71692525080945887"); + t("0.898082168919676838903721162818579", 38, RoundingMode.ROUND_CEIL, "1.1153895002625983129725235829547933528"); + t("0.8", 7, RoundingMode.ROUND_CEIL, "0.9272953"); + t("0.7", 39, RoundingMode.ROUND_HALF_UP, "0.775397496610753063740353352714987113556"); + t("0.4419483025256920284455962", 19, RoundingMode.ROUND_HALF_EVEN, "0.457769436845684137"); + t("0.824140634544280011", 26, RoundingMode.ROUND_FLOOR, "0.96868323985551506438728023"); + t("0.04506476559722269245209774", 17, RoundingMode.ROUND_FLOOR, "0.045080032723175797"); + t("-0.93139921362809228293", 24, RoundingMode.ROUND_CEIL, "-1.19823813329221799836312"); + t("0.1729991", 7, RoundingMode.ROUND_HALF_DOWN, "0.1738739"); + t("-0.121130266591414365", 12, RoundingMode.ROUND_UP, "-0.121428454457"); + t("0.383425017", 19, RoundingMode.ROUND_HALF_EVEN, "0.3935019006937576522"); + t("-0.209522056780080638407670059490386", 32, RoundingMode.ROUND_HALF_EVEN, "-0.21108614164163226079025384617692"); + t("-0.9599888022399013892", 17, RoundingMode.ROUND_FLOOR, "-1.2869622283275903"); + t("0.74004147", 28, RoundingMode.ROUND_HALF_DOWN, "0.8331320160626251154465436711"); + t("0.4517856216980300365184687211547777315189210155622631960451", 23, RoundingMode.ROUND_HALF_DOWN, "0.46876586114635543427993"); + t("-0.7739", 2, RoundingMode.ROUND_CEIL, "-0.88"); + t("-0.6518350307955", 35, RoundingMode.ROUND_FLOOR, "-0.71000166117905260831777939676592687"); + t("0.6429839", 17, RoundingMode.ROUND_FLOOR, "0.698387967159417"); + t("0.646344530810939475514571898683", 14, RoundingMode.ROUND_HALF_UP, "0.70278402913021"); + t("-0.13843", 16, RoundingMode.ROUND_HALF_DOWN, "-0.1388759758160133"); + t("-0.51", 34, RoundingMode.ROUND_HALF_UP, "-0.5351847902755998475404740502029014"); + t("0.943", 19, RoundingMode.ROUND_HALF_UP, "1.231532757504771466"); + t("-0.06", 21, RoundingMode.ROUND_HALF_DOWN, "-0.0600360584452784224998"); + t("-0.32371646", 30, RoundingMode.ROUND_HALF_EVEN, "-0.329654826129577205029657467332"); + t("0.989", 28, RoundingMode.ROUND_UP, "1.422336055798236874544506044"); + t("0.836787", 22, RoundingMode.ROUND_UP, "0.9913884482647171037894"); + t("0.43239", 27, RoundingMode.ROUND_CEIL, "0.447141685741775573557528876"); + t("0.05188827367801", 13, RoundingMode.ROUND_HALF_DOWN, "0.05191158587058"); + t("0.1199", 10, RoundingMode.ROUND_CEIL, "0.1201891552"); + t("0.26969813296722270712364809918944407", 38, RoundingMode.ROUND_DOWN, "0.27307953452204108138951668123457840347"); + t("-0.780661", 23, RoundingMode.ROUND_HALF_UP, "-0.89572279627921059038907"); + t("-0.483159819865913", 24, RoundingMode.ROUND_DOWN, "-0.50426016111388050523484"); + t("0.34458227", 36, RoundingMode.ROUND_CEIL, "0.351793766285238799756626274469063682"); + t("-0.6370086311035339942197", 20, RoundingMode.ROUND_HALF_DOWN, "-0.69061143641317621575"); + t("0.75280528165896709", 38, RoundingMode.ROUND_DOWN, "0.85231352644037875015466738240213080986"); + t("0.669902569", 15, RoundingMode.ROUND_CEIL, "0.734077550470747"); + t("-0.51832782142301957259", 10, RoundingMode.ROUND_HALF_UP, "-0.5448944412"); + t("-0.11", 39, RoundingMode.ROUND_FLOOR, "-0.110223049987746633176471329435093237487"); + t("0.1109686836089507902070956844359806295826497815215481101961728578777", 10, RoundingMode.ROUND_UP, "0.1111977006"); + t("0.1206799339144384494670508021076546303171474719928947768", 27, RoundingMode.ROUND_UP, "0.120974793752260780894043276"); + t("-0.83", 32, RoundingMode.ROUND_FLOOR, "-0.97910768436835265478823916106724"); + t("-0.397", 5, RoundingMode.ROUND_HALF_EVEN, "-0.40825"); + t("0.03774610274882809554072034855", 3, RoundingMode.ROUND_UP, "0.0378"); + t("-0.00227330837615", 12, RoundingMode.ROUND_FLOOR, "-0.00227331033421"); + t("-0.3", 30, RoundingMode.ROUND_FLOOR, "-0.304692654015397507972002961228"); + t("0.0589686468199023729811487670459085219706255665411254524", 17, RoundingMode.ROUND_HALF_DOWN, "0.05900287569997485"); + t("-0.133710649046340440740274736565", 5, RoundingMode.ROUND_CEIL, "-0.13411"); + t("-0.288754694896431509083614249277642756259528726520596966415292885940349468", 31, RoundingMode.ROUND_HALF_DOWN, "-0.2929258707945849884702780286348"); + t("-0.85673152660938", 17, RoundingMode.ROUND_UP, "-1.0288987527231478"); + t("-0.89966274351908497311854023521790124088", 23, RoundingMode.ROUND_HALF_DOWN, "-1.1189964125259290577141"); + t("-0.96", 21, RoundingMode.ROUND_UP, "-1.28700221758656877361"); + t("-0.7", 36, RoundingMode.ROUND_UP, "-0.775397496610753063740353352714987114"); + t("-0.6960770858", 18, RoundingMode.ROUND_DOWN, "-0.76991900030710295"); + t("0.99204081", 35, RoundingMode.ROUND_CEIL, "1.4445444310930748533015958998604789"); + t("-0.10873809866", 17, RoundingMode.ROUND_DOWN, "-0.10895353299765856"); + t("-0.944904537058153665591", 20, RoundingMode.ROUND_CEIL, "-1.2373028529072940371"); + t("0.7751192039672555259", 32, RoundingMode.ROUND_UP, "0.88690374226463417260817604732923"); + t("-0.61775491369465120022960019235335116912185170401034136210833289458037", 16, RoundingMode.ROUND_HALF_EVEN, "-0.665884493051567"); + t("0.2303", 3, RoundingMode.ROUND_FLOOR, "0.232"); + t("0.59068891179984355692759215265", 8, RoundingMode.ROUND_UP, "0.63191236"); + t("-0.364142017501657996664733667433414", 36, RoundingMode.ROUND_UP, "-0.372711405916914280672202082524072966"); + t("-0.4", 29, RoundingMode.ROUND_HALF_EVEN, "-0.41151684606748801938473789762"); + t("0.9512645857", 25, RoundingMode.ROUND_HALF_DOWN, "1.257311087337661820531381"); + t("0.555044564223513030557946443", 29, RoundingMode.ROUND_UP, "0.58841653949885867116753002749"); + t("0.77", 1, RoundingMode.ROUND_UP, "0.9"); + t("0.74951769465392563942637", 11, RoundingMode.ROUND_HALF_DOWN, "0.84733320297"); + t("0.58528728692706285824848037852013900905119890701698772", 20, RoundingMode.ROUND_CEIL, "0.62523432637968231086"); + t("-0.03013311416564", 5, RoundingMode.ROUND_HALF_DOWN, "-0.030138"); + t("-0.77520756", 37, RoundingMode.ROUND_FLOOR, "-0.8870435990436814974609923156580705139"); + t("0.44902", 34, RoundingMode.ROUND_HALF_DOWN, "0.4656682527542793936519979249023969"); + t("-0.8575", 11, RoundingMode.ROUND_FLOOR, "-1.0303905767"); + t("0.9721702354759497173840587829175741568278214901155520454576848663475567103362394914598", 8, RoundingMode.ROUND_FLOOR, "1.334323"); + t("-0.046", 8, RoundingMode.ROUND_HALF_EVEN, "-0.046016238"); + t("0.6874110905", 10, RoundingMode.ROUND_FLOOR, "0.7579183387"); + t("0.39012", 35, RoundingMode.ROUND_HALF_UP, "0.40076191565541987886614505572039159"); + t("-0.941246678013254896453651963690744225939", 8, RoundingMode.ROUND_HALF_EVEN, "-1.226303"); + t("0.169158806641414522195722", 31, RoundingMode.ROUND_DOWN, "0.1699761132901922320068101828125"); + t("-0.292", 30, RoundingMode.ROUND_HALF_DOWN, "-0.296317307356806630985210367769"); + t("0.8546087603127649", 4, RoundingMode.ROUND_HALF_UP, "1.025"); + t("-0.3", 2, RoundingMode.ROUND_CEIL, "-0.3"); + t("0.9657337775208024135670339241078825398849", 6, RoundingMode.ROUND_DOWN, "1.30825"); + t("-0.2182", 27, RoundingMode.ROUND_CEIL, "-0.219969645396290782022143581"); + t("-0.747425510733135870761339000917691875", 3, RoundingMode.ROUND_HALF_DOWN, "-0.844"); + t("0.1", 1, RoundingMode.ROUND_HALF_EVEN, "0.1"); + t("0.67928650694170094260270597650609", 40, RoundingMode.ROUND_HALF_UP, "0.74678996728022541083269447625264364662"); + t("-0.6", 23, RoundingMode.ROUND_DOWN, "-0.6435011087932843868028"); + t("0.22197552234770043642", 39, RoundingMode.ROUND_DOWN, "0.223840073055066344504871831867081096561"); + t("-0.20882006719810998770027535447976807310479440899918247622", 5, RoundingMode.ROUND_DOWN, "-0.21036"); + t("0.1", 12, RoundingMode.ROUND_HALF_EVEN, "0.100167421162"); + t("0.1217440321533906902", 5, RoundingMode.ROUND_HALF_UP, "0.12205"); + t("-0.8", 18, RoundingMode.ROUND_FLOOR, "-0.927295218001612233"); + t("-0.49887", 17, RoundingMode.ROUND_CEIL, "-0.52229445472944901"); + t("0.932858", 13, RoundingMode.ROUND_CEIL, "1.202266568946"); + t("-0.3", 38, RoundingMode.ROUND_HALF_UP, "-0.30469265401539750797200296122752916695"); + t("-0.42365097512319913", 30, RoundingMode.ROUND_UP, "-0.437472089275994554863244346646"); + t("0.643302712945", 3, RoundingMode.ROUND_HALF_DOWN, "0.699"); + t("-0.289", 38, RoundingMode.ROUND_HALF_EVEN, "-0.2931820999430600837251965776567802157"); + t("0.2", 10, RoundingMode.ROUND_CEIL, "0.2013579208"); + t("-0.1377963476057", 26, RoundingMode.ROUND_DOWN, "-0.13823619201239823203089137"); + t("-0.2958859504665224351467996958715572511035", 30, RoundingMode.ROUND_CEIL, "-0.300382865595372968757019208095"); + t("-0.36192198695332688", 32, RoundingMode.ROUND_HALF_UP, "-0.37032882715023175323464986942378"); + t("-0.7", 12, RoundingMode.ROUND_HALF_EVEN, "-0.775397496611"); + t("0.594094", 39, RoundingMode.ROUND_FLOOR, "0.636138868163068073734589636666972437649"); + t("-0.23873311254864491024665114788368", 18, RoundingMode.ROUND_DOWN, "-0.24106103142562323"); + t("-0.79149", 25, RoundingMode.ROUND_DOWN, "-0.9132430620999676247341609"); + t("0.346717675415607232273798344841245496486293786786271985195287863877884", 5, RoundingMode.ROUND_HALF_DOWN, "0.35407"); + t("-0.93", 19, RoundingMode.ROUND_FLOOR, "-1.194412844477168375"); + t("-0.52478919177660352489685496", 4, RoundingMode.ROUND_DOWN, "-0.5524"); + t("0.88628283525495819629045267572694817976", 26, RoundingMode.ROUND_UP, "1.0892565511812156452168012"); + t("-0.04", 39, RoundingMode.ROUND_HALF_DOWN, "-0.0400106743539889262206207193468971214893"); + t("0.43", 25, RoundingMode.ROUND_FLOOR, "0.4444927769358190387543066"); + t("0.10950546865778", 32, RoundingMode.ROUND_HALF_UP, "0.10972551298003848008728520748695"); + t("-0.3412116431091653014335862411", 13, RoundingMode.ROUND_DOWN, "-0.3482055970088"); + t("-0.543090123665191562870034727400888399519130906623676", 11, RoundingMode.ROUND_DOWN, "-0.57411289328"); + t("0.93", 1, RoundingMode.ROUND_HALF_UP, "1"); + t("-0.55", 11, RoundingMode.ROUND_FLOOR, "-0.58236423787"); + t("0.71662", 33, RoundingMode.ROUND_HALF_DOWN, "0.798944044767300765935737696512365"); + t("-0.73723818066589404", 37, RoundingMode.ROUND_UP, "-0.8289734381053287695276662780605986373"); + t("0.816858689952689985398", 3, RoundingMode.ROUND_HALF_EVEN, "0.956"); + t("0.2", 14, RoundingMode.ROUND_UP, "0.20135792079034"); + t("-0.145292285315228371195516369237719637760407535104", 35, RoundingMode.ROUND_HALF_UP, "-0.14580838618458364401102969384285022"); + t("-0.7", 19, RoundingMode.ROUND_HALF_UP, "-0.7753974966107530637"); + t("0.09731427", 36, RoundingMode.ROUND_CEIL, "0.0974685237104366838399482352566622868"); + t("0.2353405584", 5, RoundingMode.ROUND_HALF_UP, "0.23757"); + t("0.65447936923863652722973633600583303254441233", 35, RoundingMode.ROUND_HALF_EVEN, "0.71349382278949286067401589886050727"); + t("0.312357073794486797", 5, RoundingMode.ROUND_FLOOR, "0.31767"); + t("0.7835949991", 19, RoundingMode.ROUND_DOWN, "0.900431399728660782"); + t("0.849280419458671", 14, RoundingMode.ROUND_HALF_UP, "1.0146208042391"); + t("-0.82055194", 7, RoundingMode.ROUND_HALF_DOWN, "-0.962376"); + t("-0.69324431204", 23, RoundingMode.ROUND_HALF_DOWN, "-0.76598095939064798068676"); + t("0.9507534", 3, RoundingMode.ROUND_FLOOR, "1.25"); + t("-0.76803851339893870885297974", 14, RoundingMode.ROUND_FLOOR, "-0.87577260955185"); + t("0.1922073682572391416318223775755801001839317570539", 8, RoundingMode.ROUND_HALF_UP, "0.19341096"); + t("0.1662631485928568396", 50, RoundingMode.ROUND_UP, "0.16703885134152211681981329607064452691970594049806"); + t("0.888", 36, RoundingMode.ROUND_HALF_UP, "1.09297742954269226589937042810364683"); + t("-0.600173928688496707745271940529721", 38, RoundingMode.ROUND_HALF_DOWN, "-0.64371853738381535730491242414725967987"); + t("0.7911", 55, RoundingMode.ROUND_UP, "0.9126052178163792767527734988429844029368769200634337278"); + t("0.3546778058933924693", 17, RoundingMode.ROUND_HALF_DOWN, "0.36256944790399897"); + t("0.54974852945420690728155577708786222", 23, RoundingMode.ROUND_HALF_EVEN, "0.58206316475593915490972"); + t("0.060118090042932345105146", 59, RoundingMode.ROUND_HALF_UP, "0.060154362046838886809185813105054944264496587613207177491636"); + t("-0.931958299", 11, RoundingMode.ROUND_UP, "-1.1997771159"); + t("-0.85", 17, RoundingMode.ROUND_HALF_UP, "-1.0159852938148251"); + t("0.00484728540163", 38, RoundingMode.ROUND_HALF_EVEN, "0.0048473043839423358237266878523770760074"); + t("0.543498434548813423236124034594", 12, RoundingMode.ROUND_HALF_UP, "0.574599242663"); + t("0.69935995211", 26, RoundingMode.ROUND_HALF_DOWN, "0.77450164350724485660825547"); + t("-0.1959144111780857", 9, RoundingMode.ROUND_CEIL, "-0.197189845"); + t("0.081072313435318647723", 30, RoundingMode.ROUND_HALF_DOWN, "0.0811613880819316048755863791883"); + t("0.027847175660013282145", 61, RoundingMode.ROUND_UP, "0.02785077600243236040169718237935296235016190603593093771583647"); + t("-0.29257050689721", 65, RoundingMode.ROUND_HALF_EVEN, "-0.29691386524227749671153834836081154966816247676375381229171712332"); + t("0.880442932", 31, RoundingMode.ROUND_UP, "1.076795547668899006004509897751"); + t("-0.1", 26, RoundingMode.ROUND_DOWN, "-0.10016742116155979634552317"); + t("-0.3504", 66, RoundingMode.ROUND_HALF_DOWN, "-0.35799814613742301044937823300551936588578836920295302351995365821"); + t("-0.05", 58, RoundingMode.ROUND_CEIL, "-0.05002085680577001466274438682046411497780608049468789272874"); + t("0.650141892767202581185769151754239", 36, RoundingMode.ROUND_DOWN, "0.707771168812129492779933370377238662"); + t("0.1605163037", 69, RoundingMode.ROUND_FLOOR, "0.16121371719225770648458252159445844921574113855345575199470534739585"); + t("-0.7535655075787", 38, RoundingMode.ROUND_HALF_DOWN, "-0.85346922199312588676149594215489582423"); + t("-0.9203", 48, RoundingMode.ROUND_FLOOR, "-1.16884663979539564288537618291137334388911597096"); + t("0.9260585486218169790619", 49, RoundingMode.ROUND_HALF_DOWN, "1.183831004746563842960977686890978399025638691699"); + t("0.32583513517", 7, RoundingMode.ROUND_HALF_DOWN, "0.3318949"); + t("-0.8204561", 45, RoundingMode.ROUND_UP, "-0.962208345429652838601745975034620458311696879"); + t("0.524474", 2, RoundingMode.ROUND_FLOOR, "0.55"); + t("0.4", 8, RoundingMode.ROUND_DOWN, "0.41151684"); + t("-0.06", 52, RoundingMode.ROUND_HALF_EVEN, "-0.0600360584452784224997511634405409862766168291685094"); + t("0.169508731", 42, RoundingMode.ROUND_HALF_EVEN, "0.170331165037312025219313814970780403778706"); + t("0.014514683968306540918200851247241065338627712672733516127817397321994656418219014572451", 3, RoundingMode.ROUND_DOWN, "0.0145"); + t("0.75115", 2, RoundingMode.ROUND_CEIL, "0.85"); + t("-0.7454", 48, RoundingMode.ROUND_HALF_EVEN, "-0.841134684254171395773608179862938182353916999004"); + t("-0.52003603624158707", 61, RoundingMode.ROUND_HALF_DOWN, "-0.5468931400284696606816647744710428429138478153350878673965896"); + t("-0.7", 48, RoundingMode.ROUND_UP, "-0.775397496610753063740353352714987113555788738642"); + t("0.84082406976812389970298868945559736", 49, RoundingMode.ROUND_UP, "0.9988037934462110518444415063382030945161646296509"); + t("-0.55941162250694612150734630451460491683296939178785026286694236079230268", 16, RoundingMode.ROUND_UP, "-0.5936757919861891"); + t("0.76367006417801", 31, RoundingMode.ROUND_FLOOR, "0.8689788347704887864159489127052"); + t("0.651119", 42, RoundingMode.ROUND_DOWN, "0.709057861612001467774065546164594729375587"); + t("-0.97458023882199493690350269072606", 15, RoundingMode.ROUND_HALF_UP, "-1.34483973248817"); + t("-0.683", 19, RoundingMode.ROUND_FLOOR, "-0.751862024267626705"); + t("-0.37062678658436", 54, RoundingMode.ROUND_HALF_DOWN, "-0.379683777892570443243767980497396880129578042156446713"); + t("0.772", 47, RoundingMode.ROUND_UP, "0.88198168883342908500081258739991724104804064211"); + t("0.03895075080098", 78, RoundingMode.ROUND_UP, "0.0389606066245169059426749341279360845319502948822091372005533540922120027411761"); + t("0.64458357502274170940562656317103789175894281961451712", 56, RoundingMode.ROUND_FLOOR, "0.70047847980882727539493872666058654764001890742718993569"); + t("-0.034829766", 51, RoundingMode.ROUND_HALF_UP, "-0.0348368119183790349397587623804747126567597027863167"); + t("0.59466310806885381028848788287653604870469769043827", 8, RoundingMode.ROUND_FLOOR, "0.63684655"); + t("-0.7", 68, RoundingMode.ROUND_CEIL, "-0.77539749661075306374035335271498711355578873864116199359771996373272"); + t("-0.4898004640153758832886082675196127174", 64, RoundingMode.ROUND_DOWN, "-0.5118608691245448769699850167279641864865419857310431012826768302"); + t("0.95", 42, RoundingMode.ROUND_HALF_DOWN, "1.25323589750337525873710391866600599574114"); + t("0.04359364630809391554694395308296791081205664254257067", 76, RoundingMode.ROUND_DOWN, "0.04360746573398245418088999959499143862794493157597210874221647317409403809582"); + t("-0.130545518911239137052120114127", 2, RoundingMode.ROUND_HALF_DOWN, "-0.13"); + t("-0.835352934802096605855019", 46, RoundingMode.ROUND_HALF_DOWN, "-0.9887745059126028488539405173511882255838722327"); + t("0.816863860534682138382", 75, RoundingMode.ROUND_UP, "0.955953051519105540757517754095925541302554206023171549716471286314475759031"); + t("-0.00420270887318535819976964925205860758100762530249813246", 4, RoundingMode.ROUND_HALF_UP, "-0.004203"); + t("0.38276864903005998348705", 30, RoundingMode.ROUND_UP, "0.392791321314448517627022425141"); + t("-0.1486646656043226847", 28, RoundingMode.ROUND_HALF_EVEN, "-0.1492177954543801610791176693"); + t("-0.0606365964968678", 46, RoundingMode.ROUND_CEIL, "-0.06067381618631436658284785590514263349205451579"); + t("-0.031219528422346915948014128", 11, RoundingMode.ROUND_HALF_UP, "-0.031224602047"); + t("-0.208611897126702214847", 63, RoundingMode.ROUND_UP, "-0.210155414104450948385527563191364660160861010445018360808589475"); + t("-0.226", 60, RoundingMode.ROUND_CEIL, "-0.227969474016637231157867755678820732310371243748321178666278"); + t("-0.21543667918130054557264720917413702040163472273", 75, RoundingMode.ROUND_HALF_EVEN, "-0.217138987745390864658338187207509171695783936680689777245642210978444348793"); + t("0.97526138650186988106372276108826308796525149", 33, RoundingMode.ROUND_CEIL, "1.34790042455170230035398152719276"); + t("0.3003741592666055241", 22, RoundingMode.ROUND_HALF_DOWN, "0.3050849037044945622537"); + t("0.33255", 55, RoundingMode.ROUND_UP, "0.3390061808860287544741754482204784760347483748018993759"); + t("0.092672094141983513", 24, RoundingMode.ROUND_CEIL, "0.0928052558755017546764568"); + t("-0.872", 12, RoundingMode.ROUND_HALF_UP, "-1.0592733231"); + t("0.121377839370697059", 42, RoundingMode.ROUND_CEIL, "0.12167786752899699813296509789358719992707"); + t("-0.72679", 4, RoundingMode.ROUND_HALF_EVEN, "-0.8136"); + t("-0.05", 77, RoundingMode.ROUND_HALF_UP, "-0.050020856805770014662744386820464114977806080494687892728743980557038463938966"); + t("0.40089412307553955127806452885487910037228107869828052", 28, RoundingMode.ROUND_HALF_UP, "0.4124926222518942558461629927"); + t("-0.7464676833645946285560297214148508678585674194364241950307089362676", 61, RoundingMode.ROUND_DOWN, "-0.8427377649916848886199721060592557002067035403201115030257907"); + t("-0.484682867317587083890164162041940736690008613", 8, RoundingMode.ROUND_HALF_EVEN, "-0.50600057"); + t("0.113120270070498", 50, RoundingMode.ROUND_UP, "0.11336292145557724571826383182776998307145328515238"); + t("0.34", 10, RoundingMode.ROUND_HALF_DOWN, "0.3469168975"); + t("-0.2926610785739469", 28, RoundingMode.ROUND_FLOOR, "-0.2970085826927033895214703227"); + t("0.59", 38, RoundingMode.ROUND_DOWN, "0.63105884077802138008065476411889009138"); + t("-0.666004", 56, RoundingMode.ROUND_CEIL, "-0.72883894869188752508082426773062076470740771016340920745"); + t("-0.95422784743026801105092", 12, RoundingMode.ROUND_FLOOR, "-1.26706730266"); + t("-0.9", 67, RoundingMode.ROUND_HALF_DOWN, "-1.119769514998634186686677055845399615895162186403302882375681863914"); + t("-0.332807758", 19, RoundingMode.ROUND_HALF_EVEN, "-0.3392795075258930194"); + t("-0.95", 21, RoundingMode.ROUND_HALF_DOWN, "-1.25323589750337525874"); + t("-0.221399947969316593", 7, RoundingMode.ROUND_FLOOR, "-0.2232499"); + t("0.366503199947936608548836035815", 76, RoundingMode.ROUND_UP, "0.3752479099732837285966491336016339018492954883700174641896336303715506709124"); + t("0.796578764474897795211746856442048575914", 57, RoundingMode.ROUND_CEIL, "0.921614640822318447749190939370056438701577282904840049808"); + t("-0.8951817", 26, RoundingMode.ROUND_FLOOR, "-1.1088387080788509960582979"); + t("-0.9409896256123054046284876839902981969882335762", 65, RoundingMode.ROUND_DOWN, "-1.2255426379859062280463160941613952891818491680479691163432053486"); + t("-0.41324187781140229966", 41, RoundingMode.ROUND_CEIL, "-0.42601127100914377778551493383700363930714"); + t("0.43266874227539624088526762225947773912327469", 38, RoundingMode.ROUND_FLOOR, "0.44745084295379366863059106258351427345"); + t("0.8461527851501807278", 64, RoundingMode.ROUND_DOWN, "1.008724532937472369999407408932218781094300767255470631517391649"); + t("-0.115745738523412", 33, RoundingMode.ROUND_HALF_DOWN, "-0.116005751539237493563904774696209"); + t("0.284304737851044381620904888952457483789736031622266595661890845226472739136848559887", 23, RoundingMode.ROUND_FLOOR, "0.28828116234503411819423"); + t("0.932850398775973094771398", 16, RoundingMode.ROUND_HALF_EVEN, "1.202245469329027"); + t("-0.93207232121", 49, RoundingMode.ROUND_CEIL, "-1.200091730240906248923472509651550501216711826408"); + t("-0.307559341", 53, RoundingMode.ROUND_HALF_UP, "-0.3126269787393528134464533769606314913032841594122504"); + t("0.02", 3, RoundingMode.ROUND_DOWN, "0.02"); + t("0.05409126", 22, RoundingMode.ROUND_UP, "0.05411767207203586238725"); + t("-0.88263", 33, RoundingMode.ROUND_UP, "-1.08142807589689185466198933332415"); + t("-0.6412", 16, RoundingMode.ROUND_FLOOR, "-0.6960610209699352"); + t("0.071", 75, RoundingMode.ROUND_HALF_EVEN, "0.0710597875579649658677311258751004125269524590167389822118077430713114601767"); + t("0.25", 54, RoundingMode.ROUND_UP, "0.252680255142078653485657436993710972252193733096838194"); + t("0.4316106701307", 59, RoundingMode.ROUND_HALF_EVEN, "0.44627756238311788547729132911284077332647248178802965727123"); + t("0.79766", 45, RoundingMode.ROUND_HALF_DOWN, "0.923405295841783325766221839399237615090267575"); + t("-0.86", 74, RoundingMode.ROUND_FLOOR, "-1.0352696724805087972524237712524081954382768243308249843526039026823834384"); + t("0.8917151871549302699804", 39, RoundingMode.ROUND_CEIL, "1.10112079211449691639797484194623368712"); + t("-0.834217837658", 8, RoundingMode.ROUND_HALF_EVEN, "-0.98671285"); + t("-0.0889902741429280236", 36, RoundingMode.ROUND_DOWN, "-0.0891081510206886440798660795952769821"); + t("0.159543468885219193682674", 21, RoundingMode.ROUND_HALF_EVEN, "0.160228180910611278557"); + t("0.12539456", 66, RoundingMode.ROUND_UP, "0.125725520241398781288432075737330151158613149351916279601595480571"); + t("-0.77", 59, RoundingMode.ROUND_UP, "-0.87884115166857970601751289000525113783506451415240093231377"); + t("-0.553078003811233", 24, RoundingMode.ROUND_CEIL, "-0.58605423505194196543817"); + t("0.5041077", 51, RoundingMode.ROUND_HALF_UP, "0.528348469238645839832995187757811964852360559008704"); + t("-0.546235796655292521336930382887", 1, RoundingMode.ROUND_FLOOR, "-0.6"); + t("-0.88", 25, RoundingMode.ROUND_FLOOR, "-1.075862200454001096384532"); + t("0.663223870629815", 27, RoundingMode.ROUND_HALF_DOWN, "0.725118146510600214890360632"); + t("0.575345515087178293784283", 72, RoundingMode.ROUND_FLOOR, "0.613026521632428562294026733866840850508453079419516091381141847666300638"); + t("-0.0919426", 3, RoundingMode.ROUND_UP, "-0.0921"); + t("-0.3748729505111603", 5, RoundingMode.ROUND_FLOOR, "-0.38426"); + t("-0.038426210703", 47, RoundingMode.ROUND_HALF_DOWN, "-0.038435673513811703783407201135040014342207364774"); + t("-0.70873", 43, RoundingMode.ROUND_DOWN, "-0.7876963843899657497726409340831494754261634"); + t("0.033141611149779616601", 75, RoundingMode.ROUND_FLOOR, "0.0331476810890469539588575951732365859575742892515846447531263570596965529946"); + t("0.12641651301996", 40, RoundingMode.ROUND_HALF_DOWN, "0.1267556710065101777375336063974190918591"); + t("0.8942276930150051384899357825253960835535796315329431938595655176754607030956425576565225077672163", 41, RoundingMode.ROUND_FLOOR, "1.1067028255435762602141926028514289352971"); + t("-0.310722", 22, RoundingMode.ROUND_CEIL, "-0.3159525377694311600708"); + t("-0.09777878645501291325513892221406063785391691064760349", 68, RoundingMode.ROUND_CEIL, "-0.097935266080218649462426347815668843970149064099533394607639671023005"); + t("-0.210908", 30, RoundingMode.ROUND_FLOOR, "-0.212503761459998181589152663183"); + t("0.0565026468", 19, RoundingMode.ROUND_CEIL, "0.05653275465343626279"); + t("0.4714", 29, RoundingMode.ROUND_UP, "0.49087755220113448634454431531"); + t("-0.0953273314513416035636672044271510282646", 52, RoundingMode.ROUND_HALF_DOWN, "-0.09547230307940518906019894514985818809668476788314649"); + t("0.64565703768702106868372409749897", 77, RoundingMode.ROUND_FLOOR, "0.70188338704623053407661401041753377761981655204429668322187613422144710272096"); + t("0.1665947", 45, RoundingMode.ROUND_UP, "0.167375092148409359673315873735113047630294574"); + t("0.852744298", 54, RoundingMode.ROUND_CEIL, "1.0212169442286331053342579271097779547394763850052428"); + t("0.1993546147531281708821212533589233206049989856", 25, RoundingMode.ROUND_HALF_UP, "0.2006992714598519215519017"); + t("-0.82839812602", 63, RoundingMode.ROUND_UP, "-0.97624183165075458449651397789110371698700612574734920324364002"); + t("-0.65394271389473563104445198721241352539657370190327516226949358", 49, RoundingMode.ROUND_HALF_DOWN, "-0.7127842540575758779094839198721952069481451657469"); + t("0.4962260182577864", 55, RoundingMode.ROUND_HALF_UP, "0.5192464114931555829909478292691012506462215851288879914"); + t("0.1606549866943", 68, RoundingMode.ROUND_HALF_EVEN, "0.1613542236927080239982074248141022972453468706886074646930959043677"); + t("-0.46777550089914572", 79, RoundingMode.ROUND_HALF_UP, "-0.4867722604570172115667722286957699058310104595659469697759538669014221766261104"); + t("-0.21", 18, RoundingMode.ROUND_FLOOR, "-0.211574959758095614"); + t("-0.571681105201533092342438196328075930698", 30, RoundingMode.ROUND_HALF_DOWN, "-0.608553335300976040891289451363"); + t("-0.05699621538789649053258914302611322138362326901530074221189", 16, RoundingMode.ROUND_FLOOR, "-0.05702711993955219"); + t("0.5925787905435", 64, RoundingMode.ROUND_HALF_EVEN, "0.6342565135203692635970524299309093326743265057497589153595695378"); + t("0.942", 1, RoundingMode.ROUND_HALF_EVEN, "1"); + t("-0.3061512833793703481610862835094173843657746781110931315241", 58, RoundingMode.ROUND_FLOOR, "-0.3111475475304973793137391108875170350883649765949720959375"); + t("0.45701114240653", 78, RoundingMode.ROUND_HALF_EVEN, "0.474631984157872481159127335480069234889885529123837322052541238359246471744458"); + t("0.2344536089", 10, RoundingMode.ROUND_DOWN, "0.2366564728"); + t("-0.61", 11, RoundingMode.ROUND_DOWN, "-0.65606059092"); + t("-0.345766389492404450103125674416450325001625643234531141063827389062676", 56, RoundingMode.ROUND_HALF_UP, "-0.35305542948942854948428735153598981479584093095603943541"); + t("-0.429374", 1, RoundingMode.ROUND_HALF_DOWN, "-0.4"); + t("0.12832562558", 46, RoundingMode.ROUND_HALF_UP, "0.1286804610288967457778965681388269696339234007"); + t("-0.0474041757368215558873241780259944", 18, RoundingMode.ROUND_UP, "-0.0474219478095239123"); + t("-0.167408156576268584537548735104195960201", 8, RoundingMode.ROUND_FLOOR, "-0.16820014"); + t("0.7", 17, RoundingMode.ROUND_CEIL, "0.77539749661075307"); + t("-0.992012661576902117130505108397667017029571987095733", 58, RoundingMode.ROUND_HALF_EVEN, "-1.444321079744178461530147066185478523948650582058775186405"); + t("0.384200651951217", 70, RoundingMode.ROUND_FLOOR, "0.3943418680124420669732040703931829664556695205455445385930058222456544"); + t("-0.0563497218707540030366670182237692607491608", 30, RoundingMode.ROUND_FLOOR, "-0.0563795856912166575477715061678"); + t("0.13673385088", 46, RoundingMode.ROUND_UP, "0.137163541899032501535657124447522877338186687"); + t("-0.419618645735831514059739", 40, RoundingMode.ROUND_FLOOR, "-0.4330251469868597344200188008579246680142"); + t("-0.8", 15, RoundingMode.ROUND_FLOOR, "-0.927295218001613"); + t("0.324264375164899823", 22, RoundingMode.ROUND_HALF_EVEN, "0.3302339806920392851348"); + t("0.596311315", 34, RoundingMode.ROUND_CEIL, "0.6388981813784104566874899118133014"); + t("-0.939234445176982323890299707589044270867945726727", 47, RoundingMode.ROUND_FLOOR, "-1.2203933163763458091477029083623871156388359441"); + t("0.26559685117268269845", 41, RoundingMode.ROUND_CEIL, "0.26882295573243418565045001452731287045712"); + t("-0.5197501775473520082650103347980525040571008017895758", 32, RoundingMode.ROUND_HALF_UP, "-0.54655850151952033221508609978054"); + t("0.98321230829627604074", 131, RoundingMode.ROUND_FLOOR, "1.3873031431594067777959186600010474978340290617104996376537797960018595808682459428362208479584535315237998744268330306117408714751"); + t("-0.8306263096887797", 155, RoundingMode.ROUND_CEIL, "-0.98023151927426829687943473863594579240034685804617564951176572291968902100856551221322028995733293311017904566162339277118311268477231662889173557914486073"); + t("0.379091939403460776087193452521985326156426704977746874015188855127988988143003230355319182", 76, RoundingMode.ROUND_HALF_EVEN, "0.3888147927233894219559249686057359198013687651505844295408319996189075544492"); + t("0.138183859194653664", 10, RoundingMode.ROUND_UP, "0.1386274465"); + t("-0.636945104654434508184266202782284647", 99, RoundingMode.ROUND_HALF_DOWN, "-0.690529029023082598743072143236329489312548615306269411945391957230849185760204158457282133121855902"); + t("0.098466081988062587713433374045963598976413197390842303300454181888207023266820002440708702106285627166144453217682373816939119", 73, RoundingMode.ROUND_FLOOR, "0.09862589435732260478719256680011196464387958555399270932700769810422680396"); + t("0.22460317747577075", 136, RoundingMode.ROUND_FLOOR, "0.2265357900059584247237015990913650265827549283985583240699651972217568542831290579685417040457506840650089443451214859526553348553201622"); + t("0.4871309085291940793203225175548657462201951518389", 75, RoundingMode.ROUND_CEIL, "0.508801495760700476147890339935933172807185075951677904340075605078709198526"); + t("-0.911312518334048550842772331751600852138657289539275348553552054", 85, RoundingMode.ROUND_DOWN, "-1.14646082528887524546415438880104006309957814601729639880723431686126011949154196904"); + t("0.37365936348133955250214930950810747832464153012753285154267113854535143776314499213578925774851", 43, RoundingMode.ROUND_CEIL, "0.3829510256232298461555772524549519440478305"); + t("-0.66232866829740217220208720202062249394526483380163454300555655659621271695", 41, RoundingMode.ROUND_HALF_DOWN, "-0.7239226582423784570783106601587845218062"); + t("-0.994245714", 43, RoundingMode.ROUND_HALF_UP, "-1.463466805054880958297582796049403538063361"); + t("-0.183977258093146027471805229213", 111, RoundingMode.ROUND_FLOOR, "-0.185031258034235643792220377661239335645455910981859668719240161517904068516822560846004041760798432443807857903"); + t("-0.7729793397718", 122, RoundingMode.ROUND_UP, "-0.88352389064640391193039223501748753370173981761823355988722837335611005422188294668361614175552785826760934402784704986076"); + t("-0.083248771027521638377471299937768642867047081544684", 108, RoundingMode.ROUND_HALF_UP, "-0.0833452294484917777716066569601253396580122600325716686993517688771803513464826579142949857130580461362003586"); + t("-0.6186956013", 80, RoundingMode.ROUND_UP, "-0.66708129534177493145577713909719544176531899123298300600884771302337433617812067"); + t("-0.01981399888900374668160454728747204564253390884179747350782591212", 151, RoundingMode.ROUND_DOWN, "-0.019815295596105648088656424226163230937252988270555832416618152776061581386841357532406017661504548242355569912535517486688978058315371021964966524444"); + t("-0.1477", 123, RoundingMode.ROUND_HALF_DOWN, "-0.148242361070174829381615182726297587651970776380051790237606024427909892810361565549611415729396339300784835501044475065138"); + t("0.85206188160264919022321809651148551214585", 45, RoundingMode.ROUND_DOWN, "1.01991184555336572657990981140243625242024426"); + t("-0.90185946293110377", 37, RoundingMode.ROUND_HALF_UP, "-1.124054383035903097573896035868010966"); + t("0.686683042607436303344759565393249675057844291780049", 106, RoundingMode.ROUND_HALF_UP, "0.7569163636984284393192694105467873521110575489282968058953689813120166829006196799298729221490180773425572"); + t("-0.80565972", 89, RoundingMode.ROUND_UP, "-0.93678830594642213343472905544988431792098759044535546138099284796048417251330411496076225"); + t("0.8287757689823866845947", 28, RoundingMode.ROUND_FLOOR, "0.9769163623280774412845646514"); + t("0.775539", 69, RoundingMode.ROUND_CEIL, "0.8875684420329496881879490540638410490180739278032969673385692936232"); + t("0.96", 32, RoundingMode.ROUND_DOWN, "1.2870022175865687736056184574346"); + t("-0.31767770015317195412244341162", 125, RoundingMode.ROUND_HALF_DOWN, "-0.32327930928330505731471437291801827289742091960978232855078485966537503101308728464505761320662838085510137838139945861364565"); + t("0.216612733952205906882978761821565921293961617321023902334402402212213472448217505361894035909181310933757428262655528", 119, RoundingMode.ROUND_FLOOR, "0.21834348326975442874049982351521606416815648051947798022929796985925930383616238104215899370386061219591470416343571914"); + t("0.34325851643722235829203637", 121, RoundingMode.ROUND_HALF_EVEN, "0.3503840161301225150797367788969630661135190262000780117770896001443114285038832584866773690772241644675494094609344758169"); + t("0.154299188", 24, RoundingMode.ROUND_DOWN, "0.154918107460239837128979"); + t("-0.41276776722631304800604", 57, RoundingMode.ROUND_DOWN, "-0.425490687303101681366223788904420681616241189113674303367"); + t("0.043667", 120, RoundingMode.ROUND_CEIL, "0.0436808893439742248329960559825585485204170917742763118790712722987582440062887973419695026577248022055243993513149230336"); + t("0.6446731488596", 25, RoundingMode.ROUND_UP, "0.700595646970220687498344"); + t("0.67324683", 145, RoundingMode.ROUND_HALF_EVEN, "0.7385911211117660516736949252784083519650082278398862917156832397419061072698839369144264191756696594758385294989950975647221856391512485156186627"); + t("-0.45181098606874", 20, RoundingMode.ROUND_FLOOR, "-0.46879429271111472965"); + t("0.253340816117913343897811543600113227940889125785269060368511128349585628971155444741547", 138, RoundingMode.ROUND_CEIL, "0.25613218036751232534737792780304504216000556767480653053300732246724737920153933136768449061473267069320632415107565957916186074000883527"); + t("-0.3", 157, RoundingMode.ROUND_FLOOR, "-0.3046926540153975079720029612275291669545600317067763873929779487464729925120331594385999572313631487317349566307855469247966854234324188781871838304561501104"); + t("0.06719", 69, RoundingMode.ROUND_HALF_DOWN, "0.0672406578123116252702557668900516532977792000811102672961609054389803"); + t("-0.2029361475210546849472050839", 148, RoundingMode.ROUND_HALF_UP, "-0.2043555353924493763086154552433925626206444604955325328432808534451360476476493234954864145598030057338008420662129607867684546179911887045629193833"); + t("-0.08505004367434599739129751042722551187", 85, RoundingMode.ROUND_CEIL, "-0.08515291393416652373128316763326521285315921811705725258953678537287920982299629963107"); + t("-0.00315095687644621447913391882472466785408443824", 102, RoundingMode.ROUND_UP, "-0.00315096209053075570313519115225915042540639370245727449636092274914783756966242186928626857801511829216"); + t("0.2166373253670628178680959671935316242903578673260341215573798024044966787602", 133, RoundingMode.ROUND_UP, "0.2183686728132707857773171836454654607516826449616705470677086497852975091508946533120857195602676645410836560739427425089385497687577"); + t("0.92", 60, RoundingMode.ROUND_UP, "1.16808048521423503632107058720450462161850853688309613797297"); + t("0.144196364870930264351342698715747390136512027309915951329840851131402596467769463", 115, RoundingMode.ROUND_CEIL, "0.1447008018094614787289802107226618992844728575822171026909594506859961543423061540076851920189343818919782027754542"); + t("0.7394013508349718727484541422", 54, RoundingMode.ROUND_FLOOR, "0.832180750380685449194844845873512892231224707396715347"); + t("0.359140110091224523", 93, RoundingMode.ROUND_HALF_EVEN, "0.367346370256250752326050923549225439456036710295143043815361999094323092238737483794980955088"); + t("-0.2434277253", 33, RoundingMode.ROUND_FLOOR, "-0.245898324882648198496205894660443"); + t("0.395", 11, RoundingMode.ROUND_DOWN, "0.40606785105"); + t("0.600149", 31, RoundingMode.ROUND_CEIL, "0.6436873718045773971695248426404"); + t("-0.385607", 88, RoundingMode.ROUND_HALF_DOWN, "-0.3958656104336473063722170432706072288184320245342883683023396798759080100105588956287616"); + t("-0.4", 44, RoundingMode.ROUND_DOWN, "-0.41151684606748801938473789761733560485570113"); + t("-0.5544932", 124, RoundingMode.ROUND_FLOOR, "-0.5877538456705320004042946159576167967598897812104839698663303461388013204899617645696652855341761969812488123590202289149313"); + t("-0.7336726776087398288", 42, RoundingMode.ROUND_FLOOR, "-0.823711243239253788754217507031013050435158"); + t("0.746554277552499912", 126, RoundingMode.ROUND_DOWN, "0.842867908799419987576179557452805512346118237805372250199749542385971048576970795947600043003468237732940501496422929923932987"); + t("-0.741202735499981493", 139, RoundingMode.ROUND_FLOOR, "-0.8348602918484922216076698543705885173877779435153151457225248422068196783759734977708105108926269451542455920163197670047314737383801545329"); + t("0.230774131592315450798797193", 113, RoundingMode.ROUND_DOWN, "0.23287321503418185297789975135716073537340864393150654698184144456535513067463880540906387701431479345402277061409"); + t("0.32616662526937009150934277673480248160828903279537897630622325", 131, RoundingMode.ROUND_DOWN, "0.33224558201868645018572620213626977209063366314966201256867621587722494465699952546312872848108428031384486908911262158004008233394"); + t("0.6119649493", 60, RoundingMode.ROUND_FLOOR, "0.658542704606472833437662388564229010336306815208477418704682"); + t("-0.8951951691773113264060052628327460828307", 48, RoundingMode.ROUND_UP, "-1.10886892917884892643451353315415098754346366112"); + t("0.711085062846373", 151, RoundingMode.ROUND_UP, "0.7910402497367925766783455692121804455421604367308696056778481350211871875859355512323079626552888085537049952628662428282848953095966828325929264327706"); + t("0.4947021349334433640080276423835", 67, RoundingMode.ROUND_HALF_DOWN, "0.5174920552477371779711190390192192183066910339063478417658662634646"); + t("-0.76664", 160, RoundingMode.ROUND_HALF_UP, "-0.8735916602520211283221621827355844768003932883581733170571012966030465804643255169631549275449024402058478437496154722641791914358890862566931062182576658742108"); + t("-0.46080796306132", 44, RoundingMode.ROUND_HALF_DOWN, "-0.47890536462936683670408255931095895120553952"); + t("-0.744950131882722", 72, RoundingMode.ROUND_HALF_EVEN, "-0.840460086650120207875953789353972673974493953871082617085932756159307593"); + t("0.78780549737311213805040716365110736444348512", 54, RoundingMode.ROUND_FLOOR, "0.907237890745486886490779436861981360254053442632343642"); + t("-0.06659718684877323748199967485997079751595", 95, RoundingMode.ROUND_HALF_DOWN, "-0.066646513838094146800249598005989290016122431522285492479445283112834767075354324256695349932748"); + t("0.12798198726185", 37, RoundingMode.ROUND_HALF_UP, "0.1283339656134996188797525235048533408"); + t("-0.706164", 35, RoundingMode.ROUND_HALF_UP, "-0.78406575671649443067176743996694414"); + t("0.103907523449877348868538", 140, RoundingMode.ROUND_HALF_EVEN, "0.10409541543603086977911440753161024265926970775952235507404595749661214604170605747213518139839861888022007258343170993132925385519220020948"); + t("0.01668", 85, RoundingMode.ROUND_FLOOR, "0.01668077355512507761167771548784513250319580127425759455887233961250891032423714853956"); + t("-0.906064765236819730048479090043", 83, RoundingMode.ROUND_HALF_DOWN, "-1.1338893293220078500538611500779007220392095610419807970447447216330823577278369964"); + t("0.75619680828763677601", 58, RoundingMode.ROUND_CEIL, "0.857481210940358815102581362152055256701937069476920608529"); + t("-0.983936543516578325", 155, RoundingMode.ROUND_HALF_DOWN, "-1.3913157014814642349769802172655781142112051742005235683121626436316279790761647791181950323537474985512494276515584823883371851902454326779247559368927249"); + t("-0.65345673278401974421899879880820991594030266978121080453", 8, RoundingMode.ROUND_DOWN, "-0.71214206"); + t("-0.81939018834140163991536507382626451576065347807874214885535961383922369450727488", 153, RoundingMode.ROUND_DOWN, "-0.960346403261851035243149367591474112131075179165486524236271369941497246212642128069271339304657322143978859403774489139494150608813112639489227381616686"); + t("0.78420672433313869692483669887915358731707867672043560842161076188266185039", 39, RoundingMode.ROUND_HALF_EVEN, "0.901416645595194396527010627633902846353"); + t("-0.9069667968167341927291735578", 82, RoundingMode.ROUND_CEIL, "-1.136025980435285163705240603148539333670605293586015109274989241163604302288297862"); + t("0.95574221728169119003340279435662", 105, RoundingMode.ROUND_HALF_UP, "1.27217231620870629157448647439233976200608483339389365466817728775774070255410662889653416638211154624266"); + t("0.92", 63, RoundingMode.ROUND_FLOOR, "1.1680804852142350363210705872045046216185085368830961379729698"); + t("0.38977970108201787997528029150378499929356", 59, RoundingMode.ROUND_HALF_UP, "0.40039236137451543607020570058898518288856038892780030618949"); + t("0.626630161270772034637915265955220897673759119113382791557578602858907246459734278124388270388689882191718392530089576223499", 25, RoundingMode.ROUND_HALF_UP, "0.6772215608617562687203423"); + t("-0.53578973702960014466544810890666393405259788764300756250844062462549456605229444625249689723280007548445114681296444", 75, RoundingMode.ROUND_HALF_UP, "-0.565442787787492665106462409291297625277450789954940169821244394925572476587"); + t("0.7188926352643993731470790324946", 125, RoundingMode.ROUND_FLOOR, "0.80220795087194132429776509280369788228916898109506390874652393385851748361228417482348921992667302990136160410264056503750592"); + t("-0.5", 41, RoundingMode.ROUND_HALF_EVEN, "-0.52359877559829887307710723054658381403286"); + t("0.4651469832", 133, RoundingMode.ROUND_FLOOR, "0.4838006428873029687858035041369955406137974014963981927540235979011568880479586876944895561731851201330130499217277217863897176359224"); + t("0.43", 119, RoundingMode.ROUND_UP, "0.44449277693581903875430660738312207350989641457737200100597008477203144014513385040858895815490413434998101542934826768"); + t("-0.9295", 37, RoundingMode.ROUND_HALF_EVEN, "-1.19305485317919144062809352229568316"); + t("0.643", 30, RoundingMode.ROUND_CEIL, "0.698408988923301970826329184976"); + t("0.64163666", 128, RoundingMode.ROUND_HALF_UP, "0.6966301880149958192599136740426639518599974234324497314559202055530421311601521762957348108024914923976838612969563639399016872"); + t("-0.4150433621129271978961", 107, RoundingMode.ROUND_CEIL, "-0.42799046351848637503698118946971901189695900215117256299118930882156809903879982358592664619588386172272768"); + t("0.6267020834835856229844083612239", 150, RoundingMode.ROUND_HALF_UP, "0.6773138530896259194745957455858453825964708403171517974472171176848857934941211117601114205573820882950832088470622136708809478557415322128731266221"); + t("-0.271939368659632918107831735628221004897320821908219249", 125, RoundingMode.ROUND_HALF_UP, "-0.27540777640900587652341994488925508361731058688390688815589473925032964816431926354917787329547837193764677194166596755355692"); + t("0.5663263100453992293021921862144", 128, RoundingMode.ROUND_HALF_UP, "0.60204161138206530499657091645398189960694900242410118774607111402882830151929822869497147546804844994155916943406418396689709141"); + t("0.569333606914265707783844549880809194", 14, RoundingMode.ROUND_CEIL, "0.60569503540499"); + t("0.1692086817432493943834310299804675814548133171631132949138724125757", 133, RoundingMode.ROUND_HALF_DOWN, "0.1700267178811256272245800338741900268727535800098429947426003575890551740105655217377684268604813520184380627979997741763704000868246"); + t("-0.26230778139975648588228", 113, RoundingMode.ROUND_HALF_UP, "-0.26541295066810679633781518767049869257256532606426642851859216245184503825802698340534102059562051934299857505325"); + t("0.93", 96, RoundingMode.ROUND_CEIL, "1.19441284447716837409397671420360100354622302745984740650275469634774017042714456294474724141491"); + t("0.2310592195223252054452161810525601644530108631502208068578609", 101, RoundingMode.ROUND_UP, "0.23316622190701241663551886371080455321039935500763094062003096499091272425011844100163759141773878204"); + t("-0.1437", 101, RoundingMode.ROUND_FLOOR, "-0.14419921299921622567473984961776846873149426777454106513704190005559101588328724485341467271707677852"); + t("0.67575144760660800068976473757166803013376264001549784642314428938890188714353678094110225388058942491337710229754561303067087763819110482", 113, RoundingMode.ROUND_FLOOR, "0.74198365054116972362802303577561437964260454604552573167093264230117954248078517709115352633981244282993619138673"); + t("-0.003", 87, RoundingMode.ROUND_DOWN, "-0.0030000045000182250976345265832042599611605163280216070219354057283777996472153051943017"); + t("-0.77165968109", 152, RoundingMode.ROUND_HALF_EVEN, "-0.88144645238423101616847120467952204067909710180812225574213505256311265140564677412155226597213485073517504512638914701211417341152458590193809952313294"); + t("-0.221847476868", 77, RoundingMode.ROUND_HALF_EVEN, "-0.2237087533564227289143190136830214065301217047095288123407668363401204722722"); + t("-0.716", 157, RoundingMode.ROUND_FLOOR, "-0.7980555152315012856149924124224969259274787330893166482568838265851118834387771562959201363199455541674133702656913325999366596593695513752826637378709964985"); + t("-0.187", 69, RoundingMode.ROUND_HALF_UP, "-0.188107383070739387023686158650083527008820896680577920729154328212616"); + t("0.57318222889648045417278", 72, RoundingMode.ROUND_HALF_EVEN, "0.610384080789595988044172620595742561469112717047496665519927872237688307"); + t("0.78644508210755698631505494473557085812", 103, RoundingMode.ROUND_DOWN, "0.9050322616632075211094570449803430591074402790127190255467364228254122885846261267095564409095094892828"); + t("-0.617718365968", 128, RoundingMode.ROUND_CEIL, "-0.66583801743920534212025152595627134750770613102453152190970709196912669278898993405691106586784669914236816149373308805871341161"); + t("0.317957068349409621865384", 84, RoundingMode.ROUND_HALF_DOWN, "0.323573954249384526312351214008419584631620583595363067238008273271778984603291116346"); + t("-0.52", 76, RoundingMode.ROUND_FLOOR, "-0.5468509506959441087909711033442369565338874398245851393603598685786471502318"); + t("0.263077446791286742953074705", 124, RoundingMode.ROUND_HALF_EVEN, "0.2662106309568873654151373956996464629263698330760518509513021153939758382316026629069007248924076755046444296233106664819468"); + t("0.5195765199312319622992542191", 76, RoundingMode.ROUND_HALF_EVEN, "0.5463552436922317854013172500160906430551828060114290958704252068999384515956"); + t("-0.89870208266793516736707667", 133, RoundingMode.ROUND_HALF_EVEN, "-1.116800981508463582079689393605042664437625332230918767902043496225800695418850272686517434002579017085916645343903833698472077830903"); + t("0.342294966589", 91, RoundingMode.ROUND_CEIL, "0.3493583267786817338198931944127645509535139163567238164385005753485043532430877823000015009"); + t("0.6341029522304", 46, RoundingMode.ROUND_UP, "0.6868478647929256267451915495961272611261353675"); + t("-0.49453", 151, RoundingMode.ROUND_UP, "-0.5172939967508468913534977031559685788002032692314476198808271303872834679065014302758280018235245029138009002062734578015506132652124503783465558184818"); + t("0.19", 51, RoundingMode.ROUND_HALF_UP, "0.191162146531059603464576591595274046353204194877988"); + t("0.3690559462292067462", 82, RoundingMode.ROUND_CEIL, "0.3779930565212133767239947845968378255176060562526991908917281126826455931460946961"); + t("0.3680759357958244768503088384693276073696220657362592641524617050868914930773218166735841413956085984894281928923400243819655302894", 20, RoundingMode.ROUND_HALF_UP, "0.37693883018045266413"); + t("-0.20396077615752517162013930347382407072960422911868208620779767395200874615011045671712957735155498331", 117, RoundingMode.ROUND_HALF_UP, "-0.205402051274032581385438172753844616523486356209285496839288857895114235637834568885322719358375197517956080180044701"); + t("-0.72783278048207590485", 98, RoundingMode.ROUND_DOWN, "-0.81515628474982256183348072141490463975494101527626609154297998105681439195651342760621223056025012"); + t("-0.0859430897033196526036235479613051369087141045734191462210545543812332347746868448475884811666", 99, RoundingMode.ROUND_FLOOR, "-0.086049241929912742607535334587037450167355983955064479200233139491681062319334581122237153776546587"); + t("-0.01293248770598231748490154607185121489646779216626", 14, RoundingMode.ROUND_HALF_DOWN, "-0.012932848224569"); + t("0.9870478912472313972551769993282725689651926247579", 151, RoundingMode.ROUND_DOWN, "1.409674228707015164564017965385904685277087746091181260558650389306276214573484955525394935980065963464895542680515807589458976216041255021478669455445"); + t("-0.8296515313", 134, RoundingMode.ROUND_HALF_EVEN, "-0.9784832136814208040952073913820870030892836042546032627103316202734336032725383951975650906380357973920282063146134430855771515081031"); + t("0.27861602934", 89, RoundingMode.ROUND_HALF_DOWN, "0.28235277556545016858046569418755898828240681176925592326759015587237205841690555253639296"); + t("0.383056869692704", 22, RoundingMode.ROUND_HALF_UP, "0.3931033212036723866617"); + t("0.06927077231878520826499152083088596011012096639", 81, RoundingMode.ROUND_FLOOR, "0.0693262908899409006043964069816411612175166104129786373575875780590528113093407677"); + t("-0.9340043046390376316713996569900633414686376", 37, RoundingMode.ROUND_DOWN, "-1.205461813557572732076176036334590922"); + t("-0.8766834879", 65, RoundingMode.ROUND_HALF_DOWN, "-1.0689242182579654725161683261641027961519547614570426896685697871"); + t("-0.324517794162246563732235606754195180989358231676814829", 46, RoundingMode.ROUND_FLOOR, "-0.330501887259371494086344701133839247327695052"); + t("-0.111922", 109, RoundingMode.ROUND_HALF_EVEN, "-0.1121569928570227536664975598806136195265638731916965800820055098073246158818461225291161041729214806999366103"); + t("0.343021919", 41, RoundingMode.ROUND_HALF_DOWN, "0.35013212491292811167609106992608187090626"); + t("-0.5003652748345533942966272688", 124, RoundingMode.ROUND_FLOOR, "-0.5240206100270143068145238239152653779345586447416954689576493394383750973070785017271091680462659405297081659598413214302671"); + t("0.08301080527394", 37, RoundingMode.ROUND_FLOOR, "0.0831064371695337946076834911242192425"); + t("0.6569416", 52, RoundingMode.ROUND_UP, "0.7167550066365366031482249713955344563333339598879617"); + t("-0.4144972017030450972126", 126, RoundingMode.ROUND_DOWN, "-0.427390238524059770225386010018426501591250546999748670061560571076103307797989985320538372018633198482434993836770972754666255"); + t("0.63167381", 17, RoundingMode.ROUND_UP, "0.68371041947672611"); + t("-0.2346529787425116", 58, RoundingMode.ROUND_HALF_EVEN, "-0.2368615640388155539483047532392414394284406749258909302668"); + t("-0.70701956157737", 82, RoundingMode.ROUND_HALF_DOWN, "-0.7852748238492539183845263913515525518878921961176311072315759371131773148357277563"); + t("-0.714522922310356204", 151, RoundingMode.ROUND_UP, "-0.7959419513325656457908896102451427122560382453637968548184498490396348105898671639111834211047885102015773818191157996751617280836811201799255618871601"); + t("-0.820802651067349083547043001", 149, RoundingMode.ROUND_FLOOR, "-0.96281477567827605847378848622243219017930949714648703344744019784230473675305593068481443438792750150350875514170306748598964325496260157538322176282"); + t("0.90711358389206871935697952953962200981030380254378677480417405252054597207477803", 121, RoundingMode.ROUND_HALF_UP, "1.136374606869968548608655657315515442619397974886718987384082953520117494490055214476742801581057742308718701334287157032"); + t("0.7229873376553716591159794382285005242853677361144936215787931486256", 40, RoundingMode.ROUND_HALF_UP, "0.8081166701441270803014959464894182812366"); + t("-0.8934659403546863476200748103344988643123118164488255881482008816", 62, RoundingMode.ROUND_FLOOR, "-1.10500389462813214832651488468055361174995109785133457529405"); + t("-0.8681069974", 261, RoundingMode.ROUND_FLOOR, "-1.05137586993590202160297979520834720455736069163768998233689854548144269757778186886085619716624460752786021187843258753174902795386014660126649469446867655906655009852459704905435536678385837780585002103878725650550102516715943636597282688184618625018050068036"); + t("-0.8980263104842337792201795870137669793103658181985329267768575489480449169688567119596473441872743443244847158860483178798140289296317559008484787656", 37, RoundingMode.ROUND_HALF_DOWN, "-1.11526251600706661275414229685569381"); + t("0.2", 94, RoundingMode.ROUND_CEIL, "0.2013579207903307914551255522176234102400380814022283862572512434556093746288518503758449300904"); + t("0.9005012294", 287, RoundingMode.ROUND_CEIL, "1.1209207826812843092416248024196861484074566456587895526279084951456225291542730646203355338604166393108971728394069898493564444091119723338299418248589827937369018520022650672751832620029240687406918959748835851263689281290390255490697712482514929990101414423192387719599288977733440102"); + t("-0.013631847402768", 159, RoundingMode.ROUND_HALF_UP, "-0.0136322696328936002583966932409063912186712056256280472637171126862502019227983358821609580388569471089255791143060560356133245861186678401481320172699688833293"); + t("0.32179692973457543799524143300844842232981372903072360723147720293131946025147007724109341776955032301601642945", 294, RoundingMode.ROUND_HALF_DOWN, "0.327626757160629295082129731615335316493546861079654310288060116706010904653972231209194441747023453982010941132011253295854281305875299691252450655237536528832077713286024866709787444863510554085392568338446121383986652476299492064825084501369567255834140025582322922481099777108217929251441237"); + t("0.1469355035663227772039145346053208531445016872949530705297263205768303709640106529603335695104518936020435023890232397334696808272236639833830547504037101204375847998422130724283", 309, RoundingMode.ROUND_HALF_UP, "0.147469431348050432763263032306457820921506965813380562586774997477486481515117470181868148530777548575814202535487398342443188084936525620518007488652817744590471764850744052512218368084302636599360052975853487314911960040848484130082927760473719572351370772863437729035045565776064590473391269590364238229288"); + t("0.394312656760297562", 29, RoundingMode.ROUND_DOWN, "0.40531978650287857279979718938"); + t("0.5", 92, RoundingMode.ROUND_FLOOR, "0.52359877559829887307710723054658381403286156656251763682915743205130273438103483310467247089"); + t("-0.406985212", 159, RoundingMode.ROUND_HALF_EVEN, "-0.419151129527243486161300933330947945223874047750892904179644245782956061952665906096795108173947584241676808738263013731472508905743460023185159960454438626154"); + t("0.064332920383975164370401235469901975007049650079551544946077709238737771334483187153904397255435366074612090872849570788134249712080997775304067097175865106578146332458112484673305247923889429428098776162265283321775309873493128", 125, RoundingMode.ROUND_HALF_DOWN, "0.064377379275763748592750374958154702836270661766534926277598415931952497731199859888069888246004548972990930351569758549789072"); + t("-0.2789868837749", 121, RoundingMode.ROUND_FLOOR, "-0.2827389419789747598536169720966635075340424628000030815365087353883046091260706768092622135219037168636951781574064354269"); + t("-0.30398926995547", 44, RoundingMode.ROUND_HALF_UP, "-0.30887731096143812799697728103003266915104565"); + t("0.13795", 35, RoundingMode.ROUND_HALF_DOWN, "0.13839132595279486312092953448864801"); + t("0.4746616444925662902712387971470961772169839975553220502012003569096118222097520330266055787608208519587736192454363385148549851985291158050047425281788436059785440354693123315881323899218731800020743403139912656295008245670548986951137561356936", 260, RoundingMode.ROUND_FLOOR, "0.4945795704987890345365239882303093224770147479518839938219008955326437277816878523960615925654657974516355618386621689857315128467516639005137900842041733167105173718226466755631105666673833736351508946846830562526860910738623979968571560874681673213508622115"); + t("-0.27297258208020383347025438891284012703605554162", 37, RoundingMode.ROUND_DOWN, "-0.276481615087487211900076140389505358"); + t("-0.203953336010448938724967132838289411532273775536", 48, RoundingMode.ROUND_CEIL, "-0.205394451375850066853377847528761489636998668219"); + t("0.628779550241498924270377858279819", 233, RoundingMode.ROUND_HALF_DOWN, "0.67998267212538949700396169561578251347799175875930446489570218002792232627659781882295091712675115914000139763454333082983405825665119415250804596214848188657330519697834171125018850633800277291000782014255597243030106735521226352689"); + t("-0.042595952938386", 105, RoundingMode.ROUND_DOWN, "-0.0426088445911532501809339977453832829108712076786843649435365812411562856487397507647466455495007624891822"); + t("0.990505523", 278, RoundingMode.ROUND_FLOOR, "1.4328866510076940505350144764110147755564834743473897500128204007524101815616380771904565018638112718698755837095784752351808288417770386055429974368751169169376106196306779969663824172213505654886214958071223119059293288996515089955205544675371537636583475155515236251697320927"); + t("0.1319108460101759428196806569841945936320018", 210, RoundingMode.ROUND_FLOOR, "0.132296424684377955553358481338006289588658209211944463014325517203267289164093904391472924215198430672530840500723982014981515573947605314435740530999657833720666905428303962227857859814258217628275939695858395"); + t("-0.3396498993526138405598531688251263583878275337854587573808368079736226277227713", 113, RoundingMode.ROUND_HALF_DOWN, "-0.34654464356125258648686752932699867756441076797443548860154879767604489414834611616351082303382695160979966842989"); + t("0.347470366786306510245", 12, RoundingMode.ROUND_HALF_UP, "0.354872024686"); + t("-0.819308362592220273075", 48, RoundingMode.ROUND_HALF_EVEN, "-0.960203674302934430957194909696200595217969188559"); + t("-0.87090459999744810546807754240305947936189564314849678226", 55, RoundingMode.ROUND_UP, "-1.057039996975862465494803874395149096063732977069076254"); + t("-0.6147449074744", 180, RoundingMode.ROUND_HALF_EVEN, "-0.662062502217544144947459783591527790562047772815518843581010120472146004599519949615968029751664098235204433525392133054983697291390882946737520896277768070557828415697706187634614"); + t("0.098747943443777265", 237, RoundingMode.ROUND_HALF_UP, "0.0989091362065310738725930960293416905988553734295179874222934317687863202602041510316701768196292411759007407077527691402892308345358731766291438308753224229436814257813943401213427019823321041054980785103092588772672763716598267691930009"); + t("0.2840011569167", 161, RoundingMode.ROUND_UP, "0.2879645294742343534669730017936291172044829604377197717083708150048712596393211810959587377785978290191990610029113634232481158163639715854512324663378090332018"); + t("-0.4553358203248290915830488600703910069130746914671345860193710247910765989", 242, RoundingMode.ROUND_DOWN, "-0.47274936845008394936082290033909953045116358336735558782822377555134428468362752501850394277069208032783623254189460940620597603922560181810979694061563376515543821418804620287969411884714933662450634361367053308728090744385132168182616825078"); + t("-0.4365168181289", 73, RoundingMode.ROUND_HALF_UP, "-0.4517235113672798233102652008582346640042367882401894935708868140507773879"); + t("0.797045540648947489303669241095458699584508184", 109, RoundingMode.ROUND_UP, "0.9223871587099068246037637777542711757458864060437676432103532293992884116666026214446389288119163264873173246"); + t("0.82386366423444139268860400280456149", 153, RoundingMode.ROUND_HALF_DOWN, "0.968194399677324760256916731275417361206186546250614190518275975749867590205578326333253077031915501825694577391267819004278710512789857914606037568455336"); + t("0.898378069622536758006718026367395106408691541519773650063935991369264505682194", 277, RoundingMode.ROUND_UP, "1.116062728068253921166966470225624559902918500411753300013458609611704932975449101761284720252187538898065720676954253117841920578819888483607802560132513907179706617296650478625109941303506348792570480336447137976660550110825257512268009946515516378628674529584009293913980897"); + t("-0.7090461713582538521006278403251002842597945374149287341621856172417569888799", 312, RoundingMode.ROUND_UP, "-0.788144650326741747489426350418310820485591557675394357268689157277511744507576998255452367833173443259877357324690183810006210811325657813801404449645602696163770780898121606770310624321860959912121132289206827972498317724797815498905265928388805546743354759962414877159739737942303383435899206963975380008156922"); + t("-0.0035010845521612124911674524088346982303944053123528", 177, RoundingMode.ROUND_HALF_DOWN, "-0.00350109170467893923139739824468958128519846308163436105827332364932129026073067861155960117161729511879835589715734159703955709917327185404692876942432403515761863203555648314137"); + t("0.6516002529", 165, RoundingMode.ROUND_HALF_DOWN, "0.709692116338926336962325961815002848263480827442720808071830502896315126514228360679414839157591924560033785677250659438816798008829139202560728668579694470658475131"); + t("-0.115151757323", 31, RoundingMode.ROUND_DOWN, "-0.1154077719018448396984374365118"); + t("0.14747107052", 93, RoundingMode.ROUND_HALF_DOWN, "0.148010896893933098432417539106379022742797530974396970202749125951001792145184521773039116418"); + t("0.19715", 229, RoundingMode.ROUND_HALF_DOWN, "0.1984500106528849668339797158607602737590431245054820491510275431662437027124143616783849979636216854595439961969102648640429911773013105470655424187941990381389137489027153509888923228149590971686824974525622770664310977641295899"); + t("0.3130369721", 43, RoundingMode.ROUND_DOWN, "0.3183890392543425662545435195302947707924379"); + t("-0.8092088788025011778511562073819364271696454963807373950547581694356156745509", 278, RoundingMode.ROUND_HALF_EVEN, "-0.94280432274424648553952369519948572886798851191173799468615530416741472018903751599413727877043759711387953160387393904797042586984704849186257992030303170848944009837564635223469592529534001256940167933044374084968078026319407788949769160030368898557993417090220134933557077822"); + t("-0.2795174596393597888986509541421584417491049044378435816715262007411766540140618081245404784042748773493418500911542844960213049107873449", 179, RoundingMode.ROUND_UP, "-0.28329149981802802404941754582507919974569014647935336974940899577264257893354415844503696491709887609123031854052066087408804521414123699819622102647915198511035497928924538010456"); + t("-0.794736433", 25, RoundingMode.ROUND_FLOOR, "-0.9185732110321130107983428"); + t("-0.8178910338775543371628772228698509268729654299140695573677875389817857028040819934297156101699095544814698344", 192, RoundingMode.ROUND_DOWN, "-0.957736022904018480065707113750512563781471936472884821430445260628716812690378665408029581610907728838003950336297460798575543868429549568527876799479700611875881725114626246537162334712180747"); + t("0.2827762785550365029215596998820919441903493859894013860572574563502298750313941543574098106445974833949724508257080942742145781554959603842565547655600328499372383412474174795542019669428415104533709787692609650990429595570087260590411259414907816343551242493024338009388993418118009495900543365576", 179, RoundingMode.ROUND_HALF_DOWN, "0.28668729076971747937989391728596615585176394558393370211156775058721695063715420410243895523610276310294731058892854444517997319737781468172412812130805927142824058735820793418824"); + t("0.127", 65, RoundingMode.ROUND_DOWN, "0.12734389909773909837046066308932778252068545168145543105246768259"); + t("0.4", 9, RoundingMode.ROUND_DOWN, "0.411516846"); + t("-0.3517943615774745288529706735544893742", 102, RoundingMode.ROUND_HALF_EVEN, "-0.359487309489057338271171371999746192086001508123700179102597596725102134684104271303274845956438355761"); + t("-0.319385520116411975090409625994837561171888", 51, RoundingMode.ROUND_CEIL, "-0.325080974249459778581886500570415802691523918580828"); + t("0.8136676082707783544050698201823527263300637773009242145794714232779576069682396767349081891647516894536659472311077212595961764953424256167275137026866798923672207361861949720523077514957552567700734577618951", 224, RoundingMode.ROUND_HALF_UP, "0.95043353491896225490961978788561886750741558887080265646347145957588616953534284357952274096126148526672492009673881550497719405198663277888046378041596763705154896129309520362440088613124342550391320947601846326147570481275"); + t("-0.3437971923533", 62, RoundingMode.ROUND_HALF_UP, "-0.3509575988751905488462873304283828206403145129113134982114797"); + t("-0.6306108346192414", 99, RoundingMode.ROUND_CEIL, "-0.682340017534027630623507983819091365261196189868468574095685920062858375350886816455545030061977143"); + t("0.6547518101559529695545869852499017207632747428623186680202292638688163905755130169199871651479", 273, RoundingMode.ROUND_FLOOR, "0.713854212530896211570127487142474929115458390005682178209263143010621164281247265482625370898988167360609899706688536563968873955288242485893562585644649992773779362900413755832501858875468109164181996298396283661260788007123883963675589629890544669932800499903965218404089"); + t("-0.4", 106, RoundingMode.ROUND_DOWN, "-0.4115168460674880193847378976173356048557011351270258517839467807000952508952740024481263162520611953367592"); + t("0.304194771", 140, RoundingMode.ROUND_UP, "0.30909302778062347927065981448510380004853388916655345978850229761360971470408851519437070473546081343474064086076311965886151839514708877861"); + t("0.8", 59, RoundingMode.ROUND_HALF_EVEN, "0.92729521800161223242851246292242880405707410857224052762187"); + t("0.6339630356492806459547093828118125860234300275008119265052405980711428286965762382508661432", 206, RoundingMode.ROUND_CEIL, "0.68666693178255364291546142634275155174691433389615914459928705139181396478121268407077731712256013214921715962500475256375298759038383834516075341568878265147751259997270572109862709265806273599154237176018"); + t("0.9", 256, RoundingMode.ROUND_UP, "1.1197695149986341866866770558453996158951621864033028823756818639144375371065333366735674400308878320118633139461511919036868184064869980955016266192921809616426396073547434413494291322739641652375873379505689491916036275099050120332080857244050916727454"); + t("0.39088", 56, RoundingMode.ROUND_CEIL, "0.40158746162163729639130344367382663094054604807210634936"); + t("-0.04335513884011168072954465341733528056", 14, RoundingMode.ROUND_HALF_UP, "-0.043368732553151"); + t("-0.61344840302336828324463379545127254998575860513942879935394406320556208412149814648014291320283919662399660318053505677227925834303532986477228385014727744226860533699", 41, RoundingMode.ROUND_FLOOR, "-0.66041975738608492839641006449799841565997"); + t("-0.97496473741637150699996550201344659329898699135802440097058998993250310943354472134722074959708825305493047889324606147702840083911962724599548039662331478757", 243, RoundingMode.ROUND_DOWN, "-1.34656240268045339484055040907240215947407025630324109229039573984750171364509733411723528775003678584277246661191146146749044760025700655026034896147107142197550903996330391856428159633833951214774729283534199691599786795542133957718405139985"); + t("0.56622710917892562277930945251014972", 185, RoundingMode.ROUND_HALF_EVEN, "0.60192125341343663130596917752280892951449416699485957628801888620404724042501014023880428798036054261303465891775822649525268158833455891275889693140679322216315672263875732115235009154"); + t("0.6613414289596791706252003237734400632", 76, RoundingMode.ROUND_DOWN, "0.7226057233550936762668597752839732163185951958699328881794461827083433075433"); + t("-0.26864723058092474840353332422560762604916979168548356789093088524801517742718047509156928811127801", 49, RoundingMode.ROUND_DOWN, "-0.2719883588856119454620078335366528313283677344209"); + t("-0.7040785437616639169752909209312551549294762619655", 211, RoundingMode.ROUND_HALF_UP, "-0.7811247071540582463529861590370091451626482693317742711560764088950077987971462951755360193215197248165533300353947418186318095835006238476313751491837118668928614827215494543546299589359242336555747529771985031"); + t("-0.5967174762", 87, RoundingMode.ROUND_HALF_DOWN, "-0.63940423670925451040112385795056860979879343345373773546000071737606521758975919850213"); + t("-0.6521405414069705179755278535", 214, RoundingMode.ROUND_CEIL, "-0.7104045875105225682410178481650389987157219767586558871395926453475243067795778603038642886658479193991528310561760079529638850745910251288990110067151252091069816003222915282969549105899708870040948171626139674595"); + t("0.290970755970642093753646717178826463776742734", 308, RoundingMode.ROUND_UP, "0.29524133967314125132234651507617537279025859048613025058824948628470287546136371077112346536067044892167192837384980844354642995879087003395369240880535429409313487085191684015665072165427778933816689218994023693708175765765323319465775861903933707123422746718665373832688839208229999757198124910604890566976"); + t("-0.9088203013", 148, RoundingMode.ROUND_HALF_UP, "-1.140447554243191977839732815976348108663238722078422349385301529708516749824397168046731839562711585488393876717394548113900567541345841940847523023"); + t("-0.2408622840808351182486594232472793828779256034464681904431999914539918538177219697759317859980180302166335878", 243, RoundingMode.ROUND_CEIL, "-0.243254193619656756933739898713660551797011983222179422017766517741087994487744302381788202349864622438247634052739751657947564997954085720254914482588815072679605583018321873451786436903015258747213452644653384598755258904772417249814961267564"); + t("0.609618683382411268622490328344324360224222235758420083244027582007942886586856963581", 303, RoundingMode.ROUND_HALF_DOWN, "0.655579463527432707090546204170992299185574451274211090058608216520391794796777138416881441699980715376483937939555595100324683736991965072269498675599377664561757016556362988686054072295475002402976965060993133161902706412702905247801035084311921450475620564326724137089795795862866058933795618632525185"); + t("-0.0055805", 274, RoundingMode.ROUND_HALF_DOWN, "-0.005580528965042712311445936438418212906718683460846846572319631601096888896809454356192310820963010587741650952460847225789971031599982324853345189755989151394786856970422111062918762548631074239691310729916628295166883452355823841168482391792865349473447881473543324801370071"); + t("0.8829894", 156, RoundingMode.ROUND_HALF_UP, "1.08219319518273408878029104503112253369493284450895699634026165716513488006702758918831316725914947086605416306233784317804241188014511768452446021927481247"); + t("-0.63645997783812633836470933948333787475757914134459832881111403693150139546829126728749571862569677847031031", 229, RoundingMode.ROUND_DOWN, "-0.6898999006886794305350727355185581932000585241509500182033271903399492699129433216244574379483174092168980521236494902638269816419396641762122594080965284461605677781066785966776289863027094969465899135956327834134418118502068427"); + t("0.1277897601173343793336282237792550769322", 288, RoundingMode.ROUND_CEIL, "0.128140147002831941781570330315004622096003542359665546720767020100380456068057744440981211445228352927703494574645369682048467701466599529901205657847144598932153446211899755614460810545848493394174599621006148803556895222006113446738027143287052538074525259223781859761888971901740066569"); + t("-0.45484196892369044791751455185622831980749388445389650176384849994953031326155440179416239491136134", 115, RoundingMode.ROUND_HALF_UP, "-0.472194757158115855173355552713494003607279366353559852721547586095207784358615368325397474528307657165851187385158"); + t("0.115351", 107, RoundingMode.ROUND_FLOOR, "0.11560835116765349824387588927771061499617405145740470821764525878167532578160818135618278075799845148340326"); + t("0.49113784006", 316, RoundingMode.ROUND_HALF_DOWN, "0.5133955104391799841725572091146592371538717224456469775464006608148391687650718538819454166524134769347448346975576131570036120442284360059363006249893794393398597921500812620876704663943967564769211389673181192949081318954111934082886011284256822534486146568118025373848859084238364725038286297188249666200855378999"); + t("0.54183276131811567459312606026005995910825808600999326923686945489140624693183809359787663658282604320429914007", 42, RoundingMode.ROUND_HALF_DOWN, "0.572616176824019338359998743764887028590431"); + t("-0.0482680519146094340448225576649852693032313844709640842708727510230875929072219015873503", 17, RoundingMode.ROUND_UP, "-0.048286814115252291"); + t("0.8147960134020575817491493", 226, RoundingMode.ROUND_HALF_EVEN, "0.9523772538366392986677487672095659951452997609782250515777892433831849728451101501169048222792713586421337691013865079780930234855640416199547395410042705231289598004454521126879170091309609240579614459711872038284609452382416"); + t("0.047687", 101, RoundingMode.ROUND_DOWN, "0.04770509229051474471493983842950012879012222908032679975298979769124959326443666873921208777005233374"); + t("0.400490847152926227493022819263474379728", 36, RoundingMode.ROUND_HALF_EVEN, "0.41205246684824449728857185713887277"); + t("0.076711", 51, RoundingMode.ROUND_HALF_EVEN, "0.0767864352326065672356988708668838076349497516950746"); + t("0.48924880342545", 309, RoundingMode.ROUND_UP, "0.511228223172015967596781779046839862827649118393469795389563025063971009183310977792162648934648138986287596089113210623764608681664987701391013356880488091529087204571375138593473822860474242053007209366613097984894275287444422155689986187318814343860531143959368436632267846645265974842490047799971336541177"); + t("-0.1590044125696567894", 171, RoundingMode.ROUND_HALF_DOWN, "-0.159682154243990129991828919361095625427440629921080219182964897359828217792772691761490476247540604985939350778160375146273974746443091772870441329506160967060698650882802"); + t("0.477114354340282734", 117, RoundingMode.ROUND_HALF_UP, "0.497368308318675873205394968377917652836721820945493503242200939815709292416105643940310683101430871176830828877247157"); + t("-0.030089416945431374523342993802590679498", 56, RoundingMode.ROUND_HALF_DOWN, "-0.030093959153927118895563909371353932795553346621144309701"); + t("0.9248389439877181972310393220783383319591813769296178231129769388374245977285175257446687911279999880455799173798980575677", 44, RoundingMode.ROUND_HALF_EVEN, "1.1806119441436781033967869396227809392123162"); + t("-0.187489873", 214, RoundingMode.ROUND_HALF_UP, "-0.1886060763362773360606999545653773759668203591031152776275386706361250513301288566224821970175401576653623337191567481698555934808219729385248311247877497479541035268763932232147409761143419714154934949134099270583"); + t("0.689583358058704619619521095769784813", 301, RoundingMode.ROUND_DOWN, "0.7609135867028723671937512764158215410177847212391355398846980639269096967670675550870761125521338030634915293482365090543566570475555173976447470118067142194362779856700389409606248298134102987686803493332036884507321152684857983279798335280987942185187264123730747240571970058634737190399566661613536"); + t("0.864295508050287135701787834755100253655441951745957444829108964642320332637794337", 140, RoundingMode.ROUND_HALF_UP, "1.0437480577179911926322545427380191847165915544378505354299703964825432370892546105998972912705040198929944911788321147928335138854395351426"); + t("-0.057593585315", 147, RoundingMode.ROUND_CEIL, "-0.0576254727911039267841843674616767668102282747897303747720704250987293798031093732612161074671404602094500700088031925754170590306561051705986907002"); + t("-0.9157609557092389866947796298923918455543", 115, RoundingMode.ROUND_CEIL, "-1.157398076625941446421483893356516242496259311136417026207062363132501239687091037722896563866978369878134054019089"); + t("-0.7895869037392359356956095559146680489133004", 125, RoundingMode.ROUND_HALF_UP, "-0.91013551425631469441529508780968647162079278116394455802141788012697263436149293934946913448474070666638489026579551100648131"); + t("0.90373837159733070834237270993002057133328", 314, RoundingMode.ROUND_HALF_UP, "1.1284233482037720895939485471976291624245623466540080072880372691910508956740979643173007838374393797257146433044932933523229881994411161194371426056652647412021650366098522187742288903189671824231639710452221532721090521102633075588289095066663855258024450648966057057122552692518412057591403862376111509321849503"); + t("-0.3134", 258, RoundingMode.ROUND_DOWN, "-0.318771302211125075009585645164765066067753035925129465554946595995600426758605923737539666390184296704424418086818870810421720646867222172321479336348377092329651236469392752921824788708136905148875177747824216268144332691741499433796411283705356267655740407"); + t("-0.92321797024555211504025596969164119785792394519777707774", 176, RoundingMode.ROUND_DOWN, "-1.1763720912665937892425066064885711385346113110476166231456974293465371482722007739351821964621814337217849512831595854111102828870697561585740190873962619376742510989888887911"); + t("-0.7", 21, RoundingMode.ROUND_HALF_EVEN, "-0.77539749661075306374"); + t("-0.473237592166879320274820106309", 29, RoundingMode.ROUND_CEIL, "-0.49296234326425402920406167446"); + t("0.97479857176822531148564204464605634745805609931", 7, RoundingMode.ROUND_HALF_UP, "1.345816"); + t("0.03078045172592011249531263462381405030184076623573561200440940431449097198371086", 226, RoundingMode.ROUND_DOWN, "0.03078531421839076316548923869348601463017683682576874752022867361866456871111223460707404245017156331535104987032746483833436950750813991141549018685041848674393709301870530913846924024617974092939171543304276791825135899491045"); + t("-0.9037702680153042636268", 220, RoundingMode.ROUND_HALF_DOWN, "-1.128497863570161678510229879652962981431034319779895858476793903777015432979137254160918038576042752240965414432748973261537661447464801403843752336383050705829370276252247268954000644884198914747319143135601324295238846"); + t("0.6934026260236015998623446006885692415413066025066611875167501424144144144100167219157183319356255032836427754532", 180, RoundingMode.ROUND_HALF_UP, "0.766200648761702217564687835550026933737171098104302302135353874278450359027201690408901579721339684226252564315381514113391153922622188128152139915667360288209137277124723105155129"); + t("0.6817875805781", 112, RoundingMode.ROUND_CEIL, "0.750203412494142462810562588602076026065792808585501470997508940050462000684924954003944215500094430437775255744"); + t("-0.863219921531450595020745745616864821640962209465031", 293, RoundingMode.ROUND_HALF_DOWN, "-1.0416135610923886684167687965161815814552955540014934839969299208393182629793975611815318448922288129405102085187992591405660180761094043357244481894642536476129451002752675737946120990417848227884254776660939115159020965910830809163046791461804769245302572722582404585838618161768668420927916"); + t("0.62113", 75, RoundingMode.ROUND_HALF_UP, "0.670183745172497705305012968016785178206016340786050650653833433533018248989"); + t("-0.97081483", 81, RoundingMode.ROUND_FLOOR, "-1.32860529606315957519091964178369207510302761893723560671174570022997004472860298"); + t("0.387580487094289", 53, RoundingMode.ROUND_CEIL, "0.39800547209797859195552166169007747909698639304945746"); + t("-0.628165438989060313515969132913809", 31, RoundingMode.ROUND_CEIL, "-0.6791931553014339088410184352774"); + t("-0.158087022809689825416865009887227952442623762830709624972834645361015952497326409059932573370885048876720822900214666764342589889287217285948942049549889055980741060665729131160549", 228, RoundingMode.ROUND_HALF_UP, "-0.15875301232434135149108980289780049536992939442289065689531936435693938424293382483169033959033175428904155783593764816849547014253915143053059480782095043160805716319676175798099334112094097083189037836553222907260030469465319"); + t("0.4104213810027664745105970666208572279928708", 174, RoundingMode.ROUND_UP, "0.422916107435853097843512790878490430109162312644323362917405235378392700108275517499567388238907282636511100402454243878296733544493814366455191162135100537744461586857381221"); + t("-0.301637201655712139", 131, RoundingMode.ROUND_CEIL, "-0.30640937194210207446838914920267609876369892349272459255998465781442431279556039810798580870973962757869803532302324268562501717977"); + t("0.93482237202302541890014955753899910808492252711183177369097336073229110133181533539702", 290, RoundingMode.ROUND_FLOOR, "1.207758537204826518005533764307993644324579869822335131080718273333521010735394568676127862423687334840815988536579753814518190271420519432391332924308337047188485208654952502735188926001007864314773257118807720841601531494682183457461987115516352623615808303649212572143802541192729203488"); + t("-0.60135674038101002975715591719470926172466902870325074455819667984171374350542892022303834077988171737140216469043218185382701870371298951774479334400178", 79, RoundingMode.ROUND_UP, "-0.6451981150201027798557008850809148652230304949184771321630399645075788820442644"); + t("-0.8330039798743065918", 157, RoundingMode.ROUND_CEIL, "-0.9845152278318006801810152435085322537118852068100517794847927671464767330771681907951727457925602090457560511257395328263381467623091737327707106003215009121"); + t("-0.03141154528", 36, RoundingMode.ROUND_HALF_UP, "-0.0314167131259140457896719671245270669"); + t("0.2135891659403", 107, RoundingMode.ROUND_HALF_DOWN, "0.21524744116105895112244229626832287025944541377052049375178644229452752016261032422476805752402395174702717"); + t("-0.9067678263839312699737232810857432825846039828815374567987661253922195613524739418049422161264620225057245670213151038832879847003106408997998490845713", 19, RoundingMode.ROUND_HALF_UP, "-1.135553833366382442"); + t("-0.631557037", 154, RoundingMode.ROUND_UP, "-0.6835597994159409512220454917556427485102212133329624700200669685307652705507126419039826867112001146860965574075844419488693982709108131829291650194901506"); + t("-0.92448229679999", 75, RoundingMode.ROUND_HALF_EVEN, "-1.17967535094344628992400549122932268589945313798155333398438877720113831443"); + t("0.7", 203, RoundingMode.ROUND_HALF_DOWN, "0.77539749661075306374035335271498711355578873864116199359771996373272021188071119886541090349437287648129472101138705301547788468547740235492287477310723027451717074493441834074179947639522164121434429874"); + t("0.120429790041444089332511", 177, RoundingMode.ROUND_UP, "0.120722812092234512061617081038475621145231351148142571111287929778199332874130079342665172603494995670787182301996813939205506850969549599297747018586794586211120953345128002584"); + t("0.76728455902896578739", 190, RoundingMode.ROUND_HALF_DOWN, "0.8745961281044826926383496398320236849027998190593924050869565055832491194951443188311622672266199969052511512621859303129383628857337850527442452548251171917515064484987753163379905963640884"); + t("0.676296200403884761984554383963773739103469225089572473977466419891176", 189, RoundingMode.ROUND_UP, "0.742722920183546013078569385290886238515893939103498729099945435527438770974681193906280235406562153062565388976741299577308795194687231073003808723089948035909071580836918761852320297503082"); + t("0.556", 33, RoundingMode.ROUND_CEIL, "0.589565588210120864401647975826429"); + t("-0.68679290629119645332547686986653370136210024817509327690799310579504307950013541", 93, RoundingMode.ROUND_CEIL, "-0.757067502672989843307400442740906556271718026897281754636743349561322264190122741804256479838"); + t("0.7619810871193173482427486", 211, RoundingMode.ROUND_UP, "0.866366758880222391327473883329870957914108474740314099631926108609412129069607338398040756223392725609940720559933417146379812487912950770698702945540267787480136043793433931773433147382622967106777837309079768"); + t("-0.8657", 25, RoundingMode.ROUND_HALF_EVEN, "-1.046547109974487548310733"); + t("-0.8181007854350594", 257, RoundingMode.ROUND_HALF_UP, "-0.95810066616043426429338879741136047038307098991559917199261755571190052797315814381069383622510084503706253007288657933211137502517377208924080332212039673373856020557689085086284079771855525174537704063731936575685871277348272982725140590787184883205424329"); + t("0.80865180712682725", 279, RoundingMode.ROUND_CEIL, "0.941856767800203289218163773589384613305641784388663137032935726265118209095169196684230053484024665444320053696016424457399755651076319974837573527263444678644658507338033896305716632156880694655972288306460137435149785686960056444100099241803785518134545757293120453778408568103"); + t("-0.7726303476763987327537627319872388678610009813347101199442418136589738280153442132516546850266039567531202584662322156750222212609899267223227264798428383480952961509104467781295599401735168780055", 319, RoundingMode.ROUND_DOWN, "-0.8829739882385629896667408463407462946704167918806868048790957243650301892287013511117302473814856033870868793330857026089057825685583076636158461502512022853344766659776754110585194510756446853584274994997983708835532535826504053831417589668721195804156312689141138779934940296486865014867755021516155129000501935515042"); + t("0.916549881035908422824586778006174242215451043203042011231843927228267667256328791624281428688937943427215987008872491715754899323168914976801105727312939150604139732246800117685956087631214355020428814640400731618393520972774258261858754223897342275028505", 136, RoundingMode.ROUND_HALF_UP, "1.15936634448360989137682659287117342547366940530805620925133871731913895858437111238286462073031716077080843793183875492472045460513897"); + t("0.6", 117, RoundingMode.ROUND_HALF_EVEN, "0.643501108793284386802809228717322638041510591115312382865606118713512474811621088712816844701282748878014338754259478"); + t("0.34512056055", 103, RoundingMode.ROUND_HALF_EVEN, "0.3523672349709244910421999326736380677853490082181533757200161368223188597440200695838164406449177060587"); + t("0.71", 159, RoundingMode.ROUND_UP, "0.789498209346171973007618860883623899916092318857675760459772880703734515802889468146046713104844293677712693132824206808022709769831768944355875090888108522134"); + t("-0.66754582642750086470936489041597467654", 129, RoundingMode.ROUND_CEIL, "-0.730907795941491817093895133790511650131954192418424954785060201122486921691288200136315015053425931212196680609350523303374624746"); + t("-0.043994800903461", 95, RoundingMode.ROUND_HALF_EVEN, "-0.044009005580335017761197173511358349798378935926146449342537138167677790368106167459999226067585"); + t("-0.433979067962794142505294965320698152072552457191776240092746227667", 54, RoundingMode.ROUND_DOWN, "-0.448904760244579815796359404337616922277459596923467241"); + t("0.66", 177, RoundingMode.ROUND_FLOOR, "0.720818760870089630031882975302636698716441484371244593399029329865687658168744092978266008235694436693704496371524853690193943742068348914562673095345905009587901248929444739089"); + t("0.91457420620989418033892", 180, RoundingMode.ROUND_HALF_DOWN, "1.15445380872948558079499534442464488242353605743569440430015051530922511426436827787382705424659475744862009029274837879787942942605882536544158149964619842990259764135934087983113"); + t("0.3906916562062902", 184, RoundingMode.ROUND_HALF_EVEN, "0.4013828472246966916285365964789087919399154830332428990369840346899528831817910443467633097906952941427016092641853317872370208304538503710728495306509572201918129539760084495797577653"); + t("0.55186528072680064415498724206645668894582", 136, RoundingMode.ROUND_CEIL, "0.5845993133717524218549519324150897536188312199481242371133357862506955777907389528802754988370336731170004116359976019574804382331427813"); + t("-0.146075234997972772", 109, RoundingMode.ROUND_DOWN, "-0.1465997790942712676825653753370189416918213270912295246242873361384311775343868912415051529401843392789372101"); + t("-0.550024", 23, RoundingMode.ROUND_FLOOR, "-0.58239297498899539206011"); + t("-0.16411137353265355881681540111707250634273067", 184, RoundingMode.ROUND_HALF_EVEN, "-0.1648571034484768946302891001431212658344993821627879939313892351117777688597317785881326661687582255839702827637329740737537177159458613901465637224797605786855054895024896941560098374"); + t("-0.6866959219", 150, RoundingMode.ROUND_CEIL, "-0.756934080566579109104643337594548983092219733274024346686125954546767308573917671928802228176792493366930184477242390254356108873509595652131419113812"); + t("0.54801859001717359916354", 49, RoundingMode.ROUND_DOWN, "0.5799936078873280810110205575411395390191087669864"); + t("-0.46135770851334328045026394081706", 141, RoundingMode.ROUND_FLOOR, "-0.479524895897516605773499283499192379589817254644453767385087681713398436355361095508420336207889443599830200565765406955721820825483055719875"); + t("-0.402559966751262129147022529711724533594874586968946698089210787246011996074554468386301178673775759", 210, RoundingMode.ROUND_UP, "-0.414311706976558760039501533006652998040983220339068011692833014608955560239964728390507951809285684286664911105014012292373919475760295674403999535458235668527750915569927564100858663303466485301517362383716547"); + t("-0.4683088899874989429974131559432712019786643642466105607421541118589099450073586143", 136, RoundingMode.ROUND_HALF_UP, "-0.4873758424536772738317064839528394277408125312902863483637402110598125114755636583929787554760557307190866224939069103052711223987513435"); + t("0.27537677436513", 87, RoundingMode.ROUND_HALF_EVEN, "0.278981608113443061302204521265589288726702807332465059850035628109315137980579961704831"); + t("0.074", 51, RoundingMode.ROUND_HALF_UP, "0.0740677043033278163677656592882429618178769948075489"); + t("0.44389577110482845644258561284830564129050187564514", 26, RoundingMode.ROUND_CEIL, "0.45994159370835232141671786"); + t("0.79151456779862000548551102596495619937826857107625227219953412150705711268861417391389828512169697782015482937949589397871232469972917270170769477448", 80, RoundingMode.ROUND_DOWN, "0.91328326032801542880239730508620623830327298690925394298003776764030700859387389"); + t("0.6604483265339284113463550547604328503461859", 101, RoundingMode.ROUND_CEIL, "0.72141567911579108300518209234859278779110897839208168798772642868286322946391455737034328738154270136"); + t("0.524828857", 5, RoundingMode.ROUND_CEIL, "0.55252"); + t("0.9753104368788756558159787785518486414813770242171223696223603164410618", 134, RoundingMode.ROUND_HALF_EVEN, "1.3481224256497677178017589961876331763675683010476435544661018020130097421729831896635046187698372513391349429527038761918273776681759"); + t("-0.8439", 99, RoundingMode.ROUND_HALF_EVEN, "-1.00451152439708133592915833193380988899666075772544132473189740420096646266079249974274724905765428"); + t("-0.765047086836804", 32, RoundingMode.ROUND_HALF_EVEN, "-0.87111444636980265344878431431314"); + t("-0.8646385624839085860887672235696491", 238, RoundingMode.ROUND_FLOOR, "-1.044430495866221973145197696021981853148111832744033405575782471076644427452810684805391062963538010063758705644886727950240364969925221546788290213560383009092596798009011517979822830786617624969047623316381933738853914843860690504891514"); + t("-0.4589236971374261691850165693145765295308234867706948289043405", 270, RoundingMode.ROUND_UP, "-0.476783415132947908323642346259679690310623190718502202457793869614477625418296545623040346622666841833050681869846098236599936798256093939478968324630131801115831334718884365127843490940903855921608694383526100581608513861150157490842959672063682212981196700083869986192"); + t("0.3896123202596462640243469782579072859666092096691018020981352451", 145, RoundingMode.ROUND_HALF_EVEN, "0.4002106120989776668931051758718787991367561875356896388646369850676906617494355205656926402325949310714153999882796007787625156219933889017506432"); + t("-0.303", 254, RoundingMode.ROUND_FLOOR, "-0.30783907040876792121510536109523187982242884051368525496594226813212357419698266185959575883139074602781263663734367163737121385086938445928188265807214271585884836376698829544634456224901961507384983017559267905307575220542265905880239862946724365803028"); + */ + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalAsinhTests.cs b/DecimalSharp.Tests/BigDecimalAsinhTests.cs new file mode 100644 index 0000000..0687b97 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalAsinhTests.cs @@ -0,0 +1,1044 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalAsinh")] + public class BigDecimalAsinhTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Asinh() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Asinh().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "Infinity"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "-Infinity"); + t("0", 40, RoundingMode.ROUND_HALF_UP, "0"); + t("-0", 40, RoundingMode.ROUND_HALF_UP, "-0"); + + t("3.1444197343", 4, RoundingMode.ROUND_FLOOR, "1.863"); + t("-7546164.80347805747707434691023987685", 5, RoundingMode.ROUND_CEIL, "-16.529"); + t("-0.15139", 9, RoundingMode.ROUND_DOWN, "-0.150817601"); + t("7649", 8, RoundingMode.ROUND_CEIL, "9.6354774"); + t("9522664768544403839474412593333.0574738", 8, RoundingMode.ROUND_HALF_EVEN, "72.024375"); + t("7979240.25859873", 3, RoundingMode.ROUND_FLOOR, "16.5"); + t("268", 5, RoundingMode.ROUND_CEIL, "6.2842"); + t("-0.036", 2, RoundingMode.ROUND_HALF_DOWN, "-0.036"); + t("0.4807", 9, RoundingMode.ROUND_FLOOR, "0.4638831"); + t("0.229", 10, RoundingMode.ROUND_HALF_UP, "0.2270443104"); + t("2.00400000074005", 7, RoundingMode.ROUND_UP, "1.445423"); + t("200000000000000.00004161", 6, RoundingMode.ROUND_HALF_DOWN, "33.6225"); + t("-58888888888888791888.6", 3, RoundingMode.ROUND_UP, "-46.3"); + t("-6031221", 3, RoundingMode.ROUND_HALF_UP, "-16.3"); + t("-640.3942", 7, RoundingMode.ROUND_HALF_DOWN, "-7.155232"); + t("14", 10, RoundingMode.ROUND_HALF_UP, "3.333477587"); + t("4", 2, RoundingMode.ROUND_UP, "2.1"); + t("0.03", 7, RoundingMode.ROUND_UP, "0.02999551"); + t("90", 1, RoundingMode.ROUND_HALF_UP, "5"); + t("5312357191358436060512320673773898993193725886736164185043184432297", 9, RoundingMode.ROUND_HALF_DOWN, "154.333799"); + t("7199699999999999999999999999999999999999999939998.999999990999999", 5, RoundingMode.ROUND_FLOOR, "113.19"); + t("-882.444444444144444444494444440464444444494940444444244444", 5, RoundingMode.ROUND_HALF_UP, "-7.4758"); + t("-8", 13, RoundingMode.ROUND_HALF_DOWN, "-2.776472280724"); + t("-86000000000000000000.000000000000000000000005", 70, RoundingMode.ROUND_UP, "-46.59402615070627535463115294058075590852999710911467932978308270954662"); + t("-376.89", 48, RoundingMode.ROUND_HALF_UP, "-6.62510230823208343124289061224985909335679702244"); + t("96266757965567956426092817863148449", 5, RoundingMode.ROUND_UP, "81.246"); + t("7519.1832", 46, RoundingMode.ROUND_DOWN, "9.618359979005094092372581180036903865361423221"); + t("3111111111111111111111111113111111111111.111111111111161138", 73, RoundingMode.ROUND_CEIL, "91.62894574016671152726822536730571926386870493068213127138241128153116515"); + t("-8428702594578936542477442030434333806", 37, RoundingMode.ROUND_HALF_DOWN, "-85.71785338514359573130458501589518584"); + t("-729028279311299860.939180266635717461", 48, RoundingMode.ROUND_HALF_EVEN, "-41.8236360986491235923183022666827171650501445231"); + t("636378004660459076120.99604591124", 11, RoundingMode.ROUND_HALF_UP, "48.595471588"); + t("461967326081151345517140931535", 45, RoundingMode.ROUND_DOWN, "68.9984388572118740675493758006785202194685299"); + t("0.92", 17, RoundingMode.ROUND_HALF_EVEN, "0.82365909043241051"); + t("-230982323268609169145946104396150217.76896733458979187647947774685888534", 35, RoundingMode.ROUND_UP, "-82.120796434310525765547736423296875"); + t("-672211211111111111101111111111.1111111111111111111111111111131117111", 35, RoundingMode.ROUND_HALF_DOWN, "-69.373517284788400913185878628465723"); + t("0.00000060482048460767108485365525600300117458763457062849", 77, RoundingMode.ROUND_CEIL, "0.00000060482048460763421017663533424068534983602813406207303024723328078399099182286"); + t("-0.03384059130054301010037", 28, RoundingMode.ROUND_HALF_UP, "-0.03383413566704186353496859594"); + t("71984879069309", 42, RoundingMode.ROUND_DOWN, "32.6006243805224822843383423875877387660665"); + t("0.0900770980497960620934208869160426353386017063437926198857463084798514071501", 39, RoundingMode.ROUND_UP, "0.089955728166487127683719480764589414987"); + t("2844969", 19, RoundingMode.ROUND_HALF_DOWN, "15.55420990973386475"); + t("-356", 50, RoundingMode.ROUND_DOWN, "-6.5680798840106081722529702658569854797470604302438"); + t("-49.3", 14, RoundingMode.ROUND_HALF_UP, "-4.5911741056591"); + t("0.03933187411044072735132236169900601818974716", 8, RoundingMode.ROUND_FLOOR, "0.03932174"); + t("-34170.3", 62, RoundingMode.ROUND_UP, "-11.132259305476110273648480940373325075775200555781318183293398"); + t("77.47574325137050802631", 52, RoundingMode.ROUND_DOWN, "5.043153724397571705290385521814303549847001281430545"); + + /* + t("0.682", 3, RoundingMode.ROUND_CEIL, "0.638"); + t("-85.2", 9, RoundingMode.ROUND_HALF_DOWN, "-5.13818305"); + t("-102548514", 3, RoundingMode.ROUND_FLOOR, "-19.2"); + t("47777743499999999999999999999", 9, RoundingMode.ROUND_HALF_UP, "66.7295046"); + t("-0.69381", 3, RoundingMode.ROUND_DOWN, "-0.647"); + t("-0.2924236641496707700577", 9, RoundingMode.ROUND_HALF_UP, "-0.288408716"); + t("6353918", 10, RoundingMode.ROUND_UP, "16.35772937"); + t("35", 1, RoundingMode.ROUND_UP, "5"); + t("-0.7", 10, RoundingMode.ROUND_HALF_EVEN, "-0.6526665661"); + t("-4530581087059730651716886688928640783.6125206", 5, RoundingMode.ROUND_HALF_DOWN, "-85.097"); + t("-0.32517254", 7, RoundingMode.ROUND_HALF_UP, "-0.3196987"); + t("911", 9, RoundingMode.ROUND_FLOOR, "7.50769037"); + t("5.6444", 8, RoundingMode.ROUND_HALF_EVEN, "2.4315673"); + t("-6.03718732513736", 6, RoundingMode.ROUND_HALF_UP, "-2.49788"); + t("-26", 7, RoundingMode.ROUND_HALF_DOWN, "-3.951613"); + t("0.77", 4, RoundingMode.ROUND_FLOOR, "0.709"); + t("-8950", 5, RoundingMode.ROUND_HALF_UP, "-9.7926"); + t("75.921", 9, RoundingMode.ROUND_UP, "5.02288388"); + t("73723056", 2, RoundingMode.ROUND_HALF_DOWN, "19"); + t("-0.00247221933082699097335671317641", 9, RoundingMode.ROUND_UP, "-0.00247221682"); + t("-5555555555557249821854397896148166804182276566028427673263.7779", 3, RoundingMode.ROUND_UP, "-134"); + t("776000000", 8, RoundingMode.ROUND_FLOOR, "21.16281"); + t("0.508951", 4, RoundingMode.ROUND_UP, "0.4893"); + t("1205", 9, RoundingMode.ROUND_HALF_DOWN, "7.7873822"); + t("-8.1876", 2, RoundingMode.ROUND_HALF_UP, "-2.8"); + t("-99", 7, RoundingMode.ROUND_DOWN, "-5.288292"); + t("0.529286", 10, RoundingMode.ROUND_HALF_EVEN, "0.5072514491"); + t("3499.99999999999999999999999999999999999999992999999999999899999299999939999999999999999999999999999", 5, RoundingMode.ROUND_CEIL, "8.8537"); + t("79999999999999999999979999999999999999699999.9999991", 7, RoundingMode.ROUND_HALF_UP, "101.7837"); + t("-7.079193", 2, RoundingMode.ROUND_FLOOR, "-2.7"); + t("-0.96481", 3, RoundingMode.ROUND_HALF_EVEN, "-0.856"); + t("-144444444736322222222.99999999955", 8, RoundingMode.ROUND_HALF_EVEN, "-47.112574"); + t("7000000000063467184972946309802980143841464616044482005026996333333333.222222222222222222333333333", 7, RoundingMode.ROUND_HALF_DOWN, "161.5174"); + t("-566666666666666666637", 6, RoundingMode.ROUND_HALF_EVEN, "-48.4795"); + t("0.3873319", 6, RoundingMode.ROUND_FLOOR, "0.378247"); + t("0.8", 6, RoundingMode.ROUND_FLOOR, "0.732668"); + t("267777777777777777.66666666664772310324006", 8, RoundingMode.ROUND_HALF_UP, "40.822081"); + t("-41247431997421.70230848268919951562", 7, RoundingMode.ROUND_UP, "-32.04376"); + t("2456055769", 2, RoundingMode.ROUND_CEIL, "23"); + t("-558434477920361153014472214014281", 6, RoundingMode.ROUND_HALF_UP, "-76.0958"); + t("-98", 7, RoundingMode.ROUND_UP, "-5.278141"); + t("-0.209533121064196837027725", 7, RoundingMode.ROUND_FLOOR, "-0.2080295"); + t("0.4", 10, RoundingMode.ROUND_CEIL, "0.3900353198"); + t("55555555551.53648888888888", 2, RoundingMode.ROUND_UP, "26"); + t("-0.9", 3, RoundingMode.ROUND_HALF_UP, "-0.809"); + t("0.576", 6, RoundingMode.ROUND_UP, "0.548137"); + t("722308888888888888888888888888888948888888880888.884888", 10, RoundingMode.ROUND_HALF_EVEN, "110.8919292"); + t("-722222222.888888888888888888889999982866666666666", 7, RoundingMode.ROUND_HALF_EVEN, "-21.09099"); + t("4500976290305344320022179681918610711917504922.23990746944329806056334690358051152798", 9, RoundingMode.ROUND_HALF_DOWN, "105.813771"); + t("6968939465618170893247651694777992551301206924869", 6, RoundingMode.ROUND_FLOOR, "113.158"); + t("598822222.8888222222222", 3, RoundingMode.ROUND_HALF_DOWN, "20.9"); + t("-66993365125655557377109", 3, RoundingMode.ROUND_DOWN, "-53.2"); + t("-4", 8, RoundingMode.ROUND_HALF_DOWN, "-2.0947125"); + t("-1782", 4, RoundingMode.ROUND_CEIL, "-8.178"); + t("89000003000000000000000000800000.5", 10, RoundingMode.ROUND_HALF_DOWN, "74.25933637"); + t("-0.792", 9, RoundingMode.ROUND_CEIL, "-0.726409109"); + t("-9745759675977667440753", 7, RoundingMode.ROUND_FLOOR, "-51.32427"); + t("1733.6333", 9, RoundingMode.ROUND_FLOOR, "8.15112192"); + t("673", 5, RoundingMode.ROUND_HALF_EVEN, "7.2049"); + t("0.9", 2, RoundingMode.ROUND_CEIL, "0.81"); + t("-444444444499.44444444445998", 10, RoundingMode.ROUND_UP, "-27.51323809"); + t("-4", 10, RoundingMode.ROUND_DOWN, "-2.094712547"); + t("777777777554198536384501850189761294152473151886095.222222222222222222615063071111", 5, RoundingMode.ROUND_HALF_DOWN, "117.87"); + t("-0.59945", 9, RoundingMode.ROUND_FLOOR, "-0.568353221"); + t("-910000.06000000000000005004", 1, RoundingMode.ROUND_HALF_UP, "-10"); + t("0.69205786", 1, RoundingMode.ROUND_DOWN, "0.6"); + t("3", 7, RoundingMode.ROUND_FLOOR, "1.818446"); + t("-3.2", 4, RoundingMode.ROUND_HALF_EVEN, "-1.88"); + t("-50638", 4, RoundingMode.ROUND_HALF_UP, "-11.53"); + t("-3415708151311138350224754.36249031067865886817990333853976", 7, RoundingMode.ROUND_CEIL, "-57.18357"); + t("-0.0271", 2, RoundingMode.ROUND_HALF_UP, "-0.027"); + t("23777777777777777777777777277777777777777777.7777777777772777777777777777777477", 2, RoundingMode.ROUND_HALF_DOWN, "100"); + t("0.591069", 9, RoundingMode.ROUND_HALF_DOWN, "0.561151558"); + t("-0.322740426732849", 2, RoundingMode.ROUND_HALF_DOWN, "-0.32"); + t("4.48", 9, RoundingMode.ROUND_DOWN, "2.20499988"); + t("0.6328", 10, RoundingMode.ROUND_HALF_EVEN, "0.5967464714"); + t("-6359390.9756999", 3, RoundingMode.ROUND_DOWN, "-16.3"); + t("481087238.871037256182489838753932", 7, RoundingMode.ROUND_CEIL, "20.68471"); + t("4600", 4, RoundingMode.ROUND_DOWN, "9.126"); + t("-79.242598903374875658856365015015317943", 6, RoundingMode.ROUND_HALF_UP, "-5.0657"); + t("2.5", 9, RoundingMode.ROUND_FLOOR, "1.64723114"); + t("-0.0000855455725996969215870071401242140796102065705794", 3, RoundingMode.ROUND_UP, "-0.0000856"); + t("341395309.99", 7, RoundingMode.ROUND_HALF_EVEN, "20.3417"); + t("-0.63607908", 5, RoundingMode.ROUND_DOWN, "-0.59951"); + t("-265000", 5, RoundingMode.ROUND_HALF_DOWN, "-13.181"); + t("-8555626219999999999.6125543165495012423764", 5, RoundingMode.ROUND_UP, "-44.287"); + t("-0.28497555947", 2, RoundingMode.ROUND_HALF_DOWN, "-0.28"); + t("-0.14", 5, RoundingMode.ROUND_DOWN, "-0.13954"); + t("-878.76", 6, RoundingMode.ROUND_HALF_DOWN, "-7.47166"); + t("-5", 1, RoundingMode.ROUND_CEIL, "-2"); + t("0.46225929610324484042670805669384676820364835844637613373", 6, RoundingMode.ROUND_FLOOR, "0.447203"); + t("-9011", 1, RoundingMode.ROUND_HALF_UP, "-10"); + t("400000000000010000005000000000000030100000960000000000000.00050300005", 1, RoundingMode.ROUND_FLOOR, "100"); + t("-14405.968", 7, RoundingMode.ROUND_CEIL, "-10.26854"); + t("0.434118390629225046961130013498918008428738556663808535997420089954145070931", 1, RoundingMode.ROUND_FLOOR, "0.4"); + t("-2566666.66666666666664666666666766", 9, RoundingMode.ROUND_HALF_EVEN, "-15.4512658"); + t("0.5", 6, RoundingMode.ROUND_CEIL, "0.481212"); + t("3891.886", 5, RoundingMode.ROUND_FLOOR, "8.9597"); + t("-0.282", 3, RoundingMode.ROUND_CEIL, "-0.278"); + t("-116518478153.090434571835", 1, RoundingMode.ROUND_CEIL, "-20"); + t("79484193485555555555555555555.0266492471", 3, RoundingMode.ROUND_CEIL, "67.3"); + t("-92491603481063366395630532188686969561243707859719766352720742", 2, RoundingMode.ROUND_HALF_EVEN, "-140"); + t("-0.0009479", 1, RoundingMode.ROUND_HALF_DOWN, "-0.0009"); + t("261479814", 8, RoundingMode.ROUND_UP, "20.075015"); + t("917722948548640439786091892946571165614546092608149355118069326442239641939330985432223709900", 5, RoundingMode.ROUND_DOWN, "214.74"); + t("-0.228", 8, RoundingMode.ROUND_FLOOR, "-0.22606944"); + t("-20644.40042", 6, RoundingMode.ROUND_CEIL, "-10.6283"); + t("58", 4, RoundingMode.ROUND_FLOOR, "4.753"); + t("-0.407", 8, RoundingMode.ROUND_HALF_UP, "-0.39652679"); + t("0.2999999991", 4, RoundingMode.ROUND_HALF_DOWN, "0.2957"); + t("-9222222222222222522222222272.22222222222222222222222222", 10, RoundingMode.ROUND_HALF_DOWN, "-65.08456072"); + t("-84445", 5, RoundingMode.ROUND_DOWN, "-12.037"); + t("2", 5, RoundingMode.ROUND_CEIL, "1.4437"); + t("8250434.98", 3, RoundingMode.ROUND_UP, "16.7"); + t("-95599675589026342067598454302295149328803061855877230448951232861", 9, RoundingMode.ROUND_HALF_EVEN, "-150.316177"); + t("0.888024", 7, RoundingMode.ROUND_HALF_UP, "0.7999387"); + t("0.000000095301215893820793981926728121875760283024", 7, RoundingMode.ROUND_HALF_EVEN, "0.00000009530122"); + t("-0.513986", 4, RoundingMode.ROUND_HALF_DOWN, "-0.4937"); + t("-9771", 3, RoundingMode.ROUND_HALF_EVEN, "-9.88"); + t("697.8", 4, RoundingMode.ROUND_DOWN, "7.241"); + t("-8321741254584463.2785317904712569353", 2, RoundingMode.ROUND_FLOOR, "-38"); + t("-0.56404591661", 1, RoundingMode.ROUND_HALF_EVEN, "-0.5"); + t("-69.06", 3, RoundingMode.ROUND_HALF_EVEN, "-4.93"); + t("73", 3, RoundingMode.ROUND_HALF_EVEN, "4.98"); + t("-411502474659740777165572174637275075657286510911111111111.111", 4, RoundingMode.ROUND_UP, "-131.1"); + t("-888.1927098670677398402905", 9, RoundingMode.ROUND_HALF_UP, "-7.48233623"); + t("0.563", 6, RoundingMode.ROUND_HALF_EVEN, "0.53684"); + t("97402.414", 2, RoundingMode.ROUND_DOWN, "12"); + t("-6.9", 10, RoundingMode.ROUND_HALF_EVEN, "-2.629878706"); + t("91702.7888", 5, RoundingMode.ROUND_CEIL, "12.12"); + t("-788888888888888888888888888888888888888888888888888888888.8888888888888888888888888", 10, RoundingMode.ROUND_UP, "-131.7033677"); + t("64376.3622838574185447076", 3, RoundingMode.ROUND_UP, "11.8"); + t("22", 1, RoundingMode.ROUND_HALF_DOWN, "4"); + t("-180555855755585555055535555515.58", 5, RoundingMode.ROUND_FLOOR, "-68.059"); + t("-1225909085702528014", 6, RoundingMode.ROUND_CEIL, "-42.3433"); + t("0.4", 1, RoundingMode.ROUND_HALF_DOWN, "0.4"); + t("8.3", 1, RoundingMode.ROUND_CEIL, "3"); + t("-457.01416288333391", 3, RoundingMode.ROUND_CEIL, "-6.81"); + t("5634293568.5836", 2, RoundingMode.ROUND_HALF_EVEN, "23"); + t("-5.96", 8, RoundingMode.ROUND_FLOOR, "-2.4851825"); + t("-0.000000004", 4, RoundingMode.ROUND_HALF_DOWN, "-0.000000004"); + t("-30000", 2, RoundingMode.ROUND_CEIL, "-11"); + t("-477.767777777777777777777777777", 9, RoundingMode.ROUND_HALF_DOWN, "-6.86227307"); + t("8.2643482584756", 8, RoundingMode.ROUND_DOWN, "2.8087384"); + t("0.2", 4, RoundingMode.ROUND_FLOOR, "0.1986"); + t("0.56584", 19, RoundingMode.ROUND_FLOOR, "0.5393131599866100326"); + t("0.00515462523", 16, RoundingMode.ROUND_DOWN, "0.005154602403735655"); + t("-0.477", 13, RoundingMode.ROUND_HALF_DOWN, "-0.4605459698382"); + t("5682894009770307702714034949.64537242497058580001717701", 15, RoundingMode.ROUND_FLOOR, "64.600405303139"); + t("-9.46019209", 5, RoundingMode.ROUND_HALF_EVEN, "-2.943"); + t("-883.26", 16, RoundingMode.ROUND_DOWN, "-7.476767109009691"); + t("-0.58006", 4, RoundingMode.ROUND_HALF_DOWN, "-0.5517"); + t("-64226635213007319651", 10, RoundingMode.ROUND_FLOOR, "-46.30209686"); + t("-781.38915386280770694037859792685", 13, RoundingMode.ROUND_HALF_DOWN, "-7.354220892148"); + t("0.125", 17, RoundingMode.ROUND_FLOOR, "0.12467674692144274"); + t("881746", 8, RoundingMode.ROUND_HALF_DOWN, "14.382806"); + t("0.05", 14, RoundingMode.ROUND_FLOOR, "0.049979190069348"); + t("277777.7774907775771", 12, RoundingMode.ROUND_CEIL, "13.2277238921"); + t("-0.08", 11, RoundingMode.ROUND_UP, "-0.079914911495"); + t("-0.344", 13, RoundingMode.ROUND_UP, "-0.3375531280335"); + t("6863259373192", 17, RoundingMode.ROUND_HALF_DOWN, "30.250350752676521"); + t("0.5690856", 5, RoundingMode.ROUND_HALF_EVEN, "0.54214"); + t("73.9", 10, RoundingMode.ROUND_HALF_EVEN, "4.995905783"); + t("766791946767415313", 12, RoundingMode.ROUND_UP, "41.8741390842"); + t("769633533593018233355231111111.22222222222222227194514", 2, RoundingMode.ROUND_HALF_EVEN, "70"); + t("63778178.314284551120618390578295", 13, RoundingMode.ROUND_UP, "18.66406883768"); + t("0.001109727832666317304484077457927140198942879449585430594117055209894776", 3, RoundingMode.ROUND_UP, "0.00111"); + t("-71960000000.002000000000000000008000000900000000000000000404", 4, RoundingMode.ROUND_DOWN, "-25.69"); + t("0.8999999999999999999999994929799699999999199299999298", 2, RoundingMode.ROUND_HALF_DOWN, "0.81"); + t("0.773099601738", 16, RoundingMode.ROUND_DOWN, "0.7115245068279588"); + t("8555555539142222795342569680045666237333333333333333", 1, RoundingMode.ROUND_HALF_DOWN, "100"); + t("0.0793959637", 16, RoundingMode.ROUND_CEIL, "0.07931278446215733"); + t("616472926730707618636871319129812767163849443128613945799281", 7, RoundingMode.ROUND_FLOOR, "138.3645"); + t("-7387475256656337143", 11, RoundingMode.ROUND_CEIL, "-44.139464887"); + t("92562921999999977777777777777777.22222229", 11, RoundingMode.ROUND_CEIL, "74.298588622"); + t("-0.608972053", 13, RoundingMode.ROUND_FLOOR, "-0.5765031290833"); + t("-1.14126297", 4, RoundingMode.ROUND_HALF_DOWN, "-0.9778"); + t("-184127254597", 5, RoundingMode.ROUND_HALF_EVEN, "-26.632"); + t("-0.92", 1, RoundingMode.ROUND_HALF_EVEN, "-0.8"); + t("0.204", 10, RoundingMode.ROUND_CEIL, "0.2026109156"); + t("-0.0243649988127429304288988875138169", 15, RoundingMode.ROUND_UP, "-0.0243625887300743"); + t("-70000000000000000000000.58777777", 4, RoundingMode.ROUND_DOWN, "-53.29"); + t("0.7318349396", 9, RoundingMode.ROUND_HALF_UP, "0.678551741"); + t("-9666666666666662455217575872397177639319722125330970975", 4, RoundingMode.ROUND_DOWN, "-127.3"); + t("-8413.034904579542057756256706563", 20, RoundingMode.ROUND_HALF_DOWN, "-9.7306847405204586198"); + t("0.6", 20, RoundingMode.ROUND_CEIL, "0.5688248987322475301"); + t("54825982.94", 12, RoundingMode.ROUND_HALF_DOWN, "18.5128219613"); + t("6.2", 20, RoundingMode.ROUND_DOWN, "2.5241375702003277987"); + t("701.5", 11, RoundingMode.ROUND_CEIL, "7.2463685882"); + t("5555555517720126390000000000000000000.42638227102186909431005621854697452421682", 15, RoundingMode.ROUND_HALF_UP, "85.3010089496271"); + t("5673.638018837116707247995844106713458231", 10, RoundingMode.ROUND_HALF_EVEN, "9.336733005"); + t("-424", 4, RoundingMode.ROUND_HALF_EVEN, "-6.743"); + t("0.4684344468597919", 17, RoundingMode.ROUND_CEIL, "0.45280206947568404"); + t("-9", 16, RoundingMode.ROUND_UP, "-2.893443985885872"); + t("-350307.45864375042498300077185537907453397141287922166676392529430582", 18, RoundingMode.ROUND_UP, "-13.4597136816811783"); + t("-763896396", 1, RoundingMode.ROUND_HALF_DOWN, "-20"); + t("68638804", 20, RoundingMode.ROUND_HALF_DOWN, "18.73751576930969819"); + t("-200000400", 19, RoundingMode.ROUND_HALF_EVEN, "-19.8069771050702561"); + t("-93226023657087446251715", 6, RoundingMode.ROUND_FLOOR, "-53.5825"); + t("3", 12, RoundingMode.ROUND_HALF_DOWN, "1.81844645923"); + t("9", 9, RoundingMode.ROUND_HALF_DOWN, "2.89344399"); + t("-0.1", 3, RoundingMode.ROUND_DOWN, "-0.0998"); + t("19621292972421729902772201501921", 11, RoundingMode.ROUND_DOWN, "72.747315323"); + t("3904.7", 20, RoundingMode.ROUND_DOWN, "8.9630834316957150023"); + t("-8", 7, RoundingMode.ROUND_HALF_DOWN, "-2.776472"); + t("3.86", 6, RoundingMode.ROUND_DOWN, "2.06018"); + t("-0.15691661014", 10, RoundingMode.ROUND_HALF_EVEN, "-0.1562796875"); + t("0.1419739", 7, RoundingMode.ROUND_HALF_UP, "0.1415012"); + t("90000", 13, RoundingMode.ROUND_HALF_UP, "12.1007121299"); + t("-4555555555555555555141", 6, RoundingMode.ROUND_HALF_DOWN, "-50.5638"); + t("-9409999849.39599", 17, RoundingMode.ROUND_HALF_UP, "-23.658185955098968"); + t("0.067965453857410949385132572637515", 5, RoundingMode.ROUND_DOWN, "0.067913"); + t("256955555555555500.3333333355", 20, RoundingMode.ROUND_FLOOR, "40.780826709829272384"); + t("775912391103992457090631011117099043095.5292621805013436", 12, RoundingMode.ROUND_UP, "90.2402501441"); + t("50070000000000000500000.0000004000009", 20, RoundingMode.ROUND_HALF_EVEN, "52.960856159776758083"); + t("-662.57071", 1, RoundingMode.ROUND_DOWN, "-7"); + t("2750000000000000000000000070000", 12, RoundingMode.ROUND_DOWN, "70.782300882"); + t("-54.44444444247444444444444444444436", 7, RoundingMode.ROUND_HALF_UP, "-4.690412"); + t("37.7777777777777777777777777777777777777777777777", 7, RoundingMode.ROUND_HALF_DOWN, "4.325043"); + t("130007494174.6172086", 12, RoundingMode.ROUND_CEIL, "26.2840051138"); + t("-0.3266839965194001647176030530162519481749", 14, RoundingMode.ROUND_UP, "-0.32113577318321"); + t("-0.62", 3, RoundingMode.ROUND_CEIL, "-0.585"); + t("5", 8, RoundingMode.ROUND_FLOOR, "2.3124383"); + t("29.999999999999", 9, RoundingMode.ROUND_HALF_UP, "4.09462222"); + t("-0.5924697214424183", 1, RoundingMode.ROUND_UP, "-0.6"); + t("-12980954187055054163231261142447433", 8, RoundingMode.ROUND_HALF_UP, "-79.241938"); + t("-0.7118348", 14, RoundingMode.ROUND_CEIL, "-0.66233505761899"); + t("296364928844343.4456003578991566666666666666666666", 15, RoundingMode.ROUND_HALF_UP, "34.0157598591726"); + t("-28680234.108015595051498664774", 1, RoundingMode.ROUND_FLOOR, "-20"); + t("-6.4", 11, RoundingMode.ROUND_HALF_DOWN, "-2.5554935532"); + t("-133333333333333336161388888.38", 3, RoundingMode.ROUND_HALF_EVEN, "-60.8"); + t("-66723", 19, RoundingMode.ROUND_FLOOR, "-11.80145218066665408"); + t("-0.00068037789", 7, RoundingMode.ROUND_HALF_UP, "-0.0006803778"); + t("-0.3", 3, RoundingMode.ROUND_HALF_EVEN, "-0.296"); + t("-131999959.9489", 11, RoundingMode.ROUND_HALF_EVEN, "-19.391459358"); + t("581205309807516447512260416240.792611916", 1, RoundingMode.ROUND_HALF_UP, "70"); + t("5475888888888188888888887888888888888888888888888888888888888888888888.8888888888888888688878888888828", 19, RoundingMode.ROUND_HALF_DOWN, "161.2718732138084848"); + t("998838527549614908232633470", 17, RoundingMode.ROUND_HALF_UP, "62.861782543916929"); + t("59.8121646881574138642652317197311911797971683006", 2, RoundingMode.ROUND_HALF_UP, "4.8"); + t("-409107911", 17, RoundingMode.ROUND_FLOOR, "-20.522636700842881"); + t("573669083914387.1687228817738194715102706", 4, RoundingMode.ROUND_HALF_UP, "34.68"); + t("0.17261350292155351199009660032116664876", 17, RoundingMode.ROUND_HALF_EVEN, "0.17176761416782087"); + t("0.18894076", 11, RoundingMode.ROUND_FLOOR, "0.1878342904"); + t("-1444.4", 3, RoundingMode.ROUND_HALF_DOWN, "-7.97"); + t("-9", 15, RoundingMode.ROUND_UP, "-2.89344398588588"); + t("-974812887442795013582265174002767.068593354151160578593", 6, RoundingMode.ROUND_FLOOR, "-76.653"); + t("-65421655737910901270999999999999", 6, RoundingMode.ROUND_CEIL, "-73.9515"); + t("3348244367827299", 7, RoundingMode.ROUND_HALF_UP, "36.44036"); + t("1679.55", 3, RoundingMode.ROUND_HALF_EVEN, "8.12"); + t("4333333346827994037", 1, RoundingMode.ROUND_DOWN, "40"); + t("-0.8705", 17, RoundingMode.ROUND_HALF_UP, "-0.78677835214406983"); + t("-3402182507813893743866.865555923", 4, RoundingMode.ROUND_FLOOR, "-50.28"); + t("-0.1", 8, RoundingMode.ROUND_CEIL, "-0.099834078"); + t("977.902", 10, RoundingMode.ROUND_CEIL, "7.578556903"); + t("-36187888888888888888888888888.88888888888888088886888888888388888", 7, RoundingMode.ROUND_UP, "-66.45167"); + t("-31510526.571476389", 9, RoundingMode.ROUND_DOWN, "-17.9589794"); + t("77274133713892", 15, RoundingMode.ROUND_HALF_UP, "32.6715275740122"); + t("1779", 8, RoundingMode.ROUND_DOWN, "8.1769539"); + t("-464246651045", 7, RoundingMode.ROUND_FLOOR, "-27.55683"); + t("-481667", 2, RoundingMode.ROUND_UP, "-14"); + t("7", 10, RoundingMode.ROUND_HALF_EVEN, "2.644120761"); + t("-83.04", 3, RoundingMode.ROUND_HALF_DOWN, "-5.11"); + t("-0.464", 8, RoundingMode.ROUND_HALF_UP, "-0.44878296"); + t("317242258000000000000000.4444444444444488", 13, RoundingMode.ROUND_DOWN, "54.80709983626"); + t("-4240541655638211289904.8128901682", 6, RoundingMode.ROUND_HALF_EVEN, "-50.4921"); + t("-50405.34", 20, RoundingMode.ROUND_FLOOR, "-11.520999581486198744"); + t("0.07707971971149761219737301568", 1, RoundingMode.ROUND_FLOOR, "0.07"); + t("-7156867863723989509766063800760366725843936150997685", 20, RoundingMode.ROUND_UP, "-120.09305935931945494"); + t("-4129999992.7999", 12, RoundingMode.ROUND_HALF_EVEN, "-22.8346904227"); + t("47777777774653938813621622522216343673420620534179899013833357093773764972399399246544736614454715271", 9, RoundingMode.ROUND_HALF_DOWN, "232.515632"); + t("994251164.3", 16, RoundingMode.ROUND_HALF_DOWN, "21.41064759364478"); + t("4555.555555555555516", 8, RoundingMode.ROUND_HALF_EVEN, "9.11725"); + t("-1", 15, RoundingMode.ROUND_FLOOR, "-0.881373587019544"); + t("-0.87387875032052404788123654586476870803561340978", 7, RoundingMode.ROUND_UP, "-0.7893247"); + t("-120286283971717611037799447665108865440913352296201315051527123257678234709408520596", 3, RoundingMode.ROUND_DOWN, "-191"); + t("6653091922378633629", 12, RoundingMode.ROUND_HALF_DOWN, "44.0347605518"); + t("-0.7990065770676212", 20, RoundingMode.ROUND_DOWN, "-0.73189233509091295962"); + t("366535752", 8, RoundingMode.ROUND_CEIL, "20.412754"); + t("61111111111117442861975394685102222222222222", 12, RoundingMode.ROUND_CEIL, "101.514414788"); + t("-3.7169005622200392321495437799109964", 11, RoundingMode.ROUND_HALF_UP, "-2.0236608058"); + t("-660.3666536", 11, RoundingMode.ROUND_HALF_EVEN, "-7.1859429704"); + t("90300", 15, RoundingMode.ROUND_FLOOR, "12.1040399199956"); + t("982.843", 19, RoundingMode.ROUND_CEIL, "7.583596831597939763"); + t("-0.000672167854378534532371423", 12, RoundingMode.ROUND_HALF_EVEN, "-0.000672167803763"); + t("43333333333333333338016663998984546333333333333333", 13, RoundingMode.ROUND_HALF_UP, "114.9861538061"); + t("-61116666666666666.66661110982", 7, RoundingMode.ROUND_CEIL, "-39.3447"); + t("-41502151.688616153575043416113354497", 10, RoundingMode.ROUND_UP, "-18.23440302"); + t("-7076222222222222222222222.805", 7, RoundingMode.ROUND_CEIL, "-57.91192"); + t("56.73", 9, RoundingMode.ROUND_DOWN, "4.73152802"); + t("-40", 1, RoundingMode.ROUND_HALF_DOWN, "-4"); + t("-0.00078030420133739643985196294508766058872368", 8, RoundingMode.ROUND_FLOOR, "-0.00078030413"); + t("-536627775207276220991267535273607971704155.28547657450943534281060199393820758403021784", 2, RoundingMode.ROUND_DOWN, "-96"); + t("-33091020", 19, RoundingMode.ROUND_FLOOR, "-18.00791968500532465"); + t("9.524", 17, RoundingMode.ROUND_UP, "2.9497069237656979"); + t("-0.34291384705548944471328", 2, RoundingMode.ROUND_HALF_EVEN, "-0.34"); + t("-0.82", 19, RoundingMode.ROUND_HALF_EVEN, "-0.7482095630948231649"); + t("2", 14, RoundingMode.ROUND_HALF_DOWN, "1.4436354751788"); + t("-0.9626090705456093511316772571321644716559037011674560666488638", 15, RoundingMode.ROUND_DOWN, "-0.854685541484882"); + t("0.00008", 8, RoundingMode.ROUND_HALF_EVEN, "0.00008"); + t("938.2411", 17, RoundingMode.ROUND_HALF_UP, "7.5371544167804937"); + t("6", 13, RoundingMode.ROUND_FLOOR, "2.491779852644"); + t("904666350855718.903223229177091281178", 4, RoundingMode.ROUND_CEIL, "35.14"); + t("34801147.9056824", 20, RoundingMode.ROUND_HALF_EVEN, "18.05830811055610015"); + t("95", 10, RoundingMode.ROUND_CEIL, "5.247051772"); + t("-4139388.226", 16, RoundingMode.ROUND_HALF_UP, "-15.92920574394459"); + t("-6211073333333333", 4, RoundingMode.ROUND_FLOOR, "-37.06"); + t("-170035951804524683048.919775320333781477286900962349776698991", 2, RoundingMode.ROUND_UP, "-48"); + t("0.6784", 11, RoundingMode.ROUND_HALF_DOWN, "0.63488139524"); + t("33", 2, RoundingMode.ROUND_DOWN, "4.1"); + t("-6.3", 36, RoundingMode.ROUND_HALF_UP, "-2.53993693665065932064698849007307306"); + t("-0.92", 16, RoundingMode.ROUND_HALF_DOWN, "-0.8236590904324105"); + t("-31111111111111735238023043166511111111111111111888888888888.9999999999999911", 40, RoundingMode.ROUND_HALF_EVEN, "-135.3780625070535995848322322501024128908"); + t("96674720.987", 34, RoundingMode.ROUND_UP, "19.08000968992083721721689818471708"); + t("0.000000824566", 16, RoundingMode.ROUND_UP, "0.0000008245659999999066"); + t("-38888888888533012.444172138599777777", 32, RoundingMode.ROUND_UP, "-38.892632152608719442042244406119"); + t("8", 23, RoundingMode.ROUND_HALF_DOWN, "2.7764722807237176735308"); + t("0.6972522639359", 20, RoundingMode.ROUND_HALF_UP, "0.65041408010764600152"); + t("-9873170.27922951", 34, RoundingMode.ROUND_FLOOR, "-16.79847874396414201049627611378566"); + t("-977", 16, RoundingMode.ROUND_HALF_DOWN, "-7.577634094511902"); + t("-3255555555555554555155855.755", 19, RoundingMode.ROUND_HALF_UP, "-57.13555235110384366"); + t("-12222267.282635710622", 26, RoundingMode.ROUND_HALF_EVEN, "-17.011917213734725441687658"); + t("5911634108185362315252599288351.6666796085389813851489", 30, RoundingMode.ROUND_UP, "71.5476222624274923008122682397"); + t("-146708401223638818013745", 13, RoundingMode.ROUND_CEIL, "-54.03588108499"); + t("6826", 6, RoundingMode.ROUND_HALF_DOWN, "9.52164"); + t("-619144980.19673376", 4, RoundingMode.ROUND_FLOOR, "-20.94"); + t("828", 7, RoundingMode.ROUND_UP, "7.412161"); + t("-512326692738114253381912166666666666666666.9346113538333333333333333333", 29, RoundingMode.ROUND_FLOOR, "-96.732928300640134945464829216"); + t("-699999999999799999999999999999.9999999999999999909999999999999999799999999999999909091999999999", 40, RoundingMode.ROUND_HALF_DOWN, "-69.41402502644229773675862272421730607324"); + t("9700000000000020000", 33, RoundingMode.ROUND_HALF_EVEN, "44.411804739962106821695478575887"); + t("90000", 36, RoundingMode.ROUND_DOWN, "12.1007121299032116258091237135378107"); + t("-263151122", 32, RoundingMode.ROUND_HALF_UP, "-20.081386214042829558917819516672"); + t("2310058999599.053566329206124517", 8, RoundingMode.ROUND_UP, "29.161442"); + t("-0.1284467333753266718", 23, RoundingMode.ROUND_HALF_UP, "-0.12809613241336007457298"); + t("-624", 23, RoundingMode.ROUND_DOWN, "-7.1292981909816803342498"); + t("-173784.4884958808167", 26, RoundingMode.ROUND_HALF_UP, "-12.758718419238068841519714"); + t("0.7483478325773490119468110012278389098999332923378899391294555", 9, RoundingMode.ROUND_HALF_UP, "0.691824922"); + t("5957009460430336859417326955217060599579597841", 14, RoundingMode.ROUND_DOWN, "106.09404495205"); + t("-0.00070815408", 7, RoundingMode.ROUND_HALF_EVEN, "-0.000708154"); + t("-20100418224824495574483983.543362773183355", 23, RoundingMode.ROUND_FLOOR, "-58.955930034470803686314"); + t("83333333333336223199780618111111111111", 34, RoundingMode.ROUND_HALF_DOWN, "88.00905915753976135428655679104154"); + t("5222222.2412222222222222222222222222222222222", 26, RoundingMode.ROUND_HALF_UP, "16.161580766536365650321305"); + t("891050050", 20, RoundingMode.ROUND_HALF_UP, "21.301058337256900027"); + t("-3888888888888888884624441111111111", 3, RoundingMode.ROUND_CEIL, "-78"); + t("-801539816825119533509187656547954623888888888888888", 22, RoundingMode.ROUND_CEIL, "-117.903766292975204863"); + t("-89999999999999999999999.713", 3, RoundingMode.ROUND_HALF_EVEN, "-53.5"); + t("-147838", 25, RoundingMode.ROUND_HALF_UP, "-12.59701953921686062841479"); + t("144444444444444444447254701350587453", 4, RoundingMode.ROUND_DOWN, "81.65"); + t("-438912497298571960698888888888.0000000088888", 34, RoundingMode.ROUND_DOWN, "-68.94724476182462807540442662323253"); + t("3442783033688", 18, RoundingMode.ROUND_CEIL, "29.5604484622132997"); + t("-1698.16879", 7, RoundingMode.ROUND_FLOOR, "-8.130454"); + t("46666666666666666.615", 30, RoundingMode.ROUND_CEIL, "39.0749537094118251757252921673"); + t("77959129313637330806918625680967639398636456449", 38, RoundingMode.ROUND_UP, "108.66566107149594837059374042664802812"); + t("3888888888888888910212431593598222222222222.610117551061511", 10, RoundingMode.ROUND_HALF_DOWN, "98.75984457"); + t("-86199949399.999999999599979979939", 28, RoundingMode.ROUND_UP, "-25.87308260816887103322361398"); + t("-3099999999999929.9059399", 3, RoundingMode.ROUND_FLOOR, "-36.4"); + t("-180383.4606517262672762714394058366611969053480436546", 28, RoundingMode.ROUND_HALF_EVEN, "-12.79598738144382957748168314"); + t("-2641069247762176416", 24, RoundingMode.ROUND_HALF_EVEN, "-43.1108627077050382101599"); + t("-51952026064234463953957345262339028653257560408372399280", 11, RoundingMode.ROUND_FLOOR, "-128.98306292"); + t("-70.1", 21, RoundingMode.ROUND_DOWN, "-4.94312084566588261119"); + t("94919308353.333333255791120084531404680616331358831054", 28, RoundingMode.ROUND_CEIL, "25.96944016242003638281831116"); + t("-9685.053236", 16, RoundingMode.ROUND_HALF_EVEN, "-9.87148625579872"); + t("0.662914763768427968939641988881293790829276096835960290888", 14, RoundingMode.ROUND_UP, "0.62202064283505"); + t("-300", 26, RoundingMode.ROUND_HALF_DOWN, "-6.3969324329823501439965447"); + t("-392073212722035132142505", 9, RoundingMode.ROUND_UP, "-55.0188828"); + t("2990680930594042830", 14, RoundingMode.ROUND_DOWN, "43.235179951912"); + t("5703", 39, RoundingMode.ROUND_FLOOR, "9.34189481940306609011936208904657958568"); + t("35425314.4499614", 18, RoundingMode.ROUND_HALF_DOWN, "18.0760844005601254"); + t("0.4211988661", 12, RoundingMode.ROUND_DOWN, "0.409645304244"); + t("-1952456959333433.9", 29, RoundingMode.ROUND_HALF_EVEN, "-35.901012134084042811710106863"); + t("-0.0000008718", 4, RoundingMode.ROUND_HALF_UP, "-0.0000008718"); + t("-209792.7008953869265113713312982323", 7, RoundingMode.ROUND_HALF_UP, "-12.94702"); + t("45.5124108666", 39, RoundingMode.ROUND_CEIL, "4.51125290628945979463912982327953221773"); + t("-6999999999999.9999999999999999999999529843701379", 31, RoundingMode.ROUND_DOWN, "-30.27007844554380682273848232621"); + t("-262741136804715195.7642409207391346809003431410196765", 18, RoundingMode.ROUND_HALF_EVEN, "-40.8030928522313953"); + t("22.95631823", 1, RoundingMode.ROUND_UP, "4"); + t("949899", 37, RoundingMode.ROUND_DOWN, "14.45725812269554812133501611545553318"); + t("-0.4630993", 34, RoundingMode.ROUND_CEIL, "-0.447965785249116818803707202079365"); + t("-0.95191", 9, RoundingMode.ROUND_DOWN, "-0.846956785"); + t("-76222222202222222222622222222222222.2222222222222222222222222222222222222222222", 12, RoundingMode.ROUND_FLOOR, "-81.0121082995"); + t("4", 13, RoundingMode.ROUND_FLOOR, "2.094712547261"); + t("-917", 11, RoundingMode.ROUND_CEIL, "-7.5142549501"); + t("0.32", 22, RoundingMode.ROUND_HALF_EVEN, "0.3147759800187902094602"); + t("527.7431", 33, RoundingMode.ROUND_HALF_DOWN, "6.96175769045423966034938504433024"); + t("74111111111111111111", 15, RoundingMode.ROUND_HALF_UP, "46.4452443230322"); + t("0.3411928", 1, RoundingMode.ROUND_HALF_UP, "0.3"); + t("0.41671930162755854402453188", 6, RoundingMode.ROUND_UP, "0.405514"); + t("831272876013312016785.455619797221126343", 6, RoundingMode.ROUND_HALF_UP, "48.8626"); + t("13893.508378567289030252169353729156184365534", 38, RoundingMode.ROUND_HALF_EVEN, "10.232324168759945678823614807656597521"); + t("81117111111111111111111111111111111111114111111111118.111111111111111111111", 8, RoundingMode.ROUND_HALF_DOWN, "122.52088"); + t("30000000000000000000000000000000000000000000", 15, RoundingMode.ROUND_HALF_DOWN, "100.802918467972"); + t("332348972", 2, RoundingMode.ROUND_UP, "21"); + t("6.044614140018", 28, RoundingMode.ROUND_HALF_DOWN, "2.49908796599321823375398302"); + t("-4688.43888888887888988888188", 8, RoundingMode.ROUND_CEIL, "-9.1460021"); + t("-47", 33, RoundingMode.ROUND_HALF_EVEN, "-4.54340793644413347266493791809402"); + t("-290626.9", 9, RoundingMode.ROUND_HALF_EVEN, "-13.2729428"); + t("66596009.13870063880279763387188", 11, RoundingMode.ROUND_HALF_UP, "18.707302391"); + t("7950488", 17, RoundingMode.ROUND_HALF_UP, "16.581891048954364"); + t("86666666666666666666666666666666.366666697", 18, RoundingMode.ROUND_HALF_UP, "74.2327693127287339"); + t("-7000000860520768360873573920102236415239999", 8, RoundingMode.ROUND_DOWN, "-99.347631"); + t("77891870.0942609359", 24, RoundingMode.ROUND_CEIL, "18.8639793225947510197843"); + t("3.5", 6, RoundingMode.ROUND_DOWN, "1.96572"); + t("49444842.271583606902245173", 9, RoundingMode.ROUND_DOWN, "18.4095154"); + t("7581", 5, RoundingMode.ROUND_UP, "9.6266"); + t("0.790306", 19, RoundingMode.ROUND_HALF_UP, "0.7250806039103874689"); + t("76124558", 2, RoundingMode.ROUND_HALF_EVEN, "19"); + t("2000000", 24, RoundingMode.ROUND_FLOOR, "15.2018049190842272229424"); + t("0.4696", 38, RoundingMode.ROUND_DOWN, "0.4538573215638993421112764743397416088"); + t("499999999999999999822751150099120917010636955100061328170073380968656797221", 2, RoundingMode.ROUND_CEIL, "180"); + t("651816908459", 11, RoundingMode.ROUND_HALF_EVEN, "27.896176725"); + t("47", 37, RoundingMode.ROUND_HALF_EVEN, "4.543407936444133472664937918094017108"); + t("8.0578407", 35, RoundingMode.ROUND_DOWN, "2.7836211199689798860472966671154528"); + t("-863219999999499999.9", 4, RoundingMode.ROUND_HALF_EVEN, "-41.99"); + t("116054891", 10, RoundingMode.ROUND_CEIL, "19.26272102"); + t("941758899742454280526810934546625115179.7960911315775942", 3, RoundingMode.ROUND_HALF_EVEN, "90.4"); + t("-0.848783", 19, RoundingMode.ROUND_FLOOR, "-0.7703098747360644338"); + t("83519080", 34, RoundingMode.ROUND_HALF_DOWN, "18.93373284727220839496397433463758"); + t("-4100035", 11, RoundingMode.ROUND_HALF_DOWN, "-15.919653249"); + t("-799999999.9599999999999999999999999999999991999599499999999999999999599799999999999999999999", 33, RoundingMode.ROUND_UP, "-21.1932694661421467102022351233467"); + t("99.28891280803177", 40, RoundingMode.ROUND_HALF_EVEN, "5.291206450290834813729559863506789880059"); + t("-340", 16, RoundingMode.ROUND_HALF_UP, "-6.522094960792895"); + t("4142257459908187254600792087323112467291509222", 7, RoundingMode.ROUND_FLOOR, "105.7307"); + t("-7800729.091839089", 21, RoundingMode.ROUND_CEIL, "-16.5628749411641154132"); + t("-0.933", 24, RoundingMode.ROUND_DOWN, "-0.83319526353136357605583"); + t("953042360183747", 10, RoundingMode.ROUND_HALF_UP, "35.18382765"); + t("-4222222222.22222222222222222", 36, RoundingMode.ROUND_DOWN, "-22.8567745998965228522289478382984885"); + t("0.3", 34, RoundingMode.ROUND_HALF_UP, "0.2956730475634224391027105297335171"); + t("32.485838", 1, RoundingMode.ROUND_CEIL, "5"); + t("-80.05", 3, RoundingMode.ROUND_HALF_UP, "-5.08"); + t("-33333333333333333333.33333333333333333333333333333333333333333333332", 37, RoundingMode.ROUND_DOWN, "-45.64623675177274929838181597822293501"); + t("-7668267822851217.2678552326", 14, RoundingMode.ROUND_FLOOR, "-37.269014327386"); + t("-0.18927857199172722521327239738557418683692", 39, RoundingMode.ROUND_HALF_EVEN, "-0.188166219231885167037372862050173466821"); + t("-7918836388312840875795305", 32, RoundingMode.ROUND_HALF_UP, "-58.024433686781907092602174416027"); + t("-2978500", 27, RoundingMode.ROUND_DOWN, "-15.6000775566108526725814623"); + t("-78003999.96999999999999999999999999999999999959999999999999999999999999991999", 15, RoundingMode.ROUND_HALF_UP, "-18.8654178455656"); + t("-894870999.299999899999", 21, RoundingMode.ROUND_DOWN, "-21.3053373115503122604"); + t("-0.00000005", 25, RoundingMode.ROUND_HALF_EVEN, "-0.00000004999999999999997916666667"); + t("77000000090000", 7, RoundingMode.ROUND_DOWN, "32.66797"); + t("-268.2732870126", 4, RoundingMode.ROUND_DOWN, "-6.285"); + t("-79826535464394573", 38, RoundingMode.ROUND_FLOOR, "-39.611779549268809700739336376378927055"); + t("298654599", 24, RoundingMode.ROUND_HALF_DOWN, "20.2079454568808022118358"); + t("905389069939156207517354056108141008340439497509642259099917803821049056617393136191", 10, RoundingMode.ROUND_HALF_UP, "194.0109045"); + t("435685813.435886238", 40, RoundingMode.ROUND_HALF_UP, "20.58557911072248653238880434125103675578"); + t("8412", 30, RoundingMode.ROUND_DOWN, "9.73056172091551814589861336712"); + t("-0.46", 27, RoundingMode.ROUND_HALF_EVEN, "-0.445151759147682279086489602"); + t("47028", 12, RoundingMode.ROUND_HALF_DOWN, "11.4516456287"); + t("-7919845.1789524", 34, RoundingMode.ROUND_HALF_DOWN, "-16.5780293960474203464753860469207"); + t("0.02278735", 33, RoundingMode.ROUND_DOWN, "0.0227853783548406995196866973049705"); + t("-0.28201", 19, RoundingMode.ROUND_CEIL, "-0.2783997430330089565"); + t("24", 37, RoundingMode.ROUND_DOWN, "3.871634756387731429687905076632625809"); + t("-9839999999999999999999999999999995999999999999999999999999999999999999999.999919", 33, RoundingMode.ROUND_UP, "-168.765729587195396614190338923699"); + t("84873915984134638401943976", 32, RoundingMode.ROUND_HALF_UP, "60.396356226304291944229977724087"); + t("459849841516", 8, RoundingMode.ROUND_HALF_EVEN, "27.547313"); + t("89990999.999999999", 3, RoundingMode.ROUND_HALF_UP, "19"); + t("-40", 27, RoundingMode.ROUND_FLOOR, "-4.38218284806549830676116626"); + t("-0.550270858834130413273292980093817645995", 27, RoundingMode.ROUND_DOWN, "-0.52571776522505089400633673"); + t("-0.33359", 37, RoundingMode.ROUND_HALF_UP, "-0.3276936362408353342310367772260751887"); + t("-4937634748564478566873.1460599928931", 40, RoundingMode.ROUND_HALF_UP, "-50.64432055413825848772939680772429260045"); + t("-0.2173", 5, RoundingMode.ROUND_CEIL, "-0.21562"); + t("0.96", 23, RoundingMode.ROUND_CEIL, "0.8528046172289323883664"); + t("-531369500000000000000000", 37, RoundingMode.ROUND_FLOOR, "-55.32289176955452866916111400088363897"); + t("247147228380584165764", 22, RoundingMode.ROUND_DOWN, "47.64966307982193311088"); + t("-0.19918", 29, RoundingMode.ROUND_CEIL, "-0.19788597087353839365435580487"); + t("6999999999999999999970154061522222222222222222.20800582718602093577777", 5, RoundingMode.ROUND_FLOOR, "106.25"); + t("-711113079566666666666666666666666666666.6", 16, RoundingMode.ROUND_DOWN, "-90.15304198849392"); + t("62845101040", 34, RoundingMode.ROUND_HALF_UP, "25.55708600264700126552610218739537"); + t("81", 28, RoundingMode.ROUND_FLOOR, "5.087634437002271205971176056"); + t("0.09485959085119", 36, RoundingMode.ROUND_UP, "0.0947179006711641818576225129221047834"); + t("-0.026520854469242617722958455691", 31, RoundingMode.ROUND_HALF_UP, "-0.02651774652038305619068613882491"); + t("0.097", 10, RoundingMode.ROUND_UP, "0.0968485283"); + t("-852070471472246", 9, RoundingMode.ROUND_HALF_UP, "-35.0718375"); + t("-0.3192246442786153", 12, RoundingMode.ROUND_FLOOR, "-0.314037429454"); + t("0.3108765122", 3, RoundingMode.ROUND_DOWN, "0.306"); + t("-90000000.00000076", 36, RoundingMode.ROUND_FLOOR, "-19.0084674088544929556423047533662424"); + t("-0.8", 31, RoundingMode.ROUND_FLOOR, "-0.7326682560454108641549178160406"); + t("18541.6677156134565286112411814210519803606750593933397349169", 32, RoundingMode.ROUND_UP, "10.520922968659967321576916100335"); + t("999999999999999999999.99999999999999999", 37, RoundingMode.ROUND_CEIL, "49.04743413343490467379505266982982493"); + t("-0.000000032062026319386918317546539492", 68, RoundingMode.ROUND_FLOOR, "-0.000000032062026319386912824394134631879349120685711006434599418643626889817"); + t("-0.495518257213512158706511639892645419702564774754871663413", 47, RoundingMode.ROUND_UP, "-0.47719964367522885229707070475504604098640681455"); + t("4.684639455750291940723155031769705994", 31, RoundingMode.ROUND_HALF_UP, "2.24863794273407643879754135637"); + t("-1809747622152.84286", 63, RoundingMode.ROUND_HALF_UP, "-28.9173556967695537947577896584887822645147544636133555232822118"); + t("22", 18, RoundingMode.ROUND_CEIL, "3.78470576309943263"); + t("0.0000007682018950027912762045590379395667605629287724596658066433422487394803", 1, RoundingMode.ROUND_HALF_DOWN, "0.0000008"); + t("1201669608619", 47, RoundingMode.ROUND_UP, "28.507880226780929003733493721133866199403479553"); + t("7", 80, RoundingMode.ROUND_HALF_EVEN, "2.6441207610586290756978279749393769270844809847849062322598868259601315526660783"); + t("-0.61264078148186551736921502385270866697500772889231748040477", 45, RoundingMode.ROUND_DOWN, "-0.579634012595090637727347035360249964733504534"); + t("31533", 43, RoundingMode.ROUND_FLOOR, "11.05193707630283495126899119551930173866052"); + t("784753815", 14, RoundingMode.ROUND_HALF_DOWN, "21.174027795655"); + t("-1377215929546862623186", 6, RoundingMode.ROUND_HALF_UP, "-49.3675"); + t("7008.2793444130217879971231", 32, RoundingMode.ROUND_CEIL, "9.5479946782612750222572855052414"); + t("4533333333", 13, RoundingMode.ROUND_HALF_DOWN, "22.92787052151"); + t("54064589111521625869667219055297425839423752526900290761756323349584", 54, RoundingMode.ROUND_CEIL, "156.653942744637710900516543352956753955882430440996799"); + t("-0.01394270302075462233850116658194576388", 77, RoundingMode.ROUND_HALF_UP, "-0.013942251319089534938729177545535517349151440630074234544384533259048989883009"); + t("-299.9999399999999999979999999", 55, RoundingMode.ROUND_CEIL, "-6.396932232983441246172477794215715408005456019918545718"); + t("2871905932711046183372741366254436002512709390677791256612958523688550222222222222222222", 5, RoundingMode.ROUND_UP, "202.08"); + t("-3666666666666666945441259999999999999", 68, RoundingMode.ROUND_DOWN, "-84.885493512475850862761057376592434200924638643059656961531292753918"); + t("-0.4630001787821", 44, RoundingMode.ROUND_HALF_DOWN, "-0.44787583900004720705927877472616576353024259"); + t("0.0000381787734537946720671347502978841", 29, RoundingMode.ROUND_HALF_UP, "0.000038178773444519656114972517243"); + t("-479231619855807.279041355946419933478", 28, RoundingMode.ROUND_CEIL, "-34.49635232578689552286855113"); + t("31818639298", 29, RoundingMode.ROUND_HALF_EVEN, "24.876465277025226594891811886"); + t("8034931", 47, RoundingMode.ROUND_CEIL, "16.592456150246833229569977271856473077556750279"); + t("478495901493789264115055131614453231810655015", 22, RoundingMode.ROUND_UP, "103.5723687318449558603"); + t("10000000000000008924422625.038957956198862889764108904989871335727440037940395420141338007458", 2, RoundingMode.ROUND_HALF_UP, "58"); + t("7576819.134251765382766480261", 14, RoundingMode.ROUND_CEIL, "16.533751210825"); + t("-0.236", 16, RoundingMode.ROUND_UP, "-0.2338624428652866"); + t("666.4", 52, RoundingMode.ROUND_CEIL, "7.195037834362373019267915450088625094684860998039221"); + t("-597905188.855404", 70, RoundingMode.ROUND_HALF_EVEN, "-20.90208993284039487415407222670688838682708410198469285988197976625632"); + t("1143066393464740844554120951", 14, RoundingMode.ROUND_HALF_UP, "62.996659161546"); + t("-34576148", 63, RoundingMode.ROUND_HALF_DOWN, "-18.0518218187053176159154554874378086468535542537875963893907634"); + t("59143.549", 40, RoundingMode.ROUND_CEIL, "11.68086998238276467090428398240128035386"); + t("-4112027621", 62, RoundingMode.ROUND_HALF_EVEN, "-22.830329262805921069537874052115526618645567986303483833119863"); + t("-42300188487607.08507698250468", 17, RoundingMode.ROUND_HALF_UP, "-32.068959838502597"); + t("-49999999999996068207865666579414907934404", 65, RoundingMode.ROUND_HALF_UP, "-94.405988812755794408894962970555432792811847984958316523490241385"); + t("-393732", 21, RoundingMode.ROUND_HALF_EVEN, "-13.5765729343528937335"); + t("81565591738066.51221064", 69, RoundingMode.ROUND_UP, "32.7255757996541768867778312281602039075228692923616704820593301551593"); + t("-388888888888888888488888888888888888888888888888888888888888888888.88888888888888888888888888888", 43, RoundingMode.ROUND_UP, "-151.7193017093261090664737268501947374500573"); + t("-0.90227003", 38, RoundingMode.ROUND_HALF_EVEN, "-0.81055328367329905420961888198701813291"); + t("0.16048116729237818228488217018608992138057904533801696990375807225188308", 68, RoundingMode.ROUND_HALF_EVEN, "0.15980018615140439352109653317862793100180564950166901226745650742227"); + t("-91660344659083823715088713501862430002256093414", 3, RoundingMode.ROUND_HALF_EVEN, "-109"); + t("8751796156131372972947765981314595873532361651531", 47, RoundingMode.ROUND_FLOOR, "113.38649059856407663544320437177002739340521618"); + t("-0.11565298940611", 35, RoundingMode.ROUND_HALF_DOWN, "-0.11539670737415873909331672061570151"); + t("18307313110514111.1131", 16, RoundingMode.ROUND_HALF_UP, "38.13922417901515"); + t("0.528661178298193193622792932112359556707308989326464132617", 71, RoundingMode.ROUND_UP, "0.5066991391754629989635915889270803300958927153096592692296376826878153"); + t("0.000000001120614602756449959115151100862613567428360270326663", 35, RoundingMode.ROUND_UP, "0.0000000011206146027564499588806107437759415"); + t("-8879122624052633559117", 78, RoundingMode.ROUND_UP, "-51.2311368819599099761698171866629447555735843157166793808555294965993467284221"); + t("-8094602024845467754977645584391855099787227824190845865855561719", 77, RoundingMode.ROUND_CEIL, "-147.8472054620231685369025851283017328023017549360393616940844376500188343281"); + t("-3698777777772222222.777777777777777", 48, RoundingMode.ROUND_HALF_UP, "-43.4476812892000324997093529613984351387568669844"); + t("-25555513029304410946135043638060771033643431362432520282", 2, RoundingMode.ROUND_HALF_EVEN, "-130"); + t("933122853153687095", 41, RoundingMode.ROUND_HALF_EVEN, "42.070460443055410208080217059719667276197"); + t("812383297326397", 58, RoundingMode.ROUND_HALF_UP, "35.02414056631620755554295016431934666362158052915198442028"); + t("12035307500151677576271283793185595769952874986342960000000000", 74, RoundingMode.ROUND_FLOOR, "141.33609738160168960515531747765765638625969365209929147335277011181104642"); + t("-0.31955076689813588903813022792", 34, RoundingMode.ROUND_UP, "-0.3143480916774549591442736440624916"); + t("-9", 73, RoundingMode.ROUND_UP, "-2.893443985885871378072718306626369246055584762462533199231699336214345507"); + t("841121.0445", 40, RoundingMode.ROUND_DOWN, "14.33563803840945469915412524338642014789"); + t("-401192976852130477326172.02446147182800940320617027529", 74, RoundingMode.ROUND_FLOOR, "-55.041876684015851681016506887779039230184296830809738525014803009319143725"); + t("2094264131119768979", 68, RoundingMode.ROUND_DOWN, "42.878881096061953658744102538534046920249496493047786044674644514957"); + t("-8.8152309666", 40, RoundingMode.ROUND_FLOOR, "-2.872829942180628153748176987403419299171"); + t("5444444444444262495179677326632169.888888888888531828189994278666666666", 62, RoundingMode.ROUND_UP, "78.373050970137826690178452810763642059292342553612068102467462"); + t("8", 44, RoundingMode.ROUND_HALF_UP, "2.7764722807237176735308040270285434588028289"); + t("-37038010496114664183", 64, RoundingMode.ROUND_CEIL, "-45.75162355048026915588402715555390175730193409148111687570929603"); + t("-0.470057324338763", 79, RoundingMode.ROUND_HALF_EVEN, "-0.4542712382257772198681590569442154627233709746748991527156345272118435655094853"); + t("-46897669", 46, RoundingMode.ROUND_HALF_DOWN, "-18.35662571124875578792921843720553868421500085"); + t("-0.71", 49, RoundingMode.ROUND_HALF_EVEN, "-0.6608396407895863851885702105963280171844694680092"); + t("0.0237", 55, RoundingMode.ROUND_FLOOR, "0.02369778188510610505248476315561774114767945912932627002"); + t("-0.59281287474", 44, RoundingMode.ROUND_FLOOR, "-0.56265222720677036901896313065363370716612909"); + t("-4000000000000000000000000000000000000.000000001", 46, RoundingMode.ROUND_HALF_EVEN, "-84.97250488946548055289938873301164117786615399"); + t("-9999.999919959929899999994999199", 39, RoundingMode.ROUND_HALF_EVEN, "-9.90348754703212103410216844354175040348"); + t("-9321187577860222005515999315906072417531939005", 76, RoundingMode.ROUND_DOWN, "-106.5417664083891327308761567682228995515981166231673707742169473956666770305"); + t("-2912371969108035055.81543", 22, RoundingMode.ROUND_UP, "-43.20864671327381950253"); + t("-63757430941904384548453716680263421453558918785210470605446852", 51, RoundingMode.ROUND_CEIL, "-143.00333850124276923165154985620253767690360126989"); + t("-1793153438369827416498095155913.4228295", 39, RoundingMode.ROUND_HALF_DOWN, "-70.3546757376785198166924910975139977914"); + t("-755552878426498453999514964440064264429504279783361", 42, RoundingMode.ROUND_CEIL, "-117.844681414836793305623824906216106837976"); + t("3003628666573648171686", 39, RoundingMode.ROUND_HALF_DOWN, "50.1472552467046154946732945775939798698"); + t("9.33175999994999999999969999995995999999639999999999999", 49, RoundingMode.ROUND_FLOOR, "2.929429397668981570767153144993747617496929262024"); + t("8333363", 52, RoundingMode.ROUND_UP, "16.62892483471797728634512092769578983328036838973708"); + t("-2645254233", 69, RoundingMode.ROUND_HALF_UP, "-22.3891801965340317801000748326656111196179595987500277428340460589467"); + t("8868579.991978514317", 68, RoundingMode.ROUND_UP, "16.691172430933767243771956183420459471608727224889169747323502745869"); + t("0.986495481090000216110712092639182", 61, RoundingMode.ROUND_FLOOR, "0.8717921388083236179737287533092110161169033763820276103415718"); + t("87777777777777777777.777777759438529737774374204", 15, RoundingMode.ROUND_HALF_DOWN, "46.6144872225776"); + t("-6250556.44460529582373", 30, RoundingMode.ROUND_FLOOR, "-16.3413282294463468310669547304"); + t("-4650554944476109456246.44227800986974871366", 43, RoundingMode.ROUND_HALF_UP, "-50.58442068881146054950591137326467041517047"); + t("-3132688644543805506815914041387888888.188", 68, RoundingMode.ROUND_HALF_EVEN, "-84.728102156042306390541063914584668473548332667805356796216535808734"); + t("5834638600227511111111111", 41, RoundingMode.ROUND_CEIL, "57.719001739686858603111938549132200739588"); + t("0.5628357269593211", 79, RoundingMode.ROUND_HALF_UP, "0.5366967665532565321157811358211010679946198046372758527219434816162851464781868"); + t("-711435524344012518587.535487226699139", 22, RoundingMode.ROUND_DOWN, "-48.70696364854271055317"); + t("-788888888888888888873333333333333.333703455680722179262019", 37, RoundingMode.ROUND_HALF_EVEN, "-76.44132545607450323651220442016665897"); + t("-9999999999999979999999999999999999999999999999999992999999.9", 20, RoundingMode.ROUND_FLOOR, "-134.24308257421459299"); + t("-1767179228607568992300424253", 70, RoundingMode.ROUND_HALF_UP, "-63.43232931061026024978599269053595960297576362149001977060895755569638"); + t("-677777777777777115650766372141404403", 49, RoundingMode.ROUND_FLOOR, "-83.19727472218863513909912631241275419697299702182"); + t("-1152497931515310182980267174191.90649", 26, RoundingMode.ROUND_UP, "-69.912631671487729817094428"); + t("-157.2662838843918581185659314317696663", 37, RoundingMode.ROUND_DOWN, "-5.751097732821724931066689490811938718"); + t("-8111511.14", 60, RoundingMode.ROUND_CEIL, "-16.6019419197504082912922343515714399631351664818426719226786"); + t("-3236535688684995", 38, RoundingMode.ROUND_HALF_UP, "-36.406427101351310979358162345258133336"); + t("-499999994499999.9999999999", 68, RoundingMode.ROUND_CEIL, "-34.538776383910685199769871176599790587121799252927346519384431685947"); + t("48539642920050737968554632.134943906451226801984434433289", 9, RoundingMode.ROUND_UP, "59.8375703"); + t("-4795608.20712122484190204827038708518351228283713872638801056", 5, RoundingMode.ROUND_FLOOR, "-16.077"); + t("7", 17, RoundingMode.ROUND_HALF_EVEN, "2.6441207610586291"); + t("-0.62144937177976800092", 21, RoundingMode.ROUND_HALF_UP, "-0.587130357397079938832"); + t("9352999999.5796820631", 51, RoundingMode.ROUND_UP, "23.65211016491383102476483668587527795209875038715"); + t("0.0297512170573438389881182", 19, RoundingMode.ROUND_HALF_DOWN, "0.02974682983109472765"); + t("-9333333333972853173155919707", 69, RoundingMode.ROUND_DOWN, "-65.09653691297479299328335990767048403300363968885706293353776120698"); + t("34480807894389496956371086221591905587773907713447646110391369612", 40, RoundingMode.ROUND_CEIL, "149.2964109155175789209886653160484904986"); + t("700000000000000000008036912821597113706224347305506473353963550711540059386136214923443390119", 80, RoundingMode.ROUND_DOWN, "214.47688588506746154418927999989371641659417640376882933011144705894017063290101"); + t("-4111111111111111111111111111111111111111111111111111111111111111111111111111111111111111.111111111", 36, RoundingMode.ROUND_HALF_DOWN, "-202.431743606349924880560093876184258"); + t("965785", 42, RoundingMode.ROUND_DOWN, "14.473843701695309251250000057797595511394"); + t("86666666666666818777.4444444274333", 12, RoundingMode.ROUND_HALF_DOWN, "46.6017481968"); + t("45650707093393489", 39, RoundingMode.ROUND_UP, "39.0529426718416694163880211771172802776"); + t("-0.3233332926565753835310602448083516922671777745190719", 75, RoundingMode.ROUND_HALF_UP, "-0.317949148714865766428279631229951750179244481051196588800494070595629761416"); + t("-0.09", 49, RoundingMode.ROUND_FLOOR, "-0.08987894074394680193837910433312734138968336097052"); + t("-55.670312", 78, RoundingMode.ROUND_CEIL, "-4.71267484383981078702376411703894296495712713033875003095936636961741734952498"); + t("-0.628440860129435399449474103322187339983081180352641", 16, RoundingMode.ROUND_CEIL, "-0.5930592725369947"); + t("-1999.999999999999999999999999999999999999999999999", 27, RoundingMode.ROUND_CEIL, "-8.2940497026020218115142524"); + t("-1327369603871370644605409232", 38, RoundingMode.ROUND_UP, "-63.146143933869671577726957734111441303"); + t("635065.115", 5, RoundingMode.ROUND_DOWN, "14.054"); + t("64029421.3389801753", 79, RoundingMode.ROUND_HALF_EVEN, "18.66800042467191265432367497626810268584465882800362413612037944536493814934557"); + t("6789865997693134", 62, RoundingMode.ROUND_HALF_DOWN, "37.147354781602477227304480228391826137127928928425330505649693"); + t("-2828.2", 64, RoundingMode.ROUND_FLOOR, "-8.640542957688639359693485395291583498243863984629251096065701074"); + t("-5.04309", 72, RoundingMode.ROUND_HALF_EVEN, "-2.32085416067596536409988609455522401669880976274752182017699113420157702"); + t("0.128565765117403834693900448107529800362302668885076983970258921492563317686", 12, RoundingMode.ROUND_HALF_EVEN, "0.128214193327"); + t("0.5359", 100, RoundingMode.ROUND_FLOOR, "0.5130891222032116670765029849561768275804143700885982467189154447290560950278609459007898558863014846"); + t("58902772988929392605291983045", 119, RoundingMode.ROUND_CEIL, "66.938832860556818695911433765043296138833376508235642931983037421599478508859641167613792101699477244812429802235132661"); + t("8555555555555555555550555555555555555555555555555555555555555555555555555555555555555555.555555555555", 10, RoundingMode.ROUND_HALF_EVEN, "203.1646311"); + t("-162272380371710581774229836148565768088357315717291195808646179041695699", 130, RoundingMode.ROUND_FLOOR, "-164.6607948807968124264483700169627420807197121691430869322438739157544028584025139473610308769715490749188042060287981673374439404"); + t("808205395266195448068220712145889643232", 24, RoundingMode.ROUND_UP, "90.2810267566249385562788"); + t("-7301000000000000000000000000000000000000000000000000000000000000000000000000", 114, RoundingMode.ROUND_HALF_DOWN, "-175.375040480187320309915750620722879462485061545988599053228609275540753078531009884438846586324453515000242284001"); + t("-42108116533014808279162170", 134, RoundingMode.ROUND_HALF_EVEN, "-59.695429926281506183412489111557361000769026742050265567540802249524530491115905310884100760371785374722224768000029614453453989429547"); + t("16970077375222138468335503049633424504886138758", 50, RoundingMode.ROUND_FLOOR, "107.14092800405762582456512017242587665370392685839"); + t("618925.61330539816651552976227743326053", 93, RoundingMode.ROUND_HALF_UP, "14.028887552639976490277741354127290349385996721371055254363619885191433658097593370159226981"); + t("722222783", 140, RoundingMode.ROUND_HALF_UP, "21.090991393532965525338356625800182030413926641437905025664390293068412988973824605103297914490805088456259152641343233465191113645430497169"); + t("4129958202.01099415083410812263986817820001332212208095", 86, RoundingMode.ROUND_HALF_EVEN, "22.834680303849632674181090153966231233015032541428559576647496184016670256091286760658"); + t("-6111112079513222", 148, RoundingMode.ROUND_UP, "-37.04203234183266951349212739088047397380298806829222557948284197955916807176170256928951779924027027120935254005683724958589436986376561272966054142"); + t("7404973365930640927996054861805035", 23, RoundingMode.ROUND_HALF_DOWN, "78.680607100308433423897"); + t("0.0000896210957473477", 82, RoundingMode.ROUND_HALF_DOWN, "0.0000896210956273758111438427851611397069223964047562496488828292453565235810205564608"); + t("-44892757424625744549229705809058178540513", 30, RoundingMode.ROUND_UP, "-94.298242284490916750272809115"); + t("2302934845632364585747.69598808461743351111805480015", 41, RoundingMode.ROUND_FLOOR, "49.881618462788738681516570773576821527448"); + t("-585362271403222777777777777777777.7777777777777777722", 116, RoundingMode.ROUND_UP, "-76.142930893302204254077487034216433719763823350664523420704054020191228828500825439126057645009680736679272756525619"); + t("-1444444444444444444451518856518749347836544444444", 28, RoundingMode.ROUND_HALF_UP, "-111.5849564243994554955487166"); + t("0.5", 22, RoundingMode.ROUND_HALF_UP, "0.4812118250596034474978"); + t("-0.94511", 64, RoundingMode.ROUND_HALF_DOWN, "-0.8420231183061385495778944171576946480451563381824273232948346203"); + t("-3111111111111115889311957162157307669448053461700613444459407761870397688888888888888", 10, RoundingMode.ROUND_HALF_DOWN, "-195.2452749"); + t("38", 21, RoundingMode.ROUND_HALF_DOWN, "4.33090642553643102748"); + t("0.000001049", 53, RoundingMode.ROUND_HALF_DOWN, "0.0000010489999999998076132251667619328364026229422687835678"); + t("0.32137", 18, RoundingMode.ROUND_FLOOR, "0.316080541384470312"); + t("-986392926.3120756937540198089440040998090594153422726313", 139, RoundingMode.ROUND_HALF_EVEN, "-21.40271251913217238559057413067042813036968267624302820131032493406019036258235216388783627261236084609215587448385527618515194435007038434"); + t("6829779279", 120, RoundingMode.ROUND_DOWN, "23.3377053741686260676966790802582416089547636451296405213383214369247159635874698424346213419241653514187999275951473608"); + t("-42448681963374690493210418833613333333", 122, RoundingMode.ROUND_UP, "-87.334506391466015874191538040830222677505301243576444153919343724175814537797914298661265080346980689640572703517662340354"); + t("-0.3446247952991", 107, RoundingMode.ROUND_FLOOR, "-0.33814388635584418510738064332833855604241738811397681561201860299598678748499954376338003124720053114208482"); + t("-6367.284814916388344132426485910851840164482049790982042923492234036", 3, RoundingMode.ROUND_DOWN, "-9.45"); + t("0.90004", 25, RoundingMode.ROUND_FLOOR, "0.8088966671229588301686246"); + t("974", 149, RoundingMode.ROUND_CEIL, "7.5745587477275418405700835725871558779208588059247773691613417080136170943235799087877712566293635041906950620608048175629670395073548906792091010396"); + t("-13333333333333333538555555555555", 8, RoundingMode.ROUND_CEIL, "-72.360967"); + t("0.000000063294", 147, RoundingMode.ROUND_HALF_EVEN, "0.0000000632939999999999577393300306360761857902945089569104707943180764077538992767704951359314932053627214676434299394238343835374103477162273838980589712"); + t("48538583376630276658143", 29, RoundingMode.ROUND_CEIL, "52.929793148648029117176619078"); + t("-2071623636088891113987", 51, RoundingMode.ROUND_FLOOR, "-49.7757667985188455896400695345543154296958534961758"); + t("65300000.00080004000000030009", 55, RoundingMode.ROUND_HALF_EVEN, "18.6876497748188566106518298904924118435460198974417463"); + t("-5803115387662940661420", 7, RoundingMode.ROUND_CEIL, "-50.80582"); + t("-7", 7, RoundingMode.ROUND_HALF_UP, "-2.644121"); + t("-27.511571373307", 71, RoundingMode.ROUND_FLOOR, "-4.0080840109022036104174580281231536284048450384408347962811591117353134"); + t("7155577777777777777777777777777777777777777777777777777717777777777777.777777777777777777777777777777777777777777", 95, RoundingMode.ROUND_DOWN, "161.539410758508425831565156334361887313007224599419703500790267537783509427327311674870924687"); + t("9513471911399694153589834819830", 147, RoundingMode.ROUND_HALF_UP, "72.0234088603761631385453483325559929924133792109057613254926608248143651074635699979649965367482628512805582013935547556729831666136910258364175377"); + t("812077777777777777777777.37277777727777777770777777777777777", 15, RoundingMode.ROUND_HALF_EVEN, "55.7470302544501"); + t("1898353.95255603660402784054711370040609", 148, RoundingMode.ROUND_CEIL, "15.14964490844666274317372634917853324777415694165260306777428550602025398385810375307490143090484418409176570479674139795722980844811861684437272818"); + t("6.83436469804799352917890439652", 157, RoundingMode.ROUND_HALF_DOWN, "2.620420570967358213744413105680274593726860268647153133825869560127237664360083433122036643305966596456640903519044824670687731726539966292290714521720197271"); + t("534804795277610.457783762921157984", 43, RoundingMode.ROUND_HALF_UP, "34.6060701081637614125448147945942153199803"); + t("1157074847152560611849421577737998376931677819781911365839857.31009924724323", 145, RoundingMode.ROUND_HALF_DOWN, "138.9941478970328146888738307079162687301430794464382149495511347571200315643834056122011712969831356083155401093498881723358547996764418228896867"); + t("122222222222222222222222222.222", 120, RoundingMode.ROUND_UP, "60.761030293867284255156463047369905674412682758818452737653738195514130973866795336502371181016947712917568966000516318"); + t("-4841447593507726", 104, RoundingMode.ROUND_FLOOR, "-36.809137341048514444467138442157395209553263945536396461931376370606733421909918763959432206854829771295"); + t("-0.000488786383321740881197047960929896858852932286672536", 127, RoundingMode.ROUND_CEIL, "-0.0004887863638589104350955769712409180515389031436771188109790475153692458993965606927307719969931012413117254117244058300901680328"); + t("9000002867818369516111633522704320619395900848240773201041807085791421750290735138639128287453160500", 31, RoundingMode.ROUND_FLOOR, "230.8462962829531221439984814399"); + t("48", 19, RoundingMode.ROUND_FLOOR, "4.564456680755902429"); + t("397805941069071029036388762440467985022232185334730000000000000000", 146, RoundingMode.ROUND_HALF_UP, "151.74197234030732742794116441630649000222590124343963462732980826849376874843757360232125378842363330584400156454651966528381709329039415496544811"); + t("-620357018446067", 86, RoundingMode.ROUND_CEIL, "-34.7544634450009172817479223888189740260772945280654951282592143291209329126535887062"); + t("17926476925841136982808863085832873966599320819970.8203376167720261137984260309697905166", 52, RoundingMode.ROUND_DOWN, "114.1035104221126262954412378813022219652009952351782"); + t("9.33239439409416827669", 118, RoundingMode.ROUND_HALF_UP, "2.929496990652619624653169155035364834853336669273704721439452496931193601123523956565130545741289586955131019395246962"); + t("-1", 139, RoundingMode.ROUND_UP, "-0.8813735870195430252326093249797923090281603282616354107532956086533771842220260878337068919102560428567398161921064921887620725119765919376"); + t("-22.33137774413221708316", 35, RoundingMode.ROUND_HALF_EVEN, "-3.7996408802076074909430068561464513"); + t("47777777775056153661967757850407712004523932883420521661807222222222222222.0000000000244635423931584221643333333333", 70, RoundingMode.ROUND_HALF_EVEN, "170.3458345074256590577315932882828499204820787900117939972323929576559"); + t("-51.944444444444444444444444444444444444444444444444444444444444444444444444444743444444444444444444944444444444444444444444444444444444444444444444444444", 103, RoundingMode.ROUND_FLOOR, "-4.643414592571207512996535168184869352247925826602428934746217002849649126525333110816248781143608115637"); + t("0.960141", 130, RoundingMode.ROUND_CEIL, "0.8529063292587847965362987179446059511653435421629805958850520281739871325224899633472891391375779075970949209070648584721166232991"); + t("-4275266310945811396384522744700331361206036", 131, RoundingMode.ROUND_UP, "-98.854567481716421792032202341927491387767427145221667704315379539630318464724660916569419755395446268665155560216698635804504297725"); + t("0.3309622945879699311054425", 87, RoundingMode.ROUND_UP, "0.32519998671112784622097589075567646404757702736036579565268277667155257087001854829812"); + t("604599253342480902589425033511239577889814", 113, RoundingMode.ROUND_HALF_UP, "96.898531654711159185378636292770031008936631910034902130526917924697882101858286136968610022574475104434115590121"); + t("399999997544988699419146016859437429339948698391561906156412585087029613906800777295615311683939810489916752040", 106, RoundingMode.ROUND_CEIL, "255.3638017648873328999439948260512669386156127433639093067155815661628347074825134636957481584005458509547"); + t("-555448081270529915", 119, RoundingMode.ROUND_DOWN, "-41.551698717123019272228366528095089408163331528103503331434935067634914756987010807796371613034009734463310348715748305"); + t("625870580", 39, RoundingMode.ROUND_DOWN, "20.9478013470363496743541251195317681671"); + t("39000000000000002000000000000020000000.000000000000000000010003000000001", 41, RoundingMode.ROUND_HALF_DOWN, "87.249772174475236412795708450634925908038"); + t("-40000090000000000000000000000000000000000000000000000000000000000000000000800.008000000000000000000000000006000700000000000000000000000000000000000000008", 56, RoundingMode.ROUND_UP, "-177.07591085922477666741591551317117996809836559452794328"); + t("8772759.9213487855", 125, RoundingMode.ROUND_DOWN, "16.680309195668391979369216295587447800528691630920034530502755633050290515039183587494057391408486452500916194287954666486478"); + t("-1447756085242457430852651314207819161006266696361107493.308538098300458915006881764973462905516346943908659587067", 41, RoundingMode.ROUND_FLOOR, "-125.4027570325945477790851211432195526717"); + t("-872841872555555555555555", 123, RoundingMode.ROUND_HALF_UP, "-55.8191885417749966473649372824396670636986544300267026246106828156705326339353097413931685486947932265391261380154329114331"); + t("0.75651493151796185682592364255823", 5, RoundingMode.ROUND_FLOOR, "0.69835"); + t("86185112150.438547987032981396367", 137, RoundingMode.ROUND_CEIL, "25.872910467387475663687786862939697373290450966569278409016251860309157457197613211756133839893480733765205936131216846674377330084070506"); + t("-18050052984322196238168013507738979.60166562388898979216014317", 81, RoundingMode.ROUND_UP, "-79.5716038695575467301307079636101221255793101803366288532841210597058077279311023"); + t("-747608578.570088230784244792", 52, RoundingMode.ROUND_HALF_DOWN, "-21.12553728885264412334479721377652209785314684468459"); + t("986821415.5230159420456031051563754671135429574380017006970363050903779599922320151135760336567425215803", 115, RoundingMode.ROUND_FLOOR, "21.4031468249332106485054197915844527739605730471543566546970342860235357358608830048535863602836103998052348439084"); + t("-388888888888.999999999991", 2, RoundingMode.ROUND_FLOOR, "-28"); + t("721052387533", 134, RoundingMode.ROUND_HALF_DOWN, "27.997124811698191800360191242669338596386344958273604590946376162919457902962605224832482390765880036442821952527878959164572350955898"); + t("7799999599999.0999999999999999949999989999999999999999", 42, RoundingMode.ROUND_HALF_EVEN, "30.3782919789018715888840822914999093175426"); + t("8054518389311434412171874365573023099827801235084207682332037408098458682798563494644638443250", 48, RoundingMode.ROUND_HALF_EVEN, "216.919794053569711640723039976145456992701634349"); + t("-28889943224558711224013707890976508655294563222551196384657288888888888888", 153, RoundingMode.ROUND_HALF_DOWN, "-169.84276742537929615374873556050318396463945501085851514056920379210838118421281437026137505547346970246057424350366633858486428595723920046244609294434"); + t("-0.045543", 25, RoundingMode.ROUND_HALF_EVEN, "-0.045527270728591327518225"); + t("-6860000.00000600000000000002004", 103, RoundingMode.ROUND_UP, "-16.43436518026289321820334621891354960606433397927898825339615422430926976176402911166220726586930393022"); + t("-0.438399927337802153562493231072106161505", 49, RoundingMode.ROUND_HALF_UP, "-0.4254484519042477742616483607954830816941371030167"); + t("-353.557", 99, RoundingMode.ROUND_HALF_UP, "-6.56119389754710733813175982479462987724572910150035792571981641206221669916970784404500124907067563"); + t("13861.1226479913161", 114, RoundingMode.ROUND_HALF_UP, "10.2299904504583568608076189053952505543990422124777223267022486904013844563261558631518695022817598434488544910096"); + t("-0.7480533263833", 115, RoundingMode.ROUND_HALF_DOWN, "-0.6915891140254265360181379378794301545278715839718300802568134576574598954559138977810686408458825495986957995719285"); + t("-0.516947265870619", 29, RoundingMode.ROUND_FLOOR, "-0.49631831649332482140919443441"); + t("-6.049893342681998", 150, RoundingMode.ROUND_DOWN, "-2.49994926101472445635510302189335264112312035705500516230666152696977292860687747054598925120762853110141088103113882726777250312506336714742627835624"); + t("-47777777777777777777777777777777777777777777777777777777777776777777777777777777777777777747777.77", 35, RoundingMode.ROUND_HALF_DOWN, "-218.70012146035758264779078090128921"); + t("9", 63, RoundingMode.ROUND_FLOOR, "2.89344398588587137807271830662636924605558476246253319923169933"); + t("-955555555555555555552630006666666666", 40, RoundingMode.ROUND_HALF_UP, "-83.54074815426883260014345557543966346962"); + t("73333333332.33333333333333333333333313343333333333333333333", 96, RoundingMode.ROUND_HALF_DOWN, "25.7114282751769719480446670068356570784645673028488717071687898933916446122871067642280267247344"); + t("-9657.45729529", 28, RoundingMode.ROUND_DOWN, "-9.868632855849273912143353088"); + t("477777777734585.8888888888359688444576957953444444444444", 111, RoundingMode.ROUND_UP, "34.493314020743526298440401444427874066544728958549146667103263213549435340668736526789292333692699558154087154"); + t("-13333338888888888888888888.55333333321980085567888888888", 24, RoundingMode.ROUND_DOWN, "-58.5454569945294481984414"); + t("133333288712699477262543999999999999999", 67, RoundingMode.ROUND_HALF_DOWN, "88.47906245213065231209455251042764722707357197560803650154264958404"); + t("-0.8063936201522819101552281847700498674967170278851754676093919459", 154, RoundingMode.ROUND_HALF_UP, "-0.7376530526688679050346218294792385087960069684100117478685346857717326397812134838153948797801703219609498376508411123106980282352142950574673280586189702"); + t("-48825076005395966", 31, RoundingMode.ROUND_CEIL, "-39.12016760892229911230827086482"); + t("-83.39197", 40, RoundingMode.ROUND_DOWN, "-5.116735149768480646735589120254279105381"); + t("-85143531143007416847.83868339850700461608", 14, RoundingMode.ROUND_HALF_EVEN, "-46.584017288541"); + t("-999999999.999999999999999999999699999999999999999999999999999999929999", 28, RoundingMode.ROUND_DOWN, "-21.41641301750635646582915521"); + t("-460253261924156072117", 23, RoundingMode.ROUND_HALF_EVEN, "-48.271455761828523092199"); + t("79", 70, RoundingMode.ROUND_HALF_UP, "5.062635088303317691620783377739400031721208392962908623262029508520472"); + t("633496", 86, RoundingMode.ROUND_FLOOR, "14.052156145156103774234952320182221252300051876603789108318427725351685441442147739736"); + t("900.00006000000000000008000000000000033", 115, RoundingMode.ROUND_HALF_EVEN, "7.495542319192711771403777824832776940119510067936153133865267345523777532699563148131794382341896564639925255266021"); + t("950000000000000.0000000000000008000000000000000000000100000000000000000000000000000000000000000002000000000000000000000000002", 74, RoundingMode.ROUND_HALF_EVEN, "35.18063028108308003626090779747007155722620730431801697552532553701265226"); + t("-6135472286122111111111", 90, RoundingMode.ROUND_FLOOR, "-50.8615211908877907053594733457846629088209321192288404672608079829889761962357309403082145"); + t("0.0841144040672275", 50, RoundingMode.ROUND_HALF_UP, "0.084015530376839848797598632870381781088803425904844"); + t("0.0000007887948010212581500014135203818886033795613652310702578", 21, RoundingMode.ROUND_HALF_EVEN, "0.000000788794801021176352344"); + t("-53000000000000000000000000000000000000006000000.00000000000000000000000000000000000000000000000000000300005", 73, RoundingMode.ROUND_HALF_DOWN, "-108.2797682788441229243713167212836236804851580831134265899893197400332978"); + t("9010014.9", 101, RoundingMode.ROUND_HALF_UP, "16.706994463861192659179625849638617888988014979358369229263368536288418479902757251293439590258526252"); + t("-0.037747798094", 117, RoundingMode.ROUND_CEIL, "-0.0377388393877703589761632906479178254231216601969717343107372339793340328521055061717843942105908357473171037600654377"); + t("-3222222222222263", 78, RoundingMode.ROUND_DOWN, "-36.4019948281208978692522992932638955382202112985236784204840174603694884667097"); + t("7944444444444444444094644144444.44444444444444444444444444444", 37, RoundingMode.ROUND_FLOOR, "71.84317284274505841782065337922331573"); + t("-0.60989486259307695874372541518406415936", 67, RoundingMode.ROUND_CEIL, "-0.5772911333676867322621379201286430714150273452118877828106110851885"); + t("-211706633833.22222222222222228095861490359669484484", 5, RoundingMode.ROUND_CEIL, "-26.771"); + t("-181.01", 115, RoundingMode.ROUND_HALF_DOWN, "-5.891707089012635555467769173537153815719714653723860156907472921044037208311153284380545830858943792619587934301361"); + t("4162739857.9539577357538635", 2, RoundingMode.ROUND_UP, "23"); + t("0.718892940728", 62, RoundingMode.ROUND_FLOOR, "0.66807557432267574073319109569668815420957206707932159790941154"); + t("2555555555555555555555555555555555555555555555555555555555555555555.555555516", 73, RoundingMode.ROUND_DOWN, "153.6020329567598907626209304885913589788955975830542085108495681835611905"); + t("-4333333333333383984956756317441547567.598", 61, RoundingMode.ROUND_FLOOR, "-85.05254759713902866755934122946396978114568273561832977811679"); + t("2954477.7217", 76, RoundingMode.ROUND_FLOOR, "15.59197962983571140578003477923299326914660517657323426967842944863678042778"); + t("-0.5779450467435", 44, RoundingMode.ROUND_CEIL, "-0.54982117046956055970213381082307328030919013"); + t("4144914675699611096353697", 65, RoundingMode.ROUND_FLOOR, "57.377071615918993408329823151358977831144231218629203831154742432"); + t("982", 73, RoundingMode.ROUND_CEIL, "7.582738748163276497710220209841948408424521156982306871175850347127223846"); + t("355555555555555525555555555555555555555555555515555555.5555555555555558553559955", 44, RoundingMode.ROUND_HALF_UP, "123.99866843470787364229144935317530744244609"); + t("0.06493857652533101217446790978192981776362376506539", 51, RoundingMode.ROUND_CEIL, "0.0648930217211306861109176854789547736848902107850314"); + t("5999993999999999.8999993", 63, RoundingMode.ROUND_UP, "37.0236820446981855534994477166374819602154352449289354393326488"); + t("0.000002096467072973881441179568566968510453538357839422235247864", 64, RoundingMode.ROUND_HALF_DOWN, "0.000002096467072972345718185361569963366974699577222254206609069654988"); + t("-0.77499302160608207347709583171192013627193565305713", 51, RoundingMode.ROUND_HALF_EVEN, "-0.713021785530239295451792408385132854956440010810005"); + t("-8716381359353319614542829784520140474429384", 37, RoundingMode.ROUND_HALF_EVEN, "-99.56692525637647056491738352707639941"); + t("0.275430030393778815198156222554119317214407503659666616073", 74, RoundingMode.ROUND_DOWN, "0.27206137533572451351006139931260007613001988948498199370312452285324713657"); + t("0.00853", 76, RoundingMode.ROUND_HALF_UP, "0.00852989656164061819928592492057730962400705616616514408550722083973164877762"); + t("-93645725245593857353129316", 77, RoundingMode.ROUND_HALF_DOWN, "-60.4947081941958527539939442916018197177060768825151572953123428851387229189"); + t("-83933414570350698313637630006.494271521259", 49, RoundingMode.ROUND_HALF_UP, "-67.29296849221635223277839025237292731057350006084"); + t("-3452502080", 51, RoundingMode.ROUND_UP, "-22.6555122262694691864519844981175479921239242238467"); + t("-78.924", 18, RoundingMode.ROUND_CEIL, "-5.06167267711859986"); + t("403161203392092360600.160708548473028144970693", 6, RoundingMode.ROUND_CEIL, "48.1391"); + t("6163003697", 142, RoundingMode.ROUND_UP, "23.23497728935647572428121756886118061714707375440876969202716039702430344541330079938902301526820119920625047978606905301088462460182104642253"); + t("-0.5750527162", 24, RoundingMode.ROUND_HALF_DOWN, "-0.547315415642867174613002"); + t("-0.23909284771365012530455335105523642498333566809054403473879221433562", 148, RoundingMode.ROUND_HALF_DOWN, "-0.2368715550894555506342450941137269943200714265574874131003814720845914199898303308552383036959742316895101942221634792623240404916782920635537889188"); + t("-57970297265912.000691039852122832177273212734628270470604522", 24, RoundingMode.ROUND_CEIL, "-32.3840990597537079780915"); + t("0.250739470464885949099839708916132310128688296801746837428", 33, RoundingMode.ROUND_CEIL, "0.248183790811610508675822475141844"); + t("8508.426546364223533467", 15, RoundingMode.ROUND_DOWN, "9.74195949381629"); + t("2690046524.4011960547862", 45, RoundingMode.ROUND_HALF_UP, "22.4059715062869717032204077897820267004098985"); + t("-0.257722416904323411438838262968052277365", 131, RoundingMode.ROUND_HALF_UP, "-0.25495144244533546111788890912371185241829166906845462120895601135338150340370765549031688463586682019538456008218537301654693723398"); + t("9.7709600009000000000000000000000000000000008700000000000000000000000008000001005", 149, RoundingMode.ROUND_HALF_UP, "2.9751702540136792454438909471330796179375535910954731559524678770358896553483951379095630646005414195112357151840586416657779414377322046886545006913"); + t("920717.53626516475", 108, RoundingMode.ROUND_HALF_UP, "14.4260557563205514914512821286567248263378747066952064355467018298860792694813770240472287387070946405230778"); + t("-11850.569639", 57, RoundingMode.ROUND_HALF_DOWN, "-10.0732783985497166680961905973878043670847837992666736247"); + t("775631398193", 139, RoundingMode.ROUND_HALF_EVEN, "28.07009042251162366142013049745808064743303285006111537276864999703546689140317671366173405208214009874311778834752980737850362057360660173"); + t("-0.1303539342799214750697937286556887303575779652264316686362917987295366700417486352712", 75, RoundingMode.ROUND_HALF_DOWN, "-0.129987563305959448180126791101978353154580723260829913346298965636405468546"); + t("-8821894.09138533658336", 14, RoundingMode.ROUND_HALF_UP, "-16.685894335078"); + t("-97918156687333.185201735530123400403346591724609", 68, RoundingMode.ROUND_FLOOR, "-32.908300290395310550671376162667942421518529285952600700164285927627"); + t("-9.30000000000000000010000000000000000000000000000000000000600000008", 110, RoundingMode.ROUND_HALF_UP, "-2.9260396356364362908053075220457471610650922903093985076203987920224304651315319363577531880393874475166146512"); + t("7", 103, RoundingMode.ROUND_HALF_UP, "2.64412076105862907569782797493937692708448098478490623225988682596013155266607826350112067573076812857"); + t("3536499.8996635330322257167504934", 44, RoundingMode.ROUND_CEIL, "15.771795247646460731502600750469417750236214"); + t("-54444051651770978804777136253226707995", 59, RoundingMode.ROUND_UP, "-87.583384127528709234756542723485201112989343881351662110825"); + t("-0.87449548622261424070359268739587497772254284727591940116618350263", 106, RoundingMode.ROUND_HALF_UP, "-0.7897889926333143626120096411864712404684283500713425018107866790117101104154659182573430070718069341359409"); + t("2261431726529983138882744515747570791576717", 85, RoundingMode.ROUND_HALF_UP, "98.21771920632716040837415328647411305954103754416114655695166443780382052029087890261"); + t("699999999999999999999999999999999999999999993999999999999999999999999999999799999999999739999999999979999999999999139999999599999999.9999", 110, RoundingMode.ROUND_DOWN, "304.27770451183524322087946542855306749345687986573994773151745375761155678102608175145201242701554484832467961"); + t("0.00000000952972071460333385012561918821899558071606859697939", 129, RoundingMode.ROUND_FLOOR, "0.00000000952972071460333370588443845875875148433304197634037695687657184857436998979531323199479500737484674490764071306019942888746245539"); + t("-23704603.3645687204948722342591063494630650470391138104487634179819643965669510016499611994385869445152892353298896158611692151308", 72, RoundingMode.ROUND_UP, "-17.6743270025960995831309371340090332700087881660783692812787864506109493"); + t("-79179352839997528941193673649163272319242893902504", 107, RoundingMode.ROUND_HALF_DOWN, "-115.58894721264261027188746046235986149603642893661113830612746192530639395670170195151341184714432493293187"); + t("25555555555555555555555555555555555555555555565555555555555555555555555555555555555555555355.5555555555401", 39, RoundingMode.ROUND_HALF_EVEN, "211.166660281611032863070716855700464169"); + t("-95973", 97, RoundingMode.ROUND_HALF_UP, "-12.16496936147886201519068291861373283594281531576431842028451828076819058007345774281602091332579"); + t("-45555555555555555.6666666666666666666212803857104900766", 131, RoundingMode.ROUND_HALF_DOWN, "-39.050856157832764677220392685844262624292248864007312484176774218279819548362059808546657096281040187662014836484169544779700539464"); + t("-4000000000000000000000010000000050000000000000000000000000000000000000000000000000000900000.00000000000000000000004", 74, RoundingMode.ROUND_FLOOR, "-209.31209991114394748987092978596732088832563437966720860533030111548359075"); + t("-6408698220232408848358.600321128395", 144, RoundingMode.ROUND_FLOOR, "-50.90509029797560158755784055812271077070040222766927034560822488404714832820274254368809573117193491124869887664433989072786117754062806435563"); + t("-26681321336447777777777777.2270789632185598503350514118099216515234110942158", 155, RoundingMode.ROUND_HALF_DOWN, "-59.239153157592239443687587373091873632188852675907830346284926464780245372474521149171489030771220624173980390000339135850128482807211432400558352696609872"); + t("0.38882828886966052998619709737692351392084657115965880750077748507858070366", 22, RoundingMode.ROUND_UP, "0.3796427772699202477177"); + t("9.22665", 97, RoundingMode.ROUND_CEIL, "2.918167012351787250429727798513497875857085818867207739423336804437266725422969915794574779271232"); + t("-142191879.6865", 31, RoundingMode.ROUND_CEIL, "-19.46583514938588047248272184203"); + t("-46471131255901458266932597775769510175838618463035313325276720", 28, RoundingMode.ROUND_CEIL, "-142.6870840467928410889494771"); + t("-35677423545046726394920268", 100, RoundingMode.ROUND_FLOOR, "-59.52970750746122883478639204578138515165073667616157615038261609010435625241030492404597882211264676"); + t("-9666666.665366666661666266666666666666666666660666966", 80, RoundingMode.ROUND_DOWN, "-16.777341279708103665552637853213260563508127867995796419694820025308117351289639"); + t("-5380000.00000000000000000000000000000000000000000200200000000000000000000000000934", 37, RoundingMode.ROUND_UP, "-16.19134611269792109837573026598650896"); + t("-941220.22947784394440880357898448118117565836105055325484656453234235461371587236986273642", 110, RoundingMode.ROUND_HALF_EVEN, "-14.448079609447471803723747230271727672570752268384390028590350011352079876652921946411317791108591566535110091"); + t("5337986736972.4", 33, RoundingMode.ROUND_UP, "29.9990168628241273409781709321368"); + t("-456026757301589830203301143736.035165299596723188346653823627631072421645", 102, RoundingMode.ROUND_HALF_UP, "-68.9854961774850213220906762413407209698747594483647268532381946702262103531979921978330512919648103442"); + t("54247062991240220", 5, RoundingMode.ROUND_HALF_DOWN, "39.225"); + t("-993227.7211292013163", 73, RoundingMode.ROUND_DOWN, "-14.50186242371032573584011107957695805605424986307442647965555600785199681"); + t("7396250000000000003000001000200000000000.0005", 63, RoundingMode.ROUND_HALF_EVEN, "92.4949389223364937611049413922610806174356235424175541107528843"); + t("-96271610695953686873244189876005565890050925015698868063", 135, RoundingMode.ROUND_HALF_EVEN, "-129.599915676915163294806902141315247216190689805540938212415133434272782390752057703720627730673742482309298718220770427194501621352847"); + t("3495.4840601890742171379542748921651827", 145, RoundingMode.ROUND_HALF_UP, "8.852374346867844711885358758328290017188288668022069566740543673619395249035857186075330833349948075915394522364299283330988254282291545574091175"); + t("-993431872.2128768928534159543116", 37, RoundingMode.ROUND_HALF_UP, "-21.409823224649849569568771377306649"); + t("0.494300243158702100697615141330271997682573864529263070126285338460208097929596445", 276, RoundingMode.ROUND_CEIL, "0.476108004975381118117135258993122020321204596425201212613774983148847807444023024295868661870292275117832489016173535953107707233870480919867231308101380179312957162440638656022942850853940187687737314947358412443309831476204793321426904539219106010830095981210334326368507679"); + t("-4420300000000.01", 269, RoundingMode.ROUND_HALF_UP, "-29.810375863577981537599509400265294417623081400490504708471423921168300452768083283389120032514065568643228555817102220413774876650207835048525445128618642213669800631032831818700196625480537754989599893071050882065368481416508236809858089849651208402177209500620207236"); + t("-9726722966605705", 191, RoundingMode.ROUND_FLOOR, "-37.50680061808524489051761193453470440337755358782773306563563590519962211418617736002469056447516207574012041321352101570731135338575464567516658179101275524018716235396366737505162072934042"); + t("33163", 12, RoundingMode.ROUND_HALF_DOWN, "11.1023372564"); + t("79333333333333333333333333333373333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333.3333333333333", 232, RoundingMode.ROUND_UP, "329.7313036777237517593309014778059911701647796186299196781726115161006813355614283995003920110351169979031380416957469623617127186370290398068550007305101896330881284102626789152484927524156776072723529410819013218953472517256452486"); + t("747130.3166", 169, RoundingMode.ROUND_UP, "14.2171420827399294645577389585238620158290734992830484945172142277607460358343283250897059334210588056272130619721604968256181326450873550630931211853628108363229853551"); + t("-73683178893.2442286309017017702827044", 298, RoundingMode.ROUND_CEIL, "-25.71618755311071217800439173597170328061190593421536999628114230198430707049277755974800002588158030534015642501786426843738844696380484183688042249354978007894959688812036509615194001013364698344573275233281942806686169553550225196761788720157040513739143910499653977081964705787059621706708517586"); + t("805178980", 112, RoundingMode.ROUND_CEIL, "21.1997223266336565775654230832808069197539241658854391814009547619599935196541688552308539301916869737751755816"); + t("9999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999", 123, RoundingMode.ROUND_FLOOR, "113.51981673726818382629881340099202274052947307717013107975374715690445149615996624716972637638673530869842289909259686877"); + t("-959999999999999999999999999999999999999999999999999999999.99999999999999099999999199599999999999999999999999999999999999999999999999999999999999999999993999999999999999999999999999999999999993999999999999999999999999999999999999999999999999999999999999999999499999999995999", 102, RoundingMode.ROUND_HALF_UP, "-131.899675486700294168888167973311616531161073238566794658291808943814349547916163665151141996720150623"); + t("599702.884885871105818871223917480327260314200332769390006552216157139982253820665839705546241787631098900332261213132456978144702711479167306822375727935137594946916639632671654878312315052073142987472247989525727193108382213850196272643713179964581985530744179741643791250788837857163", 132, RoundingMode.ROUND_CEIL, "13.9973368002540636203618049163885820488770820062358999600249363922398187608330410102296445037108041383346378500394098625859115152916"); + t("-733933333333333333333333333333333333333333333333333333.333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333303333383333333333333333333333333333333333333333", 118, RoundingMode.ROUND_FLOOR, "-124.7234051212244682796003064593342286195098156130372457611791996501108386023859113293866575323624297337408761702227632"); + t("-0.789867018704217480379308288686419778725578211581445657569591998452482161", 19, RoundingMode.ROUND_HALF_EVEN, "-0.7247361577421402434"); + t("79827818", 11, RoundingMode.ROUND_HALF_UP, "18.888529779"); + t("-26099.66615621327774560736157298424552335607602637183582101", 280, RoundingMode.ROUND_FLOOR, "-10.86282498320624576168053909865992841279643620476529086624727029218826109786617246863833350430703387515797415010802881136235684877574914919145939013660592997957483024096253279070572930937798871236547758509502250963878796833034287629974111620401576658594527250121510501930749246338"); + t("-852800000", 13, RoundingMode.ROUND_HALF_DOWN, "-21.25718279194"); + t("-9535000000000000000000000000000000000000000000000000000000000000000000000.0000000000000000000000000000000000000000000000000000000070000000000080000000000000000000000006000000000000000000000000000000000000000000000000009", 291, RoundingMode.ROUND_UP, "-168.734243115183616947485545014777456436169414392139861576074204072456099376282312776368544872417238918134663581405860305364583613586556305099234804745623824084503545848191216836505022749622354168542696334897744174969432740259286624855824914206880393893706432482083726430358741137136307930898"); + t("-0.09893002996922365417954565757917337184677449420418822836946620724833145424405614", 155, RoundingMode.ROUND_FLOOR, "-0.098769362727604522350463430704541318751237912034941759365729979273051803944600098891763789351824963312286029765927098463759911355676098829649942486507674074"); + t("-0.95", 156, RoundingMode.ROUND_HALF_EVEN, "-0.845572697039727389920891100584013109644368739828865076716968920063651667653483746782142011044338225303742549467940785162182898478318070732990904226617378043"); + t("-38888888888882045645337515559289934040777646760693757983797", 288, RoundingMode.ROUND_CEIL, "-135.601206058367613310256465623446220723419453454570108222010656136432019014957827209092622009846412108131303196592231943784507739031533629115067393174285638082569124792031388057386907358574751288940603862708903117246051847525884386555423169377655137026374693600193716073180141817979646132"); + t("-74595.3368832", 216, RoundingMode.ROUND_FLOOR, "-11.9129804565749057617415561734361343963304906478930013214271108391391849091848546862507080137154602203731124529582579908985993985794990014043389319074108431269027409571922269795496152488961757251351603168953933605401"); + t("0.8080547595342512426551190130036591455180872422888346439308521116000388717922913944341200718914949857883165189096372162545044295582684119673586366881433175461052730132904916381279306815095615749454444147", 58, RoundingMode.ROUND_UP, "0.7389456171298627623028450926798328677275095725088107690832"); + t("0.01500301577777171096491530134", 148, RoundingMode.ROUND_UP, "0.01500245299543125866944955113570177649412900258326740092733003753798341946374585497048998477023059760320992140187083360999899430085205456925836752463"); + t("20962391955770732377934616037.003376067", 131, RoundingMode.ROUND_HALF_DOWN, "65.905674664368054849545716402278555787873381993664341573244685766629580470622806937732515176319221878134324163302082466039452723965"); + t("0.596342162", 318, RoundingMode.ROUND_DOWN, "0.565685798769829802279647005296822505250369238582387186254870472551295824958292919778522273892240115386202888061038208880692943970258996486899250997136433512403730891460479453683988140079383748165467747685427339079945946590936655972069133230625177260740789972151258440360823395838789013093672053281935037000545125917734"); + t("993.99999999005", 109, RoundingMode.ROUND_DOWN, "7.594884640233630887613596271352479183172134518932586862570667198985002715969055093156847119576798962984556852"); + t("0.1716229202912250846293464581120113451", 131, RoundingMode.ROUND_CEIL, "0.17079138625530068267053552286785638138149965714931279470117084800618193263792593762445739202706349676371961709780494706426199813682"); + t("-0.99236", 205, RoundingMode.ROUND_HALF_UP, "-0.8759609597255583815941960443271338010344977021571421169160330627378178355439654316504371022043527033349634923604880737006850073482976753351824808411668611553314104805563281591416268153507249694700731194448"); + t("94508101194855775453423051409908337681.1932903245", 80, RoundingMode.ROUND_DOWN, "88.134896086100634504319886945258136524796414910386473433928761612309028223047693"); + t("155555555555555555230925118113806445278332123531341876385498911", 254, RoundingMode.ROUND_HALF_EVEN, "143.89525569846981694817788674796238947380164896309653283806799260826468025241368330754134118439827937669457699143665167555619548061812278848484883661864752112733520535179629867222640598589993349998082392771553529396617437179494440612808462414811622011892"); + t("-0.000000017511901816222879499804622990527795575275363174606868763258097748348432103852848664525244552541090626896", 203, RoundingMode.ROUND_CEIL, "-0.000000017511901816222878604751750967987100416583347377325716760196795038961297396801964615421773219248323367582621229723546940494480894211776319630188972330996924309749186517084785503169908102513862668946835879"); + t("-4193991999999939999999999.99999999999999999999949999999999999999999", 2, RoundingMode.ROUND_FLOOR, "-58"); + t("-170032843872953132305964179561784790.595754717394456784184874345283548817", 222, RoundingMode.ROUND_DOWN, "-81.8144468670058079488885009124556669410102092685364083899208138098434678411531529362859748905323652312378604680219191855742375827594938519600483076313800636949067965897992563601743841086943287619730164651155739126680890266"); + t("-40000000000000000000000000000000000000000000000000000.00000000000007", 315, RoundingMode.ROUND_UP, "-121.813866377370211497187252007961468499483777811776960516095090878795706569131413119089444645648367576408329369510596986138351884891578811767744955448041875738903357545413957162573515646835801343889834112870626469259129601503894937018436964346274681460580002834959340337130455138400350647265807001014019910277315984"); + t("-0.6745308840041542", 164, RoundingMode.ROUND_CEIL, "-0.63167666306048615232842155329700226109466199050153027366527327348983911088063992382669261937529059732049183155071775210226841215890219081991017527683255263619046936"); + t("9.59", 43, RoundingMode.ROUND_CEIL, "2.956575385785493533388453543855369308805093"); + t("-90", 23, RoundingMode.ROUND_FLOOR, "-5.1929877136589412026279"); + t("175375564618668220989306328015252446707722239200870748336678143215053283928457207277177932363870396066118848425291154754278680706405005", 154, RoundingMode.ROUND_HALF_EVEN, "309.8013092136848932975185970393960276529795083177373043690486184203069111954955157899118953236338846531789724444393301347051187255120750308613592762710768"); + t("79449488622113646460853412595661484927992956876087342380988384743730650346427233346348668446569755", 250, RoundingMode.ROUND_CEIL, "226.1164375644760012617283347070315433081439805662542520048875960475632386321985249749722922393057333895433292923125880278518236248172606443374991357615676772526941157694974582717605674230824357560210148996058641322231702292246260012487603185589498164"); + t("3283806362614826202151655300889625736471829652112564604268369489772213", 260, RoundingMode.ROUND_HALF_EVEN, "160.76052182311985052402736246235649817973854203312073448182795741216803796784463177710069851189253938742901370103700292442992710839130372585260538757477631814806183786247111258389461416802932732978589979781659786540279500908662328294129165209877758419207627981"); + t("-792999999999999991999999999.9999999499999999", 54, RoundingMode.ROUND_HALF_UP, "-62.6310126340518897005656311955195002202192416231669242"); + t("0.688836478257524850750853891003791104760892169337387", 187, RoundingMode.ROUND_FLOOR, "0.6434970728074505883827075461071177778235747367201143047181123073483459320897439883077445255166984569634468796254061334936805847201799682901790158246795824649816779486768128686578519940495"); + t("-19089404076755992763168214325496926710.22644625814180160335246355693560819", 288, RoundingMode.ROUND_UP, "-86.5353439490824329887339710326033018653708179835849623602305478302749116384158900712176704251898224502529349334061156363578270754318117279279538544886311274268601769228007420644818421367339370568338300179946002077944339305985544090302497196004275073539121558548738376786793218971782329355"); + t("-62620887748141281043689327801111701307725008623040.820463818531248391268", 82, RoundingMode.ROUND_DOWN, "-115.3543305368228073682500850944763349723743496991620124422919382407698827492769713"); + t("476950316880465937", 138, RoundingMode.ROUND_HALF_UP, "41.399335903450904510490278036964164567779213415303005203431598983423321482372826336814672166153151948258836436281659958615754094367712992"); + t("-619999999999.99999999999499", 137, RoundingMode.ROUND_HALF_EVEN, "-27.846132495545493704943535684021395086503733481928078822027929241890114283163708563442454644187845042256480730171279251278564680093910889"); + t("-0.94968871997761659854803093664089264560906765310800714905245404491279389505216177097909103474559123503981429290526630314476911293238014653034403236495272462425753910420445998255262914471338984692125010984842417145554588060887723451661063314271829668683599", 177, RoundingMode.ROUND_HALF_DOWN, "-0.845347001659826838738170213945036768317236735482243081775665930124398689037825627651575637902672293337317011613972922281450858571273809891847165117915041271640065154643054620168"); + t("-3000000100.00000000000000000000000000000000000000000000000000000000000000000000006", 143, RoundingMode.ROUND_HALF_DOWN, "-22.51502533950779893477996834992238764113997301980898251719961991667653812522021287320277640684850837798118863443838355951759208339607537904019"); + t("3087382630465292263380485590465565961926572883.3685766468581276060660634802503038961863357948347750293143967234107485050954036263310221553463126485", 222, RoundingMode.ROUND_CEIL, "105.436800052099333300714403572433935077243172414270307978237132211611940293097781085716670508994702827193816366870989549882871707325551078875730188994145405983239569586081640597989572055819117261249090999093468920502235356"); + t("560000000000.0000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000209", 190, RoundingMode.ROUND_HALF_DOWN, "27.7443498012355513829541965733134056289705083165749648106067615424431903199802736988445080543214684403810566264262313767530772894632452334190729269631776564338848619686114444474618106572191"); + t("-2592433305051573581781967765981987274593238.349342", 262, RoundingMode.ROUND_CEIL, "-98.35431802098730445142828518517973071914786913499324557666751232248775040864602350128680423832903790994168056304511087334512233732656835095316839947992708368674651397992063952121957891002603516085078026208794064298071970327766250288544416637901469300636470976703"); + t("0.0033922427896", 195, RoundingMode.ROUND_HALF_DOWN, "0.00339223628370148028341451086114043325007853818733980028197480686288190735333471283123249268054714112892789140873631632260169879232515735788130552154097960956572588506240910814523343672095594729135"); + t("-78599999999999999999999999999999999999999999999999999999999999.9999999999999965", 199, RoundingMode.ROUND_HALF_DOWN, "-143.2126244596378472114406293173858929823713886602814465178993959648186018482583596466944042558619332922408904950286066376156300717281330613197113582825746096761859301920689979501358175335200584892198"); + t("664150605576901222125518795206215688232732908038179054513414", 2, RoundingMode.ROUND_DOWN, "130"); + t("68777.77777777777777707777777707777777777", 17, RoundingMode.ROUND_UP, "11.831783154943309"); + t("5238668228698068165815775511701951.310412403539912", 240, RoundingMode.ROUND_HALF_UP, "78.3345225605649788848562459267663365609483210240955944414749045754761742178128315267510999375938604672071169495107986736170480582265832910361526517951496255380940393739369777517079536175325335946253066748934226146086325477314801563426619379"); + t("98964443782853723415586104690.0087769875947678487183420443393597151", 77, RoundingMode.ROUND_CEIL, "67.457705323314080535296865855308716140836207641154910134812834659818205513366"); + t("-68800000000000000000.666666888149207222222222222222222", 176, RoundingMode.ROUND_DOWN, "-46.37088259939206559887454777597076453338534219195985162188634346255183087287547997415095365910603829128979745019714280590221236549971114781882679155143870439038472094514036585"); + t("0.2456921393300443638682080944626819254519025687732974235978284182331144304", 89, RoundingMode.ROUND_FLOOR, "0.24328511480248863064929706158391645743586042443669210186656825587558133098927294749320818"); + t("766616666.66666666666666666657", 41, RoundingMode.ROUND_HALF_UP, "21.150644632255299901556679738174627536241"); + t("0.50339", 50, RoundingMode.ROUND_HALF_UP, "0.48424187561877310298962418173863882368772603499064"); + t("-11191328616994302532803326116595255458078579490017095913093957063610386063078840413058696328408685342676441783333", 309, RoundingMode.ROUND_UP, "-258.695231750703235956891009769353169910874004387070190820768477785803143138081989680870054170921517712049743767653997841757492505313707906633010131747285980138211865746092522237727927341539154923804243134809964180265275277321942897734142638694584884409532799456917934709235319630990983923498621680153171786988"); + t("-41922883588267201235001560277880627613571827917339133099770687520725301868009575881579328416996907488", 144, RoundingMode.ROUND_DOWN, "-232.38490321250552993418456075239131178996999890644517529430568740075767567010569953203413716184707718962505628297486167466356265927987371370215"); + t("-837469.049029217303747151013894229235381188465714363236074", 65, RoundingMode.ROUND_FLOOR, "-14.331286766175732250892911283511997319324809006714644337395351693"); + t("-600000000000000000000000600000000000000000007000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000.07", 94, RoundingMode.ROUND_CEIL, "-449.1864146906328630097200526886055351154121796321913839771083338070000228148977128972021334614"); + t("9063987092133333333333", 21, RoundingMode.ROUND_HALF_UP, "51.2517432330789839164"); + t("-8438510177.1345971093411210033864115681507462383072777969781106039725731225620349341493545536", 143, RoundingMode.ROUND_FLOOR, "-23.549218791236008813748502929212560075302832645249188359507650173299340615119623103115274781227556838895806970568636226066859197840371789681602"); + t("-80432125335468709076367684317656118998696385103346746266797766478415950071676490864712535746212772938", 219, RoundingMode.ROUND_DOWN, "-233.036485052198127472294146371315324818063233222137440302722696634917144403318307862809598998356292206480795884811635754417548398059489512093402159188828391382743671253753927094116126918412101432403138052909359828039805"); + t("477233635253466633402.1111958263703065", 300, RoundingMode.ROUND_HALF_EVEN, "48.3076850267975231277289509875746486160373523976108862540895709315416947296742621237259794432826542974388949050085436447560067322990355252611760750161132677836883876230587223410560385259692491499922343395529819012311584230527762341600399429872951370919859937698005543148910450770825109092061532137673"); + t("-2706.002146697706563237401763131683", 267, RoundingMode.ROUND_HALF_DOWN, "-8.59637481674226448943890480655137822743989199203922761375624642408643208071609543783497986593488927836306497577581166776927797288000506743435392826442302098724165480057188579407172224077670973518650147865574138840548042680063770885100685059400199844354090841044082702"); + t("919007050453505360036757969919962747.89139568822272995639", 50, RoundingMode.ROUND_UP, "83.501749043565125130613094960482910650298966519136"); + t("5", 99, RoundingMode.ROUND_HALF_DOWN, "2.31243834127275262025356234136441438365824507264655923716722899009913255483823893241500577417895479"); + t("0.93288541480413872693334836254081969", 206, RoundingMode.ROUND_HALF_DOWN, "0.83311147909676642295092876470309021761756004092768334471877466390990041080671933753929939661642895436603688058901154927132042437511706378145045329743512353423143072517581132450092583292693641506494151627398"); + t("814961905557552563470129541149079289091825980552038805016483365648657349441034653895080110874628370232405397936936", 268, RoundingMode.ROUND_CEIL, "262.9832338734002793437364237838495436568180845963926100770087835727369060330327236238043722259726419108594905035689520544333182519069248318760321487906846590467529597959917518797226874631894301129093725674814331521669996782807255266246655805743483942945631935676169582"); + t("-0.32639104", 78, RoundingMode.ROUND_HALF_UP, "-0.320857287685475179389840903028942786031992014119504570263533950699614179777352"); + t("-4733614216514959999999999.882750044944404", 216, RoundingMode.ROUND_HALF_DOWN, "-57.5098784281127539694144540530005510217973742302219118079320143628311987376107049477018692899508659036299650873407732889889644478420440762765715355186424424025102078842264772810975578098902724434118791629617387011316"); + t("-521810678387646320094997949485609177867398897", 91, RoundingMode.ROUND_HALF_EVEN, "-103.6590259233252244845215259677285393662715637623940869720647543453777943914266090707365996"); + t("-176068106153573537648960087293673074447066281488807554302899817721458479099211401994367798658479515403450978805482", 169, RoundingMode.ROUND_UP, "-261.4509633898665004098402439412561080509849756812155000979728032095016243740943833651723400861788198518331627194205630222037087285685338136098540100972800868290755913227"); + t("-883397530298246463163.6148901206065", 79, RoundingMode.ROUND_DOWN, "-48.9234541579335027558995626198702265531027901212034120092370730079093956704086"); + t("-0.996011876938", 195, RoundingMode.ROUND_UP, "-0.878550744636600132615542217797337468469618649502152234610243642935718070272127672802623512549745765617025758412988010240197150471947957355199174879307722469783812772165367013813653722389231974271"); + t("7836693.79483469920618978424902568561107524487716552822449129", 250, RoundingMode.ROUND_DOWN, "16.56747477409942471651053049225740237031982424838687186583863534355023035083831623273619071751406144732890267624910140974434166094003775923680864757014368401953016609774228483654918517425450695381604690065989622715230809213607399478828689077311951006"); + t("0.00008767118271519603717759915815462262774588227790971264967", 143, RoundingMode.ROUND_CEIL, "0.000087671182602885800035985902674565686631919543992705073309862366360670389383312610171006800550581543266983729912620340895695477897260807781972252"); + t("9000000001961705", 110, RoundingMode.ROUND_DOWN, "37.429148153024817174676061782812732450729036696026757547695546850880181891356682642891964323326853001568683687"); + t("-0.0000000045557386189", 73, RoundingMode.ROUND_FLOOR, "-0.000000004555738618899999984241127336556766918803706585749350616009203816498283354"); + t("8673333373333333333332333333333333333333333333333533333333333333333333333333333333333333333333333.33333833333331333333333333333333333333333333833333", 167, RoundingMode.ROUND_UP, "223.90156929701641753765515150083888330773981243505657291331851139325455835677040908671624844659320848472879832088237332568810385601221605612097030864371699127692158697"); + t("-0.0074475419672", 301, RoundingMode.ROUND_DOWN, "-0.007447473121505162749337777080969043059444908913514917120173516261672038345367713092836531642144449525429270689476695688056280465533042976875399973385381145307942414005391325702324330606541315557153888371187220266715805283117737184115504794162563975896942279819882913127372992505630384135865948439859828"); + t("-587096673913278577214761886671704933032238079622528286469383793086081256893665373617983041336761273037819370005199185525466572588183703961911263704599366030", 273, RoundingMode.ROUND_DOWN, "-359.363855906421607876450526810223622257573365509892792620708003233739011396486007420275966704734363056267687756814480935737501044480223137740249341962993540344524462768081527426191524503147759045164027942565051604810615737534531938134320893412996191856949712473017199719255"); + t("-0.000036976991", 217, RoundingMode.ROUND_HALF_EVEN, "-0.0000369769909915735732068876955049555094360071331998805582552715494093096313664735964933771499597649369432568517171744061156622248542416530359914576845621298412798404047478007293476695852311147742663157366924340640127748"); + t("-0.7", 290, RoundingMode.ROUND_FLOOR, "-0.65266656608235578680868634410967589744239743329899284157982384870313400709464654984982670006573625009918171130305380501583654479394602214393534615675444148684203026219767694376354648888744493980333482866201769902859418639785242215409964359850430814010566407249387623327684827176136644699516"); + t("342771968804819414347810888019919663699724439162", 177, RoundingMode.ROUND_DOWN, "110.146541777391015435564195064490026932809168220092035310716490016835423462037739717757709554986916698760829593281741925396903711349563063277303620562289478003741163931129659069"); + t("245241016376598569391360379521600514696987392474410680.000834841585153567575774245555555555555555555", 124, RoundingMode.ROUND_UP, "123.6272283905582506795520330930885868907166353431975765846099511459584380303375777737689977740205792600512189144519131458425"); + t("62981776861555452059302857351047884976943320445698393339891238384198574.22222222222222220796111", 2, RoundingMode.ROUND_UP, "170"); + t("1536", 248, RoundingMode.ROUND_HALF_UP, "8.0300842002313588771048329404725762929075844812473171731134972032869035312181281307057743856239737060000818262658532339922097216723177666270054831821861781604469528019656126348544370146277023273759551233330411200458237149208727802261406463140158061"); + t("-149684244349335133517957295632225931528799", 239, RoundingMode.ROUND_FLOOR, "-95.502493845046898658643729396579070041640835068566382151895561588512257226954184679411737397459883444457552404400085109491755144398970831357561684856796410277340912056776451315662481546394091101551021677976754634783937264570680873805917871"); + t("-854371128103737819719753180910959073", 244, RoundingMode.ROUND_DOWN, "-83.42882092498500485358735274076121758694725031573778439077360308176038200817366560299722401652042493615066878779391357531333500856483883161171337033400731326340804577156176250443355540222832007621495001819851232459132656294958203285681708432357"); + t("-5999999999999999999999999999999999.999999999999999999999999997", 36, RoundingMode.ROUND_FLOOR, "-78.4702147185915078828234274844228977"); + t("-0.004185831812812535702598112516", 106, RoundingMode.ROUND_HALF_DOWN, "-0.004185819589451247170903561228358516264324899154391698177314287883010774095478749780377236480685500444928476"); + t("64.44438693333", 287, RoundingMode.ROUND_HALF_UP, "4.8590100052177285758907261031589393416879794016650960357937913637529070723601559564363465143060347840943657934283808903291586916590345942711464980180783178905711600351054358749613569286637249388718383282811066109051669980200647647827438227222373361770256862938868548043933035191700716654"); + t("14341911111111.1111141111111111111111111111111111911111111111113111117111111111311111", 307, RoundingMode.ROUND_HALF_UP, "30.98735439412679130836064651697964051517910152108971512567200735766376908980673544414761976456394928019900900532255325725990463319585341974954997771240486711438522642606653372648103422492732448699008422788040604400662145312361057037495866181765332245520993028563373180897213935266943410039132761237601828326"); + t("190123.47209722813689922774279726", 193, RoundingMode.ROUND_UP, "12.84857617378967184328321751458296077140207738560999750003527601733047642613320084542791948364417526716510836170741155096698892367867953490622550160866142885137461258314457464700762971077110908"); + t("88888888888888840525198859784.000000000263479642182222222222222", 123, RoundingMode.ROUND_CEIL, "67.3503318417308861473086773704040688656547613172386817915607205778376024700555591306381501954817897649681691194922061014674"); + t("-28981777778551.876", 1, RoundingMode.ROUND_UP, "-40"); + t("-0.043739012588093378030833", 133, RoundingMode.ROUND_HALF_EVEN, "-0.04372507838758140809637021536370772275725699797374126351952434623012655585811176418691565523064162192790331638916882619394783154677828"); + t("-409", 175, RoundingMode.ROUND_FLOOR, "-6.706863831090701859453137947230734815080761616710014058111165753646596512479924214413313619284612105919133107627519681902766269583968579720097414870533202032021814465971101681"); + t("-0.9891226046841011261868968593535309532667684798283099702069687089727", 22, RoundingMode.ROUND_FLOOR, "-0.8736611534515226823802"); + t("-0.000000911765986620687020562878995", 223, RoundingMode.ROUND_CEIL, "-0.0000009117659866205606927695216684219643617472652600473008723366482441520633144919266190564568963497915408495015902331721970850088013331886751573607041140838050036413600684301021172954089502111632422701086973460482026996466494731"); + t("-97.8", 194, RoundingMode.ROUND_UP, "-5.2760978939709067580684493089587821851249372843198164068033198528522319552392145203880391972906676834047046376969421351890450875988671906251559870916172811028673216722368688931623476925084761244"); + t("-6190000000000008003000000.00480000000000009000000002", 172, RoundingMode.ROUND_FLOOR, "-57.77812449911354775293284042012349711293421192369560396391498863858880771283502510328673002448266074887751442458500527357889206886947168289925994187971492345506214344433697"); + t("-5861600000000000100500000000.0000005", 220, RoundingMode.ROUND_DOWN, "-64.63136729526279585522542265397297944181017680454658067565683909703973508354945456896736237260702807031947666848638627828277241900386875507266950483986106383441159313144288086646740265018188405254864405765813255248698568"); + t("-39.2989", 303, RoundingMode.ROUND_HALF_EVEN, "-4.36450554472122332043981995753559818994998798007832337307239873388932524249132575561932495667023015521699470558847060329148570539908652959568775517837187180590552180460926712765078012590067851369802479108575113203978765078436548117885243661914457087576805316641934411627216318421989086941697990511784905"); + t("-410368534040019638369306476636463357069109786083079748629637607090899447201434203373788633.80615381647725233948970177113156861154586159868284095531877", 38, RoundingMode.ROUND_DOWN, "-207.03510589051662703242045128321144552"); + t("9888888888897519310565672809251477015.6748077709684079", 79, RoundingMode.ROUND_CEIL, "85.87762232074238312886293519050185724024659202193159162316598253637269198398048"); + t("3666666666666661401067479739784440356747844444444444.7355278447571826883255555555", 11, RoundingMode.ROUND_FLOOR, "119.4242699"); + t("826016809496875624302542168956469295568405449340577352439773937778282182239446407683452788264466983897590179394", 275, RoundingMode.ROUND_HALF_DOWN, "256.08895234771126799397031978913159678751681193946418998512561682521062823220935286102680135972272781081133783537336798709992567678982746336534349952324378636549949739098547306400753170625231809452900545124327564869493854591064129390319200404932109032879657791130832870258128"); + t("-54177308493204840914008016264792763626952605979573224144335159167112.48090265652231", 75, RoundingMode.ROUND_HALF_UP, "-156.656025476461957919901279827881548769394846160431187360652561173070300476"); + t("-13740555338485.120393203", 151, RoundingMode.ROUND_HALF_EVEN, "-30.94452000011404214406530495529952695727807507918149627225480265909339331864560891419501564901277606816637742226388656890702707617225320704888487278509"); + t("0.559280001220135516585754729473973473342", 266, RoundingMode.ROUND_UP, "0.53359577428744099049509519460828967129542468151692400696904114219236314058689892598963206019765533790639989848541839909374199497909826033893129241646634736180068562810298449418624373224477197758844398005847460350002384752905141808660902174265955940698918991123973728"); + t("-45555555.555555555555573580964893774431030945436444", 191, RoundingMode.ROUND_HALF_EVEN, "-18.327590320886353639083850401302202774666781689203955477377548053854437470400139619726528106926587713684754942516608411574077518745827816214027784453089692608603214423178191326328196114917366"); + t("9175555525555515555555556555555555.555555555557555556585555555555555555", 262, RoundingMode.ROUND_DOWN, "78.89499818921561651740897163786349531769221814956696221652952675715675785766477028430289918510815080712595255422071786099327662266410991515407549653751695574156889763013062452418440523119866684161726894578509642988537487448657034917388650469450316939701544398666"); + t("-11941002968615", 34, RoundingMode.ROUND_HALF_UP, "-30.80414640164661078627119219878251"); + t("-36.50832282517", 210, RoundingMode.ROUND_HALF_EVEN, "-4.29087495193142843636822303373913099059600653765168895989865914449814687999895661588824769217731570020323471654000565326076121001652891589115116712381269451717588321048178509601201580255605776235706434824580498"); + t("341349647.50897231543", 310, RoundingMode.ROUND_UP, "20.34156504974983966983948093579526683333797763663904619520979114889073795744438491060173575081508536590183625119182661903089998742981979253956164486966972059465044550427351360426871288378755063442437183817918880582742417822360530180907821148535809913168764505229188721584703493432727746433464175744493770862309"); + t("4640639373213165458148700455715824137541893788869742", 159, RoundingMode.ROUND_CEIL, "119.659839075952562318552186501065521891555878167476927270734035996940749451656796786277770145039847332989633120236392472628301213531291660730470995919151451885"); + t("80442222222222222222222.4444444444444444444955", 187, RoundingMode.ROUND_FLOOR, "53.43497332379345112991312845842059297720565595464985217189227449623327264189079043945997138210879477388127591863996723206429627133143187817101533547763383975987031671030411788959217175894"); + t("-15912928284981", 248, RoundingMode.ROUND_DOWN, "-31.091300175012549937987107793885363185510633149218026499310447781561162704383804511948970997677739432635337705540715076885035761853067783824372707499396180119981254416018978376360248272761507656096440365635616189178107012649735831751050711881797027"); + t("0.38641121275460307139", 113, RoundingMode.ROUND_HALF_EVEN, "0.37738908650391965113802640316717026896337388717082546918074499416991758871938818148562932386947928510313021335149"); + t("-9136", 299, RoundingMode.ROUND_FLOOR, "-9.813125115450950542489605984951209828831404154858016397338182767089320461164917158653793532507597709388286698287148972251752194107691449557727143917334844563314099624616151122993105321185992063275291593649989410169012274888785338672166358076946669164846726822665394603348214835931699698123160785434"); + t("9732809738372989740894196437931285757440604501311448215582965903472074655943002394448231721358464072507989394307677295741475308967392823842", 16, RoundingMode.ROUND_DOWN, "320.7253926388946"); + t("-89.72637742915648", 278, RoundingMode.ROUND_HALF_UP, "-5.1899430204324376813141779102835591171153755276704720303295417901460358698252362816231164086477917324758308249007609101711601936565502357261982865388694789969850528746083971854450527070691192754363146972787166339659456306787196090899499610659699120852396732521450899909510080564"); + t("-0.004572387207550535454", 221, RoundingMode.ROUND_HALF_EVEN, "-0.0045723712754269387478232298904768324514943586141789109298423914700805981277461227348268469885464057951631279610792747730890370758866597976623661193656262583173652608166333187926413755696907686314377421802209508379615503941"); + t("0.95871480273797645053727498516444828785861879515452806977587873350228501393865768019767379368017279828416929613421286048438", 133, RoundingMode.ROUND_HALF_EVEN, "0.8518771945242413440547570358523415587421270280123939346094601954835811844069307550382981893386328983423022743136616787417480510459693"); + t("911111111111111111125925101.222222222289932532705", 128, RoundingMode.ROUND_HALF_DOWN, "62.769854268333166824394774221341203103179154778552883697644268439225115960746247447275002302514257339154806338495383472058914654"); + t("-5565075129689654565758874690523329428601844", 87, RoundingMode.ROUND_HALF_EVEN, "-99.118231571339711624309908103472538672972838194042518372882683678470819559348437944347"); + t("-0.410466589489881857290427810830880497969588075581955094955558342918", 63, RoundingMode.ROUND_HALF_EVEN, "-0.399735678511605605990292853900847750076706914338187113061369968"); + t("5069", 233, RoundingMode.ROUND_FLOOR, "9.224046028761904388038801916832154920678187054878336539709834830544063950463710812854932875225421738011217254576421890078626182218805161488992368480082786221248314104154917944744401471321274029306921657179801031225977117119441535232"); + t("-29700000000000000000.00000000000000000000080000000000000000000003", 13, RoundingMode.ROUND_UP, "-45.53082590027"); + t("-994570089346387", 98, RoundingMode.ROUND_DOWN, "-35.226478869268855919642614005677752024489146958376003624345211425217028314196357831288606394420323"); + t("617431237392792974291854906206139373623628105500387724781028716165061154110509", 183, RoundingMode.ROUND_UP, "179.812596860965995932543530596999663057196964045986470846270577891588611860172298363604973109411265830193898800929690794918211214801963586928409318213098227566460223150903604405488249"); + t("53288474000000000000000.000020008", 241, RoundingMode.ROUND_DOWN, "53.02315419356702384308042233799402773468968457777384669579081215571840965180156633970604219753453090166998217177199739752593461001712223545113254614832865494681595464081605192314689888530342461818371387662783620780841658894625489388344965485"); + t("836392260145629184104422243202322.9285362681614589346702", 115, RoundingMode.ROUND_HALF_EVEN, "76.49979768412161158298891425010240322626181183586869565201474733160581114752572614841084058222487562971382956598362"); + t("-1", 223, RoundingMode.ROUND_HALF_UP, "-0.8813735870195430252326093249797923090281603282616354107532956086533771842220260878337068919102560428567398161921064921887620725119765919375272554627657904092215786803628971962403073574096255489778715632623678065067630328954"); + t("-97977477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777.7777777774777973777777777775777777777777777777777777777707", 222, RoundingMode.ROUND_FLOOR, "-260.864830136563143973223926615266616316884219499669651280404061999466962581962008648497296777105072541316262658671050715852199329018658590524447176038537656320981637593685557444837995597025935597587676115436825965032449484"); + t("-0.38774378851311354524477913536085292075860074495544498404199438125818261354667133107093766916109030928761456491164139264546050587074742942185664026794469982901137304", 170, RoundingMode.ROUND_UP, "-0.37863181215935222749417899603832717734185396075877258079165735806580805299355922530455701828293391212757735936976142074213023047998393707969043533223142562719821486701841"); + t("-0.123871294340837", 85, RoundingMode.ROUND_HALF_DOWN, "-0.1235566796967979062227037990370818622273585373924803478878689609330298341867992459834"); + t("-917631636265844444444444444444", 165, RoundingMode.ROUND_HALF_DOWN, "-69.6847407338059834229662664802773422741342990104684086476956348265326681103447327466096741841837158439002488731089459565123519362045837835014264693367559401810290184"); + t("-600000000000641060816880907750024458679211652370008341936164985711499571210185136948593732570", 141, RoundingMode.ROUND_FLOOR, "-214.32273520524127167457972425294074484383737914960306368685179700068878717406762219179031126276037814293315562236857881378319381745436719593"); + t("-473777777777777777.77777777776777777777775777777777776777777777777777777777777777777777777777777777", 79, RoundingMode.ROUND_UP, "-41.39266196398009165506856064683473722948028628023091723608497818076419065442295"); + t("0.367584132061126286388737525893882434841466343715624388", 208, RoundingMode.ROUND_UP, "0.3597724814184861706049359708725760725399541010443335199241305688647390727566491192283162657887706662854178453519329469670281232835219283549341770601770547894561501575123887962030382362432488199052855830602293"); + t("6037100796962571258924699832689568751272221617262916067216004215794584675943137084916218636472165856463288661128782343215556711193857", 261, RoundingMode.ROUND_DOWN, "306.432303351980694848977983253649940218996349825631220729835761021975885994686714338212496662861062662706962569228153184405588439298476011315510867179785806286740170315018054235709751412251740663181584840738282640031487850690715669087386344102410670360911394334"); + t("-799072854855.6998357", 187, RoundingMode.ROUND_FLOOR, "-28.09986514166356486446509141273978847322739731205645403313801060966475988766633725821108841756817474182560889651851430003588575565760374644257916785538499433541772710725564312019300729079"); + t("-83763803916032247976144502.792038057889555024890662781469686439988483781996387646322", 230, RoundingMode.ROUND_FLOOR, "-60.383190392418416349986450539898524000648860951394888785789268070963781827371850877431131695188364444110872498724716306515182106086564038986536014772240975359635733706121983583289831506065994867777945876997920571192581029085586165"); + t("5654760937373023349587621058298731932947839344035237806162.994829032396065238078638368107483978955317019053", 174, RoundingMode.ROUND_HALF_UP, "133.672995315336775861848409548594398693660618503728578056397823870221974685339676150562925744537269140459055690761343327345294412774932950559506383057237389754641841452337626"); + t("778886888888888.8888888888888888888885", 176, RoundingMode.ROUND_FLOOR, "34.982034131417270839083982170531515191578046476117198615810954355978427651000605997812920427730253739047197944486588007402954684028936655152369643966594980320171662079693375001"); + t("-4658903.6047136700653389065961437064167004088317128656385908953270520065146", 258, RoundingMode.ROUND_FLOOR, "-16.0474378810211445811636218676694804072814928703286211454760269336406522054153601407650119428943661716748257870166445775098549642034388497122740118035920793589121981979571486810247442103686789429089496033407090397113805196829129369316621280769799642905537927"); + t("-5.889366707797816682979", 119, RoundingMode.ROUND_UP, "-2.4734267504615186139236835507536613478975287315713354043928387764860403844401404606722168525274827004502965925721991266"); + t("-177777777777747.777777777", 249, RoundingMode.ROUND_CEIL, "-33.5047026273799779905475461097965592430080600099860133763005437967958985111151092673048331156322190316039868143507705270230205575146857978793009699303451996264117366478435682743541635628327135751123512604902805226015850469479152515587628479429381486"); + t("-589150125", 68, RoundingMode.ROUND_HALF_UP, "-20.887338770853622157671242204248278168980063227907971594762911773195"); + t("0.80159795233483842439088085288", 63, RoundingMode.ROUND_FLOOR, "0.733915560918445907972859752758676655770208110230760479346569608"); + t("6777777777777777777581271572263367953", 297, RoundingMode.ROUND_UP, "85.4998598151826817999968304008294630439321553750342015261864174192801715102016760127222611574594908073903614530214547049814777161759090811130844181421209944297178878223547731349260819395072423265724046638463225224887008559756058356905537071662032808955147303927590896573844095412143673341489193033"); + t("0.003272574243467178120416207385598776479187657917333909800981439006", 298, RoundingMode.ROUND_HALF_UP, "0.003272568402090928380904115734582429540835230923332922187857095806652485022535906475312315390036730215045979010944991322023409604669621200865456994673259210246635371222116622115839352400661939933430907121112171374951784773625160565450653907952763153728183795213597348218353677211240765388753206528706"); + t("-1020000.00000000006", 180, RoundingMode.ROUND_UP, "-14.5284603658206394775700487379229466303600400730481962084815458669167756227284239360693820206407145217284285692706167810930926779000562268601186873897838577258914285074192452041418"); + t("-8361740752.29766", 83, RoundingMode.ROUND_HALF_EVEN, "-23.540079646886417265659203048654750497134716787194692554953276029744532444497829082"); + t("9060069461052273792697377", 120, RoundingMode.ROUND_DOWN, "58.1590661992253517351950504904893311733922032761959431247726509829116112135114691041302210873291758353978006895161873015"); + t("-0.10034", 188, RoundingMode.ROUND_HALF_DOWN, "-0.10017238584324626469537318977467444532904094945904700806484562185808963016200306165428227805195203657720577223503160370238744463179264729619340626580259101545328650679975680053481983499459"); + t("959363.783043541639323072180147603753657", 86, RoundingMode.ROUND_FLOOR, "14.46717279830797941955692793012557501799148538229744443631547327264748755583447284086"); + t("-0.00014646860007896", 75, RoundingMode.ROUND_DOWN, "-0.000146468599555260285150687195543516588439055126517399139386767315063352429473"); + */ + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalAtan2Tests.cs b/DecimalSharp.Tests/BigDecimalAtan2Tests.cs new file mode 100644 index 0000000..6e43c4c --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalAtan2Tests.cs @@ -0,0 +1,1076 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalAtan2")] + public class BigDecimalAtan2Tests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Atan2() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument y, BigDecimalArgument x, long pr, RoundingMode rm, string expected) => + { + var bigDecimalFactoryClone = bigDecimalFactory.Clone(); + bigDecimalFactoryClone.Config.Precision = pr; + bigDecimalFactoryClone.Config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, bigDecimalFactoryClone.Atan2(y, x).ValueOf()); + }; + + t("NaN", "1", 20, RoundingMode.ROUND_HALF_UP, "NaN"); + t("NaN", "Infinity", 20, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", "NaN", 20, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-Infinity", "NaN", 20, RoundingMode.ROUND_HALF_UP, "NaN"); + t("NaN", "NaN", 20, RoundingMode.ROUND_HALF_UP, "NaN"); + t("1", "0", 20, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192"); + t("1", "-0", 20, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192"); + t("0", "1", 20, RoundingMode.ROUND_HALF_UP, "0"); + t("0", "0", 20, RoundingMode.ROUND_HALF_UP, "0"); + t("0", "-0", 20, RoundingMode.ROUND_HALF_UP, "3.1415926535897932385"); + t("0", "-1", 20, RoundingMode.ROUND_HALF_UP, "3.1415926535897932385"); + t("-0", "1", 20, RoundingMode.ROUND_HALF_UP, "-0"); + t("-0", "0", 20, RoundingMode.ROUND_HALF_UP, "-0"); + t("-0", "-0", 20, RoundingMode.ROUND_HALF_UP, "-3.1415926535897932385"); + t("-0", "-1", 20, RoundingMode.ROUND_HALF_UP, "-3.1415926535897932385"); + t("-1", "0", 20, RoundingMode.ROUND_HALF_UP, "-1.5707963267948966192"); + t("-1", "-0", 20, RoundingMode.ROUND_HALF_UP, "-1.5707963267948966192"); + t("1", "Infinity", 20, RoundingMode.ROUND_HALF_UP, "0"); + t("1", "-Infinity", 20, RoundingMode.ROUND_HALF_UP, "3.1415926535897932385"); + t("-1", "Infinity", 20, RoundingMode.ROUND_HALF_UP, "-0"); + t("-1", "-Infinity", 20, RoundingMode.ROUND_HALF_UP, "-3.1415926535897932385"); + t("Infinity", "1", 20, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192"); + t("Infinity", "-1", 20, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192"); + t("-Infinity", "1", 20, RoundingMode.ROUND_HALF_UP, "-1.5707963267948966192"); + t("-Infinity", "-1", 20, RoundingMode.ROUND_HALF_UP, "-1.5707963267948966192"); + t("Infinity", "Infinity", 20, RoundingMode.ROUND_HALF_UP, "0.78539816339744830962"); + t("Infinity", "-Infinity", 20, RoundingMode.ROUND_HALF_UP, "2.3561944901923449288"); + t("-Infinity", "Infinity", 20, RoundingMode.ROUND_HALF_UP, "-0.78539816339744830962"); + t("-Infinity", "-Infinity", 20, RoundingMode.ROUND_HALF_UP, "-2.3561944901923449288"); + + // Fails (1 ulp) + //t("5900", "7999999999999999999999999999999999999999199999999999999999999.99999", 4, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000000000000000000000000000000007375"); + //t("5999999.9999999999999999999999999999999999999999999998", "599999999999999999999999989999999999999999999999999999999999999999999999999999999999999999999999999999999999999999959999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9999999999999999999999999999999999999999999", 2, RoundingMode.ROUND_CEIL, "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011"); + + t("17", "14", 4, RoundingMode.ROUND_CEIL, "0.8819"); + t("0.9481218", "0.94118", 6, RoundingMode.ROUND_HALF_EVEN, "0.789072"); + t("-7445", "20099977666211456789846696402535482054490525592", 5, RoundingMode.ROUND_FLOOR, "-0.0000000000000000000000000000000000000000003704"); + t("35739959929999990.99999999995999999999999999999999992959", "0.955", 8, RoundingMode.ROUND_HALF_EVEN, "1.5707963"); + t("1.1", "6524806825029162376.20457337656513698810928", 5, RoundingMode.ROUND_DOWN, "0.00000000000000000016858"); + t("5211111.101111111177", "606497413079598703117552754486732", 6, RoundingMode.ROUND_DOWN, "0.00000000000000000000000000859214"); + t("-2913.07599", "986666666666666.8888888888873058007", 6, RoundingMode.ROUND_HALF_EVEN, "-0.00000000000295244"); + t("2.66213924447211273", "0.344623945616634", 3, RoundingMode.ROUND_UP, "1.45"); + t("312631627154243240137182349906197", "9999999555555555.88888888889999999999", 10, RoundingMode.ROUND_DOWN, "1.570796326"); + t("899.99", "26.9", 3, RoundingMode.ROUND_HALF_UP, "1.54"); + t("-2", "-0.0000006306201002089224863559916332763966685755123769189", 3, RoundingMode.ROUND_HALF_DOWN, "-1.57"); + t("0.21", "8", 4, RoundingMode.ROUND_CEIL, "0.02625"); + t("0.9481218", "0.94118", 6, RoundingMode.ROUND_HALF_EVEN, "0.789072"); + t("2", "9333333333333333397407226578881017498733601111111111111", 9, RoundingMode.ROUND_DOWN, "0.000000000000000000000000000000000000000000000000000000214285714"); + t("95726", "-2693596537831566265", 9, RoundingMode.ROUND_FLOOR, "3.14159265"); + t("3", "136424614399.47534873339", 6, RoundingMode.ROUND_CEIL, "0.0000000000219902"); + t("724388888888888888888", "452240666.2222266666", 3, RoundingMode.ROUND_UP, "1.58"); + t("0.04129", "4.7459", 6, RoundingMode.ROUND_FLOOR, "0.00869992"); + t("-0.000000003593", "831", 9, RoundingMode.ROUND_FLOOR, "-0.00000000000432370638"); + t("3", "652", 1, RoundingMode.ROUND_FLOOR, "0.004"); + t("53", "0.00021", 5, RoundingMode.ROUND_CEIL, "1.5708"); + t("583", "0.5", 2, RoundingMode.ROUND_FLOOR, "1.5"); + t("0.88956212348302", "-3613.47", 4, RoundingMode.ROUND_DOWN, "3.141"); + t("499999999999999999999999999999999999999999899999999999999999999999999999999999999999999999999999.99999", "0.397", 2, RoundingMode.ROUND_CEIL, "1.6"); + t("670.7246136257055836748897015621", "8", 9, RoundingMode.ROUND_DOWN, "1.55886949"); + t("40000", "6809492801384871383672604464351", 5, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000000000000058742"); + t("6000000002222222.00014266", "-0.450903", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("3", "4", 10, RoundingMode.ROUND_FLOOR, "0.6435011087"); + t("2666641666666666", "59999999999999999999999999999999999999999.99999999999999999999999999925", 1, RoundingMode.ROUND_HALF_EVEN, "0.00000000000000000000000004"); + t("5", "0.65", 7, RoundingMode.ROUND_HALF_EVEN, "1.441521"); + t("43.65", "8568924402932018888.66666666666666666666135181", 9, RoundingMode.ROUND_UP, "0.00000000000000000509398823"); + t("4891999999999999999999999999999999999999999999999999991999999799999.999999999639999999992999", "710000000000000000.0000000000005700000000000060000000000033", 10, RoundingMode.ROUND_UP, "1.570796327"); + t("4.73001", "455555555555559399859117776418166", 8, RoundingMode.ROUND_UP, "0.000000000000000000000000000000010382949"); + t("40068.2342", "1", 2, RoundingMode.ROUND_CEIL, "1.6"); + t("0.6", "511111111112433397604060000000000000000000", 1, RoundingMode.ROUND_HALF_UP, "0.000000000000000000000000000000000000000001"); + t("530000000000000.286", "7", 7, RoundingMode.ROUND_DOWN, "1.570796"); + t("9251010716.51554394500003489103488443", "727127846893147834657170633071486391409", 2, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000000013"); + t("2156", "6", 5, RoundingMode.ROUND_UP, "1.5681"); + t("-0.007700837496370833875888297147521851009315187908640623592495789607215971", "-0.60609673305145265303411222292406724609400618553386938", 8, RoundingMode.ROUND_HALF_UP, "-3.1288877"); + t("0.631666343041280486605909338251618534368378514270566344350649949184", "0.1", 9, RoundingMode.ROUND_UP, "1.41378793"); + t("0.81895579436335688497005428053140270015707", "34.88388", 10, RoundingMode.ROUND_HALF_UP, "0.02347231408"); + t("7819", "8111111111111114050153374108607899100080038117344269814600726014856", 6, RoundingMode.ROUND_CEIL, "0.000000000000000000000000000000000000000000000000000000000000000963987"); + t("78230794955", "-6", 10, RoundingMode.ROUND_CEIL, "1.570796327"); + t("444444444444444444444", "0.7", 8, RoundingMode.ROUND_FLOOR, "1.5707963"); + t("0.9793", "0.7", 1, RoundingMode.ROUND_DOWN, "0.9"); + t("5244107.0628867", "2999954.9965", 7, RoundingMode.ROUND_FLOOR, "1.051172"); + t("8000000", "366666666666666666666666666666466666666666666666666666666.6666666666666666666666666", 5, RoundingMode.ROUND_HALF_UP, "0.000000000000000000000000000000000000000000000000021818"); + t("0.2", "0.189468318714349130097801836058861527404712938072131132348336428", 6, RoundingMode.ROUND_DOWN, "0.812432"); + t("0.2858318234746344", "600000000000000000000000000000000000000000", 7, RoundingMode.ROUND_UP, "0.0000000000000000000000000000000000000000004763864"); + t("4339137560184", "97970869.448873424003041514353519", 4, RoundingMode.ROUND_HALF_UP, "1.571"); + t("-0.23311", "0.311511919081010226751458633564788098826129188077", 2, RoundingMode.ROUND_HALF_EVEN, "-0.64"); + t("51748034844738", "1.9", 4, RoundingMode.ROUND_FLOOR, "1.57"); + t("489991.33896294143521760395611846731", "0.87", 9, RoundingMode.ROUND_CEIL, "1.57079456"); + t("9708256886359351", "68007500000000000300000000.8000007", 7, RoundingMode.ROUND_FLOOR, "0.0000000001427527"); + t("-0.7243703154875085348", "-3", 8, RoundingMode.ROUND_FLOOR, "-2.9046707"); + t("45000000000000", "65555233", 10, RoundingMode.ROUND_CEIL, "1.570794871"); + t("611492726146771524971502", "6", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("453102.0374285112290126", "144444444448560013578500490755362539053948899999999999999999", 8, RoundingMode.ROUND_CEIL, "0.0000000000000000000000000000000000000000000000000000031368603"); + t("-93.61", "-0.0000399443101158077208687249496264941993597813459", 7, RoundingMode.ROUND_CEIL, "-1.570796"); + t("2", "9581689854499862551.065722086916773096996491758707340479", 7, RoundingMode.ROUND_HALF_UP, "0.0000000000000000002087314"); + t("1.3", "5.5", 6, RoundingMode.ROUND_CEIL, "0.232104"); + t("-600000000", "-3.7", 64, RoundingMode.ROUND_HALF_DOWN, "-1.570796332961563285897988280138208232222043273348998383738452657"); + t("11058591315337683586049031068.0579551185", "0.388959837250046012554110591319702948213801", 61, RoundingMode.ROUND_UP, "1.570796326794896619231321691604578803363795829358878500062293"); + t("0.8448786268946126278", "0.13526", 50, RoundingMode.ROUND_HALF_UP, "1.4120494110103741256697724128137501343789286117212"); + t("30287996", "40950.1689588762720486401957594518884943112430153961670406237501355555", 23, RoundingMode.ROUND_UP, "1.5694443012595347494123"); + t("49990999999999999999299995399.9999999", "18373333333333333333333333333333333313333.31333333333333", 24, RoundingMode.ROUND_UP, "0.00000000000272084542815674891142779"); + t("81050298736775188105704407264452322940639721302743656726962427972686398373147738700", "5758", 57, RoundingMode.ROUND_HALF_EVEN, "1.57079632679489661923132169163975144209858469968755291049"); + t("88986", "933333549093318029464784161", 25, RoundingMode.ROUND_HALF_UP, "0.00000000000000000000009534212081677014822531107"); + t("0.000000096379436364822449512580758185420939", "0.6", 8, RoundingMode.ROUND_DOWN, "0.00000016063239"); + t("0.0000005078632254302310932666825377", "-406.26", 54, RoundingMode.ROUND_DOWN, "3.14159265233969914741200809306601738606958485281812206"); + t("4.7407009601", "629989999.9099919", 27, RoundingMode.ROUND_HALF_EVEN, "0.00000000752504160506883380341035311"); + + /* + t("-0.000002545", "-3534", 7, RoundingMode.ROUND_HALF_EVEN, "-3.141593"); + t("5929999999992999999959999999999999999999920999997999999999699999999999.9999999999999", "444444444444444760418728944267284577777777", 5, RoundingMode.ROUND_HALF_EVEN, "1.5708"); + t("5333333333303333333333383333.3333333133333333", "0.3465953", 5, RoundingMode.ROUND_UP, "1.5708"); + t("0.000000008978481", "316822982251", 1, RoundingMode.ROUND_FLOOR, "0.00000000000000000002"); + t("-78785.25", "7", 9, RoundingMode.ROUND_HALF_UP, "-1.57070748"); + t("0.004887580293809264895474440608824721935", "0.1873", 7, RoundingMode.ROUND_HALF_UP, "0.02608901"); + t("0.55", "0.57375630544689", 3, RoundingMode.ROUND_HALF_EVEN, "0.764"); + t("12646367777777777777777777", "2246.78", 4, RoundingMode.ROUND_CEIL, "1.571"); + t("-2943115615404317859938.049791758272196826255702811809", "0.0004433", 1, RoundingMode.ROUND_UP, "-2"); + t("64740606639566801281770583511193610040782451981567", "566", 1, RoundingMode.ROUND_FLOOR, "1"); + t("1", "6093666666666665555555.66", 7, RoundingMode.ROUND_CEIL, "0.0000000000000000000001641049"); + t("71555555555555555555555555555555555555555555555555555555555555555555555555555555555555.555555", "0.00001", 2, RoundingMode.ROUND_UP, "1.6"); + t("0.973", "6", 2, RoundingMode.ROUND_FLOOR, "0.16"); + t("90.2", "43976", 1, RoundingMode.ROUND_HALF_EVEN, "0.002"); + t("0.000000631126386", "0.38113", 7, RoundingMode.ROUND_CEIL, "0.000001655935"); + t("2922.45", "257.6751582391223540845", 10, RoundingMode.ROUND_FLOOR, "1.482852812"); + t("-86905.9603", "-5911244336", 2, RoundingMode.ROUND_CEIL, "-3.1"); + t("32471.88195727", "1432987587153153052054186", 6, RoundingMode.ROUND_UP, "0.0000000000000000000226603"); + t("0.27", "89997989.94", 10, RoundingMode.ROUND_FLOOR, "0.000000003000067003"); + t("1907777.7777777777777877777", "70100200.07", 3, RoundingMode.ROUND_DOWN, "0.0272"); + t("-0.964", "0.905645353407738587546986", 5, RoundingMode.ROUND_CEIL, "-0.81659"); + t("371.3", "4999999999999999624815671461", 3, RoundingMode.ROUND_UP, "0.0000000000000000000000000743"); + t("406.72", "0.238", 8, RoundingMode.ROUND_CEIL, "1.5702112"); + t("0.5", "0.66", 10, RoundingMode.ROUND_HALF_EVEN, "0.6483319891"); + t("-40866.9873", "1", 3, RoundingMode.ROUND_HALF_UP, "-1.57"); + t("623362071568016913046606928078611383678055391537058846703690739", "745333333333333.555555555555555552", 10, RoundingMode.ROUND_HALF_DOWN, "1.570796327"); + t("26916.39", "265", 4, RoundingMode.ROUND_UP, "1.561"); + t("3.83743578493953981940491694913675522976137", "2", 9, RoundingMode.ROUND_HALF_UP, "1.09034757"); + t("-5699519999999999999999999999999.999999599999999928", "0.0000538", 2, RoundingMode.ROUND_UP, "-1.6"); + t("0.1", "28.999799", 1, RoundingMode.ROUND_DOWN, "0.003"); + t("5577.77777", "1", 7, RoundingMode.ROUND_UP, "1.570618"); + t("6", "6999.0999", 4, RoundingMode.ROUND_FLOOR, "0.0008572"); + t("0.6", "-90000600", 1, RoundingMode.ROUND_CEIL, "4"); + t("754", "13777777777777772.77776", 10, RoundingMode.ROUND_HALF_UP, "0.00000000000005472580645"); + t("69", "5121548", 8, RoundingMode.ROUND_UP, "0.00001347249"); + t("1950999199959.99399999999999999999399999999999", "0.92618935666823328351405992089144837463098275645924421417501510733796", 2, RoundingMode.ROUND_CEIL, "1.6"); + t("383", "-4.17494445268", 2, RoundingMode.ROUND_DOWN, "1.5"); + t("918.8", "93333.8", 9, RoundingMode.ROUND_HALF_DOWN, "0.00984391851"); + t("118701.9438478744872242615462", "235", 8, RoundingMode.ROUND_HALF_UP, "1.5688166"); + t("0.3576218", "4892824558.517026874600751288585883153854", 6, RoundingMode.ROUND_HALF_UP, "0.0000000000730911"); + t("23", "-375797776666666666666.7777", 1, RoundingMode.ROUND_HALF_DOWN, "3"); + t("186059", "0.7340864854556", 5, RoundingMode.ROUND_HALF_UP, "1.5708"); + t("94655555.3", "36666666666666975777777777", 9, RoundingMode.ROUND_HALF_UP, "0.00000000000000000258151514"); + t("8649681078992028.94727211017835", "0.000006313646149661290333890483752452969088891970122483805217149927406228481", 9, RoundingMode.ROUND_CEIL, "1.57079633"); + t("-279410899528570351.9440369173572", "-555.868", 10, RoundingMode.ROUND_HALF_EVEN, "-1.570796327"); + t("682739271.77", "5677.1", 8, RoundingMode.ROUND_HALF_DOWN, "1.570788"); + t("20566548680871338889598852644501", "10186", 5, RoundingMode.ROUND_UP, "1.5708"); + t("15555555555555555555.9", "40000000", 8, RoundingMode.ROUND_FLOOR, "1.5707963"); + t("-74", "7", 5, RoundingMode.ROUND_HALF_DOWN, "-1.4765"); + t("0.301635", "0.791608834565179391387", 4, RoundingMode.ROUND_UP, "0.3641"); + t("67777777777777777.0000000000000000006", "20.2", 7, RoundingMode.ROUND_CEIL, "1.570797"); + t("9040880016579317006295805025742298.6445910580737058384625530549604966806101801215", "0.00584715622263981921987653029446300193112208847086", 10, RoundingMode.ROUND_HALF_UP, "1.570796327"); + t("246934808644179708788.42663936773216678328641960788407829509949179074", "5", 8, RoundingMode.ROUND_FLOOR, "1.5707963"); + t("32", "0.73", 2, RoundingMode.ROUND_FLOOR, "1.5"); + t("64.44444444", "72184221110447.94805585513118138243631861047402", 3, RoundingMode.ROUND_CEIL, "0.000000000000893"); + t("-130000000000040000000000000000000000000000000000.0000000000000008", "0.517784", 8, RoundingMode.ROUND_HALF_EVEN, "-1.5707963"); + t("9.9999999999999999999999999999999999", "0.000000480124602285204346788609011963454", 5, RoundingMode.ROUND_HALF_UP, "1.5708"); + t("29989.9373492297462786", "758.93", 3, RoundingMode.ROUND_FLOOR, "1.54"); + t("0.03236261788964124047", "124942493331587780350.3794806144769089376598265126008", 4, RoundingMode.ROUND_UP, "0.0000000000000000000002591"); + t("52", "95.8", 2, RoundingMode.ROUND_FLOOR, "0.49"); + t("16", "65555555555166000000000011111111111111.777777777777777", 6, RoundingMode.ROUND_UP, "0.000000000000000000000000000000000000244068"); + t("0.2", "1670477777.7777777777777", 7, RoundingMode.ROUND_HALF_UP, "0.0000000001197262"); + t("0.66484415975", "82382", 4, RoundingMode.ROUND_DOWN, "0.00000807"); + t("-3.4", "-9", 8, RoundingMode.ROUND_HALF_UP, "-2.7803889"); + t("22332987678680772902.31087653648", "7.33130628", 4, RoundingMode.ROUND_DOWN, "1.57"); + t("0.0000071643281123487", "3", 3, RoundingMode.ROUND_FLOOR, "0.00000238"); + t("93895689204457.0539998", "776253000", 1, RoundingMode.ROUND_UP, "2"); + t("8517", "-0.3", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("0.099637519783681417", "670.21", 6, RoundingMode.ROUND_CEIL, "0.000148667"); + t("499999995947404786666666666666", "84.31", 2, RoundingMode.ROUND_FLOOR, "1.5"); + t("3", "8", 5, RoundingMode.ROUND_CEIL, "0.35878"); + t("-477777777777772445451595455836588744152596356357238642145433673451615822", "-483183433563659474785331378153316", 10, RoundingMode.ROUND_FLOOR, "-1.570796327"); + t("0.19999", "585193481", 4, RoundingMode.ROUND_CEIL, "0.0000000003418"); + t("4369999999999999993999999999799999999.9999979997999999996999998999999", "90.4095719", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("0.04", "4", 9, RoundingMode.ROUND_HALF_EVEN, "0.00999966669"); + t("50.5", "488888888888888888882039220519322675000432635505974074206789548291343345556942584447950910654533333333333", 7, RoundingMode.ROUND_UP, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001032955"); + t("0.00004", "43.399", 4, RoundingMode.ROUND_HALF_EVEN, "0.0000009217"); + t("-4813417065996546", "0.0079947993756976", 4, RoundingMode.ROUND_HALF_DOWN, "-1.571"); + t("0.008", "14099", 8, RoundingMode.ROUND_UP, "0.00000056741613"); + t("572639", "6612174063649442377157402723363504373698298258635538987387646725023759891920828716", 6, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000866037"); + t("888233366.13333333", "0.00000028272587032424", 9, RoundingMode.ROUND_HALF_DOWN, "1.57079633"); + t("172888888888.089951", "0.6842509", 6, RoundingMode.ROUND_FLOOR, "1.57079"); + t("1199999999999999999999999999969.999997999999999949995999999999999999999959999999969999999969979999", "3288721448.1752210990986472870508893186356787180739", 10, RoundingMode.ROUND_DOWN, "1.570796326"); + t("20", "606816230247518.0089", 3, RoundingMode.ROUND_UP, "0.000000000000033"); + t("0.000006981961", "1828222222212222222222222222222222222.222222222222222222222222245", 10, RoundingMode.ROUND_HALF_DOWN, "0.000000000000000000000000000000000000000003818989243"); + t("100000000000000000", "-4792", 10, RoundingMode.ROUND_HALF_UP, "1.570796327"); + t("300000000", "569.411111111111", 5, RoundingMode.ROUND_DOWN, "1.5707"); + t("4999999999999999999999999999999999999999999999999999999999.99999999999999999999999999999999999", "36663333333.111111111112084", 7, RoundingMode.ROUND_DOWN, "1.570796"); + t("77510496.85715", "0.0008544", 5, RoundingMode.ROUND_UP, "1.5708"); + t("-3989999.6989", "0.6369", 6, RoundingMode.ROUND_UP, "-1.5708"); + t("5826666666666666666.0000000000000000009433333333333333333333", "5097646440115351480575841.048024879", 1, RoundingMode.ROUND_DOWN, "0.000001"); + t("5633302780808", "7", 2, RoundingMode.ROUND_HALF_DOWN, "1.6"); + t("3000992770523914099894184572205493347910335630423478817352191762995", "66235616160.03832920993618", 2, RoundingMode.ROUND_UP, "1.6"); + t("-431066666666", "-406535", 8, RoundingMode.ROUND_HALF_EVEN, "-1.5707973"); + t("0.47", "0.43088680413857867", 3, RoundingMode.ROUND_FLOOR, "0.828"); + t("0.60587519", "0.1", 4, RoundingMode.ROUND_CEIL, "1.408"); + t("7555555555593079498821189757", "0.8676178", 4, RoundingMode.ROUND_HALF_EVEN, "1.571"); + t("610", "8111111111111.111", 5, RoundingMode.ROUND_CEIL, "0.000000000075206"); + t("26.8452", "0.854658180949848472879307027464450981452484044182961", 9, RoundingMode.ROUND_CEIL, "1.53897055"); + t("-1950", "-5991999999999999999899999999999.9999999999", 13, RoundingMode.ROUND_CEIL, "-3.141592653589"); + t("5", "76", 9, RoundingMode.ROUND_CEIL, "0.0656948016"); + t("0.227612965", "76.736", 13, RoundingMode.ROUND_FLOOR, "0.002966173601341"); + t("0.4", "85043083.1310123888585468128", 8, RoundingMode.ROUND_UP, "0.0000000047034984"); + t("8", "-0.000005", 11, RoundingMode.ROUND_FLOOR, "1.5707969517"); + t("9222.287", "5555137855.5", 14, RoundingMode.ROUND_DOWN, "0.0000016601364790363"); + t("0.2", "0.5708472", 9, RoundingMode.ROUND_HALF_UP, "0.336992337"); + t("4", "8.0629552614851", 5, RoundingMode.ROUND_UP, "0.46052"); + t("-9407014521487438050752802003689", "0.7", 6, RoundingMode.ROUND_UP, "-1.5708"); + t("5309883156796538341567056480726204719131542715337727577260103498892564780933836", "67", 9, RoundingMode.ROUND_DOWN, "1.57079632"); + t("0.467471", "0.4026", 9, RoundingMode.ROUND_DOWN, "0.85981875"); + t("5", "0.08514", 10, RoundingMode.ROUND_UP, "1.553769973"); + t("68", "87541506.6189", 6, RoundingMode.ROUND_UP, "0.000000776775"); + t("0.29", "7288888888080888.888", 3, RoundingMode.ROUND_CEIL, "0.0000000000000000398"); + t("535088710", "51.603", 5, RoundingMode.ROUND_DOWN, "1.5707"); + t("65257864326100", "52222222222222232603837259016997593142527508619035544316899999999999", 8, RoundingMode.ROUND_CEIL, "0.0000000000000000000000000000000000000000000000000000012496187"); + t("-6", "-0.24417760982", 1, RoundingMode.ROUND_FLOOR, "-2"); + t("0.150641617203003789406296", "976990923520791955199586054467506462", 6, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000000000000000154189"); + t("0.000000004233334109278", "566777777777777777.77", 16, RoundingMode.ROUND_HALF_DOWN, "0.000000000000000000000000007469125070280729"); + t("0.975", "450969999999999999999999999.99999999929999999999199999999890699999299919999699999", 12, RoundingMode.ROUND_HALF_DOWN, "0.00000000000000000000000000216200634189"); + t("0.64635113839", "166766106666662666.663", 13, RoundingMode.ROUND_UP, "0.000000000000000003875794376384"); + t("96270497710", "0.4941140457", 16, RoundingMode.ROUND_HALF_UP, "1.570796326789764"); + t("9584212519118646337525061411752922452907575819163628119955474052138", "0.0072", 2, RoundingMode.ROUND_HALF_DOWN, "1.6"); + t("8247", "577000000000.7777752", 9, RoundingMode.ROUND_DOWN, "0.0000000142928942"); + t("23671.4", "-98657555.33333333355555555555", 10, RoundingMode.ROUND_DOWN, "3.141352718"); + t("118190794.61469661", "9.29", 1, RoundingMode.ROUND_CEIL, "2"); + t("3", "4458774000", 5, RoundingMode.ROUND_HALF_EVEN, "0.00000000067283"); + t("0.8", "3811.96", 12, RoundingMode.ROUND_DOWN, "0.000209865787745"); + t("-0.78581426", "0.907778", 10, RoundingMode.ROUND_HALF_EVEN, "-0.7135074513"); + t("55555555555555555523529876239034678708869", "6.52697", 3, RoundingMode.ROUND_UP, "1.58"); + t("50289000000000000000000000", "0.6", 18, RoundingMode.ROUND_CEIL, "1.57079632679489662"); + t("6192008", "411111111111114642364750737275822311791443263748506885104444444444", 11, RoundingMode.ROUND_HALF_UP, "0.000000000000000000000000000000000000000000000000000000000015061641081"); + t("-68.51338", "-0.364", 8, RoundingMode.ROUND_UP, "-1.5761092"); + t("62761498913333333333", "0.00000741553710706062448489343470788408728587987333751120883031050730660871321571629543", 6, RoundingMode.ROUND_FLOOR, "1.57079"); + t("9.22", "0.0603617", 11, RoundingMode.ROUND_HALF_UP, "1.5642495982"); + t("16626666663.66", "968500226055453670256798108771953281326459971091.2132429344444444444444444", 4, RoundingMode.ROUND_HALF_UP, "0.00000000000000000000000000000000000001717"); + t("60490010865191488888.555555555555555555763", "41111111111191111111.1111111111111111111111111111111111111111111111111111111111111118", 20, RoundingMode.ROUND_UP, "0.97386949780698462703"); + t("9888888915122222222222222222", "0.000000004", 18, RoundingMode.ROUND_DOWN, "1.57079632679489661"); + t("846147110893185519947", "353", 2, RoundingMode.ROUND_HALF_UP, "1.6"); + t("3014080.000108", "0.0934632513038", 9, RoundingMode.ROUND_FLOOR, "1.57079629"); + t("-0.504414053494937", "-5838490548.6389761255529718821355529829664", 5, RoundingMode.ROUND_HALF_UP, "-3.1416"); + t("9000000000000000000000.0000008", "7", 11, RoundingMode.ROUND_HALF_UP, "1.5707963268"); + t("2349", "52097695.707205412205400007249197879285712226890088721187075326866727978437398", 8, RoundingMode.ROUND_UP, "0.000045088367"); + t("12", "280859106369043042382657353186319596980474278473816017996672078306702747102220", 4, RoundingMode.ROUND_HALF_EVEN, "0.00000000000000000000000000000000000000000000000000000000000000000000000000004273"); + t("2.47", "-544444444529732304", 2, RoundingMode.ROUND_UP, "3.2"); + t("17", "0.02", 18, RoundingMode.ROUND_FLOOR, "1.56961985674943853"); + t("0.871814914786887298065565", "17.06", 8, RoundingMode.ROUND_CEIL, "0.051058452"); + t("0.7374041", "9", 2, RoundingMode.ROUND_HALF_DOWN, "0.082"); + t("2592205.0805090931902411118272434468895851605962540558617593", "592000", 14, RoundingMode.ROUND_HALF_DOWN, "1.3462699484142"); + t("3199814528", "62222957.88888888888888884339", 3, RoundingMode.ROUND_DOWN, "1.55"); + t("488464421", "41", 10, RoundingMode.ROUND_FLOOR, "1.570796242"); + t("0.62", "32505200381608164972204391428791106", 14, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000000000000019073871033596"); + t("6000000000", "-1145184143055268000000000.8386", 7, RoundingMode.ROUND_HALF_DOWN, "3.141593"); + t("0.78", "0.596910486308076", 14, RoundingMode.ROUND_FLOOR, "0.91759392380288"); + t("658296", "4.923916884352", 8, RoundingMode.ROUND_UP, "1.5707889"); + t("8.0178122337", "0.467177787", 4, RoundingMode.ROUND_CEIL, "1.513"); + t("8.938998999", "-94944811296661", 13, RoundingMode.ROUND_UP, "3.14159265359"); + t("922222222222271999999999999999999.298", "9.40000000000000000000000000000000000000000000000000000000000000000002", 8, RoundingMode.ROUND_FLOOR, "1.5707963"); + t("6044.291446", "72649799999999959999999999999999999999.2999999899999999999999999599999991999999999999999", 11, RoundingMode.ROUND_HALF_UP, "0.000000000000000000000000000000000083197633662"); + t("0.343958204891340134044065556710679469960108473540765189197011282323919739545133465513", "0.0000741054", 9, RoundingMode.ROUND_FLOOR, "1.57058087"); + t("0.817638730505", "244446838769433333333333", 19, RoundingMode.ROUND_HALF_DOWN, "0.000000000000000000000003344852952981779387"); + t("85000000000000000000700000000070000000.000000005000000000000000000005000000000015000000000000001", "6521479921.38876", 4, RoundingMode.ROUND_CEIL, "1.571"); + t("3", "7000100000080", 2, RoundingMode.ROUND_HALF_DOWN, "0.00000000000043"); + t("74929999099999.991999", "177102.85719179", 20, RoundingMode.ROUND_FLOOR, "1.570796324431319156"); + t("-81711876774736", "0.2", 2, RoundingMode.ROUND_CEIL, "-1.5"); + t("3555555555555551195689", "735991091674.956571417858272812201492455054697693771", 18, RoundingMode.ROUND_CEIL, "1.57079632658789913"); + t("5483", "150000700000000.8", 4, RoundingMode.ROUND_HALF_DOWN, "0.00000000003655"); + t("153172389606854.6947232931652", "0.0000004", 3, RoundingMode.ROUND_HALF_DOWN, "1.57"); + t("-0.26739", "21729927191216388406", 10, RoundingMode.ROUND_HALF_EVEN, "-0.00000000000000000001230514938"); + t("0.52743016271", "0.92557355607167855", 9, RoundingMode.ROUND_HALF_EVEN, "0.517948839"); + t("0.179908845", "8309.30123171", 11, RoundingMode.ROUND_DOWN, "0.000021651501125"); + t("0.9", "5993979299999.695999", 2, RoundingMode.ROUND_HALF_EVEN, "0.00000000000015"); + t("-0.2", "8", 18, RoundingMode.ROUND_DOWN, "-0.0249947936189201595"); + t("0.161999991399999969999999999999", "0.00000639343267490545790870243", 15, RoundingMode.ROUND_HALF_DOWN, "1.57075686115903"); + t("0.40828527211317125708141583003519", "47349634803129624", 9, RoundingMode.ROUND_HALF_UP, "0.00000000000000000862277553"); + t("0.637988577110728269779036256382432462671448", "2.33", 17, RoundingMode.ROUND_FLOOR, "0.26726404353743542"); + t("-77126777777177777277777777777757777777777777777777777.77777777787777747777777777777", "-0.1", 19, RoundingMode.ROUND_HALF_EVEN, "-1.570796326794896619"); + t("0.614048", "818995716.0000000000009", 11, RoundingMode.ROUND_UP, "0.00000000074975727957"); + t("55848.88", "0.188761359978651", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("63052220245350273170.84499", "8878151.137606389001514644599087449945604279572", 6, RoundingMode.ROUND_FLOOR, "1.57079"); + t("-0.269593735659", "0.217000000001", 8, RoundingMode.ROUND_FLOOR, "-0.89306571"); + t("65892028634881197088548419304.409", "74836589983562870471094222", 16, RoundingMode.ROUND_CEIL, "1.569660581555961"); + t("81606.3787875159", "4", 2, RoundingMode.ROUND_UP, "1.6"); + t("51.4444444444444449601962585418375555555555", "94.9", 19, RoundingMode.ROUND_HALF_DOWN, "0.4967508398570922095"); + t("-8232339136552968101430591673885662037028311.6611516426299294683", "0.99871495835002046239454063840041207432606141011748340012003114831", 9, RoundingMode.ROUND_HALF_EVEN, "-1.57079633"); + t("169.2", "5333333333333325007904", 15, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000031725"); + t("6.0281288977737", "0.50333333335373533383333334330333333333333333313", 7, RoundingMode.ROUND_HALF_EVEN, "1.487492"); + t("22.5", "563744541070747483170260387977.62468", 1, RoundingMode.ROUND_CEIL, "0.00000000000000000000000000004"); + t("9", "-0.7888888888848888837888881888888", 4, RoundingMode.ROUND_HALF_EVEN, "1.658"); + t("1", "30.3444", 14, RoundingMode.ROUND_FLOOR, "0.032943087515976"); + t("65030", "166696.166615666", 14, RoundingMode.ROUND_CEIL, "0.3719523730534"); + t("398.404", "1279000", 4, RoundingMode.ROUND_HALF_EVEN, "0.0003115"); + t("0.3", "-204140.31", 4, RoundingMode.ROUND_UP, "3.142"); + t("9", "71", 18, RoundingMode.ROUND_HALF_EVEN, "0.126088095064590432"); + t("0.0008160692112343", "0.236982", 2, RoundingMode.ROUND_DOWN, "0.0034"); + t("3999999999333.55555555599946", "63.46", 19, RoundingMode.ROUND_FLOOR, "1.570796326779031619"); + t("-404786636.76", "-39999.07999913", 7, RoundingMode.ROUND_DOWN, "-1.570895"); + t("369333.333333334333333333333333332333333333363333333333", "4", 10, RoundingMode.ROUND_FLOOR, "1.570785496"); + t("0.25415546669666666", "4396362952542323984546668860479706999999999999999999", 9, RoundingMode.ROUND_HALF_EVEN, "0.0000000000000000000000000000000000000000000000000000578103922"); + t("716000000000000000020003060000000000000000000000000000000000000000000000000009003300000", "6888888888888884680269.000000000000000009539623", 7, RoundingMode.ROUND_UP, "1.570797"); + t("-56401.617914006562068", "-5219748230.323739667", 18, RoundingMode.ROUND_UP, "-3.14158184816098268"); + t("0.00074754634633295291405070339859292186825046899699255542695", "41528570426868", 15, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000180007724477149"); + t("0.29653288", "105974.068632", 14, RoundingMode.ROUND_FLOOR, "0.0000027981645305036"); + t("0.0207879189978533628689846261930751", "3.70472", 17, RoundingMode.ROUND_HALF_UP, "0.0056111395271356516"); + t("-9026.11", "0.005727933", 1, RoundingMode.ROUND_CEIL, "-1"); + t("6452000000", "0.00003325012", 15, RoundingMode.ROUND_DOWN, "1.57079632679489"); + t("711111111.1111115425304570840277777777777777777", "531211806937856566194.87748518162821411507214458", 18, RoundingMode.ROUND_HALF_DOWN, "0.00000000000133865833142955794"); + t("0.574263", "3513042332967225195760343517127481705641025735784111507010691762175172468766", 1, RoundingMode.ROUND_FLOOR, "0.0000000000000000000000000000000000000000000000000000000000000000000000000001"); + t("19999999.999", "-6", 18, RoundingMode.ROUND_HALF_DOWN, "1.57079662679489663"); + t("3989666666666666.333333333333333333335", "0.570277788", 11, RoundingMode.ROUND_HALF_EVEN, "1.5707963268"); + t("1130713550650741422577414", "690.330207734", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("5457.841105669", "7", 3, RoundingMode.ROUND_DOWN, "1.56"); + t("710628.235233359", "-80000", 2, RoundingMode.ROUND_HALF_UP, "1.7"); + t("700096403892084064200378317593.9641197539020648165777777777", "0.2432", 10, RoundingMode.ROUND_DOWN, "1.570796326"); + t("0.8571286803773208181803050631397084118598363976415044249031901589236939437728037", "967872523768.3333333333333376554842523475", 7, RoundingMode.ROUND_HALF_EVEN, "0.0000000000008855801"); + t("188888888888888888868048000000000000000.000000000000000036380579985998322222222222222222", "25.9", 11, RoundingMode.ROUND_HALF_DOWN, "1.5707963268"); + t("29999999999999.555555555555555555599999966547664969", "-0.1", 11, RoundingMode.ROUND_FLOOR, "1.5707963267"); + t("0.555", "92979808598368222222222222222.080012608461880689119401042833", 2, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000000006"); + t("6.21", "964.788295", 13, RoundingMode.ROUND_UP, "0.006436556365145"); + t("213054904.047858775", "228808806237189473", 4, RoundingMode.ROUND_HALF_UP, "0.0000000009311"); + t("999999999959999.9988", "-492034", 3, RoundingMode.ROUND_FLOOR, "1.57"); + t("0.884381671333064", "6498.394430127429256954373819746", 13, RoundingMode.ROUND_DOWN, "0.0001360923340961"); + t("4.93151", "6", 15, RoundingMode.ROUND_HALF_EVEN, "0.687963625503402"); + t("89925703.3177963346", "11111111111111111111822853333333333333333.138616958038440630433", 7, RoundingMode.ROUND_HALF_UP, "0.000000000000000000000000000000008093313"); + t("-7111.1111169", "-68.78333479333", 11, RoundingMode.ROUND_HALF_DOWN, "-1.5804686816"); + t("510962748", "8", 13, RoundingMode.ROUND_UP, "1.570796311139"); + t("0.74004", "8", 2, RoundingMode.ROUND_FLOOR, "0.092"); + t("0.6", "22090.4286469031", 1, RoundingMode.ROUND_HALF_EVEN, "0.00003"); + t("-980683783443166666666666666666.31379473473395555555555555555", "-0.69214", 5, RoundingMode.ROUND_DOWN, "-1.5707"); + t("219680413149.63", "368265.125742", 14, RoundingMode.ROUND_UP, "1.5707946504274"); + t("70925", "305.000006", 18, RoundingMode.ROUND_FLOOR, "1.56649603598168967"); + t("3878725934303176618211873151895131", "0.63596", 20, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192"); + t("391.83461875264198205744979", "5544496962", 7, RoundingMode.ROUND_DOWN, "0.0000000706709"); + t("0.6895", "2701", 3, RoundingMode.ROUND_UP, "0.000256"); + t("1999999.959999999999999999949999999999999999999999999999999999", "400850444444444", 14, RoundingMode.ROUND_HALF_DOWN, "0.000000004989391898447"); + t("0.14", "4608196395865043688974388166208831306190487733992363597810733333333", 17, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000000000000000000000000000000000000000000000030380649602005387"); + t("2.12", "9681", 13, RoundingMode.ROUND_HALF_DOWN, "0.0002189856384787"); + t("0.4291721052132797", "9770000000000", 7, RoundingMode.ROUND_FLOOR, "0.00000000000004392754"); + t("0.00007411904848297227831", "700000000000000000000000005000000000000200000000004000000.0000500000000000000000003000000000008", 12, RoundingMode.ROUND_CEIL, "0.000000000000000000000000000000000000000000000000000000000000105884354976"); + t("0.828", "0.8576505", 6, RoundingMode.ROUND_HALF_UP, "0.76781"); + t("-0.447", "96.76152764", 15, RoundingMode.ROUND_CEIL, "-0.0046195717572017"); + t("1590", "9448364249831029362222222222222222", 16, RoundingMode.ROUND_UP, "0.0000000000000000000000000000001682830972597649"); + t("0.00034768842104", "89999999999999999999999999999.399999999999999999999999999999999999999939999999999999999709999789", 8, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000000000000038632047"); + t("7", "5.8", 3, RoundingMode.ROUND_UP, "0.879"); + t("-0.65118752298812321381116607387959486212424133", "-599.9999999959999", 15, RoundingMode.ROUND_HALF_DOWN, "-3.1405073414776"); + t("793731469401175628213144848905070806055771110.7418825191088418554", "69", 2, RoundingMode.ROUND_FLOOR, "1.5"); + t("0.432", "17", 14, RoundingMode.ROUND_CEIL, "0.025406296875962"); + t("0.6381718858188238519", "39000", 1, RoundingMode.ROUND_FLOOR, "0.00001"); + t("-62439170169", "-95553672963354588648732705658818406500035091176441853597", 18, RoundingMode.ROUND_HALF_EVEN, "-3.14159265358979324"); + t("823681.488", "8858128.888838888888", 17, RoundingMode.ROUND_FLOOR, "0.092719329601541061"); + t("85", "5314821.2112", 8, RoundingMode.ROUND_HALF_EVEN, "0.000015993012"); + t("553580700475", "644111111111111111111.77777777777777797997167909581426129381333333", 15, RoundingMode.ROUND_HALF_EVEN, "0.0000000008594490778463"); + t("6", "-1401959.5961241504692175591", 12, RoundingMode.ROUND_UP, "3.14158837387"); + t("21.9394", "0.0000087077", 14, RoundingMode.ROUND_DOWN, "1.570795929897"); + t("4880180155.18079581724378965502409426692247301", "346", 2, RoundingMode.ROUND_HALF_DOWN, "1.6"); + t("70501761.5", "0.11219", 17, RoundingMode.ROUND_FLOOR, "1.5707963252035888"); + t("165000507.00802", "-9527999.996999499", 11, RoundingMode.ROUND_HALF_EVEN, "1.6284775478"); + t("35383790875589", "0.6", 10, RoundingMode.ROUND_HALF_EVEN, "1.570796327"); + t("15444444444444444444444444144.444444440444444444444444444444444444444444444444444", "7555555555.55", 10, RoundingMode.ROUND_CEIL, "1.570796327"); + t("58.4", "577510297001528277163819039859368375023785506618", 2, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000000000000000000001"); + t("0.879634", "-5999398799.998", 11, RoundingMode.ROUND_DOWN, "3.1415926534"); + t("18888888888888888367407555555555", "2333333333333333333281111111111111111111", 8, RoundingMode.ROUND_HALF_UP, "0.0000000080952381"); + t("679912222222202.222022", "20618214", 9, RoundingMode.ROUND_HALF_UP, "1.5707963"); + t("985768835329027577777777", "988888888888888888888888888.888888888888888888888888", 3, RoundingMode.ROUND_HALF_EVEN, "0.000997"); + t("0.13579719182904961200782885388171959", "40000", 7, RoundingMode.ROUND_HALF_EVEN, "0.00000339493"); + t("70369099999.9", "48417", 17, RoundingMode.ROUND_HALF_UP, "1.570795638751423"); + t("0.028706713691", "64.19", 20, RoundingMode.ROUND_UP, "0.00044721470286975516599"); + t("0.72368034253736", "899999994780884418555555555555555555555", 4, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000000000000000000008041"); + t("232023923217", "0.35404", 12, RoundingMode.ROUND_HALF_DOWN, "1.57079632679"); + t("89.56466352212148", "1.4220183", 16, RoundingMode.ROUND_FLOOR, "1.554920659147802"); + t("9562047.05298192735564", "44740815335555555.777777555555555", 15, RoundingMode.ROUND_HALF_UP, "0.000000000213720894026331"); + t("68847858552146171849959435278665381385121539991737485699789847639", "31176695442538711111111.666666666666666666611111111111", 19, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619"); + t("6.5", "-0.6749182", 3, RoundingMode.ROUND_DOWN, "1.67"); + t("0.0000000532372342030311778219967031911242064028923898968191", "2099.99999699999993099999999999", 2, RoundingMode.ROUND_HALF_UP, "0.000000000025"); + t("-29999999999999948564133.88403069751247060547420643478", "10000", 6, RoundingMode.ROUND_DOWN, "-1.57079"); + t("6.3", "88129378993834442554.7798717", 8, RoundingMode.ROUND_HALF_UP, "0.00000000000000000007148581"); + t("599999999597.9999919", "0.7435479673704224321964182171072929384687381276323790094410316604197925", 17, RoundingMode.ROUND_UP, "1.5707963267936574"); + t("6.27", "0.40659151247037198885", 21, RoundingMode.ROUND_CEIL, "1.50603986427756669687"); + t("-21165321", "818128680020.1", 14, RoundingMode.ROUND_DOWN, "-0.000025870405856885"); + t("419", "0.11996851553056586971627", 15, RoundingMode.ROUND_CEIL, "1.57051000576327"); + t("539999999999.99909999999799999999979498", "6970213.000000000939741", 9, RoundingMode.ROUND_HALF_UP, "1.57078342"); + t("5982980908142359758745222149562532044.42309626976992393808368", "62336004000000000660.0300000000007", 27, RoundingMode.ROUND_UP, "1.57079632679489660881243436"); + t("562819249600000000000000000000", "5", 2, RoundingMode.ROUND_FLOOR, "1.5"); + t("0.000000083490302676705187652", "8154950", 16, RoundingMode.ROUND_HALF_UP, "0.00000000000001023799075122535"); + t("9139734786791.7379043772496891390336", "2399999999919949999999997999.9999999", 29, RoundingMode.ROUND_UP, "0.0000000000000038082228279569108923980033427"); + t("-8863.31333", "8965742289799323971", 29, RoundingMode.ROUND_HALF_EVEN, "-0.00000000000000098857551817925199468953614107"); + t("646133725.2865829353688", "959666666666666666666666666666666666026666666.66666066666666796666866866666666666666666", 32, RoundingMode.ROUND_HALF_DOWN, "0.00000000000000000000000000000000000067328974500164946373963181660299"); + t("656000000.00000000009", "56928316454824", 2, RoundingMode.ROUND_UP, "0.000012"); + t("0.03629793847", "7005960667448530394805877944398329328117642.6955673951", 35, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000000000000000000051810080291557195553964650198652432"); + t("1000000", "76619994516457966111111111111", 30, RoundingMode.ROUND_UP, "0.0000000000000000000000130514235391285510166835690223"); + t("50000000.00000000000000000000050000000000007", "731923379", 8, RoundingMode.ROUND_DOWN, "0.068207192"); + t("6350000", "45", 36, RoundingMode.ROUND_HALF_DOWN, "1.57078924018072350951502351531135453"); + t("133", "73949.46732", 7, RoundingMode.ROUND_HALF_DOWN, "0.001798524"); + t("-23.9452582", "456350898364817749967", 4, RoundingMode.ROUND_HALF_UP, "-0.00000000000000000005247"); + t("653999999999999999999899.999999999999999999999999999999999999999999919999999999999999929999993", "8", 6, RoundingMode.ROUND_UP, "1.5708"); + t("0.4696126956620913702452175874", "70.7", 29, RoundingMode.ROUND_UP, "0.0066422318150328625633074037498"); + t("0.364445", "811111111111111111114072370201707590208043701553044444444444444", 34, RoundingMode.ROUND_UP, "0.0000000000000000000000000000000000000000000000000000000000000004493157534246575342449349502418641"); + t("-0.0000000052359006931491362608065430621330679882401940730812728248609", "-974", 4, RoundingMode.ROUND_UP, "-3.142"); + t("57698901906.9297", "981", 39, RoundingMode.ROUND_HALF_DOWN, "1.57079630979283994955004386873819961239"); + t("4160742881986563", "0.85973946034741104993576118", 14, RoundingMode.ROUND_HALF_EVEN, "1.5707963267949"); + t("994541769505557.2411661", "0.170083072554569509762017", 10, RoundingMode.ROUND_DOWN, "1.570796326"); + t("-711", "-45027710092211526765264608", 5, RoundingMode.ROUND_UP, "-3.1416"); + t("14.130295294", "9999999999999999999999999999999999999999999999.99999999999999", 29, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000000000000000000000000000000014130295294"); + t("7537661534862.99999999857669733347", "0.60290165167262", 30, RoundingMode.ROUND_CEIL, "1.57079632679481663399334249947"); + t("0.499999999999499999", "40", 22, RoundingMode.ROUND_UP, "0.0124993490193491803795"); + t("-703638515", "-626.02420098737845069053", 34, RoundingMode.ROUND_HALF_UP, "-1.570797216490653235415517383592167"); + t("4377761947049111.77777777777777777788831", "84922222222222222222222222222222222222222222222222222222222222262222222222222222222.232", 6, RoundingMode.ROUND_FLOOR, "0.0000000000000000000000000000000000000000000000000000000000000000000515502"); + t("9.2322767", "700000000000000003000", 28, RoundingMode.ROUND_HALF_UP, "0.00000000000000000001318896671428571422919014265"); + t("0.535", "0.7464770174643088536054941461628799421212977869203", 13, RoundingMode.ROUND_HALF_DOWN, "0.6218462404717"); + t("-0.002073613262493", "-487826783751422981641835054736981551589093549130806746653783492181633922401954", 26, RoundingMode.ROUND_HALF_EVEN, "-3.1415926535897932384626434"); + t("27777.7777777777777741358579188507196343065620564", "0.3960800000000000007007000030000730010004", 31, RoundingMode.ROUND_UP, "1.570782067914897585582488387695"); + t("49045034.01413637332255191929245526302399992975192521546171389548677", "629999999999999999999999399999999999799099999999.9999999999999999999999299", 37, RoundingMode.ROUND_DOWN, "0.00000000000000000000000000000000000000007784926033989900527389200952700232853"); + t("0.3524562187568585061488996821987173805469245688135416574164", "2333333333877339163450565111111.444444444444444444447", 10, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000001510526651"); + t("-45254225215943888994768.30718187896231", "-4899999999999999999999999999999999999999999999999999999999999999999999999999999.99999999", 3, RoundingMode.ROUND_FLOOR, "-3.15"); + t("31150745723902979335.88888888888888888", "9", 20, RoundingMode.ROUND_DOWN, "1.5707963267948966189"); + t("411111111111111111.44455147650538", "0.75130157365783518836839878776511986819148649178412246853", 16, RoundingMode.ROUND_UP, "1.570796326794897"); + t("0.390201064771592903596972929445", "429.999999999995999999999999999999999999199999999999999999", 25, RoundingMode.ROUND_CEIL, "0.0009074440875983279764663817"); + t("0.5150742741", "-5448", 2, RoundingMode.ROUND_FLOOR, "3.1"); + t("7.0399", "0.000000009220111329055817309948360006115", 15, RoundingMode.ROUND_DOWN, "1.5707963254852"); + t("83.5513", "0.70545888267142660863", 19, RoundingMode.ROUND_FLOOR, "1.562353105456501657"); + t("0.00022189434236501", "0.631722516742541", 13, RoundingMode.ROUND_HALF_UP, "0.000351252848139"); + t("95", "83847.496", 37, RoundingMode.ROUND_HALF_DOWN, "0.001133008901651709420752001468945723075"); + t("7000000000", "55197697604778.2366024947701", 9, RoundingMode.ROUND_HALF_UP, "0.000126816883"); + t("45.55555555055555555555555555555555555", "81516236", 6, RoundingMode.ROUND_UP, "0.000000558853"); + t("0.00288", "7211111111111.121111111111111051111611676", 16, RoundingMode.ROUND_HALF_UP, "0.0000000000000003993836671802768"); + t("8000000.000000000000000000005", "99800000000005000", 18, RoundingMode.ROUND_CEIL, "0.0000000000801603206412785491"); + t("255243968461810000000000000", "4055515443127923293789272670275709789971692", 9, RoundingMode.ROUND_FLOOR, "0.0000000000000000629374914"); + t("1335570", "5000", 9, RoundingMode.ROUND_UP, "1.56705263"); + t("67807", "37100000000000000.200000006000000000000000000000000406", 8, RoundingMode.ROUND_DOWN, "0.0000000000018276819"); + t("0.0000000518049177", "-31111111111111111111111111111111111111.11", 24, RoundingMode.ROUND_DOWN, "3.14159265358979323846264"); + t("0.0000044634", "7952827463032853097062482701", 16, RoundingMode.ROUND_CEIL, "0.0000000000000000000000000000000005612343560510062"); + t("83700000000000000000", "8444238941777342317286032980419068584.3333345081402708739005130524147573974641822132", 2, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000099"); + t("8053373343", "67188849974152", 26, RoundingMode.ROUND_CEIL, "0.00011986175247129563767137035"); + t("-941941935858540705045.777709101535556", "0.958510507217164895749", 33, RoundingMode.ROUND_HALF_EVEN, "-1.57079632679489661923030410183859"); + t("5460579334603327826262.838", "9235092.131409718618959255931202012040764996908998636391", 36, RoundingMode.ROUND_HALF_UP, "1.57079632679489492800195471082245905"); + t("6886029306687777777777", "19999999999999999.99999999999999", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("145299999999999999999999999999999.9999", "0.828", 4, RoundingMode.ROUND_DOWN, "1.57"); + t("-0.000004124767332368", "-6.6060090003", 17, RoundingMode.ROUND_FLOOR, "-3.1415920291935304"); + t("422022224.2202222222222222222222222222222222222222222222222222222222", "30700", 26, RoundingMode.ROUND_FLOOR, "1.5707235818109030112311289"); + t("7934621315846250909.4016054220341498", "42222222222222222222575999999999", 23, RoundingMode.ROUND_FLOOR, "0.00000000000018792524169109541627372"); + t("47963500.0060000000000000002", "7179724", 6, RoundingMode.ROUND_FLOOR, "1.4222"); + t("-432.496118648699465", "-4421", 36, RoundingMode.ROUND_CEIL, "-3.04407528459992051119254743732988688"); + t("82.462947", "0.46586903083612348206771698", 34, RoundingMode.ROUND_HALF_UP, "1.565146952237759875958487288540194"); + t("13076.480444", "9.5", 32, RoundingMode.ROUND_HALF_DOWN, "1.5700698317437754369739020981625"); + t("8", "11986717716726.599066422471014058913704803540990193918847", 10, RoundingMode.ROUND_DOWN, "0.0000000000006674053889"); + t("-0.728474579975813791067434772029", "9.2", 35, RoundingMode.ROUND_HALF_DOWN, "-0.079017154385054914064666104583882902"); + t("79999999999999999999999999999999999999999999999999999999999999999999999.899999", "0.90198569647534035813532384300735177", 30, RoundingMode.ROUND_UP, "1.57079632679489661923132169164"); + t("10000000", "542", 12, RoundingMode.ROUND_DOWN, "1.57074212679"); + t("7.99067012889653425", "511958331313477782", 6, RoundingMode.ROUND_FLOOR, "0.000000000000000015608"); + t("0.5050119789596828575300523017582073014908919079250126179019047345288114283", "7", 16, RoundingMode.ROUND_CEIL, "0.07201979091122035"); + t("6.41723747", "6749484357377.9905612684085", 23, RoundingMode.ROUND_HALF_EVEN, "0.00000000000095077447849556016405385"); + t("88.38", "0.322156132554204577122836268", 28, RoundingMode.ROUND_HALF_DOWN, "1.567151218108055198381347945"); + t("0.059681014103381591", "2961405538.151", 11, RoundingMode.ROUND_HALF_DOWN, "0.000000000020152935265"); + t("-17.2", "-0.10955", 29, RoundingMode.ROUND_HALF_DOWN, "-1.577165426718243624125638317"); + t("874", "3584119489", 28, RoundingMode.ROUND_HALF_EVEN, "0.0000002438534771740649062952208662"); + t("38194444444444.44444", "2811.6904", 17, RoundingMode.ROUND_HALF_EVEN, "1.5707963267212815"); + t("72864512.0149", "64060101", 27, RoundingMode.ROUND_HALF_EVEN, "0.849610918740306264987045524"); + t("-63721081.29", "-74299909.369691999999", 38, RoundingMode.ROUND_UP, "-2.4326914416377803147757618064092051615"); + t("43262300", "77671330770405559", 5, RoundingMode.ROUND_DOWN, "0.00000000055699"); + t("8.627", "50000000000000000000000005100060060", 24, RoundingMode.ROUND_DOWN, "0.000000000000000000000000000000000172539999999999999999999"); + t("0.5963271665340185112", "58412600000000000000", 32, RoundingMode.ROUND_FLOOR, "0.000000000000000000010208879018123119176342090576348"); + t("3022130195.40104", "-699999999199999999999999909999999.99999", 23, RoundingMode.ROUND_HALF_DOWN, "3.1415926535897932384626"); + t("5303000000000000000090000000000000003000", "0.09146604913142", 2, RoundingMode.ROUND_CEIL, "1.6"); + t("100000000.00000040080000001", "16118944", 23, RoundingMode.ROUND_HALF_UP, "1.4109815299015823466095"); + t("38888888888888888888656666666666", "6363", 31, RoundingMode.ROUND_UP, "1.570796326794896619231321691477"); + t("-5718250265604382450", "-8.1221", 33, RoundingMode.ROUND_FLOOR, "-1.57079632679489662065170373557633"); + t("999999995930652366969109975", "0.82875548", 25, RoundingMode.ROUND_UP, "1.570796326794896619231322"); + t("65511304482.461771037219263061108232680717", "7666666666000000000000000.8644444444444444444444", 23, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000085449527593250095056656"); + t("0.3941", "0.78535089490343347", 5, RoundingMode.ROUND_HALF_UP, "0.4651"); + t("0.3808", "5367074625702093762374389367806", 22, RoundingMode.ROUND_CEIL, "0.00000000000000000000000000000007095112823220445820329"); + t("799999799999912999299999.99999999997999", "643201.925", 30, RoundingMode.ROUND_CEIL, "1.57079632679489661842731908439"); + t("399999999999999921740236232048232573174", "0.12988771", 31, RoundingMode.ROUND_HALF_UP, "1.57079632679489661923132169164"); + t("427.93", "0.000709", 18, RoundingMode.ROUND_HALF_DOWN, "1.57079466998186645"); + t("263051765790724555648382977335029730164687329496736978442860021413", "-31327662827140084173926138691943913985366593.3355806384948212", 26, RoundingMode.ROUND_UP, "1.5707963267948966192314408"); + t("3000", "5555555526626938594227121804566775201742534056", 14, RoundingMode.ROUND_DOWN, "0.00000000000000000000000000000000000000000054000000281186"); + t("96349.5", "5", 29, RoundingMode.ROUND_HALF_UP, "1.5707444323896790351458372541"); + t("900000000", "0.631567", 7, RoundingMode.ROUND_CEIL, "1.570797"); + t("-0.74", "-38", 31, RoundingMode.ROUND_DOWN, "-3.122121430451231231383166703115"); + t("0.0000000014745244", "0.0099", 34, RoundingMode.ROUND_CEIL, "0.0000001489418585858574844992131096198818"); + t("7978922430682.742", "20000000000000000000000000000000000000000000000000000000009000000010.0000000000300333", 9, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000000000000000000000000000000000398946122"); + t("0.31683308918712856539265368348792449612529683651817461449707106045122662153234365648236", "0.00000081513065354", 28, RoundingMode.ROUND_HALF_UP, "1.570793754050188579069772893"); + t("-73162856237.47919", "2546", 21, RoundingMode.ROUND_DOWN, "-1.57079629199581781159"); + t("969999.99499999999999994999999999999929", "0.845986571459091", 7, RoundingMode.ROUND_UP, "1.570796"); + t("6991676", "1555555555555555912602856823366666666.6666666", 32, RoundingMode.ROUND_HALF_EVEN, "0.0000000000000000000000000000044946488571428561111985570497304"); + t("9682998416193", "78", 5, RoundingMode.ROUND_HALF_EVEN, "1.5708"); + t("4", "-0.9489647036973", 32, RoundingMode.ROUND_HALF_DOWN, "1.8037311088875706056105018840232"); + t("900000000000000096852401302738387", "5999.9999999999999999", 5, RoundingMode.ROUND_HALF_UP, "1.5708"); + t("66968164199519155158990", "0.5706740769217872906872841651415116808", 13, RoundingMode.ROUND_CEIL, "1.570796326795"); + t("1634332076219217662230944093502324458815131179273696099571685", "9811", 2, RoundingMode.ROUND_UP, "1.6"); + t("-740301920274801246745774560762330268216384178993862982168685982408876856125117", "700000000000000000000000000000000000000000000000000000000000000", 29, RoundingMode.ROUND_DOWN, "-1.5707963267948956736711646409"); + t("22.7", "0.000819949123", 10, RoundingMode.ROUND_DOWN, "1.570760205"); + t("0.04902", "11111111111344839.994442403253589581730717254587386841048901889149", 14, RoundingMode.ROUND_CEIL, "0.0000000000000000044117999999072"); + t("6403", "833333333940055334608093111", 34, RoundingMode.ROUND_DOWN, "0.000000000000000000000007683599994405829001279234875364981"); + t("-640760628", "-811111111111111115118251749366613960776845618329465596466333333333333388.33", 26, RoundingMode.ROUND_HALF_DOWN, "-3.1415926535897932384626434"); + t("184663342", "0.9492161", 22, RoundingMode.ROUND_CEIL, "1.570796321654644689859"); + t("70521493.1626001", "4140868", 23, RoundingMode.ROUND_HALF_UP, "1.5121458544561527392171"); + t("1312703162387150251", "334666666.6666666666604668166666666661666616796", 12, RoundingMode.ROUND_HALF_EVEN, "1.57079632654"); + t("313717235.946196231067663", "-38371086260060050208565051142089", 27, RoundingMode.ROUND_DOWN, "3.1415926535897932384626352"); + t("6", "5617", 15, RoundingMode.ROUND_HALF_EVEN, "0.00106818545806649"); + t("773559", "466", 9, RoundingMode.ROUND_FLOOR, "1.57019391"); + t("0.0739", "13.285131", 1, RoundingMode.ROUND_HALF_EVEN, "0.006"); + t("933333333333333333282006000", "-0.3050995223716247182436", 11, RoundingMode.ROUND_HALF_EVEN, "1.5707963268"); + t("38199999999999999999.3404", "7144270241170638611392893944553280", 21, RoundingMode.ROUND_CEIL, "0.00000000000000534694219430040247384"); + t("5.566", "21.49482458", 18, RoundingMode.ROUND_HALF_UP, "0.25338059457177459"); + t("0.42", "0.6454542256567", 19, RoundingMode.ROUND_FLOOR, "0.5768703495516482206"); + t("-6787.538178", "5626573517472222222222222222222", 20, RoundingMode.ROUND_CEIL, "-0.000000000000000000000000001206335997729813602"); + t("0.340076551907", "234035028867", 9, RoundingMode.ROUND_CEIL, "0.00000000000145310108"); + t("0.000838297817599865926864163309605652676788139517982002476908522680686751", "81.697999595", 21, RoundingMode.ROUND_HALF_DOWN, "0.0000102609344381272958488"); + t("0.2153", "9", 9, RoundingMode.ROUND_FLOOR, "0.0239176604"); + t("52202450", "64731284666", 1, RoundingMode.ROUND_HALF_UP, "0.0008"); + t("8.208", "80.9", 10, RoundingMode.ROUND_HALF_UP, "0.1011125923"); + t("97722151513070236666.21811081663", "0.9899799399999999909999", 23, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192212"); + t("7679755070666787109", "74648", 32, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948868991296630955458"); + t("523567.7044403", "0.660777777777", 24, RoundingMode.ROUND_FLOOR, "1.57079506472740816894896"); + t("68958572525.5433", "0.000000677119034945732293948820487008543522088096686303106884126333973432749658820338", 36, RoundingMode.ROUND_UP, "1.5707963267948966094121069059085482"); + t("0.6566791973", "801980056.94486167594213", 10, RoundingMode.ROUND_DOWN, "0.000000000818822353"); + t("482.9583917", "3789299999999990979.9669909999", 32, RoundingMode.ROUND_HALF_UP, "0.00000000000000012745319497004754166522200204638"); + t("-1949659070.376644484034863272798121513664062994778943096558824", "-8886.815614", 9, RoundingMode.ROUND_HALF_DOWN, "-1.57080088"); + t("4431377.27042127436917590315254309483378721", "0.8", 15, RoundingMode.ROUND_HALF_DOWN, "1.57079614626412"); + t("5961799.99", "911.2324", 16, RoundingMode.ROUND_HALF_EVEN, "1.570643481614845"); + t("0.934752030615316", "96689240809", 23, RoundingMode.ROUND_CEIL, "0.0000000000096675909624921543632344"); + t("-922222214222222222422222232322.222662222222222227", "874665.89", 31, RoundingMode.ROUND_UP, "-1.570796326794896619231320743207"); + t("287898159259", "778880.8888887888888888868", 37, RoundingMode.ROUND_HALF_DOWN, "1.570793621390697816456286761436479132"); + t("1216986674408109384277303994202349851322550729232601464617197535382.888888887788894209076", "91641406110048360", 13, RoundingMode.ROUND_UP, "1.570796326795"); + t("862.740845", "1000", 29, RoundingMode.ROUND_HALF_UP, "0.71184443469461056391740090478"); + t("-926072566053233004073285", "0.00000000599211109347", 5, RoundingMode.ROUND_UP, "-1.5708"); + t("9986.5203655", "7171111111", 1, RoundingMode.ROUND_HALF_EVEN, "0.000001"); + t("225.87560703109227408454", "0.88758646183059468848948231433988", 29, RoundingMode.ROUND_UP, "1.5668668104338539029165076205"); + t("0.9190502292705932910124493077853095022286775795149946411396448", "2101658249768616009892130860834432476864120339771823329473169", 27, RoundingMode.ROUND_HALF_UP, "0.000000000000000000000000000000000000000000000000000000000000437297657395904861242562965"); + t("0.4552621802829191051015900362683019948", "-32960803465025234145079948014376198384934309721500000000000000.26967294829485318777777777777777", 6, RoundingMode.ROUND_FLOOR, "3.14159"); + t("29.999", "0.8050763475", 16, RoundingMode.ROUND_HALF_DOWN, "1.543965993928448"); + t("88889097384382106698025391343599514.60032949411735283738602699668750678", "0.04736", 33, RoundingMode.ROUND_DOWN, "1.57079632679489661923132169163975"); + t("999520951544273413368092334552401740154932988", "24809120297367542075258699406593", 13, RoundingMode.ROUND_DOWN, "1.570796326794"); + t("813873507649546526", "4.31665946310955152589402274708327", 20, RoundingMode.ROUND_FLOOR, "1.5707963267948966139"); + t("43304119648082849952688", "879999999999999.999999999999999999999989", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("641111141.1117111111111011155111", "1552.10005", 32, RoundingMode.ROUND_HALF_EVEN, "1.5707939058417256829609475971151"); + t("2.858320224", "77921.02", 36, RoundingMode.ROUND_UP, "0.000036682274214556718488071936068165058"); + t("-0.0000741", "0.8", 16, RoundingMode.ROUND_HALF_EVEN, "-0.00009262499973511132"); + t("51514.48", "0.000000064386793233830955427947954", 26, RoundingMode.ROUND_DOWN, "1.5707963267936467416583784"); + t("-897898654744374829341275817227823.3337213505304276068495476987", "5493878166214853350327765989051441094274659966523", 68, RoundingMode.ROUND_HALF_UP, "-0.00000000000000016343621528888123707284440587275777372063234100086558050135164781429"); + t("57725.564", "0.446959187807178770400687410674", 68, RoundingMode.ROUND_DOWN, "1.5707885839656052805303854194973888134360825156402291636716918121543"); + t("787846777122986402148649046024343425", "3494310823124439062970422012170.9324176672721964560857", 52, RoundingMode.ROUND_HALF_EVEN, "1.57079189152788205854518597399366633685361469016492"); + t("2523793333333333333333333333333333303333333.330333633333333333333333333333333", "0.0000005847750268704", 33, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169163976"); + t("-5047640698785529", "-792691634849513080555342777847666887217887", 28, RoundingMode.ROUND_HALF_EVEN, "-3.141592653589793238462643377"); + t("947405117470.397399028771869", "0.89351904374780104842539682802731561624122447523995143501602058431961893055", 65, RoundingMode.ROUND_UP, "1.5707963267939534967726489687470164988839147693362400193256076666"); + t("0.73981360657233059", "97648554156675716240.187114849852578", 26, RoundingMode.ROUND_HALF_EVEN, "0.0000000000000000000075762883840073062525170162"); + t("66.28183", "5", 31, RoundingMode.ROUND_CEIL, "1.495503473971283236931882809234"); + t("6", "85050664469073.174660813925577455996817617", 28, RoundingMode.ROUND_HALF_UP, "0.00000000000007054618605809681327727291163"); + t("0.8319617308318998023232204795714927228863899", "7.7969995790929", 16, RoundingMode.ROUND_FLOOR, "0.1063005951940995"); + t("49208.4509", "28996522049382111111111111.5555555555555550732287872912893674405770869374", 31, RoundingMode.ROUND_HALF_DOWN, "0.000000000000000000001697046660154492089344744646408"); + t("8689.21095", "4269907811927647439162392448190057", 75, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000020349879511982392629564502068302034085439986737311111007223088238051221344"); + t("4.0000006004000000000000000000070200010000000714", "-644444444478444240001463792772198644166566230640", 24, RoundingMode.ROUND_FLOOR, "3.14159265358979323846264"); + t("0.235046402741794215627875733797444239550331806761511", "0.09354645439157534048835319238174296107473583143507343", 49, RoundingMode.ROUND_UP, "1.192022672269026110071373409205873506304496249814"); + t("0.60000438128007706956169305392757", "50682094179408222", 52, RoundingMode.ROUND_UP, "0.00000000000000001183858699990054130196796450643756666625288800476337"); + t("16273386611850313635381626346981510285924094877", "830.5", 6, RoundingMode.ROUND_CEIL, "1.5708"); + t("-7813.344", "-0.101744241773202522452", 72, RoundingMode.ROUND_HALF_DOWN, "-1.57080934865106568738467022857792299672448149768669427867474943259370629"); + t("0.38", "0.594599814920383974", 60, RoundingMode.ROUND_HALF_EVEN, "0.568664012785082634784314551280343894029549188690062607436198"); + t("93333333333333165517836294237943615448498575", "613.9895", 69, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169163975144209857812122862433904707264592338"); + t("0.3246", "73038492241055666666666666666666.5555", 68, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000000044442319390807344037661791786520135349230695663651444087006145281737"); + t("-406.57", "-8778255251.85699", 42, RoundingMode.ROUND_DOWN, "-3.14159260727421134489761668120485281273039"); + t("50000000000000", "5080813463339358257878281554.717422315132024007818", 21, RoundingMode.ROUND_HALF_EVEN, "0.00000000000000984094384900672241813"); + t("0.000002179", "0.96673424450364607019651168", 65, RoundingMode.ROUND_FLOOR, "0.0000022539803595300194681114148797071884158023887874845052495041153913"); + t("8622400540362.94871556929", "541447", 8, RoundingMode.ROUND_FLOOR, "1.5707962"); + t("0.138189319113511347137924930418", "139753794626037234827306926400055829815083121111.111111", 51, RoundingMode.ROUND_CEIL, "0.000000000000000000000000000000000000000000000000988805488132095315892765838171563172379750966521774"); + t("19.999999999999999999999999999", "9542458972.501172704181748223", 80, RoundingMode.ROUND_UP, "0.0000000020958958333103320141004224442168791368325664782132264778620499262973695568527535"); + t("410700.701", "0.606668785863895019212099055085195487849958312455", 67, RoundingMode.ROUND_FLOOR, "1.570794849639429423050979274694933539195837268137961437640950996861"); + t("0.476", "6999999.2222224911910766620573", 13, RoundingMode.ROUND_HALF_EVEN, "0.00000006800000755555"); + t("-34048362989387869277964355581", "-0.0008996784466828404717445418820716869503745427219", 63, RoundingMode.ROUND_CEIL, "-1.57079632679489661923132169163977786564343950667442283213359426"); + t("0.0000000698418653331655967", "0.8947132038", 65, RoundingMode.ROUND_HALF_DOWN, "0.00000007806061767786046709112137453371027329182230515078814751205746518"); + t("114229667550682.7178796822784", "0.6608784777363760663334650566027697485717134025", 17, RoundingMode.ROUND_DOWN, "1.5707963267948908"); + t("73368353.8888888888888810504146631786", "445140940.9309324958156678733323764594643243206053835", 64, RoundingMode.ROUND_HALF_UP, "0.1633518742891569177244761578885171295189514744773156389661261091"); + t("82850854585", "-8273344452845283560427471.768708480985", 35, RoundingMode.ROUND_HALF_EVEN, "3.141592653589783224271277700833399"); + t("717", "615", 35, RoundingMode.ROUND_FLOOR, "0.86182558344419964364716468649112431"); + t("150001902000.08", "7.858242722757673749482220803657875450244", 28, RoundingMode.ROUND_HALF_EVEN, "1.570796326742508998687993629"); + t("56541283389999", "2874933333333333333333333339333333303333333303333333333333333373363333.333333333333333337", 26, RoundingMode.ROUND_FLOOR, "0.000000000000000000000000000000000000000000000000000000019666989399174125776829607"); + t("-0.00270026629", "-8862100000000000100000000000000000800000000000000000000000000008000000000", 15, RoundingMode.ROUND_DOWN, "-3.14159265358979"); + t("0.0909963684278308881356657211097", "5274.48717", 8, RoundingMode.ROUND_HALF_UP, "0.000017252174"); + t("295056345973736.54669757424146971983563162", "0.7039723886049016", 30, RoundingMode.ROUND_HALF_UP, "1.57079632679489423333995480145"); + t("62337.55466065806761422", "2522222222.2222222222222222200225222222222", 44, RoundingMode.ROUND_HALF_EVEN, "0.000024715330036638166652060657233169860764148856"); + t("-0.15876124936", "8955044444444411111111.4", 49, RoundingMode.ROUND_CEIL, "-0.00000000000000000000001772869474237990404673686859752397572702732092879"); + t("5", "9009076330.51", 3, RoundingMode.ROUND_UP, "0.000000000555"); + t("0.69130296174593221057981513", "6444443333333333333.4444494733586153883333333333", 15, RoundingMode.ROUND_HALF_UP, "0.000000000000000000107271167731467"); + t("44680208.4041379899", "7000000000000000000000000000000000000000000.000000000000000000000000000000000005", 12, RoundingMode.ROUND_FLOOR, "0.00000000000000000000000000000000000638288691487"); + t("-80000000", "8.3333333333333333319", 5, RoundingMode.ROUND_HALF_DOWN, "-1.5708"); + t("155.86990399999999", "130934.482", 22, RoundingMode.ROUND_CEIL, "0.001190441417636709863953"); + t("55159964107862172526.59611662529658", "84816547626853206983495770333878447.817757370500119194511024", 59, RoundingMode.ROUND_CEIL, "0.00000000000000065034436853685778396060322836618901826619037415274281887734"); + t("8399999999999999999999999999999.999999999999999999999999999999", "560000000000000000000.0000000059", 42, RoundingMode.ROUND_FLOOR, "1.57079632672822995256465502497318354086331"); + t("8747.7171716145707545766828188434", "-4817234351", 65, RoundingMode.ROUND_DOWN, "3.1415908376687617468072037426025807012111991975531273987932576975"); + t("4207187731399", "40000000000000000000229440352", 32, RoundingMode.ROUND_DOWN, "0.00000000000000010517969328497499999939668835373"); + t("0.505090515538355263937759890757567437744214479108", "8669999939999999999799999999999999999999.999999", 69, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000000000000000582572686313484869469804568976545039207474977843873167795544398243511"); + t("2394", "2933042.5", 57, RoundingMode.ROUND_HALF_UP, "0.000816217108468118889984138681023786366426898906900808600709"); + t("-539", "-463506809059574", 60, RoundingMode.ROUND_CEIL, "-3.14159265358863036449948932107775632979987627215871175593542"); + t("8", "34771777077777777777777207777777777777777772777777777777577777777777777577777.7", 24, RoundingMode.ROUND_HALF_DOWN, "0.000000000000000000000000000000000000000000000000000000000000000000000000000230071646384524397891345"); + t("9202000000000", "8888888662058000834208351556222", 77, RoundingMode.ROUND_FLOOR, "0.0000000000000000010352250264173638588515858855529819563233852487199192841197380968985626263798"); + t("8384", "50067665418491", 46, RoundingMode.ROUND_CEIL, "0.000000000167453383933967479889698294164970545928036606"); + t("-0.0096650112713053846", "5.569159654804851541228911178985448881121", 65, RoundingMode.ROUND_HALF_EVEN, "-0.0017354506186537126487125042760001812877167763068882219911772241614"); + t("3850999.99999399599949999999976", "0.09404893269295268655", 65, RoundingMode.ROUND_HALF_EVEN, "1.5707963023729457770866067456137467263069177156624754981170173206"); + t("72", "820775266218", 72, RoundingMode.ROUND_CEIL, "0.0000000000877219416366728291773605174674783866759527644802602635722988756877042285"); + t("0.07940651574854280592952225419183", "7798.55655555555575553555555395", 28, RoundingMode.ROUND_UP, "0.00001018220681995705597119112577"); + t("2999099999999999999999999999999999979999999999949.99999999", "-53.2348", 69, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169163975144209858469970530316889832888646433"); + t("199399999999999999999999997999.99999999999999999999", "307380.248169", 22, RoundingMode.ROUND_FLOOR, "1.570796326794896619231"); + t("0.13587828986565947904698163270905972434", "7000000000000000000000000000000000000000003000000000000000000000000000000", 51, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000000000000000000000000000000000000000000000000000000194111842665227827209973761012942463342857059666353"); + t("80669.812870108112208205", "3005546956024728", 48, RoundingMode.ROUND_HALF_EVEN, "0.0000000000268403102830925809749702393556352306894679075188"); + t("2513496378990548006080980268466700824", "2564007187444453449093812715797821774955852745108", 46, RoundingMode.ROUND_HALF_UP, "0.000000000000980300051926044100770925592432144521368379368"); + t("0.18010000702", "4672276073644403572947705660178488072021.78441766440589398141169253050299259590121813", 72, RoundingMode.ROUND_HALF_EVEN, "0.0000000000000000000000000000000000000000385465251156533021696628111332831874070723326920768289052719210101664011"); + t("8700000000000.00000000007000000030000004", "1888888888888888888885062505555.55555555555555555", 13, RoundingMode.ROUND_CEIL, "0.000000000000000004605882352942"); + t("71890445.90563298279624029270725221", "0.000001090051583746583950007465157227996666044002068948879023179146542", 71, RoundingMode.ROUND_UP, "1.5707963267948814565546959625336056450770273032661049665475562436220387"); + t("-0.02", "-7298528041", 21, RoundingMode.ROUND_UP, "-3.1415926535870529599"); + t("0.436354155424978418245846922444423565152727720923742019227068912", "7975999999.198659290066582940860087396827790079638532945397148056", 16, RoundingMode.ROUND_CEIL, "0.00000000005470839461745468"); + t("1", "0.00000000695709", 80, RoundingMode.ROUND_FLOOR, "1.570796319837806619231321803883357315860524440059072154894112275839238247732918"); + t("0.72136203078", "5474362296194094550090482.923793727492090221025843204529862385923", 19, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000131770970160580686"); + t("731311.93", "385", 18, RoundingMode.ROUND_DOWN, "1.57026987570249844"); + t("552.08", "2771095806", 66, RoundingMode.ROUND_FLOOR, "0.000000199228045022703446597396240333679928845038245453175541728276674462"); + t("716999.9999999599796999999999999991999999999999993", "3045400000000000000.00000070004", 1, RoundingMode.ROUND_HALF_EVEN, "0.0000000000002"); + t("22.444444444404444444444", "0.8326894326878041279412076", 52, RoundingMode.ROUND_HALF_DOWN, "1.533713310159717755995025221419523541262221167291561"); + t("-85555555555555555555555555555555555555555555555.5555556555555555555555", "-9.784", 12, RoundingMode.ROUND_DOWN, "-1.57079632679"); + t("0.271689365049798215305422610175534246120492665801364768824", "0.00000639228604464693506", 6, RoundingMode.ROUND_DOWN, "1.57077"); + t("9800000000", "333271222695648829749747890684365623964338093639", 39, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000000000000294054791791897135983919384952858393401"); + t("4499999999929999999939999999991999199999999999999999.99999995999999999", "7.863972", 16, RoundingMode.ROUND_HALF_DOWN, "1.570796326794897"); + t("6", "0.00000028167928621575529766", 42, RoundingMode.ROUND_HALF_UP, "1.57079627984834891660547323803119492936337"); + t("0.3249000705827196804", "0.7718128676342284", 54, RoundingMode.ROUND_HALF_DOWN, "0.398441257713642142729485937996462714300160707081982739"); + t("0.5593", "0.000676620931", 66, RoundingMode.ROUND_HALF_UP, "1.56958656351773661224055707452323576124727487210836199578867158488"); + t("0.0000087265426611852", "6", 12, RoundingMode.ROUND_UP, "0.00000145442377687"); + t("-8.92434", "88503263239117493.42120933", 17, RoundingMode.ROUND_HALF_DOWN, "-0.00000000000000010083628188814102"); + t("1", "664671777429332152402833736080035533881459524230179807170497605261107336988689", 2, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000015"); + t("0.8", "191257814057.39927238065635918285763", 54, RoundingMode.ROUND_HALF_UP, "0.00000000000418283563441705068372566203793977550448631727901941265"); + t("6991014.797500160035784", "946505104", 1, RoundingMode.ROUND_FLOOR, "0.007"); + t("-97966.08824711", "-0.003559666787189616866676207056923022", 53, RoundingMode.ROUND_HALF_EVEN, "-1.5707963631306006458195782123690681635144390511258441"); + t("189333333333333333333333333.3333333333333333333333333333338333333333", "6.47346213934908352767460585419606355", 48, RoundingMode.ROUND_DOWN, "1.57079632679489661923132165744893028356469282816"); + t("0.94505786871819597246", "9111111111111182022734293197272050854049963311", 37, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000000000000000000000000001037258636398011896806803663621155943"); + t("0.7438518828075104881499", "0.76258237013165730785567339736049127777081956726098640526043729271895807", 31, RoundingMode.ROUND_DOWN, "0.7729651467167123554818440506437"); + t("83533182138147494870121987522346", "0.009392", 41, RoundingMode.ROUND_FLOOR, "1.5707963267948966192313216916397513296642"); + t("362", "2506724706720", 64, RoundingMode.ROUND_CEIL, "0.0000000001444115498720519189272338674406980825379607219643558892774929407"); + t("0.9253862184671237368152794182787935", "12877819865812448178771914094.09710263695640835246083", 59, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000000071858919297652568050064399398015137322363818743953089739364"); + t("847789217337737", "0.5976", 26, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948959143391294"); + t("-0.000307432687", "7124191139111299440532075106814928077188804754", 71, RoundingMode.ROUND_DOWN, "-0.000000000000000000000000000000000000000000000000043153346253193089223898304736433433133388464920941881358414811738193997"); + t("0.6", "0.0000000013528340815614620966244896461570376127273014", 69, RoundingMode.ROUND_UP, "1.57079632454017314996221820108643983025474406638597295509364460993816"); + t("0.00000000125789198203896836681457806116148088891998930658", "0.000867055605993776442129572577502712404610398948204958661", 37, RoundingMode.ROUND_UP, "0.000001450762757708430954351232085048048261"); + t("6222222222222222222222222202222222222222222222222229222222.22222222222", "7", 50, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966192313216916397514420985846996876"); + t("855555555555055555.5555", "0.49823191607458405702142065964532686704234862853363709091535", 6, RoundingMode.ROUND_UP, "1.5708"); + t("4900000000000001.0000000000000007", "71", 30, RoundingMode.ROUND_DOWN, "1.57079632679488212943540332429"); + t("0.000836037756216127544172538953313035458811065914777224", "0.8", 51, RoundingMode.ROUND_CEIL, "0.00104504681483015964680459559513497107917440131451763"); + t("45555557468736007923119843488087408928314026966666666", "755.555555555555555555555555555555555555555555555", 18, RoundingMode.ROUND_UP, "1.57079632679489662"); + t("-371105052082544116646941698", "0.52", 27, RoundingMode.ROUND_HALF_DOWN, "-1.57079632679489661923132169"); + t("30", "0.000387513702", 6, RoundingMode.ROUND_HALF_UP, "1.57078"); + t("88969719", "31998.667003", 75, RoundingMode.ROUND_DOWN, "1.57043666885753387160734748959060694517469349958597335775114594897262080956"); + t("0.190811111101111111111111111111111111111111111101111111111911", "915981763116.3083755645", 55, RoundingMode.ROUND_DOWN, "0.0000000000002083132206169071281090007134962444838288187667109815319"); + t("-0.97613492338", "1000", 77, RoundingMode.ROUND_FLOOR, "-0.00097613461334690937183124824706676025511510522855069274720668193641126745792312"); + t("46711211111.1111211111111101111111110111711111018111111", "0.000000943924606019", 47, RoundingMode.ROUND_HALF_UP, "1.5707963267948965990236545477991978626225245004"); + t("522222222222222249887233252348593997199", "0.00044469624914679204", 18, RoundingMode.ROUND_HALF_EVEN, "1.57079632679489662"); + t("957778444444444444444444.44444444444444440395167888", "785388108310407536073619590474753683", 63, RoundingMode.ROUND_HALF_UP, "0.00000000000121949700321398727420969204332005559535881551765569513818335503"); + t("-866666666666686666666.66666", "-0.932941427215657334221659606", 7, RoundingMode.ROUND_HALF_EVEN, "-1.570796"); + t("5815914477777777777777", "21732449481235146381811645046.99999999999999999996082473392260187802", 67, RoundingMode.ROUND_UP, "0.0000002676143102414379150094699152789350675234261751374702332920930090893"); + t("78444560534111200373.23916949958", "5000000000000003388137027782617141636787288888888888888.5533111111111111111", 72, RoundingMode.ROUND_CEIL, "0.0000000000000000000000000000000000156889121068222294434110269496387135314997606932915552385376244082818539"); + t("0.8", "0.000000096690896107275021443171939148295677686", 71, RoundingMode.ROUND_FLOOR, "1.5707962059312764851381334135202341776907724357527465371824278613215736"); + t("74313813150449442892949299008231728728590284597", "82480", 79, RoundingMode.ROUND_UP, "1.570796326794896619231321691639751442098583589799680072930504818936724207933546"); + t("0.3640478454413956", "26991849287468.3929524171920498244716354972778737149", 57, RoundingMode.ROUND_HALF_UP, "0.0000000000000134873250648451663456662059384555360296590059572293343928"); + t("0.910129910337889039851982244155368848722689712095885582577230458041015490054002", "0.463084746675", 28, RoundingMode.ROUND_HALF_DOWN, "1.100124232998932970365593437"); + t("0.8919", "155.29", 64, RoundingMode.ROUND_HALF_EVEN, "0.005743384590778067366763261861126063310613559614687803146870941563"); + t("0.99925339144017", "-66980033484813258242348786245385094.00245356395248", 25, RoundingMode.ROUND_HALF_UP, "3.141592653589793238462643"); + t("0.10369175554467917615854922309960767461520941133915", "44479.7", 5, RoundingMode.ROUND_FLOOR, "0.0000023312"); + t("3.5", "0.000000008848987153603110470298528", 32, RoundingMode.ROUND_CEIL, "1.570796324266614575344718705513"); + t("0.3089534", "326841933099345383626137", 74, RoundingMode.ROUND_HALF_UP, "0.00000000000000000000000094526854944922851537915834177447643899722521803714565202692742365822704837"); + t("-277777711589906235083175000.51893625", "6050853048", 57, RoundingMode.ROUND_DOWN, "-1.57079632679489659744824552844814262348611839189934020474"); + t("2727734053456600109866.74210953941560655", "4", 63, RoundingMode.ROUND_UP, "1.57079632679489661922985527302209655112961231479316305424934257"); + t("6183616991936473787444444.759666840938775326408653850145723437948036", "96501", 50, RoundingMode.ROUND_DOWN, "1.5707963267948966192157157768287534933010781701336"); + t("0.3816782708148649427710242176191772147035994415192157489338265102978333", "28555555555555555555.8888888888895544444444444", 52, RoundingMode.ROUND_UP, "0.00000000000000000001336616512581239099182536756107034122967941904529539"); + t("2485561.90357258782385", "6825010000000000000000000000700000000000000000000000000000000000000000.3", 67, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000000000000000000000000000000000000000000003641843606928909736176210730453246145448836439020111690485834848328"); + t("887788.3333335580977668913612804444444444444444", "0.00000715112142335866980551512012042373518890511635831455180315436530052682457102384", 7, RoundingMode.ROUND_HALF_EVEN, "1.570796"); + t("-514852357057986062994865768056.010829047916", "0.358688631109424963897214146711028726612352", 68, RoundingMode.ROUND_UP, "-1.5707963267948966192313216916390547595910808502138101402121311883286"); + t("953621255039705357524", "600000000000000000000000000000000000000000.0000000003", 80, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000000015893687583995089292066666666666666666666653283688742851530036621539973169122178"); + t("6009059890752198994.931947559135", "81000", 69, RoundingMode.ROUND_FLOOR, "1.57079632679488313958534168450358662012259836575823503355642788284945"); + t("6301777650264807527606407.79", "0.303429201177441790040853059436420969535391415", 14, RoundingMode.ROUND_HALF_UP, "1.5707963267949"); + t("0.508532029156598012762", "273000008000009000.1", 41, RoundingMode.ROUND_HALF_EVEN, "0.0000000000000000018627546309690263737429847096038681258029"); + t("0.1", "17655.255", 55, RoundingMode.ROUND_CEIL, "0.000005664036005083507613140391809154652922564053664617116322"); + t("9130434089206742874953209107471499.8505620008294", "17118972635542936816680469518.41781118950666352332280140228557", 72, RoundingMode.ROUND_HALF_UP, "1.57079445185965605279044999058586033621080492342904151489896211768597626"); + t("0.3", "486439999909999999999999999999999399999999.999996", 19, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000000000000000000000000000006167255983379354162"); + t("63333333333151751021975072199.2222222222222222226", "8590693135719081000000000000000", 62, RoundingMode.ROUND_DOWN, "0.0073721858013158475326612162814653787461267737439174487861026013"); + t("0.3", "2955555555555555415.5555355555555555555555555555555555555555555555555555555554", 54, RoundingMode.ROUND_DOWN, "0.000000000000000000101503759398496245409577259879021088172264979684906928"); + t("78.67058656222838307354", "0.5104050647482914960956486304887317342958181", 36, RoundingMode.ROUND_HALF_EVEN, "1.56430854113297639945343150045558517"); + t("558237752296994291889448880636637388506726206789", "8027039319494444444.111144444", 8, RoundingMode.ROUND_UP, "1.5707964"); + t("911625.23816", "56520624522828171304.1025054050358", 73, RoundingMode.ROUND_DOWN, "0.00000000000001612907227859456462743068858264105153760190997024045425386933591210809537"); + t("5266.67686464666261", "0.00000000167590885977528315984048072961617045513", 43, RoundingMode.ROUND_HALF_EVEN, "1.570796326794578409304484321748279794368215"); + t("10.888888888888888800000000000035892755468", "58005622385554", 50, RoundingMode.ROUND_UP, "0.00000000000018772126633711821379415126469879391357744988323783"); + t("0.4550302", "683434088778.25834857963", 79, RoundingMode.ROUND_HALF_DOWN, "0.0000000000006657996834975486880255779079976204211201004703240843475688893759711361422602403"); + t("0.0745267565134859474530048927022276067793032707", "0.050586420619636514529022", 20, RoundingMode.ROUND_DOWN, "0.97446220574663666057"); + t("800000000060000000000000000000000000000000.000000000000008", "144444444444444424446444444443.444444444444444444444444444444444444", 66, RoundingMode.ROUND_CEIL, "1.57079632679471606367577967777585903758478438008294954665446993905"); + t("4222222222367469117999999999999.555555555823012944", "98999909979999959.9999999999799994", 69, RoundingMode.ROUND_FLOOR, "1.57079632679487317188422197193578891908046309743660965648351602275652"); + t("6616960060366.50251650564673", "579612605523231", 36, RoundingMode.ROUND_HALF_DOWN, "0.0114156810238153418573275479248302201"); + t("-0.6504641440112161552291909916", "24886142644444444444.444444444", 60, RoundingMode.ROUND_HALF_UP, "-0.0000000000000000000261376040997830198845481669370901826998725246766964726126738"); + t("99999999999999999999999999999999999999999999999999999.99999999999999999999999999999999999999999999999", "19086288866.2257012", 50, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966192313216916397514420985845088247"); + t("8197787231172738725.5774", "6.46892260834548356954709505752561186263393169", 68, RoundingMode.ROUND_DOWN, "1.5707963267948966184422157504966475762782739892124651803244416403843"); + t("51.0000009000000000000090000000000000000000002", "90772622330564.060653963225938303580188", 63, RoundingMode.ROUND_UP, "0.000000000000561843423607117534191261323924958111190584029202513323292374365"); + t("-0.0604954", "9111111111117444022222222222.3188953925937450263124142312222222222222222", 1, RoundingMode.ROUND_HALF_DOWN, "-0.000000000000000000000000000007"); + t("0.000005643770199768478098884083985", "349244.44644444374144444344444443444944", 57, RoundingMode.ROUND_HALF_EVEN, "0.0000000000161599425766853648363364073023958125293699441464356115652"); + t("5673730432.326424160414934768370361759553037165792", "65597145961.9207820332919443013", 118, RoundingMode.ROUND_UP, "0.08627882924504144252392276734222075412180818597682599869394468010538285299500589341542228404156281024092976034837551614"); + t("939999999059999999999999989.9999969999999992999995999999999999099", "37145067204920971793579468183662589324665184947345467800343057", 123, RoundingMode.ROUND_CEIL, "0.0000000000000000000000000000000000253061865220012031616992515601070666353812243972376901425105032672180959249727267706519135872452298317711183753842326560592"); + t("90675342005334806887442264791247186269473633710123648176765805468096", "106873.27921424606462606424603195644", 46, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192313216916397514420985847"); + t("475.473345055726543480358", "612840.58", 74, RoundingMode.ROUND_FLOOR, "0.0007758514451714584415747967396599570746683182533390873476901223817395948807"); + t("-38014499131339501012126880129168179993490051185475430006436599261441358462456512690", "6990907000000000000000200000000000000000060000.05", 127, RoundingMode.ROUND_HALF_EVEN, "-1.570796326794896619231321691639751441914683631417613973298550235689528271033190290020820541296084443635964775399337056335457265"); + t("57.9999999999999999999929999999", "19997999999999999999999990999999999999999999999999999999999999999999999999999999999999999999299999999999994999999999999999999.9994999949999", 155, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029002900290029002900286541705425673080359341063050072448797765938297308103342936252619934228226570671539489980203524521349560779021476290960965410594631222"); + t("388081539591508", "0.3600000300000000080000000000000000000000000000000100000000000040000000000000000000600070001", 160, RoundingMode.ROUND_DOWN, "1.570796326794895691591139736750577359980201797348419482301534281807518368049536303842930579449089623561438389027072889451021530866166889581732833385988629713477"); + t("74444444444044444444444444444444444444444.4844444444444444444", "0.0007892923483667236437054452542844278295922242621", 87, RoundingMode.ROUND_FLOOR, "1.57079632679489661923132169163975144209858468908511838013123116532063990966422355575201"); + t("-0.014869942083264911", "-0.47", 93, RoundingMode.ROUND_HALF_EVEN, "-3.10996502894018623869273412665936651659583119825454705118276901585992591408747336451834235146"); + t("90000000000000000000000000.00000000000871538849", "0.0313112827186094571378276243115802208615294314390345397", 67, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231321691291848300780701842600579307025469842171"); + t("0.3561516175756533509053437769606022684486111442975188882974713", "15188551817115235", 40, RoundingMode.ROUND_HALF_DOWN, "0.00000000000000002344868831894318850628511890292486056153"); + t("73545555555555555555.2222222222222222222818", "8.2290721711283041442169374009407381746209347811710572457", 37, RoundingMode.ROUND_UP, "1.570796326794896619119430876362516264"); + t("527570953437555555555.4444444444444444440798959077531660845614416733", "-336804713959173247808714881934", 95, RoundingMode.ROUND_UP, "3.1415926520233930915172339857266737549965681811528898816381529012984741153720703179623023182367"); + t("0.005945", "7295", 103, RoundingMode.ROUND_HALF_UP, "0.0000008149417409182568767149058509328072603537235396433119814988411859032687286426926288685603300363493277143"); + t("5109488042481583560594618955014760052217803368312700031656729319392325739", "0.519615", 71, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966192313216916397514420985846996875529104874722961539082"); + t("1434739683164837060899588741970428301109811340096", "0.0009273644299323217018673398694391347598993374702121570066366018717730230145916352617505325", 61, RoundingMode.ROUND_CEIL, "1.570796326794896619231321691639751442098584699687552264123229"); + t("706920127092661533733984414445.089890749840117091653824629520886729762", "-169872864336112104020726570795461221718265725321376430174.52335448815227579262668", 142, RoundingMode.ROUND_DOWN, "3.141592653589793238462643379118037014675228069660888940562869900100248330407950796643011954152084947410182517090756653781645877879342097596571"); + t("4075996728803502830728084267643655667846130396162730931065775207683738078056355767106192174147912066537115071583", "77375192357347218364695170045681693550", 77, RoundingMode.ROUND_CEIL, "1.5707963267948966192313216916397514420985846996875529104874722961539082031242"); + t("155555555555555555598994897038540406940755555555555555", "96666666666666666666667666666666666666.666", 7, RoundingMode.ROUND_FLOOR, "1.570796"); + t("4600006000000000000000000000007000000000000000030000.000000000000000000000007", "53781964492385803857190739164330109945559913475216464", 14, RoundingMode.ROUND_HALF_UP, "0.085322987399437"); + t("-78554.752255337", "4383050152545578165087801332098875057621462246788747638205441138068067770199919506107475042865167740779850510330719650759108362481111111111111", 127, RoundingMode.ROUND_DOWN, "-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001792239411399710881184209787283307230207222040239384487045680227529030969097655048737889667297741731879026792206937834579023225"); + t("3085950", "9.90993971032766390432233921213817192041660750004055193", 56, RoundingMode.ROUND_HALF_UP, "1.5707931154856692196952100900630498521067000388981372565"); + t("14000000", "76.475", 131, RoundingMode.ROUND_CEIL, "1.5707908642948966735629968208753661190832042756641792784894233165261746294274185996818711440256007598677828685147815670102366511391"); + t("211241676502628221219793186545403.486955273995091037", "96624112222847210433334940.22222222222222222222062488297919577777", 6, RoundingMode.ROUND_HALF_EVEN, "1.5708"); + t("154555555555555555555555555555555555525555.5555555555555555552555555", "-0.7860956628161953581884820771006389576759185736897752128", 28, RoundingMode.ROUND_UP, "1.570796326794896619231321692"); + t("575777777770.77", "524616934316417153899378645858026091229809910018942469690", 80, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000000000000000000000000000000010975203812683174359989646721816723660646622799653323065394581960537483832521191"); + t("960457811409", "2333333333333328110699.3333333333333333333307232064087151031745418999316615459943791920297070705240010758940605765", 158, RoundingMode.ROUND_CEIL, "0.0000000004116247763181437784477029995887971025546125122842574148198523447703490496341287183223586703348067900053478437583134541796800240456174338686954147874623490829"); + t("533333.3333333334", "922222220225222222222222222.2222222222222272222222222222222222222222222222222222226", 103, RoundingMode.ROUND_HALF_EVEN, "0.0000000000000000000005783132542643403275774685189819086375496165522251643741360961077125030599680489044060781791722759736505"); + t("-1213052935390720856136161603724893814945934800487116246890128261574986432718.66666666666661615563618122128976782073971012173735182265777947666666666666666", "-0.864965903356194138749427987164", 104, RoundingMode.ROUND_HALF_UP, "-1.5707963267948966192313216916397514420985846996875529104874722961539082031438175480838780545011058279672"); + t("299999999999999999999999999.9999999999999999999999999999999999999999999999", "8557565157217275", 87, RoundingMode.ROUND_UP, "1.57079632676637140204059744163975917897437655189852296386977663710403911156996803424225"); + t("672222212242222222222.222222222222222222222225222", "0.4755369359224074102457672369037381586014646118191591359349217629961588316582832", 15, RoundingMode.ROUND_UP, "1.5707963267949"); + t("6308094194416280698208660751199568253728", "92889558252169299144957894231545625455705206677758599211541447", 66, RoundingMode.ROUND_HALF_EVEN, "0.0000000000000000000000679096156027737856870165953753010327142869437910974946998524292627"); + t("26947777777777677777777777777777777.7787777", "300000000004291609999999.2668327565896732", 92, RoundingMode.ROUND_HALF_DOWN, "1.5707963267837639758468388049478826922782780286379596969497807279177871719387440424892054061"); + t("4111133333333333333333.130360235582450303783087", "1", 138, RoundingMode.ROUND_HALF_EVEN, "1.57079632679489661923107844971132943356890106434655179610369401341449147388184391523024067042532948214487486271087697842887765621904132833"); + t("9.387", "144718405926643364937168740.93824547790299923517696863", 3, RoundingMode.ROUND_CEIL, "0.0000000000000000000000000649"); + t("0.3000400000000006", "0.0001192436", 143, RoundingMode.ROUND_DOWN, "1.5703989011392442483258571456983611798893099597754989211615684357807274378942371392781848868210708820723949502580797752840609519432607061668651"); + t("-681448701858025247424232747157355982201956736129373600", "-50791264842224736352", 7, RoundingMode.ROUND_HALF_DOWN, "-1.570796"); + t("869", "4793567839326192888", 84, RoundingMode.ROUND_DOWN, "0.000000000000000181284594091016525343377660445478662522612819993521483805074083337360431488776090816"); + t("90722427", "250109201450074.30733359761676498214233600458243961256782112", 160, RoundingMode.ROUND_HALF_EVEN, "0.0000003627312648795355525836548960598901087358415310487994946053537784133694920967980387871503837710287762825207351628308969423837416889343063095931780370747970940778"); + t("0.48425", "286066857860650600996410581.265239755849636917586773", 83, RoundingMode.ROUND_UP, "0.0000000000000000000000000016927860977026871297216151139912118506162280894175756690957326871025564857192812457"); + t("-0.1691758430969448438509811426964238628160272424933623868", "38441799.999999999999999999999", 82, RoundingMode.ROUND_HALF_EVEN, "-0.00000000440083042669554606597039935244664201456941514146083394529179869242591136481959748"); + t("0.88743377830720141128", "44911704750205846465089.20035991581783170720630664", 79, RoundingMode.ROUND_DOWN, "0.00000000000000000000001975952111466296508610466879628778274945797855479921351164494570721828995531258"); + t("0.1390778769684090913204591819767278110546412548004433591511944600946897617", "277648656858155100000", 100, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000005009131992288407646565860297151186680545668158106004180949699983160186063384049475224761533073680521"); + t("3164125884.4073964748", "8114246095554485455726642279.21714133750359864057137923492525024212836651396184814741323088", 16, RoundingMode.ROUND_FLOOR, "0.0000000000000000003899469953395807"); + t("-905979636021967584802541909411156288", "588108692423205.42148522462645", 108, RoundingMode.ROUND_DOWN, "-1.57079632679489661923067255045705829671147845947102495531401582084282247801495938554022522074778853761054876"); + t("89050347044049581299381242480217.9999999999994058666666666", "100000000", 38, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192313205686795012082"); + t("9384382790172389242876553396544966584953735032", "7064946.0405571683", 13, RoundingMode.ROUND_DOWN, "1.570796326794"); + t("4599999899999969.89999999999939999999999999999999739999999", "5", 38, RoundingMode.ROUND_DOWN, "1.5707963267948955322747763230120874736"); + t("981506679667634714879196539323100582275649736499268", "-2650656638416317072468924873980863", 63, RoundingMode.ROUND_UP, "1.57079632679489662193192138528004603453359070756740203353047978"); + t("586037818727633677314864284802161494978598191291944680271276", "6", 110, RoundingMode.ROUND_FLOOR, "1.5707963267948966192313216916397514420985846996875529104874620579068049243806220019524784528637294712993274348"); + t("574154686971197550538045379511445947509305230954695364880561522114301766666666", "9888888888888888888888888888888888888888888888888888888888888888888888888888888888.888983", 3, RoundingMode.ROUND_DOWN, "0.000058"); + t("833333333333333333333333333.33383333", "72999999999999999999999999999999989999999999999991999999999999999999999999999999999999999.9999", 71, RoundingMode.ROUND_DOWN, "0.00000000000000000000000000000000000000000000000000000000000001141552511415525114155251141553196498842809782948770876337023831957236"); + t("96.3402996215634", "2491341", 127, RoundingMode.ROUND_FLOOR, "0.00003867005744036718700608020885347968010326797283608601247338852900685567412910977952282838978925509735664135937710872195358739132"); + t("79426434555326.3494429931176377119", "5548816775921341335573752919169538232658846807822456", 33, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000000000000000000143141209671927143626968151771849"); + t("0.0000001062001393465405971229325030007729388770886693756636914", "336180147258451429388815475832", 90, RoundingMode.ROUND_DOWN, "0.000000000000000000000000000000000000315902471376143314757694174808693173283273948823278650621580500835250322789895234707102014"); + t("17617427151801129574689363188033188066316581767603884193280748", "677", 10, RoundingMode.ROUND_HALF_DOWN, "1.570796327"); + t("777929305385903021773103808998888888888.283", "-40000000000000000000000000000000000000000000", 99, RoundingMode.ROUND_UP, "3.14157320535716104287976885312267619645768364067945743283087352654351464091199938152996604492513107"); + t("8907343.731406520502608", "69999999979999999999999999969999999999999999999999999999999999999999999999.99999999999999999999999999999999999999999999", 62, RoundingMode.ROUND_HALF_EVEN, "0.00000000000000000000000000000000000000000000000000000000000000000012724776762787822650236520762663910259098755495558153325586862"); + t("250819996832", "1425.96710511181264829305", 51, RoundingMode.ROUND_HALF_EVEN, "1.57079632110967565151506039407607631548186473528578"); + t("79760705864752.590034378887191792353553", "221190358517212561113137148580429309410652.539149001962694775889", 78, RoundingMode.ROUND_CEIL, "0.000000000000000000000000000360597570343672020033321934731896312718728002003215497667573836712008129909233"); + t("122798561748895667178397457783.444444444444444444472095648194731410499440333333333333333333", "-945.8365052844807317724557186640488390163948025429", 93, RoundingMode.ROUND_FLOOR, "1.57079632679489661923132169934209332472235802508353269925541974661360017811131128972503163371"); + t("0.73830769286468958435073517295112286023903480152273766669595572681884590535433972668550703545492219491464045399150541602953", "0.917623999507426932465698513285", 81, RoundingMode.ROUND_HALF_EVEN, "0.677531213135062401592793840240825045189043991067246346816601678059645864788559992"); + t("1111111111111111633339897942734048639999999999.536", "133333333.3333333433333333333", 36, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169163975144"); + t("5700.00000000000000000000000000000000040000000000000000000000000000003", "9053383922385411111111111111111111.44444", 76, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000006295988382759479767686584736906823520722172984126494205649911271981775143551"); + t("69462003776525952004.82873978513336259191217", "-2105047991541417177490.2146508063500364663", 76, RoundingMode.ROUND_HALF_DOWN, "3.108606798098124987486589522268950807525528865381147185304423921904809805789"); + t("21502651556673465391", "800000000037086428911099356.1111111111111677452482981745", 134, RoundingMode.ROUND_HALF_UP, "0.00000002687831444459579939368497473656167704348943372435157380403092336836953977388157314889936582373761375733254907672175596268237428281521"); + t("58295101.3661564", "9014276912692376857288719996989653360072435291", 43, RoundingMode.ROUND_HALF_DOWN, "0.000000000000000000000000000000000000006466974770219796453090121711188861881498733"); + t("0.000027986163598924032135240167125334836421401534826111", "309999.999999939999999999999999999999999999999999999999999999999997999", 131, RoundingMode.ROUND_HALF_DOWN, "0.000000000090277947093320802619321729970060867654209409497293952095312278676879093851942569202176582229896070110363393868128598914321472256232"); + t("1677777777777777.77777777777777777777777777777777777777777777777777777777777777777777777777377777777", "-0.0000000844881959834018968468966965172841535602610106977118884808425801190268338295326", 16, RoundingMode.ROUND_UP, "1.570796326794897"); + t("8000000000000000000000000000000000000000000000000006000", "63799999999999999997995999999999999.999699999999999", 147, RoundingMode.ROUND_CEIL, "1.57079632679489661922334669163975144209883519968755291048750996522556979245768781671539418331651686543336534480039595056410471872099175729791181467"); + t("2032052379.533660371", "9008408762723954465975275104", 7, RoundingMode.ROUND_FLOOR, "0.0000000000000000002255728"); + t("0.2", "9469271261673552962337073319785087973044680768761041181995638326388413209173674363694947160560", 51, RoundingMode.ROUND_UP, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000211209494873687853797993615699392199048835942769682"); + t("71.55597265318754617515924104647167", "32687182117249941794139638138438699428350927996277311883849594700166666666666666", 1, RoundingMode.ROUND_HALF_DOWN, "0.000000000000000000000000000000000000000000000000000000000000000000000000000002"); + t("7917115171105937243308628941722895758658223976929999999999999.450390885183551718818270879443416", "0.564649363488766750234765", 42, RoundingMode.ROUND_UP, "1.57079632679489661923132169163975144209859"); + t("0.4336936493051792780815993910992885681953915", "0.158091281", 39, RoundingMode.ROUND_DOWN, "1.2212425179878022825951292693078599802"); + t("5742961.654589856087140492362225516455", "0.0000000027199222763248884721736764675", 91, RoundingMode.ROUND_UP, "1.570796326794896145621633883418332506033922777514213210101555904194883881966593604855232504"); + t("-78888886224171912755965709735335521411984571782", "-0.498534065678868", 77, RoundingMode.ROUND_HALF_EVEN, "-1.5707963267948966192313216916397514420985846996938723566039027611058600343317"); + t("0.6328376942981936498122893081270007155361095980688154089352625410143947398933611259637713933", "200000000000000000000000000000.0000000000000000000000000000000000003", 82, RoundingMode.ROUND_CEIL, "0.000000000000000000000000000003164188471490968249061446540635003577680547990344077044676302145022031862778024721"); + t("451553999999999999999999999999999999999999999999.999989999999999999999999999999999999999999999999999999999999999999699999999999999999999999999999999999997", "2179867.74348135911361166458933762521651", 75, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169163975144209857987220790821381971248965326965797"); + t("23426222.43534344425145662222849768340485901634018", "0.46054313928538489712145160781512802351887871", 151, RoundingMode.ROUND_HALF_DOWN, "1.570796307135596424482147905335846783823006287638693262592550565031361657573767104652245381862280952326045436262045850250404202828673857758486472770777"); + t("-0.1497472941964723767085196305363848611820341531317", "3229040934900", 136, RoundingMode.ROUND_HALF_UP, "-0.00000000000004637516129881762952577787416052408464521366012294824870465807107099736443435144845068432075065645176187810876643648311085549361656374495"); + t("0.000032692447567833842573995114541534118489314477714398466552", "0.0022", 50, RoundingMode.ROUND_FLOOR, "0.014859109746820637986790873409593793749016563193617"); + t("7730861828375132811350247000000.9999999999999999993319180869413347342243262222462999999999999999999999", "877777777777410969870800672510711856872048", 94, RoundingMode.ROUND_CEIL, "0.000000000008807310943722186154910214377271911725279025605218195725746446089776178023186063708658209022537"); + t("3828303706471691807358.67584236187", "76991786666666666666666666.9471181", 98, RoundingMode.ROUND_FLOOR, "0.000049723533756803596789369526555841609607593009368742702526784291424133637589727591964366293192372328"); + t("0.41834347007795242893541353025886699916756218325869383435691257192900010312670415771179083110976", "-30488888888", 72, RoundingMode.ROUND_FLOOR, "3.14159265357607206050779155644255937070758927507630890116765983212129486"); + t("48593", "4309179095025896118957906682613978327.36105861733486651962234072281096", 31, RoundingMode.ROUND_FLOOR, "0.00000000000000000000000000000001127662576291876751476713928419"); + t("0.47581826188573685726003970918", "855555555555555555555555555555552555535555555555.65555555557855755555555555555555555555555", 141, RoundingMode.ROUND_HALF_DOWN, "0.000000000000000000000000000000000000000000000000556151215191121001992254205535066885218560698571552601964723124881578373533198748699391477997457624648393615628224964789552854434863987261484"); + t("776.60227231438556807203685739788030324", "466789999999999999999999999999999999999999999999999.999999799999929999999999999999999999999", 28, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000000000000000000000000001663708032122336742586681072"); + t("27139682215199", "-0.427164292", 20, RoundingMode.ROUND_UP, "1.5707963267949123588"); + t("1.9999919099999999999999999999991999999999999999949999998999999", "29051186163666095402692866172", 148, RoundingMode.ROUND_HALF_DOWN, "0.00000000000000000000000000006884372633642620020902382710722442677137247841317792269570342620288713251473139165033654511267903218352626142519124947110977653846884115505516099859"); + t("38491043841097744449575392100945071907404967218658359676241425676528", "59043987605834390449010463723157588095252473817305820717026253139418448063232333333", 157, RoundingMode.ROUND_DOWN, "0.0000000000000006519045444229833623555503288339636905423544017830503855889069316196544203742443397919112990681700158318776030826848064430394828191821891516127833105686159603"); + t("0.6074549506040092741579463620868", "0.05", 9, RoundingMode.ROUND_HALF_UP, "1.48867083"); + t("-56779450399897004882363349", "511.11811435", 113, RoundingMode.ROUND_FLOOR, "-1.5707963267948966192313126898246449167430133495294849852247521055740809031821768047190531457396686652970704373557"); + t("8.881755007257237531101", "9438888888888888888888888888888888888888888888688.8898888888888888888888888888888888889888888888", 10, RoundingMode.ROUND_FLOOR, "0.0000000000000000000000000000000000000000000000009409746329"); + t("0.1775360797018436804481995866199008132528696238", "2134541741.399236596704501235335178042935", 137, RoundingMode.ROUND_CEIL, "0.000000000083172924782190054637956680268821411263301807557332046319038670331166563493870267580545000421380880700400363716858011980965313753991409867"); + t("2140047457312666701599", "0.5456", 141, RoundingMode.ROUND_UP, "1.57079632679489661923106674402252190214196666504398936751465911270705944239184106687266427790596262558577505903501072396278504462829253445676"); + t("-89961135870622830803787358", "76", 138, RoundingMode.ROUND_HALF_EVEN, "-1.57079632679489661923132084683049837420680449039074220384298956192084053122115227048875654497581999612486575090534529277690300325166909442"); + t("4555555555555505555555555.5555555555555555555555555555", "1089822022661392611.07680332", 2, RoundingMode.ROUND_HALF_EVEN, "1.6"); + t("0.8726791323027579456950604732259195501107960997", "3000000000000000002929999999999999992222222.9999", 67, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000000000000000000000002908930441009193149475812846700753198589613878379615146261296622223"); + t("44677458708296298642412526583539170855367999972661123354497647702", "0.2813082993", 50, RoundingMode.ROUND_DOWN, "1.5707963267948966192313216916397514420985846996875"); + t("9.5076339921662678402013966079168719314796561881009808391006", "7000000000500.0000000000000000000000000000000000004000000000000000000000000000000000000000000000001", 82, RoundingMode.ROUND_DOWN, "0.000000000001358233427355307303789105301352493989124336056047708383564917392787919552003428297"); + t("848.912153428727512869", "832565", 94, RoundingMode.ROUND_HALF_EVEN, "0.001019634333940315726772632377622140639370256538276208707182360984026112984172127168971511747794"); + t("217795211784534483814129645408727845424289432", "0.34835931732762728174886938219460524881301467637945876007851345858911808042449106918017864353410959192125394879815677227391", 70, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321691639751442098584698088071845346975566230882"); + t("0.00000092564277958644568", "8480917.1335976037346", 116, RoundingMode.ROUND_CEIL, "0.00000000000010914418393730822320359951450862500563042270598178031021647022687328484530020413339592263595157463697683328378560713"); + t("-2614625762.773926992", "-8777777777777777762297813220275902.4444445665842015493828628794333967176084502537534024594347515129753", 115, RoundingMode.ROUND_UP, "-3.14159265358979323846264308541074509982573940571712709182779139799998310282046188216661749156304405593514376290239"); + t("11461919629730759625228401864583149321678725486666", "17226517234187337656920949798550.5710395270065", 15, RoundingMode.ROUND_UP, "1.5707963267949"); + t("9529.293918618200264802550463", "45905353919161032205630754022545145497046199690516446146142949674734300007304687771328888888", 87, RoundingMode.ROUND_DOWN, "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000207585675853827682708263182827545809266038764748858615790604964513256843313739024799265"); + t("4931807985367632068099641965788078631005357752013537766768", "855555555555598413566582634564820127827686295803999999", 24, RoundingMode.ROUND_HALF_EVEN, "1.57062284973546698757318"); + t("1222222222228888888888888888.44442222393", "4848876523102982610762027526118715837197167017831877659524059082945280135118167481506834710302193035792941259", 33, RoundingMode.ROUND_DOWN, "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000252062970959454721933130800579175"); + t("0.65905283767", "91759850.797", 25, RoundingMode.ROUND_CEIL, "0.000000007182366056021824817912066"); + t("38646235317000000000000000", "392.99999999999999", 155, RoundingMode.ROUND_DOWN, "1.5707963267948966192313115224732912067296773433032539476990602090237296790832984949207476692734856765221786797531489432959335235165818886348595050722872649"); + t("140.59708495682", "704988273984913255331184662757601056412073990", 54, RoundingMode.ROUND_UP, "0.00000000000000000000000000000000000000000019943180637899344229614873265513076623127065032223688"); + t("40009000000000000000000009000000000.00000001", "-758225110518373.90616449122413807134072409179977555", 92, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966192502730553458769115220766903290535224896412087883935645583359372852522271"); + t("41111111111111111111111111111111111111111111111111111111111111111.11111111111111111111111111116", "8133333333331333333333333333323333333333383333333333333333333333333331533333333333333333333333333133333333333333.3333333333353333333333", 59, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000000000000000000000000000050546448087444123443518770412930772106492895889428882672235"); + t("0.25274843764119", "4652169", 68, RoundingMode.ROUND_HALF_DOWN, "0.000000054329160793855457814274352295189650194844158936888885081624957483648"); + t("2229285222205.9", "64259037060592496566.666", 55, RoundingMode.ROUND_HALF_EVEN, "0.00000003469216664581845690083434371364902493537833786639708567"); + t("-61787701764444444244444444.4444", "0.2621851215799072834806611628299950936849667539014914003278410784517994934256", 64, RoundingMode.ROUND_HALF_UP, "-1.570796326794896619231321687396429323087824541070836205351156636"); + t("680900799956.2391631230560881936", "8391110142781354241382569821666.000000000000000960842828541994714847171", 73, RoundingMode.ROUND_HALF_DOWN, "0.00000000000000000008114549664706758238959780469755669131069566623063766451113786504326331472"); + t("4", "0.000000444701055646305958", 29, RoundingMode.ROUND_HALF_DOWN, "1.5707962156196327076552902315"); + t("0.00198001", "0.00000008468050238", 44, RoundingMode.ROUND_DOWN, "1.5707535590804263029523178312770954555911085"); + t("-0.7130528641642158065152955257818276", "52735589484026937661762004210304.69277296014467611843", 105, RoundingMode.ROUND_HALF_DOWN, "-0.0000000000000000000000000000000135212836557026088281582940182087535603761995519039589777297542328421307992530629688115836952372007194197"); + t("966.111111111166838", "2003211111111111111111.222222222226100817412756", 30, RoundingMode.ROUND_DOWN, "0.000000000000000000482281226253432075279108415864"); + t("1253382716537023744335738.617227", "8366", 149, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192246469546343502061835817732436952269627036937748029678669967872852429755805186858237780455970930093501678395176355216393940021267"); + t("0.1450308526578697626", "0.0000000023740220455603089791982355285743340035442753787007949015135136704131487", 123, RoundingMode.ROUND_HALF_EVEN, "1.57079631042581375132136756085022174281936640087102879690413132598413125227649915444026986827237418333023456324579013933523"); + t("-0.0000923271", "-0.8164471", 20, RoundingMode.ROUND_CEIL, "-3.1414795695949986698"); + t("4019690000", "39199999999999999999999.999999999999999999999999999999999", 34, RoundingMode.ROUND_HALF_EVEN, "0.0000000000001025431122448979591836734690283384"); + t("271404708840691103355801.25135516388", "44771371040248283020320799202337516759860212466813318576387", 11, RoundingMode.ROUND_UP, "0.0000000000000000000000000000000000060620146879"); + t("0.07948", "65164779173494056164705678199399214432.7753112842", 60, RoundingMode.ROUND_UP, "0.00000000000000000000000000000000000000121967727057576982062522557565587463547127577622786974736415"); + t("-74034764624294387503097023451431155727.43", "-9893397940328478146968185711993879785255445365424604873267742872304487659999999999", 89, RoundingMode.ROUND_FLOOR, "-3.1415926535897932384626433832795028841971693918918563781817536016674856258988199995544278"); + t("51422786418193539093758918790888694531137381.39515595448436505775327075637140311904", "59391453223469067375909851953325715796153719695686", 113, RoundingMode.ROUND_HALF_UP, "0.00000086582805483298920695113481817468061368501113905559080094260462087032575849697569255576731957845954015468780504656"); + t("822222.000000000041", "51.98", 139, RoundingMode.ROUND_CEIL, "1.570733107858975722375330878870332290422676204429093343243025394145036864781446595900335803730507982996272299748145770756256190437046568957"); + t("314.45113772541884105508869303918184209915481176628167411336753262184768003104884285", "6055549438890919874006.16", 134, RoundingMode.ROUND_CEIL, "0.000000000000000000051927763268829143814877352683643872547078851558174265853176706208724483808779909583200857669625658126653678670747537850555960350527245"); + t("-81", "-84461916276393698250146357094665017645306.080880925883535", 130, RoundingMode.ROUND_FLOOR, "-3.141592653589793238462643383279502884196210387271533187149932768737691484471729181406173295136450108275520101651225210948336933552"); + t("609956740688025555555555555555555.54339231792840733474184973356978647799", "0.02088012648229998364", 28, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321692"); + t("3924929.5722656165977195", "522222222222222222222222222222212222222222222222222222222222722.2222222262222222222222222222222222222222222222222272222222222222223", 81, RoundingMode.ROUND_HALF_UP, "0.00000000000000000000000000000000000000000000000000000000751582258518947859137776595744695243064524830916451574445449710734406903172862777"); + t("12259514169167236986", "0.8804048415673891647411059422620447306142293545127976010844975590223332549603878340166788976765", 54, RoundingMode.ROUND_DOWN, "1.57079632679489661915950768421508420391784933621788535"); + t("542255555555585555555.55555595555555555555555", "-0.0000007191212402776862523881025786684710773335505466822427698804028989506425398255096971", 50, RoundingMode.ROUND_CEIL, "1.5707963267948966192313216929659181044961459574984"); + t("7997799999999.9", "3666611111111111111111111.6", 151, RoundingMode.ROUND_DOWN, "0.000000000002181251231079231503507625153269899391786413562359303561129282926521506042201375981631222457254264249435077924569895581243487256656766754115125987039258"); + t("866286982800789222222222222222222.33333333333333694509", "768729093635206106", 59, RoundingMode.ROUND_UP, "1.570796326794895731847453646167184828695466934849965367965"); + t("0.00000768051615239539597001403103803697317975876950718631769440976", "0.0804506", 89, RoundingMode.ROUND_DOWN, "0.0000954687240251940698222011974414767843822164146677305359095652528751758177390364205102692"); + t("7826492748730.98327", "-83905264.5", 102, RoundingMode.ROUND_DOWN, "1.57080704746725786178446206321543381181944563808474819873714889061568767819517895278520110435566963041"); + t("941481458570438719975240701069002690311993074704940", "0.000000437544", 106, RoundingMode.ROUND_CEIL, "1.570796326794896619231321691639751442098584699687552910487007556252748201364651132572896398980417962314421"); + t("7666666661292222222.2222", "33955.55555555", 120, RoundingMode.ROUND_FLOOR, "1.57079632679489219024581134120454657758500999823271146150789228775225941565229934685637415497293206253521179789876699365"); + t("192.18516", "10464403328474129848571185798411285726528159459669033080203445577683064444.4444", 138, RoundingMode.ROUND_UP, "0.0000000000000000000000000000000000000000000000000000000000000000000000183656109161097804808759329287637084247224666328378849187480444296729557418400856698019916650291164368837101872598280106020015272150990193"); + t("-41051998029509861911139068268154480121793285162158877204", "-7", 141, RoundingMode.ROUND_HALF_EVEN, "-1.57079632679489661923132169163975144209858469968755291065798774816596648487177212008848468300413792006851801560826705336933781560326804782928"); + t("0.486", "49997999999999999999999999099999999999999999999999999999999999999999.999999999999999999999999999969999999999999999999999999999999999999933", 11, RoundingMode.ROUND_DOWN, "0.0000000000000000000000000000000000000000000000000000000000000000000097203888155"); + t("158.12043", "5788872", 37, RoundingMode.ROUND_HALF_UP, "0.00002731454935619171755700350207318101578"); + t("677777747777777777771777777777777777777777777777777777777777777777777177777777777777777777777777777777777777677777777777777777.77777777777777", "581917756.541399788674239", 67, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321691639751442098584699687552910487472296154"); + t("600000.0000000000071105788314514363999999999999999", "428807.314", 14, RoundingMode.ROUND_UP, "0.95028656520608"); + t("0.00000008318681191811809802", "0.66796280966831542421856833837311292", 149, RoundingMode.ROUND_UP, "0.00000012453808911820260054495239306929577405767521426290923889141635328216173789212838116278798859743419679470333693356752062601854260814760508395125924255"); + t("7232000000", "24816666666606066.6666", 111, RoundingMode.ROUND_HALF_UP, "0.000000291417058429178850928433211815214011999826075711915496896882586051959985797628488536033458239263060267533742473"); + t("23941000000605.07", "75419056082957197252049378368521", 103, RoundingMode.ROUND_CEIL, "0.0000000000000000003174396663659004825207471306999043235499650019238031307216935149640192555947727348390554466956674082607"); + t("45504200660.5497725852", "7961631842871974044030177533634479", 125, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000057154364279339984545013829876484477518654876121711878962171517273099898586385301004832007670714488311497029971860721850949185"); + t("79999995999999499999999999999999999904999999999993999949.9999999999999999999999999999999999999999999999999998990999999999999", "840.06", 4, RoundingMode.ROUND_HALF_EVEN, "1.571"); + t("9.05523", "3.231", 47, RoundingMode.ROUND_UP, "1.2280672896394693201455453000312384689178555644"); + t("7.73799", "704748", 103, RoundingMode.ROUND_UP, "0.00001097979703339214363121493626710004432589140163643885245352412050050800262888631853805632596214638572019"); + t("-4888888888888886252157139003876571194445774536680770289682047822613472560559691953673038", "-60007939260003483734.799896939547830730071142342892922222222", 20, RoundingMode.ROUND_HALF_DOWN, "-1.5707963267948966192"); + t("0.489", "0.11093580556", 23, RoundingMode.ROUND_HALF_UP, "1.3477097550580344440273"); + t("0.008803686223576127055470083618014906783219645155628874328652856274334373648191302338106256721", "74468819147877505186.935784716699", 82, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000000001182197639806008377040390420142841236029699421968900354052715816339835301952756133"); + t("0.000037343322375073946695815841124553463198588", "800000000000000000000000000000000000000000000000000000000000", 15, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000000000000000000000000000000000000000000000466791529688424"); + t("1", "632360623611246353560094487873539910347119755019490035538293120747568556743139700416075609789733950415380555615248145585643151699609819", 90, RoundingMode.ROUND_HALF_DOWN, "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000158137613675130686118609626910143829352009046516903520115677510268536611716405238661079278"); + t("0.13787033365456851325237332317511290179133209682582", "560367112494090300428187335778579726960640365877632013263686426024981392473026850444444444444444", 132, RoundingMode.ROUND_UP, "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000246035733683465427358342899716337781273249617371705080525325614105431272208290337749269513587443754864016295373180212305688780255694"); + t("0.00007148434993973896685377156900893826860470842", "243", 1, RoundingMode.ROUND_HALF_UP, "0.0000003"); + t("177797977.7777737", "1", 8, RoundingMode.ROUND_FLOOR, "1.5707963"); + t("-0.81747561789366094011576359981073168", "401919379981201037776805570849949955958297325630", 88, RoundingMode.ROUND_HALF_DOWN, "-0.00000000000000000000000000000000000000000000000203392933660451183239593652834425964615423252104878642670074648964668845312417546867777"); + t("502222222222222222222222242222222122.222222222222222222222222222222222222222221222222", "36944444444414.44444444444444444444444444494444444444444", 20, RoundingMode.ROUND_DOWN, "1.5707963267948966192"); + t("-372989834161426138907180819047205585574827114271618969808197258.1111111111111112777777777777", "0.72084622249261", 217, RoundingMode.ROUND_HALF_UP, "-1.570796326794896619231321691639751442098584699687552910487472294221291931942975175277346519627577001730237056468922992114248158160658415267711391938231335054699263375104774223283284705400589806622869213450216036816317"); + t("61966577582844833476227495525370342327174571799094194047209950151091638914815978707376543512569088419264394187266562917362816069349384208929395281622617883577777777", "5444635054056524908047777", 137, RoundingMode.ROUND_FLOOR, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566411533235469223047752911"); + t("8526631880.147300383790485127054981348", "299999999999999999499043387673030257194794646052666666666.55555586893326520480365285307921974857378016", 196, RoundingMode.ROUND_CEIL, "0.00000000000000000000000000000000000000000000002842210626715766799342909065949140783987944477642746605511496241072080453667797752399841418091573631936625789842700693311700776336973927153638642036925951150367943742917488059873818842608980888458"); + t("81587268333981777117078916051078162665643396218346137132916285844549390959421577832847074434260000865951837058840220245529735346635457079", "33442.37406677356741752843034570491591227471", 62, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192313216916397514420985846996875529104874723"); + t("-50107463004133916433789058858180544.2870891546473419403312923312390575816335611496719", "-16915831880311718964474821671199325994328013098111816741", 122, RoundingMode.ROUND_UP, "-3.1415926535897932384596812195881946354044219074778537599484140572893681355858365768156118825737344714958874453911233702192"); + t("0.0000344387097109771230817668145274108477694", "0.18145467467880094375", 38, RoundingMode.ROUND_HALF_UP, "0.00018979235094621338299091702475205940996"); + t("944444444444444441427209753284450337249883829079363697373167215555.9999999993939121646470256986885531644571896965127336434624561155572717220081010056674106933", "0.7201", 116, RoundingMode.ROUND_CEIL, "1.5707963267948966192313216916397514420985846996875529104874722961531457443195750875468756885632460875848997556612148"); + t("53748.922602046882673178575892255721993558442148371001525822", "6653.9313397", 211, RoundingMode.ROUND_HALF_DOWN, "1.447626439766253428071600022918535743645694919220448297974846093622279372336760394133336190713208399028765501587978939966377717392581688843393024240968581332546780712208195784899901971721364950914777386554371801"); + t("-1000000000000000001545613855555555555555555555", "0.048525583143981380589252413319996338133894530878704374721829226326119883104770059320850250947203295463051027817094886169535157928525190493361169921414906836752181101089205282059318032792584751016411206872041366961378170225053140409624008704830132602602957564082960893675475", 60, RoundingMode.ROUND_UP, "-1.5707963267948966192313216916397514420985846996390273273435"); + t("41001874490749126739715692426307025426623140160982931040342", "0.00004676287", 55, RoundingMode.ROUND_HALF_UP, "1.57079632679489661923132169163975144209858469968755291"); + t("0.00000000621560084209545644621771230832465554953342646716565424397716951959586941584625448223853993523295211653227850400154767", "2066.000000000000002682012723", 60, RoundingMode.ROUND_HALF_UP, "0.00000000000300851928465414154799070985316241279750057446625350484839045"); + t("0.281997", "0.241", 262, RoundingMode.ROUND_UP, "0.8636267877278523289573700095602009437688205043822846133776853734091671784974224042214166380751595937198745742549735308042571206299135663847741918685062164250649406398102921460112694951202612140660672732542748715092549399258478475963869820483984195082830553029646"); + t("666666666666666666644059933996171505396717905960974838269077306737216483932499513287914725245043393088", "9249851414404822234299335400863582861507450510013107617295481885817193163460345730460752349446370955719582915263425251319683085067254037322.3613631120610137539584435834293747806307139200956069903831554035370668603669761912505673908775348078048819794252752400779191550897818668", 79, RoundingMode.ROUND_HALF_DOWN, "0.00000000000000000000000000000000000007207322980653122745617008735778719828105028719036498350716361340859567630988529"); + t("458138171809107343619.11972274032", "402732", 292, RoundingMode.ROUND_HALF_DOWN, "1.570796326794895740169010839693235091037599626559617277019336557373018340306323249771510224220181061976369878119340916233721717718834523197594612933215831332741323948906602272000645199160542548021521598690866416101299242192948845760643658846190830424883854039628004502254282830389847778948244"); + t("7984166699203224603268396119", "4100000000000000000000000000000000000000000006.000000000000000000000000000700048000000000002", 312, RoundingMode.ROUND_HALF_UP, "0.00000000000000000194735773151298161055326734609756097314816471269576616358051725059520233493983122509257954411778201282272615460328925047637920652702517176563212992177119006711103763253405682412148687494021989143812513699994586724418255194096341939387789750386165887189139139360857859293822280029000754527755462457063096260471725"); + t("0.3116939963877248720165238684060808386814282111890853734251656474", "0.0010868428094182529896487680910147902", 186, RoundingMode.ROUND_HALF_DOWN, "1.56730945050825757817634659238957747411773856234813769087323288961937245557291881631886181926610716646369081473547346970864829667272524660157856072663239381258305570274680740542005915598"); + t("-54974.1", "8061230000000000000000.60222", 195, RoundingMode.ROUND_HALF_DOWN, "-0.00000000000000000681956723725783782375591480707266480830942257892353724492783547630571351644359047559055921383344164028005290583876670791537735997373828987678139552580594315687529325820723869935095528801049628183"); + t("0.969581789", "2000", 44, RoundingMode.ROUND_HALF_EVEN, "0.00048479085652112932646689972878547927368813389"); + t("0.0004004458627846230688223307335", "0.28266765424", 287, RoundingMode.ROUND_CEIL, "0.0014166657871439847616187655465915006245199623779258366281384701774493917627929064421370679512048983812958127332014190405070426370820270336559445682868680063940799618087147435555180978549204353275595727387706650646375458899336401083443949609770657035877985383430768150185195383852530229054"); + t("29999999999999999999999999990998999999999999999999999999999999919999999999999999999991999999999999999999999999999999999999999999996999999999999999999999999999999999999999.99999999999399999999939999999999999999999999999999999999999999999999999999999999999999999999999999999999", "0.3321712331724895901349720890766036749934251526803387430357158", 146, RoundingMode.ROUND_FLOOR, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566411533235469223047752911158626797"); + t("-0.25569783815762078827002138152066897560004180898718349575", "-775620647387034717913878973627715892054188457523999795703217688799964441004560555490446921", 68, RoundingMode.ROUND_UP, "-3.1415926535897932384626433832795028841971693993751058209749445923079"); + t("0.34369144062255284377583358", "3117328806816332474.3737824642851577542203064", 46, RoundingMode.ROUND_HALF_UP, "0.0000000000000000001102519053720092666602963204113768873717522509"); + t("485594644510205636622228430175013628691699938843173271760919501270666365", "0.68782600866496449724218518940538432067459067512169403620255071558524881352718834795748721931537825976726679534658501872329002985844059542404184096740072858228570067295876424541702119967", 35, RoundingMode.ROUND_DOWN, "1.5707963267948966192313216916397514"); + t("94.1", "17281372887551230492514", 40, RoundingMode.ROUND_DOWN, "0.000000000000000000005445169235818391300725698365254063752817"); + t("-0.19606385568090237408641182458552508470349970430655711", "71938658952928074781626292272963", 139, RoundingMode.ROUND_HALF_EVEN, "-0.000000000000000000000000000000002725431062166361222170399419846614562904328358152363017483369441408335984110703392707070165586620046085666973640072743430412611247569188225"); + t("3333533333333333383333333.3333733333332333333333333333333333338333363333333333333333333343333333333333", "0.091138368299099666603828612157383065861", 130, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321664299881344574536571524710497006161779277649455499860324531196847060779932475715714077810592105785957731"); + t("0.77869095426711312163084147048192097479647905329855624805855455839676880759753303448198793559501455069888945240495096302785100704125501405169150987578090662375", "385.594562855", 319, RoundingMode.ROUND_HALF_UP, "0.002019452478665255636861773809025982186331092743851256832463478444965580224159918042506614752324745834485663707988671679663957997014490998673467965317952837788589801157100789528360138072786921332093877412254789081416781978097522780188553314006046749111984822209900112369232688878367531841602627788864456525828344188874047"); + t("97.95843791", "8151.3811", 302, RoundingMode.ROUND_HALF_UP, "0.012016825303984263006540335878564989368953526018019415710782499251125586056993650345316678347934073061209117571949656365942149901189797581242128623459347111229675025069616308833771960742881428682039901439377172620785499166683655717251375499595979087843978120902560916326514121700275903219927355103536331"); + t("-59917277323723663370163153305", "-999999999999999959441973407936294388969570159166651954273737934295550519798961041751268118863333333333333333333", 291, RoundingMode.ROUND_FLOOR, "-3.14159265358979323846264338327950288419716939937510582097494459230781640628620899856811754801839340218185840618864220989603649456252260199333279482374135504670747330827657132197869969623775166573250730902340025769301079670381946717265669762515895264630237939892635000245561977459976290747224"); + t("254793793283367054504982539810822873343886552921556033085909454144763828730582164684126140899332908333164431832516533030453879", "0.000000005620462363528659955436982755933349124720785", 167, RoundingMode.ROUND_UP, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566411533235469223047752690569958168134763729723576287895"); + t("67897147358918698593570217401337752122374764", "4611970296", 213, RoundingMode.ROUND_HALF_EVEN, "1.57079632679489661923132169163975137417275165076506429404209215595879159790000303011986752447391995884537709288891161613805519439179551883729737414857245818199777144233988070193207958664191652836873338326655955155"); + t("34.30637", "984.297042981", 12, RoundingMode.ROUND_CEIL, "0.0348395728825"); + t("360.000000000070006", "54444444444444448585833.4444444443333", 210, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000000066122448979604689949899906704561796693777590933945115176527285390652568855156180615253867963018534504567034498628995714093614468730494784607429735935616976228052677829279291277009797647394575284809131815323546"); + t("0.02967241043208407224652683211964930472118973442957627374286", "4621772795807599545078.37801463954333479305523935295919", 248, RoundingMode.ROUND_FLOOR, "0.0000000000000000000000064201361129218324637245379949778969188552602712653787066974040207774950819944159770228112976646530906288118014750721397760933909344364938490966458167620499337737321393963918728911492286515326305296728912980739161413119906306376487160747470700765773"); + t("1.4529", "41043479833406.30150582173", 171, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000353990452538931365471165080742870402067097557743192249750672066145983183765651055519515169321185071545761294765134683799421434664319954904586074551107908279937790263151468"); + t("0.106434272151885561", "301262769144377161517108072426055181257113296803729597123080", 255, RoundingMode.ROUND_FLOOR, "0.000000000000000000000000000000000000000000000000000000000000353293812090261983978675495865481551453952367523454278981750399514088208547269706129910650432791642455938896092656223000570806238409103478905761610261997649109630087005904946383650093203492512202089252815183095455276659186384908818916977208759574745767338"); + t("-2510541305071032173967979612425359806265793036706807483620711397580914359479114301981881088066288267727583886895638554281050922054216142409682329852324197535703.3636570428783060735578822729290666399346390178925845686338011242568331845738894332377221166264926455555555555555", "6517375458349457157283356739489036982075925062317212148734217488843249199419802679162713190521937716018096404990467764120279761452238", 249, RoundingMode.ROUND_UP, "-1.57079632679489661923132168904374736712677006777956491819847642552022704509692563179350440451584582579247739606122808620704674862390085469323850971025269468693726444297333929776931947862370475217847227253660853038259280071609225499942935828368879535"); + t("0.3", "7.679266262", 151, RoundingMode.ROUND_UP, "0.03904637660924058057680952799738943319157964694350561064037342758613737121601866230992590853149980520161252795354115204327814014737124786856080511260272"); + t("889733333333333333333333.3327476543861829492563799513501770552379052886767811784918986190216", "19999999999999999999999999999999999999999999999999999.999", 98, RoundingMode.ROUND_HALF_UP, "0.000000000000000000000000000044486666666666666666666666637382719309147462818997567511047747915687446184737936939203720849479617"); + t("92702942046153786206145041518211509.9998885223406082604549999999999", "706485.53", 290, RoundingMode.ROUND_FLOOR, "1.5707963267948966192313216916321304808388194617803084842632542293581704985914616032534334434503133186544437902462680971128184312440127845192765183556001418272844449906405016017395432228298464361553563942999920145418032272939521286008897352806105082504903983104662731488882508791669272263097"); + t("-804128311111111111111111111.8336598845451868355047076213634685820222034606165695417568223209166111314653214658962938187721547468534753043921071293668012873051575934697982070110423131526168248756542688894974172922248493220369453546125851", "828614658202115472063462538413115006770114714069993279894706796812769059260489995000944899421677058460375497703564229333833514137067168912622974311078213805556959521221463376972465258408316969877", 3, RoundingMode.ROUND_DOWN, "-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000097"); + t("157839999999.999699999999999", "0.2483774675736265073429211530058057794363293067430417465866791775118216741", 192, RoundingMode.ROUND_HALF_DOWN, "1.57079632679332301642104782582992019506534690581479598599171752389200699188590172463022118877907051958137368690618664377126243580581740369178883891964427992898264631627917319483866506416507964"); + t("7334156068486127018834429770505220598379835135839678837599283537805", "6717675561574582227116859", 42, RoundingMode.ROUND_HALF_UP, "1.57079632679489661923132169163975144209858"); + t("95555555555555579683326893475674634624758.70153996921008510932076473574296014776", "69156576191916478.783", 237, RoundingMode.ROUND_FLOOR, "1.57079632679489661923132096790814013134491971280086636760244285131208529520073868530611513030116593940497283829585066742257333255643183717349015763699732427456869106913561223316483727681551222919421714480504123427145865172561060750925177"); + t("-0.052820761561712632067657239", "74059999999990999969999999998999979999699999599999999999999999.99", 112, RoundingMode.ROUND_DOWN, "-0.0000000000000000000000000000000000000000000000000000000000000007132157920837030925085399148130826315298815146848240038667808092729419645035247967547812722979493176104503919176"); + t("8012320148197829919388", "188888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888.888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888883888888", 199, RoundingMode.ROUND_UP, "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004241816549045909957323058823529411764705882352941176470588235294117647058823529411764705882352941176470588235294117647058823529411764705882352941176470588235294117647058823529411764705882350397075219"); + t("10000000000000000000000000000000000000000000000000000000000000000000000000000", "8871342736182156520403092408219352285281052202136565393786129003674121509790860377604.079000441319185159562983234", 159, RoundingMode.ROUND_CEIL, "0.00000000112722507712553656860589251423070320424942739111918324415444252470009869866819250396520764874002378422271657921491632982900076045368528585855654418460644866818"); + t("2391486600002473404069939885054312351710811731255031857893209260506862417752443396.6998764156607818436700053748454161466696463942536417679817496653094666161255796315973432397003", "0.336112949645588144142444096709333986571902795619879768991744619226986000620922073408768007479464974677348095938277428077674385633236334401853146404638262213084796470071", 46, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192313216916397514420985847"); + t("-0.182693768630022535483809678950863115", "-0.907526422136192963322126016", 285, RoundingMode.ROUND_UP, "-2.94293819381931073213819642651883121423920543686564714835234966463121318680670667161404860983203719852060277468902497946135883189318722512234407546468521887353674934813690739749339036849231754739682549515138764616538757798576501905098160780514390920874619730983582108052844831998090051"); + t("551930983034039826781953864049640.2356690209281908693994451518260529366302", "0.000000554429245319160201", 32, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192313216916398"); + t("88702213489188071901153919571450681.907", "5285", 80, RoundingMode.ROUND_FLOOR, "1.5707963267948966192313216916396918607218398658107591210765054675830986877923285"); + t("843370921314159294882670188514584444633088749959", "33590000000000000000000000000000000000000000000000000000000000000000000400000000000010500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000008000000000.0000000000000000000000005", 51, RoundingMode.ROUND_CEIL, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000251077975979207887729285557759626211560907636189045"); + t("-87657666862743154543464222548981302829172346317113677304307460766779026072660443863141214367479972222329695023297492588413688063170424045341963836336703477140981508009686049770681999021758836190", "333333333333333333.3333337333333336", 200, RoundingMode.ROUND_DOWN, "-1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566411533235469223047752911158626797040642405587251420513509692605489771505628038670340172"); + t("0.52958", "57390.98", 248, RoundingMode.ROUND_HALF_UP, "0.0000092275824525904429289481377200323513122290274394683729346331954844468463940801676191124597905677822353029456279095451380050564508577823964913887477934452319244957383187948095776864272336209760868205026125588376017196254448385190653831249940186793377"); + t("45145449247936698791.55009", "6666337641574307191857819472235658061402992432984688547670446.346411862235", 10, RoundingMode.ROUND_CEIL, "0.000000000000000000000000000000000000000006772151619"); + t("55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555155555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555565555555555555555.55555555555", "7666698856243485653043216105428604869599491434213385514778965830588024410048714", 82, RoundingMode.ROUND_UP, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431045"); + t("110186034581683976547838651042073264965770163886326126419947576328673814701351728882315527298085118550757273813112985533535", "-21590079.5628551755299005131649667125009203708622138961348", 318, RoundingMode.ROUND_DOWN, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404325664134926561566832038929087356365382217967086844511584541111683237984960070149410388675151759611149801138852139514734673971033801298302486538319276485063503660516282457229098268240286035843310157999233786341"); + t("400000.007", "9977943272299949704984", 68, RoundingMode.ROUND_HALF_UP, "0.000000000000000040088422642214385347048091468711631118917158176032977614317182552548"); + t("95243.333333373333333333333333333333333333333313333333333333333333333333333373333333333333333333333333333333333333333333333333333333", "0.10727984713249068240154809088471178752469870083896202064813264071414253636735246382007", 254, RoundingMode.ROUND_FLOOR, "1.5707952004184524334588318377968545395430509740053908362832723279727034711188427270667463279281950016898660536629901751929083603552664425535561418655485999250662935818152195844675807106505791187355154537479694872818165643961469057079510666799568467169532"); + t("7429615796470009791453894238377043645888175250462404396558.336746288", "0.467544167650145010442078", 131, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966192313216916397514420985846996875529104874093663631278660823748552825403053307495456238881860284548110712721210044"); + t("899.99969", "-77397397410157797370000", 47, RoundingMode.ROUND_HALF_DOWN, "3.1415926535897932384510150893043119025680995542"); + t("42122222222.6607002562149501888378695744770055", "0.00190230844195908788386", 195, RoundingMode.ROUND_CEIL, "1.57079632679485145759592877797715885658199832484100809963554456249877168201208663373995744711105756330056462247568906937837800937132527343018969630519531095543858939217954635342375623547771689102"); + t("66500556547309277435632763.601913545304254694", "562077526852560143651441168373021700411769280771.5531493497678025345532963744204399922376949953294267770685200945204691006445568778088888888888888888888", 19, RoundingMode.ROUND_UP, "0.0000000000000000000001183120715031775186"); + t("0.6536314837546866282100693957411836781068338", "68160439.74000386359858313174613645957940513636874811111111111111", 138, RoundingMode.ROUND_DOWN, "0.00000000958960191935301557374600251600633389085042959992004459752195303062701527713115734791814473411208840332546573073991997189350676010173802248"); + t("-52221.54", "-854588888885888888886882888885888888888888888888888888888888888888888888.888887", 14, RoundingMode.ROUND_HALF_UP, "-3.1415926535898"); + t("0.030878", "0.8555700774744595102779", 293, RoundingMode.ROUND_HALF_UP, "0.036074898820292289947024435671190455880681328552648820339542847879196262021084400507592563192136161833532941986085010990207774028536610491555795113009988866196592011441738630153134794707756416607649622728521002921826414314747531112043802632929789131967840929590852581211315162168978413460123495"); + t("0.558311081223364152874695063684529324787463810926408243641990742280304840206575580954526078130452492693938049399156360783264999453539904917488814396436718899505787274505784562725492005063518107453868000925718031", "59158.4", 54, RoundingMode.ROUND_DOWN, "0.00000943756222627367114559932261748760061786129193107878971"); + t("0.603667588449664260065766122648941328933013686172134073455379032603319741731847077481740922303977700213733387669841595836959872395654027662886162270353050209380911865189723072461152981063738", "9739599567186479445494421971417820489574582391448017461800815", 82, RoundingMode.ROUND_HALF_EVEN, "0.00000000000000000000000000000000000000000000000000000000000006198073999710116891705808210678924407948564421065941542641369701504313680754326064"); + t("94280000000000000000000000009000000000000000000000000000000.00000000000000000000000080000000000000000000008", "5483270357339999999999999", 128, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192313216916397513839391621568364710267369525732374339019727580520691582432422111507765990798096549162498147422"); + t("892143768454089730431116702673912474110760607285390100334.440798613073423279380196333426611721950684460192985096379751656086782907613186", "0.0077875", 204, RoundingMode.ROUND_DOWN, "1.57079632679489661923132169163975144209858469968755291048746356717963817689950159199724016600977008228824383184843186875293010092163932234953584210367249257583503865473523907580956401748988295985651545022"); + t("0.299572428932627118578198593730198230287507399022200985457228150060377172031918037000031669703886071426039585074360472785507443605141393937269762561841156134961977215426733046959884164917720120825303341752974569862", "62034525842927951269788130549561618667580322715030098539737094399149252857235650627377621857233947291559934450490", 199, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004829124183058117468065248132676476392559070799701264593882082889217098451456830996925063690007273659103234547105024404807281009375377372973715525456221415364235665829821196928891696389145324007318435"); + t("0.9596923042", "907467484274.7604545843564", 7, RoundingMode.ROUND_HALF_EVEN, "0.00000000000105755"); + t("-6277.909847731984296576656523212824019057049141279983250563716370211535557", "40754644569232730909822159941728528996.255380554100623919631656284929349183654117148275560086379391810802143957355380113483966", 6, RoundingMode.ROUND_FLOOR, "-0.000000000000000000000000000000000154042"); + t("78888888888888881850782869479843334717455380991803919461380837961891058168082887941222", "143024804019939.99999999999999999606260260186349410165461491", 83, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192313216916397514420985846996875529104874722961539082013301140258"); + t("562652521289687.66", "74385506318071374849158160745606323256738210290133180698266", 92, RoundingMode.ROUND_HALF_UP, "0.0000000000000000000000000000000000000000000075640074140759817165944523036656289364049051007152246471003013987274397712492700789882116009"); + t("7666666870900", "95", 3, RoundingMode.ROUND_HALF_EVEN, "1.57"); + t("-0.89947878241961", "0.291863612291081606647546", 216, RoundingMode.ROUND_CEIL, "-1.25703408050991952864668887219637063759191481363744844037140407835421342132344637398249001350701924307761931627436350907012844471710559316331935500326172918235850979839811107665330127894799151532499308168482147601593"); + t("1.00608774285338837620658080487557", "1702925011366235976307704172708338844107925.4841106557365758762710201416090871009984844278329609594849", 160, RoundingMode.ROUND_HALF_EVEN, "0.0000000000000000000000000000000000000000005907997922035430352291228808631198682141848267521013743645324246262111510664134284055661157622103353338929675177139798748006660933449052866928147345313750575308"); + t("2.3987", "0.69562991875012071992730146870038745", 219, RoundingMode.ROUND_HALF_UP, "1.28853624419843038468727351588081835770213704647587244345231949642722447497594091396846825516180836904054220099378195526799704144915116292563367738346086380407914260412068086532818012730927431741260380597357682561320379"); + t("9000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090000000000000000000000000", "983692700978", 104, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339911"); + t("-3819122337833895423886807111111111111111.8219704689467233333", "0.036955289093598928350418", 95, RoundingMode.ROUND_UP, "-1.570796326794896619231321691639751442098575023304911929422417106183782625120966714329334818874"); + t("5999999592095999969699.9999", "0.04129522835171495874", 286, RoundingMode.ROUND_UP, "1.570796326794896619231314809101224920439572894401620696575205021198175456203836710350892285899343136759582363401721266989385580736368718652482781743148924048603608126472316454771367022296823063034251011403800719064645947923091820560747831241128016265167103049599447381150611116935151633"); + t("1361328250848813.076272", "7343968743.198916718819949497260439945244329867918358342846053546504087822321786007988501819070693505488279277154346939262451665443726288050113572026573114943046175947057290797076259300554563626494504893981", 265, RoundingMode.ROUND_DOWN, "1.570790932086648591193796321088442936443675834115345986480644917436178090309212169344912204849525097913013364971702194608303200452590914075301372011565767043104339171888716880736287502586194311506690261970719797281698367551279328958400340004303306540302655579123347"); + t("45321675851435638476493333333333333.7329929603550163189392423128610226307776847177145484593542971958586410603170406783569093505155237017839441708403099245155397926701726966725323188428864276858285507363706265826995696040150142677811111111111111111", "777777294969464500000000000000", 48, RoundingMode.ROUND_HALF_UP, "1.57077916552977829786226762785378601952704521883"); + t("-7963503581542987436349124249909956149725002369506790710928564671717113189819853143856886712279531176869878140164554933586761128991941431554288915", "-590121527432263279", 83, RoundingMode.ROUND_UP, "-1.5707963267948966192313216916397514420985846996875529104874722961539082031431044994"); + t("40000000000.0000000000000000000070000000000000000000000000004000000000000023", "870534498213359201079105368116.9489176849", 301, RoundingMode.ROUND_FLOOR, "0.00000000000000000004594878213568097395833845344057297838532707974753322708094344028490667409036650335309771147861773750516321020424561629576864188130387404472904669404307279334154220677732440196032301424209260571725178852960114436910255601352360182101910663362597672274897214149445856133935693499262422920977408328159858"); + t("4400000000000000000000000000000000200000000070000.0000020000000000001", "0.366025167537562161789628472251313612903161604734171767072743083", 213, RoundingMode.ROUND_HALF_EVEN, "1.57079632679489661923132169163975144209858469968746972294939557748077419667213829167850249131115687274681614173522647735437433755026994400594757305006412525887222320116900270239790755645052032168088793518039040483"); + t("3999999.991999999999609999999958", "7946679", 20, RoundingMode.ROUND_HALF_DOWN, "0.46632794362967849356"); + t("-59999999999999999999993999999999999999999939999999999999999.999999999999999999", "-0.6417368466465456688372416572426988295736482062362", 88, RoundingMode.ROUND_HALF_DOWN, "-1.570796326794896619231321691639751442098584699687552910487482991768018978904251787744533"); + t("877777777777773657660137857111111.222222222222222403120907215641181371089573", "26133333333337333333333.333333333333333333333333333333333333333333333333313333", 291, RoundingMode.ROUND_HALF_UP, "1.57079632676512446733258281771787239713000385647355811574723320267909093830633196419030335612992258759172272960593553239374503751988356573153714207946180879523927573168936372367025192235522057856908082718762820407600586302006465581454112894952001869424010561965230942286386408302662765530883"); + t("50.1111111111111111111045", "1453397483709174885971185510976099039984017", 201, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000000000000000000000000000000344786004329826912054711000061106316916320892455800954355475436022028211417899610965211726318026408868849230029707053448839044734073549051100955168097641403274889781624973614539144271107245572342057738"); + t("8038563998768770232812192778984586819714334467041683844252332577569804503706645868939296284889538383232062221050453304817365", "755555555555555555555545555555555555555555.5555555555555555555555555555555555555556555555555555567", 212, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044992200260535587493560392583249876224978828395057519666043370894646597123261796144293212564712019706501341252350258482867424036211602"); + t("-2", "0.180718357", 230, RoundingMode.ROUND_FLOOR, "-1.4806818715141448721477192088701967364481492181260264140010262838724656721905052974180690766220325819323024474851957670246188487258133893823826102113466613162811547192458448671316413215152123940085915522652486434424041799994319168"); + t("6547806010050364423678746715062320167", "0.519694268956385409539624470273162381296015094", 97, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321691639751442019215477667429558602349715293661928365494254725902076987578"); + t("56666666666666666.69950399999999", "37963.2800324639824477572239695048884128774928496690587988291620819148853584098211378661410960724227872963475074699432063168224060203630344335042061938849273983939964361996861312785299341102284053644241046358482702921272950292969462135517973416035000178202285868382157", 86, RoundingMode.ROUND_DOWN, "1.570796326794226678995454680185179239143560420641455441523353062167766465265295154259"); + t("19942194117409773041674965948", "0.519", 53, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619231321691613726221556432478984737"); + t("-24444444418899044106316478186780379225218054962338341442186659328212606765854391736517283577807447212851728663737684099285172121447483030248326240715532696934142453940279147700255399400568336109604348955159126418911162263416383364070952155555555555555555555", "-6.7198777717075702", 223, RoundingMode.ROUND_UP, "-1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058533991074043256641153323546922304775291115862679704064240558725142051350969260552779822311474477465190982214405487832966723065"); + t("0.83193168512771", "400000000", 114, RoundingMode.ROUND_HALF_DOWN, "0.00000000207982921281927499700110149965703274815622725425231255915661511133289686086258571594596197781634398615462825047711"); + t("94302565.7069", "0.8556985306813452866073229971909901714524717083022304", 52, RoundingMode.ROUND_FLOOR, "1.570796317720927907277868668996766028541435048826663"); + t("8", "566666667666666666666668666666666666666666666666666666666666666666666.6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666", 276, RoundingMode.ROUND_UP, "0.0000000000000000000000000000000000000000000000000000000000000000000141176470339100346460410655035262353113020104821770278800335579693155488411094548678375408842319592297499501679440259437720845111663169416181899296740075421340945308058380898997576067452388045556731370149352203111146192048635532123074501413613789366018436951798977868875823764"); + t("210000000000000000000000000000000000000000000000000000000000000.05000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000001", "-25547315234298551394331.61116", 21, RoundingMode.ROUND_HALF_UP, "1.57079632679489661923"); + t("899999999999999999999999999999999999999999999999.99999999999999999999999999999999999999", "88027244175535428", 219, RoundingMode.ROUND_HALF_UP, "1.57079632679489661923132169163965363404950077143421957715413896282057486980977116598068407933803709143627704621909363380110649715841337323233398834603954919891024482003915508005044786295950904197420169857709955968212997"); + t("343895900830523060035384277184317461443926661831518112971920019309584599511703049891477438281801054703470805059960668159733531882051242182823209347501438917251452271658101142597186811531133347071938", "484953167393953512783985452332035448723224971091568920711082624805698000000000000000", 4, RoundingMode.ROUND_DOWN, "1.57"); + t("6814849720595877337832473403450226504846135222155735843643917761910689885546522349803301924265628623787824359084518305", "43203370512941405505579077020.04754651647369956", 79, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104"); + t("95", "-7999991.9999999975936482", 289, RoundingMode.ROUND_HALF_EVEN, "3.141580778577918784772583047672397399158843028714797414766221882310605199191713054545796185000172150086816010201462115375638199058567836248541834836985138242694362349912222602680825310252945353371323479552992285321048728722975126831857222815134028920449453653521303042616547428023493093461"); + t("41559.9999999997", "0.132274251011594808510055044218035126336995019", 27, RoundingMode.ROUND_DOWN, "1.57079314406508403142748489"); + t("6763893415012622250665098518.271103773442607646708", "0.39423221995419657199429", 234, RoundingMode.ROUND_HALF_UP, "1.57079632679489661923132169158146663543986521326367098723631265865739593941872256147064167868756190881013682387496808356396781838236907890953494258114728807209416423767168649280669347177060382449707124770399394522833990979903898687468"); + t("0.0091196134917495510380672387070632", "599999999999999999.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", 107, RoundingMode.ROUND_DOWN, "0.00000000000000000001519935581958258506344539784510533333333216287949180287548370006525987844991737539011597700351014560216212"); + t("-488888.888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", "-4261741111111111111", 276, RoundingMode.ROUND_CEIL, "-3.14159265358967852269832483533078722584092069755448740945355518960973304726248673250162299788296551925043169908338022286934425081724889899980313223466968203961387001153577369144572875403147132212885167219410230826639122384093707591427286213725934363520580755154640012060596022"); + t("6.033", "0.61532018830216189066035199558284", 205, RoundingMode.ROUND_FLOOR, "1.469155386246314998157241585914248463912571961555596686769633026591802210886155052436674203469209601562482536120193646022285193185689495754959726598082725658325028305461059169836058369465724787164528092045"); + t("8985.631839988", "4400078422188292221406277955391711628766282846314022328967544", 148, RoundingMode.ROUND_HALF_DOWN, "0.000000000000000000000000000000000000000000000000000000002042152656797233451627084786702992163622010729862732862047054350302999668943413502474620176670313898289420564799398874124489042820257103235994105569"); + t("6000000", "0.0900165933", 190, RoundingMode.ROUND_HALF_UP, "1.570796311792131069231322817262114923151024936514573840468650121877384464635878374484505714182812864988282871379935453730065704661045618730331033995472678393031424280383630411428059261024217"); + t("-976418240883801436024642320407397607617110791137606056.53706417276573639131750794342306947629418258736153196826080185374568383201784295352008985353739112199655674925668709366836110796", "-29815048643503116803837635757", 172, RoundingMode.ROUND_HALF_EVEN, "-1.570796326794896619231321722174871941809992648198633165903132849721623923801314610481900600578791464297422833221550984291803451626645945901999624968189782554284250330822539"); + t("442629464762994679124286516463716666666666666666666", "0.49826392077940024986012080749980941355831723234552896", 25, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231322"); + t("9052532400777996495647045927509092653815345584512298037722043774864657955650", "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222.22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", 167, RoundingMode.ROUND_UP, "0.0000000000000000000000000000000000000000000000000000000000000000040736395803500984230411706673790916942169055130305341169749196986890960800424999999999999999999999999999999999999999999999999999999774666091192827081566821877432908654"); + t("4599999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999499999999999999999999999999999999.99999999999999999999999999999999999", "385247714260136655085", 245, RoundingMode.ROUND_FLOOR, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566410695740438222750676639419496362258033709935077507470031431735962580831810396948564953300404924443547058443958135741136643016724276"); + t("-5.3627473628", "90479622.89511303502013274", 316, RoundingMode.ROUND_FLOOR, "-0.00000005927022230206095632428634259409479562843467761637884886703386057849176187070155819766447181264069829860483646836874746960994999701391203163750293646645870794370113673287051042507836378260396993613932066130274791737453919692265755129850634219388923362875210805618652978865416477474509618550533052291771147470628890415"); + t("8.97394262084410910038739424859733806352719028183735422708624", "198025.46111", 52, RoundingMode.ROUND_HALF_EVEN, "0.00004531711510428520691082233891118191815022617915762478"); + t("0.9623813955636442616698560675", "9067", 181, RoundingMode.ROUND_HALF_EVEN, "0.0001061411042185510638235098099419203700507755216917614280711875211393988867425864815584311442799667942299234926282405846831394297142870261210840723439847836242153859229585696408369367"); + t("708666666646666666666666666666666666666666606666266666.666666", "44250691712411126006031958276812390342634", 13, RoundingMode.ROUND_HALF_EVEN, "1.570796326795"); + t("6282130000000000050000000000004000000000000000000000000", "-4248852729243703177487020703158574.1505494481206093259808850437863114379659205718", 257, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192319980311502747364499703038022387178845218873850758551833160054079818663147636861942794136423532167178524373415018284308900547929109987603265422481038043618689038729000417968247962890998270353579885644660782449439276963362826511810990943"); + t("2475801296161", "8.86529586814587313530678201460343004382756326578169548217758395708917888375718976165288445426862038649872278763641653320418891724652937", 23, RoundingMode.ROUND_CEIL, "1.5707963267913158408055"); + t("63333313833333333.3333333033333333333363333333333333333333333333333333333333333333333333333333333", "351880.0045369559310503591322875877740352679961274154831282779374060849465743214714844336479354538", 198, RoundingMode.ROUND_HALF_UP, "1.57079632678934061744902183870452794870259205385773712799780043375555479373908928019738802248103817038969274545832499090006100804994341434972777751785044326744278860950112131134769683278602707475947"); + t("9298888888888888.422277896269224000461", "0.732", 20, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948965405"); + t("-61533.1641544681400141490702488", "35443782992239700570510627290955492935446986078", 291, RoundingMode.ROUND_HALF_DOWN, "-0.00000000000000000000000000000000000000000173607778176332428831076444136037491253573442584977401561616714559726609319205595389249087706739391595779983777028971904201084664805345515197204805250539602462999819941866125233313816284233945018929332186274847505028718046137151273099429949150118177891760246359775016477783155078313382916462"); + t("2.00000000000000000000001500050689047086880458535923588888888888888888888", "1011223683", 110, RoundingMode.ROUND_HALF_DOWN, "0.0000000019778017797868367343135248548382456333012213982031055953558293704360787523531225642935157741100331126599252636"); + t("111410664855161708352008273018320905508523103904638189882920080633188256.6805932502930587426092762664029950002955880020765683070072250742085930290866019670793664161286407100748859407", "6000004000000000000000000000000000000000000100000000000000000000000000000000000000000", 88, RoundingMode.ROUND_DOWN, "0.00000000000001856843176357244234370648302993074702988795075889470271376834433479622972824958243282199"); + t("47777777777777777777542133891036871973917316674519882695693999541058739874136829969914682723", "0.0000000165052567840899577955967925186700946695129725581", 307, RoundingMode.ROUND_CEIL, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058533645615180333828083181445108140717427805335793778866067380587982082875166633200592432231069556151199123991625287099915946867796374078162676247633938736149114533070732405012228263871415216579365770343956445408"); + t("-216779081768160192.0586933150887298434", "9679664588", 312, RoundingMode.ROUND_DOWN, "-1.57079628214268890136603048103890095545395353007199980145335074655795778108679464260150666112052212237090310959577606781705366136109928343450240078292971470959818706871948260337398164360074278191745367648570736996092894959115862271846295561865215468779709553284568373198672882208326471937667020378634457787086481"); + t("32546136481607334235205757664189214692176189", "0.272121421644903109158", 288, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169163975144209858469132645537134681326210057941447232458882347199956436619453288114500147212553224676121192778803909224029399680646823174631838260581391170784913847556743603090574016648027042046223859950331465651036875259202122415220818130827163552130708080543186"); + t("56783210576023095.60586", "6002090307390553731200", 83, RoundingMode.ROUND_CEIL, "0.0000094605725116148531862398246641864060964048518120159201111806668321912341651944665294"); + t("22185444644444444444444444444844445444444444444444444446444444444434444.4444444444444444444444444044", "3695855190033495091864610633924384611656668186283908854938162300401076755041541349216.682", 62, RoundingMode.ROUND_HALF_DOWN, "0.0000000000000060027905596169693064208115203370457693333902678775289433177627"); + t("100000517030037444444444444444", "24757.925097165486098913427019116552811568744900575000674177412021174155042435229191184262871906457521635637741110217541601355497096900548048446722464578", 31, RoundingMode.ROUND_FLOOR, "1.570796326794896619231321444061"); + t("199049223.81366207931", "0.007", 59, RoundingMode.ROUND_HALF_EVEN, "1.5707963267597294386420972930180169622179783015143250048425"); + t("9006120000000000000200000000000.00070506001", "0.59705445330083658", 220, RoundingMode.ROUND_CEIL, "1.570796326794896619231321691639685147795011036824967608366327422736638449105274529062063817803997727434511945562275782846091555149284577006941642608207748323486691072615944715066947165269430727793541026187005507449815755"); + t("8000124.000017394", "0.2514846855571176199100659", 105, RoundingMode.ROUND_HALF_UP, "1.57079629535979816868596077330137010310716931141340381708802639573596056759479140257209206347219700973163"); + t("2032095748010419208159243747177345805930448670290878208419199779209176992085797695784447342735718099445741732677142054288983748829915702799266729403", "540494348267267431628321095797466869858184644863912394694442157300447777", 268, RoundingMode.ROUND_UP, "1.570796326794896619231321691639751442098584699687552910487472296153908203142838520533836186612338553260042601140219123855317445350149564057787831616963264026340005236012862914866002748145312474986833769062444451057137466156612268395113365388661151451320287364082709087"); + t("0.13030575421122778532569575985389868722760355073368781661113758812710631321429554405306074775586782940513240434250513616549548589558573577609587363757", "2439090.888888888888888888087495499133182354064949275008545940448787023458", 227, RoundingMode.ROUND_FLOOR, "0.00000005342390265357743728601770135324882455097488450243578262838838149188668393606876216074515332404177295922034169858588015166811498637570980576340423554943110084489815065943564848953713640427391642263379009317050354083268222735997"); + t("166138368.97364934", "0.52646931819689832227807305127736676237254408937", 201, RoundingMode.ROUND_HALF_DOWN, "1.57079632362603609983859858955005600787464509646797101822123591284770095724975123579131847878610922627531474424481107206183182576602655141031601303686756283684081837714849080286248298343194651328690506"); + t("90278261.999", "44181263901455617558506022222", 296, RoundingMode.ROUND_UP, "0.0000000000000000000020433607829862388379052826759763474811709935985214345930981036075755221128676236896828582561803087492314048061192925460196668138404831775069107629636947061839660846116629079982056372186697951385282037082781133883930308765373927197081664579142739793823460829673275103976720089405838592227872323026"); + */ + + /* + t("507989703691573773692646637245632143.09301632", "0.00023524617890895959726260377795727594485001429509775073664719906972586", 212, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192313216916397514420981216072720975975518521619523382277587695328995261126066204896228118627274766101949928370591955716970514296655082530879555931469579228461529134448859724770008186821763953534"); + t("998004066737556045215051253813565143.8832197436075567424903", "68460", 79, RoundingMode.ROUND_DOWN, "1.570796326794896619231321691639682845183720621437636344635653658674424581224736"); + t("86433369263490", "5508888888808888888888888.8888888888888888888888888888888888888888888885", 86, RoundingMode.ROUND_HALF_UP, "0.000000000015689800794326475525854199889274777485905975141509279029660740291172467785708899958855"); + t("0.7973373214153259863051018287493346373785456059873526730404740179185666429644939510543367", "74670635858417266137341180611791957639030904013024415014531722727492563832868239597940038462020", 166, RoundingMode.ROUND_CEIL, "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001067805720748320019776504365520943386135689928097330133269033583985955196744609594949245670082514215082043451566084038899667992446356666645689615168067785792012884666"); + t("374033450990312455890638.93277366754385751914874291207476855323", "-6666666365211113037927954891933417475012126402854993", 198, RoundingMode.ROUND_HALF_UP, "3.14159265358979323846264338322339786401164704278477957375778567565310873587709891126824042916853916530375916510539919732145793866765463800729639359549187308435043692126575133559961390472413880001608"); + t("4557501505542494196542681", "93333333.33333333333333333333333333333336", 100, RoundingMode.ROUND_HALF_UP, "1.57079632679489659875226464254645361475453491619971109469026604267355885640904202942190790244340782"); + t("37586159087389043860.12840597360881140349084978654981863744036379008045263", "3.6438981991208205", 106, RoundingMode.ROUND_CEIL, "1.570796326794896619134373818071488227850040106984836922503521587963115820727789238370957876462074138956552"); + t("17599999999999699999999999999999992999999993999993999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999939999999999999999999999999999999999999999299999999999999999999999999999.9999999999999929999999999999999999999999999999999999999999999999999999999999999999999", "239.08634346880753213670664434445983324566699252092", 267, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404325664115332354692230477529111586267970406424055872514205135096926055277982231147447746519098221440548783295313861290436891192338552122049010626854866178737588"); + t("17422302175613385207748026341667793.594196677214347221187029105709222219653", "-6280267194750492426996442356045048839033599677080041121772044493494905599018712212202141305035063759781863164611006386569952647332454509", 120, RoundingMode.ROUND_HALF_UP, "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706797937395260538484933"); + t("35.555555555555555555810399", "93562191474.7", 19, RoundingMode.ROUND_CEIL, "0.0000000003800205509847433992"); + t("655178821.976656372810150627894556017394162", "7888888882560128104291718030707688373465696627.7326264", 126, RoundingMode.ROUND_FLOOR, "0.0000000000000000000000000000000000000830508366552167219528879348715744781169072251135990820988376468496467700564812559667432779025950027231130180203262644520954481"); + t("199999999999999799999999999.9999999994", "0.653318820342085268812047613103630556669545319658016361298875617708968747674283425167125121963005981242800362985755651010982871276990746272946978260352896984118314942191617134511691985687996367786493880337469", 316, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231321688373157340388155089033213134539708848666623351958286385190648800942745178227447454581139372405216691621700580749157222378524630195337503579276817739005064303427112293190296434606965952328879086669185500336592522402543610416649515184160246856420078752276381558599638215422211400494331186573"); + t("-469999949999999999999999999999999999999999999999999999.99999799999999999999999999999999999999999999", "399999099999999999999379999997099999996299.599999999999999999999999999999999999999999999999999299", 6, RoundingMode.ROUND_HALF_DOWN, "-1.5708"); + t("51843159066983173373682855093655745987316653072561245618131830177218273192375264776925774965411855969428183736674315451097616560126874281100401430816", "0.1583437056606648927940136337333346813606236278675", 317, RoundingMode.ROUND_UP, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566411533235469223047752911158626797040611862752186898443944266343988659827826479239234328935767601822901894596015951584117963190594151960444267998994106243427706477115708478577579396493220067842033167593157"); + t("8.97371291", "0.3719735775671023097475891375084145348906220025730133913939942524611173752325026636714885219183798325655250074242298356330254527400069488220051881131301673788", 125, RoundingMode.ROUND_CEIL, "1.5293685748722098601193043716159635080474575111815123438248797257101978062606475866389742997157853705155102517819580454003322"); + t("500000000000000000100002000000004000000009000004000000000000000000000.0008288", "19999999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999", 149, RoundingMode.ROUND_HALF_EVEN, "1.5707962867948966192313430329732447754117452311655422664148774416140316384157439413719499691896166382056900775498385205763727073603338127325942159374"); + t("5582891.3597685055690985730589137363770728987728496", "266666666666666382042958984077143507617183562784966139887556362967881425215585235664628852767376244487606988880345564665279504009361199333583929835062876027928683507896995851822443540478720956364107283254806348650308460828", 104, RoundingMode.ROUND_HALF_EVEN, "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020935842599131918229758939061032881098666523650418225935407930210608256253258086396866954585005435137654"); + t("4", "254000000", 59, RoundingMode.ROUND_UP, "0.000000015748031496062990824144377947548739729887884697571800377569"); + t("15326115.03190697849221085243183992543694223981330695906500550503698952983127434939", "30768.131968114546961069250957311802", 53, RoundingMode.ROUND_UP, "1.5687887671120183139020396925338495333330008731836498"); + t("8034290.5", "6000000090000000", 204, RoundingMode.ROUND_DOWN, "0.00000000133904839658094071715222871666241558165445391260174475208666675651357061285430590958040066303866213458688136814863999406379772159594451196227157306095448221693734706596871168056987826817590075405752191267"); + t("273111111111111111191131111111111111111111111111111111111111111111911111111111111101211111111111111111111111111111111111111111111111.11113111111111111111111111111111111111111111111111111118111111411111", "0.00000068502191855763597473010208377780570007199638735702991349078013656230206105269222443517141499856", 44, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192313216916397514420985847"); + t("85", "95753278410486313854503", 147, RoundingMode.ROUND_HALF_DOWN, "0.000000000000000000000887698065392728312874734146073384850456334779025402771466973758023667262126652535350318967494673024347770761537590742106186593369841123114713544955"); + t("708296988445555555555555", "7", 162, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923131180877971646954155521813533680672970849949841498424452150783046455072506127688700844098356667167357522651436714788445420817147133311022297"); + t("67381111111111111111", "2", 235, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619201639782763211693075565254889511026429926110525705919896593801691189227911950841228275003643935654428367121002853687190621360713931591682143109405062846172592007176046070894191718933231800595180657008817073239215772"); + t("811522222222222222222222222222222222222422222222222222222222222222282.422222222", "-5222222222416415910444444444444.729788169848249155", 35, RoundingMode.ROUND_DOWN, "1.5707963267948966192313216916397514"); + */ + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalAtanTests.cs b/DecimalSharp.Tests/BigDecimalAtanTests.cs new file mode 100644 index 0000000..698e551 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalAtanTests.cs @@ -0,0 +1,1044 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalAtan")] + public class BigDecimalAtanTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Atan() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Atan().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", 40, RoundingMode.ROUND_HALF_UP, "0"); + t("-0", 40, RoundingMode.ROUND_HALF_UP, "-0"); + t("Infinity", 20, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192"); + t("-Infinity", 20, RoundingMode.ROUND_HALF_UP, "-1.5707963267948966192"); + + t("0.454786854", 2, RoundingMode.ROUND_DOWN, "0.42"); + t("392.8825877961099786091", 2, RoundingMode.ROUND_DOWN, "1.5"); + t("90.02", 9, RoundingMode.ROUND_DOWN, "1.55968814"); + t("0.22618819", 1, RoundingMode.ROUND_HALF_EVEN, "0.2"); + t("2.104", 3, RoundingMode.ROUND_FLOOR, "1.12"); + t("0.4", 2, RoundingMode.ROUND_UP, "0.39"); + t("700000", 7, RoundingMode.ROUND_HALF_DOWN, "1.570795"); + t("0.1034373855738", 4, RoundingMode.ROUND_UP, "0.1031"); + t("2888822222222222.77777777888888888887945111", 4, RoundingMode.ROUND_CEIL, "1.571"); + t("0.7163035", 5, RoundingMode.ROUND_UP, "0.62159"); + t("31986483109634719887104428745", 4, RoundingMode.ROUND_DOWN, "1.57"); + t("66099.99999090960999899", 9, RoundingMode.ROUND_CEIL, "1.5707812"); + t("1453.5793000200494316368218639720487955117970374751", 8, RoundingMode.ROUND_FLOOR, "1.5701083"); + t("25", 10, RoundingMode.ROUND_DOWN, "1.530817639"); + t("0.00083", 2, RoundingMode.ROUND_HALF_DOWN, "0.00083"); + t("15469795946533333333333", 3, RoundingMode.ROUND_CEIL, "1.58"); + t("0.0471789911257911619518474101710506908660018025802862437747", 10, RoundingMode.ROUND_HALF_UP, "0.04714403323"); + t("2436496471267622480734244943816819264461333", 6, RoundingMode.ROUND_HALF_UP, "1.5708"); + t("397.86", 6, RoundingMode.ROUND_FLOOR, "1.56828"); + t("23350774.374402222222222222", 5, RoundingMode.ROUND_CEIL, "1.5708"); + t("6.4999999895999999999999989901", 3, RoundingMode.ROUND_CEIL, "1.42"); + t("0.2021040932658758909350221378184270710381308788971", 25, RoundingMode.ROUND_UP, "0.1994179053851243775408929"); + t("37322947047433501470414286593213511", 3, RoundingMode.ROUND_HALF_UP, "1.57"); + t("0.2", 30, RoundingMode.ROUND_HALF_DOWN, "0.197395559849880758370049765195"); + t("68205", 73, RoundingMode.ROUND_UP, "1.570781665113202779409754819994955472047433041976705657000777636779446534"); + t("546276727353824444.00000000000000000004444444444444444", 10, RoundingMode.ROUND_DOWN, "1.570796326"); + t("0.702767582631380812", 59, RoundingMode.ROUND_FLOOR, "0.6125809883518849916298401561171422315736485425008362936336"); + t("77.2782608490479012", 63, RoundingMode.ROUND_HALF_DOWN, "1.55785679919770947051742907742015525136935668142627146470943833"); + t("3782579384288161800008711705384065591", 64, RoundingMode.ROUND_DOWN, "1.570796326794896619231321691639751441834214834998463624232552952"); + t("353878", 38, RoundingMode.ROUND_FLOOR, "1.5707935009622650418565673617028447836"); + t("474922903013", 37, RoundingMode.ROUND_UP, "1.570796326792791014313858641566394633"); + t("0.983379312948256841133252743255261706498115379968780272468295525", 33, RoundingMode.ROUND_FLOOR, "0.777018375475969147205287424713916"); + t("0.94045376770729661028346135758732992772225497003464820039412612634023416", 56, RoundingMode.ROUND_DOWN, "0.75472103378449515948583375795023656690367842174996205064"); + t("8343887380309832830517659566088111111111111111111.111", 62, RoundingMode.ROUND_UP, "1.570796326794896619231321691639751442098584699687433062273514"); + t("0.0228839501439921", 54, RoundingMode.ROUND_HALF_DOWN, "0.0228799568131160143605040060800166535189129302340883479"); + t("99999920979720113000000.551327043", 30, RoundingMode.ROUND_CEIL, "1.57079632679489661923131169164"); + t("8203149", 25, RoundingMode.ROUND_HALF_UP, "1.570796204890491371929944"); + t("930000000504000000000000000000000.0870000004", 43, RoundingMode.ROUND_DOWN, "1.570796326794896619231321691639750366829768"); + t("50000000000", 16, RoundingMode.ROUND_HALF_UP, "1.570796326774897"); + t("2675303931293671338171189092726796196.369350899273657748425", 9, RoundingMode.ROUND_FLOOR, "1.57079632"); + t("98351.2797372595375675252656040297344674063", 52, RoundingMode.ROUND_HALF_DOWN, "1.570786159159024091806382088738657135356199886480858"); + t("9291816239901918141826076554839014635448673990956049062", 55, RoundingMode.ROUND_HALF_UP, "1.57079632679489661923132169163975144209858469968755291"); + t("6", 72, RoundingMode.ROUND_HALF_EVEN, "1.40564764938026978095219340199580798810019803922252509146943786614276254"); + t("2366378489504444444444.33333333333488", 12, RoundingMode.ROUND_UP, "1.5707963268"); + t("161100000000000000000000.5111111", 42, RoundingMode.ROUND_UP, "1.57079632679489661923131548431510836326557"); + + /* + t("4255555555555555555555555555555555555555555555555555.555553575553555556", 4, RoundingMode.ROUND_UP, "1.571"); + t("8", 5, RoundingMode.ROUND_HALF_DOWN, "1.4464"); + t("0.00000005243", 4, RoundingMode.ROUND_CEIL, "0.00000005243"); + t("90000000000000000000918942", 2, RoundingMode.ROUND_HALF_DOWN, "1.6"); + t("66060423.9514610923717025329", 2, RoundingMode.ROUND_HALF_UP, "1.6"); + t("6721603208.37153733325342504174531056831", 9, RoundingMode.ROUND_FLOOR, "1.57079632"); + t("0.37534", 7, RoundingMode.ROUND_FLOOR, "0.3590687"); + t("211111111111111111111.11111111111111111111111111114111111111114111111111111211117111411131111111", 5, RoundingMode.ROUND_HALF_UP, "1.5708"); + t("0.0000000033863978398551079571001448971465337832890474132632478399246", 6, RoundingMode.ROUND_HALF_UP, "0.0000000033864"); + t("3185000", 4, RoundingMode.ROUND_HALF_EVEN, "1.571"); + t("999999929999999999999599.999999999999999", 2, RoundingMode.ROUND_DOWN, "1.5"); + t("44859239063215", 2, RoundingMode.ROUND_UP, "1.6"); + t("8604639.371141156347736588894655375650797712452434364102701907458155331637989138659", 4, RoundingMode.ROUND_HALF_DOWN, "1.571"); + t("56966.475128", 4, RoundingMode.ROUND_FLOOR, "1.57"); + t("60023179160012835406838457633089174491605855118688614415337956367995333333333333333", 1, RoundingMode.ROUND_DOWN, "1"); + t("81422.3", 5, RoundingMode.ROUND_HALF_UP, "1.5708"); + t("8468", 3, RoundingMode.ROUND_DOWN, "1.57"); + t("1309118155947", 5, RoundingMode.ROUND_CEIL, "1.5708"); + t("0.065", 7, RoundingMode.ROUND_HALF_DOWN, "0.06490869"); + t("0.5", 7, RoundingMode.ROUND_UP, "0.4636477"); + t("75273151108297026877107393281372", 5, RoundingMode.ROUND_HALF_EVEN, "1.5708"); + t("93949.07662040577", 10, RoundingMode.ROUND_HALF_DOWN, "1.570785683"); + t("0.0001667707", 10, RoundingMode.ROUND_HALF_DOWN, "0.0001667706985"); + t("0.97", 8, RoundingMode.ROUND_HALF_DOWN, "0.77017091"); + t("7.58888288881", 1, RoundingMode.ROUND_FLOOR, "1"); + t("60000000", 8, RoundingMode.ROUND_UP, "1.5707964"); + t("0.78572996832", 5, RoundingMode.ROUND_HALF_UP, "0.66598"); + t("44119576558941207147519327281846199061", 5, RoundingMode.ROUND_DOWN, "1.5707"); + t("0.0000008837845876464810734172", 4, RoundingMode.ROUND_DOWN, "0.0000008837"); + t("0.0004", 9, RoundingMode.ROUND_HALF_UP, "0.000399999979"); + t("0.2323330540805621821118353480956466729421142235", 8, RoundingMode.ROUND_CEIL, "0.2282831"); + t("79999999999999926366666666666666666666", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("0.95", 9, RoundingMode.ROUND_FLOOR, "0.759762754"); + t("656257207", 7, RoundingMode.ROUND_CEIL, "1.570797"); + t("0.00161360752405294429603675177995387769065133534837330691193598117674132388151448244062544389", 8, RoundingMode.ROUND_HALF_DOWN, "0.0016136061"); + t("74828342902847955856666782218011827398846431511213763886945014448538", 10, RoundingMode.ROUND_HALF_DOWN, "1.570796327"); + t("379919117.1110111141111411112", 5, RoundingMode.ROUND_HALF_DOWN, "1.5708"); + t("16000000", 7, RoundingMode.ROUND_DOWN, "1.570796"); + t("5210000.0000070002000000000000000004000000000000000000003", 3, RoundingMode.ROUND_FLOOR, "1.57"); + t("0.70237", 4, RoundingMode.ROUND_HALF_DOWN, "0.6123"); + t("0.2", 3, RoundingMode.ROUND_HALF_EVEN, "0.197"); + t("2.433", 6, RoundingMode.ROUND_CEIL, "1.18084"); + t("0.674", 5, RoundingMode.ROUND_HALF_EVEN, "0.59306"); + t("0.16864431678", 2, RoundingMode.ROUND_CEIL, "0.17"); + t("99310562.987102686", 4, RoundingMode.ROUND_HALF_DOWN, "1.571"); + t("57343470572.5577748200322614", 11, RoundingMode.ROUND_UP, "1.5707963268"); + t("9", 3, RoundingMode.ROUND_HALF_DOWN, "1.46"); + t("9", 9, RoundingMode.ROUND_HALF_UP, "1.46013911"); + t("68", 6, RoundingMode.ROUND_HALF_DOWN, "1.55609"); + t("45045544594890", 4, RoundingMode.ROUND_FLOOR, "1.57"); + t("2", 6, RoundingMode.ROUND_HALF_EVEN, "1.10715"); + t("4087000000", 8, RoundingMode.ROUND_UP, "1.5707964"); + t("2419774648.633530428", 6, RoundingMode.ROUND_FLOOR, "1.57079"); + t("963794433119055555555555.393374993572327193537378798999513412199999999999999", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("0.000000337", 2, RoundingMode.ROUND_HALF_DOWN, "0.00000034"); + t("16", 2, RoundingMode.ROUND_DOWN, "1.5"); + t("0.21", 7, RoundingMode.ROUND_DOWN, "0.2069921"); + t("0.35", 9, RoundingMode.ROUND_UP, "0.33667482"); + t("86666666622.777777666621431962", 7, RoundingMode.ROUND_DOWN, "1.570796"); + t("0.1", 7, RoundingMode.ROUND_UP, "0.09966866"); + t("53337", 6, RoundingMode.ROUND_DOWN, "1.57077"); + t("100000000000031251284", 10, RoundingMode.ROUND_HALF_DOWN, "1.570796327"); + t("29919414446671153", 3, RoundingMode.ROUND_DOWN, "1.57"); + t("1", 4, RoundingMode.ROUND_DOWN, "0.7853"); + t("0.0000042", 3, RoundingMode.ROUND_DOWN, "0.00000419"); + t("8", 7, RoundingMode.ROUND_HALF_DOWN, "1.446441"); + t("4", 6, RoundingMode.ROUND_CEIL, "1.32582"); + t("0.519744021377950190285330709596862552528393098130790899666073", 5, RoundingMode.ROUND_HALF_EVEN, "0.47932"); + t("0.1443", 1, RoundingMode.ROUND_HALF_EVEN, "0.1"); + t("5.6544", 9, RoundingMode.ROUND_FLOOR, "1.39575287"); + t("0.701519", 3, RoundingMode.ROUND_HALF_DOWN, "0.612"); + t("8", 7, RoundingMode.ROUND_HALF_DOWN, "1.446441"); + t("4150827480.853907974387739203156", 2, RoundingMode.ROUND_DOWN, "1.5"); + t("0.37", 9, RoundingMode.ROUND_UP, "0.35437992"); + t("817600", 6, RoundingMode.ROUND_UP, "1.5708"); + t("6847.361", 8, RoundingMode.ROUND_HALF_EVEN, "1.5706503"); + t("67206693345838991031403.756160484167896", 2, RoundingMode.ROUND_UP, "1.6"); + t("33", 10, RoundingMode.ROUND_CEIL, "1.540502567"); + t("1120.7777777777777773304", 5, RoundingMode.ROUND_HALF_DOWN, "1.5699"); + t("0.41589804", 6, RoundingMode.ROUND_HALF_DOWN, "0.394136"); + t("444666404791634168967916041841994.702195285086546889393", 7, RoundingMode.ROUND_UP, "1.570797"); + t("400000", 7, RoundingMode.ROUND_HALF_UP, "1.570794"); + t("20000000", 8, RoundingMode.ROUND_DOWN, "1.5707962"); + t("209.8888888888888844515", 7, RoundingMode.ROUND_HALF_DOWN, "1.566032"); + t("0.852407143590463345522983396762436350231", 8, RoundingMode.ROUND_DOWN, "0.70588987"); + t("0.000051866", 10, RoundingMode.ROUND_CEIL, "0.00005186599996"); + t("2521", 5, RoundingMode.ROUND_DOWN, "1.5703"); + t("78024.8733", 5, RoundingMode.ROUND_FLOOR, "1.5707"); + t("58.169", 10, RoundingMode.ROUND_HALF_UP, "1.553606733"); + t("359999999999999999999099299999499999999999998.9999990999999999999999999", 8, RoundingMode.ROUND_UP, "1.5707964"); + t("18054455", 5, RoundingMode.ROUND_CEIL, "1.5708"); + t("15.755", 3, RoundingMode.ROUND_DOWN, "1.5"); + t("460", 2, RoundingMode.ROUND_HALF_EVEN, "1.6"); + t("0.0188207120631385279750954085704950583960475", 9, RoundingMode.ROUND_HALF_DOWN, "0.0188184903"); + t("9.1969946", 10, RoundingMode.ROUND_DOWN, "1.462490631"); + t("93333.333333333176379", 8, RoundingMode.ROUND_UP, "1.5707857"); + t("0.600266036086902813107358186588490770503589187680400080438781", 2, RoundingMode.ROUND_CEIL, "0.55"); + t("9380000006000000000002000000000000000000000000000000000000000000000000000000004", 10, RoundingMode.ROUND_FLOOR, "1.570796326"); + t("0.00575751780715113427164995", 10, RoundingMode.ROUND_CEIL, "0.00575745419"); + t("690008800500000.009", 5, RoundingMode.ROUND_HALF_DOWN, "1.5708"); + t("0.7", 9, RoundingMode.ROUND_HALF_UP, "0.610725964"); + t("53724", 7, RoundingMode.ROUND_DOWN, "1.570777"); + t("7667270546223.4448429904767251543698631073291445742", 3, RoundingMode.ROUND_UP, "1.58"); + t("749866622.666666", 10, RoundingMode.ROUND_DOWN, "1.570796325"); + t("9464211111111126111111111111111111111121111111.71111111111111", 10, RoundingMode.ROUND_FLOOR, "1.570796326"); + t("0.6", 5, RoundingMode.ROUND_HALF_DOWN, "0.54042"); + t("0.57696014724929", 8, RoundingMode.ROUND_DOWN, "0.52330613"); + t("0.3303", 2, RoundingMode.ROUND_HALF_UP, "0.32"); + t("0.9", 8, RoundingMode.ROUND_DOWN, "0.7328151"); + t("0.8", 2, RoundingMode.ROUND_HALF_EVEN, "0.67"); + t("4896403.619161228080605974859347", 7, RoundingMode.ROUND_DOWN, "1.570796"); + t("198517391139695696290029000775071962279035770517", 9, RoundingMode.ROUND_CEIL, "1.57079633"); + t("5157701362915334840560595834324794949461903071633390241902821611993841502732450673987304052309", 3, RoundingMode.ROUND_FLOOR, "1.57"); + t("0.43", 3, RoundingMode.ROUND_DOWN, "0.406"); + t("8666666757743988507652058211333333.33333", 7, RoundingMode.ROUND_HALF_UP, "1.570796"); + t("0.842499", 2, RoundingMode.ROUND_DOWN, "0.7"); + t("122.2", 3, RoundingMode.ROUND_FLOOR, "1.56"); + t("593", 10, RoundingMode.ROUND_HALF_UP, "1.569109988"); + t("0.8818", 1, RoundingMode.ROUND_FLOOR, "0.7"); + t("21", 6, RoundingMode.ROUND_FLOOR, "1.52321"); + t("86293305751.3230619267808428731392308627628801001", 4, RoundingMode.ROUND_DOWN, "1.57"); + t("16804583510684186963.018502854487444", 1, RoundingMode.ROUND_UP, "2"); + t("0.0001", 8, RoundingMode.ROUND_UP, "0.0001"); + t("4242909933445476325611738806174236096544.908714630729526395782", 6, RoundingMode.ROUND_UP, "1.5708"); + t("1", 5, RoundingMode.ROUND_DOWN, "0.78539"); + t("0.007", 6, RoundingMode.ROUND_UP, "0.00699989"); + t("8", 3, RoundingMode.ROUND_HALF_UP, "1.45"); + t("70", 4, RoundingMode.ROUND_FLOOR, "1.556"); + t("3425", 1, RoundingMode.ROUND_FLOOR, "1"); + t("451", 5, RoundingMode.ROUND_HALF_UP, "1.5686"); + t("8141.31623683639667706", 4, RoundingMode.ROUND_HALF_DOWN, "1.571"); + t("0.000615774263363824407", 6, RoundingMode.ROUND_DOWN, "0.000615774"); + t("11170613", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("0.000000067404745897820652084701644321259298841", 6, RoundingMode.ROUND_UP, "0.0000000674048"); + t("33990000000009090005000000000000000006000000000000000", 10, RoundingMode.ROUND_FLOOR, "1.570796326"); + t("9", 7, RoundingMode.ROUND_CEIL, "1.46014"); + t("9.333", 9, RoundingMode.ROUND_CEIL, "1.46405688"); + t("9000000000.00000030000600000000000000000003", 5, RoundingMode.ROUND_HALF_UP, "1.5708"); + t("9337141919830471903724685292141789497273573.658099072577685037687145756128496922356740940795", 3, RoundingMode.ROUND_CEIL, "1.58"); + t("0.000045", 6, RoundingMode.ROUND_HALF_DOWN, "0.000045"); + t("0.4", 1, RoundingMode.ROUND_UP, "0.4"); + t("0.444756015", 8, RoundingMode.ROUND_CEIL, "0.41848448"); + t("5575161748.7539120330584429031317046967", 5, RoundingMode.ROUND_HALF_EVEN, "1.5708"); + t("46.4", 1, RoundingMode.ROUND_FLOOR, "1"); + t("0.203426889", 1, RoundingMode.ROUND_UP, "0.3"); + t("0.054", 19, RoundingMode.ROUND_HALF_DOWN, "0.05394760364216254932"); + t("353959.38", 2, RoundingMode.ROUND_UP, "1.6"); + t("74169374334036876444230795143300166331863765379", 7, RoundingMode.ROUND_HALF_EVEN, "1.570796"); + t("15.19018", 18, RoundingMode.ROUND_HALF_UP, "1.50505917771202372"); + t("3326343666", 20, RoundingMode.ROUND_HALF_DOWN, "1.5707963264942662273"); + t("0.0000000071251162", 1, RoundingMode.ROUND_FLOOR, "0.000000007"); + t("2.0009", 5, RoundingMode.ROUND_HALF_UP, "1.1073"); + t("6705015260743742395517681395631.46667952563136285936331702269434439032", 10, RoundingMode.ROUND_UP, "1.570796327"); + t("6", 7, RoundingMode.ROUND_HALF_DOWN, "1.405648"); + t("3111126235.30263", 13, RoundingMode.ROUND_HALF_DOWN, "1.570796326473"); + t("0.1524730666719", 15, RoundingMode.ROUND_CEIL, "0.151307712850436"); + t("3786.713", 7, RoundingMode.ROUND_HALF_EVEN, "1.570532"); + t("0.192", 16, RoundingMode.ROUND_HALF_EVEN, "0.1896915520223806"); + t("74.4125712213259562429633", 15, RoundingMode.ROUND_FLOOR, "1.55735854616794"); + t("5", 15, RoundingMode.ROUND_DOWN, "1.37340076694501"); + t("2222222522.22222222223", 1, RoundingMode.ROUND_HALF_UP, "2"); + t("43104182.40314", 20, RoundingMode.ROUND_HALF_UP, "1.5707963035952917492"); + t("7.11111111", 10, RoundingMode.ROUND_CEIL, "1.431087453"); + t("8275133", 13, RoundingMode.ROUND_DOWN, "1.57079620595"); + t("1275920480.8656217776062214388199788136", 9, RoundingMode.ROUND_HALF_UP, "1.57079633"); + t("0.807526", 7, RoundingMode.ROUND_HALF_DOWN, "0.6793131"); + t("0.860572717616630645228638882", 14, RoundingMode.ROUND_UP, "0.71060013802643"); + t("9.149830551043357", 1, RoundingMode.ROUND_CEIL, "2"); + t("699999999999.999999", 10, RoundingMode.ROUND_FLOOR, "1.570796326"); + t("0.00049425612369342263152648633348687979871091472683831861", 11, RoundingMode.ROUND_DOWN, "0.00049425608344"); + t("0.6964950764232450078224720303827", 12, RoundingMode.ROUND_DOWN, "0.608369791345"); + t("0.97174510300524447126897418693399323494589950399453756485887175037390442", 4, RoundingMode.ROUND_DOWN, "0.771"); + t("755555555555555555055855555555.55555554552555555555555555555", 3, RoundingMode.ROUND_HALF_DOWN, "1.57"); + t("185231", 17, RoundingMode.ROUND_FLOOR, "1.5707909281305262"); + t("69.4", 14, RoundingMode.ROUND_HALF_UP, "1.5563881020101"); + t("0.8724516608", 15, RoundingMode.ROUND_CEIL, "0.71738486842166"); + t("0.9", 6, RoundingMode.ROUND_CEIL, "0.732816"); + t("86572907665698262226085", 10, RoundingMode.ROUND_HALF_DOWN, "1.570796327"); + t("0.9822428384084134678015218524008167259563354101144964976542345139331139722995296579", 8, RoundingMode.ROUND_HALF_DOWN, "0.77644029"); + t("3288888888858888688.88888488888888888808888888885888858808", 14, RoundingMode.ROUND_UP, "1.5707963267949"); + t("57000000", 18, RoundingMode.ROUND_HALF_DOWN, "1.57079630925103697"); + t("42051089116", 2, RoundingMode.ROUND_HALF_UP, "1.6"); + t("264354111.3", 8, RoundingMode.ROUND_HALF_UP, "1.5707963"); + t("0.849330692424884", 13, RoundingMode.ROUND_CEIL, "0.7041053683497"); + t("875083676372267739803385530062400304035782730200834882362610010", 13, RoundingMode.ROUND_DOWN, "1.570796326794"); + t("95710313.07535260894", 2, RoundingMode.ROUND_CEIL, "1.6"); + t("3000000000000000000000300000000000000000000000000000000000000000000", 4, RoundingMode.ROUND_CEIL, "1.571"); + t("73732622978.7007613723", 1, RoundingMode.ROUND_FLOOR, "1"); + t("400000000000000009658105119780842448210290852", 9, RoundingMode.ROUND_HALF_EVEN, "1.57079633"); + t("20096.71757", 14, RoundingMode.ROUND_UP, "1.5707465674253"); + t("14099899.9", 3, RoundingMode.ROUND_UP, "1.58"); + t("96857222.073694270051398165030034606323", 19, RoundingMode.ROUND_HALF_DOWN, "1.570796316470421287"); + t("60944217", 9, RoundingMode.ROUND_HALF_DOWN, "1.57079631"); + t("0.000004332", 3, RoundingMode.ROUND_DOWN, "0.00000433"); + t("7452004.3", 11, RoundingMode.ROUND_DOWN, "1.5707961926"); + t("217750", 14, RoundingMode.ROUND_CEIL, "1.5707917343724"); + t("12377127827293998751802990547081366466027858274277877132", 16, RoundingMode.ROUND_HALF_EVEN, "1.570796326794897"); + t("69999999991822", 17, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948823"); + t("42", 8, RoundingMode.ROUND_DOWN, "1.5469913"); + t("0.4917", 17, RoundingMode.ROUND_HALF_DOWN, "0.45698558932906678"); + t("0.101404775271136622070316250694364947429603", 12, RoundingMode.ROUND_HALF_DOWN, "0.101059324776"); + t("12222186510722151299553.9999942974103004353794665227029274549392636924664039397525444444444444444444", 16, RoundingMode.ROUND_DOWN, "1.570796326794896"); + t("36561", 6, RoundingMode.ROUND_HALF_DOWN, "1.57077"); + t("2201352.0879", 17, RoundingMode.ROUND_HALF_UP, "1.5707958725286275"); + t("306111.666666666666666666611111111111", 20, RoundingMode.ROUND_DOWN, "1.5707930600131666521"); + t("14.046", 3, RoundingMode.ROUND_CEIL, "1.5"); + t("41111118456096677777777777777.99999999918053266666666666666", 10, RoundingMode.ROUND_FLOOR, "1.570796326"); + t("0.675635", 10, RoundingMode.ROUND_HALF_UP, "0.594185777"); + t("3111.82343046105988", 10, RoundingMode.ROUND_FLOOR, "1.570474971"); + t("111111768691.64442", 19, RoundingMode.ROUND_DOWN, "1.570796326785896672"); + t("313666666661.266666566666666666666666666566866666666646666666666666666666666666666666666", 12, RoundingMode.ROUND_DOWN, "1.57079632679"); + t("75.58788", 10, RoundingMode.ROUND_DOWN, "1.557567464"); + t("6779165975.164558468370203", 20, RoundingMode.ROUND_UP, "1.5707963266473858482"); + t("90", 19, RoundingMode.ROUND_FLOOR, "1.559685672897289146"); + t("0.45", 5, RoundingMode.ROUND_CEIL, "0.42286"); + t("784332.17", 12, RoundingMode.ROUND_HALF_EVEN, "1.57079505182"); + t("100000000000022222222222222222.222222222222200589938", 18, RoundingMode.ROUND_UP, "1.57079632679489662"); + t("0.9668", 15, RoundingMode.ROUND_UP, "0.768519554903472"); + t("37461083158886018839166119.2807028", 10, RoundingMode.ROUND_CEIL, "1.570796327"); + t("75", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("0.16443191881562934710394179741877680589686339475689172238601", 5, RoundingMode.ROUND_FLOOR, "0.16297"); + t("25.2", 7, RoundingMode.ROUND_DOWN, "1.531134"); + t("0.02604809", 10, RoundingMode.ROUND_HALF_EVEN, "0.02604220116"); + t("0.56066428940295", 13, RoundingMode.ROUND_CEIL, "0.5109938801367"); + t("6394863", 20, RoundingMode.ROUND_UP, "1.5707961704193808342"); + t("2565688213422047175566032462062819841946222", 11, RoundingMode.ROUND_HALF_EVEN, "1.5707963268"); + t("6684663.3", 3, RoundingMode.ROUND_HALF_UP, "1.57"); + t("0.6", 14, RoundingMode.ROUND_FLOOR, "0.54041950027058"); + t("6945.38219777", 14, RoundingMode.ROUND_HALF_DOWN, "1.5706523462385"); + t("93000000", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("4.04910163097337343687956687332048", 20, RoundingMode.ROUND_DOWN, "1.3286729984418555736"); + t("596586883219", 2, RoundingMode.ROUND_DOWN, "1.5"); + t("38.2", 17, RoundingMode.ROUND_FLOOR, "1.5446242936936584"); + t("2092295.19", 16, RoundingMode.ROUND_UP, "1.570795848850865"); + t("80000000002000000000000000000000500000000000000000000000005000", 3, RoundingMode.ROUND_HALF_UP, "1.57"); + t("438", 13, RoundingMode.ROUND_HALF_UP, "1.568513225739"); + t("1397111111111111161111111110111111111113111111111111111611111111.111111111111111111119111111111", 7, RoundingMode.ROUND_HALF_UP, "1.570796"); + t("5944133333333333333", 19, RoundingMode.ROUND_FLOOR, "1.570796326794896619"); + t("95260", 12, RoundingMode.ROUND_DOWN, "1.5707858292"); + t("54211.8623721087", 16, RoundingMode.ROUND_HALF_EVEN, "1.570777880647575"); + t("1", 4, RoundingMode.ROUND_CEIL, "0.7854"); + t("528437806.9575441115797782028770441878570921", 11, RoundingMode.ROUND_FLOOR, "1.5707963249"); + t("0.5777339", 3, RoundingMode.ROUND_CEIL, "0.524"); + t("48139328000955628.943353141147592044553", 13, RoundingMode.ROUND_HALF_EVEN, "1.570796326795"); + t("5.988", 1, RoundingMode.ROUND_HALF_DOWN, "1"); + t("673073818773692580971.2862371537384", 19, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619"); + t("60000000000000", 9, RoundingMode.ROUND_HALF_UP, "1.57079633"); + t("615805142584367", 5, RoundingMode.ROUND_FLOOR, "1.5707"); + t("43.06", 9, RoundingMode.ROUND_FLOOR, "1.54757709"); + t("16666666666999999999999.222222222222222226675", 2, RoundingMode.ROUND_HALF_UP, "1.6"); + t("80700003.2", 11, RoundingMode.ROUND_HALF_DOWN, "1.5707963144"); + t("87954.6", 4, RoundingMode.ROUND_HALF_UP, "1.571"); + t("69.27", 11, RoundingMode.ROUND_HALF_DOWN, "1.5563610656"); + t("666666666666666666666.88833333333566666666666", 10, RoundingMode.ROUND_FLOOR, "1.570796326"); + t("6618.683", 11, RoundingMode.ROUND_DOWN, "1.5706452393"); + t("49999999999999999999999999999993.99999999999999997", 14, RoundingMode.ROUND_FLOOR, "1.5707963267948"); + t("2222222222222222222222222222222222222922222222222222222222222222222222222222.22222", 17, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966"); + t("1", 14, RoundingMode.ROUND_HALF_EVEN, "0.78539816339745"); + t("300462515077870245970491783520909662098219341140491", 1, RoundingMode.ROUND_HALF_UP, "2"); + t("0.1", 4, RoundingMode.ROUND_CEIL, "0.09967"); + t("8094446114.444444444444", 18, RoundingMode.ROUND_HALF_DOWN, "1.57079632667135512"); + t("1599999999999999999999999999999999999.9999999999999", 4, RoundingMode.ROUND_HALF_EVEN, "1.571"); + t("3509257563891435847738951559", 19, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619"); + t("57700000", 15, RoundingMode.ROUND_UP, "1.57079630946388"); + t("4178405459281466.995", 19, RoundingMode.ROUND_HALF_UP, "1.57079632679489638"); + t("705.6854234478059169", 7, RoundingMode.ROUND_HALF_DOWN, "1.569379"); + t("0.000000774663644739379172127283954522452089", 7, RoundingMode.ROUND_HALF_DOWN, "0.0000007746636"); + t("30502323249", 3, RoundingMode.ROUND_UP, "1.58"); + t("511111111111153333", 9, RoundingMode.ROUND_UP, "1.57079633"); + t("9111.111111", 5, RoundingMode.ROUND_HALF_UP, "1.5707"); + t("591.48", 4, RoundingMode.ROUND_DOWN, "1.569"); + t("43956701", 3, RoundingMode.ROUND_HALF_UP, "1.57"); + t("0.114919", 4, RoundingMode.ROUND_HALF_UP, "0.1144"); + t("725993522234858314329635181614713581804274369182923471127636306600299", 9, RoundingMode.ROUND_UP, "1.57079633"); + t("242704839614944612944", 13, RoundingMode.ROUND_DOWN, "1.570796326794"); + t("59", 3, RoundingMode.ROUND_DOWN, "1.55"); + t("2.97", 20, RoundingMode.ROUND_UP, "1.2460185364387823301"); + t("4.427211956", 17, RoundingMode.ROUND_HALF_UP, "1.3486484510096502"); + t("2759952973", 7, RoundingMode.ROUND_DOWN, "1.570796"); + t("22117028.66666666666184479481", 12, RoundingMode.ROUND_HALF_DOWN, "1.57079628158"); + t("0.8656674915", 7, RoundingMode.ROUND_DOWN, "0.7135198"); + t("58630.2894221", 12, RoundingMode.ROUND_HALF_UP, "1.57077927076"); + t("830831657411348596687376450704481.133530062303489966405161", 1, RoundingMode.ROUND_HALF_UP, "2"); + t("2400000.55555554863321111111111111111111", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("731663462.38676", 12, RoundingMode.ROUND_FLOOR, "1.57079632542"); + t("8225222222222222222221222222229222222222222222222222222024222222222222222220222222222.222222222222", 12, RoundingMode.ROUND_FLOOR, "1.57079632679"); + t("8", 15, RoundingMode.ROUND_HALF_DOWN, "1.44644133224814"); + t("179999.7999", 17, RoundingMode.ROUND_FLOOR, "1.5707907712331651"); + t("20720990509478660194603324228625133278", 5, RoundingMode.ROUND_FLOOR, "1.5707"); + t("35820", 8, RoundingMode.ROUND_HALF_EVEN, "1.5707684"); + t("31164599280813727153843868483140", 2, RoundingMode.ROUND_HALF_EVEN, "1.6"); + t("7.96", 1, RoundingMode.ROUND_HALF_UP, "1"); + t("377888835886", 16, RoundingMode.ROUND_UP, "1.570796326792251"); + t("0.996691693688702478", 6, RoundingMode.ROUND_HALF_EVEN, "0.783741"); + t("0.0000000015164291", 12, RoundingMode.ROUND_DOWN, "0.00000000151642909999"); + t("9901300.000638149084", 13, RoundingMode.ROUND_CEIL, "1.570796225799"); + t("8839571581863523354341987103224763661451795705696151701620364", 5, RoundingMode.ROUND_CEIL, "1.5708"); + t("41.76950003000000009", 4, RoundingMode.ROUND_UP, "1.547"); + t("1846388289522.893727540438082386472982349042", 9, RoundingMode.ROUND_CEIL, "1.57079633"); + t("4", 7, RoundingMode.ROUND_DOWN, "1.325817"); + t("3.1", 17, RoundingMode.ROUND_UP, "1.2587542052323634"); + t("755556631999999999", 14, RoundingMode.ROUND_DOWN, "1.5707963267948"); + t("4999999999999999963469567", 7, RoundingMode.ROUND_FLOOR, "1.570796"); + t("353382644077473210274662", 14, RoundingMode.ROUND_HALF_UP, "1.5707963267949"); + t("40000", 3, RoundingMode.ROUND_CEIL, "1.58"); + t("468.4122", 18, RoundingMode.ROUND_HALF_EVEN, "1.56866145823088766"); + t("2777777777777677777777777778773777.77777770777777777777777777777", 8, RoundingMode.ROUND_HALF_DOWN, "1.5707963"); + t("8662161220043381321017020984012066833249242570554112625706350710541492160", 15, RoundingMode.ROUND_HALF_UP, "1.5707963267949"); + t("3595669.6", 6, RoundingMode.ROUND_HALF_DOWN, "1.5708"); + t("91578.46381366254408705141634392", 14, RoundingMode.ROUND_UP, "1.5707854071971"); + t("705488.8888888888888888887888888888188888818888288084", 12, RoundingMode.ROUND_HALF_EVEN, "1.57079490934"); + t("4444444444444444444447444444444444.4444", 14, RoundingMode.ROUND_HALF_DOWN, "1.5707963267949"); + t("91111.111111111611115", 16, RoundingMode.ROUND_UP, "1.570785351185141"); + t("9709544893794.802575382489802332", 4, RoundingMode.ROUND_HALF_DOWN, "1.571"); + t("0.93980064136400456512422864327708459152987", 27, RoundingMode.ROUND_HALF_EVEN, "0.754374334147010659089244184"); + t("0.79", 25, RoundingMode.ROUND_HALF_EVEN, "0.6686135679278209106919582"); + t("68.94444464444144441404", 27, RoundingMode.ROUND_HALF_EVEN, "1.55629291193926841573948013"); + t("0.58575408097", 32, RoundingMode.ROUND_HALF_DOWN, "0.52987869920365187730504311568444"); + t("0.20916", 17, RoundingMode.ROUND_HALF_EVEN, "0.20618753780750517"); + t("499999999996126998", 6, RoundingMode.ROUND_HALF_DOWN, "1.5708"); + t("60.2", 7, RoundingMode.ROUND_DOWN, "1.554186"); + t("91111111111111111.222221681", 28, RoundingMode.ROUND_HALF_UP, "1.570796326794896608255711936"); + t("0.434022070205160079407451089414549594669951329971452908479909513133795938222879820644625974", 25, RoundingMode.ROUND_FLOOR, "0.4094875365294782316357052"); + t("2.26", 9, RoundingMode.ROUND_CEIL, "1.15421539"); + t("888", 5, RoundingMode.ROUND_CEIL, "1.5697"); + t("0.588442379933", 17, RoundingMode.ROUND_HALF_DOWN, "0.53187790372259856"); + t("2", 28, RoundingMode.ROUND_DOWN, "1.10714871779409050301706546"); + t("0.5408360268324", 3, RoundingMode.ROUND_UP, "0.496"); + t("8383436696040469273622430840837817479317216788", 1, RoundingMode.ROUND_FLOOR, "1"); + t("0.87129019999919999999999999909299", 28, RoundingMode.ROUND_HALF_DOWN, "0.7167250070636630655784453667"); + t("5802794017.1023945272212946204997680069051815419864202758516548351721495", 6, RoundingMode.ROUND_CEIL, "1.5708"); + t("74469964543133721462406880638127787302", 30, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169164"); + t("23199089.783468302215866", 3, RoundingMode.ROUND_HALF_UP, "1.57"); + t("0.8", 14, RoundingMode.ROUND_HALF_UP, "0.67474094222355"); + t("0.3466909730436502", 33, RoundingMode.ROUND_CEIL, "0.333723875052398278485715593455697"); + t("0.02744306336722998106064665171541567451766495848106476381009574229124724", 23, RoundingMode.ROUND_FLOOR, "0.027436177156229766741523"); + t("40000000000000747900283309094900", 24, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132"); + t("0.3582011007420322104418281989906222", 33, RoundingMode.ROUND_FLOOR, "0.343962158448546289632284121172668"); + t("0.6385665545", 39, RoundingMode.ROUND_DOWN, "0.568295612683459397449054651413593229974"); + t("4.3385", 38, RoundingMode.ROUND_HALF_UP, "1.3442584192995616297335319105160047149"); + t("8008007602809987779715512385930375838312524243523474003888", 26, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192313217"); + t("960000000000000000000005000000000000000000600000000000000000400000008000040000000000000000000000", 33, RoundingMode.ROUND_HALF_UP, "1.57079632679489661923132169163975"); + t("0.706178753", 3, RoundingMode.ROUND_FLOOR, "0.614"); + t("3444444444444444444.41383807531693867118189834712300228087425425", 31, RoundingMode.ROUND_HALF_UP, "1.570796326794896618940999110995"); + t("988888888888888888641029432482165131736890000000.2222222222222222222865750311", 3, RoundingMode.ROUND_HALF_DOWN, "1.57"); + t("0.2842265", 39, RoundingMode.ROUND_HALF_DOWN, "0.276923619089587922029502604248364811669"); + t("2.8389389283587594", 31, RoundingMode.ROUND_DOWN, "1.232123549234702277485074565368"); + t("0.0000010560989", 3, RoundingMode.ROUND_HALF_DOWN, "0.00000106"); + t("578977888752762", 21, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489489205"); + t("8.899999994", 39, RoundingMode.ROUND_DOWN, "1.45890606054841686389214855673930705412"); + t("0.00005321856206842641313", 30, RoundingMode.ROUND_UP, "0.0000532185620181842704412891368122"); + t("0.92", 39, RoundingMode.ROUND_UP, "0.743755584298859885755482781119123508102"); + t("8222222222622772887509160150844444444444.33336666666666", 4, RoundingMode.ROUND_HALF_UP, "1.571"); + t("0.16220214580070668009549992", 2, RoundingMode.ROUND_HALF_EVEN, "0.16"); + t("989603417.6", 34, RoundingMode.ROUND_UP, "1.570796325784390812344342727694401"); + t("0.17386338", 35, RoundingMode.ROUND_CEIL, "0.17214260865094965353014938821154837"); + t("0.0011908", 17, RoundingMode.ROUND_CEIL, "0.0011907994371471705"); + t("10977777", 20, RoundingMode.ROUND_UP, "1.5707962357017727564"); + t("85.4", 15, RoundingMode.ROUND_HALF_UP, "1.55908726006381"); + t("0.041592557006", 2, RoundingMode.ROUND_HALF_DOWN, "0.042"); + t("274440013714550428596728820", 31, RoundingMode.ROUND_CEIL, "1.570796326794896619231321687996"); + t("1561746015543811.036309888963791", 6, RoundingMode.ROUND_FLOOR, "1.57079"); + t("16746026970714194510554637027", 13, RoundingMode.ROUND_UP, "1.570796326795"); + t("8562893.52594", 40, RoundingMode.ROUND_HALF_DOWN, "1.570796210011942706439386416949134318888"); + t("4612170422.1014", 1, RoundingMode.ROUND_CEIL, "2"); + t("244", 4, RoundingMode.ROUND_CEIL, "1.567"); + t("599999999997377467827380555.3333333333333333333", 33, RoundingMode.ROUND_DOWN, "1.57079632679489661923132168997308"); + t("0.3277802559142", 6, RoundingMode.ROUND_CEIL, "0.316745"); + t("9188030611.78660756585", 32, RoundingMode.ROUND_CEIL, "1.5707963266860593675664025493292"); + t("0.0435", 23, RoundingMode.ROUND_UP, "0.043472593484265085227583"); + t("716666666606.661", 36, RoundingMode.ROUND_HALF_DOWN, "1.57079632679350127039399555837851938"); + t("169419589383.1111111188888888", 15, RoundingMode.ROUND_HALF_UP, "1.57079632678899"); + t("8753673.837216269216", 9, RoundingMode.ROUND_CEIL, "1.57079622"); + t("0.705", 2, RoundingMode.ROUND_DOWN, "0.61"); + t("0.8407834502919054365931692", 32, RoundingMode.ROUND_CEIL, "0.69911898751614987278540893975085"); + t("124627011231466", 6, RoundingMode.ROUND_FLOOR, "1.57079"); + t("4662597613414129265867628971", 36, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169142527873"); + t("67640.1676208224", 9, RoundingMode.ROUND_DOWN, "1.57078154"); + t("9350000000.00000000400006000005000000070000000000000001", 9, RoundingMode.ROUND_FLOOR, "1.57079632"); + t("8653613761369609407536502701140406554", 12, RoundingMode.ROUND_FLOOR, "1.57079632679"); + t("0.64419", 14, RoundingMode.ROUND_HALF_DOWN, "0.5722800128071"); + t("99575937308052038501210224633887193", 20, RoundingMode.ROUND_CEIL, "1.5707963267948966193"); + t("63238896.5930245", 33, RoundingMode.ROUND_HALF_EVEN, "1.57079631098184399063274071545125"); + t("0.911473962089148", 5, RoundingMode.ROUND_UP, "0.73912"); + t("195000550000020000000.0700004000000000004", 23, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966192262"); + t("0.000048404293391", 15, RoundingMode.ROUND_CEIL, "0.0000484042933531967"); + t("62712066.54", 19, RoundingMode.ROUND_DOWN, "1.57079631084900207"); + t("3", 11, RoundingMode.ROUND_UP, "1.2490457724"); + t("0.75", 3, RoundingMode.ROUND_DOWN, "0.643"); + t("7885480", 21, RoundingMode.ROUND_DOWN, "1.57079619997953471355"); + t("9937695765361892", 40, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896518604373190607237457398"); + t("5122371387873014218367424427568798", 25, RoundingMode.ROUND_FLOOR, "1.570796326794896619231321"); + t("584972.0004", 4, RoundingMode.ROUND_HALF_UP, "1.571"); + t("81722358209690160494782186581654184581461", 7, RoundingMode.ROUND_CEIL, "1.570797"); + t("41701379126353723839.671", 35, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192073416693731009"); + t("0.137097397337829254372954502168", 8, RoundingMode.ROUND_HALF_UP, "0.13624801"); + t("0.214445283", 28, RoundingMode.ROUND_FLOOR, "0.2112458914926452367571461392"); + t("1456645177262680832749338907641.4073706", 32, RoundingMode.ROUND_UP, "1.5707963267948966192313216916391"); + t("0.163226", 39, RoundingMode.ROUND_DOWN, "0.161799145400750682659514724647885819259"); + t("8238296449927", 4, RoundingMode.ROUND_HALF_UP, "1.571"); + t("61274.8711194869386", 15, RoundingMode.ROUND_CEIL, "1.57078000689114"); + t("0.6116", 19, RoundingMode.ROUND_HALF_DOWN, "0.5489052800783001354"); + t("0.7239729443877518", 39, RoundingMode.ROUND_HALF_DOWN, "0.626634660458277274952105004057671395637"); + t("40356367122222222", 7, RoundingMode.ROUND_HALF_DOWN, "1.570796"); + t("5937.356226365124691450138622", 14, RoundingMode.ROUND_CEIL, "1.5706279016656"); + t("516871254562033804771023935.36", 34, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321689705034"); + t("0.4802923", 29, RoundingMode.ROUND_HALF_EVEN, "0.44775751308547035376078530836"); + t("7983066722864.62403898971825", 19, RoundingMode.ROUND_UP, "1.570796326794771355"); + t("15402.041039845", 5, RoundingMode.ROUND_HALF_DOWN, "1.5707"); + t("687.41299997999999999999999999999999999999999999599999999", 32, RoundingMode.ROUND_HALF_UP, "1.5693415982770808255230832308496"); + t("304933.5642304537817365188181705722", 10, RoundingMode.ROUND_HALF_EVEN, "1.570793047"); + t("31.834587320305", 35, RoundingMode.ROUND_CEIL, "1.5393942774421917264626386502505007"); + t("432455152519959731290858313333633598248.222222220337952507178398328", 4, RoundingMode.ROUND_HALF_DOWN, "1.571"); + t("47839131888843766", 16, RoundingMode.ROUND_UP, "1.570796326794897"); + t("0.34100528098022586187777710207794405554438106894378931643394712687184898060532918458", 3, RoundingMode.ROUND_HALF_DOWN, "0.329"); + t("485656755339261893972233726018693075159046871351463707579510029365868725737103758860839412307", 2, RoundingMode.ROUND_HALF_DOWN, "1.6"); + t("45914312.770758769380013723", 17, RoundingMode.ROUND_HALF_UP, "1.5707963050151957"); + t("0.272435494440134805747955400235656", 19, RoundingMode.ROUND_HALF_DOWN, "0.2659804507893081136"); + t("151111111111111111.11111", 9, RoundingMode.ROUND_CEIL, "1.57079633"); + t("0.49", 34, RoundingMode.ROUND_HALF_DOWN, "0.4556156532112244921374614168226994"); + t("0.69058807958551256196399175153386550245806483903350425577524239708", 11, RoundingMode.ROUND_FLOOR, "0.60438126965"); + t("505877708", 28, RoundingMode.ROUND_HALF_DOWN, "1.570796324818134282828864522"); + t("832710563.3441", 15, RoundingMode.ROUND_DOWN, "1.57079632559399"); + t("5490444484599444444444444444444444444.4", 5, RoundingMode.ROUND_FLOOR, "1.5707"); + t("7000000.00000000000100000000900207", 7, RoundingMode.ROUND_FLOOR, "1.570796"); + t("94700", 14, RoundingMode.ROUND_HALF_DOWN, "1.5707857671328"); + t("911111195349601285455161670471771357", 7, RoundingMode.ROUND_CEIL, "1.570797"); + t("5155132643275823", 23, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948964252499"); + t("0.000043464280901461631639235312", 30, RoundingMode.ROUND_FLOOR, "0.0000434642808740915406500099285305"); + t("161130.1266", 27, RoundingMode.ROUND_UP, "1.57079012063084096980706372"); + t("41313762737270364497922198", 36, RoundingMode.ROUND_DOWN, "1.57079632679489661923132166743474241"); + t("60", 16, RoundingMode.ROUND_DOWN, "1.554131203080955"); + t("99.955", 20, RoundingMode.ROUND_DOWN, "1.5607921585326799684"); + t("60", 6, RoundingMode.ROUND_CEIL, "1.55414"); + t("2.03563006250822388438897897220855792", 33, RoundingMode.ROUND_HALF_DOWN, "1.11417448168285430706889448298021"); + t("9", 29, RoundingMode.ROUND_UP, "1.4601391056210009726721818195"); + t("71700000", 2, RoundingMode.ROUND_FLOOR, "1.5"); + t("6409.82872721324027", 9, RoundingMode.ROUND_FLOOR, "1.57064031"); + t("70848283833.0307782", 7, RoundingMode.ROUND_DOWN, "1.570796"); + t("644.21", 23, RoundingMode.ROUND_FLOOR, "1.5692440391917843783228"); + t("8.7825947", 19, RoundingMode.ROUND_UP, "1.457423017911734624"); + t("827.1", 31, RoundingMode.ROUND_HALF_EVEN, "1.569587283737541707286983695939"); + t("4.248022818116", 18, RoundingMode.ROUND_CEIL, "1.33960189284063304"); + t("6724898590142638", 1, RoundingMode.ROUND_HALF_UP, "2"); + t("1444444444444444444204", 26, RoundingMode.ROUND_UP, "1.5707963267948966192306294"); + t("77.8337", 10, RoundingMode.ROUND_CEIL, "1.557949129"); + t("21074.5267", 3, RoundingMode.ROUND_DOWN, "1.57"); + t("27499999999999999.99999999998999999990999999999999", 38, RoundingMode.ROUND_UP, "1.5707963267948965828676853280033878058"); + t("1763809699.89165427", 9, RoundingMode.ROUND_CEIL, "1.57079633"); + t("57659570.8285", 29, RoundingMode.ROUND_DOWN, "1.5707963094517220927619115909"); + t("174396.3688", 14, RoundingMode.ROUND_DOWN, "1.5707905927305"); + t("0.496313789909306483913", 24, RoundingMode.ROUND_UP, "0.460694294887438350691447"); + t("70000000007", 34, RoundingMode.ROUND_CEIL, "1.570796326780610904947035977353896"); + t("0.0000988", 34, RoundingMode.ROUND_HALF_DOWN, "0.00009879999967852324454951230040094219"); + t("538356964444444", 37, RoundingMode.ROUND_DOWN, "1.570796326794894761727720838352248278"); + t("156284392961599.87656", 1, RoundingMode.ROUND_HALF_DOWN, "2"); + t("0.244368310850529682710606920076", 25, RoundingMode.ROUND_CEIL, "0.23967126672932687854751"); + t("4536.842", 35, RoundingMode.ROUND_HALF_UP, "1.5705759091599414333668369158439957"); + t("3", 2, RoundingMode.ROUND_HALF_EVEN, "1.2"); + t("4638150173683544.416379316223", 36, RoundingMode.ROUND_CEIL, "1.5707963267948964036281259016647037"); + t("198959.099999099999997999", 7, RoundingMode.ROUND_CEIL, "1.570792"); + t("2649516060547341218195.43452496675515985263897053576635547518", 28, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619230944264"); + t("83005995883.284809875953383", 24, RoundingMode.ROUND_HALF_UP, "1.57079632678284929675348"); + t("0.24751980942660257174990992545291", 35, RoundingMode.ROUND_CEIL, "0.24264300733277916188033829871783776"); + t("711588280244444444444444", 7, RoundingMode.ROUND_CEIL, "1.570797"); + t("6424142.6", 23, RoundingMode.ROUND_DOWN, "1.5707961711321004664821"); + t("16385111111111111.55555555555555555551", 9, RoundingMode.ROUND_FLOOR, "1.57079632"); + t("7303365848.19514117249829375037236", 2, RoundingMode.ROUND_CEIL, "1.6"); + t("82222222271111111111111.030721629548095620486175044919664841989307", 20, RoundingMode.ROUND_CEIL, "1.5707963267948966193"); + t("884850", 6, RoundingMode.ROUND_FLOOR, "1.57079"); + t("63087999999999999", 40, RoundingMode.ROUND_UP, "1.570796326794896603380446723341501127445"); + t("36366663666666667666663666.5", 26, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192313217"); + t("8090296400", 24, RoundingMode.ROUND_HALF_EVEN, "1.57079632667129175353073"); + t("75", 20, RoundingMode.ROUND_CEIL, "1.5574637835007509414"); + t("42933558323333", 16, RoundingMode.ROUND_HALF_DOWN, "1.570796326794873"); + t("130000300005000000000000000000000.255", 30, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169164"); + t("0.07", 30, RoundingMode.ROUND_DOWN, "0.0698860016346424992949804879844"); + t("500", 19, RoundingMode.ROUND_CEIL, "1.568796329461556886"); + t("0.56801547027791573539997804", 18, RoundingMode.ROUND_DOWN, "0.516569378296737926"); + t("8444.8888888888886", 16, RoundingMode.ROUND_FLOOR, "1.570677911975177"); + t("73", 79, RoundingMode.ROUND_UP, "1.557098553422030830759106714685942522500700602920812852695172620145831141456037"); + t("0.796", 13, RoundingMode.ROUND_HALF_EVEN, "0.672297154322"); + t("5908888892888888885888.88888888888888888", 58, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231152455084770105430189790569044460661"); + t("2999944.999155663982490235431535266823188", 51, RoundingMode.ROUND_CEIL, "1.57079599345545196894157945309127287171563502938038"); + t("8.8888888888888888888638732270887111111111111111", 32, RoundingMode.ROUND_FLOOR, "1.4587673643689087453001632732397"); + t("0.0007203807498723346605626696", 70, RoundingMode.ROUND_HALF_UP, "0.0007203806252588883303789228136575308819432644350163789194321190691850266"); + t("334", 41, RoundingMode.ROUND_HALF_UP, "1.5678023237650158805993139816208700385502"); + t("1967599962312898580563817494863156402058897195636899", 18, RoundingMode.ROUND_CEIL, "1.57079632679489662"); + t("833333333367254552320512088114072155486460326380", 25, RoundingMode.ROUND_UP, "1.570796326794896619231322"); + t("3553819", 16, RoundingMode.ROUND_DOWN, "1.570796045407465"); + t("59999999999999999999999999.999999999999999999999999999", 27, RoundingMode.ROUND_DOWN, "1.57079632679489661923132167"); + t("7124235620.6709081786680121207727", 31, RoundingMode.ROUND_UP, "1.570796326654530683396955317099"); + t("0.0000000044240602738681616830688886561668", 22, RoundingMode.ROUND_CEIL, "0.000000004424060273868161654206"); + t("52966687702645000109454138.6374362816074", 28, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231321673"); + t("0.3", 74, RoundingMode.ROUND_HALF_DOWN, "0.29145679447786709199560462143289119350316759901206541927220608308729901491"); + t("37", 13, RoundingMode.ROUND_HALF_DOWN, "1.543775877608"); + t("18131946493311290898310608443995253870403889328552", 65, RoundingMode.ROUND_DOWN, "1.5707963267948966192313216916397514420985846996874977592106709394"); + t("522222222222222222664460188421073170", 31, RoundingMode.ROUND_UP, "1.57079632679489661923132169164"); + t("0.45637922947057938", 64, RoundingMode.ROUND_HALF_UP, "0.4281462151861310545072586005382481394357030109096010442355737036"); + t("90088", 77, RoundingMode.ROUND_CEIL, "1.5707852265373711005374413888489164974636023362374857225182067929816465342191"); + t("5999999999999999999.9999999999999999999999999999999999999999999999999999999", 53, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966190646550249730847754319180330208862"); + t("0.5387151", 10, RoundingMode.ROUND_DOWN, "0.4941379164"); + t("7899.99999929999991", 72, RoundingMode.ROUND_HALF_UP, "1.57066974451708046945312125786011209109094248832326016835993107763047836"); + t("9056545870881988479", 67, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619120904319028065752102179582307630101677119368742"); + t("71207277691071369256352975790962098324", 76, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321691639751442084541191321196850500804516071449401382"); + t("40.128693532663393099999999999999999", 79, RoundingMode.ROUND_FLOOR, "1.545881658764101557912291868914587779025308774134740739348596347634586949383071"); + t("39999999995705071725782461038509048015.2287309689474518465575767235055540909139571195222", 12, RoundingMode.ROUND_FLOOR, "1.57079632679"); + t("325455742", 32, RoundingMode.ROUND_HALF_EVEN, "1.5707963237222822174857227559386"); + t("34708", 32, RoundingMode.ROUND_DOWN, "1.5707675149935907735079008998268"); + t("0.51250288021965633167835344415998343209417282275949726673489673029426102", 2, RoundingMode.ROUND_FLOOR, "0.47"); + t("5699930979414087938396951228625752127037", 7, RoundingMode.ROUND_HALF_DOWN, "1.570796"); + t("28355555555555855555525555555555955585535.5555555555555555", 25, RoundingMode.ROUND_UP, "1.570796326794896619231322"); + t("621054488958.8177", 13, RoundingMode.ROUND_FLOOR, "1.570796326793"); + t("700000.0707", 36, RoundingMode.ROUND_FLOOR, "1.57079489822361233447428012556917713"); + t("8020197462424369246183167789156548734770763005620440", 4, RoundingMode.ROUND_HALF_EVEN, "1.571"); + t("833604273777130626245375417112941", 46, RoundingMode.ROUND_FLOOR, "1.570796326794896619231321691639750242488612129"); + t("36495.22373822403176159847117049771116362607941", 60, RoundingMode.ROUND_CEIL, "1.57076892594905107477960369084681613816717755716647252681653"); + t("2546701", 9, RoundingMode.ROUND_HALF_DOWN, "1.57079593"); + t("4966689554.003828748144561825", 28, RoundingMode.ROUND_HALF_UP, "1.570796326593555265171077741"); + t("0.77629", 3, RoundingMode.ROUND_HALF_DOWN, "0.66"); + t("322020000.00000003003", 40, RoundingMode.ROUND_FLOOR, "1.570796323689499438931961703035237872113"); + t("0.97559153051609751763348337517627742611481175", 2, RoundingMode.ROUND_UP, "0.78"); + t("0.201", 27, RoundingMode.ROUND_DOWN, "0.198356913139568573361830257"); + t("6790359145460817252747.4583404", 73, RoundingMode.ROUND_FLOOR, "1.570796326794896619231174424024213245621940308680000127509681174999223154"); + t("3.773845386", 12, RoundingMode.ROUND_FLOOR, "1.31176768715"); + t("2624999999999999999.2999999999999999999999999999999999999999999999", 35, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966188503693106873705"); + t("0.7090839373101640523", 11, RoundingMode.ROUND_HALF_DOWN, "0.61679658461"); + t("0.00009376029", 68, RoundingMode.ROUND_FLOOR, "0.000093760289725251348944065353995890113353563145858872811744107315153369"); + t("739999999999999.999999999999979999969999999999999999999999199999999999999", 2, RoundingMode.ROUND_HALF_DOWN, "1.6"); + t("3406019", 45, RoundingMode.ROUND_DOWN, "1.57079603319700418235082667408831074689953466"); + t("224359379375055378754690102773775775616.299017882365554729", 37, RoundingMode.ROUND_CEIL, "1.570796326794896619231321691639751443"); + t("233833333333333333333333333303333.33333333343333", 7, RoundingMode.ROUND_DOWN, "1.570796"); + t("0.316218487892052424570216", 36, RoundingMode.ROUND_HALF_DOWN, "0.306268934488276138361025280371884358"); + t("0.20553290212929084460404474", 20, RoundingMode.ROUND_CEIL, "0.20270995334718593405"); + t("0.0815685376979915729591008737250853112441593652206975703191262334936", 70, RoundingMode.ROUND_DOWN, "0.08138835304095685343216866598571068778486111527151604562996402771417945"); + t("10000000000000090000.400000000000005004", 50, RoundingMode.ROUND_DOWN, "1.5707963267948966191313216916397523421025846996794"); + t("60.905", 30, RoundingMode.ROUND_CEIL, "1.55437878877337734993879005901"); + t("0.0000092399", 41, RoundingMode.ROUND_FLOOR, "0.0000092398999997370455296810702947219238127139"); + t("41929279223231739.82570031144682651396988085205", 23, RoundingMode.ROUND_HALF_UP, "1.5707963267948965953816"); + t("93349999999999999999.31506163132222222222222222", 74, RoundingMode.ROUND_CEIL, "1.5707963267948966192206093188491783301542104381434303249352007960174663224"); + t("69463053165048144444444444444", 41, RoundingMode.ROUND_DOWN, "1.5707963267948966192313216916253552997691"); + t("98404947928251735478107073762973632946", 64, RoundingMode.ROUND_UP, "1.570796326794896619231321691639751442088422609050310641255885387"); + t("937595376537.878", 51, RoundingMode.ROUND_HALF_DOWN, "1.5707963267938300610709214617757762545950547644846"); + t("0.0006488585351778815193353", 16, RoundingMode.ROUND_CEIL, "0.0006488584441176604"); + t("665811994579552432", 48, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661772939621096185990656346643033"); + t("0.705", 58, RoundingMode.ROUND_DOWN, "0.6140737925245042330669578876021929069304552183587385817359"); + t("0.500815438405298575", 69, RoundingMode.ROUND_HALF_UP, "0.464299746921244543168638711333367868301982678975602849687729633618566"); + t("0.81771247286102", 7, RoundingMode.ROUND_HALF_DOWN, "0.6854483"); + t("73333333333336666.666666666666666633337484071436666", 62, RoundingMode.ROUND_FLOOR, "1.5707963267948966055949580552767349131729648368024987226805693"); + t("15970010142133202822291675520801350029446872289204618", 74, RoundingMode.ROUND_UP, "1.5707963267948966192313216916397514420985846996875528478701044234980393617"); + t("700000006000000000", 6, RoundingMode.ROUND_CEIL, "1.5708"); + t("501046.3082", 65, RoundingMode.ROUND_DOWN, "1.5707943309713896241303257361493987167994789553356517326364134913"); + t("2.59", 61, RoundingMode.ROUND_FLOOR, "1.202329501713780502032305263488582945455736639984202053881549"); + t("4362606085453062063459764539949319285473847514", 51, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169163975144209858469945834"); + t("731903198", 65, RoundingMode.ROUND_HALF_DOWN, "1.5707963254285957166903821186748842841169386339117549165804499742"); + t("0.70807778829408133176749", 18, RoundingMode.ROUND_DOWN, "0.616126750476671683"); + t("0.0264192820974324250278", 24, RoundingMode.ROUND_DOWN, "0.0264131379736383914963791"); + t("4755555555555.078", 40, RoundingMode.ROUND_HALF_DOWN, "1.570796326794686338857489894822343808245"); + t("2902216058659698", 2, RoundingMode.ROUND_HALF_EVEN, "1.6"); + t("0.159747607951903720454693569430377807173944911536222630594866114202085525670695", 27, RoundingMode.ROUND_DOWN, "0.15840916041060010602404757"); + t("6899999999999999999999999999999999999999999999999999999999999999999999999999.99999999999999", 57, RoundingMode.ROUND_UP, "1.57079632679489661923132169163975144209858469968755291049"); + t("9154439939", 10, RoundingMode.ROUND_CEIL, "1.570796327"); + t("28466433.22150634323317362", 49, RoundingMode.ROUND_DOWN, "1.570796291665802917232110844830448147604089157832"); + t("0.8534", 63, RoundingMode.ROUND_HALF_DOWN, "0.706464630664369172305216393996912771532364400206346236355447544"); + t("9.3228728088902424", 42, RoundingMode.ROUND_FLOOR, "1.46394180275564024894513436440039574065114"); + t("28269249999999999999999999.99999999999999999999999999999999999999999999999999999999999499899999999999", 44, RoundingMode.ROUND_CEIL, "1.5707963267948966192313216562656258462656567"); + t("600000000000000000000000000000000000000050000000", 75, RoundingMode.ROUND_HALF_UP, "1.57079632679489661923132169163975144209858469968588624382080562948724153648"); + t("923.498", 64, RoundingMode.ROUND_HALF_EVEN, "1.569713487840017198399177077416910441517907147339565228761275442"); + t("986446", 38, RoundingMode.ROUND_FLOOR, "1.570795313054661472393640177853775039"); + t("393244364845245366537", 17, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966"); + t("0.0380457", 73, RoundingMode.ROUND_FLOOR, "0.03802735918922804350865333216048723803075130438852481212616381927737475613"); + t("181583420", 33, RoundingMode.ROUND_CEIL, "1.57079632128778589293263214228235"); + t("5939491193555035498515488345483302513931306610294885655435377269063755276282197668440809833333333333", 40, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619231321691639751442099"); + t("7458469195", 60, RoundingMode.ROUND_FLOOR, "1.57079632666082084927702881210818854530091443124938062561068"); + t("0.627007512668965894017376111", 6, RoundingMode.ROUND_HALF_EVEN, "0.560042"); + t("63442499", 69, RoundingMode.ROUND_UP, "1.57079631103259192187064683576356331799584338129880815710564368618786"); + t("23624.598034366", 10, RoundingMode.ROUND_HALF_DOWN, "1.570753998"); + t("399999999999999999835051145007103649493682431251835954790666370000000000000000.888888888888245907046237257395216666654329", 46, RoundingMode.ROUND_UP, "1.5707963267948966192313216916397514420985847"); + t("197698625459507641026", 44, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192262634875289453271788908"); + t("0.35308276640780502805819885088890564236", 62, RoundingMode.ROUND_HALF_DOWN, "0.33941851498746649469655689401923170807121046971241066440033939"); + t("4861584355350942699325373.09476402502", 55, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231321485945490701905565689509430446"); + t("0.000000006868295362887407036", 10, RoundingMode.ROUND_HALF_DOWN, "0.000000006868295363"); + t("9523430.491732", 70, RoundingMode.ROUND_FLOOR, "1.570796221790717624259827266612042512440600788345748498783324304652723"); + t("6796852234584005328234275592784.4890139324961379392144691196248635", 63, RoundingMode.ROUND_HALF_EVEN, "1.57079632679489661923132169163960431516901695633072334535998127"); + t("8", 33, RoundingMode.ROUND_UP, "1.44644133224813518419996684247589"); + t("7245424999999999999999999999.768", 33, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169150173"); + t("0.000037596532340410079649801418754", 62, RoundingMode.ROUND_UP, "0.000037596532322695856317799925144607608423999975808564979258091875"); + t("48314478017639.3928961", 68, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948759215017584144660608533341397201917725517899867881453"); + t("0.6903000000090000001", 29, RoundingMode.ROUND_CEIL, "0.60418618802228662374766363157"); + t("5608888828580588888888881.888888888888888888888", 67, RoundingMode.ROUND_CEIL, "1.5707963267948966192313215133513184632861694155150827378764399788"); + t("15", 19, RoundingMode.ROUND_UP, "1.504228163019072816"); + t("24513831722409.37009665001191", 26, RoundingMode.ROUND_UP, "1.5707963267948558259350585"); + t("45000000000000000004000100000.7", 31, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231321691618"); + t("0.7286035882", 76, RoundingMode.ROUND_HALF_DOWN, "0.6296661904808540104927403634770555666927409079414335211077137110378581549498"); + t("211161911.1111811111111111111111109", 59, RoundingMode.ROUND_FLOOR, "1.5707963220591940735507262853787814916061195052537537760426"); + t("886422328890537.1763740552582229990127", 25, RoundingMode.ROUND_HALF_EVEN, "1.570796326794895491100895"); + t("0.30088", 9, RoundingMode.ROUND_HALF_EVEN, "0.292263938"); + t("56060554110701687234415163574173", 8, RoundingMode.ROUND_FLOOR, "1.5707963"); + t("872137330776357191290122750", 40, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169049314302997"); + t("112278503296588037738350351552357433008361310529999999.5480749535", 59, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619231321691639751442098584699687552901581"); + t("337700356560.32364868", 46, RoundingMode.ROUND_FLOOR, "1.570796326791935414184973541553878944198689411"); + t("87961181779252.0114", 15, RoundingMode.ROUND_UP, "1.57079632679489"); + t("166666666666666666666666666666666666636466966666666666666666666666666666664666666666666666666666666.66", 45, RoundingMode.ROUND_FLOOR, "1.57079632679489661923132169163975144209858469"); + t("872", 59, RoundingMode.ROUND_UP, "1.5696495383067941543030847388892113661675856953443122679138"); + t("0.83079439820416015817298330581341875232098780575068508", 80, RoundingMode.ROUND_HALF_EVEN, "0.69323801606605310996305125113134558117317461461396887135580404255668358032599206"); + t("2300082589233", 30, RoundingMode.ROUND_DOWN, "1.5707963267944618522343968263"); + t("7999999909.9999999999989999999992999999999999999929999999999999999998999995", 28, RoundingMode.ROUND_FLOOR, "1.570796326669896617825071675"); + t("0.29150810237754372465", 50, RoundingMode.ROUND_HALF_UP, "0.28364797013176089751590471178706116362084320455491"); + t("1.77777777777777777836", 49, RoundingMode.ROUND_FLOOR, "1.058406866484158912704661323874483285565386392709"); + t("30700.84001209", 45, RoundingMode.ROUND_HALF_EVEN, "1.57076375439625044062570414196203485310244523"); + t("0.891", 153, RoundingMode.ROUND_HALF_DOWN, "0.72782041553354958303913201300903988914064827250724801937209689246758416275367880212735809631990575320696888573924272479754566588349663699040857181163425"); + t("906317697", 157, RoundingMode.ROUND_FLOOR, "1.570796325691530764950755878530405749599575268320617717275725797829105760331296118586908636465945223102997618499297104678674691982441818236599482793981537002"); + t("0.85", 37, RoundingMode.ROUND_HALF_UP, "0.704494064242217716657480340781996257"); + t("0.00008370604802800671492094992620071639930377642969883270421852543091726", 73, RoundingMode.ROUND_HALF_EVEN, "0.00008370604783250559107180834532855622281614857907411057048026884123368156074"); + t("7888888888888888888888888.8888888888888888888888888888888888", 85, RoundingMode.ROUND_CEIL, "1.570796326794896619231321564879188061816894558842482487952261028548274400326882030599"); + t("0.86383928297450579688", 4, RoundingMode.ROUND_HALF_UP, "0.7125"); + t("24980094974432649116267396.72146170315335712960535171", 126, RoundingMode.ROUND_HALF_EVEN, "1.57079632679489661923132165160787802354237207417932753470776237077804237503416216711536785188583135919384541257336071501491794"); + t("0.3367191", 139, RoundingMode.ROUND_HALF_EVEN, "0.324794643012269668145812262833071987526221582495309584584939219045666131940533124124105426926748564324610027576505157987726084252453634419"); + t("7.1726775438209516202963486766150272", 18, RoundingMode.ROUND_HALF_UP, "1.43227129188655828"); + t("0.00000000343383458943225981866094003", 51, RoundingMode.ROUND_HALF_DOWN, "0.00000000343383458943225980516457368167930391349102772876147"); + t("738373104150.198296165326", 126, RoundingMode.ROUND_HALF_UP, "1.57079632679354229037727857076020870058799344852136050641573907383290482849632999398276722680466941054991354873790091003857708"); + t("1491972436671215526.69530919", 142, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661856106802245593595073831284110950344417372088654338770309655837936798641728914183274893857998844788522975511340695896955733"); + t("0.00000650428728329", 5, RoundingMode.ROUND_DOWN, "0.0000065042"); + t("0.000000097250350885691231905754571833508453940664369958603339", 132, RoundingMode.ROUND_HALF_EVEN, "0.0000000972503508856909253197849948398909640297710232807534798760313170620560381106386878113819154521286882079307258358816776877952554246035"); + t("48888888888888888888888.88888882888888888888888888888888848888888888888888888888888888888888888", 135, RoundingMode.ROUND_FLOOR, "1.570796326794896619231301237094296896644039245142098339929621056484489568188183219981931574955055539234803125558750700254934410000416"); + t("299999.9999", 60, RoundingMode.ROUND_DOWN, "1.57079299346156218713255590143399000986329823015481051953951"); + t("3670.663411", 158, RoundingMode.ROUND_FLOOR, "1.5705238964837262074632703958809997708820874005803788869815410336937092022957270242820516179688428739645959782296790678946103319492124406668523238044746957077"); + t("729611.41298476814149262974217658791464610785685682", 146, RoundingMode.ROUND_HALF_UP, "1.5707949562023014342509877919264195764766267256308646467858915181437045055324678845784864041794421249756010179316010974919541202029727340500811127"); + t("53786089063991493.5244744716107163333333333333", 61, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896600639153764905769975060509806040036135181518"); + t("0.40856637214499536855779", 160, RoundingMode.ROUND_HALF_UP, "0.3878692977463101555527787525625812682336184873110543577993245386157879232908092110798117033420955981218936917557216837604097211171993249492378151588459297040707"); + t("280844", 49, RoundingMode.ROUND_HALF_UP, "1.570792766099279138445491931295445307261458651345"); + t("5543095336613849943113", 151, RoundingMode.ROUND_FLOOR, "1.570796326794896619231141287021163215342684231706946099363158912886261787669777673922893089463013721687744579932998328272961742687569496522112307409235"); + t("16.2", 34, RoundingMode.ROUND_UP, "1.509146156155637583866297351865481"); + t("0.9448898382813544", 4, RoundingMode.ROUND_FLOOR, "0.757"); + t("46378931002856702", 112, RoundingMode.ROUND_CEIL, "1.570796326794896597669807047449155975529692942577809289760713904561202307578943708096802270373606182772134391028"); + t("0.0099564341", 78, RoundingMode.ROUND_HALF_EVEN, "0.00995610512387108776163169003042890483408549733242934562262847215446581618427486"); + t("64.9644", 151, RoundingMode.ROUND_DOWN, "1.555404496357436550554248929965434555273613259143549939101763708476874929421333953273620136545846698528807836277150991594953032658396541298478828449561"); + t("0.53590525975620433555318302542803391385426", 83, RoundingMode.ROUND_CEIL, "0.49195755234809552361874758395823200938044980313999018314705191468489182589343333105"); + t("245555555555555555555555555555555555555555555551555555555555555555555555555555555555555555555555555.55", 109, RoundingMode.ROUND_UP, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058529918675854"); + t("7.5", 48, RoundingMode.ROUND_HALF_UP, "1.43824479449822259796140424793548158553861797"); + t("5526", 129, RoundingMode.ROUND_CEIL, "1.57061536407519264444510819307760915729866850748780233939237134112675365932923837410120391680409359191659914196323589834127673103"); + t("8790172697166569724756465912166530026005.9321", 88, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169163975144209847093627988717251130090940406471730472305888004"); + t("3692638477.755336666", 155, RoundingMode.ROUND_DOWN, "1.5707963265240875470667822605341491886088004649857927478454693540313661101155302057338683899346704760356610209323785368570510330335574407431426668897636102"); + t("7355030939457156999140", 57, RoundingMode.ROUND_HALF_UP, "1.57079632679489661923118573028102549149476959215081546177"); + t("8.395227", 65, RoundingMode.ROUND_DOWN, "1.4522396309727100376524446217894330118152632111444906054395817478"); + t("178.88888888888888888888888888818888888898881888888888888888888188888", 92, RoundingMode.ROUND_UP, "1.5652063229095709072713935220511003557181651704857651377025446391812580459637320870026670723"); + t("0.37277270872737448376519144151636314403394201272146565221552126308", 141, RoundingMode.ROUND_FLOOR, "0.356816548111846931013750476199712075870531188889466355768028649103228372128117716909500778122103586686438159716350936160033869955511906237911"); + t("2999999999999999999999919999999999999999999949999999999.991", 132, RoundingMode.ROUND_FLOOR, "1.570796326794896619231321691639751442098584699687552910154138962820574869809762277091795190448836305976259228440826338508429490206"); + t("8087362599850.419277266404890123046429915662", 153, RoundingMode.ROUND_UP, "1.57079632679477296952628453952637331149964265489542947015909573155093659563171485983338801234119603213960919978738575287435717013858340450653413308572238"); + t("93.688414995", 75, RoundingMode.ROUND_DOWN, "1.56012305383103670436636549472962023620491089462241939805393023652202992952"); + t("8615.223343626562901463", 149, RoundingMode.ROUND_CEIL, "1.5706802531940597052524614121998662762145372560363266629023628536682628108681796075707954434916093326247461358911112887807415457178170226975724066226"); + t("133433439.63474329244850113472200327505", 41, RoundingMode.ROUND_FLOOR, "1.570796319300523374133465577425740481033"); + t("91988182549", 141, RoundingMode.ROUND_FLOOR, "1.57079632678402565763288677439723880018923014032092270137680806153248804363058467151311381339256847412711041926331743133139772739220542840859"); + t("0.92867134294481499607507743280734580262539320828632393578", 47, RoundingMode.ROUND_HALF_UP, "0.74843169750042637622234166761584532294023555316"); + t("9583357357109736336496395118118710107531.20603", 69, RoundingMode.ROUND_FLOOR, "1.57079632679489661923132169163975144209848035212304743826598505894319"); + t("2799999999999999999999999999999999999999999999999999999994999999999999999999999939999999999099999999999999999999999990999999999999999999.9999999999999999999999999", 133, RoundingMode.ROUND_DOWN, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058533991074043256641153323546922304775"); + t("0.99723686631888721258290476902737237761605653168727321169830155438876799291599192422782996706888533555864601", 62, RoundingMode.ROUND_HALF_EVEN, "0.78401468607193846627011830196321569363183092183745080554664119"); + t("15965557311218866130.547911230719318432395595115814611123", 114, RoundingMode.ROUND_DOWN, "1.57079632679489661916868685963815834990726051559002096846712031354901402537761234460061582102434040890079086016594"); + t("10.20869", 80, RoundingMode.ROUND_HALF_DOWN, "1.4731520800712391710865380511034472946435817650532576253411114210983073949236087"); + t("0.00000007567636907353640008113672484759815626929005231434602557941606803280938528551", 114, RoundingMode.ROUND_CEIL, "0.0000000756763690735362556171469112579274987421740876307022819337534993467111827147356779451323396995616309954436887077297"); + t("111111111811111111111111111111111111.111111111111111111111111111111111111111111111111116", 112, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231321691639751433098584756387552553277474546576894025478293818602324701154722616543990566173"); + t("543768285595139032090925610543128429", 30, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169164"); + t("444058333673427941477305318147228888232696204342850549112275869889441025283706755", 137, RoundingMode.ROUND_FLOOR, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044970620610272844799488472993955431611981139589886609744948"); + t("7555555.5555555555555555555555555556", 138, RoundingMode.ROUND_FLOOR, "1.57079619444195544276150627845025418178785854411353686880290033695845419485148977454750129877649106279515094585458539430757405572817252121"); + t("903501.661", 68, RoundingMode.ROUND_HALF_UP, "1.5707952199900691739925010132039003339137276845643754317094119499645"); + t("3695052043060649319", 64, RoundingMode.ROUND_UP, "1.570796326794896618960689508832472280208508173209661539205691275"); + t("200000000000000500000000000000000000000000000000.0500000000000000000000100000000000000000000007", 2, RoundingMode.ROUND_FLOOR, "1.5"); + t("0.65", 7, RoundingMode.ROUND_UP, "0.5763753"); + t("468927452136649384592176518", 4, RoundingMode.ROUND_CEIL, "1.571"); + t("5479000", 53, RoundingMode.ROUND_DOWN, "1.5707961442798391269902382668183969456587544210785386"); + t("18354245577", 22, RoundingMode.ROUND_HALF_DOWN, "1.570796326740413312042"); + t("3214.949", 67, RoundingMode.ROUND_HALF_UP, "1.570485279880077771803504868506915192441959459871910207229084636172"); + t("0.4920935842762684", 54, RoundingMode.ROUND_DOWN, "0.457302494460990195719285368461930730727603132848820234"); + t("0.77238015392760633326685406485060350137396", 77, RoundingMode.ROUND_HALF_UP, "0.65767122650559877721619717468438037932308225912407690660966062454704318155313"); + t("22461440805333137319", 5, RoundingMode.ROUND_HALF_DOWN, "1.5708"); + t("242997268238925", 72, RoundingMode.ROUND_FLOOR, "1.57079632679489250395872110932170700272792796177636928958059530436329804"); + t("2999999999999999993999999999.999999991999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999939999999499", 94, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619231321691306418108765251365687552910487472293931685980920882270881918647239"); + t("0.00342304584155791", 128, RoundingMode.ROUND_HALF_DOWN, "0.003423032472098783321047120870270043452396731719690058135732199597984336600554537998430013202414353368717003980446329370792024286"); + t("35866951989419129", 45, RoundingMode.ROUND_UP, "1.57079632679489659135050259402021158696261557"); + t("720928.5094036203012341543208", 36, RoundingMode.ROUND_CEIL, "1.57079493969480700480202867321269511"); + t("488888888888888888888888888888888888888888.8888888888888888888888888888888888888888888", 63, RoundingMode.ROUND_FLOOR, "1.57079632679489661923132169163975144209858265423300745594201775"); + t("0.604443114", 41, RoundingMode.ROUND_HALF_DOWN, "0.54368009287616794530579107010184222071658"); + t("0.56844", 29, RoundingMode.ROUND_CEIL, "0.51689029087881511741617321399"); + t("199999999999999999999999999999999999999999999999999999999999999999999.99999999999999999999999999999999", 92, RoundingMode.ROUND_DOWN, "1.5707963267948966192313216916397514420985846996875529104874722961539032031431044993140174126"); + t("109008000000010000.000002000000008", 10, RoundingMode.ROUND_FLOOR, "1.570796326"); + t("0.08204476241730069769508505", 102, RoundingMode.ROUND_CEIL, "0.0818614118866079025348731485850658741956355478438841221625587155269264363425939330076969131575931445792"); + t("176236827524998360801743172031959847949685789080093650.9663763530924338262", 4, RoundingMode.ROUND_HALF_UP, "1.571"); + t("944444444444444921122802887338757235699999999999999", 73, RoundingMode.ROUND_CEIL, "1.570796326794896619231321691639751442098584699687551851663942884389736729"); + t("15.4033043129943373289171773742085", 99, RoundingMode.ROUND_UP, "1.50596617061861888550490921896009836585981677079317459520459024459278979890571195158939720295921646"); + t("18868808.88781569", 34, RoundingMode.ROUND_HALF_DOWN, "1.570796273797380668675628304658149"); + t("20742579530635964807923946343362368352.7339549350162058596090705186671910118345642199879284102", 150, RoundingMode.ROUND_FLOOR, "1.57079632679489661923132169163975144205037468807723029941026506524120922981314245648707117401306777467137631646443174261845782795585630069237867126836"); + t("78888888888888885628441441139319280571", 6, RoundingMode.ROUND_HALF_UP, "1.5708"); + t("708643", 138, RoundingMode.ROUND_DOWN, "1.57079491564711134605961091102649572945774414637794421074013677704770177577706522361237479051531785077853512550404177645790191727401107374"); + t("0.1564", 102, RoundingMode.ROUND_HALF_DOWN, "0.15514316373974529695570262744698028353478633072072394559729846113250250632481223964938889142940044672"); + t("27633985697303956321763128343896978874956", 4, RoundingMode.ROUND_CEIL, "1.571"); + t("0.77215088792322157403591", 109, RoundingMode.ROUND_HALF_DOWN, "0.6575276115836581556714088214136951891916680093630465935719907941252266671745985485357482494549978766010284567"); + t("6.7402010217518", 131, RoundingMode.ROUND_HALF_EVEN, "1.4235072241833326993778366361688590022023188920984058955249168382797148589492631651202853736185037998020021687087234368833829817448"); + t("8376786791117.7722844183", 62, RoundingMode.ROUND_UP, "1.5707963267947772417152244288704403730975715814069093602374866"); + t("5481446395116666666.000000000000066666666", 65, RoundingMode.ROUND_DOWN, "1.570796326794896619048888091469751771764895500991839457020966975"); + t("4957777777777.75", 56, RoundingMode.ROUND_FLOOR, "1.5707963267946949159592463879547263856507167340585421525"); + t("4.27", 113, RoundingMode.ROUND_HALF_UP, "1.3407501820027851923322054408493946331375175799081128074766773707959861011094389181545509715340773264499278603397"); + t("0.052799338758599964089178308270590484023057114282", 116, RoundingMode.ROUND_HALF_UP, "0.052750356522675710920487510424048519954261199162968670024856053429198122589063078290239125893865328765129524250155687"); + t("3930665555.555555555555055555555555555555555555555555555555555555555555555255555555555555555555555556555555555555575555555555555555555", 160, RoundingMode.ROUND_CEIL, "1.570796326540486777980235856308868214737048759678362334334242981341356950309057319614979226426028541803451136567741310144811498181676022973614513108831165659122"); + t("2777.7754177777777", 99, RoundingMode.ROUND_UP, "1.57043632650459239779543971191193764408208697728748774312903600197511948394155914426304034119894954"); + t("46433333333333333333333333733333333333333333333333333333.3933333333333333333333333333343333333", 21, RoundingMode.ROUND_CEIL, "1.57079632679489661924"); + t("0.20999999999999999999999999999999999999999999999999999999996996999999999999999999999999979999999999", 146, RoundingMode.ROUND_HALF_EVEN, "0.20699219421982102489585928037957669648997068434550899162578247984698361799473299191912161430591578184243964684074636606130922672690274664699142549"); + t("90000000800000.000000000000000000000000034000600000400000009", 146, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948855081203093459598611814753874735855576232562923974511865821861190727294658890235988467637396558592900447969244872686285877073289933"); + t("63989999999999999399999999999999999.99999999999999990999999999999999999999", 7, RoundingMode.ROUND_HALF_EVEN, "1.570796"); + t("0.16209164433093355561797026590015118", 18, RoundingMode.ROUND_HALF_UP, "0.160694028891685685"); + t("380000000000000000.66666666666666666663", 130, RoundingMode.ROUND_HALF_UP, "1.570796326794896616599742744271330394083810923140923175983333370816557422473890845393370820098655941181044573520170760760174980575"); + t("203499999999.99999999999999999999999999999999959999999999999999999999999999999999999999999999", 11, RoundingMode.ROUND_HALF_UP, "1.5707963268"); + t("10332363707535786736", 31, RoundingMode.ROUND_CEIL, "1.570796326794896619134538416457"); + t("28", 139, RoundingMode.ROUND_HALF_UP, "1.535097214115572649844638318565080320341635058039745769320719199329879987994997792942024046760877779472495270082277167112175863421353036257"); + t("0.7427429461822151132", 145, RoundingMode.ROUND_HALF_DOWN, "0.6388403929080696111332806831591739238407940178740807722211744148273028772050118653384413305227929858873856578945086517545657877062281716813029475"); + t("90000000000800000000008000000100000000000000000000000100000000000000000000000000100.000000000000003", 157, RoundingMode.ROUND_FLOOR, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499302906301560046188312061807317010142197194012764291964453934587446505753883"); + t("0.951296844818051332709920623174071477383107539510890148451325553393", 102, RoundingMode.ROUND_FLOOR, "0.760443966630206694402037800879178674641200667594709331469340719313174819653166746284517430085227949587"); + t("595955555555555755955555555155155555555755555555.5555555554555", 35, RoundingMode.ROUND_UP, "1.5707963267948966192313216916397515"); + t("0.000000007", 71, RoundingMode.ROUND_HALF_EVEN, "0.0000000069999999999999998856666666666666700280666666666665490176666666666711504"); + t("5345259370250880674076679137789221905403488578366381754643", 154, RoundingMode.ROUND_CEIL, "1.570796326794896619231321691639751442098584699687552910487285214493181781774547117071028585768385813535758487986318284071335040739588346750847693169977407"); + t("4825.73540294722188167638200669950159597078474772207870757047409176280332663208030017243603197680412434148834182", 118, RoundingMode.ROUND_FLOOR, "1.570589104495664138292156284488752158314525299767011289229821783254592618427681353983529392339645861248628371525181911"); + t("0.231374819050204450996721497877884862549945965879513017366068913641241710319620078604635944", 91, RoundingMode.ROUND_UP, "0.2273737403597054405744905714891331872904826684523023915912507877226522861938187142426366906"); + t("832621.2", 111, RoundingMode.ROUND_HALF_UP, "1.57079512576854754294167332620284778980958203644887261196104636879615049627171182975538049689566765953312120575"); + t("87000.090000000000000260504", 118, RoundingMode.ROUND_HALF_DOWN, "1.570784832553914156330328420928855138690368838672803710623041096665875605978303550202126363448743482338129762640669934"); + t("3512563847", 105, RoundingMode.ROUND_FLOOR, "1.57079632651020428521038225674925066738533957502501765864950613051804375884493439275993154163190963103129"); + t("1851392800", 54, RoundingMode.ROUND_DOWN, "1.57079632625476272652092549700036870676089475214381822"); + t("82744567587346758193326115.63733649391654106058445388416719615779584", 148, RoundingMode.ROUND_DOWN, "1.570796326794896619231321679554365909756769604292708256371751861747163957685353474120590079746910014753855544745120610335466159633954827076055923111"); + t("5888855654034051317712681513446412150060205005", 65, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192313216916397514420985846995177406313709059813"); + t("0.5845852661194268362485378", 91, RoundingMode.ROUND_CEIL, "0.5290080240316160557625784581000648507254673679148610451286551693520129599422911415209805951"); + t("63", 55, RoundingMode.ROUND_UP, "1.55492464380310657002248088180552973991777177995041711"); + t("0.2001", 33, RoundingMode.ROUND_HALF_UP, "0.197491711846661422636422619317907"); + t("6557.6327", 112, RoundingMode.ROUND_HALF_UP, "1.570643832741326262782943096948281273161877736390502759260150791490457063586973472005511438874777361102803932331"); + t("0.00065160303045668726016", 69, RoundingMode.ROUND_UP, "0.000651602938236092036488893764506673822028547601669575965619145635262712"); + t("309999999999999994999999999999999999999999999999999999999.99999999999099999999999999999999999999999999", 96, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966192313216916397514420985846996875529104842464897022952998652689113847770372221"); + t("6688261844925788807049", 127, RoundingMode.ROUND_CEIL, "1.570796326794896619231172175962407159574194299417619370922517634845914870976548479203006976340869863827904682595339682825847712"); + t("5580216.473857594133", 21, RoundingMode.ROUND_HALF_DOWN, "1.57079614759037925242"); + t("9463390489.644282062620825402474433905505041236026466533805068115154333", 98, RoundingMode.ROUND_HALF_UP, "1.5707963266892262465362191727312805687617115925817871787704175237942234788918283300605764940737517"); + t("8200000.000000000000000005000000003", 52, RoundingMode.ROUND_DOWN, "1.570796204843677107036804297328464480140215597057891"); + t("0.9695631467734992924397021957206981362", 90, RoundingMode.ROUND_DOWN, "0.76994578721520423442316998481122287766948322622594148964739748389382693880076756940822196"); + t("9706568704840240620723548616021191111111111111111111", 129, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169163975144209858469968755280746445454309933964050139711068992429527066657328197205628756022847054871838"); + t("0.869932019386166935836", 77, RoundingMode.ROUND_HALF_DOWN, "0.71595241961162653819025190913803172812602831574116121492408984781142247499518"); + t("8111111111.111111111111111111", 85, RoundingMode.ROUND_UP, "1.570796326671608947998444979311608970174074973891502310801334595553981149499578229047"); + t("43483884414", 28, RoundingMode.ROUND_HALF_DOWN, "1.570796326771899593701605178"); + t("0.030319481690988", 136, RoundingMode.ROUND_FLOOR, "0.03031019620552842948453397594215863776363782898826569738599914355720226150801464325457229448573641550642424666391370342066633280934681561"); + t("3528470161494643555555555555.9999999999637", 128, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192313216913563424987800999971607736804991467168295772437285880447470545563797917674260870724977037953207987415"); + t("0.00897", 134, RoundingMode.ROUND_CEIL, "0.0089697594335226103784495692063512508140245236561900729560761342352707937893915909632885764794079816618286748400586057641827962939396326"); + t("5570780761149.12587884901281658595686", 79, RoundingMode.ROUND_CEIL, "1.570796326794717111179779967952798871581805488390559143749953804858660613534775"); + t("2.13616180852614003304685637018368399982694041780982219265648350639508913984708752943267410304198479440607063624031976", 123, RoundingMode.ROUND_HALF_EVEN, "1.13296874679099641190594582521478361645534434874607989203204171127392422372999047186113855633360689518518114824587291993886"); + t("82036019184901113885124999808.26492", 150, RoundingMode.ROUND_UP, "1.57079632679489661923132169162756167460455139692145265020225462684600410505087798947893497197477724848505765766883233995858575777676492901394804084314"); + t("12479395585265969766975314307378024719715292006", 138, RoundingMode.ROUND_UP, "1.57079632679489661923132169163975144209858469960742082450883174584996372553862005713336067133209126021311453404743157993102191310646260658"); + t("0.800000000050000000000000000001", 62, RoundingMode.ROUND_DOWN, "0.67474094225404046793382614910121135971397521180192325807978906"); + t("95291529173.510142502", 142, RoundingMode.ROUND_DOWN, "1.570796326784402507019320506364786873112070124769997268481656531847251471929648837488301654332323350715101787829785954611332860592315381795158"); + t("388.0762", 136, RoundingMode.ROUND_HALF_DOWN, "1.568219518975488538564637402037546308061409925378740787685513919473875745473360188029576364996140523815145289832551764832405453782931049"); + t("7425248310731450.841265298", 129, RoundingMode.ROUND_CEIL, "1.57079632679489648455569090435212784979022186758952047856010459452716365051048219327919234716653587869661271987923159832175653553"); + t("727063193610", 51, RoundingMode.ROUND_FLOOR, "1.57079632679352122296757353037213296014335649909952"); + t("54868336885984188320784372400392452808043436969425093608562667538954025534239", 148, RoundingMode.ROUND_CEIL, "1.570796326794896619231321691639751442098584699687552910487472296153908203143086273866395809173146903230706318206031737929009832951875542274855389527"); + t("0.00261565188219583455", 51, RoundingMode.ROUND_FLOOR, "0.00261564591710870096646796335439963855538889353892924"); + t("3222222222222222222222222222222222212.22222222222222222222222222222", 49, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321691639751441788239872101"); + t("5989357.08272921275684315212875033562763478515", 25, RoundingMode.ROUND_FLOOR, "1.570796159832068023893401"); + t("4000", 93, RoundingMode.ROUND_DOWN, "1.57054632680010495236934253369239238729097368561062513554458361613239325335696367029539131233"); + t("0.34056963738681793", 15, RoundingMode.ROUND_CEIL, "0.328249028886227"); + t("68530036704694773358840089545387193350012109720", 25, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231322"); + t("969683263580505049.24788868781901752307571789486", 26, RoundingMode.ROUND_CEIL, "1.5707963267948966182000572"); + t("510966595319205454041302666666666666666", 30, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169164"); + t("4280070000007060000000000200000000000000.00000000000000001000000001", 56, RoundingMode.ROUND_FLOOR, "1.5707963267948966192313216916397514420983510586489721511"); + t("40035325763009957", 30, RoundingMode.ROUND_HALF_EVEN, "1.57079632679489659425338081214"); + t("20000000100000003000001000000.004", 129, RoundingMode.ROUND_FLOOR, "1.57079632679489661923132169158975144234858470593755534173745670240325898427587715654101615886610971016754332464786321449003969935"); + t("8833333333603333733333333333335333337331333.33333333333", 8, RoundingMode.ROUND_DOWN, "1.5707963"); + t("68888888888888397887437712345046986021514978113965830437892.11111111111111111708155221717296436193625142872426376949914022866978187444", 136, RoundingMode.ROUND_CEIL, "1.570796326794896619231321691639751442098584699687552910487457780024875944975125525470884388060228642345463573702322488675446516524393811"); + t("696666666666666.666666666666666666666666666666666666669666666666666666666666666766666666666666666664636666666666666666666606666616666666666", 2, RoundingMode.ROUND_HALF_EVEN, "1.6"); + t("395170605059536366591842700.372875502291287521585153149809", 89, RoundingMode.ROUND_UP, "1.5707963267948966192313216891091988473544991849277256522099137405818334867922770021782376"); + t("0.000000006100299256076476396893962863508266623843629072159629078", 142, RoundingMode.ROUND_UP, "0.00000000610029925607647632122249366527969925983327236105878073266784406813854182175877275714148149890023926352235842988134330708888579363473403181867"); + t("93097169174003036010960525601570065988256145917422546023787945111111111111111111", 154, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104488572552243832761749519017084667501361668564726862640257124609594479170625"); + t("9971935873537053813678031776291153633548649350546569634319054766348359", 7, RoundingMode.ROUND_HALF_DOWN, "1.570796"); + t("77777777777777772073077596588340229882802396485751712287746117", 12, RoundingMode.ROUND_UP, "1.5707963268"); + t("0.6203302598", 131, RoundingMode.ROUND_HALF_UP, "0.55523425013080956182595058866654433847407454882201835618747358745171222287438373248245498651232452026030022970026320848041434738192"); + t("11050000000.900000000000000000000000000000000004000008000000000003", 40, RoundingMode.ROUND_CEIL, "1.570796326704398881682131462119118062316"); + t("1333333333333337519080804432187181419135356114547426742522718903433889763255890.8461230111111111111111111", 16, RoundingMode.ROUND_FLOOR, "1.570796326794896"); + t("634173", 3, RoundingMode.ROUND_DOWN, "1.57"); + t("8.89896734527793", 88, RoundingMode.ROUND_HALF_DOWN, "1.458893184759122792158225305813254373506730385987812330960020587986859153855838691176302"); + t("0.00000294917594144772977446558908234939705837964143641360868783003128444879494085191857911100348244", 12, RoundingMode.ROUND_FLOOR, "0.00000294917594143"); + t("64795.149439", 31, RoundingMode.ROUND_UP, "1.570780893540886424635122179096"); + t("42322487542565884048528485382.585396627108", 107, RoundingMode.ROUND_UP, "1.5707963267948966192313216916161233413402290145961961244433944556481120532128200423720328163999779906321705"); + t("0.000075149525341903584486177570029540645768418879863177035165053", 1, RoundingMode.ROUND_CEIL, "0.00008"); + t("59999999999999.99999982419646692690772", 34, RoundingMode.ROUND_HALF_UP, "1.570796326794879952564655024973085"); + t("120", 151, RoundingMode.ROUND_HALF_EVEN, "1.562463186354760701025428330484986397146166238123699677455683773580455286623105121977403281243654329806415745474305039276474011233022700464887136982361"); + t("0.0000468723843279623692731497645730854530240088573498391946002884249786041586206152128184479020561733921092447904902868096849343282897850058556545690230200139994058100652770260349027071", 45, RoundingMode.ROUND_DOWN, "0.0000468723842936358409333283673165394532872139746"); + t("0.61868911206414822770670116437199356068021414860656", 176, RoundingMode.ROUND_UP, "0.55404827169811636429956349128620144971321421320596403589610554906644750727501820337004605292940117347201101775449901426693525301348221220186563134486620124399666531807845394233"); + t("58653026131607150459340630511838262798279628.1557157258509165549403780259018956616464961", 131, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619231321691639751442098584682638134219690946484918742317735834537104605481995550564817714943605788199286822043816"); + t("6911608247558593382930830838772165646015578437314230623518153775516742365680079691991022648687100638199542513316487210609475232762443355779222914905379288.099245190642765209308089151111", 57, RoundingMode.ROUND_DOWN, "1.57079632679489661923132169163975144209858469968755291048"); + t("487938651.58093236130382529692595075442336", 20, RoundingMode.ROUND_CEIL, "1.5707963247454586484"); + t("33936084315.25460893158171209983922319993", 24, RoundingMode.ROUND_DOWN, "1.57079632676542946000604"); + t("442775.888888888902100060918972688337729577705971964145", 138, RoundingMode.ROUND_UP, "1.5707940683160022338104677716950948972833304809031478027478511208746443168787328785129390173995762788365691535716098952480685810623731299"); + t("0.411687618649111532829470526308851349377627947016376721878010709911065710631079094631", 10, RoundingMode.ROUND_FLOOR, "0.39054113"); + t("10000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000.0000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000000000000004", 202, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058533990974043256641153323546922304775291115862679704065240558725142051350969260552779822311474477465180982"); + t("0.00000000898565176768454223931521406797077992471637944796253504923315559594292530834568069936173934454202180026869456617875072096700598807859564106955960872612747451527496441237706666149041659489212875518050882457289898147638756447733746981648903384938653997", 170, RoundingMode.ROUND_HALF_EVEN, "0.0000000089856517676845419974755690242196622897041321186081460974857872115674557689811036878449002117027333289610361875356765409131702137968586674538602706279159083322006802830252"); + t("0.9361683426529030224192148567796328111105045847167201041640680910212791136852922491974", 114, RoundingMode.ROUND_DOWN, "0.752442069140546656721768417528010431905637906648289428804040064566391619212987223378470053188738596868148212512375"); + t("0.5899999999999999999999999999399997", 299, RoundingMode.ROUND_FLOOR, "0.53303411017749002604051892167002441580815150728315866293306595711486598159588784043904047368018708200986241667636714871975084284449314870816194965615076964844275480359392843689599687301417479877084837179497443174995278425380705835533104599592893823952726279837008096018413990040468494339408358379384"); + t("0.572336790283068059662994986181376976230115554048300183543514346097186188278741515654284583791203210331925598175496267651265207186469883007750291759899216087943755655650246454368147418511174502199578874950181295971565518229387417495375385709506147017335949", 90, RoundingMode.ROUND_UP, "0.519830503674391245336390637686179707684423862910240411429624183328645410510714242826002527"); + t("0.9", 26, RoundingMode.ROUND_DOWN, "0.73281510178650659164079207"); + t("199999993333333333.99997440765369976624551", 213, RoundingMode.ROUND_DOWN, "1.57079632679489661423132152497307923654220526135164622632397301595293003743005674730119423943105117932441257351876481735449694763035252521536756773252702676526185825272870071477861605582594804015190062028364758343"); + t("90000000000000009000000000000000000000000000000000000000000000000.000000007000000000000000000000000000009000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000060000000002", 287, RoundingMode.ROUND_UP, "1.5707963267948966192313216916397514420985846996875529104874722961427970920319933893140174126710584228799629321455411533235469223036641800056157662349284379167498222982656865445045082418388818847619396213753565732717459487615390010191468117928990700230172649291255514728285664347199475107"); + t("35264012750837", 111, RoundingMode.ROUND_UP, "1.57079632679486826170981483292996099831933449655003759008810412868552221509776478984631336635010295640760326012"); + t("564749", 250, RoundingMode.ROUND_CEIL, "1.570794556096763468123703899632725909747125599105758531545124483276961974290310512400416468655670291970701843521473829506749076443579063726913746769385623955242181273776200390190535829013192755820730491336529343429073446644683505940580796642504661698"); + t("2803903212344110705418236190127", 45, RoundingMode.ROUND_UP, "1.57079632679489661923132169163939479640710808"); + t("23.5", 263, RoundingMode.ROUND_FLOOR, "1.5282687921751124181979180089509372269354209430263398250359488036539709046867316728312930258644636266002135399908774053586336049037442025956506440519270418054144384879723548291277179296559470366238129455585769983655030875953227595675022541429246569920391534175701"); + t("647926222.8131782368915463136351491171892883899825683118932486534142673800953279185401668464158794111", 82, RoundingMode.ROUND_CEIL, "1.570796325251511022553074548780077588342082239170004320629809190421166065083637541"); + t("8", 60, RoundingMode.ROUND_HALF_EVEN, "1.44644133224813518419996684247588041652541450791774882057236"); + t("354095536260062963303.11334362988054635", 86, RoundingMode.ROUND_CEIL, "1.5707963267948966192284975950398283155060773466352626149889082298841177979078574452449"); + t("0.555674708431954992118937361153721870741472547192793523806933100089675633392360005376048379956941491904269527332115127376", 40, RoundingMode.ROUND_CEIL, "0.5071895505695356456006428256683221297089"); + t("0.092549032636349866635837514177374902527802435267451", 238, RoundingMode.ROUND_FLOOR, "0.09228614488451000140832357841099007979078642525942932525840189637044064110902516498363177246954275136738505793330018710131086961566011218711515773509704359485813633518057785124154513026004144994130724038144485754576125190579081004694405201"); + t("955555555555521587649882625859701045233566504736214833208295401000", 244, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169163975144209858469968755291048747229615286169151519748536863667298199457417808240652041533498800323179586357674505436152553313676202525950842807162169619144121006665496464548085584245470950305556971101224515705930407"); + t("296666666666.66419693392008772792705166666", 265, RoundingMode.ROUND_HALF_DOWN, "1.570796326791525832714467730993880075985374057841468275915893354826641213211083294784249800550856322311376065289164447887194248942877875619873773670908939153085781700895788159423368591307377985834161116469518980977221746492356167084338529449499048910062191001352842"); + t("933316615895583293372881638795159454", 227, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192313216916397514410271369369790434471725957061977292011500215356473130303153985359320370849927276690401029396911653606326845526925920406824978774819036215602495281655853581425565927411181575160939871874157379"); + t("0.84", 271, RoundingMode.ROUND_DOWN, "0.6986598247214631978047509528351475335769933410589883858488616509435653373338071776895397677317291959944201753522123675882395557336715313553466544949648617515836443841444841302373786292363331927896023651658590705826934626221753531746414166055077082236329561481876896909845"); + t("3", 274, RoundingMode.ROUND_UP, "1.249045772398254425829917077281090123077829404129896719054669236797151965737293954957608990320417159552066873879511414175279279334012656713402870421976225900081907291840364731808892667143663044249449380274680981203022155450131429257930709747155985592381433775037358959307224"); + t("30398831865316617682694256604268402.3", 34, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231321691639751"); + t("2832515244395855500126331660451135856", 58, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321691639751441745541586511549843629"); + t("58810841242747826766708675493009641103684316291546998259609172889187104831875565340559637757639079277089481128865797532420116181478272381514341673", 158, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566411533235469223047752911158626796870605728868"); + t("0.799352996639581931514176140692", 235, RoundingMode.ROUND_UP, "0.6743463034473810255870358887526461136227776792980521608430010135836718453512318325920503398921773072224617571522825790313120424908603543013048038996094997296808435787072076908737675040727586187740875238671016680531111643467499588408058"); + t("408725088315490079236953.54067613", 218, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966192313192450074585202807195765993504845028464068052213893761707292702358554921786233518685367093208744290564484301878379618356230403940639033462420078794034830465970486376463326049647971209177819532857"); + t("0.0000000519909185123801168477696333864947846590579316200399903453228890261530630997732161827625535742648256722183145414538808", 17, RoundingMode.ROUND_FLOOR, "0.00000005199091851238007"); + t("0.363733707362466263709", 229, RoundingMode.ROUND_HALF_DOWN, "0.3488569760116356993862822255999079782346698579116878243594884964292596184419222473725021954272245473799154148853082734105394510512826857173318770881544012152156440602303555227340620439470288603830447860571786332528629993486692623"); + t("30000000000003000000000000.00000000000000000000076", 305, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619231321658306418108768584699687552577154138962853908203987557956103971977201922756855978981524868193672524184043131503456967115045935171353959662199626597054271864516675911832758199577255308556283158695365959837062070407184724979148830797306331157697246080592276984986165848815076963115"); + t("0.64520757926392376278112058954959046603494519820177", 12, RoundingMode.ROUND_HALF_DOWN, "0.57299882675"); + t("45304430211377593508961341678", 105, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169161767854557755388103224302918540985734028430937559034493608583969428217494013"); + t("8", 272, RoundingMode.ROUND_HALF_UP, "1.4464413322481351841999668424758804165254145079177488205723581770381859357155377406903068183577052036646949919532027742797357592208068960691504359171925291701341180388419292333648987957622157075751812495553453708836411082907140223703558710768873849320927571288195385677249"); + t("221835.3", 309, RoundingMode.ROUND_CEIL, "1.57079181894605564024180585585700005557383872998390059221166066952679086595306158371898958859686711205919414491812678315215982009228877662161719858482111952165397594573132097678286726172151455366332293558681744472843665711790062577493215172363922211461291559018694632816091387926842797258739899573224230498091"); + t("452745913", 306, RoundingMode.ROUND_CEIL, "1.57079632458615221914658807556000549778836685615997141744306762263070010371980839204048980063758586416583538146736282816803274605028110149960153660248229729640669090534930726631818932417783166586098848841206412626536973865890121937060262089382214649456765454202824649400925646052664705930375300648789736802"); + t("47777777777777077777177777777777737777797777777777777777777777777.77777777", 166, RoundingMode.ROUND_DOWN, "1.570796326794896619231321691639751442098584699687552910487472296132977970584964657777789181190091927207274238540123838239618910512063452910976085265190797031384521003"); + t("44344454162993104966732887230795.74159765", 297, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169163972889136436381186672061574224406031030222930648439904522980845919400837850361631648447254996978611018693481758501321358230821615451370608446510049820543040654089917576365166663434433069055163063343016951070956287877383705033263283340035444562748625951421665015068242"); + t("54821459948", 299, RoundingMode.ROUND_DOWN, "1.5707963267766555873261419744437987187956806966999771878607405209125502961771725600219461487401120981596093700359382752710242827606863005418079399908664710833008850590974863420781588801718641287443608962077544850766277247640171316265523275968722314153381412421312311725667129914836699341317053939856"); + t("720999999999999199999999999939999399999999999999999999999999999999999999899999999999299999999991.9999999999999999999999999909", 104, RoundingMode.ROUND_DOWN, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710571470285"); + t("0.530519957721770525164227509676020102422905339146079098447853617114966826894345141", 265, RoundingMode.ROUND_HALF_EVEN, "0.4877644237175817255686025353527136827879909550510587346782566843081022423777235473110364250482868734899423638048742437047686998611667315056095155303177827718357483057672776317642364127711072474243337904837081382962091643636587202501108520675827279791435283181300129"); + t("209646.12897193", 283, RoundingMode.ROUND_HALF_DOWN, "1.570791556852303849926379586469919300090099803764407762769510464024712639918772298439252586308060281963180472557168460153367929791592019947451630509997532605499932069907809967647793454191463683978554783119328556918845923573849034164333766521027451793563826015305917261912928866051061"); + t("50171384773937327", 100, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896599299641421983872515499911366047934238759881790763266168282276658625728275635326092"); + t("857588463422233285008588200887117058796576663867044508520237282306951566594983497929110854926234443584147979813854890247798056014805940806412425280451611967973348999", 295, RoundingMode.ROUND_FLOOR, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058533991074043256641153323546922304775291115862679704064240558725142050184908798394194952747822059163826733711760225532900923676496920307395670054811535247471536965807898603333185520552527228910801336"); + t("0.000000406861864500640464715422795381084241255744", 182, RoundingMode.ROUND_DOWN, "0.00000040686186450061801454199820657225074005925888393565793817450159983026544751351534204640329989390753248634146008864196593602392941664838697546123028297551828542303898439850313741664736"); + t("874005415712271511928743029984913879951424386220690458199580", 111, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169163975144209858469968755291048747115199623821313613582240951526725435352645318771697"); + t("46799999999990999999999999999099999999999999999999909999999999999999999999999999999.999999999999999999999999997999999997999999999", 212, RoundingMode.ROUND_UP, "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044992926498913035330573309819977585819311517465919202959969492251435738287823652358619401605707975624544142605714336675290011650704038"); + t("76669732848429232662729836781914786385816833", 267, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169163975144209858468664459628538834818660463140957238254014145225730858673296847100851167938658214039946901814215749515544889109000603127517962845488568825877254995184085503523326452594098790253375277856166907105169874457694437508624099834828"); + t("914962891796022151789466.536089078652029300314479", 302, RoundingMode.ROUND_UP, "1.5707963267948966192313205986992519240747965679257254286501759670054823014541442085764597543558629933482241535269095584343461769621582326746195809669577970508803665096899194893730248386485737780961630573579863866641541294983529332609281177275241192547869744136050317105444216953719034638302457699578904"); + t("55389839130911986525876525205219321355133700155998860709188888888", 144, RoundingMode.ROUND_UP, "1.57079632679489661923132169163975144209858469968755291048747229613585435038436053057081252935355722004741937003438194043553313675780613889219258"); + t("0.65258237180296", 78, RoundingMode.ROUND_HALF_EVEN, "0.578188454604529586581130405924863358841165206542066983046520719909626976723209"); + t("4000", 269, RoundingMode.ROUND_FLOOR, "1.5705463268001049523693425336923923872909736856106251355445836161323932533569636702953913123384908239563120028263229740870619164909046909181963242291569506260312934638975129333213136801230515157151931148782948636276495174582043409081121433361614079265266838340487658805"); + t("4721468995198452517890261971133", 85, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321691639539643609382089122378080091304513024439515271228405776"); + t("4111728", 201, RoundingMode.ROUND_DOWN, "1.57079608358814753466632043367718540273685441486021854458412115944662188557746817451825399483438195655347205345940181724484899528581858286078675093329473405323832642996785043791750759499434402471257336"); + t("2985", 130, RoundingMode.ROUND_FLOOR, "1.570461318432219969750920061919098933486209132647813406991904352043692846679468264724961440653980279877599529063263694760740671912"); + t("2868270186975020446188819826414290348235193512352138.9047", 264, RoundingMode.ROUND_UP, "1.57079632679489661923132169163975144209858469968755256184528212137281588399100507254370552466428152528277659322481097596861737921058646640108849857380287312034059168753532589216177645323815377927125695031097505506290419113457908217724329714095589907819226352682013"); + t("97248609405385174499034649118.247229239736", 236, RoundingMode.ROUND_HALF_EVEN, "1.5707963267948966192313216916294685187116655581661191239527782365541818387355504089410211161761617370431150351498668781870754085840658511901033273801954861725992273116773607035435443837531727524090894335819652635305802414023703496137087"); + t("6361721660666705513460344757565449273623032148559300035585067517645892515314178046725482620457720986690693740015919836055742465389585630330104541594782685243302900", 5, RoundingMode.ROUND_HALF_UP, "1.5708"); + t("60333333333333332333.3333333333333333333", 5, RoundingMode.ROUND_HALF_EVEN, "1.5708"); + t("7304422789030487626495306344942897477725486264984640448", 119, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192313216916397514420985846996875529103505689392587182002538801985985286903403888532241333674533743344"); + t("0.89096", 23, RoundingMode.ROUND_UP, "0.7277981170674246265497"); + t("0.753837247386588", 77, RoundingMode.ROUND_HALF_UP, "0.64595242717046830746407275776822944486067293941583036287064802153357767456856"); + t("773999992999999999999999999999999099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9999999999999999999999999999999999999999999999999999999999999999999998999999999999999999", 8, RoundingMode.ROUND_HALF_UP, "1.5707963"); + t("90947968379893913273679256119200652066536747295939", 180, RoundingMode.ROUND_FLOOR, "1.57079632679489661923132169163975144209858469968754191518963537303235894923848003166197423788528969344594191902320970378838787580049232540051401913239053668092887153304820844268544"); + t("53368.61543023485", 23, RoundingMode.ROUND_HALF_DOWN, "1.5707775891905607863265"); + t("0.9777075310073721", 77, RoundingMode.ROUND_HALF_UP, "0.77412676730327862966064324167158333391723833876089087158817207363197087998426"); + t("630174645573903754386673107010282933587298557", 158, RoundingMode.ROUND_CEIL, "1.5707963267948966192313216916397514420985846981006912253600198560244067409422354920336116861398214802976381804103813000274914071779549090342324857035939993832"); + t("794000000000000070900000050000800000000050000030000000.4000000000000000000000004", 313, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321691639751442098584699687552909228026452325192950365661666101437022282627121114862588617668135582669766096885025733266812195200633711370846745363387978651467261508980277749107619465512507458017860106980031962076063295752106466397722548855240555260462608572400718469959403107178139204726217"); + t("0.5719241", 16, RoundingMode.ROUND_HALF_UP, "0.5195195868159672"); + t("0.4368547621882266224146733018612584", 79, RoundingMode.ROUND_HALF_DOWN, "0.4118687366437775572856664885012372220634235784442803625842186908859613825176329"); + t("27478077965882180.7557757691078732858867542890873526582156057390227663657", 313, RoundingMode.ROUND_HALF_UP, "1.570796326794896582838674387791288586308374152469046628842476122538153991211378717252407031795216366567978272304943033796357408845091560968352717031734064955430075873910730307244926167206278207598340930521735016192710189111030931546750974725277474303565070880817121665175604458419370744302362459909831741300795517"); + t("0.7629660155430491838364333", 290, RoundingMode.ROUND_FLOOR, "0.6517478455104472598856104345803177155496954916493224659994718614573126909550176964304540742888902689514039679803054805516075861921357104123356509089727823950966617484525035881313682295381188124545365588332749465419946464991114204972026213542111270260568874444189894509671269718162108165442"); + t("3522222222.22222222222222222222222222222222222222222122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222722222222222222222", 195, RoundingMode.ROUND_UP, "1.57079632651098494730703147082719048034352278839554520259229990724528654219876169024634377492234295780773533748849211155853444018178138598054333649360887749855280212743450113887294753707072838353"); + t("0.14020320249065725093801492795995664436326632670301569225443552655516004", 253, RoundingMode.ROUND_HALF_EVEN, "0.139295232202427506645562011410833740088359538911009906180768977558869986846151051293046755931301798046431437146411837087414247520678848534618451028663110574513829076422524834172330873053488291720290220081541134438275479702460268141230617183854554429365"); + t("572170519.79", 237, RoundingMode.ROUND_HALF_DOWN, "1.57079632504716588964563200564403242751812022936701601545509207857494688820381634856319139326372882243761314922009314497859380199298242500298112286098441667259463705925368149884343240849968073430328444771917148576445036227292971945339903"); + t("0.42909639510025740145705380849", 40, RoundingMode.ROUND_FLOOR, "0.4053352081783934791082728247764780496515"); + t("0.588290609767555277805349755754173305629174604897463311355235782313046540367621361169470599565946909145206347794696886", 19, RoundingMode.ROUND_UP, "0.5317651619538542197"); + t("2216468557812529.836280630931771", 34, RoundingMode.ROUND_HALF_UP, "1.570796326794896168063180156206987"); + t("22222222.222258868770980036199346666666666666", 235, RoundingMode.ROUND_UP, "1.570796281794896619305561327874202217365970140450344886329746779105576958054681414594963008462806045640048516156977172855497121907747929385565299880478381694781805474371418869303001282023245797934373869424352941380540722657021082680977"); + t("0.9418", 230, RoundingMode.ROUND_HALF_EVEN, "0.75543494280705347986476231292088537403968198767377803290963345792538776933831230845680601567520116612356084281386259295296871392268548954588844423369100939047059976109239263252490622117738003426372514034136632686891707530665435403"); + t("0.00008667829279008814217532259005483", 67, RoundingMode.ROUND_HALF_EVEN, "0.00008667829257301315201309672462470092416852302542402092793417828958093"); + t("837", 104, RoundingMode.ROUND_HALF_UP, "1.5696015842331323518973151760061094892988711881851625757772657420778311001181862694563079793672612873745"); + t("0.11554780850089835722803378649655048849232507989737098984573430388078544258719082509841948214319030084006526812908603989287854197171119432835784742546436423611881099227007", 262, RoundingMode.ROUND_HALF_DOWN, "0.1150376513960073540380428609314579328589049708900276108768042414411860609936241944219754929710324203877986341641175856272771685973545620670668143119679697437141119573667522947788183073280658874290798025342653412138641742597534710892567628229193142536491832384522"); + t("0.478182038", 151, RoundingMode.ROUND_HALF_UP, "0.4460413902087123204639114906379008502067227187998817342404110484144925876151648348726491993393222782590424259025202653486258882637049074051239019589209"); + t("73228593337160728978725465230914341649714589329548148069330385787574738721035625909083647710245352891505365114309.444444444444444444436666666666666666666", 182, RoundingMode.ROUND_DOWN, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058533991074043256627497455607526314868506446920173037514314345913751662906006553194716"); + t("4.5927671935973", 154, RoundingMode.ROUND_HALF_UP, "1.35640876228470972393356072952433259078538910523086836629678063334062633074052366454445442466087784866930928486866888341664736458828021181196077218739313"); + t("0.000000009746575", 112, RoundingMode.ROUND_HALF_UP, "0.000000009746574999999999691372349702298731132650961242386128695335399788194542507160764143444274597866239151782859113914"); + t("75642464968237784909357568367072026644655831876761246.620479109287803323852709212382189664860386458473074705975845912871817895590098827553999", 277, RoundingMode.ROUND_DOWN, "1.570796326794896619231321691639751442098584699687552897267384870130717917865568454956734681633787672440452511001679954481752168120753899440726056239722821284902092919705874701189317515634236885558478827075888596148670713296619734356935103123609772222143445244296347540695643737"); + t("128.199199069212552350140703823222054", 237, RoundingMode.ROUND_HALF_UP, "1.56299612424975735534931235434866066461393654955423160457213472425283756138472064607484440535317227822369606837521724250457220304834437220741840596356037633104364012652652534439435596409471117651325667249824381250510943993592586811346504"); + t("0.083244", 163, RoundingMode.ROUND_CEIL, "0.08305251399139408946723993379991247003145247934396655186207430322550031421400600999281497579770627896196044265969545121712503464675974284085130338574497620237100504"); + t("4641708589.430608084679414996777777777777777", 189, RoundingMode.ROUND_HALF_UP, "1.57079632657945870865739042196500340421356707893290656327489994858859451635699318499868424155653048868143332040571166883487999076367910017727017651587499780981352431163037861629683548421637"); + t("0.6", 90, RoundingMode.ROUND_FLOOR, "0.540419500270584155443578364608599910135148251462592388116360233409598981983910153082474548"); + t("633818634996153136214725689014.5555555555555205555", 267, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192313216916381737036971158483579935530129781745738463451809017022997852389085871359571900832053693850727089782278664511549684869687909928578400600560098773597530004503813582996453106178265108849469876537976720929906988762252841587783724101265191918"); + t("4422222222222222299.82222", 204, RoundingMode.ROUND_UP, "1.57079632679489661900519103837341978777520891372255195704440615714589112568761233122427240098795026128438115674224522431400162226699034080219814459503291531738421485934784935803683867122640391460358245884"); + t("755555555555555555558378259761011848383173562050312428748605001781289479172839251153608881915278191574548503836289530824556387224850915240922217473615284253155622249935222222222222", 94, RoundingMode.ROUND_HALF_EVEN, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671"); + t("3838.3878143432654648553", 2, RoundingMode.ROUND_UP, "1.6"); + t("6548046147236.7156010960609272524086858345413", 275, RoundingMode.ROUND_HALF_UP, "1.5707963267947439019203079320065871458001566267014951530469208950057045869714850605135634510719932774807319673459656121441039005204219179725991693773066929546230441991946376777221442727402344599655992903217575914759662742632690644340202873565907931752160387984570825804563406"); + t("1576764563290116390967630881333285254571615096750.46", 257, RoundingMode.ROUND_UP, "1.5707963267948966192313216916397514420985846996869187003946773547338789116083999649536402530046653040651180606814387673156480679779837261122944565325392109795304566601290126885313676748145315114526271761528611671195662485803932586963835523772410557551733783"); + t("241871668726741721232259254386143796061", 166, RoundingMode.ROUND_UP, "1.570796326794896619231321691639751442094450275820284001247563886854527149801593833976332136944663953362331779073858484663992985156734056723305544227968531273861594152"); + t("659999999.6999599899999999999959999990999299999999999199996", 198, RoundingMode.ROUND_DOWN, "1.57079632527974510339100945648972961968566016373117176359238264240796817085523373181539614296409776332291288976852625469854561652073702150608978661599569088447754166818067022388250686716726042919282"); + t("655333333333733330333333333333833333333333132333333333333333.0333333333933", 296, RoundingMode.ROUND_HALF_DOWN, "1.5707963267948966192313216916397514420985846996875529104874707702129112559564897805284891396659322167366037859787101502197626479445009499775235870909053796167517349524107927323465689457849400741635218756069695376058183356434118401858539587755858482146131398389795332831224314716412127379771451071"); + t("60000000000095976214850335436019901451181881047756263613601184724333325428570130043128722639082886183345709368215958366405899268795717084298178511971056722201250320605338641248815940000921842", 267, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404325664115332354692230477529111586267970406424055872514205135096926055277982231147446079852431557439888084690614309839108364130937342770636000046031466960037223"); + t("7111111111311111111111.1111111111111111111111114111111", 199, RoundingMode.ROUND_DOWN, "1.570796326794896619231181066639755397176709588450980647991000891037554365464464290438129642638474164825300911701931522149486612267922188681689938859683976378892210638451355706061248754592412093124677"); + t("3014533465450980869215027738818097422176", 194, RoundingMode.ROUND_DOWN, "1.5707963267948966192313216916397514420982529733984070715343195455582827622683197087294369120802713850002431135170302957202044410695900565201669307703437908812302206052996487930017504163864156694"); + t("0.6216125806898", 139, RoundingMode.ROUND_HALF_EVEN, "0.5561597090004129192361776865560881019726894318680039797355688195841660373590762798035509141421237424378045964220100792972901086523052317922"); + t("4", 86, RoundingMode.ROUND_HALF_UP, "1.3258176636680324650592392104284756311844406013063688433600963814865530835554624027395"); + t("924444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444244444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444.4444444444444444444444444444444444444959", 20, RoundingMode.ROUND_FLOOR, "1.5707963267948966192"); + t("675296977415226059138835248165305489337310619445", 175, RoundingMode.ROUND_HALF_UP, "1.570796326794896619231321691639751442098584699686072080521628807994730330198098104583557014446663528136222514365698049648090721730442639372398271721447431862040465407545399837"); + t("6173.0524336", 287, RoundingMode.ROUND_FLOOR, "1.5706343323841882974587760941800751678563811892942121822967575004022313081305113258831738695217725043158344093761486382052990858543523740744855902926308160205082068964874702290641485260984170008851805637256004128036528838914301230875292426908594848731301400985890117991078693427359180014"); + t("4999995483916940438934953046277874517222839954202818995504429350574498.44444444444446295863052808879876275", 108, RoundingMode.ROUND_DOWN, "1.5707963267948966192313216916397514420985846996875529104874722961539080031429238558284747730933446321551485"); + t("589190650853507788845319157.9732048247661673", 256, RoundingMode.ROUND_DOWN, "1.570796326794896619231321689942507946209114191811573392634039948768734581267616458830680830175747737506381937929306895712562305997451515225466336354194955791478987854256118316891755177879726707469445723676968868707036076381375858379436802413045566169358374"); + t("144444444446992006176760658789744241231089902188560387170409668504988695948973831525252731945797625497617601767548403217389411880844029805165424519070337492003063188888", 40, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619231321691639751442099"); + t("54950615532688338566806702107112429365328006383976321754932475281449", 295, RoundingMode.ROUND_FLOOR, "1.570796326794896619231321691639751442098584699687552910487472296153890004984807161726592494994691239449694895774482655280146870217264982548461282913507296617157187103533275449427807012832753444681167334744531239977653956237613456131010716355279920704353882104429498190564815977589515336154965226"); + t("7.085674363459320859285204262085", 247, RoundingMode.ROUND_UP, "1.430592449162187333879301035165590110706357829097500339812020644267763981921615473632472061982013712199809006856496207560419014924978716739156774269195696923234666377530272780690207034275617269396112024745799236474282786750163455230502917077893102"); + t("249481681396671072996405648977580992891353647713", 285, RoundingMode.ROUND_DOWN, "1.57079632679489661923132169163975144209858469968354460016023019599509813695009116961914335193027533863761680243532489230808109769738324268290290845080201871494123506833844356925100785864364540001247729460890468247349745472523106614261786296542561531353451695480688319930355078632745501"); + t("11111111111111111114854346896280131615015884297249258271742109708437994883969037142697996223159476994996066290461294776962592057325409128060757418610336792400227091589622835937714613232217777777777", 103, RoundingMode.ROUND_DOWN, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058533991"); + t("2024563963315374304203564301789925019031708222673730577441410231029794314124073832469944817459210922790282664187622845506039937833651742444500454716135555582344126128210701263542882674449695544466093728177717774344604036195074324233", 69, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661923132169163975144209858469968755291048747229615391"); + t("3679856179.08662916287541297413173801033214713002374", 130, RoundingMode.ROUND_UP, "1.570796326523146868335293929641811920861139419539201665969203024165142152094772146360301982286052299267276756475549334276145209374"); + t("80.0250142095358", 221, RoundingMode.ROUND_CEIL, "1.5583008844138442881781725146577407713826104881162856318703474418182618329661079775834397619785115252394990423984517415985918851737413998182153366442734605758507469683737240236693856954791287481917248492538258908634260013"); + t("24.413808036639657153599328334153532485433001484094341377894977645818621779962404120724779089594422785408673298998282953036021481950080471156097352", 8, RoundingMode.ROUND_HALF_DOWN, "1.5298588"); + t("0.581201107929842143167318573347940117099118950665664741022201940422304790638419071002", 252, RoundingMode.ROUND_UP, "0.526482088834466798901449204024121406648078765110844592654049460814710355492277431490112238263188902251221770320845595962685396486725990788084352797352113664628963994321049638056244074792639664481063749363148207970557815951592525251446923673272901235462"); + t("0.54827682763791722963766318909051498030099457332763539693955296485068132268127750756236781491505683021886626", 55, RoundingMode.ROUND_HALF_UP, "0.5015192753360305699638372181952804453066461307478209718"); + t("9647606.729619649902932184915", 275, RoundingMode.ROUND_UP, "1.5707962231422470009750939055959663854972925998798683422831475399365201661604977687880147936924813890696979654459497978620431580343117190598336322171255849646754754288105374141601646689190366703986315929093526215872387679237320777121592718153779357271304726270292497799833286"); + t("6.188380250798579365955742484202461783118780886687381678452375395104077243", 4, RoundingMode.ROUND_UP, "1.411"); + t("8.29366727393302864024538307", 238, RoundingMode.ROUND_DOWN, "1.450801663332320899967912910929651957743499589527757069234114664341588802475850959493141263124677483728175720098012610684882170968234982140378385873264807893658879709085831498462094523691666166265779728868372730650345404455146586371590428"); + t("948839007375619132875294308492093254727116900940814159066395492928399492012163768210575743302570159870430401825745941159192368396059", 289, RoundingMode.ROUND_HALF_DOWN, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058533991074043256641153323546922304774237196291259588908221393784462516551101697734477661037024196364024842947732499104847238308575925389467089969090109806236780469297649052550914093119226544141"); + t("944.4444444444444425481556917185833333333333333333", 242, RoundingMode.ROUND_CEIL, "1.5697375036611695059260269314644400560020310503399365095632341836069182646616999118106837325150720565463994251258199691778936179978343261556821422182143219394213356908424609310084568633488094121678497436245285344300411798794253464514508538352"); + t("182009990259.550816397252", 247, RoundingMode.ROUND_FLOOR, "1.570796326789402415322107835356859716595860897019238134167461435909473375486257498504160178462934763644491071760405281016273388868609318947128112593079003519455593786517499896563111740008623502240473616592597703516016573549637390793739987208463529"); + t("9666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666606666666666666666666666666666666666666666666666666666666666666666666666666666666666666666.666666663", 222, RoundingMode.ROUND_DOWN, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404325664115332354692230477529111586267970406424055872514205135096926055277982220802620160312201669716410852262189547"); + t("35.1", 106, RoundingMode.ROUND_HALF_DOWN, "1.54231400283151644855507811600467051318034135967932565699208763149100122888264508436503912423408771258236"); + t("860919999999899999939999999999999999999999999499999999990999999999999999999999999999999999999999999999991999999999999999999.9999999999999999999999999999999999999999999999999999995999999999", 204, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404325664115332354576075666396820995402288905556351552017495033644770993475330985588811712294828566"); + t("9338181296322308689866292372976937474507072897234687854417859675532314188326667300896", 90, RoundingMode.ROUND_CEIL, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931391033"); + t("32373083559159676266892169975770663912897467880752881.99756198321748924955529173517440834678117343761", 46, RoundingMode.ROUND_HALF_UP, "1.5707963267948966192313216916397514420985847"); + t("511832525918802026935780696963875014972266471228524866167469471812843290055253726015", 158, RoundingMode.ROUND_FLOOR, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499312063648599099883824146711443483157503025385500249526553917423075250167377"); + t("15.4715925618177009836899", 147, RoundingMode.ROUND_HALF_UP, "1.50625152102556851724257298893306895766114829956498527303414247237487889656133219214437813886342486277708395463876407590121487737628490692482369543"); + t("233623266560340115451471221641086677905951675243504592220746901225308646295424384446844983663708939383492133713514349108", 136, RoundingMode.ROUND_UP, "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058533991074043256641153319266526714374109"); + t("8527233357028212.89661131048770734032044332799633041608318", 161, RoundingMode.ROUND_UP, "1.5707963267948965019599913397159209985651586658481936781857602434771237829924754625450354465343392980206619454375884034280181486375936137259118895526237486087474"); + t("923600082152568961488838207045633333.9999999999999996", 37, RoundingMode.ROUND_UP, "1.570796326794896619231321691639751442"); + t("5", 282, RoundingMode.ROUND_CEIL, "1.37340076694501586086127192644496114865099959589970080896978335591287423316486071358131958463377048987844592518294979321909044241798105176011511420884793728867293130434940475899677369369292181413945911293374109815234777022365523100446823025290420161486150092967955056588756233227156"); + t("0.6", 252, RoundingMode.ROUND_DOWN, "0.540419500270584155443578364608599910135148251462592388116360233409598981983910153082474548666827275631702217138283458287477975731392585580972352891417916544161293938287902974554803195173098688100543282319895993773067738168636272494748887269726727231451"); + t("5940000000000000000.000000000000000000000000002000000000000000000000000006003000005", 153, RoundingMode.ROUND_HALF_DOWN, "1.57079632679489661906297152328958309193023453133738456032071257562605360355735125199184477314612804104441689307033175962622649574857317484580628252121787"); + t("394182838397114027175066203528437868734916388432404121310586601698612777430659022555186314675417528295006668122372594194237848694661871123910.0804716278794863242087951504796140537757832960614961821308826158941502833104", 12, RoundingMode.ROUND_HALF_DOWN, "1.57079632679"); + t("447175832.321", 148, RoundingMode.ROUND_DOWN, "1.570796324558639809891586259482056582958846261539747244154940480209069444252148149406009505682939085723330412311067471972919188896157347027939967015"); + t("7727.346542156203246027739695562512392753108070606333192746727672341", 272, RoundingMode.ROUND_HALF_UP, "1.5706669162671090815669030018738434419919080478686543838987058429872844203943867203283407857543482674966454676076127882556773925672279465998801832736514820301230613500662556693351440516322112361577861435407506678825875504478295127623520833858662412576768677291989150437176"); + t("132889", 281, RoundingMode.ROUND_CEIL, "1.5707888017175765918069014928394921896298108651138938057634447479379765851191905202082432064304982733352199626844452838102730099775643600874646340971658063100569618312740619495243851904853131247230633998907300982837937510122680547224505438613715308705994252231937560169675088495785"); + t("48680232314207764982138853512629866666", 252, RoundingMode.ROUND_DOWN, "1.57079632679489661923132169163975144207804248054723584634226317987826946403873976513576590746044629887258702127872718446219732303273498304430715587478307374096039275033818455677959308609446006561616022620350744912378161376094129791497920023230195333808"); + t("3777777777777777777777777777777777777777.7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777", 82, RoundingMode.ROUND_CEIL, "1.570796326794896619231321691639751442098319993805199969311001707918614085496045676"); + t("57000000000600000000000008000002000.000060000000001", 254, RoundingMode.ROUND_UP, "1.5707963267948966192313216916397514245547250507494180997745428441774176223819621817783605531910884829019064916866684035098484635510361295005673423683425029980890515256347686143089103917315150744066251618766936422634809586090656262465077858521445593469878"); + t("0.0089", 195, RoundingMode.ROUND_HALF_DOWN, "0.00889976502150082039404650664720575925374895755124911474631926017795603277366518746358936809957677716798575178409903684590167284292603166666132746444015737791368039530197525643333736135757923339929"); + t("0.0000423", 64, RoundingMode.ROUND_DOWN, "0.00004229999997477101102708518660206939033592068792486933108892383452"); + t("7193878466232", 136, RoundingMode.ROUND_HALF_EVEN, "1.570796326794757612156807715501262594081753385270619802651668425018348131922323086807004904560987379464447913043698871687345573166499322"); + t("705060100200", 162, RoundingMode.ROUND_DOWN, "1.57079632679347830042457552030109426228976298621715814029712711284960127190946417933067349355462544049249237402778949271993113253313689704920464584743393720893963"); + t("660895256.34946", 154, RoundingMode.ROUND_UP, "1.570796325281797545826515171066391410786342618363576891655782307947242570496179165423620076823965851201270553943603364181833441472017368751644342563715982"); + t("7007322.285874586977168382270948529170764372385482333718337493", 2, RoundingMode.ROUND_HALF_UP, "1.6"); + t("53042647037618099881086524", 136, RoundingMode.ROUND_DOWN, "1.570796326794896619231321672786996991688234702432231609478230764208397140564125918012195005705512661439671450388154921238036332325231987"); + t("5.679475439631485491363997799830201632187569971451605718778889232248703716105804", 309, RoundingMode.ROUND_CEIL, "1.39651012376009275917387668217886479415029848921319378521756029342117797806049114054655413683601708005653143188156409081504319604402613463268888696359640432543936343396572116440899140915953559095695693532837788545799918719425224032536307092115750290261715439873780057240128195434094760153330824971769155837598"); + t("3354394611.3881376899877988616872259938319601369880849669", 192, RoundingMode.ROUND_HALF_EVEN, "1.57079632649678023286311994686956477646841465294402178072486209203158561050535190334941645352828522534616019819595242460960399719839223416641338127323237484479240504069592160103902872927414134"); + t("787999999999999.59599999999999999999599999", 269, RoundingMode.ROUND_UP, "1.570796326794895350195788696715242951799942632473570555828022068752453304518753743626963506458329696080367499278430250428911442467137500277453786256757478954349115317731282586220585062639343019901985681043325797039758633135701387951803927390125479834754313536831194609"); + */ + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalAtanhTests.cs b/DecimalSharp.Tests/BigDecimalAtanhTests.cs new file mode 100644 index 0000000..a500b34 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalAtanhTests.cs @@ -0,0 +1,1043 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalAtanh")] + public class BigDecimalAtanhTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Atanh() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Atanh().ValueOf()); + }; + + t("-0.63774941", 1, RoundingMode.ROUND_HALF_UP, "-0.8"); + t("0.1221481", 9, RoundingMode.ROUND_UP, "0.122761087"); + t("-0.17990274590466674", 7, RoundingMode.ROUND_DOWN, "-0.1818821"); + t("-0.6", 5, RoundingMode.ROUND_HALF_EVEN, "-0.69315"); + t("-0.6712743", 3, RoundingMode.ROUND_FLOOR, "-0.814"); + t("-0.8", 9, RoundingMode.ROUND_CEIL, "-1.09861228"); + t("0.034059491123193", 10, RoundingMode.ROUND_HALF_DOWN, "0.03407267052"); + t("0.971383207580654133272", 2, RoundingMode.ROUND_HALF_EVEN, "2.1"); + t("-0.4", 5, RoundingMode.ROUND_HALF_DOWN, "-0.42365"); + t("0.7", 8, RoundingMode.ROUND_CEIL, "0.86730053"); + t("0.4206840645836230484032786410995", 2, RoundingMode.ROUND_CEIL, "0.45"); + t("0.11657", 3, RoundingMode.ROUND_UP, "0.118"); + t("-0.06", 1, RoundingMode.ROUND_HALF_UP, "-0.06"); + t("0.8679596950069114083213661", 5, RoundingMode.ROUND_HALF_UP, "1.3247"); + t("-0.895165912892044", 7, RoundingMode.ROUND_UP, "-1.447342"); + t("-0.24549498277000856006664760772730973", 10, RoundingMode.ROUND_UP, "-0.2506131893"); + t("0.003434934411074", 9, RoundingMode.ROUND_CEIL, "0.00343494793"); + t("0.8", 10, RoundingMode.ROUND_CEIL, "1.098612289"); + t("0.9", 6, RoundingMode.ROUND_HALF_DOWN, "1.47222"); + t("-0.35115", 4, RoundingMode.ROUND_HALF_EVEN, "-0.3668"); + t("-0.07006008", 9, RoundingMode.ROUND_DOWN, "-0.0701750467"); + t("-0.805588217169184404803545", 7, RoundingMode.ROUND_FLOOR, "-1.114332"); + t("0.035042192", 55, RoundingMode.ROUND_CEIL, "0.0350565459913177073622482641959208402405964262615529299"); + t("-0.27398", 41, RoundingMode.ROUND_HALF_EVEN, "-0.2811617873835199297281322455211358234326"); + t("-0.4860194", 77, RoundingMode.ROUND_HALF_UP, "-0.53083537941098533673177663090557161489026982518920257398555815069258399000671"); + t("-0.24023148147547753705876525534786727823", 64, RoundingMode.ROUND_HALF_EVEN, "-0.2450197568943221990022234155266189427014650372890460086779371601"); + t("0.6011860402795", 70, RoundingMode.ROUND_DOWN, "0.6950024335022886924643340340622320956358285387350047592361304767363335"); + t("-0.29093", 44, RoundingMode.ROUND_CEIL, "-0.29958195778891861736095524290964866810281107"); + t("0.266818124020332161434635904184413087903", 70, RoundingMode.ROUND_HALF_EVEN, "0.2734349124503902665106317554881156645559479073060421002241446128732386"); + t("-0.432531956714370232077", 6, RoundingMode.ROUND_HALF_UP, "-0.463007"); + t("-0.12287097619204275583897636378879", 2, RoundingMode.ROUND_DOWN, "-0.12"); + t("0.2897036197075545", 60, RoundingMode.ROUND_HALF_EVEN, "0.298242699414791823529878292721126830768439530743706217501737"); + t("-0.2655773613852928593375285", 77, RoundingMode.ROUND_UP, "-0.27209952218398509029158426102152882183064360960300836509805625022650344274319"); + t("0.5735882938793959782751026397687223000311120959777492896023791205", 33, RoundingMode.ROUND_HALF_DOWN, "0.65285425106191064820540169018885"); + t("0.7426414548", 23, RoundingMode.ROUND_HALF_UP, "0.95634354421618813937091"); + t("0.79326", 64, RoundingMode.ROUND_DOWN, "1.080164253158982312196251050504784270125752587840009002471824728"); + t("0.1991301120855576845", 79, RoundingMode.ROUND_HALF_UP, "0.2018265847477406706392428533389908448862292415015902102343859228007472489793578"); + t("0.58575026964988311327717364047728706968432384708442439806628335397331041029", 35, RoundingMode.ROUND_HALF_UP, "0.67117196259416045496400738728525138"); + t("-0.6382435885085400741", 52, RoundingMode.ROUND_HALF_DOWN, "-0.7552044376964453055912660622103201093353424263040963"); + t("-0.1937766857572633836824102902726660707344", 65, RoundingMode.ROUND_UP, "-0.19625823857879391217692284026627503312320392329436359124182475746"); + t("-0.77329685", 58, RoundingMode.ROUND_FLOOR, "-1.028477133857644453547320325736890284496863994792903106468"); + t("-0.38935628384", 30, RoundingMode.ROUND_UP, "-0.411041070277527417008424457354"); + t("-0.514", 10, RoundingMode.ROUND_FLOOR, "-0.5681509051"); + t("0.958729982986459836771826622473322363124574975404328744", 21, RoundingMode.ROUND_DOWN, "1.92995765916231006555"); + t("0.46401438080114898349", 52, RoundingMode.ROUND_DOWN, "0.5024150932833156698557467674808132274481991616651669"); + t("0.5989023538423641713709183", 71, RoundingMode.ROUND_CEIL, "0.69143386983135895477423195223524769608010916945045113248577167194266556"); + t("-0.03651542020603455193763551331484375543974794103475847308026587749101823431", 59, RoundingMode.ROUND_HALF_EVEN, "-0.036531662796419796028369200191680396653704276902211463476447"); + t("-0.33", 51, RoundingMode.ROUND_CEIL, "-0.342828254415393852722154089483655258153765543829547"); + t("-0.127827075266907724285915869037463706439", 80, RoundingMode.ROUND_DOWN, "-0.1285302029045167436793945158211468632668697124786207606960739918130299633916413"); + t("0.7847923398129302653846940761", 14, RoundingMode.ROUND_CEIL, "1.057726963944"); + + /* + t("0.667", 7, RoundingMode.ROUND_DOWN, "0.8053191"); + t("0.936", 7, RoundingMode.ROUND_HALF_EVEN, "1.704748"); + t("0.47149890118443789692532558", 3, RoundingMode.ROUND_FLOOR, "0.511"); + t("-0.1", 6, RoundingMode.ROUND_UP, "-0.100336"); + t("0.6", 7, RoundingMode.ROUND_HALF_EVEN, "0.6931472"); + t("0.605863425", 1, RoundingMode.ROUND_HALF_EVEN, "0.7"); + t("0.81212551757", 8, RoundingMode.ROUND_FLOOR, "1.1332408"); + t("0.779", 5, RoundingMode.ROUND_HALF_DOWN, "1.0428"); + t("-0.7", 10, RoundingMode.ROUND_HALF_EVEN, "-0.8673005277"); + t("-0.67", 4, RoundingMode.ROUND_HALF_DOWN, "-0.8107"); + t("-0.21674103", 5, RoundingMode.ROUND_DOWN, "-0.22023"); + t("-0.6105254316329073", 3, RoundingMode.ROUND_FLOOR, "-0.71"); + t("-0.628", 8, RoundingMode.ROUND_UP, "-0.73810685"); + t("-0.5327294020580735309874106456085667381596973692687789559449624731094173988099912632", 8, RoundingMode.ROUND_HALF_DOWN, "-0.59394841"); + t("0.7655", 2, RoundingMode.ROUND_HALF_EVEN, "1"); + t("-0.4", 5, RoundingMode.ROUND_HALF_EVEN, "-0.42365"); + t("-0.7564", 10, RoundingMode.ROUND_CEIL, "-0.9877470014"); + t("-0.4467", 2, RoundingMode.ROUND_UP, "-0.49"); + t("0.28", 3, RoundingMode.ROUND_DOWN, "0.287"); + t("0.4159514913166", 5, RoundingMode.ROUND_DOWN, "0.44278"); + t("-0.1", 2, RoundingMode.ROUND_HALF_UP, "-0.1"); + t("0.018358359", 5, RoundingMode.ROUND_HALF_DOWN, "0.01836"); + t("0.7915226057", 9, RoundingMode.ROUND_UP, "1.07549528"); + t("0.91", 5, RoundingMode.ROUND_UP, "1.5276"); + t("0.505", 8, RoundingMode.ROUND_DOWN, "0.5559952"); + t("0.45", 9, RoundingMode.ROUND_DOWN, "0.484700278"); + t("0.304547087968440937352667220565", 8, RoundingMode.ROUND_HALF_UP, "0.31452395"); + t("0.5088", 10, RoundingMode.ROUND_HALF_EVEN, "0.5611092675"); + t("-0.736143434975973374166194443911888144456939142878868927883108", 7, RoundingMode.ROUND_CEIL, "-0.9420079"); + t("0.5", 1, RoundingMode.ROUND_HALF_UP, "0.5"); + t("0.6", 8, RoundingMode.ROUND_FLOOR, "0.69314718"); + t("0.17", 7, RoundingMode.ROUND_CEIL, "0.1716667"); + t("-0.2", 9, RoundingMode.ROUND_FLOOR, "-0.202732555"); + t("0.5", 4, RoundingMode.ROUND_HALF_UP, "0.5493"); + t("0.414402", 8, RoundingMode.ROUND_UP, "0.44091428"); + t("-0.37", 8, RoundingMode.ROUND_HALF_EVEN, "-0.3884231"); + t("-0.30952677681", 7, RoundingMode.ROUND_HALF_DOWN, "-0.320022"); + t("-0.1571", 3, RoundingMode.ROUND_UP, "-0.159"); + t("-0.436591486934971", 4, RoundingMode.ROUND_CEIL, "-0.468"); + t("-0.373720581204009934306", 3, RoundingMode.ROUND_HALF_DOWN, "-0.393"); + t("-0.703023452", 1, RoundingMode.ROUND_DOWN, "-0.8"); + t("0.44532482829212059907658933489878962504523600674206009885", 5, RoundingMode.ROUND_DOWN, "0.47885"); + t("-0.3", 8, RoundingMode.ROUND_HALF_UP, "-0.3095196"); + t("-0.8151907", 5, RoundingMode.ROUND_HALF_EVEN, "-1.1423"); + t("-0.0506040574634766254", 10, RoundingMode.ROUND_HALF_UP, "-0.05064731908"); + t("0.3137286514595660519875111623266469334656648619534858", 7, RoundingMode.ROUND_HALF_DOWN, "0.3246758"); + t("0.308", 5, RoundingMode.ROUND_FLOOR, "0.31833"); + t("0.024844", 7, RoundingMode.ROUND_CEIL, "0.02484912"); + t("-0.0051463", 9, RoundingMode.ROUND_HALF_EVEN, "-0.00514634543"); + t("0.62583886385084410003917975362969048346", 3, RoundingMode.ROUND_HALF_EVEN, "0.735"); + t("-0.8922809049490948055445561", 6, RoundingMode.ROUND_CEIL, "-1.433"); + t("0.25", 2, RoundingMode.ROUND_DOWN, "0.25"); + t("0.845881894023075", 9, RoundingMode.ROUND_HALF_EVEN, "1.2414966"); + t("-0.9232", 1, RoundingMode.ROUND_CEIL, "-1"); + t("-0.09770161002117", 8, RoundingMode.ROUND_HALF_UP, "-0.098014276"); + t("-0.94172456900357737051473577", 8, RoundingMode.ROUND_HALF_DOWN, "-1.7530756"); + t("-0.7", 5, RoundingMode.ROUND_CEIL, "-0.8673"); + t("0.83605912042354869", 9, RoundingMode.ROUND_HALF_EVEN, "1.20793545"); + t("0.95691157620292247077475709264238521876744725669972324311545492494141414997549193", 7, RoundingMode.ROUND_UP, "1.907935"); + t("-0.7265136773988200738866714695517", 10, RoundingMode.ROUND_UP, "-0.9213039135"); + t("0.43816942342646717", 5, RoundingMode.ROUND_DOWN, "0.46996"); + t("-0.803163205558127308", 2, RoundingMode.ROUND_DOWN, "-1.1"); + t("0.3", 4, RoundingMode.ROUND_UP, "0.3096"); + t("0.11234734", 10, RoundingMode.ROUND_HALF_EVEN, "0.1128236322"); + t("-0.09988", 2, RoundingMode.ROUND_HALF_DOWN, "-0.1"); + t("-0.4", 3, RoundingMode.ROUND_CEIL, "-0.423"); + t("0.201263", 10, RoundingMode.ROUND_HALF_EVEN, "0.2040485261"); + t("-0.9504081499655063", 1, RoundingMode.ROUND_HALF_DOWN, "-2"); + t("0.7139054895318308785538367773802907182829875297617301915372019598154", 3, RoundingMode.ROUND_HALF_EVEN, "0.895"); + t("-0.031", 1, RoundingMode.ROUND_HALF_EVEN, "-0.03"); + t("0.436949176029593720541", 2, RoundingMode.ROUND_HALF_EVEN, "0.47"); + t("-0.5631230417658644703136", 8, RoundingMode.ROUND_FLOOR, "-0.63739473"); + t("-0.1", 7, RoundingMode.ROUND_FLOOR, "-0.1003354"); + t("0.6", 6, RoundingMode.ROUND_DOWN, "0.693147"); + t("-0.3", 2, RoundingMode.ROUND_HALF_DOWN, "-0.31"); + t("0.99305051707249393045", 1, RoundingMode.ROUND_UP, "3"); + t("0.079", 6, RoundingMode.ROUND_HALF_DOWN, "0.079165"); + t("0.6929", 1, RoundingMode.ROUND_CEIL, "0.9"); + t("-0.9232321878346", 1, RoundingMode.ROUND_HALF_UP, "-2"); + t("0.58", 3, RoundingMode.ROUND_UP, "0.663"); + t("-0.8", 5, RoundingMode.ROUND_DOWN, "-1.0986"); + t("-0.599", 2, RoundingMode.ROUND_HALF_DOWN, "-0.69"); + t("-0.23", 2, RoundingMode.ROUND_CEIL, "-0.23"); + t("0.36857421422028857", 7, RoundingMode.ROUND_HALF_EVEN, "0.3867722"); + t("0.07639585826007171826196896248", 8, RoundingMode.ROUND_FLOOR, "0.076545004"); + t("-0.831", 3, RoundingMode.ROUND_DOWN, "-1.19"); + t("-0.750045295727492670434475657198555003", 7, RoundingMode.ROUND_FLOOR, "-0.9730587"); + t("0.369", 5, RoundingMode.ROUND_HALF_UP, "0.38726"); + t("-0.59", 5, RoundingMode.ROUND_CEIL, "-0.67766"); + t("0.993", 2, RoundingMode.ROUND_HALF_EVEN, "2.8"); + t("-0.708745721974434890368811532680104388679065890768263551206182", 1, RoundingMode.ROUND_HALF_UP, "-0.9"); + t("-0.46", 8, RoundingMode.ROUND_CEIL, "-0.49731128"); + t("0.75296068458138915621616753413298005975601572596449911367217775", 3, RoundingMode.ROUND_DOWN, "0.979"); + t("-0.2265364737240223293099293708", 5, RoundingMode.ROUND_FLOOR, "-0.23054"); + t("-0.5228496", 3, RoundingMode.ROUND_FLOOR, "-0.581"); + t("0.1", 8, RoundingMode.ROUND_HALF_UP, "0.10033535"); + t("-0.1", 4, RoundingMode.ROUND_UP, "-0.1004"); + t("0.5", 10, RoundingMode.ROUND_HALF_DOWN, "0.5493061443"); + t("0.5", 1, RoundingMode.ROUND_FLOOR, "0.5"); + t("-0.5", 9, RoundingMode.ROUND_HALF_EVEN, "-0.549306144"); + t("-0.46911346659016367721970755252573657546657434681524355145751999684421495906529385105443", 6, RoundingMode.ROUND_CEIL, "-0.508933"); + t("-0.7", 8, RoundingMode.ROUND_HALF_UP, "-0.86730053"); + t("0.7", 9, RoundingMode.ROUND_HALF_DOWN, "0.867300528"); + t("0.9752681915112730241556842154616768451", 4, RoundingMode.ROUND_HALF_UP, "2.19"); + t("0.135337996427269791020473973432926", 4, RoundingMode.ROUND_HALF_EVEN, "0.1362"); + t("0.854756", 6, RoundingMode.ROUND_DOWN, "1.27354"); + t("-0.832", 4, RoundingMode.ROUND_CEIL, "-1.194"); + t("0.04827359496118732", 2, RoundingMode.ROUND_DOWN, "0.048"); + t("0.22", 10, RoundingMode.ROUND_HALF_UP, "0.223656109"); + t("-0.5", 6, RoundingMode.ROUND_CEIL, "-0.549306"); + t("0.645786", 6, RoundingMode.ROUND_UP, "0.768037"); + t("0.400656", 9, RoundingMode.ROUND_DOWN, "0.424430126"); + t("0.71", 2, RoundingMode.ROUND_HALF_EVEN, "0.89"); + t("-0.35953433", 2, RoundingMode.ROUND_DOWN, "-0.37"); + t("-0.1", 4, RoundingMode.ROUND_HALF_DOWN, "-0.1003"); + t("-0.8731971500671615312635877", 3, RoundingMode.ROUND_FLOOR, "-1.35"); + t("0.85", 5, RoundingMode.ROUND_HALF_EVEN, "1.2562"); + t("-0.44654482929591318945160611714378603", 8, RoundingMode.ROUND_DOWN, "-0.48037617"); + t("0.353610624279164560558647751280832", 1, RoundingMode.ROUND_UP, "0.4"); + t("-0.6", 9, RoundingMode.ROUND_HALF_UP, "-0.693147181"); + t("0.436295", 3, RoundingMode.ROUND_DOWN, "0.467"); + t("-0.04695807087755", 9, RoundingMode.ROUND_UP, "-0.0469926318"); + t("-0.663842544", 7, RoundingMode.ROUND_HALF_DOWN, "-0.7996527"); + t("0.90957390380043", 3, RoundingMode.ROUND_DOWN, "1.52"); + t("-0.41", 3, RoundingMode.ROUND_HALF_UP, "-0.436"); + t("-0.86742", 10, RoundingMode.ROUND_HALF_UP, "-1.322563421"); + t("0.8", 4, RoundingMode.ROUND_HALF_UP, "1.099"); + t("0.80917318", 1, RoundingMode.ROUND_HALF_UP, "1"); + t("-0.31711", 9, RoundingMode.ROUND_FLOOR, "-0.328430715"); + t("-0.1982", 3, RoundingMode.ROUND_CEIL, "-0.2"); + t("-0.3", 3, RoundingMode.ROUND_HALF_DOWN, "-0.31"); + t("0.4204", 3, RoundingMode.ROUND_CEIL, "0.449"); + t("0.1581494016111596825336742289512865163637738", 5, RoundingMode.ROUND_FLOOR, "0.15948"); + t("0.486", 8, RoundingMode.ROUND_CEIL, "0.53080998"); + t("-0.459584397", 9, RoundingMode.ROUND_CEIL, "-0.496784267"); + t("-0.8", 8, RoundingMode.ROUND_DOWN, "-1.0986122"); + t("0.2", 1, RoundingMode.ROUND_DOWN, "0.2"); + t("0.2", 9, RoundingMode.ROUND_CEIL, "0.202732555"); + t("-0.1402", 10, RoundingMode.ROUND_HALF_DOWN, "-0.1411295803"); + t("-0.16415", 3, RoundingMode.ROUND_HALF_UP, "-0.166"); + t("-0.54693", 1, RoundingMode.ROUND_CEIL, "-0.6"); + t("-0.29", 9, RoundingMode.ROUND_CEIL, "-0.298566263"); + t("0.751", 10, RoundingMode.ROUND_DOWN, "0.9752447179"); + t("0.865", 6, RoundingMode.ROUND_HALF_UP, "1.31287"); + t("0.6", 2, RoundingMode.ROUND_CEIL, "0.7"); + t("-0.9012889382343451910135287373", 5, RoundingMode.ROUND_DOWN, "-1.479"); + t("0.35", 15, RoundingMode.ROUND_FLOOR, "0.365443754271396"); + t("0.9", 18, RoundingMode.ROUND_FLOOR, "1.47221948958322023"); + t("0.3709312935173", 19, RoundingMode.ROUND_HALF_DOWN, "0.3895025410708670336"); + t("0.323352335763573909681", 12, RoundingMode.ROUND_HALF_EVEN, "0.335386371932"); + t("0.8213814663577082342935", 6, RoundingMode.ROUND_CEIL, "1.16105"); + t("-0.26309", 19, RoundingMode.ROUND_HALF_EVEN, "-0.2694253053379267195"); + t("0.70392797594", 3, RoundingMode.ROUND_HALF_EVEN, "0.875"); + t("0.3370672937169725209701115799771286984205746", 18, RoundingMode.ROUND_CEIL, "0.350780210747432033"); + t("0.4644683795284", 3, RoundingMode.ROUND_DOWN, "0.502"); + t("0.95715793548", 20, RoundingMode.ROUND_CEIL, "1.9108641155814013564"); + t("-0.56321", 7, RoundingMode.ROUND_HALF_EVEN, "-0.6375221"); + t("-0.1", 8, RoundingMode.ROUND_HALF_UP, "-0.10033535"); + t("0.2", 17, RoundingMode.ROUND_HALF_DOWN, "0.20273255405408219"); + t("-0.82448", 4, RoundingMode.ROUND_DOWN, "-1.17"); + t("-0.1576", 4, RoundingMode.ROUND_CEIL, "-0.1589"); + t("-0.1899676011183615618911071046014", 17, RoundingMode.ROUND_HALF_EVEN, "-0.19230355714905887"); + t("0.46", 20, RoundingMode.ROUND_CEIL, "0.49731128757203102746"); + t("-0.36053955", 9, RoundingMode.ROUND_FLOOR, "-0.377505928"); + t("0.25661", 8, RoundingMode.ROUND_HALF_DOWN, "0.26247605"); + t("-0.34139939141606082110424188408697764134811452760772519020722928229495515774980436", 19, RoundingMode.ROUND_UP, "-0.3556756879867937273"); + t("0.68416535944447702360552291612016662972641092", 19, RoundingMode.ROUND_HALF_EVEN, "0.8369032985919963384"); + t("0.3903398593217905195858591221958168349906", 13, RoundingMode.ROUND_HALF_EVEN, "0.4122009219367"); + t("0.13577317", 10, RoundingMode.ROUND_DOWN, "0.1366168179"); + t("-0.144503290245", 8, RoundingMode.ROUND_FLOOR, "-0.14552189"); + t("-0.98215576652846243722243987053875917834245973969884678124578602153381206584203635", 4, RoundingMode.ROUND_DOWN, "-2.355"); + t("0.6903118833806525793549757609229588812911567", 1, RoundingMode.ROUND_FLOOR, "0.8"); + t("0.1174793381", 9, RoundingMode.ROUND_HALF_EVEN, "0.118024318"); + t("0.52808492414757708818912819789568220604874708163271562464151", 19, RoundingMode.ROUND_HALF_UP, "0.5874857507284189343"); + t("-0.4369794936905146274261696964", 18, RoundingMode.ROUND_HALF_UP, "-0.46849128249672186"); + t("-0.96", 20, RoundingMode.ROUND_CEIL, "-1.9459101490553133051"); + t("0.3871", 18, RoundingMode.ROUND_HALF_DOWN, "0.408384362638779177"); + t("0.3258616807173211058700480950523877966587308449358641033254296", 9, RoundingMode.ROUND_HALF_UP, "0.33819127"); + t("0.382149884031515755902721101330652988037189102230128822815913005348488", 13, RoundingMode.ROUND_HALF_DOWN, "0.4025747778183"); + t("0.1879", 4, RoundingMode.ROUND_HALF_UP, "0.1902"); + t("0.58058471925", 17, RoundingMode.ROUND_HALF_DOWN, "0.66334429022138832"); + t("0.14797705412012", 7, RoundingMode.ROUND_CEIL, "0.1490716"); + t("0.30774", 10, RoundingMode.ROUND_DOWN, "0.3180470639"); + t("0.4", 11, RoundingMode.ROUND_HALF_DOWN, "0.42364893019"); + t("-0.5628165110202949", 12, RoundingMode.ROUND_HALF_DOWN, "-0.636945968966"); + t("0.9691721316372057923", 15, RoundingMode.ROUND_UP, "2.07847469890328"); + t("0.36", 11, RoundingMode.ROUND_HALF_UP, "0.37688590119"); + t("-0.59105", 14, RoundingMode.ROUND_UP, "-0.67927827771931"); + t("-0.10002810362812096210006358920835159199", 3, RoundingMode.ROUND_DOWN, "-0.1"); + t("-0.02080244808189345512683076874502011876391494773471554202783733", 7, RoundingMode.ROUND_FLOOR, "-0.02080545"); + t("-0.3", 7, RoundingMode.ROUND_HALF_EVEN, "-0.3095196"); + t("-0.66", 12, RoundingMode.ROUND_CEIL, "-0.79281363187"); + t("0.97009782713636", 15, RoundingMode.ROUND_HALF_UP, "2.09395366508148"); + t("0.3817", 1, RoundingMode.ROUND_DOWN, "0.4"); + t("0.508446487234112744149767106975475", 15, RoundingMode.ROUND_UP, "0.560632386860571"); + t("-0.34236", 13, RoundingMode.ROUND_UP, "-0.3567634343743"); + t("0.31095985818359372692943889508208462004335947", 9, RoundingMode.ROUND_HALF_EVEN, "0.321607667"); + t("0.108091", 7, RoundingMode.ROUND_HALF_EVEN, "0.1085149"); + t("0.556", 19, RoundingMode.ROUND_DOWN, "0.6270245711530560785"); + t("0.69", 6, RoundingMode.ROUND_FLOOR, "0.847955"); + t("0.0418", 6, RoundingMode.ROUND_CEIL, "0.0418244"); + t("0.159784038", 10, RoundingMode.ROUND_UP, "0.1611650682"); + t("-0.8", 3, RoundingMode.ROUND_DOWN, "-1.09"); + t("0.59", 12, RoundingMode.ROUND_DOWN, "0.677666067757"); + t("0.6132823015739", 5, RoundingMode.ROUND_CEIL, "0.71417"); + t("0.648157", 4, RoundingMode.ROUND_CEIL, "0.7722"); + t("-0.15", 1, RoundingMode.ROUND_CEIL, "-0.1"); + t("-0.1", 6, RoundingMode.ROUND_UP, "-0.100336"); + t("-0.61830344741", 14, RoundingMode.ROUND_HALF_EVEN, "-0.72225384840149"); + t("-0.2848198840896717787050015815436094798", 17, RoundingMode.ROUND_HALF_DOWN, "-0.29291969907362401"); + t("-0.07674774488645411617585927", 12, RoundingMode.ROUND_DOWN, "-0.076898966625"); + t("0.98246538457995222865352753748529102188647304674565", 2, RoundingMode.ROUND_HALF_UP, "2.4"); + t("0.4", 16, RoundingMode.ROUND_FLOOR, "0.4236489301936018"); + t("-0.68731203904", 16, RoundingMode.ROUND_HALF_DOWN, "-0.8428431344177894"); + t("0.282195338143898", 8, RoundingMode.ROUND_HALF_DOWN, "0.29006576"); + t("0.8295266", 3, RoundingMode.ROUND_CEIL, "1.19"); + t("0.9", 10, RoundingMode.ROUND_UP, "1.47221949"); + t("0.65632588251", 3, RoundingMode.ROUND_UP, "0.787"); + t("0.570051144996153529435095444932197", 20, RoundingMode.ROUND_UP, "0.64759860724023954079"); + t("-0.4749", 17, RoundingMode.ROUND_UP, "-0.51637837461082153"); + t("-0.8007", 16, RoundingMode.ROUND_HALF_DOWN, "-1.100559764978355"); + t("0.307", 7, RoundingMode.ROUND_HALF_UP, "0.3172299"); + t("0.1", 14, RoundingMode.ROUND_UP, "0.10033534773108"); + t("0.394616600575677947", 3, RoundingMode.ROUND_DOWN, "0.417"); + t("0.5", 17, RoundingMode.ROUND_FLOOR, "0.54930614433405484"); + t("-0.764479585", 8, RoundingMode.ROUND_CEIL, "-1.0069067"); + t("0.15542046543760802185", 14, RoundingMode.ROUND_HALF_EVEN, "0.15669034238318"); + t("0.16686878374185695676360218", 18, RoundingMode.ROUND_FLOOR, "0.168444017365788612"); + t("0.68", 17, RoundingMode.ROUND_FLOOR, "0.82911403830176618"); + t("-0.049306", 20, RoundingMode.ROUND_UP, "-0.049346014019693863084"); + t("-0.6", 9, RoundingMode.ROUND_DOWN, "-0.69314718"); + t("-0.4509530906", 12, RoundingMode.ROUND_FLOOR, "-0.485896020158"); + t("0.48260014244039803262613626543658738912960268848", 16, RoundingMode.ROUND_UP, "0.5263683419229002"); + t("0.9326", 3, RoundingMode.ROUND_DOWN, "1.67"); + t("-0.1", 7, RoundingMode.ROUND_HALF_EVEN, "-0.1003353"); + t("0.2", 13, RoundingMode.ROUND_HALF_EVEN, "0.2027325540541"); + t("-0.91223", 11, RoundingMode.ROUND_HALF_EVEN, "-1.5406528113"); + t("-0.802569665", 2, RoundingMode.ROUND_CEIL, "-1.1"); + t("0.5179181557", 5, RoundingMode.ROUND_FLOOR, "0.57349"); + t("0.4805998030174334895585824725797754718", 13, RoundingMode.ROUND_HALF_DOWN, "0.5237639392439"); + t("0.1822", 1, RoundingMode.ROUND_DOWN, "0.1"); + t("0.1", 12, RoundingMode.ROUND_DOWN, "0.100335347731"); + t("-0.221585558758505431", 1, RoundingMode.ROUND_UP, "-0.3"); + t("0.81421", 11, RoundingMode.ROUND_FLOOR, "1.1393941933"); + t("0.4815576", 14, RoundingMode.ROUND_CEIL, "0.52501015697748"); + t("-0.76148", 12, RoundingMode.ROUND_HALF_UP, "-0.999728239751"); + t("-0.416412959413657213608235423245624397280326712", 17, RoundingMode.ROUND_HALF_EVEN, "-0.44334462966193999"); + t("-0.1", 5, RoundingMode.ROUND_DOWN, "-0.10033"); + t("0.33923597", 19, RoundingMode.ROUND_FLOOR, "0.3532288859938446944"); + t("-0.3205071317017", 18, RoundingMode.ROUND_FLOOR, "-0.332212197229483168"); + t("0.426802034336309", 20, RoundingMode.ROUND_HALF_DOWN, "0.45597986621289338143"); + t("0.94921", 8, RoundingMode.ROUND_UP, "1.82374"); + t("0.6957781", 2, RoundingMode.ROUND_DOWN, "0.85"); + t("-0.87202148", 1, RoundingMode.ROUND_DOWN, "-1"); + t("-0.24571964346302431", 20, RoundingMode.ROUND_DOWN, "-0.25085227211988180122"); + t("-0.8901558", 5, RoundingMode.ROUND_FLOOR, "-1.4227"); + t("0.82676337629", 6, RoundingMode.ROUND_FLOOR, "1.17782"); + t("0.82972207465698", 12, RoundingMode.ROUND_CEIL, "1.18724370273"); + t("-0.795288185", 6, RoundingMode.ROUND_DOWN, "-1.08565"); + t("0.8466435", 20, RoundingMode.ROUND_CEIL, "1.2441798347545536176"); + t("-0.1", 5, RoundingMode.ROUND_DOWN, "-0.10033"); + t("-0.5130303501386533255381", 13, RoundingMode.ROUND_FLOOR, "-0.566833986318"); + t("0.1375834781051153", 2, RoundingMode.ROUND_HALF_UP, "0.14"); + t("-0.8", 5, RoundingMode.ROUND_UP, "-1.0987"); + t("0.506790564042833407", 3, RoundingMode.ROUND_HALF_UP, "0.558"); + t("-0.1", 12, RoundingMode.ROUND_HALF_EVEN, "-0.100335347731"); + t("0.2", 1, RoundingMode.ROUND_FLOOR, "0.2"); + t("0.02738", 1, RoundingMode.ROUND_CEIL, "0.03"); + t("-0.6", 8, RoundingMode.ROUND_DOWN, "-0.69314718"); + t("0.6", 8, RoundingMode.ROUND_HALF_EVEN, "0.69314718"); + t("0.4341406242778552858948800705", 12, RoundingMode.ROUND_FLOOR, "0.464987743077"); + t("0.9190774278", 10, RoundingMode.ROUND_DOWN, "1.583053522"); + t("-0.69579027265066475950258567", 13, RoundingMode.ROUND_HALF_UP, "-0.8590933962877"); + t("0.3", 13, RoundingMode.ROUND_FLOOR, "0.3095196042031"); + t("-0.08384", 8, RoundingMode.ROUND_DOWN, "-0.084037273"); + t("-0.2", 18, RoundingMode.ROUND_HALF_EVEN, "-0.202732554054082191"); + t("0.6105735081549", 15, RoundingMode.ROUND_FLOOR, "0.709835243848278"); + t("0.21487639", 6, RoundingMode.ROUND_CEIL, "0.218279"); + t("-0.831", 14, RoundingMode.ROUND_HALF_DOWN, "-1.1913594148757"); + t("-0.2", 19, RoundingMode.ROUND_HALF_DOWN, "-0.202732554054082191"); + t("0.0064", 7, RoundingMode.ROUND_UP, "0.006400088"); + t("-0.549210641039", 3, RoundingMode.ROUND_HALF_UP, "-0.617"); + t("0.0203", 17, RoundingMode.ROUND_FLOOR, "0.020302789165331437"); + t("0.9190129880066", 2, RoundingMode.ROUND_HALF_UP, "1.6"); + t("0.62", 2, RoundingMode.ROUND_FLOOR, "0.72"); + t("-0.98135646112", 4, RoundingMode.ROUND_HALF_EVEN, "-2.333"); + t("-0.5", 14, RoundingMode.ROUND_CEIL, "-0.54930614433405"); + t("0.3", 6, RoundingMode.ROUND_CEIL, "0.30952"); + t("-0.75", 28, RoundingMode.ROUND_FLOOR, "-0.9729550745276566525526763718"); + t("-0.3968426472831228980559555", 26, RoundingMode.ROUND_FLOOR, "-0.41989580214355776593053461"); + t("0.1", 21, RoundingMode.ROUND_FLOOR, "0.100335347731075580635"); + t("-0.0469983", 12, RoundingMode.ROUND_HALF_EVEN, "-0.0470329498447"); + t("0.6852915", 14, RoundingMode.ROUND_CEIL, "0.8390235056503"); + t("0.190804046642149655666564553", 12, RoundingMode.ROUND_CEIL, "0.193171461452"); + t("0.2", 6, RoundingMode.ROUND_HALF_DOWN, "0.202733"); + t("-0.47423033394424730657451261098429358961200474530211466376390441779048", 16, RoundingMode.ROUND_HALF_UP, "-0.5155140527446382"); + t("-0.46976622895905", 16, RoundingMode.ROUND_CEIL, "-0.5097703262358118"); + t("0.341669217752552509292393977233149371267141602468638349497956307319567394234929", 10, RoundingMode.ROUND_FLOOR, "0.3559811445"); + t("0.62745", 2, RoundingMode.ROUND_HALF_DOWN, "0.74"); + t("-0.493897236", 20, RoundingMode.ROUND_HALF_EVEN, "-0.5412019196396973047"); + t("0.972", 9, RoundingMode.ROUND_FLOOR, "2.12729951"); + t("0.08103018242202616394963017852844", 1, RoundingMode.ROUND_HALF_EVEN, "0.08"); + t("0.01731", 16, RoundingMode.ROUND_CEIL, "0.01731172921118811"); + t("0.00262", 7, RoundingMode.ROUND_CEIL, "0.002620006"); + t("0.14648368", 7, RoundingMode.ROUND_CEIL, "0.1475452"); + t("0.0631119097", 11, RoundingMode.ROUND_HALF_DOWN, "0.063195904487"); + t("0.1825269779317847405796286804567", 19, RoundingMode.ROUND_HALF_EVEN, "0.1845955163628887296"); + t("0.166235840408855445351380955327660173854155421986576993307110624858", 20, RoundingMode.ROUND_CEIL, "0.1677930154279171713"); + t("-0.383", 4, RoundingMode.ROUND_HALF_EVEN, "-0.4036"); + t("0.137013324436065", 13, RoundingMode.ROUND_FLOOR, "0.1378804806648"); + t("-0.432110416042", 4, RoundingMode.ROUND_FLOOR, "-0.4625"); + t("0.647864", 10, RoundingMode.ROUND_DOWN, "0.771608859"); + t("-0.806052551448533774855043360933280621009619192", 18, RoundingMode.ROUND_DOWN, "-1.11565579659810942"); + t("0.21354828777393381652553065675849", 5, RoundingMode.ROUND_DOWN, "0.21688"); + t("-0.25851", 17, RoundingMode.ROUND_HALF_UP, "-0.26451104260042224"); + t("0.1683", 25, RoundingMode.ROUND_FLOOR, "0.1699165904242304360485806"); + t("0.640026082791126", 3, RoundingMode.ROUND_HALF_DOWN, "0.758"); + t("-0.31953496955", 9, RoundingMode.ROUND_CEIL, "-0.331129112"); + t("0.201754317173258", 35, RoundingMode.ROUND_HALF_UP, "0.20456063794501530685972192543509934"); + t("0.149172991137121494", 28, RoundingMode.ROUND_CEIL, "0.1502944982173343946586599872"); + t("-0.79", 17, RoundingMode.ROUND_FLOOR, "-1.071431684058666"); + t("-0.75075523036110649727630034668534380142427543087095587221957457446", 3, RoundingMode.ROUND_DOWN, "-0.974"); + t("0.24062", 23, RoundingMode.ROUND_HALF_UP, "0.2454321113856786091585"); + t("-0.5717441242302809488173064648784193875271220085628963684", 23, RoundingMode.ROUND_FLOOR, "-0.65011016568244919698574"); + t("-0.381355144654453442040951044", 19, RoundingMode.ROUND_FLOOR, "-0.4016444582536299799"); + t("0.0241540312569542384620600907767741411059761623417869761", 10, RoundingMode.ROUND_FLOOR, "0.02415873019"); + t("0.20639672409678", 27, RoundingMode.ROUND_HALF_UP, "0.209404798974299686989600772"); + t("-0.0516820139109131361232344", 12, RoundingMode.ROUND_UP, "-0.0517281025422"); + t("0.11507176235", 26, RoundingMode.ROUND_HALF_DOWN, "0.11558374417806388371196225"); + t("-0.47275668385523894683048", 30, RoundingMode.ROUND_HALF_UP, "-0.513614538143372950548395400547"); + t("0.572", 34, RoundingMode.ROUND_HALF_DOWN, "0.6504903887036775311201352155343873"); + t("-0.8188542652959306678785104010503", 25, RoundingMode.ROUND_DOWN, "-1.153330092934203480470023"); + t("-0.16", 21, RoundingMode.ROUND_HALF_EVEN, "-0.161386696131525515341"); + t("-0.4", 32, RoundingMode.ROUND_CEIL, "-0.42364893019360180685505375326032"); + t("0.5737085", 10, RoundingMode.ROUND_HALF_UP, "0.6530334152"); + t("0.120913507855458", 38, RoundingMode.ROUND_DOWN, "0.12150798633367103181981306472517092467"); + t("-0.85157119922", 15, RoundingMode.ROUND_DOWN, "-1.26184223362975"); + t("0.05", 25, RoundingMode.ROUND_UP, "0.05004172927849126824578528"); + t("0.645505208", 35, RoundingMode.ROUND_DOWN, "0.76755453931190342869525015772976497"); + t("-0.017823893919571732023302796261437231274147413436", 33, RoundingMode.ROUND_HALF_DOWN, "-0.0178257817774880241786419657334225"); + t("-0.332657863", 11, RoundingMode.ROUND_HALF_EVEN, "-0.34581387844"); + t("-0.92929109814346037539", 28, RoundingMode.ROUND_HALF_UP, "-1.653168216255514924403370288"); + t("-0.81211383503658953", 16, RoundingMode.ROUND_DOWN, "-1.133206516786924"); + t("-0.212476314", 16, RoundingMode.ROUND_UP, "-0.2157633200338411"); + t("-0.272039660499444", 12, RoundingMode.ROUND_HALF_UP, "-0.279065177524"); + t("0.8", 27, RoundingMode.ROUND_UP, "1.09861228866810969139524524"); + t("-0.8909828785572726123289", 10, RoundingMode.ROUND_DOWN, "-1.426673533"); + t("-0.2116355", 18, RoundingMode.ROUND_UP, "-0.214882916231361823"); + t("-0.0087", 40, RoundingMode.ROUND_HALF_DOWN, "-0.008700219510968957381150347221294275165923"); + t("0.3", 27, RoundingMode.ROUND_DOWN, "0.309519604203111715474067349"); + t("-0.3400138048787396583751040159613", 22, RoundingMode.ROUND_HALF_UP, "-0.354108138360711896297"); + t("0.2716641399984203690121228216", 2, RoundingMode.ROUND_HALF_DOWN, "0.28"); + t("-0.1", 12, RoundingMode.ROUND_FLOOR, "-0.100335347732"); + t("-0.7", 28, RoundingMode.ROUND_DOWN, "-0.8673005276940531944271446904"); + t("0.654631440405223436124240107500655652973959034830983144720348487139732570255263413033847985856187", 27, RoundingMode.ROUND_DOWN, "0.783360716447124495872847091"); + t("-0.588562777446791429515140112535588473583512505078062203713967910807502475229813017217486930006", 24, RoundingMode.ROUND_HALF_EVEN, "-0.675464260994964800500128"); + t("0.76703", 9, RoundingMode.ROUND_HALF_EVEN, "1.01307288"); + t("-0.6699771", 25, RoundingMode.ROUND_HALF_DOWN, "-0.8107015733748302239170375"); + t("-0.508129193467253533", 14, RoundingMode.ROUND_CEIL, "-0.56020456164844"); + t("0.811849", 37, RoundingMode.ROUND_HALF_UP, "1.132429158931768075895320679943279269"); + t("0.72344923640411593", 4, RoundingMode.ROUND_FLOOR, "0.9148"); + t("-0.179", 31, RoundingMode.ROUND_HALF_UP, "-0.1809493955424713526624831275864"); + t("0.4145571", 10, RoundingMode.ROUND_DOWN, "0.4411015513"); + t("0.6", 35, RoundingMode.ROUND_CEIL, "0.69314718055994530941723212145817657"); + t("0.487111876", 28, RoundingMode.ROUND_DOWN, "0.5322667200798400295256342267"); + t("-0.49695467410051030887", 22, RoundingMode.ROUND_HALF_DOWN, "-0.545253914483557083485"); + t("-0.0326459279935876596020907", 23, RoundingMode.ROUND_HALF_UP, "-0.032657532953228747929299"); + t("0.9768658036685", 7, RoundingMode.ROUND_HALF_UP, "2.223978"); + t("-0.6090589814071871334650302917630049852521783", 13, RoundingMode.ROUND_FLOOR, "-0.7074240512427"); + t("-0.61373740477789", 1, RoundingMode.ROUND_HALF_UP, "-0.7"); + t("0.0568886077852", 28, RoundingMode.ROUND_CEIL, "0.05695009702201245387712513666"); + t("-0.68", 12, RoundingMode.ROUND_HALF_DOWN, "-0.829114038302"); + t("0.041312", 10, RoundingMode.ROUND_FLOOR, "0.04133552623"); + t("-0.5843", 35, RoundingMode.ROUND_DOWN, "-0.66896705106120270477801844819763149"); + t("0.1042807782331370739549370078", 16, RoundingMode.ROUND_DOWN, "0.1046612636549409"); + t("-0.6786572", 21, RoundingMode.ROUND_HALF_UP, "-0.826620500497242968416"); + t("0.29475656962076949", 32, RoundingMode.ROUND_CEIL, "0.3037674724029533613943052155369"); + t("0.3055577305016131", 9, RoundingMode.ROUND_HALF_UP, "0.315638287"); + t("-0.48", 34, RoundingMode.ROUND_CEIL, "-0.5229842775913438541573041147330642"); + t("-0.097424", 22, RoundingMode.ROUND_UP, "-0.09773399853606828757511"); + t("-0.7472717812009679157448664446374405341541125", 6, RoundingMode.ROUND_HALF_EVEN, "-0.966748"); + t("-0.1287996341370033850801137867123941981965380852", 21, RoundingMode.ROUND_FLOOR, "-0.129519042425098216789"); + t("-0.712", 9, RoundingMode.ROUND_UP, "-0.891228539"); + t("0.35761", 15, RoundingMode.ROUND_HALF_UP, "0.374142741973274"); + t("-0.927562", 25, RoundingMode.ROUND_FLOOR, "-1.640640123680011088785777"); + t("0.093132371333", 22, RoundingMode.ROUND_DOWN, "0.09340304689074850004908"); + t("-0.27791762", 31, RoundingMode.ROUND_CEIL, "-0.2854239703295013174995258610778"); + t("0.98606810537895", 38, RoundingMode.ROUND_HALF_DOWN, "2.4798656740434884885285792288811863661"); + t("0.2362", 29, RoundingMode.ROUND_HALF_EVEN, "0.24074573121687855377780247961"); + t("0.42409974591741554712975771644423487518332488700970526788", 9, RoundingMode.ROUND_HALF_DOWN, "0.45268033"); + t("0.53162210331089956091891930409", 23, RoundingMode.ROUND_UP, "0.59240360468493639210199"); + t("-0.405960557423525717", 23, RoundingMode.ROUND_HALF_DOWN, "-0.43076515006673885957978"); + t("0.316602214328814593609327319581736724058660202997105908280604035151", 6, RoundingMode.ROUND_UP, "0.327867"); + t("0.76068294197747717473613710853", 27, RoundingMode.ROUND_HALF_UP, "0.99783388630203072724667097"); + t("-0.9604958586196465087544198", 6, RoundingMode.ROUND_CEIL, "-1.95227"); + t("-0.05440974992375574851", 18, RoundingMode.ROUND_DOWN, "-0.0544635374163384417"); + t("0.7132", 37, RoundingMode.ROUND_HALF_UP, "0.8936665685078753099239200498036229368"); + t("0.93314", 30, RoundingMode.ROUND_DOWN, "1.68215001093705755188734446412"); + t("-0.81269649355332973627105038849092724856314225461", 22, RoundingMode.ROUND_UP, "-1.134920230398192003393"); + t("-0.27", 34, RoundingMode.ROUND_HALF_DOWN, "-0.2768638226551000719776659751388749"); + t("-0.4923", 15, RoundingMode.ROUND_HALF_DOWN, "-0.539091555492037"); + t("-0.262830069094343198056964314304414133770394971", 37, RoundingMode.ROUND_HALF_UP, "-0.2691460655639917694267564167076133549"); + t("-0.268737833501109", 23, RoundingMode.ROUND_HALF_DOWN, "-0.2755029085152644685979"); + t("0.517639577731234121977108954323451281244646884826031010174872474233", 21, RoundingMode.ROUND_HALF_UP, "0.573109949390999646707"); + t("-0.7741", 24, RoundingMode.ROUND_DOWN, "-1.03047805379632267849875"); + t("0.99825996253769051848739203817525984582118913873855764", 30, RoundingMode.ROUND_DOWN, "3.52306270953369161738063775667"); + t("0.95953685627426883", 7, RoundingMode.ROUND_DOWN, "1.940035"); + t("0.6394823578225027", 29, RoundingMode.ROUND_HALF_DOWN, "0.75729747095708771490311436794"); + t("0.022036394451503888685666666326920144075699300836645779534687703675499950458", 30, RoundingMode.ROUND_CEIL, "0.0220399624685489460001866502107"); + t("0.97818530161165941114388673479549389744794", 11, RoundingMode.ROUND_DOWN, "2.2536756042"); + t("0.965389909019", 9, RoundingMode.ROUND_HALF_DOWN, "2.01965032"); + t("0.994065811", 9, RoundingMode.ROUND_DOWN, "2.90860029"); + t("0.9091674751439544852047229467029851965506474087218109368797416434633", 32, RoundingMode.ROUND_DOWN, "1.5227025622012804432153439162835"); + t("0.459169897", 28, RoundingMode.ROUND_HALF_UP, "0.4962589011495894593373824864"); + t("0.79285897769260652319216746", 2, RoundingMode.ROUND_HALF_UP, "1.1"); + t("-0.90661", 16, RoundingMode.ROUND_HALF_EVEN, "-1.508148900931365"); + t("0.09976950134201922", 13, RoundingMode.ROUND_UP, "0.1001025262204"); + t("-0.85266942538263308565679829", 12, RoundingMode.ROUND_UP, "-1.26585197089"); + t("-0.16", 22, RoundingMode.ROUND_UP, "-0.1613866961315255153414"); + t("-0.3658426012779168747682177052740206", 3, RoundingMode.ROUND_HALF_UP, "-0.384"); + t("-0.34573255766", 26, RoundingMode.ROUND_CEIL, "-0.36058879759675953303629898"); + t("-0.84", 15, RoundingMode.ROUND_UP, "-1.22117351768461"); + t("-0.9", 2, RoundingMode.ROUND_DOWN, "-1.4"); + t("0.116", 6, RoundingMode.ROUND_UP, "0.116525"); + t("-0.351324449018", 36, RoundingMode.ROUND_HALF_DOWN, "-0.366953896792408050643036730971048633"); + t("-0.9", 20, RoundingMode.ROUND_HALF_EVEN, "-1.47221948958322023"); + t("0.93", 27, RoundingMode.ROUND_HALF_UP, "1.65839001992478612337478915"); + t("-0.309038476873729157071472800229", 3, RoundingMode.ROUND_HALF_UP, "-0.319"); + t("0.5885412744825", 29, RoundingMode.ROUND_UP, "0.67543136205060533483482345372"); + t("-0.190839168489175612883648265869", 20, RoundingMode.ROUND_DOWN, "-0.1932079105142891151"); + t("0.242578", 29, RoundingMode.ROUND_DOWN, "0.24751148543784099012532935793"); + t("0.37771", 10, RoundingMode.ROUND_FLOOR, "0.3973858787"); + t("0.63979240146239138410142518455321094", 26, RoundingMode.ROUND_HALF_UP, "0.75782220024148198489505494"); + t("-0.332755922286693", 23, RoundingMode.ROUND_HALF_DOWN, "-0.34592414338535353055027"); + t("-0.4988135557197770528968951466459996926771499206772837397515703204217780205833415742", 31, RoundingMode.ROUND_HALF_UP, "-0.547725467566196825223536774371"); + t("0.86198274837785511444511860430615195051862556263417776178094724584923146327703166305448938", 21, RoundingMode.ROUND_UP, "1.30100925179616938377"); + t("0.739936", 28, RoundingMode.ROUND_FLOOR, "0.9503379276760625184209922661"); + t("0.61786190918859", 4, RoundingMode.ROUND_DOWN, "0.7215"); + t("0.5", 36, RoundingMode.ROUND_CEIL, "0.549306144334054845697622618461262853"); + t("0.800084798042", 34, RoundingMode.ROUND_CEIL, "1.098847883184587084036561243688504"); + t("0.6358461608985036855519880766", 35, RoundingMode.ROUND_HALF_EVEN, "0.75116953290731863994069317329089958"); + t("0.72448568242179900272", 4, RoundingMode.ROUND_HALF_EVEN, "0.917"); + t("-0.18906615542348603175441781672", 30, RoundingMode.ROUND_CEIL, "-0.19136852827944594316270151291"); + t("-0.1", 30, RoundingMode.ROUND_UP, "-0.100335347731075580635726552061"); + t("-0.8", 5, RoundingMode.ROUND_HALF_UP, "-1.0986"); + t("0.8905", 26, RoundingMode.ROUND_FLOOR, "1.4243360370372160174658973"); + t("0.795", 1, RoundingMode.ROUND_HALF_DOWN, "1"); + t("-0.8616682790519", 33, RoundingMode.ROUND_FLOOR, "-1.29978685661736633377792184597721"); + t("-0.0484892938782", 27, RoundingMode.ROUND_DOWN, "-0.048527350443817675925222877"); + t("-0.5470151", 25, RoundingMode.ROUND_FLOOR, "-0.6141119098793523282314343"); + t("0.967", 7, RoundingMode.ROUND_HALF_EVEN, "2.043879"); + t("-0.459", 2, RoundingMode.ROUND_DOWN, "-0.49"); + t("0.0160226586292307408469573135", 28, RoundingMode.ROUND_UP, "0.0160240299826347558501533087"); + t("0.9015444580633576267194867324836921114338", 12, RoundingMode.ROUND_DOWN, "1.48040830611"); + t("0.46485215", 5, RoundingMode.ROUND_CEIL, "0.50349"); + t("-0.3030059669923088635716549001", 33, RoundingMode.ROUND_HALF_EVEN, "-0.312826153390616632790233904399065"); + t("0.579", 12, RoundingMode.ROUND_UP, "0.660957090287"); + t("0.56886", 33, RoundingMode.ROUND_UP, "0.645835828299229995520343287983202"); + t("-0.8355601550336755868291330961679279009466385325", 3, RoundingMode.ROUND_CEIL, "-1.2"); + t("-0.8103085954", 9, RoundingMode.ROUND_HALF_EVEN, "-1.12792702"); + t("-0.39590161605225650716815532746705811731801330848761914386844205497", 36, RoundingMode.ROUND_HALF_UP, "-0.418779366615357057962612441303371959"); + t("0.7378466438945828556378", 2, RoundingMode.ROUND_UP, "0.95"); + t("-0.5418482333955516471226087", 18, RoundingMode.ROUND_FLOOR, "-0.606768315000587704"); + t("0.048574876275503848", 13, RoundingMode.ROUND_FLOOR, "0.04861313489472"); + t("0.80956", 3, RoundingMode.ROUND_FLOOR, "1.12"); + t("-0.8", 10, RoundingMode.ROUND_HALF_UP, "-1.098612289"); + t("-0.488227", 39, RoundingMode.ROUND_HALF_UP, "-0.533729795084827785883939914367960244948"); + t("-0.83874480359994742", 30, RoundingMode.ROUND_CEIL, "-1.21692513248395765959197177282"); + t("-0.75", 27, RoundingMode.ROUND_HALF_UP, "-0.972955074527656652552676372"); + t("0.011778358612390812697", 33, RoundingMode.ROUND_CEIL, "0.0117789033272420887017361264552219"); + t("0.343852134669", 21, RoundingMode.ROUND_UP, "0.358454664085400394701"); + t("0.8641604912652852615072747344685089", 37, RoundingMode.ROUND_CEIL, "1.309545992973132637187779053862754192"); + t("0.6083915579", 23, RoundingMode.ROUND_DOWN, "0.70636372893075834680862"); + t("-0.646049130861", 4, RoundingMode.ROUND_HALF_UP, "-0.7685"); + t("0.004559351994", 24, RoundingMode.ROUND_HALF_UP, "0.00455938358719358780168491"); + t("-0.43", 27, RoundingMode.ROUND_HALF_UP, "-0.459896681212678564355579175"); + t("-0.8897", 17, RoundingMode.ROUND_HALF_EVEN, "-1.4204847195182681"); + t("0.3900488580203762877211637385928592469", 27, RoundingMode.ROUND_FLOOR, "0.411857658158874417506323616"); + t("-0.02295251778", 19, RoundingMode.ROUND_UP, "-0.02295654965490700268"); + t("-0.149894892", 35, RoundingMode.ROUND_HALF_UP, "-0.15103291030461569429672643485009616"); + t("0.1815837847026522211", 24, RoundingMode.ROUND_CEIL, "0.183619990049482843075196"); + t("-0.4", 23, RoundingMode.ROUND_CEIL, "-0.42364893019360180685505"); + t("0.7197901772341689607476326378065764979609006265015937180851441342", 44, RoundingMode.ROUND_HALF_DOWN, "0.90720944141559116285532299558754460380229588"); + t("0.2741514445353", 56, RoundingMode.ROUND_FLOOR, "0.28134715527631509208814276832585425214177761177039335415"); + t("-0.2753452709", 15, RoundingMode.ROUND_HALF_EVEN, "-0.282638457972114"); + t("-0.2918323408049206721947024426796014020084362192851652323", 23, RoundingMode.ROUND_DOWN, "-0.30056801815553588217953"); + t("-0.948529", 15, RoundingMode.ROUND_UP, "-1.81690573282107"); + t("-0.054671922829", 16, RoundingMode.ROUND_FLOOR, "-0.05472649253644749"); + t("0.8969", 49, RoundingMode.ROUND_HALF_UP, "1.456138431354881485604133384350433358311068929162"); + t("-0.543586958", 16, RoundingMode.ROUND_CEIL, "-0.6092329935786826"); + t("0.08199312659900772895148", 22, RoundingMode.ROUND_CEIL, "0.08217761446628901340098"); + t("-0.920337719262853686226129295704250994", 77, RoundingMode.ROUND_FLOOR, "-1.5912300683820810726820365467067432130981845455428679799201287511509075996743"); + t("-0.1945391077686819854", 57, RoundingMode.ROUND_UP, "-0.197050527789868069781358191028628153656520352984141261363"); + t("0.43425757857339", 78, RoundingMode.ROUND_FLOOR, "0.465131869332004489755825258149112086672711048774154797079298901464123730511972"); + t("0.431715393158328576", 56, RoundingMode.ROUND_HALF_UP, "0.46200310918081776047447274691583115719970196753005802882"); + t("-0.8941619930116226", 51, RoundingMode.ROUND_HALF_EVEN, "-1.44231105522603877103783361278690140581976735982435"); + t("0.2448117587173111022319293", 56, RoundingMode.ROUND_UP, "0.24988627763759771633717356883047592243520724267853276227"); + t("0.3186551939438137599", 19, RoundingMode.ROUND_CEIL, "0.3301496013218857368"); + t("-0.213", 48, RoundingMode.ROUND_HALF_EVEN, "-0.216311830263323451802911856922183324256890176042"); + t("-0.3423462373034762556", 34, RoundingMode.ROUND_DOWN, "-0.3567478444504432290340850257336341"); + t("0.84000595014296", 30, RoundingMode.ROUND_HALF_DOWN, "1.2211937291111645116545632742"); + t("0.919075", 19, RoundingMode.ROUND_HALF_DOWN, "1.583037889143665472"); + t("0.020129308603", 77, RoundingMode.ROUND_HALF_EVEN, "0.020132027989392872301630357374674932313109648560863442437913769621597618767936"); + t("-0.90834719105872687667346218614548148522313706110064254", 2, RoundingMode.ROUND_DOWN, "-1.5"); + t("0.3307005037478610098154218501821", 26, RoundingMode.ROUND_HALF_UP, "0.34361456982534469112050639"); + t("0.548770441940787481375082761810827562213504583811631372863", 26, RoundingMode.ROUND_CEIL, "0.61662021196415693284251178"); + t("0.25211", 8, RoundingMode.ROUND_HALF_DOWN, "0.25766475"); + t("-0.6147049657696169", 54, RoundingMode.ROUND_HALF_UP, "-0.716449085872632124144907572779103727073873858466971361"); + t("0.2972489601948171977456153701008999608063134829588855", 61, RoundingMode.ROUND_HALF_EVEN, "0.3064992136465464696646798527886311748433986248045227433808202"); + t("0.12967649960049735653877698333469371289525811234194225072228083434455118", 42, RoundingMode.ROUND_HALF_EVEN, "0.130410802553474755830537138459419813825387"); + t("0.678688", 47, RoundingMode.ROUND_HALF_EVEN, "0.8266776006085792945303524660160725888912498748"); + t("0.32052805947186339399236075598", 8, RoundingMode.ROUND_CEIL, "0.33223553"); + t("-0.117931934831477384322073601979", 36, RoundingMode.ROUND_HALF_UP, "-0.118483273125645745699622273354699058"); + t("-0.8208703487388", 71, RoundingMode.ROUND_HALF_EVEN, "-1.1594800134891671355617177848411014467592843795018867248065808845236506"); + t("0.571602569395690063898767283789931230562853332587838541742716328161741", 35, RoundingMode.ROUND_HALF_UP, "0.6498998908373328802236278909968925"); + t("0.968647713850056374347293867918057", 59, RoundingMode.ROUND_FLOOR, "2.0699074792455535153515699358079722827363137602565948814978"); + t("0.76093685", 66, RoundingMode.ROUND_UP, "0.998436752287579513920326215307712788642370918010094530805293492271"); + t("-0.55856635096", 49, RoundingMode.ROUND_UP, "-0.6307469742270253573510082137728807639239618839538"); + t("0.17707455195823654", 50, RoundingMode.ROUND_HALF_EVEN, "0.17896091747653288334836620672019579070513094916957"); + t("0.052057574755388223199913264606065233250924055482527081763546482435193721191095922", 32, RoundingMode.ROUND_HALF_UP, "0.052104676554322321694133459337671"); + t("0.6003", 55, RoundingMode.ROUND_HALF_EVEN, "0.6936160624673333622842233629273448745112696439184684995"); + t("-0.182291797", 32, RoundingMode.ROUND_UP, "-0.18435224087976086907489332008672"); + t("-0.8", 10, RoundingMode.ROUND_HALF_EVEN, "-1.098612289"); + t("-0.17", 57, RoundingMode.ROUND_CEIL, "-0.17166666350057909768425284605949978053546800187123482485"); + t("-0.72", 45, RoundingMode.ROUND_CEIL, "-0.907644983319124559183744884951333652961025727"); + t("-0.130715856", 53, RoundingMode.ROUND_HALF_UP, "-0.13146808102944132603064801061827433785517657283812598"); + t("0.65", 66, RoundingMode.ROUND_HALF_EVEN, "0.775298706205583465175918035722237637416056341089152719246935946415"); + t("0.3912133291605785836883498", 10, RoundingMode.ROUND_HALF_DOWN, "0.4132318159"); + t("-0.665256571407679909236545527163664848476463996274", 73, RoundingMode.ROUND_UP, "-0.8021850669489786035716302869804643854826801376686604332417231992803520543"); + t("-0.650422351716134494334622454067581452875029", 13, RoundingMode.ROUND_HALF_UP, "-0.7760303991271"); + t("0.55518641513008609338623712", 51, RoundingMode.ROUND_HALF_UP, "0.625847707273343468504892704670932127148247542646974"); + t("0.522568017218432466811359013", 54, RoundingMode.ROUND_HALF_EVEN, "0.579865983969986270158174364310387257380525513283215139"); + t("0.7975768", 19, RoundingMode.ROUND_FLOOR, "1.091917129670232081"); + t("0.324540551414937299819043741535", 36, RoundingMode.ROUND_HALF_UP, "0.336713900371170911082027605650900429"); + t("0.5551127870036", 2, RoundingMode.ROUND_FLOOR, "0.62"); + t("0.95051904160344769608027614894858804721335", 22, RoundingMode.ROUND_HALF_EVEN, "1.837131437305747719024"); + t("-0.1914611902100640354285718424484912145834087940126", 80, RoundingMode.ROUND_FLOOR, "-0.19385352185893850762864798816625055357121533873479399460895388073494493031841274"); + t("-0.96207066423882680911406003972726387679124460358412544382395810084", 22, RoundingMode.ROUND_HALF_UP, "-1.973015406294687247157"); + t("-0.4209583505", 9, RoundingMode.ROUND_CEIL, "-0.448856204"); + t("0.36390226146773645", 7, RoundingMode.ROUND_CEIL, "0.3813765"); + t("-0.301597966349571585687206898470228292516761583605187101071136359003", 58, RoundingMode.ROUND_DOWN, "-0.3112765385441759511541496742670042066629083881432174077416"); + t("0.9218006569515402843870102365749", 50, RoundingMode.ROUND_HALF_UP, "1.6008783105418764038497359003536959254879231645803"); + t("-0.177025738509", 36, RoundingMode.ROUND_DOWN, "-0.178910524366877031219152802759378783"); + t("-0.2502895446670710799587140630594110315817875494091717511144", 62, RoundingMode.ROUND_HALF_EVEN, "-0.25572168338625176805765726833904255153041459314367765054029177"); + t("-0.193699045485673225", 80, RoundingMode.ROUND_UP, "-0.19617757048171417463955025238765325211590608681358214573536478005535353244218695"); + t("-0.013124752509302399", 13, RoundingMode.ROUND_DOWN, "-0.01312550620667"); + t("0.21511899555", 71, RoundingMode.ROUND_HALF_DOWN, "0.21853258504957888614907963455100590026328436539559346706346225504685116"); + t("0.11", 11, RoundingMode.ROUND_DOWN, "0.11044691579"); + t("0.9", 41, RoundingMode.ROUND_FLOOR, "1.4722194895832202300045137159439267686186"); + t("0.55679", 48, RoundingMode.ROUND_UP, "0.628168794811501572470251904856918970810172065088"); + t("-0.5370311049459665817293609879476412716646717829823779001636", 13, RoundingMode.ROUND_CEIL, "-0.5999740551267"); + t("-0.383674251872", 55, RoundingMode.ROUND_UP, "-0.4043610528360133686936330472263387178218149473293465771"); + t("0.84370592146605444204782333", 51, RoundingMode.ROUND_FLOOR, "1.23389678067529504348252548500303020833199834090334"); + t("0.2", 15, RoundingMode.ROUND_HALF_EVEN, "0.202732554054082"); + t("-0.8", 13, RoundingMode.ROUND_UP, "-1.098612288669"); + t("-0.3426301", 43, RoundingMode.ROUND_UP, "-0.357069428344752864782447031814403013577457"); + t("-0.338167", 25, RoundingMode.ROUND_UP, "-0.3520213939010124051203979"); + t("0.3980372705066", 39, RoundingMode.ROUND_CEIL, "0.421314525031318671905571964713375433693"); + t("-0.246154", 21, RoundingMode.ROUND_DOWN, "-0.251314592050124067879"); + t("0.9444309274001159735593", 78, RoundingMode.ROUND_CEIL, "1.77754891631941989293872858213421555404010099148500874050510921678504366277195"); + t("0.693528235563", 1, RoundingMode.ROUND_FLOOR, "0.8"); + t("0.122998511231", 18, RoundingMode.ROUND_HALF_UP, "0.123624469544831052"); + t("0.4875149964340677993926707078337583808038495495156289724708348817896", 9, RoundingMode.ROUND_CEIL, "0.532795385"); + t("-0.45038178", 74, RoundingMode.ROUND_HALF_DOWN, "-0.48517910278421089492670635850227459828276412269178349578435790848484632154"); + t("0.58032224923050049617149988542642889265100127976322848847", 67, RoundingMode.ROUND_DOWN, "0.6629484518620076600215762891479484392521312042895728966646007569472"); + t("0.3749781069213923132259090144703578506732198360929288201243", 74, RoundingMode.ROUND_HALF_EVEN, "0.39420320484312438148069050110637948869916517473335481119629227698761448925"); + t("0.7738769574624547057567588386187671291", 54, RoundingMode.ROUND_CEIL, "1.02992175726081462848086512239374280901465389035427481"); + t("-0.76792751", 12, RoundingMode.ROUND_UP, "-1.01525673074"); + t("-0.137429641", 54, RoundingMode.ROUND_CEIL, "-0.13830478680777681556359803982822962172281948256208964"); + t("-0.5569622", 23, RoundingMode.ROUND_FLOOR, "-0.62841840018195574462508"); + t("-0.00493", 64, RoundingMode.ROUND_UP, "-0.004930039941634801415083141037412788277090071445810271836969548875"); + t("0.639", 54, RoundingMode.ROUND_FLOOR, "0.756481810205474382518158494646771356601516551266063342"); + t("-0.2416444186248957633154", 70, RoundingMode.ROUND_HALF_DOWN, "-0.2465197718676921538107989299249810596289301631498315448291286600478893"); + t("0.2", 71, RoundingMode.ROUND_HALF_EVEN, "0.20273255405408219098900655773217456828599521173124709880700716207205034"); + t("-0.4297853277536090460118309372", 42, RoundingMode.ROUND_CEIL, "-0.459633341815378233611634743721651957123138"); + t("-0.22", 34, RoundingMode.ROUND_DOWN, "-0.2236561090218324106513282124688852"); + t("0.9615", 80, RoundingMode.ROUND_DOWN, "1.9654032621779343572159497023387843542666037154708032943398401637425074528299407"); + t("0.348203797844", 25, RoundingMode.ROUND_HALF_DOWN, "0.3633982628520349375406029"); + t("0.7465922136978894216408590244594149522623", 4, RoundingMode.ROUND_HALF_DOWN, "0.9652"); + t("0.2614717445", 20, RoundingMode.ROUND_UP, "0.26768750379596489679"); + t("-0.23890618910608507582909640794951520521296658700484172661371366839496", 79, RoundingMode.ROUND_HALF_EVEN, "-0.243613770153039745823803587812360516432744547932303719547457284422365193393564"); + t("-0.221941081033856642141651838832045", 37, RoundingMode.ROUND_CEIL, "-0.2256968353730185663565233076754887392"); + t("0.882", 79, RoundingMode.ROUND_HALF_UP, "1.38470284783983009209774176388110633366280439138642942311121331191042257048983"); + t("-0.994620262101818525949980995557", 44, RoundingMode.ROUND_UP, "-2.9577846556090827748220408578591918634483117"); + t("0.73", 64, RoundingMode.ROUND_UP, "0.9287273642467249363738823388367071776216906171229129656064258727"); + t("0.8388456542598863731060075182834", 28, RoundingMode.ROUND_HALF_EVEN, "1.217265358483051486990048874"); + t("0.74204293754005", 44, RoundingMode.ROUND_DOWN, "0.95501032951332484956361048326532782997239849"); + t("-0.8612238249", 55, RoundingMode.ROUND_HALF_UP, "-1.298063568256064070117386337419184694142840582416563162"); + t("-0.47319", 80, RoundingMode.ROUND_DOWN, "-0.51417272218911746291314975096892983649962515390981381320391843062430308396169479"); + t("-0.79256", 55, RoundingMode.ROUND_UP, "-1.078278951743255988829330540573037031198969956799252633"); + t("-0.43", 68, RoundingMode.ROUND_CEIL, "-0.45989668121267856435557917536003433137105248978787301068247932487362"); + t("-0.63958055806232871387921896881369677974461110689603", 1, RoundingMode.ROUND_HALF_EVEN, "-0.8"); + t("0.479395180346760745233366329530134418528530679753", 6, RoundingMode.ROUND_HALF_DOWN, "0.522199"); + t("0.81333641680093679191329748", 30, RoundingMode.ROUND_HALF_DOWN, "1.13680788763696050716455990273"); + t("-0.14676658", 17, RoundingMode.ROUND_HALF_EVEN, "-0.14783421780571871"); + t("-0.21555219265847582256536152575668593472155952334132936431449", 73, RoundingMode.ROUND_FLOOR, "-0.2189868459816191836575982301489970487110863001510022993544068870416496338"); + t("-0.2946934400419229", 43, RoundingMode.ROUND_HALF_EVEN, "-0.3036983375775988016884892033940753672557247"); + t("0.58620107443214853573724", 24, RoundingMode.ROUND_UP, "0.671858503102172540579287"); + t("0.7499691091470265956705929788", 11, RoundingMode.ROUND_FLOOR, "0.9728844706"); + t("0.211479756136934449", 69, RoundingMode.ROUND_CEIL, "0.214719875200827485478060869200603161553502150529542260113365792442542"); + t("0.6795", 50, RoundingMode.ROUND_FLOOR, "0.8281845663458113527455399651207728527394833991457"); + t("0.6757941568881181178239110344963025892748101987390789", 43, RoundingMode.ROUND_CEIL, "0.821331911551871545528658592631596672306017"); + t("-0.6502962282776676988147652", 13, RoundingMode.ROUND_UP, "-0.7758118267324"); + t("0.2286019666824280007828395", 11, RoundingMode.ROUND_HALF_UP, "0.2327138466"); + t("0.80407844", 6, RoundingMode.ROUND_HALF_DOWN, "1.11005"); + t("0.68512893716491096", 19, RoundingMode.ROUND_HALF_UP, "0.8387170648675247952"); + t("-0.75012305050337283379848", 66, RoundingMode.ROUND_CEIL, "-0.973236392170689972560271508970710984420281269609939249434184801898"); + t("0.39125038429139549665764472739109401181884", 116, RoundingMode.ROUND_HALF_DOWN, "0.41327556784642315162182817585479922007578242200138495394267683798589781360048916087742940292045090932877569695879843"); + t("0.2958838141985455387213", 136, RoundingMode.ROUND_FLOOR, "0.305002422082257346332355349332166366500154890418651783492187641506728693616325116618545309289230668209233622875702918404046284849467118"); + t("0.7399196582848513289159827669122627067", 153, RoundingMode.ROUND_FLOOR, "0.950301813931745941971403512893809057792284307260154372377897185252334891424529252514422403276236220970313040491163278212048907513761182831534101257142808"); + t("0.807060015435768931264223941276564021488226260187857589831288598729115365", 67, RoundingMode.ROUND_DOWN, "1.118538661524657687065321132001166967330173059542214868261856077357"); + t("-0.31362", 11, RoundingMode.ROUND_DOWN, "-0.32455527684"); + t("0.9515534296940309602854361127551968117513464835072593187489", 101, RoundingMode.ROUND_DOWN, "1.8479597087578485070011856698814170628424378819582285859170800341672353604866671053382171900488848622"); + t("0.286293220300030949675", 23, RoundingMode.ROUND_HALF_UP, "0.29452384153527862251135"); + t("-0.5426753404338609080987177942014648", 81, RoundingMode.ROUND_UP, "-0.607939934367664506986364547058800433478760399447072816017208184609332874876454209"); + t("-0.2524096531495388095671733176709514204133", 117, RoundingMode.ROUND_HALF_UP, "-0.25798476691517624903260692521498470120791373816493854788197765771607801444540162959230663415005077463570920535218459"); + t("0.4952221", 15, RoundingMode.ROUND_UP, "0.542955753054785"); + t("0.42757447083879866342673015994263412742951408385736191005", 59, RoundingMode.ROUND_CEIL, "0.45692473099182062499036743105289586886289419348064929319462"); + t("-0.74043549562335429189662833655701723216221679789124958809", 85, RoundingMode.ROUND_DOWN, "-0.9514427011187392237979871762821952201181151347307888432640525883449518629061979725052"); + t("0.2", 75, RoundingMode.ROUND_HALF_DOWN, "0.202732554054082190989006557732174568285995211731247098807007162072050335624"); + t("0.940688979304841152229327613430468122401487417869375893319124818", 68, RoundingMode.ROUND_HALF_DOWN, "1.7440015988912597000681590314427841899939054144914901377014297594251"); + t("0.5190564050807940755985076048251883408", 114, RoundingMode.ROUND_FLOOR, "0.57504731899623834811849795647108941469523562043556300203148476477027570995252772025530564440047391595128602051872"); + t("-0.364495145850152317259226766042058028594", 106, RoundingMode.ROUND_UP, "-0.3820600268844247149471564190466727415474503101216146678071239651526324230180932611930178233427411063020786"); + t("-0.05457399294985785499337692721410593382678242934538701211086793", 72, RoundingMode.ROUND_HALF_UP, "-0.0546282695926178392057141416992513758939890000868269464135978074900081077"); + t("0.854187417", 41, RoundingMode.ROUND_DOWN, "1.2714398549645573405403445275480405243622"); + t("-0.4561499287736218691040566654555615627638983668494782397817", 80, RoundingMode.ROUND_HALF_EVEN, "-0.49243879600363547579673820603279030995068600671436370837960847474534572300116633"); + t("0.0427", 88, RoundingMode.ROUND_CEIL, "0.04272597992161996212074274125165291814044559795295859368761634834034871120127134045246329"); + t("-0.6", 29, RoundingMode.ROUND_UP, "-0.69314718055994530941723212146"); + t("0.22551895820419661080449", 97, RoundingMode.ROUND_HALF_EVEN, "0.2294632455266306109609123126497848550397953103506112244774132205238076638959445515206237991492022"); + t("-0.244080001663658263893880892099027354462851734372992972536562326477971217891240923857673360300013825075839475356767170778960505156203", 157, RoundingMode.ROUND_UP, "-0.2491080164884053095439824475976327610323980059664157321613917512425426315770767912235782940622406544481294580581224545934257573439668021302261352840455110407"); + t("-0.69762991540873108955590103870884431815014952492939954767370113829162770308629446775925167976574", 58, RoundingMode.ROUND_UP, "-0.8626683385432143337277064292141481696568140657609192027267"); + t("0.47879765388412435796321999061742212933", 81, RoundingMode.ROUND_UP, "0.521423146973682257514319018361494204685287085402747904771623284911798639569049219"); + t("-0.722093507408833275643332058924207541", 31, RoundingMode.ROUND_CEIL, "-0.9120056428102683371797568106052"); + t("-0.72414497743634813087853288922896810314616813419888229028672722988117130614222", 154, RoundingMode.ROUND_CEIL, "-0.9163055470930179377063838065273295445919490699403868751761803809687924646245587405078455122834526369825737299197284287782912176578497551380430646783666133"); + t("-0.632979200139652571276531874855873953159790485462425880922269045706731928690798652487095", 157, RoundingMode.ROUND_HALF_UP, "-0.746371416932081864814263604886008436229237006230579993379068271563519424295633178681038106582219962915356625878399104043545760013961686364453291432652854139"); + t("-0.147315037099725", 149, RoundingMode.ROUND_DOWN, "-0.14839479516344108909495591536452082997493850122288929061116869668431481481827795845492587294951317626605190771774432059966487104560947626956051508328"); + t("0.402269977278975335891032468101486804", 54, RoundingMode.ROUND_FLOOR, "0.426354214944314592862163427968258881552088273542028245"); + t("-0.2499436387690053", 81, RoundingMode.ROUND_UP, "-0.255352694140077901260784349883234099514346127981106582249126094784280706946975659"); + t("-0.1648538", 101, RoundingMode.ROUND_HALF_DOWN, "-0.1663720326089060556062791601958630438311072852067580092906366487571372117866617198008036831928770998"); + t("0.547048072695351", 68, RoundingMode.ROUND_FLOOR, "0.61415896288281252294166436485824851502415240133507941280351931494042"); + t("-0.57037", 74, RoundingMode.ROUND_HALF_UP, "-0.64807108310395738210372155641397774189005393174518415595025700775165645848"); + t("0.74", 59, RoundingMode.ROUND_HALF_UP, "0.95047938059652349126251491385955935266836776349264320711866"); + t("0.9516473734090723850353833784867454654193496000226668431155187149751310104399645652960261874904490371659373263501961919311656188", 78, RoundingMode.ROUND_HALF_EVEN, "1.84895427841700372427787865047051231607613708574177092154099424382039440362964"); + t("-0.32679587852384", 88, RoundingMode.ROUND_HALF_DOWN, "-0.3392368081127582536147819703850675518069069621162155273759326666565214644685571062272762"); + t("-0.1994505817", 132, RoundingMode.ROUND_DOWN, "-0.202160308762868985649802218893118888521724325952005160624710451673981618838517449098764581698509444814654015989065113832635001723841"); + t("0.88916731", 108, RoundingMode.ROUND_CEIL, "1.41793483367599891791666388168749427657657173341568826619540353511919340519236247377564928622222680959417566"); + t("0.81406669120607545668926468104557", 75, RoundingMode.ROUND_HALF_DOWN, "1.13896917008790915421202376801849585893977122400957505275769835120618778908"); + t("-0.320193531940545191988095900071864723790268178503415", 136, RoundingMode.ROUND_UP, "-0.3318627340363140919446454451520846342133100159627350060257677365654868477484669111074293165423183764443770908443299414780742328924776376"); + t("-0.16116959193", 7, RoundingMode.ROUND_DOWN, "-0.1625872"); + t("-0.7300130209691189551239199340812344232244035067366551499342", 90, RoundingMode.ROUND_FLOOR, "-0.928755241005661979073719620159916835984022766211907447041293653978708625308966937935384361"); + t("0.28450889857199543200963724003286", 78, RoundingMode.ROUND_HALF_EVEN, "0.292581291059623186465924960915926865015032236929281195048506406323046235950551"); + t("0.85371418020000764312033858070705228187731", 158, RoundingMode.ROUND_UP, "1.2696920962732624436074812353114110993319678229945721278093420162962902303053077661439615080712755409831426460836245761430338220030879029233464743773600534424"); + t("-0.5478816261817394", 25, RoundingMode.ROUND_DOWN, "-0.6153492739135910833602791"); + t("-0.757499221", 75, RoundingMode.ROUND_HALF_EVEN, "-0.990321128848983119592383780102047435479509882169545278474990602867515318815"); + t("0.79430374300276395713964825603889647602526644914891434559626460116069586601365708", 101, RoundingMode.ROUND_DOWN, "1.0829858693454330113721306118642952667797838382181165628938800274231475125932398972818593758600916686"); + t("0.5204676088608927675", 54, RoundingMode.ROUND_HALF_UP, "0.576980879994888938230268872276621626741326385824445954"); + t("-0.0085412146710071783082", 160, RoundingMode.ROUND_UP, "-0.008541422380654165415894945355419951431205178120554238818554997933542082593221635553779786883170947140616318305915010537791048201466869457267905972381719077024763"); + t("-0.950093", 61, RoundingMode.ROUND_HALF_DOWN, "-1.832735534624022727154108330037661471401627668539540760772539"); + t("-0.95864251407857868882663236", 124, RoundingMode.ROUND_FLOOR, "-1.928876737162421657088385961763387886652833942385611641745554630540483124184881840841504093108707838585562389117461663186278"); + t("0.029825662573610400136146613837", 18, RoundingMode.ROUND_FLOOR, "0.0298345113033864434"); + t("0.6024512182189007", 139, RoundingMode.ROUND_UP, "0.6969860496279149984523130150744047919226237986980218264442532876822746059100247855099607758243304141291668786528036706029655996456490945027"); + t("-0.947287513449866849203732725157597465173081996624020487592338530917757838228365802695196969800947982057910059874187485968", 15, RoundingMode.ROUND_HALF_DOWN, "-1.80467015026599"); + t("0.3455313054", 101, RoundingMode.ROUND_FLOOR, "0.36036024172365512325605507182532164699596510050417594733813150237472660970446862207531607181104019393"); + t("-0.2212787", 88, RoundingMode.ROUND_DOWN, "-0.225000244051337375904210593759543877803788281644664731954417381153705994778829207746911"); + t("-0.94797835", 9, RoundingMode.ROUND_DOWN, "-1.81144369"); + t("0.633541444765728133830115249644430985407", 24, RoundingMode.ROUND_HALF_UP, "0.747310085062359466735922"); + t("0.625", 31, RoundingMode.ROUND_FLOOR, "0.7331685343967135223291211023213"); + t("-0.791", 45, RoundingMode.ROUND_UP, "-1.07409757504795038706482037793030288706350015"); + t("-0.834618346673131532650038914155472412", 42, RoundingMode.ROUND_UP, "-1.20316795000464329054917788438260537316613"); + t("0.749", 23, RoundingMode.ROUND_HALF_EVEN, "0.97067326794340909169154"); + t("-0.9234", 37, RoundingMode.ROUND_UP, "-1.611626327765917897343964101343988625"); + t("0.585468", 28, RoundingMode.ROUND_DOWN, "0.6707423689120629235684280344"); + t("0.65541785461436053", 19, RoundingMode.ROUND_DOWN, "0.7847381129496889693"); + t("-0.40275936067624", 7, RoundingMode.ROUND_DOWN, "-0.4269382"); + t("-0.91846993702465894974778880254415624051483", 14, RoundingMode.ROUND_UP, "-1.5791557082143"); + t("-0.5059", 61, RoundingMode.ROUND_DOWN, "-0.557204039620534709232882434456153031358109026950215316316116"); + t("0.69002042619448558875912594822221113317417606985851071", 19, RoundingMode.ROUND_HALF_EVEN, "0.8479947449956781488"); + t("-0.85056938872094968221358965058585745686095452043166132519306", 45, RoundingMode.ROUND_FLOOR, "-1.25820825096106221271112206181097536721509939"); + t("-0.6348891553735284536106319843014192169313090875456514250909154158503845811523", 80, RoundingMode.ROUND_DOWN, "-0.74956464738329651873472953922062500041878782674085685254764644633541565534753258"); + t("-0.1742682765666482715341178385837163071129629529041902197635313950080096442963405962593077610402512699932424892071739649165668839147580797347007846581495231466", 142, RoundingMode.ROUND_CEIL, "-0.176065279256268810995741771650686353041104149374919231945935321565481194046797204285710764059150636914059352902905119408378800416257954716825"); + t("-0.55020764026044382276487897073788416904851055178454996607184229382249460409753141578476426637569260836", 58, RoundingMode.ROUND_UP, "-0.6186790544622441960337323845468096334372139844947006857539"); + t("0.493485", 154, RoundingMode.ROUND_FLOOR, "0.5406568279143206619790522620147733209850470594550103272204883199102119229397850888815312414785306113070092062826813734093156346122267414612715878415533854"); + t("0.6527629", 120, RoundingMode.ROUND_HALF_UP, "0.780097909720045163605134998960081871078556799479053901290221964897783995987994987644307634995529705048233039765396466194"); + t("-0.3264258092561025", 109, RoundingMode.ROUND_UP, "-0.338822547762968275523587621126133988545398433810541734630973734316726220005389336853610103565055436963306495"); + t("0.55073299176871902350654785069556265049487733771573059180335296885059690243799707459562960668100405", 32, RoundingMode.ROUND_HALF_EVEN, "0.61943280596622999782175513301939"); + t("-0.39023271273768759529492591119381982082805086569388236404642996360545", 87, RoundingMode.ROUND_HALF_DOWN, "-0.412074521629802448988773874665306392819558760512206621651701450307120030376660364181211"); + t("0.8245822", 61, RoundingMode.ROUND_HALF_DOWN, "1.170967875592856776077036349851497971482397486461956466555394"); + t("0.217380758245280054293741081670836992572981129268845218957", 1, RoundingMode.ROUND_HALF_UP, "0.2"); + t("-0.97170614811235482292585272284", 50, RoundingMode.ROUND_CEIL, "-2.1220049893423393149688085234493035544015713306564"); + t("0.19239", 81, RoundingMode.ROUND_HALF_DOWN, "0.194817853295859437078845852399122119471169613797887223868068500828680695599571201"); + t("0.7548177156505612754034276253872915600288126908836069698683", 39, RoundingMode.ROUND_FLOOR, "0.984059156562916076842483801426367249329"); + t("-0.18940636651385855135048832511940505395086441324102320924", 65, RoundingMode.ROUND_UP, "-0.19172137494055644994216164394005854676090986475001082351007195972"); + t("-0.468629871219868899668395889016438916", 76, RoundingMode.ROUND_UP, "-0.5083131826504379600515907185115796556710453035352688331762565177572777037235"); + t("-0.6", 135, RoundingMode.ROUND_DOWN, "-0.69314718055994530941723212145817656807550013436025525412068000949339362196969471560586332699641868754200148102057068573368552023575813"); + t("-0.09850847613463773702480631284100545049676995", 45, RoundingMode.ROUND_CEIL, "-0.0988289837757844753349992374325237215286432084"); + t("-0.4329752160273902372646236861138140289176507011273159692291075", 10, RoundingMode.ROUND_DOWN, "-0.4635525595"); + t("-0.5698795", 102, RoundingMode.ROUND_UP, "-0.647344370908252254663533778532080596389216285252384103762424239586833779942157569699740337354118051713"); + t("-0.207459182479", 89, RoundingMode.ROUND_UP, "-0.21051478622094541877204801764595110283557854549618141000951734254601317584409078485858873"); + t("0.607342308752083529125259133571445530315051", 17, RoundingMode.ROUND_HALF_UP, "0.7046995682106747"); + t("0.078356680179547227667637371921298615707735484915165873948452502", 151, RoundingMode.ROUND_UP, "0.07851763752204949533263281528862978043940518827193734153145767703552154246051344856881956810794867141380762778324498151132241601484707345369003243332662"); + t("0.83942548", 63, RoundingMode.ROUND_CEIL, "1.21922521441688890681865978029208003994120127236317575531604525"); + t("-0.2425143310334952060702443", 77, RoundingMode.ROUND_DOWN, "-0.24744383679339415733299397360696321912306342331749316520611694613381259562562"); + t("-0.7331812826695", 135, RoundingMode.ROUND_HALF_DOWN, "-0.935572212012088063074082411816284612047942391907272726883736515324723312448587056940491720434452561547354663343704603263256107166223298"); + t("-0.1030890768130047105229", 60, RoundingMode.ROUND_HALF_DOWN, "-0.103456611394587395504750035543198355389880486923497840891929"); + t("-0.59284915529545417920535291631214788195483035106", 117, RoundingMode.ROUND_FLOOR, "-0.682047935310074520335599988679905651003200908477628647851505895098726246457976857045865944187124645400286135113999738"); + t("0.447242281613529996533", 155, RoundingMode.ROUND_FLOOR, "0.48124768327660715173215429902425602757160635968939025749688808358299982930556570527233045960644880489234744203102161836898662680484017012060886125674164444"); + t("0.359790278156793393", 82, RoundingMode.ROUND_CEIL, "0.3766449732731627871516774817161775489123179469835248898122017279366655095699971367"); + t("-0.08220701346608207", 97, RoundingMode.ROUND_HALF_UP, "-0.08239295280537699532126908163498905224535807080195992622246394731784423069379359143445214222092482"); + t("-0.0302686634105283742274865407414080546644367808766520037455255", 148, RoundingMode.ROUND_UP, "-0.03027791246434073911668615561635294923738722599399668407439959872111538411277253844742899208576336434826494403598356490260972654840141625929874609553"); + t("-0.6489214903854416557425891135926006097573388225991790885589", 90, RoundingMode.ROUND_HALF_UP, "-0.773433419208351101967829325557134474075522978732517484920075552027821667697495084180452761"); + t("-0.3784", 43, RoundingMode.ROUND_CEIL, "-0.3981909430801410903601622461393575132680817"); + t("-0.0966573003018364", 122, RoundingMode.ROUND_FLOOR, "-0.096960010237597550040676099559043163263102408265586689495010986720495026251600302412580877691246424793520004650348249462567"); + t("0.638746132096488477984347209105182148821974460222682793586686886080899889483666", 104, RoundingMode.ROUND_HALF_EVEN, "0.75605286421485976580162508705155614524890678783983889335469685261853320046834708675977256814898118971633"); + t("0.46355889", 66, RoundingMode.ROUND_CEIL, "0.501834777718778567022753667397040932206729639461573693282808464891"); + t("-0.74081", 64, RoundingMode.ROUND_FLOOR, "-0.9522722088217244675507933927381728724696016962156300368863659412"); + t("0.080556708975128401196525838556848504928", 131, RoundingMode.ROUND_HALF_DOWN, "0.08073164507402793438747574785746687272139236398746675288591057194193965051555929458905667992976833284568869499852781511779410298567"); + t("0.834890374386070831058165303348681309605162171430466200395268816", 112, RoundingMode.ROUND_HALF_DOWN, "1.204065183139376624138702326407321423496754331558953022282867738524924516342421437579941659206950893438682076982"); + t("0.8114763471613886777393895155086809", 1, RoundingMode.ROUND_CEIL, "2"); + t("-0.183797", 84, RoundingMode.ROUND_HALF_UP, "-0.185909624753444853318764960249965423327753904512723067035481680576752939940141805042"); + t("-0.0172", 154, RoundingMode.ROUND_UP, "-0.01720169645047026032743957373958309499678244770913932342809081889829919431320836009642154471749522145490136836508900197482918133921436109405522859967136035"); + t("-0.721690463891584683865372543059", 145, RoundingMode.ROUND_HALF_DOWN, "-0.9111639907382818699925667747993417266351210670863213197933401665566241408899922007273358638993360155906554380925575338635081910569315633042686127"); + t("0.4958646946082052331109115245154505664842831948714162233393940068", 90, RoundingMode.ROUND_CEIL, "0.543807507271436434137098742089841558720097206262725219986565496623161884090666884057976372"); + t("-0.79192", 40, RoundingMode.ROUND_DOWN, "-1.076560164270407407176472937824940874527"); + t("-0.718685558345737897416924514467041400082094235415186355651240437320655717337180456566216984475493343907826451853", 117, RoundingMode.ROUND_FLOOR, "-0.90492100711537411053336945115037143606417190937801926926722935470253326860357994577393140504048292316222024002328008"); + t("-0.991696696278356656998213059764383057046894046985281469342981653423563114891100723", 100, RoundingMode.ROUND_DOWN, "-2.740044345644441461308160928621216471519650968716177798250248031259467701055321685468858871238747437"); + t("0.42573194473", 87, RoundingMode.ROUND_HALF_UP, "0.454672161850764791632831218999710641424169788283837127313323327654580595183975238076845"); + t("-0.2386603494473275968874608271288765004446947212011819074891796867941802137123474303084", 21, RoundingMode.ROUND_HALF_UP, "-0.243353065795036168354"); + t("-0.28015079032823498869368065137588827285693378939306222294661161010577651579847", 99, RoundingMode.ROUND_FLOOR, "-0.287845697927106083319045903676475716917650935779447415526947613659895033380487147718240005700321978"); + t("0.784667179613284917", 109, RoundingMode.ROUND_FLOOR, "1.057401194912127699851364229951478015850188067651986983692524537690523705464677552562001945798762939898538386"); + t("0.85257207070641122508361748581782372103677052221290270887535891526128715784829502935", 48, RoundingMode.ROUND_HALF_UP, "1.26549540978418846589880126750775879096625684196"); + t("-0.304045203794248612245", 148, RoundingMode.ROUND_DOWN, "-0.3139708485635925772647580752327876980913990616406010364963727233842148300067522352731904679712020778230244189389498971238596876081389611438205909064"); + t("0.0445951337012070246", 96, RoundingMode.ROUND_CEIL, "0.0446247315262957621713309806364707524614309711737881470669648333029981851634692272265874527611312"); + t("-0.8381155324391", 105, RoundingMode.ROUND_UP, "-1.21480662051330520365467926291060149504604118182972972125395350826918801654618337350582546124405512841363"); + t("-0.27572851760599069919498", 21, RoundingMode.ROUND_HALF_EVEN, "-0.283053191494449538562"); + t("0.803448566524853460021935667779833282701098", 60, RoundingMode.ROUND_UP, "1.1082659181063399988264327875788772830640205277217742586984"); + t("-0.90725107", 145, RoundingMode.ROUND_DOWN, "-1.511761044477246468604706131248004379813212859081514356396327933355481130283688363622579223098707031923043707646186351847901926271201371512893322"); + t("0.4538458443589036147556903561992770414391695871992555101", 66, RoundingMode.ROUND_HALF_DOWN, "0.489533179238420227927516771375965616588829649850165303215846294078"); + t("0.27279546878", 86, RoundingMode.ROUND_HALF_UP, "0.27988157154096206002961555747891050359273397197574609998928909349745638829261401003833"); + t("0.64832788", 39, RoundingMode.ROUND_HALF_EVEN, "0.77240869138004331947928559180803043214"); + t("-0.2033", 62, RoundingMode.ROUND_UP, "-0.20617243252889825823241726509349281173792178111368515680482641"); + t("0.4169379747354999705940085077604256451279535755029738066", 66, RoundingMode.ROUND_UP, "0.443979947990907548027353889264135021206105461261057324213381429341"); + t("-0.35413740849612678670597476410898220577392461128", 147, RoundingMode.ROUND_FLOOR, "-0.370166578597928631216464222701676502059252779921973471231348096396288348255468564696504162138343404577196966971527160422825507442469948865586481316"); + t("0.418535943790716152", 146, RoundingMode.ROUND_UP, "0.44591571768448824774264037500050578308459711706226783274597365361874225090583649263359984011750784081982879155366353252115838079210627400450598215"); + t("0.0648518300507673829570958168291591319665321077220536607248129518949787661458263502196214744717666297017083772525748641441", 45, RoundingMode.ROUND_HALF_DOWN, "0.0649429772420575912697124390205524578429350851"); + t("-0.1695116368", 130, RoundingMode.ROUND_FLOOR, "-0.1711638095274053563777312361634027923855291381337477929534984678027977706279186581516892107075289206958480809542464961773958829719"); + t("0.059779263474741149892756186972000093925810747392804355683584935887273916436287320219047981166930714332206862577233957837908043082612025377960010632", 126, RoundingMode.ROUND_UP, "0.0598506248141775471727424125487023000139453689229942617267754619514339882361594472010496152909011095153227978213536583117882565"); + t("-0.25198932665107", 127, RoundingMode.ROUND_HALF_DOWN, "-0.2575358897644445486911554712232658659604081502929859952495174162551843554972075824228535021053295814812576687322877790436838948"); + t("-0.9000351215614803776157", 123, RoundingMode.ROUND_CEIL, "-1.47240437066670258385160984600962619282122196957208250586084063694669306039851180882241597153282241772533618582440095710772"); + t("0.50967034866237962430435889856605218892136645732", 93, RoundingMode.ROUND_DOWN, "0.562284335547419456156132625313475287430442765302589939721577689307010428274399267018192685101"); + t("0.458392693798618528859394380166939953", 76, RoundingMode.ROUND_DOWN, "0.4952745010375455549172232709501300209649042157607186777563062369556261335602"); + t("-0.1669244180377053", 24, RoundingMode.ROUND_HALF_UP, "-0.168501245727650415601618"); + t("0.08179720469134968467115120086844785994721794593019401752508205638", 55, RoundingMode.ROUND_HALF_DOWN, "0.08198036967302231743205747615192910418692736141304029187"); + t("0.669351796990381", 102, RoundingMode.ROUND_HALF_EVEN, "0.809567852581415786846719325588566940635237489493449552729722788435074678908491217346570198766744316728"); + t("0.57722622922133748127284253043765082667827351580225757816815097158113", 91, RoundingMode.ROUND_CEIL, "0.6582929084925710279904230616012690160578837517153741046129913758483243655782361114462678824"); + t("-0.68238131977", 18, RoundingMode.ROUND_CEIL, "-0.833556988257893672"); + t("0.318080975", 120, RoundingMode.ROUND_DOWN, "0.329510615918503095798940285875014399137633347313153916250665384503208005427313149672038015274429864849577788739235698862"); + t("-0.3103705528804606479922086152908909981384742243315210818050658273659267", 50, RoundingMode.ROUND_FLOOR, "-0.32095541040673874426276501167591878728393607761971"); + t("0.5764924256246543298870545312675931789369188008318", 126, RoundingMode.ROUND_FLOOR, "0.65719313765307357870820308427341507167481040948292266732815936390634576078522303432215729713132539394645065849083137611772987"); + t("0.9849686327", 139, RoundingMode.ROUND_HALF_DOWN, "2.441609609906199527083168004651752588366156887362446167030553492833631044846429835794791742275016458899754889119206245871099961748254437904"); + t("0.914654999804358908580421", 62, RoundingMode.ROUND_HALF_UP, "1.5552954305578950684640722836171452687017643873990059559419585"); + t("0.2440950067269800201504715439411", 147, RoundingMode.ROUND_FLOOR, "0.249123972170690440919407886100728815124903705794596220773004187144787869289532851106331870383100612038227422051634064587462185233133463591144794816"); + t("-0.17221698", 101, RoundingMode.ROUND_HALF_DOWN, "-0.17395051130841983422957031516201224569602666265836524939610413915425708159861073866198768534687482313"); + t("-0.6664423419484576702000426720003790040460068875908063118257442477764755418862280020812888327537955584742", 113, RoundingMode.ROUND_HALF_EVEN, "-0.80431528036770658420358337180480609738961163735833812396567179692651686875179148316394032526565195253892057979636"); + t("-0.36197651497", 100, RoundingMode.ROUND_HALF_UP, "-0.3791585752273256745651794528263399998154557063011464279468255503120264093121341750928697097656128541"); + t("-0.1084823812615287283669597899207714489181925", 66, RoundingMode.ROUND_FLOOR, "-0.108910967289611097976735001745385711062006228591553517700105204161"); + t("-0.844584397727959", 73, RoundingMode.ROUND_FLOOR, "-1.236953219400664968338882852232002056371133314964066448482463827686406547"); + t("0.422917010658647726695378751612", 128, RoundingMode.ROUND_CEIL, "0.45123909561105322236261877815649690916764881862041620627232652153057955242150278977780004747882775031566523808260028631527437816"); + t("-0.59531240415765198837574257149726016", 67, RoundingMode.ROUND_CEIL, "-0.6858547297785829238863536310561803492463689304394696373043719075411"); + t("-0.080954413816258829202330594300021788062812232675765473082613504901218944177", 56, RoundingMode.ROUND_HALF_UP, "-0.081131960562296245419465097419447936269866480022867190546"); + t("-0.2738897766307264603777165", 116, RoundingMode.ROUND_CEIL, "-0.28106424435369039614123861119382568586058550218202449346195517042202053053777548885538945409126921722596622318229288"); + t("0.22759953922061535181712744592156", 104, RoundingMode.ROUND_UP, "0.23165640014308084950038324840690091574664011750833889859625768802863004206487134628975214774506123098891"); + t("0.76240981557712893032359687167061046", 131, RoundingMode.ROUND_UP, "1.0019450448133980578046999112488774462304216175048568018223555729981626336384930302937855237926090246199156891332649427034540344674"); + t("-0.2", 57, RoundingMode.ROUND_HALF_EVEN, "-0.202732554054082190989006557732174568285995211731247098807"); + t("-0.9495902294602832871793310071013723", 45, RoundingMode.ROUND_HALF_UP, "-1.82759473726665300929438873145211080303768479"); + t("0.6363", 40, RoundingMode.ROUND_FLOOR, "0.7519317612209532580159293840351388603638"); + t("-0.7097", 123, RoundingMode.ROUND_HALF_DOWN, "-0.886579162239239680158745836866277569922665130364668484030547243008738271536912165612638401646766854915629244916787953901476"); + t("-0.8744834323", 109, RoundingMode.ROUND_HALF_EVEN, "-1.351825317134341494400550594887068972097858540088337062278247911728227693258465066959052359958737656595179692"); + t("-0.8244789745604808975748092947900605191831176503105", 65, RoundingMode.ROUND_CEIL, "-1.1706454465298949171536504734612026055735516206290423349246787642"); + t("-0.1", 91, RoundingMode.ROUND_UP, "-0.1003353477310755806357265520600389452633628691459591358745895209277925187380093896639115992"); + t("-0.89956550497446021639", 105, RoundingMode.ROUND_HALF_UP, "-1.46993736660500074236541682328986455532826600858171791693778510492582589217674100504044805668018630134693"); + t("0.57447311244698", 129, RoundingMode.ROUND_HALF_EVEN, "0.654173913502961141163882598539704431081329269229096440949328958832326443447122644379343585553191564350672593347642460456689639204"); + t("-0.9721021822586150837390141475034", 43, RoundingMode.ROUND_CEIL, "-2.129153440883888322266954103765655028704499"); + t("-0.211651230948756", 38, RoundingMode.ROUND_FLOOR, "-0.21489938485789257469998213491440297206"); + t("0.59209522185853934760931381000896175167015588", 44, RoundingMode.ROUND_HALF_UP, "0.68088620854190870830959348295175651649670573"); + t("0.8335933120396184191697206917", 25, RoundingMode.ROUND_HALF_DOWN, "1.199799079708443456536326"); + t("0.215242", 65, RoundingMode.ROUND_HALF_DOWN, "0.21866156144838990030797458865239466326069408186748684095900898192"); + t("-0.299633799", 111, RoundingMode.ROUND_HALF_UP, "-0.309117234076452340680725575844450837460639051129907792566509010508012527525813555724237882827279907234351955625"); + t("-0.517", 50, RoundingMode.ROUND_DOWN, "-0.57223666284797978046375411594647659977476622716094"); + t("0.353633373411455950908648692649255774049842910986245281887981420160251780388838332690867858342902015723717131921428513126603788772080286698708365148543820849365169296262499214142727230545927415118327005469392304203873087425718076681320213847871924", 278, RoundingMode.ROUND_HALF_DOWN, "0.36959038381543314492509214630660450741366648396894246146733105170071403154619393433894914659153054029076395829747976339403783980330539786885659620080688410438469883848662493544806064848018959956205460648050609326596621124372076108323523113579311024246076081133293362844983169742"); + t("-0.665262420469323834400324883838560246741876728235335755", 290, RoundingMode.ROUND_DOWN, "-0.80219555986057375594619542906109954200162329907778720850900320594324778839610114544862174230129619743219920057757088522103465811829936549391541026898033217623296846062270271320381050261484410081399652532382918417810859452123329789177331625138098850861865979000077331493455253717855998314625"); + t("0.5350774", 96, RoundingMode.ROUND_UP, "0.597232571041500382338435992912440087409432412049415080338736673850407816789373426404801098146177"); + t("-0.063369723470570989826453499007607", 15, RoundingMode.ROUND_FLOOR, "-0.0634547535000722"); + t("-0.986951464156", 259, RoundingMode.ROUND_DOWN, "-2.512840441972876234537415663955489741628155072947663264457389158884071934155336934002026418300442089485398611880253998816312486029858329250969348889994958529653894629585971530186426744199112895388548813382893171911968016478231367482220606579211777284244948661"); + t("0.0414912", 150, RoundingMode.ROUND_DOWN, "0.0415150339289412696957021406420471729293224277383830934679485618163352605374524141874002403147449979510723371996352354177142656378384643669938291785941"); + t("0.82456496412570969", 236, RoundingMode.ROUND_HALF_EVEN, "1.1709140266799501705310801845335396808993506056079808272677956268686200168545341967057954434261715892551471836659907143456656850616554248921913652087378279131005852629899419834242382274130645810752659085701953961457201180527417598934541"); + t("0.4131893327620092115447543508279316162654297600749325669048514728238211677", 252, RoundingMode.ROUND_HALF_UP, "0.439451071203118169750489636513637070834046566774774511726381830998589069131221440673251251627820369441438022870148374415562342995526484620560576971243661642470707490123463512249754667686163726814221137766516759152293702501480198984317030019834571093677"); + t("0.6399321047265710216298656077307935784735444434737883329011923878564384551373725041693917253541667596618909329293903124520232382790245597314263279010293963824045526347548442586014958522930907564399208575462597388871481657712722117118468206391631549105172776714935", 304, RoundingMode.ROUND_HALF_EVEN, "0.7580587543773753206095735904461966020570973532187058641260076677083233205236875159965086417176361379327882887406335210697484401804030588515481175227348283311135299062873502978870300547925398421858116932052248503860718161516742990243557088911736076356512221869758727821599787512611267429492118286589468449"); + t("0.2420928261530804490580440242298408934601351086", 285, RoundingMode.ROUND_UP, "0.246996041377177721833557479028769696376096970801407146253096517290973021855280435075247924898969450081171336098688099502396620213576198787503943995842816986855378033864186754682794580260494274126209390171931053872002234729817450500250811378159410806201907695655684341974733534778571709"); + t("0.042", 28, RoundingMode.ROUND_HALF_UP, "0.04202472217122584148610893756"); + t("0.17659477200085197015739225738406216849725666068832568926357220964037021315317838634205065145323136148503280678900832691923318353451612663217514282", 76, RoundingMode.ROUND_HALF_DOWN, "0.1784656502559502786600863775379942312013224432407510139765685438309276943537"); + t("0.248404595880894694499434077", 163, RoundingMode.ROUND_FLOOR, "0.2537117695412283746721321058820666081740368344818819117225353473827483138240666287407424739966531585435097548979404257697099779657766044865129624153316024997741609"); + t("0.751125", 253, RoundingMode.ROUND_DOWN, "0.975531477565958816756775735193737117938110762832753766844098977070634778416302840021512323113172950777176246895463503296996665595851347378497342144775672764290640346994284973671677736439266100018546002085747477537188677301721715095584490876352271629788"); + t("0.9834", 248, RoundingMode.ROUND_HALF_UP, "2.391582563694763579543717355967541686953947809469328016850171841737187488288869574948074895928281628934611506083108244431258789353376053557842214380235900545387149386907088022356397644007838634368468849640738228706454362524067331699474087067956021"); + t("-0.7203697018670331060511539045989", 138, RoundingMode.ROUND_HALF_UP, "-0.908413061373226460934370304066548079397633496348501679926061797722060334271534246720648421124256396376981643697027052839448039118041607187"); + t("-0.49", 75, RoundingMode.ROUND_HALF_DOWN, "-0.536060336610566684673824210154234123810195600392236454378804012493592482634"); + t("0.693966826344990254393019655978425785387686940993156092691968300628782836691458679006152", 234, RoundingMode.ROUND_HALF_DOWN, "0.855567392637648966154805566860887235952860996368267087233459759322797973719777570013252833718859835966465418300009385239332855616045413099817560185305408212460868082918186924015482004496292843753115960192165831767859971689955084931969"); + t("0.04396841417074748578516644914811296150761431014573547978558560840749867266877839365128582852619469356369606680241143969733962889226371595608184604093252378143120389841736723278612481540652319202179275837815138582205732107", 259, RoundingMode.ROUND_CEIL, "0.04399678064161414410011839214868946472177874320079520323224702590116605256295045547610526839676144328586605650646636696987320373090052705452875368549846124631954477141389560991130585709309633301323450402390042331148523309108964175194714553267562379553243663789"); + t("-0.4561918269266436459415677555725505926158887694701053104602030343335666507342365918099", 301, RoundingMode.ROUND_HALF_DOWN, "-0.4924917038491793700261051024347640803449926918872958695595975825666344825554297135269940858246939852001630302420459822220007657219027420964513883653644192599452806361815137171981381933027907427137550322866675089288979294088069165998816266434053818173515116398326287166311899156781461940884397248130643"); + t("-0.0385187612", 147, RoundingMode.ROUND_DOWN, "-0.0385378282073295670066721909334479694483542970997078130006172792568032376780455542216715815342507499291189242091743405390552740185804090927205683846"); + t("0.9779708381738750391737091698144308009001956642030249015", 271, RoundingMode.ROUND_HALF_EVEN, "2.248729827913416237042280946953006123456162430232963198376031184893471296119992627610656933072395156339561042965526685661114993868956298231572294853307633310742006759685153958018896456110727215228638229537472647047550637964787570540123768931698867582447155742170441266262"); + t("-0.925968", 97, RoundingMode.ROUND_UP, "-1.629343272654906983220392843886784753354281830957506738671633499958711529079041109082366787633064"); + t("0.5421613", 183, RoundingMode.ROUND_HALF_EVEN, "0.607211607192770674900896615043173498309320314999037349846477852245076402757639581391324168738065889316656020959687758829533307405598147005939392957912291834094456288739778175986410555"); + t("0.4552402783545692799031657837716070802839922966884", 272, RoundingMode.ROUND_UP, "0.49129074300041494555320332690746247666740750898531407395319900046145801248322337820903373948663295642127502873536023779177836139710576680112420504311971194857171189095984485221026287152020862626788605466150509372908559230090386942918135453741200653054314805105703308745083"); + t("-0.99", 58, RoundingMode.ROUND_FLOOR, "-2.646652412362246197705060645934268600945552640284736249454"); + t("0.23514514194087957700369379903554444172789400375", 152, RoundingMode.ROUND_HALF_DOWN, "0.23962883909842894815634552855455244519159109741533221082158121387920484926797370860531017120239876181686976399527449760202382459509406335941433099497937"); + t("-0.5836929700181928964830252919190372745128740033228221075416503785076528474868489602218776145063701809023906790868051666418557926145813988371595761264050833444608590614676917", 172, RoundingMode.ROUND_CEIL, "-0.6680458403261016198853962555617713688366448162522728067989831789021399241385857180614582051788794895846929006879208108949976266322290550714876211392126526530960865041766089"); + t("0.2828896124136094987050292309468043141762131605847647540329600861419736285809830613527298064654331014185", 279, RoundingMode.ROUND_HALF_EVEN, "0.290820267966906200545941832767833185323350197865176869987464567411496057112743515188552000796590995451831659761441690667127568795354157731259979790540322073564090726173491819321143641783922309157500442480596692069316700426415003342644205024114313992130513731231961030219142149551"); + t("-0.2960521690854619695", 292, RoundingMode.ROUND_CEIL, "-0.3051869402141888480048875612388482327510180902754388036370866983621498056388503196785509740057063144636152649514837837141093587610972236782651531522261630473088286413012409615802218927014037266942168235431411467274667272454248372222932624041695284796452898919725663325812291335400878686583804"); + t("-0.41286432057877524959102065823021934210890178795720659771", 48, RoundingMode.ROUND_HALF_DOWN, "-0.439059211153320849547833828562002175169174607831"); + t("-0.5430615423", 238, RoundingMode.ROUND_HALF_UP, "-0.6084875102204545186454680147444840960316763534221374278620986781887593639232756423966995919473737194787806057309012300858320612760201919718570864946495907832846019729279155189850567369610190634703187976211176942435968130349984346744407725"); + t("-0.89607335645064334116908", 237, RoundingMode.ROUND_UP, "-1.45192753619994861039223693401879764621683879217663551825195594903736278279059606340079122777835624034878652009349557127739016119207521942000355709620939441862405070011912360310238092466736370858739846366353894193228192516172212036628386"); + t("-0.33288602635126544772854420713", 30, RoundingMode.ROUND_UP, "-0.346070454278775921079172835484"); + t("-0.61503767119784224632684959032467529688419417", 184, RoundingMode.ROUND_UP, "-0.7169840394852531089037127539655495754806475814699653461425764082466394184200371805554335889592582431292778362398897079226333821855750326679826670412479167715946735878347441469871315207"); + t("0.10242", 182, RoundingMode.ROUND_HALF_UP, "0.10278039472484269482301199764469185071298438986516481537371246194803947278290379910544273655174418854396483745471467704013857075113963936323746435209602318611374625568961139279614842"); + t("0.95791738191182753002637", 155, RoundingMode.ROUND_HALF_EVEN, "1.9200009218199166831316566192227165703519249288140108851852679239621761485950075363857619122812595423483731663029716597006943711097213798370484551819068795"); + t("-0.4763524", 215, RoundingMode.ROUND_HALF_EVEN, "-0.51825539552811221763218408299951118869618633115281835565398680546998575006428618040014770863279114738037278424905089835343107635415733437508103048069611472674950122609849246585723550990796115923902754402307040368596"); + t("-0.77125022431732667864931414068331", 102, RoundingMode.ROUND_UP, "-1.0234060970577204164318663327043484761451860395366219253949849503894462324470981884843184978971172669"); + t("-0.463820269543737279913513479265723198979180633738469352123305456038969822296150878377821049096449176724130946390868", 45, RoundingMode.ROUND_FLOOR, "-0.502167748700007242159887299568252078197515792"); + t("-0.575501669749016440192472999452959948324374761828782366645829684", 286, RoundingMode.ROUND_HALF_DOWN, "-0.6557104743617790231270593483584133499647927459633230313886571473952352127020311979592286689653274324371765776258996395941787513164422819033039982991045184093384661881469771282216620257097102669420806907287974026077053214252490100484841048037841944171050080773321244433694531061321319374"); + t("0.660841997953392435594825470265936029479768818639439751522756711", 11, RoundingMode.ROUND_UP, "0.79430694946"); + t("-0.5564925179765303231694751357314448622731123452974341018295268035434", 282, RoundingMode.ROUND_FLOOR, "-0.627737755453322045153839868818725941342581083374365847114175637654789771522423337371365222085509581114051552974901242140442158144665425149918573583550747352336927694838021911688632104372598995947590541265215427638964198192411973901748308397783752726906265172813108553810845321473034"); + t("0.799492635408075153820179893773848318631016479884932938799771955954948896655780624853585702983281806945", 234, RoundingMode.ROUND_UP, "1.09720452886503926230810016889667110699346814422697836857276675980929399632799216470079959047948329734324537822551034088670752530094519603439521886002197743149246039095213076854706767812617640124839271737223460642496284606724557814596"); + t("0.224", 185, RoundingMode.ROUND_DOWN, "0.22786347144452632046165173500710811553713461278623116739519601819855193522998104465852181631534628758366881976536154107429780497012440915726045278849039598202968006902164505183589159896"); + t("0.45", 70, RoundingMode.ROUND_CEIL, "0.4847002785940517415606642271983911528364030299926634518515513212561036"); + t("0.90456435539", 64, RoundingMode.ROUND_HALF_UP, "1.496778217337276147733338664547513755680907350349891554969078375"); + t("-0.167167607734473438967675100524296", 69, RoundingMode.ROUND_UP, "-0.168751416277484092222447034495865541774712299184805485774418373422763"); + t("0.39346396642196313634", 295, RoundingMode.ROUND_DOWN, "0.415891924656022114411308167484931061252248711726168969717840928041721731103779709393853074420840080513127337938387816637732069845444067243477009926894918364060015778884946699283447160614186111382564475425458640061518584822312961058756076974655392515933882819933687140446748674016134466675430786"); + t("0.5110796952165096935731204873748", 151, RoundingMode.ROUND_CEIL, "0.5641901019757929113627884069151371616205417915862877766246820892504228772691345201918257817626143024303362324777863087459340457379199314813305844013175"); + t("-0.475143189208", 80, RoundingMode.ROUND_CEIL, "-0.51669242872449880253356673126617630078734592296927663576719075923086741472963711"); + t("0.0650003863442269001997965624678998509161257660254375671243290756933084622767420959877086125201575954190411861435139590689743642996233756034057693505449107029893596558796547374892451894231071", 24, RoundingMode.ROUND_HALF_DOWN, "0.0650921624108860348022739"); + t("0.2082179820930656", 304, RoundingMode.ROUND_CEIL, "0.21130784347607275075071280209489049983594509334060846357522984164908003041545137487955224918007505956636906860462948697635027668616300776092687712338802790262368272000468297072988904238496423710278279373420403574393545198178641834370213961830423234722077395942084238001879677485797367716302555547212444"); + t("0.225676000434852126729843744815306847896", 17, RoundingMode.ROUND_UP, "0.22962870888679599"); + t("0.726468166", 243, RoundingMode.ROUND_DOWN, "0.921207534115449241765581908654031704912901605617646177673416934984124846650090464601046254421930869576274334336790630990432618328896262362969134661361783582371262226472878642702702695217107844471640914409496395461183036171538183322466898619404"); + t("0.9487272", 214, RoundingMode.ROUND_DOWN, "1.81888566167878767894993179999633067733616687623119632854364742295344229976123935336930609574826821059876023621734241300878512255868280600122674507438366731065392243088134624087947768152601064068678155976863937482"); + t("-0.0504552027137731827754807628995759014123503601097", 215, RoundingMode.ROUND_UP, "-0.05049808329558655893728132326677319324522257589302092769885175547954213761646674635827890931517431148336322496618452249752295407646172902498832043016442402381991601213372405520029303594842727534394403851806884140266"); + t("0.64638495328205701992223400188494316387654249514343", 187, RoundingMode.ROUND_UP, "0.7690641715407690155113652677905878825610904755391980165353772682457556967588692416700584255029254430469175961409044653263492458694641853486364417463501680720058821702799837967438192181894"); + t("0.4363957719530763682010413519572082080477084825722273168925194517611926193311972859206526749628251681365651108907465652122999119265950046065911440658683145857410504188272976184840255120733515721922893836912512133015286633504583748131009809272592343415974268152765763764824344094315152031", 4, RoundingMode.ROUND_UP, "0.4678"); + t("0.78389", 196, RoundingMode.ROUND_HALF_UP, "1.055382057365593952737925472919998914964710667623345470127442984594654512064156269471954366008504054813304106849671549263026264894072335307916831647320967926852448362900157151529513611737372975544"); + t("0.538263902756984244939887339713548997218423466887448293029560667", 173, RoundingMode.ROUND_HALF_UP, "0.60170810691435236862015184245057965060570525332333050030490169593903713046697351109207982043419873041821959187568177871754246016034956908469872486559162810305983883976908875"); + t("-0.2045259425746837244", 87, RoundingMode.ROUND_UP, "-0.207451562140210664665753497832555950054995234940572864215224656790241349243557170728547"); + t("0.5537", 240, RoundingMode.ROUND_UP, "0.623701545231365622777442131327458584702461990125760309854238527332789357553269353423873362995355745433264654880376520846869013245924946086962014583188582432074901659495126518693317471770693400078442640158010255834509515443056737886151244555"); + t("0.41314242077085316256", 21, RoundingMode.ROUND_CEIL, "0.439394502611599066569"); + t("-0.6422", 262, RoundingMode.ROUND_DOWN, "-0.7619089571000348038332489523681974603841401292517733381062592862118937376336776330864658044040472837191400801085350937282969286377543762187312156330734505007262906783703535980724833153839306387519474679846174009253097241643423342113482917329464371514735085897197"); + t("-0.73755052252277949095068698029881187388287", 272, RoundingMode.ROUND_CEIL, "-0.94508652898651035087224605234047601846591772945560991195789978915582067095079799858742731472618084123855582609100413347499624307275465484406315465594544127256922570961360532525588622630309666700486789941691118324957277949808481803508307937272675860025064422771931330396237"); + t("-0.557576105063759007857364505377378052558057811340526010795990423080634426725797654", 316, RoundingMode.ROUND_CEIL, "-0.629308826130303566449983587804814357443222245138365111089913510316398673174439637915895915190680184408874896230578526548941429005057179076855491860401271237135618779830553791298401686636646331037687156810440493941515101262937245761920911948427725327219719615247999780821371561917843015098995275924262443505204552296"); + t("-0.397376282755286193632892469851930762749811424801321077566111509755327087039064311728435545675183355372984395937379977900547542469552530272226417379971423501269575434572242552751", 162, RoundingMode.ROUND_UP, "-0.420529344727161283368490297578093655401666884197462919020339661486717817161865331024303002740302054768207009108283459264940851619522949030127347019868222004593149"); + t("-0.551347", 133, RoundingMode.ROUND_HALF_EVEN, "-0.6203145521664465070986904990305957976356393749539797028922429993300324818277943005303027917613111973929004644820979685967305007977015"); + t("0.888", 254, RoundingMode.ROUND_HALF_DOWN, "1.4123872377051757274639648758673472312508810970544242975866632783075069367415264625887723941055904647796918331853022535525065125422999518727010923024170321176866070458440327752066229769192629863159322368386644451798538534822447055170835376483999980549102"); + t("-0.85120460632093613939262421061714583", 33, RoundingMode.ROUND_HALF_EVEN, "-1.26050983963178667639874838062063"); + t("0.84388219226684808790069288794584310158759645745211", 199, RoundingMode.ROUND_FLOOR, "1.23450880749787962918402458727719465258152447209002202470072256813338187954008532004830856301367480031515215688488217607006706287595661950582945801196412515010116973437156781325755369580097757490935"); + t("-0.3001094463532931184956933481945993205665581825857534941007663593953535", 150, RoundingMode.ROUND_UP, "-0.309639879261266467371519740416601782985789422142698173476806974952086755424840124518669986998602994762158389572860279641822610762510485788799893185181"); + t("0.074", 276, RoundingMode.ROUND_FLOOR, "0.0741355202113153067466012428426089693428025868062340965353359626649821255846235748834524006703035226602412353079425211951271654478502940179037568349365093269946072447493894800473619218351822397815549727304402245948199776638508413362160815627499810475477260913796041996292479682"); + t("-0.5459877879202066377140152", 214, RoundingMode.ROUND_HALF_DOWN, "-0.6126471167181840583899677977398656055003923676794447483185964585802761952970436789932343233080127140637676695053683422488311858266141708613576325751961320431492509300826766345095969084746341863280841703841710444846"); + t("-0.77321937916608142499512287405430509593078611484368137223059939522584999712066628139374733686623399341404866541255628430655270308177843673077392198374533005631431314795", 26, RoundingMode.ROUND_FLOOR, "-1.0282844547948804863372644"); + t("-0.330623443102462662135226730904717754622941289915803060302970658275960217867922548438343914223720967", 249, RoundingMode.ROUND_FLOOR, "-0.343528049250293182400191489972084140128361215952688306762356186301903566013306952257967630469892794273365354684469258254336042476373882539854785473445581410046217082413096724320906513313925494914181869779726502273829373624548044277518362628998826487"); + t("-0.6914503442729", 170, RoundingMode.ROUND_HALF_UP, "-0.85072942138435912856060574511360632165353169369104027463901758369841782464535453213465286613104811980170508976011164145683750304243359685746569363515721052112265329744492"); + t("0.56891419636911479526936302282020641825853750861065425004277443085398743443828505621548004846221129691482111618728053146800281127952782040760043", 170, RoundingMode.ROUND_FLOOR, "0.645915956885559666791088163071739564093397440299125336365614508697572084241091444594093170412657249823199601236045403440374934908236841890848030854313738985102100028433"); + t("-0.268615432246818170687729266278642405955545553826457221442563396055978288730606917941191757158543457249633", 5, RoundingMode.ROUND_HALF_EVEN, "-0.27537"); + t("0.976423547677484829702389890926621331317767553738953065812571332848120268068139564123999497028200735330502560715451452023319826017878243897155346743887", 53, RoundingMode.ROUND_UP, "2.2143978851795512756319575723774754370876561234785949"); + t("-0.168019292735369394109471434220882869925859785631412758152541458671294086417226718", 165, RoundingMode.ROUND_UP, "-0.169627714418072062732228077089154288359489589629869065676228596357987618806307606983259061452334377841644709506611468138765052736911468882619453949911769092709568717"); + t("-0.68337268521647099201502665632095238054799618705699156173312187704205806", 204, RoundingMode.ROUND_HALF_DOWN, "-0.835414595792291213321007074443117448899971812767154724956188023196188567306237490676425072863495703779701689049119532340589604017880454256442517981204587601900413685399596850661841408286796888313139326996"); + t("-0.71176085229359654064336214899908768439231967513132464095600188359146219646038465271517", 195, RoundingMode.ROUND_CEIL, "-0.890743674158320800836892481276686460912552758720792561166741935569196624482515333652627974887111402167629141995425358084500959022729256468503240220560416480208546037456617289578809554763291032637"); + t("-0.4293877", 176, RoundingMode.ROUND_HALF_EVEN, "-0.45914572746806078301370189650918022698141442182567852586344799568637136367363072240852060790784561951281864290071683223287891471665640409803931037257296673336606123409549036518"); + t("0.881768492729705208614294967538285114270777", 194, RoundingMode.ROUND_UP, "1.3836613364275191662557155069564889290781066189066180820661139690670691139631491386468241441694991783437327357827025835785179056589732057409772679743102126111681536393249873294685753524042967738"); + t("-0.6510656861955154257580418792238970530699632703114", 104, RoundingMode.ROUND_CEIL, "-0.77714626846900030758823309952599641242321294394590739570608471900570080614021956654155021024160386079614"); + t("-0.73750148498173384548587606375933467748654753534512", 248, RoundingMode.ROUND_HALF_DOWN, "-0.94497900358096136196213981809251735394038523291902562437209076185916772016831535677978740936138502180766347246059569983614961533314622607987966474844329163294825398763283445505369850009108787816349791031893112036366418924715209862525402500988600276"); + t("-0.7800512169531994058535283731230011063702", 282, RoundingMode.ROUND_HALF_EVEN, "-1.04550135076244552387535445524097724327128691626977542811773568120980716172075828134128428446489339616130195908241205339528429028363277816901798725204294926474646108736744908658231293038901310460565376730964417259361519201991482240492680763125741767222042392130548915059312793128043"); + t("0.0376300302668181625506402520636835695459205137837640588921238363869291975", 66, RoundingMode.ROUND_HALF_DOWN, "0.0376478069874111742629588211996649472589745487830774960526058260198"); + t("0.733417", 176, RoundingMode.ROUND_CEIL, "0.93608212209863379138610267241493798091766957512485173264857541511679429022218288588875888747226665587645103362216625054148201205198413833648252378393613754150569040017190621409"); + t("0.37468810111179094419111763919736593567579460767166640490650959661707474202080064331858243788173552313208391878136910358020960608732613862058948172688852819227900949500951", 233, RoundingMode.ROUND_FLOOR, "0.39386579266758034895318250902856199663969308026398959844182108801022867061650510638318066064105857460599445674254280041591073538930989370451476140761821025639024835040854225996546717792204928131317430301377998673215297718379125739568"); + t("0.394139464560967509435", 256, RoundingMode.ROUND_HALF_UP, "0.416691406293018544733342260278003394308277028283512660880289109250635101995021265646276104314122693296091688416617011150477072854623446886927988132338696963765906298444800415632005405942132500009054604834778401974629218312708424371077266275281390679893917"); + t("0.4549482746386127511589227012936031", 240, RoundingMode.ROUND_HALF_EVEN, "0.490922464908732523431429616943041278388013850575247956511244165000974015557079179218279972483599209897715333427314882887737268568695319010619017299124621100611299063391548818736742131932096344675972983969873246038740896487036103777311584336"); + t("-0.4317672464", 309, RoundingMode.ROUND_HALF_UP, "-0.462066842314849866294849870023749017626720744480873604393092418590172630558531646393081159894032367332222554636314930448095719450066160043934099520790501045547684731763253958750687109720447512668987215882019345437399437197838493571984587302368569606808023006538989329770328998839225269408275727675401314111713"); + t("0.48653997", 283, RoundingMode.ROUND_UP, "0.5315171713832122245054086925673204889514730605943308538143846588763783508099432550772514250282028340601177723743056274673478088099320178590830475737424050966984503842470702266934491190128948499267993696036408062719767171968303223969843420999723270019921844364877277282389080758547805"); + t("-0.4", 259, RoundingMode.ROUND_FLOOR, "-0.423648930193601806855053753260327012494797085879555868362347908150042784766730150457021371887069719102545832569946637584677874015873633511048078112198311682652330849460446708101442825082053207254381201694028820123344992784244739840343434350947747459505155343"); + t("0.2539424165955461537658553565381366", 270, RoundingMode.ROUND_DOWN, "0.259622506791623674569127236702617423862022427224931755756687211897722974478123296210145021859883534370387930936396951377071513540851603291966982461899631143568419074571261878432381321382545015740477908484061066372822567856180800664003323984210532674991631305339807059692"); + t("-0.3317657824", 176, RoundingMode.ROUND_HALF_UP, "-0.34481112968404296746414896352487347815580523166370289918686317742717829359087167331178479519340620492151229925014353969979699796793783964679809753503424131439548494681382821538"); + t("-0.8151502533964567716203214600969984903225259842947285784", 265, RoundingMode.ROUND_FLOOR, "-1.142190106476675106675852459693524121125077986732364308974343619035156397443996661193140149218616276259864880470358414616434423129622564391609762593971283199005637149152721989762039943885785095923793732044407540862167453747021682134722373337056259544324122808034254"); + t("0.1372998546429801640869237342151", 229, RoundingMode.ROUND_UP, "0.1381725044041005435596843792823999534698582907195461987715122123117299369481647264809889171702227732006320125373704793409219630307278726070998990690059175094184800150223384803678763469961135146693315773045202660253878744299241323"); + t("0.179312", 223, RoundingMode.ROUND_HALF_UP, "0.1812717418538369581213732454130349684924350300489387637421692799527687563346146762416778961036988757331795177472126650183882750751252301090544966091973677031682278024345296921784036791267285752122797420447743952963928193155"); + t("-0.649828408383079", 33, RoundingMode.ROUND_HALF_EVEN, "-0.775001635230188028797094320304228"); + t("0.23819502", 253, RoundingMode.ROUND_HALF_UP, "0.2428596889688385315583757835051528166865662174052661224435034256641882674634712925541448578900506330842472522041762016228734254315953244112722997719064517354448909053363510912181979079896877719609292101846969698006037281481486165610579790437324361965146"); + t("-0.624195764512542713800421707029288", 125, RoundingMode.ROUND_HALF_EVEN, "-0.7318498503010666289248352098995469273700426211310091795857798137882961797972485634876870827014757857858551305343510665504105"); + t("0.61535736423040134821558902167323544211407329606331416537072234230873963245988517167106510098531562458945407092319336058734226914", 78, RoundingMode.ROUND_DOWN, "0.717498402446946452695168288509457420898912491868676272767527390567859871526704"); + t("-0.8895808586749327750012668010437911055629014854522518002565237981413399338471508098950079493824248", 275, RoundingMode.ROUND_DOWN, "-1.4199134075904524473822213631118376342191054512420432359652658640427944597343400968775771792079189063675785870979990834592504396380038734462105557019455677872889437256771263272723397874923752144619542690663349524324651340478313016875662444194685805672910311275423512637393779"); + t("-0.29983783436372129727810500566813050718910808361725451126006382460897025595231618061376519108559635709033089401236939942680740623002", 144, RoundingMode.ROUND_DOWN, "-0.309341409731804917455183062521621814443285614683149370247112330096217357536840035126320043175896428054411974089985666048848918624560271238730477"); + t("-0.648041295124025234927111713876675467187815581602518598437458860980719102684720961954084955560381189132614492632309309249", 7, RoundingMode.ROUND_DOWN, "-0.7719144"); + t("-0.7358804726035659774653219698826142749278068263307194615922996252732705790474586946603535185717230850427981120085919341826162881051476144823305053434291", 60, RoundingMode.ROUND_HALF_UP, "-0.941434142344950073325764342420004622240726643008090583210384"); + t("0.65", 122, RoundingMode.ROUND_HALF_DOWN, "0.77529870620558346517591803572223763741605634108915271924693594641524402718988820608050598211424767660481203037412236167645"); + t("0.944943667657", 190, RoundingMode.ROUND_FLOOR, "1.782315703749103747538581000604758166614915458596909401472445492746446952166620549510167388661376973021473663755904790778810363922048159192493019450882747110146267841359507430517239890425242"); + t("0.9182143736656068603", 155, RoundingMode.ROUND_UP, "1.577524253794876620088627405716515393859916067225772418508252775297179666130912384405524157899932864121313677475806402493230859527006192534007243580690151"); + t("-0.1472750385635890515651916130372460300167381296036065082327178822119100633141471305929737553740054238294774873521009702457125357204267478198808180876055826356413", 232, RoundingMode.ROUND_CEIL, "-0.1483539095807219073929063776886688739539811062727061292685754469912479799523142966461895933422705023931510723137873944278968631964943971616668070227677974976251823336038139016028859199952685810029502531369985708925972935127284151275"); + t("-0.5922422", 313, RoundingMode.ROUND_CEIL, "-0.6811125599123083813065354933054411478354924316102847795459855862185099824478853694796053359358663550573478694496313614817244396508686618920895775686495504220903773700012676774746350386613581964992726979835102128464371006113164755873312544282587480809836375632619154437448810179907267747404349780085200459092582487"); + t("-0.347821477312804072482726332367091896500755242312", 33, RoundingMode.ROUND_UP, "-0.36296325761172879191833344671405"); + t("0.1309211750227495846971038296129409945453", 184, RoundingMode.ROUND_HALF_UP, "0.1316769749558431627502073730865841079742838316311369563050988373924611185394315046558424417731350316299667442915195311871970129205122024838882833471089003305144878172066471840931662665"); + t("-0.996766563794820263508193732288548218418893716590017066353216418843303409237396990595688341161593072790362793189864501020070246638680550825029749484022466382539353410504302880948023940541950459738453998555763674873914652404", 311, RoundingMode.ROUND_DOWN, "-3.2128695103852060432840010371836377120754262023107034234022392337065362533358439618790180951848138821036576533656411837214706360831689127605224789629273458667512549125821763170122734881934174856233480280354105426750822644504721866138650941606853356011757567275380771297692791654445616148920368524993636867655376"); + t("0.805677871239960052757710732764520174447089032695327969119503078761008957453107292030787955607248225201420133213046144411969126449794849512", 260, RoundingMode.ROUND_HALF_DOWN, "1.1145870563223313456730645194855930303047969033328031366313408147100700289741804948949107016253040681563372610627197787341653436658874233396928991556147209685559108146892458220748416103153856508653769701170647088793964748052497292257838770128921220831717925446"); + t("0.9876985075874790941980693098778262612047502544315627487816", 15, RoundingMode.ROUND_FLOOR, "2.54250606510159"); + t("-0.99", 188, RoundingMode.ROUND_HALF_UP, "-2.6466524123622461977050606459342686009455526402847362494532304939720496026904579500629921371491090237370529131058463561407329454212693198283315081387104527957175699326161093958197682341514"); + t("-0.839050509635217011444270360895276942", 228, RoundingMode.ROUND_HALF_EVEN, "-1.21795704936130385631962494542356977067936935399974189438096102749427256397266187916658227349609843365673465722028562699709835096783864653593134242282802505320920517284118244296063864756540940504340850900132913926246353670954852"); + t("0.1466192868010720075349817406966274402677683457511446712802131462267743942318212540053135924201060473518701490421890859006244563601526837941527661256", 287, RoundingMode.ROUND_HALF_EVEN, "0.14768368532564711402494213463037701768191759827803850168186782193604720719015708712743954223752733158524998429426137852458472414766495891880038236534395643254561682940366809599598002916364125620840332914673709216743136572021518680177388027192234191630202329885357220548436336429074140695"); + t("0.7633374806958102030413743715384253532064892029119268282030519395", 206, RoundingMode.ROUND_DOWN, "1.0041642155179872943403547725421083834055437323943454959156599731416665977609674764526473655994641313895968605200676576407250453182984764160284761288351654323925444102935566025247571802592800202812490331785"); + t("0.87281814778656906038563301116674583687238", 243, RoundingMode.ROUND_UP, "1.34479081843481443741407786766373995381573153874510635485223412414173085352064411929655249326647793754890443512785266756368448226089651944475069887046770674810917469868559393788068633432881155913833789050887712403039367262948644349414529586968"); + t("-0.555429", 129, RoundingMode.ROUND_HALF_UP, "-0.626198449288212900520759114325139942913337921697428998949440635449650971361380373375064763452486973668863523470884757595838847037"); + t("0.14", 1, RoundingMode.ROUND_HALF_EVEN, "0.1"); + t("-0.64985605644863155539671287422250124455690800504", 116, RoundingMode.ROUND_UP, "-0.77504949367363640817393024164424989438893672787572092670043395033655295140534281875840833633690046845270303564654699"); + t("-0.76466323785395591765922667770906930985488728394648574267445255232047039910519978105980337041691229487590425362595019955579", 201, RoundingMode.ROUND_HALF_EVEN, "-1.00734881616766375031531233869630350165415813472759520804180626684990853455758099495225530160802948239947799323050526696126843427033829028329285079138437306956140458098730026097497785092814548200371929"); + t("-0.427487775669451096437861925146303810176873717836384459985779775576884096928996261595267679118040931368456875872675713713558818778793708835114783282", 108, RoundingMode.ROUND_HALF_UP, "-0.456818645148324031564018632840774980454891177680489171390572878558788652873515709481347301271508045045845829"); + t("-0.1449186558766952021695963330511391095458355385142811778330526484141810881714319771710501032712316624345024952853814497577100844028662551225361429525246849464437625218898388462098128724063164945492631740394269588579070768494031948899169515929218895271036513308621878614041712826642379361252957969386949", 24, RoundingMode.ROUND_CEIL, "-0.145946133412709795234519"); + t("0.779862475879042039888850851750295017780164503260766928024990716941707347165975", 92, RoundingMode.ROUND_HALF_DOWN, "1.0450194594329108881849800752453175506290408614411164127789995004594809451960070120371381517"); + t("-0.764735727488813238158555632279839911492150515062063521518660041587206676612672318411061908780670276038415821666418033946508832485156287566755494934248", 30, RoundingMode.ROUND_DOWN, "-1.00752339125773819029429459872"); + t("-0.820503035231161369520726", 206, RoundingMode.ROUND_CEIL, "-1.1583549182229621878286338766102930312827896179519421818592218409475980224526794559436476451646818133161861493110366621392631397193503361924450060701226312795388557021816180484052961946433619174880092415637"); + t("0.42332", 170, RoundingMode.ROUND_CEIL, "0.4517299649427408466710905267979672913300610253868037471412579002676780935170497379358317328102221834008985691372623103540530049001008743619766099225362482737964947529822"); + t("-0.7375163817994086591222131015595903817", 67, RoundingMode.ROUND_HALF_EVEN, "-0.9450116662694306114265573074731020386327193321709652051950058480289"); + t("0.8652230873", 245, RoundingMode.ROUND_DOWN, "1.3137575148706593901304963388391266145336962321475892708335731888878750074081564188302579767622392591362237811016145282883208568731529864792207599373284069758112890325301465795232099114089706313456628968963889201672822024453209465781162001343773"); + t("-0.98836027489467533191700478688", 268, RoundingMode.ROUND_UP, "-2.570320884975012816200775025709368813365394613635051706855610893984432915092801454176830211644317340087864012601513560521999111598145731347378133398144799525539839592222639027553457741459958058106463919953472108053106429068065700603590414775639736385930372899832054524"); + t("0.73845772095536", 85, RoundingMode.ROUND_HALF_EVEN, "0.9470788412512262710341160424156186231784972621364492579356177210560706312343071947251"); + t("-0.7293292866299409883424619086451120312472537388006907917527288152091744741168423992679558", 194, RoundingMode.ROUND_UP, "-0.92729295723621125577319032643333213145820891066148378432607304638719721073195873825258290314472102178780389184644868557611268933868055199316346364162175631871577356534537056752420348437998660756"); + t("-0.7825695594843049451949567108099841991728353774589643025605547344984096600696439931090097397939083540981320411873498098063243917", 136, RoundingMode.ROUND_UP, "-1.051966094712088483885316352627530023040346576726546234923873534993321686558968455669987955323026935563277516065271973846951509793315491"); + t("0.9453", 146, RoundingMode.ROUND_DOWN, "1.7856538881879179088307024477327789949832814978700375423527585017581381485273369983060172967007346218124201836953061387558647303087652183555544866"); + t("-0.5295637732515735037582543768898198892986517775820618045473690960623237409063607790056748442343992311343808235830037207321222640958759284845978450758280524961215915568661502310372506367493729826637925408203279223209686512809", 51, RoundingMode.ROUND_HALF_EVEN, "-0.589538725973457916061002294839590521825424159079444"); + t("0.62879986225426343421231713154966286208153326174058274909972264817569899981598384682505056916249271019851243559727314158485805416173122666445990250232023803919544632303107624488256013468", 36, RoundingMode.ROUND_HALF_UP, "0.739428684896556396617680568499766907"); + t("-0.99994571518980279237", 315, RoundingMode.ROUND_HALF_DOWN, "-5.25719307324314469485612969880101673464771169145455548344986373729320455157727194530039767751269969746612927764363740851600151756668241698971028256245105243266515435494695241955350531783470291286984083210663776119652426879206595698943456841454478078379178073480789966148330480113618479581097370656042464790854613395"); + t("-0.080545447109300540633021189155140834269439605952969677849115331394005681352457368462", 244, RoundingMode.ROUND_UP, "-0.08072030965862720354127629498093121901045349415894218086924986249034960931150782781180761608316758206540796194319997844542410413571498884550988733222344504567591619573378945397347721946341548030538906751041381009318184701202722097743780940423689"); + t("-0.807595871075189", 29, RoundingMode.ROUND_CEIL, "-1.1200774976111517282216578112"); + t("-0.195128689040577739417805093649105050558384768497085755947685963299574972", 231, RoundingMode.ROUND_FLOOR, "-0.197663372832086402908787580217820963548470529110985548603482311371914133445903124220879413733836274879352890343368861516150209135173383328579710409457605090039441651246184423877919115114161583428800490021154582060214945781547709651"); + t("0.5284003801102602736020726984983472745349121617", 171, RoundingMode.ROUND_DOWN, "0.587923300804689050428674555814450837920964515637269948977676454629999254425235672207639352366365043440640698562078147641238552251124228844586411605911419242257514148412269"); + t("0.44621957331", 68, RoundingMode.ROUND_HALF_EVEN, "0.47996998674230532343822415602905783515463939292829704565951044924618"); + t("-0.2709992415234693165496466406925361435352645157078738275166200840497289955", 11, RoundingMode.ROUND_HALF_DOWN, "-0.277941951"); + t("0.2151259080971012472474918833523397525360466868171849937426090838987121502751484365419058", 273, RoundingMode.ROUND_HALF_DOWN, "0.218539833015657286402623805109432540008141398197401053630902785355590781053495961933637546286892434368906056965035154965958349566138944731809703413917519920397823392532571452889900147217949425964640625026961752371525398436582510787539011266191139869195715997592922519766326"); + t("0.03833444449113811176822493642246705085242417526466218422461300011593276805903195", 35, RoundingMode.ROUND_CEIL, "0.038353238932716518643506901849066669"); + t("-0.248214312103589828621157909911917932845711593642117987443226149718448356047086412692489150912739795010660720240335333136927811826314183841524987817686699078760019626113626795536028808319476163747", 307, RoundingMode.ROUND_HALF_UP, "-0.2535089823976185582187804199723490902887822910787870392454723480514053721401668519188207476085407188932431397336883977833194469867130891388811304794109769512658917122514255829502000189528145803013718121395684794408146647635758203594491719337180163663815706028246536692074357449208097157287778301549631151891"); + t("0.4833770051411726347", 21, RoundingMode.ROUND_HALF_EVEN, "0.527381568067010908227"); + t("0.174056076488701359634", 104, RoundingMode.ROUND_UP, "0.17584644128249511878622033897963050748708406976957806626646527409247247717064133205096328182338226571197"); + t("-0.45784729315564950951934166871177490300440641557386031104", 235, RoundingMode.ROUND_HALF_DOWN, "-0.4945842305884620795925160277837682015967465333948669328810191732753766254816083108635615597999119403371868649035693128261045516753503443666005769946240834009457383867418354279211593310851737698046604706005399592855560777741771362366264"); + t("-0.872579302251402339806166761626318157367935736189754184939549082264328790406513330715103046402441092476406530843028368467662109333221806760186120461848939833626779310198", 287, RoundingMode.ROUND_HALF_EVEN, "-1.3437889364247025433148979243663750789194317297727807018451608437312075739136818383629515620667369350971034914140375629463601319019166943805935355204936406694972501475639488296016670915206501138020598890567973695828859294016055317494406170505800217456089733192775047237371329013986638659"); + t("0.1815737686665864014987016944388560671014233806", 89, RoundingMode.ROUND_HALF_UP, "0.18360963251673617585735514105475084817743414894544789363639051170088456975854393211631838"); + t("-0.37265646233716804722479097121318365014735", 20, RoundingMode.ROUND_FLOOR, "-0.39150443370064754527"); + t("0.0797", 253, RoundingMode.ROUND_CEIL, "0.07986939995414175208043904996845297385460176169003718353939128767528755481938934497755555209020339850238364350758547886230285042384986659961301325714649732629177151058324339115858308507429728549405136892851728167228522469101443134231829493416267582123405"); + t("-0.1089752190313487560903960981844967611", 252, RoundingMode.ROUND_HALF_DOWN, "-0.109409701076893642220104058960155361324700274686560960807249771106995187215844080992753719826712933129477615536055983708257302997211720560529849083931589160406353980591055978490033770426423393286285330382391246639425123267777577081284158212108941527682"); + */ + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalCbrtTests.cs b/DecimalSharp.Tests/BigDecimalCbrtTests.cs new file mode 100644 index 0000000..bb01908 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalCbrtTests.cs @@ -0,0 +1,1034 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalCbrt")] + public class BigDecimalCbrtTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Cbrt() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Cbrt().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", 40, RoundingMode.ROUND_HALF_UP, "0"); + t("-0", 40, RoundingMode.ROUND_HALF_UP, "-0"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "Infinity"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "-Infinity"); + t("1", 40, RoundingMode.ROUND_HALF_UP, "1"); + t("-1", 40, RoundingMode.ROUND_HALF_UP, "-1"); + t("8", 40, RoundingMode.ROUND_HALF_UP, "2"); + t("-8", 40, RoundingMode.ROUND_HALF_UP, "-2"); + + t("-4", 5, RoundingMode.ROUND_CEIL, "-1.5874"); + t("-0.8667", 7, RoundingMode.ROUND_UP, "-0.9534318"); + t("-0.0000000071", 9, RoundingMode.ROUND_CEIL, "-0.00192199734"); + t("-21791364.26687703933853824404550506158463693222", 3, RoundingMode.ROUND_DOWN, "-279"); + t("36", 9, RoundingMode.ROUND_HALF_EVEN, "3.30192725"); + t("0.898", 7, RoundingMode.ROUND_UP, "0.9647737"); + t("-94444444444444444.444444444444444444444444444444444444444444414404441444441", 8, RoundingMode.ROUND_CEIL, "-455399.06"); + t("-3782929120857330517139808", 5, RoundingMode.ROUND_CEIL, "-155810000"); + t("966666666692107298099458326175656566655348300467903965479870253722013788135743211111111111111111111.22222", 1, RoundingMode.ROUND_HALF_DOWN, "1000000000000000000000000000000000"); + t("16.84", 7, RoundingMode.ROUND_HALF_UP, "2.563189"); + t("-58918", 2, RoundingMode.ROUND_FLOOR, "-39"); + t("-74535634133038239268820777237286", 2, RoundingMode.ROUND_HALF_UP, "-42000000000"); + t("6888888888.66666666666602248", 3, RoundingMode.ROUND_HALF_DOWN, "1900"); + t("608785700000000000000000100000000000000000000.000000500020900040006", 1, RoundingMode.ROUND_HALF_DOWN, "800000000000000"); + t("-3834369", 8, RoundingMode.ROUND_UP, "-156.51813"); + t("4345752", 8, RoundingMode.ROUND_UP, "163.18804"); + t("5000300.5", 5, RoundingMode.ROUND_HALF_DOWN, "171"); + t("0.73", 7, RoundingMode.ROUND_FLOOR, "0.9004113"); + t("0.612", 20, RoundingMode.ROUND_FLOOR, "0.84901847487755466985"); + t("-26403122.886392512193592", 9, RoundingMode.ROUND_FLOOR, "-297.772851"); + t("-15047905.6442424463707664865226022703526330746497470178339129", 10, RoundingMode.ROUND_CEIL, "-246.8834739"); + t("-0.57216409476227961", 122, RoundingMode.ROUND_HALF_UP, "-0.83018242216788557900092187018458431268949382089457981268783675303907114542359515145805957769873268594828033331460924645988"); + t("-58892300900.0000037", 72, RoundingMode.ROUND_FLOOR, "-3890.62620353612987584901759020572729952315745798457018660549639374283766"); + t("4312692950776.434730495181946194732352621783", 134, RoundingMode.ROUND_UP, "16277.3179326290103123151730291347428666068760542903239801418389563715424057253795836596796134792716104557634024961949417454938847683"); + t("0.772144893677647945980591", 32, RoundingMode.ROUND_HALF_UP, "0.91741591091195652167447475342283"); + t("-6404156859301838811126951723297929248851328010128081790499875", 82, RoundingMode.ROUND_HALF_UP, "-185703741377679767357.3800976029196648819860800202650959861930855922060702625367479"); + t("82632936267840682945343488907.06731470799523118845064687431515", 138, RoundingMode.ROUND_HALF_EVEN, "4355630815.60590669653353707630763857376582544155292301618426362137145407016564135319408858966461324112682532653188194626242452174990441469"); + t("-61298.9118623440767849615617799359637", 197, RoundingMode.ROUND_CEIL, "-39.429165763027824633368109569426988335873352574747430934500984379971077138739905025020214349026555314495729845811145173351353942674905845843718751365519784088965133478757694847415073443325596801746"); + t("-2667296564625933848.771563268738963983215162122262769664228", 16, RoundingMode.ROUND_UP, "-1386831.726818274"); + t("-0.334827956215", 18, RoundingMode.ROUND_HALF_UP, "-0.694396042925351186"); + t("-99720206756351473857877956382713150380254708747259063563139776823977600150709529793618374286723970525922071298906643096473046848495659004519869163757701760515093579766384020476650579781490788310361655846842647878265152413279324940775571807902246099745918912445535151332", 222, RoundingMode.ROUND_UP, "-463725583930338667619983284372725899222416698496535412229926661119869463138884485967116667.268764679696065784024043219821875298578444546083384238930673115329612447425356818168403301703207667321878308803543383110193582598871"); + t("-7500005000000.0400000000000300010000000000000000000000000000000005000080000000000000000000000000000000000000000000000000000000000002", 148, RoundingMode.ROUND_FLOOR, "-19574.34255569632077437589146736430354513462358173952556661853843109637110903043841920141950812963359142265525718451865996670282229623898813004424264"); + t("-0.448468", 65, RoundingMode.ROUND_FLOOR, "-0.76543882436933301547484358146042454236821782800684597996385314496"); + t("4456480839.850118829380687717773702938945780108504222", 186, RoundingMode.ROUND_UP, "1645.62426023819366824168925970611179098042486858393864888187997539499903266584393283173483354076296462532577165369465744086271078047145002431391610101290550337528381582739390745330190718"); + t("-96609.9150016783612444151212219171469160528", 240, RoundingMode.ROUND_CEIL, "-45.8853342870476892493411403085005845531506513402973065908688567063670288324040964632169186092910604211131726914840870130664139857417136966852726525679016120128473243314724524836298854193278510304781073613018919609658048462067078117541267917"); + t("4685555525555555055595555555555555555555545555555555557555555.5555555555555555155555555555555", 248, RoundingMode.ROUND_DOWN, "167335093070845212053.23568655992334896377737501807442809961373434087576897330216500135950283334739701735651884253417447515894217902592534791090429673074268316351070024795424585615393609483094797289624124159380909320002173012536209191509994668942513"); + t("-166.616666666", 209, RoundingMode.ROUND_HALF_UP, "-5.5026617052342616148242191958679981633756294691968284245117501906609287423436017722548887408126098326860453334063765780606472030703630175042357147586923686464448738079927220693696480524411130124852775767369759"); + t("90000000000000990188336751810563895553131772327584661674356934574327131997430235171176535358829942834766892027903586810380716666666666.13894530889067032955500919787773607496418660983547640753478416765344978700918917680179444881557185725915289743352494311111111111", 154, RoundingMode.ROUND_HALF_EVEN, "448140474655718114369086092178601538485288241.3695491088028300586188927081853222791393481056106217377422579723430885965770967892400223712781827123169146742"); + t("-85690377176662769530000000", 172, RoundingMode.ROUND_HALF_EVEN, "-440870139.6162986343668488373525420672013683234193107109561329235272890252923129958712015571449424496445764927227011775235765025343956947502249567673085220140428475752341634"); + t("-770000", 315, RoundingMode.ROUND_HALF_UP, "-91.6565645433022286626092137070830558694163526764780961804072197329043071216124465836059153674866409019818795567376022473570999553232243320951491034642924310116859135403989828713296248110330728429307978818049273063638547762257276709121136983687240301319624468569985024000817994013321153096111049926913537599622929478"); + t("-751306536843521448000318938740388", 22, RoundingMode.ROUND_HALF_DOWN, "-90908757590.86052782049"); + + /* + t("-0.3818933", 2, RoundingMode.ROUND_HALF_EVEN, "-0.73"); + t("68", 1, RoundingMode.ROUND_HALF_DOWN, "4"); + t("-0.6", 3, RoundingMode.ROUND_UP, "-0.844"); + t("0.3119015270933389452638101937338812", 3, RoundingMode.ROUND_UP, "0.679"); + t("7366.201", 4, RoundingMode.ROUND_HALF_UP, "19.46"); + t("-22399399999999990999999999999999799909395999979999999999.9999", 8, RoundingMode.ROUND_UP, "-2818894400000000000"); + t("-80000000000000000000000000000000000000.000000000001", 10, RoundingMode.ROUND_HALF_DOWN, "-4308869380000"); + t("-6999959999999999.9399999999499999", 1, RoundingMode.ROUND_HALF_EVEN, "-200000"); + t("335178", 9, RoundingMode.ROUND_HALF_EVEN, "69.4637943"); + t("28888888888888886049", 1, RoundingMode.ROUND_HALF_UP, "3000000"); + t("500000000", 9, RoundingMode.ROUND_UP, "793.700526"); + t("769653863626666666666666666666", 1, RoundingMode.ROUND_HALF_DOWN, "9000000000"); + t("-0.844444", 3, RoundingMode.ROUND_CEIL, "-0.945"); + t("954465369366093944592507572598188976743757.28429627374490584", 7, RoundingMode.ROUND_CEIL, "98458550000000"); + t("-7345857896", 6, RoundingMode.ROUND_FLOOR, "-1943.94"); + t("0.83519222", 6, RoundingMode.ROUND_DOWN, "0.941735"); + t("26533.9217548", 2, RoundingMode.ROUND_HALF_DOWN, "30"); + t("-5000074333485388075063.444444549041878", 10, RoundingMode.ROUND_HALF_UP, "-17099844.21"); + t("0.68", 6, RoundingMode.ROUND_HALF_EVEN, "0.879366"); + t("0.0272", 8, RoundingMode.ROUND_DOWN, "0.30073891"); + t("-503454616900973495983778488.26", 3, RoundingMode.ROUND_UP, "-796000000"); + t("0.8297554395897924988305738463663690325842972721733405078270324064904499", 1, RoundingMode.ROUND_UP, "1"); + t("-1000000000000000000000.0000000000000000040000000000000100008", 6, RoundingMode.ROUND_HALF_EVEN, "-10000000"); + t("-4999999960368855400453841296666666666666666666.444444480304322222", 2, RoundingMode.ROUND_DOWN, "-1700000000000000"); + t("-0.237", 10, RoundingMode.ROUND_UP, "-0.6188462763"); + t("9219991.6", 3, RoundingMode.ROUND_HALF_UP, "210"); + t("-11.9", 1, RoundingMode.ROUND_HALF_DOWN, "-2"); + t("82", 4, RoundingMode.ROUND_HALF_EVEN, "4.344"); + t("-6", 5, RoundingMode.ROUND_DOWN, "-1.8171"); + t("6.407", 9, RoundingMode.ROUND_CEIL, "1.85731219"); + t("8805824325740535689820760681109868830.4500898323470577748", 7, RoundingMode.ROUND_UP, "2065016000000"); + t("-40.4", 3, RoundingMode.ROUND_UP, "-3.44"); + t("975435.161933643", 2, RoundingMode.ROUND_DOWN, "99"); + t("-207738428807874275276125610588522932638016305909263402564", 8, RoundingMode.ROUND_HALF_DOWN, "-5922507400000000000"); + t("1625199339405966916842602870069151508760", 3, RoundingMode.ROUND_HALF_DOWN, "11800000000000"); + t("67777777777777777.1111111111111185777", 4, RoundingMode.ROUND_FLOOR, "407700"); + t("-0.00000015101129203376903282", 5, RoundingMode.ROUND_CEIL, "-0.0053252"); + t("0.7244525383", 2, RoundingMode.ROUND_DOWN, "0.89"); + t("-77.732", 8, RoundingMode.ROUND_HALF_UP, "-4.2677596"); + t("-0.55648377779113352938", 1, RoundingMode.ROUND_HALF_UP, "-0.8"); + t("2", 8, RoundingMode.ROUND_CEIL, "1.2599211"); + t("90.5", 4, RoundingMode.ROUND_HALF_DOWN, "4.49"); + t("-0.97550590975788566729878137257533567618255023", 3, RoundingMode.ROUND_CEIL, "-0.991"); + t("-333995555555", 2, RoundingMode.ROUND_UP, "-7000"); + t("0.50338", 8, RoundingMode.ROUND_UP, "0.79548499"); + t("-5", 4, RoundingMode.ROUND_DOWN, "-1.709"); + t("-0.7351794040135875032087894175170651566358350521", 9, RoundingMode.ROUND_CEIL, "-0.902535813"); + t("-62.1", 2, RoundingMode.ROUND_HALF_DOWN, "-4"); + t("10148322508989558.1791419395907316907543", 4, RoundingMode.ROUND_CEIL, "216600"); + t("9666666557788888888888888888888.2638", 4, RoundingMode.ROUND_FLOOR, "21300000000"); + t("9964904728277204840222222222222222222", 9, RoundingMode.ROUND_HALF_UP, "2151911390000"); + t("-1255.559", 4, RoundingMode.ROUND_DOWN, "-10.78"); + t("387", 6, RoundingMode.ROUND_UP, "7.28737"); + t("-0.00000207705325742303133289292195931068216667127350664", 4, RoundingMode.ROUND_UP, "-0.01276"); + t("9099999979999999999999999.9045", 4, RoundingMode.ROUND_UP, "208800000"); + t("-506706588188819442960350735312948540", 7, RoundingMode.ROUND_HALF_UP, "-797233500000"); + t("-0.3230010071", 8, RoundingMode.ROUND_HALF_UP, "-0.68612192"); + t("300000.0004", 10, RoundingMode.ROUND_HALF_DOWN, "66.94329504"); + t("-3744.444444", 7, RoundingMode.ROUND_FLOOR, "-15.52849"); + t("-8", 9, RoundingMode.ROUND_FLOOR, "-2"); + t("-0.00000006502345078780795619440224", 4, RoundingMode.ROUND_HALF_DOWN, "-0.004021"); + t("8094000", 6, RoundingMode.ROUND_HALF_DOWN, "200.78"); + t("22.5", 8, RoundingMode.ROUND_UP, "2.8231081"); + t("-401643003658", 9, RoundingMode.ROUND_CEIL, "-7378.13734"); + t("-363.85", 5, RoundingMode.ROUND_CEIL, "-7.139"); + t("0.0086", 2, RoundingMode.ROUND_DOWN, "0.2"); + t("0.73", 6, RoundingMode.ROUND_DOWN, "0.900411"); + t("219930000000000000.77777777777999999", 3, RoundingMode.ROUND_HALF_EVEN, "604000"); + t("1488.68878838888888888986", 1, RoundingMode.ROUND_UP, "20"); + t("3400000000", 6, RoundingMode.ROUND_HALF_DOWN, "1503.69"); + t("-0.5", 6, RoundingMode.ROUND_HALF_DOWN, "-0.793701"); + t("18200000", 4, RoundingMode.ROUND_DOWN, "263"); + t("-0.70678", 6, RoundingMode.ROUND_CEIL, "-0.890761"); + t("-344", 6, RoundingMode.ROUND_HALF_DOWN, "-7.0068"); + t("-62", 1, RoundingMode.ROUND_CEIL, "-3"); + t("0.927", 1, RoundingMode.ROUND_CEIL, "1"); + t("810.8", 5, RoundingMode.ROUND_UP, "9.3248"); + t("-1.77777777755555555552568", 7, RoundingMode.ROUND_CEIL, "-1.211413"); + t("-9", 5, RoundingMode.ROUND_UP, "-2.0801"); + t("0.9", 5, RoundingMode.ROUND_UP, "0.96549"); + t("-783333333333332333333333339333337.9", 2, RoundingMode.ROUND_FLOOR, "-93000000000"); + t("70000000000000000000000000000000000000000000000000000000000000000000000000000", 7, RoundingMode.ROUND_HALF_EVEN, "41212850000000000000000000"); + t("-362515477364205", 5, RoundingMode.ROUND_FLOOR, "-71304"); + t("-7222222222299183", 9, RoundingMode.ROUND_HALF_DOWN, "-193296.333"); + t("2688888888889888888.8888888888888888888888888", 6, RoundingMode.ROUND_HALF_EVEN, "1390560"); + t("-3349552733416603170933246099", 4, RoundingMode.ROUND_HALF_UP, "-1496000000"); + t("-67803227653503", 1, RoundingMode.ROUND_FLOOR, "-50000"); + t("742896078807444528609947593057", 8, RoundingMode.ROUND_HALF_EVEN, "9056826000"); + t("553800000", 2, RoundingMode.ROUND_HALF_DOWN, "820"); + t("1", 8, RoundingMode.ROUND_HALF_DOWN, "1"); + t("0.7743", 5, RoundingMode.ROUND_HALF_DOWN, "0.91827"); + t("-0.6", 3, RoundingMode.ROUND_HALF_UP, "-0.843"); + t("686626666666696.62666666666661666666666666", 6, RoundingMode.ROUND_DOWN, "88221.3"); + t("85555555555555555528133143344444444444444", 1, RoundingMode.ROUND_HALF_DOWN, "40000000000000"); + t("0.00000773", 3, RoundingMode.ROUND_HALF_EVEN, "0.0198"); + t("39300000000000700000040000000900800000000", 1, RoundingMode.ROUND_DOWN, "30000000000000"); + t("-4999999999999914118528055233382328193673510034743156443300333333", 2, RoundingMode.ROUND_DOWN, "-1700000000000000000000"); + t("-95999.64199", 4, RoundingMode.ROUND_HALF_DOWN, "-45.79"); + t("34.5593", 1, RoundingMode.ROUND_DOWN, "3"); + t("-54589", 5, RoundingMode.ROUND_HALF_EVEN, "-37.935"); + t("-7", 8, RoundingMode.ROUND_CEIL, "-1.9129311"); + t("-77175.27642727049456729999", 10, RoundingMode.ROUND_FLOOR, "-42.57546481"); + t("-8.7263794638868921828943152093844917", 4, RoundingMode.ROUND_HALF_EVEN, "-2.059"); + t("69.1616", 4, RoundingMode.ROUND_UP, "4.105"); + t("0.91352685034512351562995274", 3, RoundingMode.ROUND_HALF_EVEN, "0.97"); + t("10", 1, RoundingMode.ROUND_DOWN, "2"); + t("171093357128829267501683724199412", 1, RoundingMode.ROUND_HALF_DOWN, "60000000000"); + t("-66", 2, RoundingMode.ROUND_HALF_EVEN, "-4"); + t("-2419869044651283665417167346.02866228", 6, RoundingMode.ROUND_UP, "-1342560000"); + t("-87399799399969997.99", 3, RoundingMode.ROUND_UP, "-444000"); + t("-60.02", 1, RoundingMode.ROUND_CEIL, "-3"); + t("9.5285008666", 8, RoundingMode.ROUND_HALF_DOWN, "2.1200277"); + t("-0.0740010436456", 4, RoundingMode.ROUND_DOWN, "-0.4198"); + t("617", 1, RoundingMode.ROUND_FLOOR, "8"); + t("-379171991133333333333333333333.222222222222222222225548", 6, RoundingMode.ROUND_HALF_EVEN, "-7237890000"); + t("-78869.48", 1, RoundingMode.ROUND_UP, "-50"); + t("4.8497061095902842395", 5, RoundingMode.ROUND_HALF_EVEN, "1.6927"); + t("-7986", 2, RoundingMode.ROUND_HALF_EVEN, "-20"); + t("3", 2, RoundingMode.ROUND_CEIL, "1.5"); + t("68925.04429", 7, RoundingMode.ROUND_CEIL, "41.00081"); + t("-5853333333333333333333333333.33333333333333333333333333333", 2, RoundingMode.ROUND_HALF_EVEN, "-1800000000"); + t("3434444444444111.11111144", 8, RoundingMode.ROUND_FLOOR, "150875.53"); + t("52532642", 1, RoundingMode.ROUND_HALF_EVEN, "400"); + t("43", 10, RoundingMode.ROUND_HALF_EVEN, "3.50339806"); + t("0.5286", 4, RoundingMode.ROUND_HALF_EVEN, "0.8086"); + t("0.177843759307169792769565570223542845980290358200654777715307", 4, RoundingMode.ROUND_HALF_DOWN, "0.5624"); + t("-7", 3, RoundingMode.ROUND_HALF_DOWN, "-1.91"); + t("0.7", 1, RoundingMode.ROUND_DOWN, "0.8"); + t("8454", 9, RoundingMode.ROUND_UP, "20.371394"); + t("635.224", 8, RoundingMode.ROUND_UP, "8.5962486"); + t("33333333333333333333333333.333333333333333333333333333333323333333333333333333333353333333333", 1, RoundingMode.ROUND_HALF_EVEN, "300000000"); + t("4.6748", 8, RoundingMode.ROUND_FLOOR, "1.6720695"); + t("-9000000000", 7, RoundingMode.ROUND_HALF_EVEN, "-2080.084"); + t("376132380430878165586552708948486621904851168441160549361", 3, RoundingMode.ROUND_HALF_EVEN, "7220000000000000000"); + t("-5.5", 10, RoundingMode.ROUND_HALF_EVEN, "-1.765174168"); + t("-0.03495634077066065579569482530413804639314179994642585487432131219689628995275", 5, RoundingMode.ROUND_DOWN, "-0.32697"); + t("0.00000032", 1, RoundingMode.ROUND_DOWN, "0.006"); + t("-9", 1, RoundingMode.ROUND_DOWN, "-2"); + t("8.66454", 8, RoundingMode.ROUND_HALF_DOWN, "2.053912"); + t("-48635412637237223941782255406026508", 9, RoundingMode.ROUND_HALF_DOWN, "-365020735000"); + t("0.047892279290449515642827450578515631977", 9, RoundingMode.ROUND_DOWN, "0.363152051"); + t("-9333333333333333385888888888", 6, RoundingMode.ROUND_DOWN, "-2105450000"); + t("-146442000000", 9, RoundingMode.ROUND_CEIL, "-5270.9458"); + t("-0.00000136217448949208241555690431", 11, RoundingMode.ROUND_HALF_UP, "-0.011085218236"); + t("-7.599", 6, RoundingMode.ROUND_UP, "-1.96601"); + t("157777776717777873.777", 15, RoundingMode.ROUND_FLOOR, "540358.445963008"); + t("-0.24", 10, RoundingMode.ROUND_UP, "-0.6214465012"); + t("-339720971392858", 3, RoundingMode.ROUND_CEIL, "-69700"); + t("-7.17", 10, RoundingMode.ROUND_HALF_EVEN, "-1.928293121"); + t("91280925.40638118646515161604082790722332930532234", 20, RoundingMode.ROUND_UP, "450.25652107879028395"); + t("-0.3", 18, RoundingMode.ROUND_DOWN, "-0.669432950082169521"); + t("-96892992", 20, RoundingMode.ROUND_UP, "-459.30106837422135622"); + t("79999999999141058824444444444444444", 2, RoundingMode.ROUND_HALF_DOWN, "430000000000"); + t("0.27658", 18, RoundingMode.ROUND_CEIL, "0.651538760691784225"); + t("73109", 16, RoundingMode.ROUND_CEIL, "41.81418289652367"); + t("976546316084487560536", 8, RoundingMode.ROUND_HALF_DOWN, "9921201.8"); + t("-443507770096348001165816", 14, RoundingMode.ROUND_HALF_EVEN, "-76260633.907192"); + t("-48.2249", 6, RoundingMode.ROUND_FLOOR, "-3.63991"); + t("48967159548368479836338889353038416287", 5, RoundingMode.ROUND_UP, "3658500000000"); + t("-846422028274222.22", 2, RoundingMode.ROUND_DOWN, "-94000"); + t("277564088680007693371731571", 6, RoundingMode.ROUND_HALF_UP, "652311000"); + t("-6361119110.3", 18, RoundingMode.ROUND_HALF_EVEN, "-1852.86812094016191"); + t("75756535.389311", 19, RoundingMode.ROUND_HALF_UP, "423.1295617915019781"); + t("0.7", 20, RoundingMode.ROUND_FLOOR, "0.88790400174260070842"); + t("8", 3, RoundingMode.ROUND_HALF_DOWN, "2"); + t("782400958507404", 15, RoundingMode.ROUND_FLOOR, "92145.9937257919"); + t("-227511", 6, RoundingMode.ROUND_FLOOR, "-61.0475"); + t("75555555555555140217373626015737777777777777", 11, RoundingMode.ROUND_DOWN, "422755047020000"); + t("-2855555555555555555555", 14, RoundingMode.ROUND_CEIL, "-14187205.885874"); + t("-724.06", 4, RoundingMode.ROUND_CEIL, "-8.979"); + t("0.934477", 14, RoundingMode.ROUND_FLOOR, "0.97766380912616"); + t("-0.00000000918315", 3, RoundingMode.ROUND_CEIL, "-0.00209"); + t("64471191009935131000307697", 4, RoundingMode.ROUND_HALF_DOWN, "401000000"); + t("-5940", 20, RoundingMode.ROUND_CEIL, "-18.110432210393057671"); + t("-2290", 1, RoundingMode.ROUND_HALF_EVEN, "-10"); + t("22384252102.3559696", 3, RoundingMode.ROUND_CEIL, "2820"); + t("-2", 18, RoundingMode.ROUND_HALF_UP, "-1.25992104989487316"); + t("-44799.8999995099999", 18, RoundingMode.ROUND_FLOOR, "-35.5161336438405426"); + t("26933.31001317073204642547748", 18, RoundingMode.ROUND_DOWN, "29.9752796406007609"); + t("-2", 1, RoundingMode.ROUND_FLOOR, "-2"); + t("-38888888888888888888888888888888888888888888.8888888", 18, RoundingMode.ROUND_HALF_UP, "-338798785604951.143"); + t("0.9012849960174826221457183472415269", 6, RoundingMode.ROUND_FLOOR, "0.965948"); + t("-0.689027527414476475", 6, RoundingMode.ROUND_DOWN, "-0.88324"); + t("0.4996683993951343861785828972876376718966803829355326206", 15, RoundingMode.ROUND_FLOOR, "0.793525026131476"); + t("0.1", 4, RoundingMode.ROUND_HALF_EVEN, "0.4642"); + t("201101732983371570150340396098773058768604756", 20, RoundingMode.ROUND_FLOOR, "585875410795702.86759"); + t("0.961025299904131966523108898", 10, RoundingMode.ROUND_FLOOR, "0.9868359001"); + t("0.09686204958039", 14, RoundingMode.ROUND_HALF_UP, "0.45925217113478"); + t("-755555555555555555517531112888888888888888", 3, RoundingMode.ROUND_DOWN, "-91000000000000"); + t("-63", 20, RoundingMode.ROUND_HALF_UP, "-3.9790572078963918597"); + t("71048553160427606692477034809930243829", 11, RoundingMode.ROUND_CEIL, "4141761430100"); + t("-44161531326452420", 4, RoundingMode.ROUND_CEIL, "-353400"); + t("6339.43", 5, RoundingMode.ROUND_HALF_UP, "18.508"); + t("7987752440751033707833300", 9, RoundingMode.ROUND_HALF_DOWN, "199897885"); + t("0.76102372474037253", 12, RoundingMode.ROUND_FLOOR, "0.91299009379"); + t("-4210797338.941679528747", 4, RoundingMode.ROUND_UP, "-1615"); + t("-33333333398660255034462752266861136128802.265233333333333", 2, RoundingMode.ROUND_UP, "-33000000000000"); + t("-60", 12, RoundingMode.ROUND_FLOOR, "-3.91486764117"); + t("-2", 14, RoundingMode.ROUND_HALF_EVEN, "-1.2599210498949"); + t("3", 6, RoundingMode.ROUND_UP, "1.44225"); + t("-1000000007000020000000000060000000000000000000000010000.000000000000000090065", 7, RoundingMode.ROUND_HALF_DOWN, "-1000000000000000000"); + t("-24360000", 9, RoundingMode.ROUND_HALF_UP, "-289.885012"); + t("-0.11", 17, RoundingMode.ROUND_FLOOR, "-0.4791419857062784"); + t("-8735875.5555", 15, RoundingMode.ROUND_CEIL, "-205.953327437355"); + t("85999999999999999.97", 20, RoundingMode.ROUND_HALF_UP, "441400.49624421037719"); + t("5680.44914345444444944", 17, RoundingMode.ROUND_UP, "17.842713085635244"); + t("-6.04", 2, RoundingMode.ROUND_UP, "-1.9"); + t("5363393723934555300333716221047.39887467952", 15, RoundingMode.ROUND_UP, "17504373028.4339"); + t("0.00000001", 4, RoundingMode.ROUND_HALF_EVEN, "0.002154"); + t("8829612121.2662376719993", 15, RoundingMode.ROUND_FLOOR, "2066.87339611447"); + t("-94.6", 16, RoundingMode.ROUND_HALF_EVEN, "-4.556489552254712"); + t("-0.6", 2, RoundingMode.ROUND_HALF_DOWN, "-0.84"); + t("32222222225382815091210706697714788888888", 18, RoundingMode.ROUND_HALF_EVEN, "31821342365573.8915"); + t("-0.59929999829", 3, RoundingMode.ROUND_CEIL, "-0.843"); + t("-3", 1, RoundingMode.ROUND_HALF_EVEN, "-1"); + t("-82379807156556933.975361290675288700595834832857115", 16, RoundingMode.ROUND_HALF_UP, "-435117.873823822"); + t("781094765917092", 9, RoundingMode.ROUND_UP, "92094.687"); + t("100", 5, RoundingMode.ROUND_HALF_UP, "4.6416"); + t("7.5", 4, RoundingMode.ROUND_CEIL, "1.958"); + t("56666666666811", 8, RoundingMode.ROUND_CEIL, "38409.846"); + t("-0.7", 20, RoundingMode.ROUND_CEIL, "-0.88790400174260070842"); + t("0.66735078430658921245869653996855224044707", 4, RoundingMode.ROUND_HALF_EVEN, "0.8739"); + t("5000000.0000007", 5, RoundingMode.ROUND_DOWN, "170.99"); + t("-0.0000000032", 12, RoundingMode.ROUND_CEIL, "-0.00147361259945"); + t("-0.62", 4, RoundingMode.ROUND_HALF_UP, "-0.8527"); + t("15900070.00004", 8, RoundingMode.ROUND_HALF_UP, "251.45851"); + t("-45555555555559008066979.377298", 16, RoundingMode.ROUND_UP, "-35714708.98969334"); + t("-87585451621", 11, RoundingMode.ROUND_HALF_DOWN, "-4440.9647354"); + t("-6", 19, RoundingMode.ROUND_CEIL, "-1.817120592832139658"); + t("56404825428", 2, RoundingMode.ROUND_HALF_EVEN, "3800"); + t("75309002680", 6, RoundingMode.ROUND_HALF_EVEN, "4222.95"); + t("47.9230999999", 18, RoundingMode.ROUND_CEIL, "3.6322993625605057"); + t("-0.214831165", 2, RoundingMode.ROUND_DOWN, "-0.59"); + t("-8791000005000060.07007000300000000006", 19, RoundingMode.ROUND_UP, "-206385.6163875007765"); + t("-72", 6, RoundingMode.ROUND_CEIL, "-4.16016"); + t("-1135983465892976189803592754542843333333333", 13, RoundingMode.ROUND_DOWN, "-104341562701500"); + t("-70007400004000.200080000005000002", 19, RoundingMode.ROUND_HALF_EVEN, "-41214.30521013758219"); + t("-837893.2120728642402941", 8, RoundingMode.ROUND_FLOOR, "-94.274932"); + t("0.077053232660958557020664089663", 5, RoundingMode.ROUND_HALF_EVEN, "0.42553"); + t("594.9668965", 5, RoundingMode.ROUND_HALF_UP, "8.4107"); + t("0.18", 5, RoundingMode.ROUND_DOWN, "0.56462"); + t("724.6167", 20, RoundingMode.ROUND_HALF_UP, "8.981925453892595145"); + t("0.74", 20, RoundingMode.ROUND_CEIL, "0.90450416965102748017"); + t("52233.222222747757678356196", 14, RoundingMode.ROUND_HALF_EVEN, "37.380829924889"); + t("0.122894333403145798064053367879002109205419623904", 5, RoundingMode.ROUND_HALF_DOWN, "0.49718"); + t("8222222222222222222222222222222.22", 20, RoundingMode.ROUND_CEIL, "20183496488.370349058"); + t("0.22", 3, RoundingMode.ROUND_CEIL, "0.604"); + t("6.237", 11, RoundingMode.ROUND_FLOOR, "1.8407377318"); + t("-8479616330832523", 7, RoundingMode.ROUND_DOWN, "-203919.4"); + t("-97999999999999.999999999990197", 20, RoundingMode.ROUND_FLOOR, "-46104.362920584465697"); + t("42", 12, RoundingMode.ROUND_HALF_UP, "3.47602664489"); + t("209208253.67494313", 15, RoundingMode.ROUND_UP, "593.644257958926"); + t("-1", 13, RoundingMode.ROUND_UP, "-1"); + t("62222222222222229096992166666666666666666.99995324262866624345593", 16, RoundingMode.ROUND_HALF_DOWN, "39626146351754.2"); + t("7617468.88888883488", 6, RoundingMode.ROUND_UP, "196.761"); + t("-422220000000000000.2222212901131", 4, RoundingMode.ROUND_DOWN, "-750200"); + t("343368297564095719915273411", 8, RoundingMode.ROUND_HALF_DOWN, "700250450"); + t("6853.2", 14, RoundingMode.ROUND_FLOOR, "18.994642995749"); + t("-9400000000000000000.3", 1, RoundingMode.ROUND_HALF_DOWN, "-2000000"); + t("-0.103968979964", 7, RoundingMode.ROUND_FLOOR, "-0.4702202"); + t("1213208415", 13, RoundingMode.ROUND_HALF_DOWN, "1066.543249664"); + t("-554352693.2852517", 15, RoundingMode.ROUND_FLOOR, "-821.476960039875"); + t("0.5", 6, RoundingMode.ROUND_DOWN, "0.7937"); + t("-581125607535033826", 6, RoundingMode.ROUND_HALF_DOWN, "-834494"); + t("-0.68244239366854656991", 11, RoundingMode.ROUND_HALF_UP, "-0.88041749889"); + t("-53", 13, RoundingMode.ROUND_HALF_DOWN, "-3.756285754221"); + t("-886", 7, RoundingMode.ROUND_CEIL, "-9.604569"); + t("0.0000003766", 9, RoundingMode.ROUND_HALF_UP, "0.0072214893"); + t("9.2682889565720055831826542", 8, RoundingMode.ROUND_FLOOR, "2.1005507"); + t("-87", 18, RoundingMode.ROUND_HALF_DOWN, "-4.43104762169363416"); + t("-6777777777777777772810830980831666251088888888888888888888", 1, RoundingMode.ROUND_HALF_DOWN, "-20000000000000000000"); + t("8222222222222228239250491378488487777", 16, RoundingMode.ROUND_HALF_UP, "2018349648837.035"); + t("714322.8", 9, RoundingMode.ROUND_HALF_EVEN, "89.3919005"); + t("-56728411622164771011022834983525569666", 9, RoundingMode.ROUND_DOWN, "-3842379060000"); + t("-53704732137158", 20, RoundingMode.ROUND_DOWN, "-37728.614031772919273"); + t("0.38465316656552994163628811014607061649030905", 12, RoundingMode.ROUND_CEIL, "0.727260115643"); + t("-9035000.80713", 20, RoundingMode.ROUND_HALF_EVEN, "-208.27768022208090884"); + t("-625", 14, RoundingMode.ROUND_HALF_UP, "-8.5498797333835"); + t("-7247627357", 12, RoundingMode.ROUND_HALF_DOWN, "-1935.22716605"); + t("81111111111111111225481", 14, RoundingMode.ROUND_HALF_DOWN, "43287262.014676"); + t("-0.2", 15, RoundingMode.ROUND_HALF_EVEN, "-0.584803547642573"); + t("-0.132558", 1, RoundingMode.ROUND_HALF_UP, "-0.5"); + t("0.9", 3, RoundingMode.ROUND_HALF_DOWN, "0.965"); + t("3755555.59391", 11, RoundingMode.ROUND_HALF_DOWN, "155.43830976"); + t("0.7", 5, RoundingMode.ROUND_HALF_DOWN, "0.8879"); + t("30", 19, RoundingMode.ROUND_HALF_EVEN, "3.107232505953858867"); + t("2", 6, RoundingMode.ROUND_UP, "1.25993"); + t("0.3506438836338320446526314426143055702196015101566868", 16, RoundingMode.ROUND_DOWN, "0.705161764689684"); + t("19716567777777.777777777", 17, RoundingMode.ROUND_CEIL, "27015.34006102092"); + t("2.38", 9, RoundingMode.ROUND_CEIL, "1.33513645"); + t("-0.4979584110806576577783804498400335989992388566529", 16, RoundingMode.ROUND_CEIL, "-0.7926187788573717"); + t("-3", 6, RoundingMode.ROUND_HALF_EVEN, "-1.44225"); + t("22797.87", 14, RoundingMode.ROUND_FLOOR, "28.355115737103"); + t("-5472878560769", 11, RoundingMode.ROUND_DOWN, "-17622.679269"); + t("-0.73260018423433424", 12, RoundingMode.ROUND_DOWN, "-0.901479125065"); + t("-8097160207254836569", 20, RoundingMode.ROUND_HALF_EVEN, "-2008064.1251795318772"); + t("480", 15, RoundingMode.ROUND_CEIL, "7.82973528233773"); + t("0.526872495", 19, RoundingMode.ROUND_HALF_UP, "0.8076722761506822232"); + t("-646925675.8", 4, RoundingMode.ROUND_HALF_DOWN, "-864.9"); + t("-2862688482708367427751267", 20, RoundingMode.ROUND_HALF_EVEN, "-141990088.62099197018"); + t("-30", 7, RoundingMode.ROUND_CEIL, "-3.107232"); + t("-400.000000000000002020000000000000000000000000000000000000001", 12, RoundingMode.ROUND_UP, "-7.36806299729"); + t("-0.8", 10, RoundingMode.ROUND_UP, "-0.9283177668"); + t("450919013", 18, RoundingMode.ROUND_CEIL, "766.830743101908863"); + t("-0.84596", 18, RoundingMode.ROUND_UP, "-0.945765083127084699"); + t("154766705", 15, RoundingMode.ROUND_HALF_DOWN, "536.898897516556"); + t("30605216213361952", 36, RoundingMode.ROUND_HALF_DOWN, "312798.852116888449424430123851279558"); + t("1555.55555555555545555555555455555555555555555555555525555555555555555555555558555555556", 34, RoundingMode.ROUND_HALF_UP, "11.58675548295483237417859990230964"); + t("74326901309076267608214048.527011853596990954896772624192229777", 5, RoundingMode.ROUND_UP, "420460000"); + t("-4773844", 10, RoundingMode.ROUND_HALF_UP, "-168.3795745"); + t("-23101344770296", 5, RoundingMode.ROUND_DOWN, "-28480"); + t("-0.05084548815", 34, RoundingMode.ROUND_HALF_EVEN, "-0.3704680906661542489843134278806554"); + t("3.7614", 7, RoundingMode.ROUND_UP, "1.555189"); + t("5322396392259788706886367688487", 3, RoundingMode.ROUND_DOWN, "17400000000"); + t("37555555555555555.555555555555555155555555555555555555555555558555555555565555555355555555553", 33, RoundingMode.ROUND_UP, "334881.685568918487704853146112136"); + t("-8111111111111111.8888888654603333333", 19, RoundingMode.ROUND_CEIL, "-200921.6720049913782"); + t("0.0000002476650421760215078", 19, RoundingMode.ROUND_HALF_UP, "0.006279931455024406975"); + t("7083.6554426791864086812788154", 3, RoundingMode.ROUND_CEIL, "19.3"); + t("40000", 11, RoundingMode.ROUND_HALF_DOWN, "34.199518934"); + t("19999961740711.00000000000000000063228622222222222", 18, RoundingMode.ROUND_HALF_DOWN, "27144.1588573233521"); + t("-7000000000", 6, RoundingMode.ROUND_FLOOR, "-1912.94"); + t("-1061327724.0871", 22, RoundingMode.ROUND_HALF_EVEN, "-1020.038356909205102836"); + t("-69999969999999919999999999.99999999191997", 25, RoundingMode.ROUND_HALF_EVEN, "-412128471.1053428311686475"); + t("341186.95443", 23, RoundingMode.ROUND_CEIL, "69.876445613741915029436"); + t("-0.35764956557712666144321146208892", 29, RoundingMode.ROUND_DOWN, "-0.7098270858273914280961516879"); + t("-8834.7174015697601489246943709956659963875961204915069431458569263396777777777777777777", 38, RoundingMode.ROUND_HALF_EVEN, "-20.672716746508325630647525479849959468"); + t("7777077777777777777777.7777777777777777775", 13, RoundingMode.ROUND_UP, "19812478.76585"); + t("-82.11111111112222222221734400130859529345977330105702479024583936", 26, RoundingMode.ROUND_FLOOR, "-4.3464428772252284862039557"); + t("22222222224120423260860177044984487412450415274556", 19, RoundingMode.ROUND_UP, "28114422177525477.15"); + t("8222222428821702", 19, RoundingMode.ROUND_HALF_EVEN, "201834.9665742034256"); + t("-270758006228512", 5, RoundingMode.ROUND_HALF_DOWN, "-64693"); + t("595", 26, RoundingMode.ROUND_FLOOR, "8.4108325852102816916454812"); + t("60.2115396725866805858", 17, RoundingMode.ROUND_CEIL, "3.9194630770706516"); + t("-0.7078847495674886595066191985885874", 10, RoundingMode.ROUND_HALF_DOWN, "-0.8912253246"); + t("-5281727033113027333441806877059765049771299284236932239188", 37, RoundingMode.ROUND_FLOOR, "-17415073731603190024.25750111029804408"); + t("-0.919677652526979329", 35, RoundingMode.ROUND_HALF_UP, "-0.97247522180821600969345301406017031"); + t("-578.44444446444444444444444", 31, RoundingMode.ROUND_HALF_DOWN, "-8.332088703101613942194942942097"); + t("-2", 1, RoundingMode.ROUND_HALF_UP, "-1"); + t("-35912.232981326391384944656947376265743", 5, RoundingMode.ROUND_FLOOR, "-32.993"); + t("3", 35, RoundingMode.ROUND_DOWN, "1.4422495703074083823216383107801095"); + t("-77779.3086", 15, RoundingMode.ROUND_HALF_UP, "-42.6862522128472"); + t("0.96", 20, RoundingMode.ROUND_HALF_DOWN, "0.9864848297321880406"); + t("-0.902282756816", 22, RoundingMode.ROUND_UP, "-0.9663049833863257348939"); + t("0.00000000421892713", 33, RoundingMode.ROUND_FLOOR, "0.00161584863143063240306254152369019"); + t("-0.0000000608581734", 26, RoundingMode.ROUND_HALF_EVEN, "-0.0039334439958970308121838055"); + t("-652823343.33303", 31, RoundingMode.ROUND_CEIL, "-867.4914940000540132948097524534"); + t("0.3829", 38, RoundingMode.ROUND_UP, "0.72615353424989733378322712453946820726"); + t("-0.477", 2, RoundingMode.ROUND_CEIL, "-0.78"); + t("-0.57881678935624", 3, RoundingMode.ROUND_HALF_DOWN, "-0.833"); + t("0.0007", 25, RoundingMode.ROUND_DOWN, "0.08879040017426007084292689"); + t("-69827833", 35, RoundingMode.ROUND_DOWN, "-411.79037196117556474135197450407264"); + t("-0.7468115066925299289222871310934272372128897", 33, RoundingMode.ROUND_DOWN, "-0.907270939339107104117039358656917"); + t("-9", 32, RoundingMode.ROUND_HALF_EVEN, "-2.0800838230519041145300568243579"); + t("-978984215987534204444444444444.11111111111111827548789862991403896399522138613997741916404317335", 8, RoundingMode.ROUND_DOWN, "-9929450800"); + t("0.25241229338437439177416092", 21, RoundingMode.ROUND_HALF_EVEN, "0.631980242085462024007"); + t("0.738", 26, RoundingMode.ROUND_UP, "0.90368856580957908025489727"); + t("-0.5", 31, RoundingMode.ROUND_HALF_UP, "-0.7937005259840997373758528196362"); + t("-8222222222222.000002", 23, RoundingMode.ROUND_FLOOR, "-20183.496488370167226227"); + t("-0.3", 37, RoundingMode.ROUND_HALF_UP, "-0.6694329500821695218826593246399307933"); + t("-8000000009822816382948888", 18, RoundingMode.ROUND_FLOOR, "-200000000.081856804"); + t("-50000200000000.0000500406", 30, RoundingMode.ROUND_CEIL, "-36840.3641067583541941421169928"); + t("-922627958844572906787533678888888888888.1111111111111111888888", 24, RoundingMode.ROUND_HALF_UP, "-9735140050656.69041390969"); + t("-3421.78251", 3, RoundingMode.ROUND_UP, "-15.1"); + t("0.79814422", 39, RoundingMode.ROUND_CEIL, "0.927599396985329992917473895643267747501"); + t("6227777487920800600782989190699420219319010", 12, RoundingMode.ROUND_HALF_DOWN, "183982999846000"); + t("-4", 31, RoundingMode.ROUND_FLOOR, "-1.587401051968199474751705639273"); + t("0.6204", 12, RoundingMode.ROUND_DOWN, "0.852885235658"); + t("8920004800.000000000400230000008", 32, RoundingMode.ROUND_DOWN, "2073.9026316402901109714600381981"); + t("76454444.44441944464342", 35, RoundingMode.ROUND_HALF_UP, "424.42495598275381783951469231618944"); + t("-8", 37, RoundingMode.ROUND_HALF_UP, "-2"); + t("1700000000000004000000000000000000000000000000000000000000000000000000000000000000000.09", 8, RoundingMode.ROUND_CEIL, "11934832000000000000000000000"); + t("0.000030959007223101513810340323846095584550894023468313224625906569282035173072", 8, RoundingMode.ROUND_CEIL, "0.031399954"); + t("62.29999099992999997999909999999999999999", 32, RoundingMode.ROUND_FLOOR, "3.9642648462330796701982108855154"); + t("0.0000003807294171", 5, RoundingMode.ROUND_UP, "0.0072478"); + t("-780.6666", 26, RoundingMode.ROUND_DOWN, "-9.2077856274677166841928101"); + t("-6", 20, RoundingMode.ROUND_UP, "-1.8171205928321396589"); + t("815882901438647219486921.894", 33, RoundingMode.ROUND_HALF_UP, "93442104.3943467597917142753820441"); + t("0.0000015665213669512347839036", 7, RoundingMode.ROUND_HALF_EVEN, "0.01161392"); + t("-28885605412983735817101486", 10, RoundingMode.ROUND_HALF_DOWN, "-306827177.3"); + t("-9120656529310649022508772557600822755989", 22, RoundingMode.ROUND_FLOOR, "-20893379868975.93410893"); + t("-68830003436832119168697206111111111.333333333333333331", 14, RoundingMode.ROUND_HALF_DOWN, "-409819479198.43"); + t("0.063413340249", 22, RoundingMode.ROUND_UP, "0.3987740385705949818971"); + t("-9663639312.1889995622529073081830811281157871525928558911559008454893814786766", 29, RoundingMode.ROUND_FLOOR, "-2130.0031087399799336969947731"); + t("8456009", 5, RoundingMode.ROUND_HALF_EVEN, "203.73"); + t("-133333313333333336333333333333333333333333333338333.333339333338333333333333333333333333333333339", 35, RoundingMode.ROUND_CEIL, "-51087292938538638.45963672563255537"); + t("0.000000828", 8, RoundingMode.ROUND_UP, "0.0093902419"); + t("-0.533779136427110683342022472", 21, RoundingMode.ROUND_UP, "-0.811186158520637675529"); + t("553454888888888888888", 3, RoundingMode.ROUND_HALF_UP, "8210000"); + t("-253999919999999999.9099", 10, RoundingMode.ROUND_HALF_EVEN, "-633302.4866"); + t("0.966", 17, RoundingMode.ROUND_HALF_UP, "0.9885357396476798"); + t("-472.2", 20, RoundingMode.ROUND_UP, "-7.7870923929575451614"); + t("890606400", 33, RoundingMode.ROUND_HALF_EVEN, "962.118585030255343542794621864724"); + t("2", 23, RoundingMode.ROUND_HALF_UP, "1.2599210498948731647672"); + t("0.82245387646977936582376895918587801438031818414386874050664779675441964", 3, RoundingMode.ROUND_HALF_EVEN, "0.937"); + t("-96199999999999999199999999989999999999999999989099999999.99999999999999999999999999949999999999799999", 26, RoundingMode.ROUND_CEIL, "-4582034526382497317.9233569"); + t("-0.00004", 19, RoundingMode.ROUND_FLOOR, "-0.03419951893353393979"); + t("-200000000000000000000.0000000000007", 20, RoundingMode.ROUND_HALF_EVEN, "-5848035.476425732131"); + t("60279.423406252475", 22, RoundingMode.ROUND_UP, "39.20935485081682681592"); + t("-97777777777777712029297332", 38, RoundingMode.ROUND_DOWN, "-460694882.00074551487967316547165888621"); + t("0.77649", 20, RoundingMode.ROUND_CEIL, "0.91913355728380293545"); + t("-89999999999999900000000.999942455962", 19, RoundingMode.ROUND_DOWN, "-44814047.46557163048"); + t("657784786706774969939699941134092485280219814777777777.00000000000000053505631693522700943183624999999", 16, RoundingMode.ROUND_DOWN, "869683588953107700"); + t("11225003", 18, RoundingMode.ROUND_HALF_UP, "223.90415622255316"); + t("0.2179879021284641771886423751003609459775768167269363647", 13, RoundingMode.ROUND_FLOOR, "0.6018350321591"); + t("61437815991318058497644444444444", 26, RoundingMode.ROUND_DOWN, "39458925629.182959223571627"); + t("13318364884783059091217.13239214366191085313377401", 18, RoundingMode.ROUND_HALF_EVEN, "23703745.1782159442"); + t("-8.4064144", 32, RoundingMode.ROUND_DOWN, "-2.033310008391993884248411527567"); + t("-453", 39, RoundingMode.ROUND_HALF_DOWN, "-7.68008571952935784930001064291224888536"); + t("0.763", 25, RoundingMode.ROUND_HALF_EVEN, "0.9137797144320912638366951"); + t("1611484839641139334887115912095502769965101742318128374453911269", 30, RoundingMode.ROUND_FLOOR, "1172398915553242562427.04711067"); + t("500163293486811.333445", 9, RoundingMode.ROUND_HALF_EVEN, "79378.6921"); + t("24511111111111111111111111111111111111111.111111121111111111", 3, RoundingMode.ROUND_HALF_UP, "29000000000000"); + t("-0.42175386188897175455873804974780281862102270904", 32, RoundingMode.ROUND_HALF_UP, "-0.74992820758074132846372269243787"); + t("2.9", 40, RoundingMode.ROUND_HALF_EVEN, "1.426043147142408726435983115273598211993"); + t("-4555555555505.5555555", 21, RoundingMode.ROUND_DOWN, "-16577.2994441679860622"); + t("-0.000000066924422225974", 2, RoundingMode.ROUND_DOWN, "-0.004"); + t("1.173937", 13, RoundingMode.ROUND_UP, "1.054908836639"); + t("197", 15, RoundingMode.ROUND_HALF_DOWN, "5.81864786749696"); + t("-37788189521071423", 5, RoundingMode.ROUND_HALF_EVEN, "-335570"); + t("-10000000000000900001.4", 37, RoundingMode.ROUND_FLOOR, "-2154434.690031948354900534806626827261"); + t("8333355568526352727297334146112460880", 33, RoundingMode.ROUND_FLOOR, "2027402468375.33435686950289609612"); + t("23290906112798700", 40, RoundingMode.ROUND_DOWN, "285580.6612856533004404239892443930875337"); + t("8907204187376523669", 29, RoundingMode.ROUND_CEIL, "2072910.1085135091276335169742"); + t("4579848061800339", 3, RoundingMode.ROUND_CEIL, "167000"); + t("-24842.93340891298153832688061127141128026704014", 35, RoundingMode.ROUND_DOWN, "-29.178813292376147719745493637646888"); + t("9.99184683875871", 16, RoundingMode.ROUND_HALF_UP, "2.153849015719408"); + t("-9222222222222223615", 6, RoundingMode.ROUND_HALF_DOWN, "-2097060"); + t("-0.0004692526698680109221628", 34, RoundingMode.ROUND_DOWN, "-0.07770857005638567506282900761888083"); + t("-76", 5, RoundingMode.ROUND_HALF_EVEN, "-4.2358"); + t("-34231836867333305216541022551584237057639985600267422790312876836", 27, RoundingMode.ROUND_FLOOR, "-3246958475723496211199.67475"); + t("696.116148", 16, RoundingMode.ROUND_CEIL, "8.862588182748634"); + t("3437203096792518549", 11, RoundingMode.ROUND_HALF_EVEN, "1509159.2321"); + t("-8196696.3212529", 11, RoundingMode.ROUND_HALF_EVEN, "-201.62588272"); + t("1299998999999.999199", 14, RoundingMode.ROUND_UP, "10913.926032168"); + t("9338804", 29, RoundingMode.ROUND_HALF_EVEN, "210.58644843232382837669233209"); + t("-60000000000.00007", 30, RoundingMode.ROUND_HALF_EVEN, "-3914.86764116886511787346318164"); + t("911111114444444444444.22222222221175209740160761862374840394", 27, RoundingMode.ROUND_HALF_DOWN, "9694463.53714067931083453616"); + t("551414371.0368018318871978921581971673011423266337626938349196375", 29, RoundingMode.ROUND_HALF_EVEN, "820.02298717871313585995909702"); + t("1366", 33, RoundingMode.ROUND_HALF_DOWN, "11.0955857241236546553135433026986"); + t("-677777.7777777701", 23, RoundingMode.ROUND_HALF_UP, "-87.840697409140936494786"); + t("2999999999999999989979.99999999999999999998", 30, RoundingMode.ROUND_HALF_EVEN, "14422495.7030740838071593378917"); + t("2700.294", 33, RoundingMode.ROUND_CEIL, "13.9252718999454359654695575635934"); + t("0.17656681235139904232276", 31, RoundingMode.ROUND_HALF_UP, "0.561008823921671674419747744567"); + t("-62589.499999999999999999399929", 12, RoundingMode.ROUND_UP, "-39.7039602502"); + t("1690217844595.531311", 5, RoundingMode.ROUND_HALF_UP, "11912"); + t("-43149245342383", 2, RoundingMode.ROUND_DOWN, "-35000"); + t("-7427368.2432", 6, RoundingMode.ROUND_HALF_EVEN, "-195.109"); + t("0.31559022679197054969487048105816446502323333675805181540650757", 37, RoundingMode.ROUND_HALF_UP, "0.6808339154882989194380024736345783727"); + t("-73.1", 24, RoundingMode.ROUND_FLOOR, "-4.18124669970238870480732"); + t("-4279999999.9999999999999969999999429", 20, RoundingMode.ROUND_CEIL, "-1623.6082758598468032"); + t("-0.0000000328578853", 25, RoundingMode.ROUND_CEIL, "-0.003202923282468980388900329"); + t("-0.57003551", 38, RoundingMode.ROUND_HALF_DOWN, "-0.82915165170097697620872686667157235259"); + t("-63170799234756597835676", 25, RoundingMode.ROUND_DOWN, "-39826498.35818326438200275"); + t("-0.5222452668661621992421", 17, RoundingMode.ROUND_UP, "-0.8053008748219385"); + t("-14999999999999999999999149999999999999999999910959999199999999999999.9999999999", 4, RoundingMode.ROUND_HALF_DOWN, "-24660000000000000000000"); + t("0.823624323", 18, RoundingMode.ROUND_HALF_EVEN, "0.937367131818894711"); + t("-4201173425650602057484204974278561701040576817779576", 14, RoundingMode.ROUND_DOWN, "-161357888906180000"); + t("-5154947.470431910704543384861404", 26, RoundingMode.ROUND_HALF_EVEN, "-172.74603240504542544372558"); + t("0.3", 11, RoundingMode.ROUND_HALF_UP, "0.66943295008"); + t("-5.43799", 15, RoundingMode.ROUND_UP, "-1.7585152336593"); + t("623.25", 12, RoundingMode.ROUND_HALF_EVEN, "8.54189238613"); + t("591949.9", 35, RoundingMode.ROUND_HALF_EVEN, "83.964360353306688632540221375977156"); + t("735209879.000000000000000000009999999999", 21, RoundingMode.ROUND_HALF_EVEN, "902.548283674048747014"); + t("5222222222222222222222222222222224.0222222222222222222222222282222", 34, RoundingMode.ROUND_FLOOR, "173494262113.1400447770433961948133"); + t("988881298503509106112", 31, RoundingMode.ROUND_FLOOR, "9962799.445154117832093512091153"); + t("-995.53", 26, RoundingMode.ROUND_FLOOR, "-9.9850777437026814287892541"); + t("608505555455555555.555555155525555555", 22, RoundingMode.ROUND_HALF_EVEN, "847399.4592254247578725"); + t("662.969", 15, RoundingMode.ROUND_DOWN, "8.71962364758999"); + t("-792734644838302063684220", 22, RoundingMode.ROUND_HALF_DOWN, "-92549898.36986346512032"); + t("181.50343949228397002512533756681890566276379", 3, RoundingMode.ROUND_HALF_EVEN, "5.66"); + t("-0.1913223936686635002105502296708709704", 12, RoundingMode.ROUND_DOWN, "-0.576220363283"); + t("519949999790797999999999.9999999", 16, RoundingMode.ROUND_HALF_DOWN, "80411937.69007677"); + t("190083553254611", 68, RoundingMode.ROUND_HALF_DOWN, "57497.396555557598945480190459661968176685612641464842714635054836109"); + t("427777677774777.77777777777737777277777273", 76, RoundingMode.ROUND_FLOOR, "75348.16951798434534353643448783853246144346430067525820886033715512932023151"); + t("546171561825002947294080072307212773280", 16, RoundingMode.ROUND_FLOOR, "8174157996118.782"); + t("522985096568498402721582352.1215694977095639301679629", 31, RoundingMode.ROUND_FLOOR, "805680967.235151049332930059641"); + t("64.9099992", 58, RoundingMode.ROUND_DOWN, "4.018869165352236942066012896861710689344927659713155032172"); + t("0.622222222222222922222222", 80, RoundingMode.ROUND_CEIL, "0.85371944332499649030906483432917416186241639965314884631474488059421492067199314"); + t("8794999.99999959999999996999999929999993999399999399966999999", 4, RoundingMode.ROUND_HALF_DOWN, "206.4"); + t("5", 25, RoundingMode.ROUND_HALF_DOWN, "1.709975946676696989353109"); + t("-0.552605", 9, RoundingMode.ROUND_UP, "-0.820612769"); + t("3848.66666638677316979763946277553241716773444444444", 49, RoundingMode.ROUND_CEIL, "15.67124256418039359054784961648853429741398544294"); + t("-0.35", 53, RoundingMode.ROUND_HALF_EVEN, "-0.70472987320648919207554481663284854286711480387909973"); + t("89273713993947331.4743931838348340267", 24, RoundingMode.ROUND_FLOOR, "446931.742725088818839951"); + t("0.51", 68, RoundingMode.ROUND_HALF_UP, "0.79895697404540129868930301132607109484003577983641973039863493529708"); + t("-9", 6, RoundingMode.ROUND_HALF_EVEN, "-2.08008"); + t("628629.7", 54, RoundingMode.ROUND_HALF_DOWN, "85.6639899506997541353732791802583971585340677864297375"); + t("0.793206288149423029961029867426843938373894729291545543677796351148224", 61, RoundingMode.ROUND_CEIL, "0.9256824914542190809682539550820521270670422844262301051707097"); + t("0.0698662830726", 67, RoundingMode.ROUND_CEIL, "0.4118659409892579213714309499559354149575987977349873047664318860863"); + t("-9030.0000000000700000003000060000000405", 62, RoundingMode.ROUND_FLOOR, "-20.823924640400472684412707477423805625015209868245827862949254"); + t("-7.958105863885", 21, RoundingMode.ROUND_HALF_EVEN, "-1.99650271003649585776"); + t("81111111111111111288833156333333333.05673220566188", 32, RoundingMode.ROUND_HALF_DOWN, "432872620146.7613955527490256419"); + t("0.0000000710633771602494959172972083163271336209255171598326202220311305227519", 75, RoundingMode.ROUND_DOWN, "0.00414204946408468183711149537360290487199347861478325008670596401061026171227"); + t("-0.2743913654", 8, RoundingMode.ROUND_UP, "-0.64981563"); + t("-84897051062435491923", 58, RoundingMode.ROUND_HALF_EVEN, "-4395053.861136635860244215030060880434157604594404162723997"); + t("12227222222222292222252222222.22222222222222", 53, RoundingMode.ROUND_HALF_UP, "2303788477.3270815027773508878518255502487884933382556"); + t("-5744587095066134000", 26, RoundingMode.ROUND_CEIL, "-1790961.5938680570422494081"); + t("-28158704869", 1, RoundingMode.ROUND_HALF_EVEN, "-3000"); + t("-9", 58, RoundingMode.ROUND_CEIL, "-2.080083823051904114530056824357885386337805340373262109697"); + t("-288888888888888876936205421.8888880607688", 12, RoundingMode.ROUND_UP, "-661064160.894"); + t("-57116251296177777", 15, RoundingMode.ROUND_HALF_EVEN, "-385111.568938615"); + t("40084858.57050075", 41, RoundingMode.ROUND_HALF_DOWN, "342.2368620398633435954991713953035735131"); + t("-39.9999999999", 42, RoundingMode.ROUND_UP, "-3.41995189335054401879508754180553909512638"); + t("-0.0000000781", 69, RoundingMode.ROUND_HALF_DOWN, "-0.00427448382445799736966808734512338969330660711441009839867977642505046"); + t("-32788", 39, RoundingMode.ROUND_CEIL, "-32.0065090925679555063786003491251965255"); + t("905356417977978248323", 18, RoundingMode.ROUND_UP, "9674009.91580975224"); + t("4662076255.225187", 80, RoundingMode.ROUND_HALF_UP, "1670.5512009402885396428886958629310373585791511636552403799410691079829339579262"); + t("-499999999999999999199919.999099997989999999999965", 46, RoundingMode.ROUND_CEIL, "-79370052.59840997369525035412736937389009915928"); + t("-3078786.83696704573083305", 18, RoundingMode.ROUND_FLOOR, "-145.476621649278813"); + t("-7666666666666666666666666666666666666.66666", 70, RoundingMode.ROUND_HALF_EVEN, "-1971827233233.572229603337758893347392027986101760363801943674844374856"); + t("-0.00005424495799878575807532622250516060480220764475560855744121424125628903936005650488919995462", 36, RoundingMode.ROUND_HALF_UP, "-0.037854698578278600379593368884078452"); + t("6999999999999999999999999999999999999999.9999865", 42, RoundingMode.ROUND_FLOOR, "19129311827723.8910119911683954876028286243"); + t("0.1871246006301609393460142", 4, RoundingMode.ROUND_HALF_DOWN, "0.572"); + t("-2330974078269618476", 67, RoundingMode.ROUND_FLOOR, "-1325905.222793466277001224712671858413192217680079713012807710978752"); + t("166666879641108", 36, RoundingMode.ROUND_CEIL, "55032.1442557708320139014841862925342"); + t("0.000009594823001647349765109598012352854782286", 80, RoundingMode.ROUND_CEIL, "0.021249350292770477994556821613879363484044602090572948149077662334118723742709098"); + t("-71", 56, RoundingMode.ROUND_HALF_UP, "-4.1408177494228532500045188093255718381593507907320916972"); + t("-20560088583263631805680340015297262", 5, RoundingMode.ROUND_HALF_UP, "-273950000000"); + t("-63555555555555556.55555552555555555555555555555557555555555555855555", 39, RoundingMode.ROUND_HALF_DOWN, "-399071.922419458655215352788196447840256"); + t("-80567525886.0758703", 45, RoundingMode.ROUND_FLOOR, "-4319.03452586372310664568734824001540654078942"); + t("-3.10006000000002088", 32, RoundingMode.ROUND_UP, "-1.458109142861094467205073617593"); + t("-730500406876657225817429042993.139094878043", 32, RoundingMode.ROUND_HALF_DOWN, "-9006170282.6636206044471890925123"); + t("-95958188714879921780", 8, RoundingMode.ROUND_UP, "-4578192.2"); + t("-90657056", 7, RoundingMode.ROUND_HALF_UP, "-449.2284"); + t("-29999999978371726978812003851", 25, RoundingMode.ROUND_HALF_DOWN, "-3107232505.207146944708437"); + t("0.41", 56, RoundingMode.ROUND_CEIL, "0.74289588414465652154744763881657973470421505511967252574"); + t("-0.00035167447185522407348", 34, RoundingMode.ROUND_FLOOR, "-0.07058519431649929665093174422506027"); + t("2", 78, RoundingMode.ROUND_UP, "1.25992104989487316476721060727822835057025146470150798008197511215529967651396"); + t("-0.638209885510603951064915811914377393843970396158", 41, RoundingMode.ROUND_CEIL, "-0.86096964973397973858997223739696214052976"); + t("-0.2", 79, RoundingMode.ROUND_DOWN, "-0.5848035476425732131013574720275845557060997270202060082845147020145121117186434"); + t("8.3", 59, RoundingMode.ROUND_DOWN, "2.0246938520054570738873895392278613882354294240035565410806"); + t("-94", 33, RoundingMode.ROUND_HALF_DOWN, "-4.54683594377634389380192154132128"); + t("-9893111555555555", 27, RoundingMode.ROUND_DOWN, "-214673.103768153134119737804"); + t("-220511265573", 42, RoundingMode.ROUND_DOWN, "-6041.48350302234073289676574962951933783517"); + t("0.0027962459343658070652934145120013227247925261722687085290561886066", 74, RoundingMode.ROUND_DOWN, "0.14088295594051797098822392958928339704939850971044967086499430607988967815"); + t("8378", 58, RoundingMode.ROUND_CEIL, "20.31016501759315420904307771085017217522109296970386829876"); + t("4373952724599.331549321897031863", 2, RoundingMode.ROUND_HALF_UP, "16000"); + t("6196722971.15026461303816", 32, RoundingMode.ROUND_HALF_DOWN, "1836.7668263739955787226813173287"); + t("9181111111111111111171191111111.1111111111111111111", 35, RoundingMode.ROUND_CEIL, "20939440881.76686255478254865282532"); + t("-110041253121816343325184123868060195618846912461901764444444", 70, RoundingMode.ROUND_HALF_DOWN, "-47920187550103152119.58925761782897985190653987385527863135093825526904"); + t("-0.3", 9, RoundingMode.ROUND_FLOOR, "-0.669432951"); + t("6577777777777.0275", 16, RoundingMode.ROUND_CEIL, "18736.6983847358"); + t("8578744.50294903841928369889455281001", 66, RoundingMode.ROUND_CEIL, "204.711030517640249446574306228627533211589985153897156259864604954"); + t("0.78771", 53, RoundingMode.ROUND_FLOOR, "0.92353945302856403979711704138480732047227563846331275"); + t("0.6771249627191616957275035900802683145534522585", 61, RoundingMode.ROUND_UP, "0.8781248651546850239434971281445626213610129377439629305099637"); + t("-7077710.91937851", 62, RoundingMode.ROUND_UP, "-191.99839878021651605399436486269092820663925076672584191864672"); + t("-300000000000000000.0000000000000000000000000000004", 36, RoundingMode.ROUND_FLOOR, "-669432.950082169521882659324639930794"); + t("2200000710.2000000000000070000800008", 42, RoundingMode.ROUND_HALF_DOWN, "1300.5915868028939927953703562096115839217"); + t("-0.44402817317295797128980077", 49, RoundingMode.ROUND_HALF_EVEN, "-0.7629044981192485835380835650924556945035711976182"); + t("-0.00000970561327720508890187", 9, RoundingMode.ROUND_UP, "-0.0213308255"); + t("7642.857784342453979181129525786781038237665995918300221757673", 18, RoundingMode.ROUND_FLOOR, "19.6978394259656285"); + t("-7000000000000000000000000000000.008000000000000000000000000000000000060000000000000007", 48, RoundingMode.ROUND_UP, "-19129311827.7238910119911683954876101159812772555"); + t("542770000000000000000000010.00090000000000001", 15, RoundingMode.ROUND_DOWN, "815715306.618792"); + t("-43426000", 11, RoundingMode.ROUND_HALF_DOWN, "-351.49294245"); + t("-9082", 24, RoundingMode.ROUND_DOWN, "-20.8638202534165193900452"); + t("-10751727", 41, RoundingMode.ROUND_CEIL, "-220.71206607310159403001763511889702820882"); + t("94559999999999999999599999999999999999999999999999999199969999992999999.999959999999999999999999999", 47, RoundingMode.ROUND_DOWN, "455584725036401328416463.25477234792211543595132"); + t("1384470686149009269.611", 62, RoundingMode.ROUND_DOWN, "1114537.2505539140308371278549396938503929197531025427964858566"); + t("311.2260870142", 2, RoundingMode.ROUND_HALF_EVEN, "6.8"); + t("53007675.811556", 4, RoundingMode.ROUND_HALF_DOWN, "375.6"); + t("-37860603401819.66294540538706081407", 16, RoundingMode.ROUND_HALF_UP, "-33578.59422960415"); + t("238734191175987482376448664974883671063134.70247158385074277612470949077", 56, RoundingMode.ROUND_HALF_DOWN, "62035202968440.050211601264407039974381303322673615544567"); + t("-0.5560986938994064959245371245686540537385954926803398753", 71, RoundingMode.ROUND_HALF_UP, "-0.82233850305551594240148500047628002080453296664759183573348648028399817"); + t("0.93", 73, RoundingMode.ROUND_UP, "0.9761000076685076115311962561496857123875368468154982203611379430735287729"); + t("0.635739982568", 5, RoundingMode.ROUND_HALF_UP, "0.85986"); + t("-96666666634053992659153661758395739180812441764338777", 34, RoundingMode.ROUND_HALF_DOWN, "-458943173466921642.1171000857394366"); + t("0.72", 78, RoundingMode.ROUND_HALF_DOWN, "0.896280949311432941749496402807715894233349999468515536883522501252545132973286"); + t("-86", 36, RoundingMode.ROUND_HALF_UP, "-4.41400496244210377245164143865335132"); + t("0.578840623382497", 58, RoundingMode.ROUND_UP, "0.8333990495966651700539877210106533569205827803791114529105"); + t("-0.11256085014081744874", 58, RoundingMode.ROUND_HALF_EVEN, "-0.4828317138964906758001480539221236633628550564791782106879"); + t("-262891246115892815600757743406447606585992233659045972242604894392977494562777777", 77, RoundingMode.ROUND_CEIL, "-640607533549306651453856248.58448667909440682564928680375476759591748422139438"); + t("-0.000002495354006619", 44, RoundingMode.ROUND_HALF_UP, "-0.013563675425280118756666446842202219898735203"); + t("20000000000000000808176375252666666666666666666.8780034342087325555", 52, RoundingMode.ROUND_FLOOR, "2714417616594906.608080225974707060171652206149639126"); + t("451331333334.3353333328", 34, RoundingMode.ROUND_DOWN, "7670.644019013497054692225494054739"); + t("23333333333219416371398433333", 1, RoundingMode.ROUND_CEIL, "3000000000"); + t("92222222222222228222222222222222222222222.22222222222222222222222222222222222222222222", 46, RoundingMode.ROUND_HALF_EVEN, "45179892612041.49000809994509369661943620355513"); + t("-358905019432949391115762037777777777777777", 55, RoundingMode.ROUND_DOWN, "-71065668228949.06718591446657109529563408522253008055962"); + t("4740653103794266403091226744357138", 5, RoundingMode.ROUND_DOWN, "167980000000"); + t("93513215.6615", 72, RoundingMode.ROUND_HALF_EVEN, "453.89736736596846522976766254373109582032771449264826647810688058162461"); + t("-83525449894758523723063520766638259728", 42, RoundingMode.ROUND_CEIL, "-4371256333057.70019981327121654690655675087"); + t("96.8907029", 1, RoundingMode.ROUND_HALF_EVEN, "5"); + t("-76164138181607236328312553520780998593788", 38, RoundingMode.ROUND_HALF_UP, "-42388707792525.65333639476095263672376"); + t("-811111111144186", 60, RoundingMode.ROUND_HALF_DOWN, "-93259.5789221853464970653887991503226136601474228057694991467"); + t("98063006.11366530159", 25, RoundingMode.ROUND_DOWN, "461.1424126896267568258957"); + t("0.691", 5, RoundingMode.ROUND_HALF_EVEN, "0.88408"); + t("-37.77777777777777760371348888888888888", 36, RoundingMode.ROUND_HALF_EVEN, "-3.35540903186704310733799481273049299"); + t("79999999999999999999.9999999999992999997999999999999934", 73, RoundingMode.ROUND_FLOOR, "4308869.380063767443518587133038688422979407307245786977735826208747140919"); + t("-999992999999999.999799999999", 26, RoundingMode.ROUND_UP, "-99999.766666122220098261694"); + t("-33333333333333337771156419069557322464210130528", 19, RoundingMode.ROUND_FLOOR, "-3218297948685432.67"); + t("54276.35015542019326172851580003368352971897539088915695454662323526031352314", 46, RoundingMode.ROUND_HALF_UP, "37.86199948088373653952550856026791817364516245"); + t("8489888132804567133774601751196.59987803505788118", 46, RoundingMode.ROUND_UP, "20400179522.96566820584897289095711477040148564"); + t("18146800.9748965960145324063", 40, RoundingMode.ROUND_CEIL, "262.7846694382357102673981792034389051619"); + t("-500079043952493124458778348581660368530250605627548115333312268234887", 3, RoundingMode.ROUND_HALF_UP, "-79400000000000000000000"); + t("-0.08932570353455987981", 15, RoundingMode.ROUND_FLOOR, "-0.447018484446593"); + t("-4.438", 48, RoundingMode.ROUND_HALF_DOWN, "-1.64334633015251774898249908635733926732572691097"); + t("-30000000000000", 74, RoundingMode.ROUND_CEIL, "-31072.325059538588668776624275223863628549068290674220014710384042591307226"); + t("-7888888888888888888.888888888888888888888888888888888888888888888888888888838888", 49, RoundingMode.ROUND_FLOOR, "-1990697.539942133311276975376128903406090081062864"); + t("-2666666597845523014132441", 53, RoundingMode.ROUND_HALF_DOWN, "-138672253.67717903407643485161238193329852619997701256"); + t("-1076.1809886", 10, RoundingMode.ROUND_HALF_EVEN, "-10.24774803"); + t("9216788091552305362.909312", 38, RoundingMode.ROUND_DOWN, "2096652.8759366679702358604959653287734"); + t("4741.8140673856435018624822718788906388079391623", 67, RoundingMode.ROUND_HALF_DOWN, "16.80021502392216445835596170850399645067790675363174957444280118878"); + t("-79999999999311940367043634246890228907788979677205499598044", 19, RoundingMode.ROUND_UP, "-43088693800514142810"); + t("290844787777777777777744444444444.77777", 18, RoundingMode.ROUND_CEIL, "66255270042.1163829"); + t("-0.37875271361357", 18, RoundingMode.ROUND_HALF_EVEN, "-0.723522294080478167"); + t("-9991406.58", 6, RoundingMode.ROUND_CEIL, "-215.381"); + t("-6738129028121126791606838741675150", 33, RoundingMode.ROUND_FLOOR, "-188877303678.79474419948880026566"); + t("-0.502160316994057971939225", 54, RoundingMode.ROUND_DOWN, "-0.794841980113590041816031553223689914512597942576296128"); + t("-733609592072036673808173056752609127045.8559623254790296334481324712071053568161", 23, RoundingMode.ROUND_HALF_EVEN, "-9018929672065.1805741195"); + t("7999999999993467227679756696779", 39, RoundingMode.ROUND_HALF_UP, "19999999999.9945560230664624321382573557"); + t("60", 29, RoundingMode.ROUND_UP, "3.9148676411688635954249360605"); + t("-58704", 68, RoundingMode.ROUND_UP, "-38.864751764188763692646037493072246758297604206169656083742519721013"); + t("-29", 52, RoundingMode.ROUND_FLOOR, "-3.072316825685847293312637982105597485502783238876096"); + t("-983167977058863254673822048588175665", 46, RoundingMode.ROUND_HALF_UP, "-994357548305.2292662769379386504802402173937149"); + t("80000.00000000000000000000000000000000000800000000005", 48, RoundingMode.ROUND_DOWN, "43.0886938006376744351858713303870099051883351336"); + t("-632446837983.5248250060342675255523783173070245062004", 72, RoundingMode.ROUND_HALF_DOWN, "-8583.70285700719310952320051477762621057584292163627657361395695214226832"); + t("94.589892564831076", 45, RoundingMode.ROUND_FLOOR, "4.55632726873442916526079248390445485637288476"); + t("-29150168312768537777777777777", 38, RoundingMode.ROUND_UP, "-3077610740.2630452678906404628753071677"); + t("-65876.7592186515413241046395745", 31, RoundingMode.ROUND_DOWN, "-40.38723071645668806606497723789"); + t("-5666063373", 47, RoundingMode.ROUND_DOWN, "-1782.7638094449886240717553196512228686769485213"); + t("-0.139725999999992", 46, RoundingMode.ROUND_DOWN, "-0.5189104405267407116753364325784027919669908571"); + t("68.267239742", 24, RoundingMode.ROUND_HALF_UP, "4.08699507567719377180069"); + t("0.8", 76, RoundingMode.ROUND_DOWN, "0.9283177667225557784820152701838893153102698250022487275301385717369555739385"); + t("-1888888888888888885637141809007941865764736068491150620125461933301770", 41, RoundingMode.ROUND_HALF_EVEN, "-123614325642206315683692.55454636042913382"); + t("0.0000002246998216971028117596695865291833893978504414795642811734126305748247193907875", 80, RoundingMode.ROUND_HALF_EVEN, "0.0060794959843145001131062106532389655005752557500009879296180198722004596636853181"); + t("77956248430982.9779", 38, RoundingMode.ROUND_HALF_DOWN, "42718.596625359543566496985925511890764"); + t("-28025.81006501597216999", 56, RoundingMode.ROUND_UP, "-30.375217157987425639914003812000075009262382915415726707"); + t("-5111111114222248087909852777777777", 12, RoundingMode.ROUND_DOWN, "-172254975113"); + t("444444444444437386196755", 70, RoundingMode.ROUND_HALF_UP, "76314282.83688838720336993531707319785684914925123263945112896200880283"); + t("303700006.00000008", 3, RoundingMode.ROUND_UP, "673"); + t("5111111117792088111396638516069154709400490780.5555555603936711111111111111", 39, RoundingMode.ROUND_UP, "1722549751538416.71018646122626799371576"); + t("-880960929.78835331001506", 67, RoundingMode.ROUND_DOWN, "-958.632648927890314563139859812747286403802932806246702992898616543"); + t("61999.09179", 36, RoundingMode.ROUND_FLOOR, "39.5787228379712136369601265185064235"); + t("0.870731830383098", 16, RoundingMode.ROUND_HALF_DOWN, "0.9549078720674807"); + t("5738012899796164830204444444444444", 48, RoundingMode.ROUND_FLOOR, "179027813159.873904958103685150435410088455529157"); + t("-3831640539439787930786871750123448", 54, RoundingMode.ROUND_CEIL, "-156480990514.52173031532925524692040509815236073117521"); + t("0.000000008", 77, RoundingMode.ROUND_DOWN, "0.002"); + t("3149999990999.9999699999902999999369999899999999", 3, RoundingMode.ROUND_DOWN, "14600"); + t("82776728273051551409555555555555", 112, RoundingMode.ROUND_HALF_UP, "43581558053.74474521864863300705184902455145527483948731386434099961702979317990310205860786206482687718586705261"); + t("636376033.7", 100, RoundingMode.ROUND_CEIL, "860.144213106029054921197862188864450908194296444549177622081102948831111142733451932872729734806943"); + t("0.77795481", 71, RoundingMode.ROUND_DOWN, "0.91971116090215414648453499783441147293820871989783932873327322223739659"); + t("9.70316218201244384213952", 81, RoundingMode.ROUND_CEIL, "2.13290295928319569177379523820743230584845501008854234203250352744189412761501392"); + t("0.00181186257565040142431491571234663212884320254245585841641", 137, RoundingMode.ROUND_DOWN, "0.12191067939515882894069376601221357826801334075784297236769250526078036589701068176206067766104960548339838823250498818117013950672762615"); + t("353", 29, RoundingMode.ROUND_DOWN, "7.0673766147219547428863994574"); + t("466666666666667378082195511311111111222.555555555555555111", 60, RoundingMode.ROUND_CEIL, "7756555904835.21041894399125448188971136254722965099357605993"); + t("-661.8", 43, RoundingMode.ROUND_HALF_UP, "-8.714495586248373950058566442188587266015331"); + t("-1445782507", 43, RoundingMode.ROUND_UP, "-1130.752756847083713326681250471878173647552"); + t("-96431622749744444444444555555555555555.4444444444444", 75, RoundingMode.ROUND_CEIL, "-4585708999008.27550013125419286369006721924062122910608942441210123025057816"); + t("499999999999999999999999999999999999992.9999999999999999999999999999997", 47, RoundingMode.ROUND_DOWN, "7937005259840.9973737585281963615413019204272816"); + t("-0.0000000686316994432396044", 117, RoundingMode.ROUND_UP, "-0.00409425527881064612229042772151200037039500662592659730778909262376378001655456283942223775620187033364272337902504097"); + t("-599999999999999999999999990.9999999999996999969999999999999999999999999999999999999999999", 159, RoundingMode.ROUND_DOWN, "-843432665.301749242845709747188909616731229783764284784453365375749672919741789350058645758446637130488935694032755752063036880565022224985536959946161612180905"); + t("84025768600136117500000000000000", 14, RoundingMode.ROUND_HALF_UP, "43799669277.427"); + t("0.123223725749812396270285316641884411484091734351855", 137, RoundingMode.ROUND_HALF_EVEN, "0.49762032660982554025397607388346058751014461459148740386278232128841926105732866161903457277201239853858123118377125104914763239955263879"); + t("5683919999799.999295999999999799999999999999999999", 50, RoundingMode.ROUND_HALF_DOWN, "17846.346418335262245115777162462069143502052478305"); + t("0.00465566481", 28, RoundingMode.ROUND_DOWN, "0.1669785050083134684129221262"); + t("9404483.59592818623081360038632773352855722645934935876579616346426561463933612720026815689011150820586211117100157209214772525", 103, RoundingMode.ROUND_FLOOR, "211.0789788115077193292720852315830318355441614656098768099955373384925988386839320981935725778643446229"); + t("-578366862674170179059334283952228171204.36089287550596157704924551419962862", 63, RoundingMode.ROUND_UP, "-8331716182590.68932931535600060162570391991023694283431933947186"); + t("95.8881477772834512616724651188088455801629460797496194699699085", 12, RoundingMode.ROUND_HALF_EVEN, "4.57707796199"); + t("-24444.485785827656282219", 9, RoundingMode.ROUND_FLOOR, "-29.0219754"); + t("766666666666.6666646666666666666666666666666666666666", 141, RoundingMode.ROUND_UP, "9152.41126759052944167203975215594026371347635147759017682577739176762107986928730371229904875068521357914298298505531974350201698511730534769"); + t("-488888888888826755189947563588888", 99, RoundingMode.ROUND_DOWN, "-78777716697.8300827444483985263972258563173451818387104634814849656410990826684587731700647815402294"); + t("-0.93119", 64, RoundingMode.ROUND_UP, "-0.9765161596143984257691603580673962160184815852749412409877993735"); + t("43921954171092205284640844157041884886136450649590454797123487646372681162500398396370240486126497853068138338093447645", 93, RoundingMode.ROUND_HALF_UP, "3528259759332751349984485524958910184146.84947758519096836105450685070120550013816503300203742"); + t("37739049762", 45, RoundingMode.ROUND_DOWN, "3354.26203688270476088390500251319549444548488"); + t("1666669261277.5555555557777777777777777777", 19, RoundingMode.ROUND_UP, "11856.31716746641565"); + t("-0.87508130314522331714075160118465596943207930831795166748487868911086218158013807044478343658", 135, RoundingMode.ROUND_HALF_UP, "-0.956495214720463906171773082803269976950458764649816467310897091404170907626465238895898163664576312299168902947076663431770912067038187"); + t("-0.00000005690410744922351517051628284", 101, RoundingMode.ROUND_HALF_EVEN, "-0.0038463417761089907278564874060595717888448147954882058216091786932982543755356062337102395794883869754"); + t("110821061220650227209631389.442189848022639078051101733333", 94, RoundingMode.ROUND_CEIL, "480331167.9056548334940134194952187610074168036994182375036133309976063974642093619384961197749"); + t("0.0000000720374687", 113, RoundingMode.ROUND_HALF_DOWN, "0.0041608891694467038994141767474219272547761688870750977477255235231670146462788248091310958594566864043463352046753"); + t("87074221178179668787911995735893535906691636996053118628219655670342739566", 32, RoundingMode.ROUND_FLOOR, "4432307330872449002060944.4615279"); + t("0.005032313059756019443519186468931714599163438688829781446064655482531427885380299", 98, RoundingMode.ROUND_HALF_UP, "0.17136516767359008761032739486761079482107735684713612426709119939416240689556516522340562899699717"); + t("10148.5977", 160, RoundingMode.ROUND_HALF_EVEN, "21.65053731596572331412615208556528830271489610293122817763890262386718966501471244637895650110030829334214464535861088506285723435433974666728067779501793198954"); + t("-0.212895562117067555439641740586945267287", 143, RoundingMode.ROUND_HALF_UP, "-0.59711163840251428250532993677747034851713802847294194690972578890042276451962217937400524463773699201129154715832555819921696826114717724875142"); + t("-30000000", 25, RoundingMode.ROUND_HALF_UP, "-310.7232505953858866877662"); + t("-672.395591445152975029565505390802021591817222371328410506211100219883368902633513917908002520410928963251816322", 111, RoundingMode.ROUND_HALF_EVEN, "-8.76075669292588138901715870963309202194698610503137591171065258550496118269857816967030108216039948778282481392"); + t("-69343830770429238892077439877984867437350405464970.08434805422042264077734449605338645891340041899823", 117, RoundingMode.ROUND_CEIL, "-41083674204990584.0131798527406406987135724833192745343006865591258087525884504806388645170600356102712673427281129295"); + t("0.2119654136212323126", 70, RoundingMode.ROUND_UP, "0.5962407680193418420857572873464692462702426385958382203537195447939645"); + t("19279652049387273020376009630218485586509755555555555555555.677684976", 125, RoundingMode.ROUND_HALF_DOWN, "26814295878325615815.487734142403395997322444695201037467003923385142367719736702490378125777406755297158264517924654536720688"); + t("-313498433369129.627593263158", 28, RoundingMode.ROUND_FLOOR, "-67932.63465286048219530417783"); + t("-7.0086392063231841408472554923046199064463513056604142417817", 24, RoundingMode.ROUND_HALF_EVEN, "-1.91371782149136697991918"); + t("-589444444444444.4444444444446444444444444444444448444444444444444446444444444444444444444", 36, RoundingMode.ROUND_DOWN, "-83845.7318050585157528961599774820693"); + t("3788888888188888888.688888888888888888888888888848888888888888888888858888886888", 152, RoundingMode.ROUND_HALF_EVEN, "1558968.3196446675125585834575591738365487123411459073333941724143408075236949115581591001107762448583201246036760071357924907279302939443979626955918103"); + t("972", 57, RoundingMode.ROUND_DOWN, "9.90578174668388005162382985722725487054065393295548001091"); + t("-0.6225403379", 122, RoundingMode.ROUND_HALF_EVEN, "-0.85386490864810417446139242223704579775383669337492527468605085174671380271097345355635824581210228231438058485101414715493"); + t("-6.07065", 127, RoundingMode.ROUND_HALF_DOWN, "-1.824224978981950876078744611006975228341354706000078517439609660874414665770050047148302780021260654833992532777230361896997321"); + t("0.45051", 134, RoundingMode.ROUND_CEIL, "0.76659881777216534073261278063331624315569102370618916882741183945437994516350424573783851510247947005698846905242281453098451862075106"); + t("-499993979999999999999999.099999999999999999999999999999999999999", 51, RoundingMode.ROUND_HALF_EVEN, "-79369734.0586538024769891823793678472679371045448798"); + t("8339981218.707096826", 93, RoundingMode.ROUND_HALF_UP, "2027.93963898424630978731544433744810832205112815361986395554185910152571703973224610355148676"); + t("5", 74, RoundingMode.ROUND_FLOOR, "1.7099759466766969893531088725438601098680551105430549243828617074442959205"); + t("-602836625868614277182558405998788207727682153312872078934707624064548122569796141394032876539530061726270514889140359387497332920947541211111111111111", 90, RoundingMode.ROUND_HALF_UP, "-84475974443254434761529924288837486174134195509020.6834107157860402152618681061519243519503"); + t("-3", 148, RoundingMode.ROUND_DOWN, "-1.442249570307408382321638310780109588391869253499350577546416194541687596829997339854755479705645256686835080854489549966425423946110259714868950157"); + t("-8305.5", 9, RoundingMode.ROUND_CEIL, "-20.2514097"); + t("3148072213395670.331", 3, RoundingMode.ROUND_FLOOR, "146000"); + t("0.9256", 11, RoundingMode.ROUND_HALF_EVEN, "0.9745582044"); + t("583351089841025805313237803988895357243393040827171233166707013763413497333333333333333.111111111111178527451071608322745354624", 42, RoundingMode.ROUND_CEIL, "83555813370934767758145249193.7624714494513"); + t("1493", 11, RoundingMode.ROUND_FLOOR, "11.429307988"); + t("-953950767673708257696753762461.09313638337401406086", 38, RoundingMode.ROUND_HALF_DOWN, "-9844084220.1056115483531558258864528224"); + t("-748279.7337073", 90, RoundingMode.ROUND_UP, "-90.7865113232394794259241456796182711522658456748343049158144761169947830035296263069119735"); + t("-2070899157.5228065975707908451395054941152120630664228513844285133094", 133, RoundingMode.ROUND_FLOOR, "-1274.636401772002050657717314752437832383086022141853088094808306006793663483432239568855013588491311600599491763843352264279754946474"); + t("3.999999999999999999", 140, RoundingMode.ROUND_CEIL, "1.5874010519681994746194222182749583041511609062107148250883545261141091377641970723246199695031055934895113644621373651932307080132586729931"); + t("0.8276675580437422111", 34, RoundingMode.ROUND_DOWN, "0.9388984977568743253137928985771869"); + t("1877377777777777777777777777777777777777727777.77777777777777777777777977977777777777777777777777787", 127, RoundingMode.ROUND_HALF_EVEN, "1233627070690531.37219027174468903625208125660717461315316166590607838881303282413461822347802418625771570830720338588218181227"); + t("0.0000097915999105481789781896622159135386491874375271271205781225697", 61, RoundingMode.ROUND_CEIL, "0.02139363358422859511017173681136409752779142146004170833441572"); + t("-7.6", 13, RoundingMode.ROUND_HALF_EVEN, "-1.966095144983"); + t("-0.890863", 133, RoundingMode.ROUND_CEIL, "-0.9622109774805131071538890701864423396851866919504248974352878847507240555834153900360670999962314211252461611619498463436437127750576"); + t("-4888888880888898888.882888888888888888888888888888888888888888", 51, RoundingMode.ROUND_CEIL, "-1697214.45562741076524944471221069371510598655741579"); + t("-1875476291404.646832136844", 16, RoundingMode.ROUND_HALF_EVEN, "-12332.10440379986"); + t("-727254485018515249405829892559034000441.5581572", 129, RoundingMode.ROUND_FLOOR, "-8992811070003.09785363150909404003381523718558248740038115359244231710186719889142766281249273505415646887606060710072429242546657"); + t("0.605961668463485", 54, RoundingMode.ROUND_UP, "0.846216944990274330726413901099441758736571064274418565"); + t("-56568700064439584479241166160181", 150, RoundingMode.ROUND_CEIL, "-38387697715.7523854198906842672791885366604912890047624437778218480501243903148804685567032848097401544437904474683449321729596542949416392223722674414"); + t("0.00009873058", 102, RoundingMode.ROUND_UP, "0.0462186471705215784508051074218102551821879718288256865393864407751619570492992541877802564099994363022"); + t("346858", 100, RoundingMode.ROUND_UP, "70.26147109023508041813841399831643960505935370872605241752715147861145621736918749015854852318927233"); + t("-0.969532517", 95, RoundingMode.ROUND_UP, "-0.98973924942518373070239981119004658863771135938211168400916237791955115564706399333261333688699"); + t("0.00708", 1, RoundingMode.ROUND_HALF_EVEN, "0.2"); + t("4655555555555555555555555555555.555155555555555555555555555", 145, RoundingMode.ROUND_HALF_DOWN, "16697719883.7068392237889499351444334443323963952311009317046872786920092491101459663968872704108477857499148360535526565595952008728060647519304"); + t("-2569124342973866.1163427720737029985868", 120, RoundingMode.ROUND_HALF_UP, "-136960.408098207089120457279788004667734323377016517634638119067746936282386744369370481150087791381573332097833264577443"); + t("35385740083.708858823939108", 100, RoundingMode.ROUND_HALF_UP, "3283.039397256840024527696498336356691241104231764070062160814311062350270733229631690409424293597365"); + t("0.29563729108015982489584206268848882240942368908629636696923489547", 71, RoundingMode.ROUND_CEIL, "0.66617204587072327740359378500886973598187033972026650520781075471467275"); + t("78303972239555678655850978934090989634259862411014628928.928566477705172255104670025105898452541121323862241995786380218", 83, RoundingMode.ROUND_FLOOR, "4278201784839867409.2945847630151871986768589724844825559895492765087020495269553908"); + t("-35573433331441059313774361992356437929771", 95, RoundingMode.ROUND_HALF_DOWN, "-32888338032624.953107720835002113034883579141018670001606017591382435837700228940681206988835012"); + t("-9557294721488.3130980466242", 52, RoundingMode.ROUND_HALF_DOWN, "-21221.60986344088683966955692377890835442160813234567"); + t("-0.135112457700583566301292031766437426095672609984", 68, RoundingMode.ROUND_HALF_DOWN, "-0.51313518888533656788421986827147430603966207650106131414520723350447"); + t("-18925190.47626139942238356861967412363581848754964275829", 61, RoundingMode.ROUND_HALF_DOWN, "-266.4894904435214020877657157316686758749265462724433725488259"); + t("-90000000000003000000.000008059", 115, RoundingMode.ROUND_HALF_DOWN, "-4481404.746557214502133555004632605162762529786522668609154250725596784663397931181410599280299127604209224495097905"); + t("-0.41772586688222799756155997729786", 59, RoundingMode.ROUND_CEIL, "-0.74753314954295116225357074955677335387453210331659886493173"); + t("7.111557355", 136, RoundingMode.ROUND_HALF_DOWN, "1.923039650926229178604735256247754593379090482289527650829586749117718487773610873683873890482254374113906724364496861942397685418198872"); + t("127879775275555.481446113777777777", 49, RoundingMode.ROUND_UP, "50381.0585468395322175886584230657123015852629168"); + t("0.00000005784489216474877724561989979639", 129, RoundingMode.ROUND_HALF_EVEN, "0.00386742296644988497532741316068620202720835646396440160608528957386426624329112019275056570817559387824093157713075305529180174774"); + t("612420.05731611517853292423064111852736676359122511982393231524016080747310185476867732428924735662102179739733568869657281", 18, RoundingMode.ROUND_FLOOR, "84.9212676870125308"); + t("7033333337333359.3", 62, RoundingMode.ROUND_DOWN, "191596.27748680803958646080181129149514694743098777723192310813"); + t("-201248950077898659", 37, RoundingMode.ROUND_HALF_UP, "-586018.339843396975945078901639875129"); + t("-883889111577924745159561125469193106", 5, RoundingMode.ROUND_HALF_UP, "-959690000000"); + t("-51656434", 19, RoundingMode.ROUND_HALF_UP, "-372.4272704575396712"); + t("-524282.914523996765880269982436231057909853765", 54, RoundingMode.ROUND_HALF_UP, "-80.6346864787950851182740363238795500759345024865021861"); + t("-85.7797", 37, RoundingMode.ROUND_HALF_DOWN, "-4.41023272682039443830714883303023045"); + t("7.271", 96, RoundingMode.ROUND_FLOOR, "1.93730521801843273586335468913837992305016274981837296068606783135482582964967913973079197833799"); + t("-0.47", 45, RoundingMode.ROUND_HALF_UP, "-0.777498009734258665646121764035170090076203667"); + t("-224314369366707999500686372855555555555555555", 82, RoundingMode.ROUND_FLOOR, "-607601771851935.1288138352126676807870310353880211539794644861488852716066486894964"); + t("-2784203113597777777", 19, RoundingMode.ROUND_FLOOR, "-1406804.141826141932"); + t("-4815241586514362388507935013541", 85, RoundingMode.ROUND_UP, "-16886488957.88434779671164541433418860252736136440375459197633729577703958342968133086"); + t("941966530258603933850664016242078691006131295851254408955857629867", 47, RoundingMode.ROUND_DOWN, "9802687484019245427877.8823394662709852113836205"); + t("-0.685779765341593", 76, RoundingMode.ROUND_DOWN, "-0.8818503444565537962568233929300638131296378203705111385320085446958772114399"); + t("-0.7359315876619043241314664012465168621", 141, RoundingMode.ROUND_FLOOR, "-0.902843511794380293988586129168170796563195237048852176432881679799477009402067933694342367581501520858134961361043151939911685652962074605757"); + t("-950750288811013400.867290554394854", 34, RoundingMode.ROUND_FLOOR, "-983306.3007397972807069742121372335"); + t("648277466.9999992642307615408142285478524238939498550791", 132, RoundingMode.ROUND_HALF_EVEN, "865.473235875160020758450438181577138246574729364348223712625225764851480627343398500868108316898076850127545179705155303585869218657"); + t("0.13899724863018252921424361150126827626483", 69, RoundingMode.ROUND_HALF_UP, "0.518006728879787728388054527056626123614261162961699812102427752936389"); + t("1714144444844444444444444344444444449444444.4444044444444444474444444444444444144444444494", 10, RoundingMode.ROUND_HALF_UP, "119678408500000"); + t("403.446089524165034894", 154, RoundingMode.ROUND_HALF_DOWN, "7.38916169337692213525325525062984465850359370156151606567109623272882280360127269626674699532475329800017740188728520103899966266394616743965596895962817"); + t("5444444444446152901050228888888", 60, RoundingMode.ROUND_HALF_EVEN, "17592106959.6820954888762456299587087645198757486032797180848"); + t("-114444484444847444044.44", 137, RoundingMode.ROUND_HALF_UP, "-4855101.2248527808944266233514759852620665220331227122031724714903357712523262584170065900462015852363268526288830666787211628590015139633"); + t("522084998462894863541499172780283309097364914994420203969171536719406", 66, RoundingMode.ROUND_UP, "80521848857013917372799.1059024086300748342942591285333135058702099"); + t("0.435392457885124644595986403", 96, RoundingMode.ROUND_HALF_UP, "0.757926282379888888837766245000786788820013834183850049178359561809801447316489581200924188384141"); + t("-3.8935721385442976011377735", 2, RoundingMode.ROUND_HALF_UP, "-1.6"); + t("-433.33333333333333333333333333333333333333333", 94, RoundingMode.ROUND_HALF_UP, "-7.567295602164615900409134238090768259980213098093081962509532556578953403567108907302427063672"); + t("-1.96405012269067", 106, RoundingMode.ROUND_DOWN, "-1.252326360591893595397711200980579712115228348559464959243500935879859661668457378662606257717518884801728"); + t("-747670956.863185088818112418", 94, RoundingMode.ROUND_CEIL, "-907.6188429387329108680244415806856375442110616283347657548541747500891726146007590564192699135"); + t("344265231267985715960948408093", 15, RoundingMode.ROUND_DOWN, "7008596454.1036"); + t("-0.29299882485536763158121995771355500866627579669", 108, RoundingMode.ROUND_UP, "-0.664184331576811017917513660433896425479887817218943516305521978880908666274691992816987243677109716781859107"); + t("6666666666637812333", 56, RoundingMode.ROUND_HALF_EVEN, "1882072.0577593416853981327200201876305096441821945023663"); + t("200001000000006000000000000.000000000800200000000005", 36, RoundingMode.ROUND_CEIL, "584804522.313534015619379893393061337"); + t("0.2926446926031482613855877982925582859484772592073233338634463257761879682456993447046191", 90, RoundingMode.ROUND_HALF_DOWN, "0.663916635487765028294433140373294375718388458752601691378759226539360537477554105233076023"); + t("589903533444444", 39, RoundingMode.ROUND_CEIL, "83867.493914852236293999523978856285751"); + t("-81286379.19400304181947851", 73, RoundingMode.ROUND_UP, "-433.1841852414715507367246357434525648358138402121333520869366289535511019"); + t("88", 61, RoundingMode.ROUND_UP, "4.447960181138631042330726753444314393037398256193846111398692"); + t("-0.00000494273638171625551446228575273120497621304367539541050952672", 106, RoundingMode.ROUND_HALF_EVEN, "-0.01703422905257495800193994603804176592838973958683564829387222539356881219691972446128085308286725209421731"); + t("60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 25, RoundingMode.ROUND_HALF_DOWN, "391486764116886359542493600000000000000000000"); + t("90741.1111111111111111111111111111111111111111117111111111111111111111111111111111119111411111111112111111111111111111111111111111111111111", 60, RoundingMode.ROUND_HALF_DOWN, "44.9367194678249771145760921009744496665507538881955058935052"); + t("-690013612055299432321757605873170060477735507379119560869523", 12, RoundingMode.ROUND_FLOOR, "-88366140300900000000"); + t("-6155359169809588048082952836583473333", 73, RoundingMode.ROUND_HALF_DOWN, "-1832670826129.346048502765914394691508518863081252813739533233247195369593"); + t("68326884", 75, RoundingMode.ROUND_FLOOR, "408.81849818574808060604674931535764057557028561326253164555984258595593301"); + t("244444444444461143777777777777777", 26, RoundingMode.ROUND_UP, "62525915178.898206017958449"); + t("0.8953374858973832755", 101, RoundingMode.ROUND_CEIL, "0.96381923499234283231898080392173958070973498995598990913380414164623135680168838251624338868561685653"); + t("8991939599999999999999994999.99999", 87, RoundingMode.ROUND_HALF_DOWN, "2079462663.22075815856341417336591061839524258631896714137697031952258536274872217369811"); + t("0.690462942272742676751532815625279187056129488027207856597060572", 114, RoundingMode.ROUND_UP, "0.883853171986163079694794618430212840678202515561386595786269152185653089522632477465099425387650946065070916343249"); + t("75719802103844466", 21, RoundingMode.ROUND_DOWN, "423061.160864046998692"); + t("10619181585951520756602944410837134489192635990.3676563978023132", 71, RoundingMode.ROUND_DOWN, "2198013467502479.0675875002167760176311189065640051200729560685793217186"); + t("-311918564458442017777777777777777", 24, RoundingMode.ROUND_UP, "-67818327382.2641821865449"); + t("-833491860487451793535433", 119, RoundingMode.ROUND_DOWN, "-94109569.700301397436730926253968101543829940911878483391728678333738416241123954120821834783478783383432026817261533984"); + t("-84977.315052550094037964368619721451214565797794275538457099748296074165", 9, RoundingMode.ROUND_CEIL, "-43.9643849"); + t("32222222222.22222222222222222222222222222222622222222222222222222222226", 21, RoundingMode.ROUND_HALF_DOWN, "3182.1342364533467581"); + t("6513297136290104286", 138, RoundingMode.ROUND_HALF_EVEN, "1867527.31953390182413187869514553145190147659437655264635301666610615652579452025678251588750403191904842018612528550166761824287432238142"); + t("0.00076382543928426752", 32, RoundingMode.ROUND_HALF_UP, "0.09141091149732199701483252041043"); + t("3611877777777777777777.777779406246923690656006220062412312326981716181321645947268131068895412871451499999999999999999999", 99, RoundingMode.ROUND_HALF_EVEN, "15343025.7980007887865807945293129830840534435140838657349910842760585080058972879970261729282255252"); + t("-40293717208", 116, RoundingMode.ROUND_HALF_UP, "-3428.3023104197063949311038816898758106276284322425058998401680222700469335037409653136807878940911364102022071656227"); + t("7787.91401671", 55, RoundingMode.ROUND_HALF_DOWN, "19.82167644148460566913441427583630860471151077682012287"); + t("0.47", 91, RoundingMode.ROUND_HALF_DOWN, "0.7774980097342586656461217640351700900762036673253896094410557276424103201171193787441229706"); + t("-0.0755225114092798589854175080724526335566076675549193431", 157, RoundingMode.ROUND_DOWN, "-0.4226934075405126574058117551471732838626664653081280968300635172063651833290357182498994360703339293683511900569881591878949020089371834736902061982583689309"); + t("-52360853700002000000000000700000000000600003070000000000000000000000000000000000000000030000000000000000000.00004", 64, RoundingMode.ROUND_DOWN, "-374112517500849738634810617252887003.0122769089266994645782461595"); + t("-65487676112272882226870846203465", 131, RoundingMode.ROUND_HALF_UP, "-40307561608.66071207368267087673714962096804645425841005626471078118206394752109345291751227242559042179768958853899636289111110833"); + t("-71.365344054605344964091", 106, RoundingMode.ROUND_HALF_UP, "-4.147908057866116970307839816829426927803562284569324359809617592982680144050308383341980153519483270689907"); + t("1528072413437.52490543586105", 98, RoundingMode.ROUND_UP, "11518.112386831491151081625172529737293403968305476389112149630983882243644157405600949461534731595"); + t("-3585453773773674929561249263341.7", 136, RoundingMode.ROUND_CEIL, "-15305518355.97025866756533816519371498139183709624265760795423572611255136431116966822083145342881758381943123582917972274968678371100174"); + t("0.0270100014682237", 34, RoundingMode.ROUND_FLOOR, "0.3000370379020271231968986438612408"); + t("433333333333333333333333333333332333333333333333333333333333333333333333333333.33333333333333333333", 8, RoundingMode.ROUND_CEIL, "75672957000000000000000000"); + t("0.00408071517229179132246645648513478742679461980824654553958106221539505571569173079458028568702568181471355464606828018444412176203013988433587617751300363866021329442045753040442664217353227546275176299037438501539530364301425095790618411904925769266150445601007249922113237", 116, RoundingMode.ROUND_FLOOR, "0.15980073073240546546444029747839747281045690745425228624983683436189740430747846133237165445672790038965714307566954"); + t("-1777777777794453604883612906593952160619800310548273280294745424.577037881539084548733893998014383684526884104265911540476577075592333756531062525581494636114398756777024170411222235199046307637621111111111", 288, RoundingMode.ROUND_CEIL, "-1211413728558547521198.69450179073369355856291028892183569317685948273034304516703144069035372867902752239872006023685229918622962960190855312625455543959610302566016895047877354579163480968524973783173157763898474946220286833079183434485887628827054438104631599932507306682666438560055753"); + t("887888881848888.8", 15, RoundingMode.ROUND_HALF_EVEN, "96113.9013309963"); + t("-360024535664140424577095465929855", 55, RoundingMode.ROUND_FLOOR, "-71139482177.89278551991204798352404801953466014545497368"); + t("-80058426.142908258135063426846033379225", 75, RoundingMode.ROUND_HALF_UP, "-430.991808571496265041295982713563971189146219837491561570005359798491807846"); + t("33454023346945204444560160184778957668569113960303904328744688175729535658082509413934157504872808291397531212038349", 123, RoundingMode.ROUND_HALF_UP, "322217743452623756906112174886252855031.946808254688239220112725521310679893057921941460223211636875831319108083856685880945"); + t("-35555555555724069370063151534639549531254431617514793887088282226284020825796464214599422956284479846199433277848001814574135306733090966555860597689380879388023079954123621124801712", 86, RoundingMode.ROUND_FLOOR, "-3288282765779155020372516703226435857444839748690356920211197.4849066166596991379758403"); + t("0.000000003264764756879930049488474521306", 111, RoundingMode.ROUND_UP, "0.00148348775026010484762083034069938772521396710542519410661383048223949598566441345947585945084126968984859333033"); + t("-0.3522023", 43, RoundingMode.ROUND_CEIL, "-0.7062049043177165662874070734000035068223558"); + t("1730443717314108927800680048485870977674261295403034542284164133968299008850736924839159068101619861090331647391360845388069236486618535", 2, RoundingMode.ROUND_FLOOR, "1200000000000000000000000000000000000000000000"); + t("131513957159298235725599626962523", 307, RoundingMode.ROUND_UP, "50853862976.76304735967671698540416778083237370154188479681048919640977301011615711303941347680428831783697190428518683757106156984294328368878575466480544111677484397404812895261922881234648590818426600422253159934302108375219606666326146131593690041875558964169423188588672203882053673027953469026461598978"); + t("-9000000000000.008050030000000000000000000000000000900000000000002000000000002", 218, RoundingMode.ROUND_HALF_UP, "-20800.83823051904734705507864451021929278812803549200268410377447376473888051684412921197568029472087685397714299206865036318199163104972411243719322774348622237051889287146537267304740023519898270366470933250387436094"); + t("-0.7181450473601", 198, RoundingMode.ROUND_FLOOR, "-0.895510584254539763374657781434810373555061829876549094787205810544356467588760961084900026110831212293180596981675572910189289378179759360118261561097999408309114956743186858050925270963549881154433"); + t("35555555555555555555565555555555555555555555555555555555555555555555555555.555555555555551355555555555555555555555555555555555155555555558", 298, RoundingMode.ROUND_HALF_DOWN, "3288282765773960135322456.70738207669907666573801854325780852864743502668657845052719497328747140706939285138693687926449963514014556772497533645428183463172622748156419820713284695127160297253476421473145752971015472846862150609935877693858251159545306711929510223188962535055928768890803953428233"); + t("0.000000073971254559205485932114514426056809359247093418682007433094787", 128, RoundingMode.ROUND_HALF_UP, "0.0041977927661423745080131445840206963302128642385939319165473936618581274825275702271416385708134219408305625104137086811658166637"); + t("-46469684444444444", 96, RoundingMode.ROUND_HALF_EVEN, "-359520.154019010572977639759399839536901885202093542370223909617130177215032720463457845645742072"); + t("-0.46246305003767003372844436278416880527636329839060410959020759881953396240244438439428199232677783586050813586353378045749416000444054388732965293729534", 312, RoundingMode.ROUND_UP, "-0.77331959182167606924776027803398205320899763023518826886307371315086947858575537431339485926163589135382749843813955142774257079427602172476310526839994744598166760643712724172027427199854203447589802533732876678327215086353621195319231606207144538726999025711880226393878454280590219952411236251644324631614085"); + t("1666.66666666666666671779827084027333998713711669787599", 276, RoundingMode.ROUND_HALF_DOWN, "11.8563110149668760201417618478183304347791901320135064513563363809636935223296073181689929886394840268546216467195572299874824656296542162962740359016902018511782189799386239051706052965028079046572422672425756989604132470445845360463809535053900997034148603140196261430569139"); + t("2039999999999999999999999999999999999998999999999994999999999999999999999999998999999.9999999999999599999", 91, RoundingMode.ROUND_CEIL, "12682651410769994658761341750.72237606614731413293617490535285825160416844839097417300206858"); + t("328920.0475353909154164892500468", 185, RoundingMode.ROUND_FLOOR, "69.02876680061054148507206204804761116095653568607943007720565720203645272696676506381487840942193498948943894040540447693473765464447029017119014886412439605125795232946893723668619419"); + t("0.00000000936010787808", 168, RoundingMode.ROUND_UP, "0.00210746458247970297377076341509163306163094500277046623745208773927039247889139441537563112557754182846450607210421863486300585363560901915019116126181215517351244043721"); + t("6777777220962062876403386022.995", 295, RoundingMode.ROUND_FLOOR, "1892470405.124347140274194250582376551493717876487349777348206908938947461083225663898492168085957922647305698566237421516447257464526230620630286818994833798988169366590679614208773434120243363428693045437435809826476250876454126317187953116088087721025952458984853933353609444943465669944020071"); + t("0.0357571052179229880781459997500627128209991885257634578863821050415688609507531589830598020439824324072782023164544923786117339662910355901724672464666247728721181622802029342021220936899331325873948059328274027409823424997584365863528466", 156, RoundingMode.ROUND_CEIL, "0.329448436503376182227542380539339830148671351877347330278129598128657584504957741009690110384526934716774195104832627977110470669844584770714636194395250813"); + t("-0.9332579448760833984704279453638248670443933188222151526366949750006917425784302143750453315762792601019", 159, RoundingMode.ROUND_HALF_DOWN, "-0.977238492893904824865094847273703259021881695988207428717967699663806906368087329050179890177836506826428207601134187001839174860564838105230540298120930049498"); + t("0.4", 75, RoundingMode.ROUND_FLOOR, "0.736806299728077321155964566715961444383451623487636533851292298915447195101"); + t("552183047603813509686566028751310217018.804041214598837131361234519933478", 264, RoundingMode.ROUND_CEIL, "8204038500518.44773789391438055718293441898760334662984170656918899036016358823956701122250186292705560914263811039803329182597969567120054677528721729675696386711124721264474558213439260387378316551055272470484256007868511893881839180818562036223828236278832794154"); + t("-233333333333333333386069444061245584874163683787583656101103861791405369273224077720", 103, RoundingMode.ROUND_CEIL, "-6156382501492778048964491291.374095986336916007751157116185422186751521667000366427706292372918518538418"); + t("-9864684975759720100", 18, RoundingMode.ROUND_HALF_DOWN, "-2144672.94696894635"); + t("-966666666666666666666666666466666666666666666666666666661666666666.66666666662666666666666666666966666", 7, RoundingMode.ROUND_HALF_DOWN, "-9887631000000000000000"); + t("-6000000000000000001000000000000000000000000000000000000000008000000000000000000000000000002000000000000", 181, RoundingMode.ROUND_DOWN, "-18171205928321396589921629003734904.8347211383049016581155844877371008683219822310981673510859244947559018807892034763023056264860003933028638719908037626460826640855253136728310663"); + t("905596999929999999999999999.9999929999999899999999999929999919999999999", 91, RoundingMode.ROUND_UP, "967486673.71380287271265419891543812688044153309397444617426125395980611017831904796648804"); + t("1.30200511266788708694018", 4, RoundingMode.ROUND_HALF_DOWN, "1.092"); + t("-163779144454015040868024778652104861155107.2073", 304, RoundingMode.ROUND_CEIL, "-54712454616149.84418977529366614687482536072436725275516582520852664652849068949484189911831606262825626974327957549404404288539943932639651482039185391567868924097356103542857745660930295700971214740898126206714944261415055712750654570108835746686604676378368745847261462708527575345613524512987347236371"); + t("-6538917615589475.099960992838604434928057127638414468155214518645296549656781278025778633", 257, RoundingMode.ROUND_DOWN, "-186997.27960419976574988516161574403825660270141011185715547545414633976749369062014113721711880275748891050353830739330858788329073152031199801397123096230254112071841443373962070673095921163355098764045421726516671725134528497376952168032864987251497359909"); + t("53222222222.222292222222222222222282222220222222222222222222228222222222222222222222", 229, RoundingMode.ROUND_HALF_EVEN, "3761.528309180954593976538952686370247906174652720089218597698178819141201730582357187825519096220431323408596684801803306747322070164010402510920398297208694779359617695126245443805915801033262148244640700393543643046377324910934"); + t("66654713755630878750888888888888888888", 294, RoundingMode.ROUND_DOWN, "4054558982500.02700986820134594376840115124163436338859484486072358362206254694939867045408268059853111137541521389977958913261874740667544849998558765243764962401508022032836299546501823284546238102279106535660944025248600683928474131690499625944774392006779880972604204167008679947828112543291"); + t("-0.73445607397167371130459436773104", 306, RoundingMode.ROUND_CEIL, "-0.90223971959180057370319840811242973078705445774917692235720516165888631489205958335320463909466490763436288295134402799022259512420210552635494072057414939136185306611881394061367039090253834244604436819659695859666860373496003250543452929355036858720506065946733532228194955201475704495839306899938040585"); + t("0.0000099133847149042408080874", 40, RoundingMode.ROUND_UP, "0.0214819641170852795788014168824809088028"); + t("-0.3819353039", 307, RoundingMode.ROUND_HALF_DOWN, "-0.7255431863672597739966209179806070484597757636096318918354940359736458161971555746605317808318795846006010608924019292537852737565085161572427663554231567514594280432726072773136954892525279835020849650768498287368145308607626035353255513842333071361999678056884031345267063462855694744098863565550730843366"); + t("77777777777777777667693002.888888828836841012110751208875972662761390108377068904980123484522222222222222222", 267, RoundingMode.ROUND_HALF_DOWN, "426859721.662498084880747888680142039266548189927094400762036129726290797433963738730250066170964466327502281044101306960646208562564430665992429220418249028750827161989918980594343595540098229834767095235276477497105688610942305616632656935265681942805619736827501215"); + t("-0.26538273497717723393474970859231205890975045139564572526270147542920814667299600812458959335507089015350528862449061317081133992670844766919389996", 11, RoundingMode.ROUND_CEIL, "-0.6426249087"); + t("-26014819497210048971762456492356954992044068823083057865879544722578842492971228113486672601389030336951763149572390276212745078990608914925652120236669320", 211, RoundingMode.ROUND_CEIL, "-2963058816659042519814157238829288017211575281404017.164383538726684481531717577559527817991128822200740410660744185666165347869825419242671096023735646816984467570734210355339706756646314690384881626680189240567"); + t("0.40905503584930852", 200, RoundingMode.ROUND_HALF_DOWN, "0.74232470528406920537648009083596300397584699093446303624957811389728699671523032934447030612812035589519723228844950083739766847470591198535190724651292907369556015363896104981183942252771169615818625"); + t("-38264.0815468734", 57, RoundingMode.ROUND_DOWN, "-33.6974546727523211243122789757673939362173922047394205127"); + t("-0.30324153429", 115, RoundingMode.ROUND_HALF_UP, "-0.6718354176161675269050162406548851267446268974012058863513407182790818307997784132840207171517885526657507960197898"); + t("9188888888888888888888888888888888888888888688888884888888888888.8888888888888888888888288888488888884", 230, RoundingMode.ROUND_HALF_UP, "2094535216156839863174.5440227499163560225340608788020743244180314298130519339865389498196410907457431735076240331613079667362007127660241556265096642806005004307743615499688126058414327845649177701327682072316208427776028147944002"); + t("86425976362470923804433801010741211956.315746831411766746243845198", 297, RoundingMode.ROUND_HALF_EVEN, "4421280799056.3414701826616773547962477376739536106890518795962512157992891602684238637467753346170762016625816597483317860904665225577981143150506330622845304611262506204067228859477741306834002608582985131641005316148690121313992569747897164065569942482307035692332040914078117368813950159985495"); + t("800061641782864529412034961074380633668004313920510914417844222211532805382178", 79, RoundingMode.ROUND_UP, "92834160909444929909412852.56095831422139947981581211635565276874786289770782"); + t("6675417746231408148347290078711104234187.740620391", 28, RoundingMode.ROUND_FLOOR, "18828952058115.50014732730936"); + t("-400.00000000000000000000000000509050000000000400000000009", 196, RoundingMode.ROUND_DOWN, "-7.368062997280773211559645667190870381074231072797778976891869176630866196071721850604919563305812408403182343177517484814361823474416386991818242705002731326647941956958657145436929554593320532993"); + t("-0.00078", 306, RoundingMode.ROUND_HALF_UP, "-0.0920516408251588836906790760297809389653844461547368991866295076250818988912111923270118450245386986711905421937448783083199031045447649338630700387933064266987153600184564392928652884415869346894964177870616399554863307984153648663173530615395315059569389641149984683932917922621521354195507495236834379727"); + t("88608103900", 16, RoundingMode.ROUND_HALF_UP, "4458.182209133859"); + t("84444445079100000000666666666666666666", 144, RoundingMode.ROUND_HALF_UP, "4387229587818.56821702507643434079696450272071347784645832492256279852887210775592032516453140230325818451426540760583684651910807743235319182085"); + t("-1708", 294, RoundingMode.ROUND_FLOOR, "-11.953523934027669733633882218391380631635391658098690998649228699227634782437686286474315941472306565753697576105906047071833227833343708296817761389414161547230710512741297251588454596349403117164125836282776156582492341918414719989522710125034622526846447903431409211637676181603102993803354"); + t("-14845316421992069095411772620000000", 264, RoundingMode.ROUND_CEIL, "-245770537688.076561068481806295125599830706505268103427183900105872932014634046524459007960649330078412561103626541027189175837445703042495966814052069544145522635024669559953166280489770668637483956046334019987385953022140032908309690458322585628167922717720383548"); + t("84661266676665666.667966", 14, RoundingMode.ROUND_HALF_EVEN, "439098.12975534"); + t("4934767210", 123, RoundingMode.ROUND_FLOOR, "1702.50693680629812170132588780973760644471652641407445973026231435570652293275922154066663071758164347992107812430383569753"); + t("0.002327080432478904379726640250882256474787656699186240247259189", 271, RoundingMode.ROUND_UP, "0.1325166549844519360815734907714400857318883989867294948852937264096238619772999344706692577288558936664366649756027205946120021276513277811835034985036318287361291818612104784372409646129942931451861346811614216483112401247415968471218096532515027861925817925063193996913"); + t("0.009010026", 299, RoundingMode.ROUND_DOWN, "0.20808559408693857398882367934316338695192884834048904455721493557695047551902740153035014737383537927598982046590828400741992307712468801908569375267060237398631427156054587148349105945478348258573449301331606590905574089385895933288248026075297088633609502777920723476262815221925356689810140581646"); + t("0.46696430773907542717358556620239550882408055855380662252491219094637665798", 243, RoundingMode.ROUND_HALF_UP, "0.775820460409708277616346003200918229331130858451956906671393922674232209573750842108769518926196812888371055107689994481529602372780219876028046186947301698347149344879032698719175601310898640923657414028423940585749879624286041460050569669626"); + t("199076594298191201512126633182355935542645396813196012673832446444023216527999468662", 133, RoundingMode.ROUND_HALF_DOWN, "5839021407248950829316868959.853373370018502256648997870426383846859183754148974732998748466193686778992915147447662254914648501350218"); + t("-0.0205602708176959315098285259766", 177, RoundingMode.ROUND_CEIL, "-0.27395313643298104985398916882354238259029946770167652150626959708690263320143930751204774859723606959533794293671371216528239224712876784550097963520061144227020103002184252017"); + t("7", 294, RoundingMode.ROUND_HALF_DOWN, "1.9129311827723891011991168395487602828624390503458757662106476404472342761792307560075254414772857099045419139587907592279446152938642120131474866957124456140398881696814713797026267454466120440611477614163918062415786739274531418927810756678716910667942296081913837582196010428021559461503007"); + t("0.1379854479842055168", 41, RoundingMode.ROUND_DOWN, "0.51674676041584294123788352715535738090482"); + t("-0.3", 92, RoundingMode.ROUND_HALF_UP, "-0.66943295008216952188265932463993079330341768719530115088057856058043109348253372974406850914"); + t("961", 222, RoundingMode.ROUND_CEIL, "9.8682724032189739274385838621973926435822525417517248546620995780382490627702437369197812592450207942813963121722788951169181917121500565928298914290465010422744626180183505632964989234189024069154333299521424554764172002"); + t("-2.25", 230, RoundingMode.ROUND_DOWN, "-1.3103706971044483035708306402209981351197138228618158625513869028643499095980210544142279129945367988837581041230078847725151913682975012460734926972463667246327960923914262006031851753394870717379354358958637976532500929457339882"); + t("-2230000000000000000000000000000000000000090000000000000000000000000000", 298, RoundingMode.ROUND_HALF_DOWN, "-130647655617245878049111.3209197321106694910620262373276958849631343152086003356335579228230956562106731008578130049525398129639022166290018592846083896305609910095540739918166591990096860567533807849647251860236960195542940764701079208660813083213426511903696307229099531648276197916809597843839964"); + t("53132858493006936241185859883194778056627710102835504478840126743104772801842227856307762081", 204, RoundingMode.ROUND_FLOOR, "3759421842525817253068628987400.92577274501166159476109270459669059032135996796154035100023652746528314548728270405069123160995936061003028390573511210701810779876972120357727110384409883562323231927329961"); + t("914356211287430025055554", 101, RoundingMode.ROUND_HALF_DOWN, "97059594.628672067662582865269587888077992484540991466456287607855663528274778522707626368940398125642"); + t("0.12529522195533727004501484623610992705", 38, RoundingMode.ROUND_UP, "0.50039331979173687997858495494592131952"); + t("-0.1948791383473401686530791267473854369683635638791055239461046856605828827840768469880158091149537212544425407223464725930742442278515998696252268", 98, RoundingMode.ROUND_HALF_EVEN, "-0.5797691692900698707214888441221038040802120896480624344578923406854390123381805530700028542114528"); + t("-0.7355753005184995073565795303347315622405386146697302509609999465487822985253963717663507823712386", 267, RoundingMode.ROUND_FLOOR, "-0.902697790160520006581278531313596250350151435598641898216986610717161678924560052929211893650948579023293216237285464377481499144845132068655788358307812966870451415680591581722238915991280062859569180122430337918171821124711816479454954596549259707564850817337259889"); + t("0.0468744925205262220546712095144013627869789", 13, RoundingMode.ROUND_HALF_UP, "0.3605610913952"); + t("-0.82013806535094583897602", 131, RoundingMode.ROUND_UP, "-0.93604269099627917760946677937383673063563769119936349836077216879509868732293145856168480115392665713377355872876824044744088812704"); + t("-89999999999999999999999999.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", 193, RoundingMode.ROUND_CEIL, "-448140474.6557164708747482014038579471166749997342577684417612506262725664866429358423019933461384428283704100231247064811874071864293735091395290322168962786116542962008996065385047274602169655"); + t("-3500.0000000000000700000000000300000000000000000000030000000200090000000000019", 277, RoundingMode.ROUND_CEIL, "-15.18294485937831269832368028842714465959207313756867259143534959451468478349826423897420518604015730149184106654585360041576526724232349351483711156344287484713901494612555022546668258538694448754817591420929107905834481260722680404464720557194520345713588128090746235046451194"); + t("-977952.93307229352832855410868523883049399695813", 238, RoundingMode.ROUND_HALF_DOWN, "-99.25962981674191910928604886472716933800157429491026923004151528779084058550148643566272317314256071817436094419964201979565715136972113546576779805797222420828412446343659868868777123742816877931836181888239839522321801369905201218812718"); + t("9498987716424506959783876949816518420085004047464108131810353045727121741808833.204287335991992579735898537381892193985", 48, RoundingMode.ROUND_UP, "211783656393532095865918777.884120918568324733419"); + t("-0.38", 158, RoundingMode.ROUND_CEIL, "-0.72431564434417407099618571419117011713663198464084323426297952597403587789967371090919857503447258159721961837966804280634387066192973408817407291979835365801"); + t("40168113.041222808387937446436240364935125", 176, RoundingMode.ROUND_HALF_UP, "342.4736351132709841167562944002966021070686376429416048911377426949833507692865953329823267728448949604888315411011673910403072669806601569712258516834149278214860402669548703"); + t("473826941974297357877986", 107, RoundingMode.ROUND_UP, "77960254.897740723560389957785238069422153613940030435572179982524597686729660316650261135733186428857321936"); + t("14444444444924323333333333333333333", 135, RoundingMode.ROUND_UP, "243538119138.123754869982000934587757399479587743779094470818073142650363794375356406631225460107649197088392087726685375997778829530842"); + t("2125348457864951221903144604471428718188355763333272919771852486898428161129518596727440228509156572680921345086136213011457.335839089", 134, RoundingMode.ROUND_HALF_UP, "128571106468780255157054093575808898945106.78902321501477421172026895124899294568097454987965820902471613201455286196657294811391928819"); + t("20000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000048", 206, RoundingMode.ROUND_CEIL, "27144176165949065715180894696.794892048051077694890969572843654428033085563287658494871973768515010449601702702662017016622108188038292129512829222822518526901294988541922245351958559869681995384170293875819"); + t("-66829636509519043102445668134981756564186551037.2607", 77, RoundingMode.ROUND_FLOOR, "-4058102693406824.5047513770289783821373854162463798342500443333436971674695136"); + t("-3000000009327821861880259846523768460601056818253380768711892838425522465144782736049106093704984955792354502508328775951228903946964861466561639493152347423369425794650095111111111", 58, RoundingMode.ROUND_FLOOR, "-1442249571802191388794725553821152879063475497765485623301000"); + t("-0.7517618617125084747282953800857906239", 227, RoundingMode.ROUND_CEIL, "-0.90927118786514121024739501215218771099690746256030674896907382684397782011911974791002831144160056142112938854311115859305334384644127403752675240288009675150238567924551804517599326719689371040491237387804180889144565821669285"); + t("0.91772157027249689587397897698089046", 12, RoundingMode.ROUND_CEIL, "0.971785272907"); + t("65091141111111111111111111", 122, RoundingMode.ROUND_FLOOR, "402260412.92025581093745465305013260382563923007666892867987991960398216997573395084151229422291416923058566086159611162341"); + t("-528841445132917649295594922073404665061434461048515050569408646093118228814761676406092147646835258244915420746897430837198864.624593982751982581288943048791040449288622816700256159206109985912434973957837359646545848486706032128791922737173983428515863568670682234030811", 229, RoundingMode.ROUND_FLOOR, "-808677130002691652166391240496264417933556.9365980462954335563064572928839547146474823861680331368926847515711092351550293048479890804812852992979899151592673221926137981308890445710778305211573135538087232890711501679915940056701"); + t("92661408659816791616467691013640855275756395498701589284496286017197284842030996435128301", 135, RoundingMode.ROUND_HALF_UP, "452514985671921546696489099984.443765863229679953606644886694376119333833853457893368185840383316593126316073887975659970000172841972698"); + t("6", 155, RoundingMode.ROUND_HALF_UP, "1.8171205928321396588912117563272605024282104631412196714813342979313097394593018656471417041264170721263449324977024075270561199313106125835528154571296702"); + t("7.61955496604", 19, RoundingMode.ROUND_HALF_DOWN, "1.967779969365665886"); + t("-13842028480844961657244488", 2, RoundingMode.ROUND_UP, "-250000000"); + t("0.6676378321937073265468044398601544834537303835150398403301373175671087", 152, RoundingMode.ROUND_UP, "0.87400445453698381894314480749609127272216823435004904320151622756315549371172250350373231785969028690716416274388752784174488351103212052464763083059458"); + t("688627", 250, RoundingMode.ROUND_CEIL, "88.30690875275330741018514988739698506972295588987183303321212932879724465718758272298200770727003404039878461994213374550486574059143260649865568068284864031778776459833353105024226868679393633320663131043363444369890524435775107727395361362233398198"); + t("-7670396176211628308685.577208733037931099394844679146104423084423572483728771539", 236, RoundingMode.ROUND_CEIL, "-19721469.182921695093547685482295657613468886834710373805547159986039749942573115055240312222436282849073795719780473952821406478263978841984044931351367554210384209582310518966190638965582116778015096000562528493076984081914347204934615"); + t("-30043583223902702040869083924749543605076581242871489198797576213", 56, RoundingMode.ROUND_HALF_DOWN, "-3108736480210792708014.9249186175420405441251283437056631"); + t("227627601111.12986", 215, RoundingMode.ROUND_HALF_DOWN, "6105.7868681341650906108964351431545815523086481503740994542385456748310216589718565837605265800595561048692524332812870822229132063181651102147953966576526041884945469908911640355427157660450583550251804546433919217"); + t("-0.9299", 94, RoundingMode.ROUND_HALF_DOWN, "-0.9760650207511089750157148578202488144876851954514878110647932151227854872920308862156446148868"); + t("-0.39316734422", 100, RoundingMode.ROUND_FLOOR, "-0.7325868964506122421201081915055326576687848736241486498636624237850954848046015955730156526763159975"); + t("-0.0018461433322886031167759064954906148287790190688510251727333087918408280220125115484308222458313", 17, RoundingMode.ROUND_HALF_UP, "-0.12267473788045317"); + t("0.796461465332155625684", 73, RoundingMode.ROUND_CEIL, "0.9269470418325623587391199531978465025335120843504644060423746051132291914"); + t("62935", 47, RoundingMode.ROUND_HALF_DOWN, "39.776882781643413973272164444261857825120913064"); + t("-0.48524806922829530411207665826812053734423380994554551636693040129109537217672", 37, RoundingMode.ROUND_UP, "-0.7858167324037259260906640259340329526"); + t("-0.388888888888888888888888888888888888888888888888888888888888888888888888888888888", 135, RoundingMode.ROUND_UP, "-0.729919856647981544286633921895412619996667079944927408387578277188824136794624148970344925901096358665424378283400400359127349869486733"); + t("0.28017996262584712982121642622668544543536", 7, RoundingMode.ROUND_HALF_EVEN, "0.6543534"); + t("0.075033726214217103847126134635768727212106521410622356", 304, RoundingMode.ROUND_FLOOR, "0.4217795360463214825376829847903764053281431267101816186808037165911128067976956908949481204575713697337470207957316693826890517472637852358476163950513589257838002033122894245839577245551228499263781554862360162498304623781781749390108404558077717549456528049576732279811898214194801066995423533854237922"); + t("0.0003787128034637382307", 247, RoundingMode.ROUND_HALF_EVEN, "0.07234968800513707739504113961805705648321199981494116660204093024430623836914063048928063349504375165536144047802959052254371030097364778628522446405650131801846267117965376377005316321598994237054104324194855700511490568462074787758262449212443183"); + t("-97.7", 313, RoundingMode.ROUND_HALF_DOWN, "-4.605726956511356623954716187591951376851856663954493538063315662507659842179748449195198676231946421787073817843658505295817001632158563070359190046483939603741616663173404916372384663816517352171419458401702340908726306243564295435097915834844597009579177807007104042960168395862169925386693025593987433187809141"); + t("0.56419083861654508122", 226, RoundingMode.ROUND_DOWN, "0.8263080998314925680323013818345485913485687429898530249763347967728388092192634586470298901648603868821580343900726939796079111970590362630579633727298465541508217929662343802997700130171299009129437858009107789153783896969115"); + t("-0.6714765238002548198536653029841558902595788070187587236619410359925844124725168239014168432316042399473872155443429304693966265359749903752634695419913252503594281280825731841061949892008590474376588575406476492400927900856316514379194425689", 186, RoundingMode.ROUND_CEIL, "-0.875676330994893751202023808387073349267769527062292991057639944646772576343285461222699693847786844272017697010774945383711874829155002993972812020798077802982353048705942882628171637162"); + t("0.07267", 317, RoundingMode.ROUND_DOWN, "0.41730320484852793123507319108005240926886568781439605740094935447146409280762331493005613105793969955242456852576841078204626266159253216245494381358345278733365604794548720925755752410836551425939636687875491646445528783769792687283922166441082234885309061146244599902326889195812916057663126567910226336517194133741"); + t("0.0000572498204059824709657", 319, RoundingMode.ROUND_CEIL, "0.03854115358934384222742693615396901248100807870959169022627064192266014905582932852411303015171708180263452241780229400568528861602519908857770882340721242022161883688143834703414779449746220418161998624614114891771849684076301850542251212044018885428461043082985367168386726575821123037911344328552060807299882494814136"); + t("-4277627.3", 302, RoundingMode.ROUND_FLOOR, "-162.33081942829442756020452196566825717079892514106900675205838526588738834717030081423587022092675336178879546232955027767800064805306086362843051596761922802502857424442701860846305998218313182022095708367259421151436746476276668194439245825315202903071356428102880551285745234234834363303104177439879"); + t("-68201348470911845.292707373811090898088700720794056743192851794510374237096267642219522456182497", 165, RoundingMode.ROUND_HALF_DOWN, "-408567.973521257689158549629961676997803062456660650694513237669548748082512647308421613485867008647629249652196990829372991738712752857537649931452686228428061110139"); + t("-696465835372008", 273, RoundingMode.ROUND_CEIL, "-88640.7194681303904210885443328044233532263116973106844385381243238267285412422292729948589924203791649665577062183137997834992444580084277624049479134739393040086727580682518141368734147834857121202094101525496837110339612985899654578577212234651302053987884408334194892526"); + t("24080546809974110091212568679586727853670", 87, RoundingMode.ROUND_FLOOR, "28877224429860.9946207713821984891416311006353257859468951979876155789449556704149179063"); + t("7457393.43437", 48, RoundingMode.ROUND_HALF_DOWN, "195.372013345928774715852763125477907351911517602"); + t("-74444444666666.55555555555544446790319162253963697844590373566045234890291543046021846846219430039385214329228347031029613672685206808392725676272019022770522222222222222", 196, RoundingMode.ROUND_HALF_EVEN, "-42067.24764919115316867197711242387450365338453906037731719245794050290747198502371372236627806519323406894972269389054218204432340226488571295766362585911736929336984878565823880743278542456732724"); + t("-3639999999999999999999999999999999999999999999999999999999999999999.9999999999999", 252, RoundingMode.ROUND_HALF_DOWN, "-15382743361962356162613.0021132319087915944575964418379586463745087217666443497482520080594073254285823736123491046243473736808376710984529662740143780506848620030102528930859164572347836903515014260287279580010137404349912625732502921556579392867902011"); + t("0.7315908337092695666375022056578076356235105221808921353709298463676232163278234426348557626044716955501818424032030314691479611123490251049543727684169468025493402106300057672072", 123, RoundingMode.ROUND_FLOOR, "0.901064926139435647637937878571871422427966072200972650351755549126149338054359061683903027297597920397155388997536304459877"); + t("0.00171975", 36, RoundingMode.ROUND_FLOOR, "0.119808723049174424395230402535972217"); + t("0.8343325349154400826249721238595922294563282441", 203, RoundingMode.ROUND_FLOOR, "0.94141199253120460472023024058155924443685199594516850774136931284223482409411441594605658427934034788084067740271289155315660251591089521340801453127769583171443770207238323255961169712189082996457623635"); + t("-5721087797295844542738923039234684722864287493948759055", 207, RoundingMode.ROUND_HALF_EVEN, "-1788516169610944715.18707682952367134920780627420866192909334121776061417692485547420910297442163385323041050734345205971789554616105215643481705526093790107864182736757019737087107817634939148958359262241715"); + t("-100000000000000000000000000000000000000000000000000000000000000000000000000000000000", 82, RoundingMode.ROUND_DOWN, "-4641588833612778892410076350.919446576551349125011243637650692858684777869692844826"); + t("-0.37236022233266068271553500002086993646158754160651897964753957159130593602220337789649", 37, RoundingMode.ROUND_HALF_DOWN, "-0.7194287021190722121616311405030572973"); + t("48888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888.88888888888888888888888888888888888888888888888", 208, RoundingMode.ROUND_HALF_UP, "365653770162174559897292423536281591601060284117300834276689566.6516384269977803811644812244507129479898365891816831954805168121424036593483775649353090561806655778596659010235972306172338145785886414613173211"); + t("-667793248546201025693729872581641031450489332815563721803034611097988530823909195191892568658664272294856560373828579955061680117243385584153383897943999979015900156", 158, RoundingMode.ROUND_CEIL, "-8740722677729915506706098193894096089334228109460497215.36320291440403402698988040958239845092921025778169130427343107124941025564892122156863692040892869322"); + t("4", 127, RoundingMode.ROUND_FLOOR, "1.587401051968199474751705639272308260391493327899853009808285761825216505624219173273544213262220957022934761681322017903497659"); + t("-388038.5295", 128, RoundingMode.ROUND_HALF_DOWN, "-72.938744479235808280645684722402698098678833235326365547735476495887614800836387305997026593220105967450545460498413955532426019"); + t("-17220379448017623838812498837867720774761980064226195272693422584538286", 107, RoundingMode.ROUND_DOWN, "-258234485497344364313052.20145503728723475026055360856855176425554392489282659925016164391227659563380302673"); + t("0.68548569054366881844538350436600672", 283, RoundingMode.ROUND_HALF_UP, "0.8817242752954566050373479417449386190506410045184817163279985405768002643562412728711739514157817522183671872731650060479549998714733543978768638889340220690017117540816721531463718913369453497340082536093436927249421591518855030205569097471861046077558767193605687919205234081488285"); + t("824534383", 153, RoundingMode.ROUND_HALF_DOWN, "937.712251272767564330720989875355389506771775992251837357793540930914775754552925229388040183516361780038457037560493036473826462455311691527073749476893"); + t("6777726488667649026734171389333333333", 19, RoundingMode.ROUND_UP, "1892465683340.091545"); + t("-8321917769453977062820345844488063216342975081312051", 123, RoundingMode.ROUND_CEIL, "-202647448527556241.358958208690563308467341811277913668723991530951808295976657502137372641290418610560429039265286217571421"); + t("0.47896563593811208608259828584665321993124730444346504262624491371683021620393759376416051", 207, RoundingMode.ROUND_HALF_UP, "0.782410707317227002290849670254815795431314607629670151046045874554338517187969867293759275996936298706233971976230522086377796650344657951872006248469108825964194144349620152477364267439716017056587355561848"); + t("37", 248, RoundingMode.ROUND_HALF_DOWN, "3.3322218516459532600954505051851190044096166719500623591329666509804053424388656524249155835676616728837516508195704713351611835284990355300207521054531260016847735935000107867125930902559914928427495216152339208480657457619094988857859339792612925"); + t("-7717799522690596222369727887400403511890625196212228", 287, RoundingMode.ROUND_UP, "-197620122600135870.68500471771949867081436776754195900175907153911366086255065754474457192909600850503567830766751088723891525433308961851986842047625842064024091757240783681356073580281463483543892936097654037196375880829331262526312333260113392318604917204854099658126520812219480882636"); + t("7030211111.777777111", 199, RoundingMode.ROUND_CEIL, "1915.679222577208459219547638018692281290140599805012211781457371521357546455570950306797458998230507361234155007678278158082496138317178737762378520222816935546284643435357655847196707199314198118361"); + t("-0.008286111", 243, RoundingMode.ROUND_FLOOR, "-0.202356386513239687003236027126001198818178349249043461480949666892946537196577408887359805289037321972203926469266307346738119521212222023437746969337355725928724375768712300408484411524841689520072799421041328314621814038674281054735502760246"); + t("-9709711817.9257580096", 168, RoundingMode.ROUND_FLOOR, "-2133.38275461679295783987332271203151653140396591095275913328398034729893752003357377325096814246882781342671859643235850225118855419358836423774449193411973967126514024"); + t("0.2", 46, RoundingMode.ROUND_CEIL, "0.5848035476425732131013574720275845557060997271"); + t("-11", 125, RoundingMode.ROUND_FLOOR, "-2.2239800905693155211653633767221571965186991280969230556993458086604009830829759744897580544816262737484821534121261317251579"); + t("0.957879295825927826142564373360821131270801415966019238713966", 109, RoundingMode.ROUND_HALF_DOWN, "0.9857578905388967230426246816655261862702534477973555994356503867232804550175012371428559636272064749391546019"); + t("-274794195303195669383690179150393637278", 61, RoundingMode.ROUND_UP, "-6501334600143.956003508608845101493972662138482039189675231797"); + */ + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalCeilTests.cs b/DecimalSharp.Tests/BigDecimalCeilTests.cs new file mode 100644 index 0000000..98e12ac --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalCeilTests.cs @@ -0,0 +1,89 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalCeil")] + public class BigDecimalCeilTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Ceil() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -100, + ToExpPos = 100, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).Ceil().ValueOf()); + }; + + t("0", 0); + t("-0", "-0"); + t("Infinity", double.PositiveInfinity); + t("-Infinity", double.NegativeInfinity); + t("NaN", double.NaN); + + t("1", 0.1); + t("1", "0.4999999999999999"); + t("1", 0.5); + t("1", 0.7); + t("-0", -0.1); + t("-0", "-0.4999999999999999"); + t("-0", -0.5); + t("-0", -0.7); + t("1", 1); + t("2", 1.1); + t("2", 1.5); + t("2", 1.7); + t("-1", -1); + t("-1", -1.1); + t("-1", -1.5); + t("-1", -1.7); + + t("-0", "-0.999"); + t("2", "1.0000000000000000001"); + t("2", "1.0000000000000000000000000000000000000000000000000000000000000000000000000000001"); + t("1", "1e-9000000000000000"); + t("-0", "-1e-9000000000000000"); + t("-0", "-9.9e-9000000000000001"); + t("9.999999e+9000000000000000", "9.999999e+9000000000000000"); + t("-9.999999e+9000000000000000", "-9.999999e+9000000000000000"); + t("-Infinity", "-1e+9000000000000001"); + t("5.5879983320336874473209567979e+287894365", "5.5879983320336874473209567979e+287894365"); + t("-5.5879983320336874473209567979e+287894365", "-5.5879983320336874473209567979e+287894365"); + + t("-2075364", "-2075364.364286541923"); + t("60593539780450631", "60593539780450631"); + t("65937898671515", "65937898671515"); + t("-39719494751819198566798", "-39719494751819198566798.578"); + t("92627382695288166557", "92627382695288166556.8683774524284866028260448205069"); + t("-881574", "-881574"); + t("-3633239209", "-3633239209.654526163275621746013315304191073405508491056"); + t("321978830777554620127500540", "321978830777554620127500539.339278568133088682532238002577"); + t("2074", "2073.532654804291079327244387978249477171032485250998396"); + t("677676305592", "677676305591.2"); + t("1", "0.0000000000006"); + t("39181479479778357", "39181479479778357"); + t("1", "0.00000000000000000087964700066672916651"); + t("896", "896"); + t("115083055948552475", "115083055948552475"); + t("9105942082143427451223", "9105942082143427451223"); + t("276312604693909858428", "276312604693909858427.21965306055697011390137926559"); + t("1", "0.0000252"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalClampTests.cs b/DecimalSharp.Tests/BigDecimalClampTests.cs new file mode 100644 index 0000000..2a165a3 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalClampTests.cs @@ -0,0 +1,60 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalClamp")] + public class BigDecimalClampTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Clamp() + { + var t = (BigDecimalArgument x, BigDecimalArgument min, BigDecimalArgument max, string expected) => + { + BigDecimalTests.assertEqual(expected, new BigDecimal(x).Clamp(min, max).ValueOf()); + }; + + t("-0", "0", "0", "-0"); + t("-0", "-0", "0", "-0"); + t("-0", "0", "-0", "-0"); + t("-0", "-0", "-0", "-0"); + + t("0", "0", "0", "0"); + t("0", "-0", "0", "0"); + t("0", "0", "-0", "0"); + t("0", "-0", "-0", "0"); + + t(0, 0, 1, "0"); + t(-1, 0, 1, "0"); + t(-2, 0, 1, "0"); + t(1, 0, 1, "1"); + t(2, 0, 1, "1"); + + t(1, 1, 1, "1"); + t(-1, 1, 1, "1"); + t(-1, -1, 1, "-1"); + t(2, 1, 2, "2"); + t(3, 1, 2, "2"); + t(1, 0, 1, "1"); + t(2, 0, 1, "1"); + + t(double.PositiveInfinity, 0, 1, "1"); + t(0, double.NegativeInfinity, 0, "0"); + t(double.NegativeInfinity, 0, 1, "0"); + t(double.NegativeInfinity, double.NegativeInfinity, double.PositiveInfinity, "-Infinity"); + t(double.PositiveInfinity, double.NegativeInfinity, double.PositiveInfinity, "Infinity"); + t(0, 1, double.PositiveInfinity, "1"); + + t(0, double.NaN, 1, "NaN"); + t(0, 0, double.NaN, "NaN"); + t(double.NaN, 0, 1, "NaN"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalCmpTests.cs b/DecimalSharp.Tests/BigDecimalCmpTests.cs new file mode 100644 index 0000000..882e58d --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalCmpTests.cs @@ -0,0 +1,1042 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalCmp")] + public class BigDecimalCmpTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Cmp() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument a, BigDecimalArgument b, int? expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(a).Cmp(b)); + }; + + t(1, 0, 1); + t(1, "-0", 1); + t(-1, 0, -1); + t(-1, "-0", -1); + t(0, 1, -1); + t(0, -1, 1); + t("-0", 1, -1); + t("-0", -1, 1); + t(0, 0, 0); + t(0, "-0", 0); + t("-0", 0, 0); + t(-0, "-0", 0); + t(0, "0.1", -1); + t(0, "-0.1", 1); + t("-0", "0.1", -1); + t("-0", "-0.1", 1); + t("0.1", 0, 1); + t("0.1", "-0", 1); + t("-0.1", 0, -1); + t("-0.1", "-0", -1); + + t(double.NaN, 1, null); + t(double.NaN, -1, null); + t(double.NaN, 0, null); + t(double.NaN, "-0", null); + t(double.NaN, 4, null); + t(double.NaN, double.NaN, null); + t(double.NaN, double.PositiveInfinity, null); + t(double.NaN, double.NegativeInfinity, null); + t(double.NaN, "4534534.45435435", null); + t(double.NaN, 99999.999, null); + t(1, double.NaN, null); + t(-1, double.NaN, null); + t(0, double.NaN, null); + t("-0", double.NaN, null); + t(double.PositiveInfinity, double.NaN, null); + t(double.NegativeInfinity, double.NaN, null); + t(double.PositiveInfinity, 1, 1); + t(double.PositiveInfinity, -1, 1); + t(double.NegativeInfinity, 1, -1); + t(double.NegativeInfinity, -1, -1); + t(double.PositiveInfinity, 0, 1); + t(double.PositiveInfinity, "-0", 1); + t(double.NegativeInfinity, 0, -1); + t(double.NegativeInfinity, "-0", -1); + t(double.PositiveInfinity, "354.345341", 1); + t(double.PositiveInfinity, "-999e999", 1); + t(double.PositiveInfinity, double.NegativeInfinity, 1); + t(double.NegativeInfinity, double.PositiveInfinity, -1); + t(double.NegativeInfinity, double.NegativeInfinity, 0); + t(double.PositiveInfinity, 123, 1); + t(3, double.NegativeInfinity, 1); + t(1, double.PositiveInfinity, -1); + t(1, double.NegativeInfinity, 1); + t(-1, double.PositiveInfinity, -1); + t(-1, double.NegativeInfinity, 1); + t(0, double.PositiveInfinity, -1); + t(0, double.NegativeInfinity, 1); + t("-0", double.PositiveInfinity, -1); + t("-0", double.NegativeInfinity, 1); + t(1.21123e43, double.NegativeInfinity, 1); + t("-999.0", double.PositiveInfinity, -1); + t("657.342e-45", double.NegativeInfinity, 1); + t("-0", double.PositiveInfinity, -1); + + t(0, "0.000000009", -1); + t(0, "-0.000000009", 1); + t("-0", "0.000000009", -1); + t("-0", "-0.000000009", 1); + t("0.000000009", 0, 1); + t("0.000000009", "-0", 1); + t("-0.000000009", 0, -1); + t("-0.000000009", "-0", -1); + t(0, "5.5", -1); + t(0, "-5.5", 1); + t("-0", "5.5", -1); + t("-0", "-5.5", 1); + t("5.5", 0, 1); + t("5.5", "-0", 1); + t("-5.5", 0, -1); + t("-5.5", "-0", -1); + t(1, "0", 1); + t(1, "1", 0); + t(1, "-45", 1); + t(1, "22", -1); + t(1, 0144, -1); + t(1, "0144", -1); + t(1, "6.1915", -1); + t(1, "-1.02", 1); + t(1, "0.09", 1); + t(1, "-0.0001", 1); + t(1, "8e5", -1); + t(1, "9E12", -1); + t(1, "1e-14", 1); + t(1, "3.345E-9", 1); + t(1, "-345.43e+4", 1); + t(1, "-94.12E+0", 1); + t("0", "0", 0); + t(3, "-0", 1); + t(9.654, 0, 1); + t(0, "111.1111111110000", -1); + t(-1, 1, -1); + t(-0.01, 0.01, -1); + t(54, -54, 1); + t(9.99, "-9.99", 1); + t("0.0000023432495704937", "-0.0000023432495704937", 1); + t(100, 100, 0); + t(-999.99, "0.01", -1); + t("03.333", -4, 1); + t(-1, -0.1, -1); + t(43534.5435, "0.054645", 1); + t("99999", "1", 1); + t(0.04, 0.079393068, -1); + t(0.023, 0.04840192819, -1); + t(0.021879, 0.02, 1); + + t("0", "-7502", 1); + t("-1", "-0.000000000000000000295176", -1); + t("2.9", "3.23360", -1); + t("1.14", "4289", -1); + t("-3", "0", -1); + t("0.00000000000000551", "-3958.43", 1); + t("-13", "0", -1); + t("-23.382", "-16.1", -1); + t("-176.85", "0", -1); + t("1.38497", "-0.0000000561", 1); + t("3.90", "18.124", -1); + t("-239.52", "-0.00000000000066862", -1); + t("5.7", "2248.28", -1); + t("-0.00000000012", "0", -1); + t("29", "-5", 1); + t("0", "-54", 1); + t("3", "-1.1", 1); + t("-461.9", "-13803", 1); + t("-1", "0.00054428", -1); + t("-0.000000000000000683", "7", -1); + t("2", "1", 1); + t("118.608", "-4.8", 1); + t("3", "0", 1); + t("83.5", "44.9", 1); + t("-3", "-2.86", -1); + t("1138.06", "47.08", 1); + t("-2.3", "3", -1); + t("-848", "0", -1); + t("5", "2", 1); + t("11.3", "-176.3", 1); + t("-302142", "3.8", -1); + t("-9", "-38", 1); + t("0", "-1", 1); + t("6161", "-3", 1); + t("8", "0", 1); + t("-1334", "-14", -1); + t("3.593", "0.000000000000059975", 1); + t("0.0000000000000000847", "-1186.11", 1); + t("4.62", "14.47", -1); + t("0", "-319", 1); + t("23168", "8.3485", 1); + t("-16", "-1.6", -1); + t("64.3", "2108.4", -1); + t("4", "-1", 1); + t("-0.50346", "-319.6", 1); + t("10910.0", "-0.00000000000000000314208", 1); + t("1", "0", 1); + t("-0.0000000000000552", "0.00000000015", -1); + t("0", "16", -1); + t("38.4", "35.83", 1); + t("-1.1", "-0.000002850", -1); + t("0.000000000000011", "1.2", -1); + t("-50.66", "2.2", -1); + t("-1187", "5", -1); + t("174", "-1.8175", 1); + t("651.1", "-11.332", 1); + t("-1", "-0.000000000000000011", -1); + t("7156", "4.84", 1); + t("1", "3", -1); + t("0", "77487", -1); + t("51.7181", "17", 1); + t("13.132", "0.000000000000029446", 1); + t("5.4", "0.000000000000000006325", 1); + t("4.1", "-2.42", 1); + t("-5.2", "-44.1", 1); + t("-6", "15.018", -1); + t("-27.949", "-1170.9", 1); + t("0", "0.0000000000000000120", -1); + t("-3.7", "-52.1", 1); + t("-17.43", "0", -1); + t("-1.4", "-11737", 1); + t("-7.17", "615.40", -1); + t("-1", "-0.000000000000000389", -1); + t("0", "-11.7", 1); + t("0", "-0.0000039894", 1); + t("-14.15", "-0.0000011139", -1); + t("-16260", "-3.97", -1); + t("-0.00000066", "-1.3", 1); + t("-818", "0", -1); + t("-3", "-30020.5", 1); + t("-3.328", "-28.16", 1); + t("-74", "2", -1); + t("-30332", "-1.61", -1); + t("-0.00000000000000494", "0", -1); + t("-2.1", "11.6037", -1); + t("-0.0000000000000013762", "-5273", 1); + t("-0.00000000000000000002353", "1188", -1); + t("-0.00000000000000033619", "-4", 1); + t("3.2", "-597.81", 1); + t("14265", "0", 1); + t("-18.8703", "1", -1); + t("-4.5", "-146.5", 1); + t("-259.7", "0", -1); + t("-72.57", "4.3", -1); + t("0.0000015", "9.06", -1); + t("490815", "0.0000000000000000000385", 1); + t("0.614", "-0.000000000000000001154", 1); + t("1.2", "0", 1); + t("-1.8", "-436269", 1); + t("0", "-7", 1); + t("-3.18290", "-453.85", 1); + t("5.645", "1", 1); + t("8.426", "1.0", 1); + t("-6702", "-0.000003053", -1); + t("0", "-0.0000000472", 1); + t("-13.789", "0.12167", -1); + t("0", "-22472", 1); + t("769.0", "0.00000019970", 1); + t("0", "-145.1", 1); + t("-307", "-1", -1); + t("1", "-0.000015", 1); + t("3", "-4", 1); + t("7", "3.791", 1); + t("-0.0000000000000021", "0.00000414", -1); + t("-2", "0.0486", -1); + t("-4", "-0.00268", -1); + t("0.0000000000791", "-4.97", 1); + t("-13795", "3", -1); + t("-13.197", "0", -1); + t("0", "-4.7", 1); + t("3.7", "0", 1); + t("10.3925", "7.312", 1); + t("2.263", "7.388", -1); + t("-6.0", "-2", -1); + t("1", "-1", 1); + t("1.987", "32454", -1); + t("-0.361", "-200.6", 1); + t("5.0", "-7", 1); + t("-6.2", "-0.0056", -1); + t("-3.8", "1", -1); + t("-9.3", "-7.64", -1); + t("38364", "-127.311", 1); + t("-1.6", "-3.06", 1); + t("1", "-2", 1); + t("3.952", "5", -1); + t("566", "125.359", 1); + t("1078.97", "496", 1); + t("0.000000000097586", "-0.000000000000000000027457", 1); + t("-37.5", "-28572", 1); + t("412", "-0.0000000000000001572", 1); + t("0.00000024221", "-35.8881", 1); + t("25.8", "0.0000000000000000000242", 1); + t("0.30", "0", 1); + t("-26.440", "-3.64", -1); + t("1.15", "-3229", 1); + t("-137.1", "2", -1); + t("0.00000000077", "53558", -1); + t("0", "2.6", -1); + t("-3", "-6", 1); + t("-0.0000000000000000139", "-0.0005289", 1); + t("-0.00000000000000000697", "-1.309", 1); + t("-0.0000045", "-8.3", 1); + t("-2", "-1.3", -1); + t("-1.42209", "-1.74", 1); + t("-608.88", "25.3", -1); + t("0", "-1", 1); + t("5.6", "-4", 1); + t("7.17", "-4", 1); + t("56.6", "8218.4", -1); + t("68.33", "0", 1); + t("5.0", "1", 1); + t("32.734", "-9", 1); + t("0", "20837.0", -1); + t("-0.0000000000000000013950", "-3364.72", 1); + t("3.66", "-0.0000000000000000536", 1); + t("-1471.14", "6", -1); + t("0", "-0.0000013", 1); + t("1", "-5", 1); + t("-10449.8", "-58.424", -1); + t("0", "0.0000000000000000017122", -1); + t("0.000000000000026585", "4.1", -1); + t("-7", "0.00000000000000000920", -1); + t("0.00000000489", "0.00000000000000000036325", 1); + t("0", "104674", -1); + t("-1.30063", "0.000000004051", -1); + t("0", "2", -1); + t("-3", "0.00150", -1); + t("-407.95", "495.290", -1); + t("24533.8", "-2539", 1); + t("1", "0", 1); + t("-43.4", "0", -1); + t("-1399", "16.89", -1); + t("-232480", "0", -1); + t("3", "-1", 1); + t("6.2", "12.2", -1); + t("-23.38", "0.0853", -1); + t("-18.2", "1", -1); + t("0.002118", "-16.9821", 1); + t("8819.2", "28.744", 1); + t("-2", "-5", 1); + t("-2.10", "9.2620", -1); + t("0", "-5", 1); + t("23963.9", "0", 1); + t("-0.00000045", "0", -1); + t("2", "2", 0); + t("-3.444", "3", -1); + t("0.0000016140", "1.5132", -1); + t("0", "-1", 1); + t("-1", "-7", 1); + t("1", "-869.7", 1); + t("0.000000000000016", "-1609.8", 1); + t("651.3", "2.923", 1); + t("270.901", "5.2", 1); + t("0", "-2.6", 1); + t("0.000000000020617", "0.0000000096018", -1); + t("4.32", "-7", 1); + t("-1.5", "-23.7", 1); + t("1.2497", "-58.42", 1); + t("-6.4", "2.24", -1); + t("0", "1002.3", -1); + t("265.64", "26.7", 1); + t("387.4", "757.85", -1); + t("0", "6.525", -1); + t("1120.24", "-0.000000000000000000232098", 1); + t("67.22", "0", 1); + t("67", "-3.1", 1); + t("-1.01", "0.00059917", -1); + t("-0.000000000000091884", "2.7", -1); + t("171", "4", 1); + t("0", "-367347", 1); + t("95.1", "-0.000000114267", 1); + t("62.4", "-5", 1); + t("11627.8", "9.844", 1); + t("-1", "2.33", -1); + t("-14", "0", -1); + t("-55", "7", -1); + t("-22.460", "872.15", -1); + t("-0.00000000027029", "2.05", -1); + t("-0.0000000000000004846", "17.73", -1); + t("3.6", "0", 1); + t("-3.233", "0", -1); + t("-3.878", "-383", 1); + t("-0.0000000000174", "20.7", -1); + t("0.0000000000000000000126", "-2.229", 1); + t("-2.307", "14.8000", -1); + t("-563.79", "0.000000000000000069934", -1); + t("-315.71", "-0.00832", -1); + t("7", "0", 1); + t("188.9", "-2.883", 1); + t("0", "14.5720", -1); + t("2", "5389.3", -1); + t("-2413.1", "-28", -1); + t("0", "-98.587", 1); + t("3", "0", 1); + t("17930.7", "1880.31", 1); + t("-1", "-0.00000000000000000272", -1); + t("0.00000000000000000002288", "51.0841", -1); + t("-1.004", "-14799", 1); + t("-0.0024973", "-6", 1); + t("-0.00000000000054", "6", -1); + t("0.0009288", "-5.2", 1); + t("-45.4", "-0.000042102", -1); + t("-56.1", "1793.86", -1); + t("-68.425", "0.0000000000000068415", -1); + t("-2.20", "0", -1); + t("136.51", "0", 1); + t("-5.9773", "45", -1); + t("-6996", "60.60", -1); + t("0.00000000773", "-2.6", 1); + t("-3827", "-42.150", -1); + t("-4", "3277", -1); + t("0.0000000000000201", "-0.00000000000000094", 1); + t("7497.2", "-45738", 1); + t("5.20", "2", 1); + t("139673", "0.000013", 1); + t("258285", "0.00000000000338", 1); + t("20.6", "0", 1); + t("5", "45.3", -1); + t("0", "0.00000000000000000010937", -1); + t("2", "-392.465", 1); + + t("-0.00000000000004475220262613", "390046.9220288808", -1); + t("-52", "-7", -1); + t("-7137400653786386", "-1220454", -1); + t("19.76074721670306", "39433637.5", -1); + t("495810.901671347", "-201199464.42718987", 1); + t("2180987378927.828", "28150984.022786039", 1); + t("364.263", "1334", -1); + t("-4.541827796913", "0.000000000720283699415669", -1); + t("0.000000000000533031300116917190", "-733584.206", 1); + t("-0.0000000000000019761199", "-6724.9979821490", 1); + t("0.00000000012335234299864", "56.021423640836509", -1); + t("17752.992435030", "513735.52129558557", -1); + t("-341665592090.67519", "895755.23903", -1); + t("-0.01174948256069749", "38841.427732372", -1); + t("2067269955.10633", "-215483633", 1); + t("58373", "-0.000000000000000208432238083784077", 1); + t("2821.0921360930698", "-0.0019370832810573843", 1); + t("-1", "-6987341307332550", 1); + t("-0.000000000000000135940520450", "-7", 1); + t("368879186519841.03", "3.86407044811851", 1); + t("54.8552188726690", "-17618.8325331", 1); + t("0.00000000719285162", "3.0", -1); + t("-24541949382.5", "12000388993272705.7", -1); + t("-0.00000000000000016019271145", "-5010014644.83398", 1); + t("0.00000342615147619", "38.8937553143", -1); + t("0.000000000000030", "698637", -1); + t("-940562183996", "-9538.76857523965", -1); + t("0.7992283723", "-301.642", 1); + t("-943394092028892", "0.00000000000249028944", -1); + t("0.0000000065", "19.8", -1); + t("-0.00000024892", "1.081095088", -1); + t("4693767.27", "0", 1); + t("241.51552", "-0.000000000029998424146", 1); + t("4.70", "-3889836.808618", 1); + t("-31", "22.1677904", -1); + t("-8", "0.0000000000000018564862859", -1); + t("-2.82", "-0.1308117625", -1); + t("-0.000000000000000490813322", "9628302045.4", -1); + t("14", "-1", 1); + t("-21665490839.0", "-308.104922674", -1); + t("-5", "-6.6", 1); + t("20.356245251", "-2629.4181", 1); + t("-1.39", "24102492360.03791", -1); + t("26.56", "-81.84491435616642", 1); + t("12733804882", "3.16734", 1); + t("0.0000000000001331522614064615", "-62.298429591", 1); + t("4.5417", "-0.0000000000000000000906964635852953", 1); + t("5.0", "3.99206", 1); + t("28282932454425", "20112043684.32", 1); + t("-119.144720881", "-129.74436439545", 1); + t("740279.3975", "18685368847070828", -1); + t("-194303.7", "0.000000000000006199756267389375", -1); + t("0.000000000000000002405090", "-0.00000000979604845", 1); + t("-0.0001603124275271", "0.000000006060544102736781", -1); + t("-179.52", "-76.6", -1); + t("9736.4996007851800", "99.6", 1); + t("-0.0000000000000000000126060214789203821", "6748323899.81", -1); + t("-0.0000076569074016550", "0.000000000525779058", -1); + t("0.0000000000000000047090003506832525", "0.00000000000000011759", -1); + t("-286334697213252", "8557782748357", -1); + t("-0.000000025274118612780187", "-127000540", 1); + t("0.00000000610055019436568", "-87.3", 1); + t("-1560822.78", "360857.435", -1); + t("243209397988565176", "-2171.0", 1); + t("1089364.8", "-7", 1); + t("5", "-195.43311519499808", 1); + t("0", "-12.6", 1); + t("-8917436.7369", "-2412090", -1); + t("0.0000000000258", "-0.000000000000000001137187844109", 1); + t("65611", "-0.00000000000527362056737", 1); + t("0.0000000000000000000113412508151534071", "-4.9964", 1); + t("20156417.0", "0.0000000000000253800552009", 1); + t("32.967316", "-176195213.7000883", 1); + t("-542212737079077800", "-593.88569405080", -1); + t("-0.000000000000000004199278271388794", "57186245414.80793", -1); + t("0.00000004507194567013278", "1.0", -1); + t("43551631176247", "-2195", 1); + t("-4.6", "0.00008016", -1); + t("-0.000013384535", "3437784.58", -1); + t("0.00000000000000002007911523", "-1.34", 1); + t("2.5", "-39.06", 1); + t("0.0000000000000000051", "2", -1); + t("0.00012813936789257785", "1021.0303931", -1); + t("0.00000000000000000132229", "47.1", -1); + t("-0.00002120044", "0.0000000000000000064902789323", -1); + t("9", "379472788024622.729", -1); + t("20.510820935587124", "0.0000000000028179781", 1); + t("-0.0000000000000000000336381763977", "1.17539", -1); + t("0", "-335.0", 1); + t("2.4", "-0.00000000000023", 1); + t("379.690496326", "-0.000000000000000003740124432080006", 1); + t("9612.15057327", "7", 1); + t("64.55819568", "103", -1); + t("306554.22", "-21168.82471", 1); + t("0", "0.00000000000000378671778", -1); + t("-4869994212.02", "-82.3249644", -1); + t("-28281314", "0.00023", -1); + t("-272266413010184382", "-21443895.1", -1); + t("0", "256.5", -1); + t("-0.0000000000000000059504", "-393", 1); + t("-85483356.741520", "-0.135106007572", -1); + t("1256398743581", "-0.00000000000000113", 1); + t("9265.8054085790753", "1101.60", 1); + t("21755297.7418484298", "-1961304", 1); + t("-4.24", "-20364.5241763", 1); + t("-0.00000163743621", "-15716423.93", 1); + t("0.0000000020933557160", "-8448055.64162653", 1); + t("193", "1919.381696195", -1); + t("-39007.0872890", "58659197064.3566", -1); + t("1.224", "-82293358.63", 1); + t("0.0000000000000001573421585953", "0.00000000159648", -1); + t("0", "-91.479627934421", 1); + t("-186.247902631", "-0.00000000000000008879", -1); + t("34342532998345", "0.000000000000000001681734691290559", 1); + t("-4020.8878086173", "1.08", -1); + t("-0.1630447778870097", "8176.334", -1); + t("-0.0000000000000000582491728505043", "0.00000000000000808314", -1); + t("-0.00000031", "3137213.71057", -1); + t("-28.21073575152", "8530334210.39291", -1); + t("-0.00000041292", "-66921.7723433", 1); + t("-261247.289569419", "-0.0000022547224", -1); + t("-4.07", "-6.1", 1); + t("688.144527235", "45986414948", -1); + t("-1", "-0.0231932902995", -1); + t("0.0000000000000016241364087636498", "3", -1); + t("64634.877977", "-39803483", 1); + t("93.85", "-27.012", 1); + t("-1804.8479", "-2720034", 1); + t("-31207.70845", "-0.05392720639355", -1); + t("-7479301046098815", "37.3", -1); + t("50515.653686861597", "-0.00000000000000204399360", 1); + t("-0.0000000000000000055012280316826870", "149.91618262", -1); + t("2216863.9954067", "0.000000000000000775121457372458", 1); + t("-3.1", "2", -1); + t("-4.67", "0.000000018732162086", -1); + t("-0.00002189591", "-0.000000000255830068339", -1); + t("410611332258005.0", "-2840.2819", 1); + t("-7397921366979", "-0.00000000000053", -1); + t("-0.12413104038561", "-0.00000000000255343979", -1); + t("10521370.1", "-55871447.8", 1); + t("129500.264553199", "-3811409369958.95", 1); + t("0.00000240712277094094", "1354108422.5", -1); + t("-0.000000000000000005719028368733990", "540474.19019760", -1); + t("977162.7422", "-0.000000000001402550", 1); + t("1.54339295432", "-0.000001596789", 1); + t("53798507.25", "-0.00129745384800", 1); + t("-0.00418268966509248", "0.0000324984627", -1); + t("118092.9308827", "-0.0000000000091", 1); + t("0", "-93.6", 1); + t("0", "152.55335", -1); + t("-3405109.0892217", "0", -1); + t("445424.679402140", "85.3554", 1); + t("5036.98", "22371.6657", -1); + t("-1.9", "0.000000102345283335839", -1); + t("-42.2659", "3.721", -1); + t("0.0000016709189598", "6.170585", -1); + t("-3", "0", -1); + t("-0.0000000061", "5497334338493.62", -1); + t("-124932073873228", "0.000000000370", -1); + t("-0.007149648796120", "-0.00000001269559959", -1); + t("1675530.7719", "-1065461.6469931248", 1); + t("1053.3", "10097922.4048112434", -1); + t("-92523142643508", "-4", -1); + t("200.8", "-36.675816237421759", 1); + t("2.0", "34282969.24101", -1); + t("-0.120192312259366", "-99423384.4155", 1); + t("0.00000000000000000746964", "-4.50907217", 1); + t("2521.848164", "-16771705.710", 1); + t("0.00002756245400", "0.0032449553261", -1); + t("-0.00000001332527923", "574.55219962424", -1); + t("-0.000000000000000179221403668", "57235.797", -1); + t("0.000000057866988749115", "0.00000000014", 1); + t("3", "1.2", 1); + t("56.30058910190568", "-1680170716816089", 1); + t("-2", "-24381767.5", 1); + t("11799.81119", "-0.0000092161582", 1); + t("1.13", "-1", 1); + t("1", "-802.5013810814", 1); + t("54624549209148.7", "-0.000002846161", 1); + t("138301402", "-0.00011", 1); + t("5", "-2.4", 1); + t("-4604424", "1.28478944", -1); + t("-146100841048.0", "92.57", -1); + t("-0.0000000000000000020786339367465", "0.0000000517784775175150122", -1); + t("94366206024220.8", "-147.3818299", 1); + t("-3.30342757", "-2.8", -1); + t("1458645603.7314952", "-0.00000000000000071", 1); + t("-22352269.3857581", "1.133", -1); + t("0.00000000000203016463277398240", "11.54042", -1); + t("119.31", "0.0000000000005419744970291", 1); + t("-479.458846", "-61007894", 1); + t("-12.748", "-42.6", 1); + t("-4", "-2102161", 1); + t("-0.0000892951", "-0.00000000700082036664", -1); + + t("-78249536473266824330849.66777355094653206196949807187125", "-0.0000000000000003657205364898565", -1); + t("-794146002335392753453.706827563775514677616", "-0.000000000000002003697772718678199294529887857336117611280517515976", -1); + t("-415", "392495171560354735.54", -1); + t("-0.00000000003641527559883410541221", "118893973463454526683808886319100407749", -1); + t("-246230199620.751986", "-60621558.218545419613692429476293547415222080017643997", -1); + t("1135.2381823", "-7025657983677893287919132587754823076851573889.74685", 1); + t("-1225393854304.583672953386", "3712805076014395323562.4542406246", -1); + t("0.0000000000002805023524281798", "-1195739.55713460927706968721363067", 1); + t("386896730804748668115534580.29201499", "737595739534741234.44386299", 1); + t("-160941276095561769012497288743700757276588036", "194.232174807028239974132449968549146279604", -1); + t("0.0000000000000009760", "-112424977227983.369213445871607530779963339", 1); + t("-120493.3535480159461699138868088193226718499846079", "-963938726344338862591656029356573.2356831292145", 1); + t("1.731842697869349182975403693663977472678249978539", "-0.0000000000018342058226450839410208095980857226", 1); + t("0.000000000000000000186044372917454007190404393463337172211654339256226", "38603.328332936580263680889352090136846643070031691", -1); + t("2.24833678840107152900324", "-0.000000000000535013632333188", 1); + t("-0.000000000001014445297159531", "-182225871.4", 1); + t("-110739", "39245367522721683497924493692756130948391370303714834", -1); + t("0.000000000000000000011109996302235", "0.00000021747567330836261997878389805423396667433455", -1); + t("913805.7272137617667300113969454560", "12015557861856523.82185", -1); + t("4.44", "17327761911331833939511.3229350", -1); + t("3343815205898708797845323710139050310101815211790183", "0.000002944097410246031171887416698431193651848888", 1); + t("32760398270494573303330410.50750229445655494486793110334706", "-9510914125.45789497493920290055", 1); + t("0.00000031352646", "2982438266661362962075700689156408.44636939397", -1); + t("77053023622996.111620117040477945", "-594", 1); + t("28.651584435", "0.0000000000000517018230", 1); + t("69454425323857571.298955", "0.00000003183", 1); + t("8.585707061691", "27579495297994019790817050261359", -1); + t("0.0000245072088767920273", "597422085664.8946200175189947965015981804000953540032149", -1); + t("6395952035600311.145296483306709937475", "-7839682836938441873082358214760503680131094656590381429", 1); + t("-878403860673101771781740794629505317750999165.91704111", "23574346417573958371843475532943.5863825875041348813273", -1); + t("0.0000767302828677966418632441811470540764577", "-1276636.42385918072718338162162974143519652320393232805716411", 1); + t("-15930445184474597597265919925606183581356435.4578944", "-0.00000000000114252044623272018125497556095987129012517542089248", -1); + t("-48665285374684448074343674590620067.7", "1", -1); + t("105930.422", "11113072169.652252071060557105162", -1); + t("26564763", "-3", 1); + t("4811244033166.822319661770849918367233504118713435759512811", "4.7", 1); + t("-56.8", "4443507757632459.195553180343008573591954189736210531834", -1); + t("612.72379387256827500110", "-452.196955446440438357", 1); + t("-494127587184494770597966464398", "0.000000000000000505582034979983270144354985077988823279257757358354", -1); + t("151593171537726736029059210", "3280207153334176964", 1); + t("-0.0000000727423791233275798", "-33.983207203823", 1); + t("-0.00000000000000000014088202399161", "967411649025173.3", -1); + t("2.4", "-0.000000000001348198764946041705529604570289570284", 1); + t("-1458694234293.393", "-0.0000000277889669157893917", -1); + t("-1", "0", -1); + t("-295498271141109248639464345535.73829013835409617653972", "-239733948637940687.4210093379196529044279897", -1); + t("-114.668973584958627612325023154590", "0.00000000000000000204", -1); + t("11086296933075691303", "61846609604939708809351700530350279982", -1); + t("-199290.9539286389610", "0", -1); + t("-0.00008470578761402", "77227954881772040530.19249809987494428807714982", -1); + t("1675393978448", "-218061932.345257837058901", 1); + t("-148234164778648.90057404374761057399794220096395194121763477", "-1807153054383052.16291022958635252906429", 1); + t("0.00000107324116068524713963632866732786846249794493141690777", "-8697413954500148992019717571067182408306067052176.48379", 1); + t("-3504475807101437909894549201613284414285", "0.00000180507680656754700593791722943439535831913116826463442277", -1); + t("137188855.912293557682373", "-84390113782876.78301756825303169680317158020741023212586877", 1); + t("-8.04", "48917396714819601257978143.0", -1); + t("19441.23908", "-3621875953293954379164.80898", 1); + t("-488683915776821.54128571136", "-2764.655", -1); + t("-497.39163093", "456272554.910083158313064", -1); + t("3888553456.187038805", "1.79351971", 1); + t("-0.09665505758418475963567867363097339048321797943170880174", "42.26560746275599", -1); + t("18902797728391145440494082949463571569467603044", "-160840513303121014911814965287069764.329850142", 1); + t("-0.00000000000363783296932", "-229510691003150718410894.798513190", 1); + t("-0.019578513996", "-0.0000068012586581839285561", -1); + t("-0.00000000000000003337257672564450192788237207780262977502390656214", "-576.230537914969490642", 1); + t("0.0002071041857705517964418488527910814283948842252102023", "4965", -1); + t("-762578569061554379901567768164.24708334695367", "-2902150555266343625933468.2", -1); + t("366547461068.82113690", "473567955790856323671.7615303868255685632986068926885", -1); + t("2212.60505074", "54.4399284220426917738", 1); + t("24229481820388119475112679.2869744056638142529094915709331146", "-39663594276.8672343304", 1); + t("204581808810007220059753337566285703.0558403249497", "0.14724245060761654341919", 1); + t("186.26481926730311740748275435747257", "3169339033932711835137078410077027045.6405", -1); + t("147438798802.4222641736117", "-30953.68649", 1); + t("0.0000000000000000036665066712498278880448755082419497041867983779348", "49969977335002848872793397", -1); + t("-15", "-1610335165763678418286838402407661955", 1); + t("2689653843679875122027095562540366.2198041476017623", "1680374149507467199865152885259.7294203852546004613867", 1); + t("-0.11", "-0.00000000000000000043896646420939540095966", -1); + t("2080671699743.511238240714127", "-0.000036842318404340179848907", 1); + t("568000304", "-90592884500253731464906623327632577358591186.946837858889", 1); + t("-0.000000000000002107518141285", "-3224876873708851754101647.818256157564", 1); + t("2265098771", "0.00303612511166914586857128974318819782", 1); + t("-5664007822465.98050400197979616740857", "4318641.351415884425470426852575673963981647030782942", -1); + t("-2548615100934958409898695557521334.971165846219072", "-554798.735556810907", -1); + t("-0.000008820826897431443", "-1685288868236928715034057139645.0670918901230", 1); + t("0.2773641914039966806939077833931526594995617517107827", "-155510002669979906258854608426737730.80732922", 1); + t("0.00000028631297293946002594331990323448420", "12.530358985140", -1); + t("65.74", "0.000000180226526307592", 1); + t("35366830254177.323", "-195533735162357391160682221146179916675364691505329.522594", 1); + t("623190599276699090316221455590041049805679995441489316.522", "6153742899048073987312064712008701512451.12942", 1); + t("0.001389654081957090114281716350682554539119289983031175", "0.0000000000000000004172245036048453978505043356031", 1); + t("-0.000000000000065125596165975329468700878377195017853327025922232", "5010.27", -1); + t("99858764586308080.815938383", "6906.98277", 1); + t("-0.0000002120213841110365850583078206489619527666932442761000523841", "1560226.624828", -1); + t("-0.00000011209616970611", "437120468783339721.8270432960", -1); + t("39633522.28696180408828", "404609951713", -1); + t("0.00000439899975727851857364404628011452819", "-295058799.554060774457769229721869795967861", 1); + t("-0.00000000000000042342244818730713908050671583102154", "549754666663906751820116493890514432554613796763091771", -1); + t("271354103.271534143867908347243952035", "-3.4348029165", 1); + t("-18391137696458176.709403414422273535748", "-135526005724.36", -1); + t("-16789648705436253610328466585451657189", "87790015500203097.67217621", -1); + t("-0.1934527980285924234435139814", "0.000000044283070912014290453388249787033315196663317475885890", -1); + t("175727618.7", "-4712524302.9633361502507795469472010873256880899968244213838", 1); + t("86148708.7", "0.000000000043067763982519792325233598208451198", 1); + t("-1676718.814", "-126027512979.7359979901775996", 1); + t("204654162545474.954541730442039127578542771572577634608702", "1278262396819307952614391540746000135708145121661", -1); + t("20599411052765018472280152629960269.784440835643761573", "382871.68", 1); + t("9.1", "-0.000009868296529724402614472149967657", 1); + t("-51.7", "-0.00004138549340599259177969843213431710067044689658507", -1); + t("-0.00000000065519676351299476540767970", "-159950069281804382298.104882147944419487737768", 1); + t("132937997125408.196564521", "0.0000000000000416671095818013123525013575750", 1); + t("-1313393782.747301", "135189314585073603701567044403904503", -1); + t("0.26345218007386345905841", "-0.0000000000000000131698402541203188119609481297941368650", 1); + t("24462716218.22576508876165308669350154", "-175901840085494768716509058673018943.44105360844073496986", 1); + t("-639051.389850068275663978184079330600736417788030565545", "-233130008509087611163354733950079542005785536290.28", 1); + t("-2.5", "0", -1); + t("-48", "-1.30483838443", -1); + t("-0.0000007957592304983915492296920988493287302223429001", "222281838853.55743543126434998666514248954378468481403010", -1); + t("-256924767625.92102529834889997062393414595239208331582", "-138645955.7309701679", -1); + t("5825.6936168480383901079880", "-15454778381.1635817748532891601", 1); + t("322234158068890727047790331925494003913674775559", "0.0000000000000001440104086097707578083604", 1); + t("-0.0000000000284163905693832757026", "735321.796040692391355698638806984647971670552494930079886", -1); + t("13.51354661049663", "60174586.03966439546", -1); + t("-0.0000000563225262474012816830760397217", "-19259915510222671.51018", 1); + t("58260242951538386451799849576838755846723438641458498.45", "81583418293233481447477355060230.5984042555029388", 1); + t("15676086441613294586793.0600578779086373855887", "553785093898805279609967970.6227004730416155843290795860965", -1); + t("-529215908", "0.000000000000001261696290245850445593226", -1); + t("0.2765770305056755810402655395163548457323921993", "2485048778003226295.0487979661044", -1); + t("3.106357", "-196188865060.96789451729283131151802962", 1); + t("-3812721623392532238628.52058836531583261604602809206126", "0.000000000129949612553432181149516674241", -1); + t("-725747.78308445614294711222169380088709733492626141", "0", -1); + t("0.00005978057030838911749503353205688236750513118711", "-2301374753039922.5", 1); + t("-21135.6", "0.0000000000000677319833766662844296", -1); + t("-18592472738146.165033667092366", "-0.245177658870876212432221320582908107465202878031116163978799", -1); + t("2.0853471559342294701189635489971894524307297590789015254659", "1820710163171110437504131672398834715.796647407", -1); + t("3017.7628349701943687591214", "-2123676032175089021.800850462329", 1); + t("2245516696370652079582811421413778879168242699149", "-0.000026865223", 1); + t("396591381033578245290535623.59522101830916124323912171677", "-399632909396.27251691705488670319", 1); + t("25071395481877740931640606160951694567581843991.91250540", "0.000000129577260075209456379795979548520957596680350786352443111", 1); + t("-10071840824462229810456841986062182478", "-0.000000000000036", -1); + t("-378.382656390921442297", "2995.111135910", -1); + t("-0.0000000000000011003920232607040692705", "0.00000000000000002355157685511431284976273511723771203290674587231328782173", -1); + t("894.8158182999506884919347710660910", "-0.00000000000000000096323615121853367670285903274497581", 1); + t("2319037.233322076813874258", "-32416.903557641", 1); + t("23396460119.155847859729080972376305599746464844501598782869", "-23349855891702694333726330.5788991", 1); + t("90907619612776583630058641475331.6", "834081.31401857878701092663973283388246447251015444", 1); + t("-0.0000000000000000081501364451042879423837094013790187022253", "-0.00000001399490096609828204621353982853023593", 1); + t("-420605.932784654921007625945921605929", "-0.001003986559391891122940439549512675", -1); + t("29941819100256.1010903984648918366033290553065670117884535", "-1399273749558314.35414647141708136502314", 1); + t("9.87428322502844153862497406397966790245714773688", "282378323960341447353633555973.60816609111820", -1); + t("0.000000011571", "56.055239680", -1); + t("57847056020509197.81010326363252948483107773", "-1.4444", 1); + t("-51735520880178.3819992386025068250767281052153771374742233700", "-0.000000000000000001995850558903648471134005565207297729809954251013177868", -1); + t("-252689605402394270719155.41734356951305987480624879", "-14.7", -1); + t("-0.00000000001151229725364301025243181548204622943024492441630358", "26395005645801030069538169698242312.433651971508113804", -1); + t("-0.00000000000091483130556462719", "2", -1); + t("208.9827699741542594700570327748394160582183088044349", "-0.00000000000052759011609237039384483268124939035873403", 1); + t("12412.9657547118", "4", 1); + t("-2", "91580728825224739577263849484410121433204621.500780779690", -1); + t("459526644.772925035397599290137226147632521530511862018", "-0.000000005846169451429981275734796656", 1); + t("671926163021026323133951152902929830282.91041796493", "548498210972677.51442460018844632588617668956139310271612", 1); + t("2422.5875291768881507425406922241585652688246", "19145241007530705409.9615104357443736565548963", -1); + t("-0.00000078875216605898054012159", "-3150.0", 1); + t("6244534680058004259589682789034535443037697", "-25351939981079.604012", 1); + t("-180.203958489450", "39025034688578315815199.297787915576434930764", -1); + t("-1361080637840651575481575485233.15286726682268248409468726", "-0.0000000000000039297884367828635174097881955958806085", -1); + t("180278536333055.7355327506162313565598247413", "0.000000000005454620478830996984164588529474180472398020083723230733100", 1); + t("-12521213.94690", "213.36136", -1); + t("-0.0000000000000076966493627693824010017610386791", "-2.378265167488246191074961795033182605013037407884326", 1); + t("-253.6948", "126006206", -1); + + t("-5.5239e+3", "-2.2807805e+1", -1); + t("8.554e+2", "0e+0", 1); + t("-2.1176736939e+5", "2.13526332e+2", -1); + t("2.528e-2", "-1.5e-1", 1); + t("-2.1536554e-2", "-3.93e-6", -1); + t("4.853430802e-5", "-4.9e-11", 1); + t("-6.9e-3", "1.9596e+1", -1); + t("-9.93182949e+1", "-7.9983535342e-20", -1); + t("1.629795e+5", "1.58117535423e+5", 1); + t("-2.934333546e-15", "-2.093237829e-14", 1); + t("2.2916931e+1", "7.88e+2", -1); + t("7.656115e+0", "5.5885422e-10", 1); + t("0e+0", "-3.3e+0", 1); + t("-2.4327703616e+3", "1.1e+1", -1); + t("1.61903621e+6", "-2.3444006423e+2", 1); + t("4.5332e+4", "3.281123867e+1", 1); + t("-7.9e-4", "0e+0", -1); + t("-2.6e-19", "-5.4489933e+6", 1); + t("5.877152e+1", "1.5125e-2", 1); + t("6.293000381e-1", "7.2e+1", -1); + t("1.072062222225e+10", "7.521052067e+0", 1); + t("-2.9744557e+7", "0e+0", -1); + t("-1.0235e-13", "-3.671886e+0", 1); + t("-2.06364e-4", "6.2113337e-3", -1); + t("-7.02e+0", "-1.1348644434e+3", 1); + t("-3.57688146e+3", "3.81547e+2", -1); + t("2.9527098536e+3", "1.32080504447e-4", 1); + t("-2.6286e+1", "3.8e+0", -1); + t("-3.45054603e+2", "-9.88229e-15", -1); + t("-2.469e+0", "-3e+0", 1); + t("-8.369800004e-4", "1.4e-17", -1); + t("-1e+0", "4e+0", -1); + t("-3.0829216081e+2", "-3.08e+1", -1); + t("-1e+0", "-5.756e+1", 1); + t("-8.511e+0", "3.126324e+6", -1); + t("2.4474011949e+4", "1.12649e+2", 1); + t("-2.57868e+4", "-1.03178e+1", -1); + t("1e+0", "9.5177e+1", -1); + t("-9.8069663157e-6", "1.4532689e+5", -1); + t("3.721e+1", "-2e+0", 1); + t("-9.7657879751e+10", "-5.67e+2", -1); + t("-4.8657905e+6", "-2.17381281e+1", -1); + t("-4.20131e+0", "-1.3179640655e-8", -1); + t("1.6e+0", "0e+0", 1); + t("5.16068325659e-4", "1.269e+1", -1); + t("9.91969e+5", "0e+0", 1); + t("2.32e+0", "3.69e+1", -1); + t("5.685149e+2", "3.694e-13", 1); + t("-9.0148e-5", "0e+0", -1); + t("-3e+0", "-8.7855e-7", -1); + t("1.3669489e+3", "1.33866e-4", 1); + t("-2.6e+1", "1.36976797894e+3", -1); + t("4.6e+0", "0e+0", 1); + t("-7.2e-8", "1.971355e+2", -1); + t("1.19755e-5", "7e+0", -1); + t("-3.46e+0", "-3.7715361e-11", -1); + t("3.25762245146e+6", "-4.02e+0", 1); + t("1.3174225699e+7", "9.6222695655e+10", -1); + t("6.6e-13", "-5.23193346205e+4", 1); + t("-3.873e+3", "-1.23681175e+3", -1); + t("-1.19869e+5", "-8e+2", -1); + t("2.027381656e+3", "1.47629351439e+11", -1); + t("-1.467418e-17", "9.0073930856e+5", -1); + t("7.1e+0", "6.116301582e+2", -1); + t("-1.7883916e+5", "3.533e-17", -1); + t("8.8e-11", "-5.9707897e-1", 1); + t("-5.337e+3", "4.6614e-13", -1); + t("1e+0", "-3.1e+0", 1); + t("-3.05920196e-6", "-4e+0", 1); + t("-1.692375e-10", "2.29981330096e+6", -1); + t("5.19341813e-1", "6.1e+0", -1); + t("5.796e+3", "-9.386773281e-8", 1); + t("9.117497e+0", "0e+0", 1); + t("6.962934e-8", "1.413982e+2", -1); + t("2e+0", "1.4e+1", -1); + t("-2.04e+0", "-1.30300025e+9", 1); + t("1.57647e+1", "3.0862783894e+0", 1); + t("-4e+0", "7.1e+1", -1); + t("1.21e-6", "-2.109584154e+10", 1); + t("6.55669245e+3", "-8.15e-8", 1); + t("-8.3307e+2", "-9.1476874e+7", 1); + t("0e+0", "-3.64676e+5", 1); + t("-1.2803e+2", "7.2908749e+3", -1); + t("3.2263e+3", "-1.43355e+1", 1); + t("4.92751482244e-18", "1.3747248256e+3", -1); + t("8.20054755e-10", "6.2348e+2", -1); + t("-1.06e+1", "-7.2569084631e+4", 1); + t("1.86e+2", "3.76613527e-5", 1); + t("3.33652e+3", "5.1e+1", 1); + t("3.665307673e+8", "3.31344e+5", 1); + t("-7.341261161e+2", "-2.98910916e+7", 1); + t("6.24638573245e+5", "4.47893448327e+2", 1); + t("1.23e-8", "-5e+0", 1); + t("4.469176e+5", "-2.09863e+3", 1); + t("-2.72624816161e+3", "0e+0", -1); + t("-6.78251e-20", "-6.837e-1", 1); + t("6.2456922e-6", "0e+0", 1); + t("6.2e-4", "4.40516e+4", -1); + t("-7.624e+2", "-3e+0", -1); + t("-5.22549619458e+0", "-4.0866914233e+9", 1); + t("-9.51999532e+7", "-2e+0", -1); + t("-1.07321e+2", "-1.3e+0", -1); + t("-5.405555671e-6", "8.0306e+1", -1); + t("2.2e+0", "6.49e-17", 1); + t("3e+0", "2.2e+0", 1); + t("-1.12e+2", "3.4165375e+1", -1); + t("-2.36978379e+4", "-4.2e+0", -1); + t("-8e+0", "-6.42e+0", -1); + t("-3.2e+1", "6.17231707e-19", -1); + t("-4.8454741051e+1", "4.3339e-10", -1); + t("4.29e+0", "3.28376306e+4", -1); + t("-6.33089e+1", "-5.7065758354e-19", -1); + t("0e+0", "-3.31e-7", 1); + t("-2.18973e+2", "1.88333703659e+4", -1); + t("-1.67e+2", "3e+0", -1); + t("0e+0", "9.7605e-12", -1); + t("1.294433816e+0", "-1.1e+1", 1); + t("-1.4246177e+3", "-1.043532436e+8", 1); + t("-1.0531e+1", "2.2268899e-6", -1); + t("-1.5611e+3", "1.59757e+0", -1); + t("3.3638160556e+11", "6.29136402e+6", 1); + t("-7.7326244542e+2", "-9.6e+0", -1); + t("-3.593606997e+8", "-4e+0", -1); + t("9.4433e+2", "-1e+0", 1); + t("-1.0131e-9", "-4.551632556e+9", 1); + t("1.61735e+5", "-6.550194286e+9", 1); + t("3e+0", "-8.14e+3", 1); + t("-3.492e+0", "8.85393125e+2", -1); + t("-9.3678169131e-19", "-1.98802069e+4", 1); + t("-4.39338019e+7", "1.07850051e-15", -1); + t("-1.1677e+0", "2.22825374e+8", -1); + t("-3.476e+0", "6e+0", -1); + t("1.453e+0", "-6.34599e-7", 1); + t("1.789e-9", "0e+0", 1); + t("-2.92933e+4", "5.802095e+4", -1); + t("9e+0", "2.63702e-7", 1); + t("-6.0696e+4", "9.46475e+5", -1); + t("-1.508052e+6", "2.45600810354e+0", -1); + t("6.83354e+1", "1.93e-12", 1); + t("-1.6e+0", "-2e+0", 1); + t("-7.4275644e+5", "-6.1587e-14", -1); + t("0e+0", "3.540869872e-9", -1); + t("-7.86e+0", "8.041734e+6", -1); + t("-8e+0", "1.569e+1", -1); + t("2.0839e-18", "1.2848955034e-14", -1); + t("6.84909e+3", "2.19e+1", 1); + t("5.556062e+3", "1.037e-12", 1); + t("-1.011918e-9", "3.52315476249e+0", -1); + t("-1.2e+2", "-5.8677085e+1", -1); + t("1.5e+0", "-8.2951e-8", 1); + t("5.254e+0", "-2.08338e+3", 1); + t("8.272e+0", "0e+0", 1); + t("-2.3496e+3", "-1.74217696625e-1", -1); + t("2.33e+0", "-6e+0", 1); + t("8.138135061e-6", "1.52e+1", -1); + t("-2.691357e+5", "1e+0", -1); + t("4.277011e-13", "2.1978e+4", -1); + t("-4.164225e+0", "3.94601989492e-6", -1); + t("-1.32e-18", "-3.94e-3", 1); + t("-2.443211e-11", "2.02e-8", -1); + t("-1.2e+0", "-3.2e+1", 1); + t("4.7652754554e+7", "-2.1e-11", 1); + t("2.02136500541e+9", "-2.77170882e+2", 1); + t("-1.65e-2", "-2.4039e+3", 1); + t("1.8172e+1", "-6.3e-5", 1); + t("1.8703827209e-10", "-1.46184e+4", 1); + t("-1.11606903e+6", "-2.8e-6", -1); + t("-7.84180535e+0", "-6.9715e+2", 1); + t("-1.6095371e-5", "-4.007e+2", 1); + t("2e+0", "2.7730114619e+0", -1); + t("1.3694403e+7", "-3.14014263471e-3", 1); + t("3e+0", "2.4553237278e+3", -1); + t("-3e+0", "-2.78756184842e+11", 1); + t("-1.2522e+2", "-7.7e+1", -1); + t("4.491e-18", "-1.196e+3", 1); + t("-3e+0", "-2.78811358e+4", 1); + t("-3.5481789e+3", "1.6004994927e+5", -1); + t("1.9963146e+6", "-6.923e-1", 1); + t("-1.37573e-12", "2.072e+2", -1); + t("6.570067306e-1", "3.73554490286e-16", 1); + t("3.0659071736e-15", "6.946525e+1", -1); + t("-5.346e+0", "1e+0", -1); + t("8.55e-9", "7.9e-11", 1); + t("-7.5096624e+2", "3.40622424e+5", -1); + t("2.219404561e-14", "5.47749e+0", -1); + t("3.000476e+2", "-1.754092582e+1", 1); + t("0e+0", "-1.69774e+3", 1); + t("2.993e+0", "-1e+0", 1); + t("2.7528038851e+1", "-3.945799123e+4", 1); + t("-6.6266e+2", "-4.5e-19", -1); + t("9.204609e-14", "1.25862e+5", -1); + t("-7.0237408e+5", "-4.56413483775e+3", -1); + t("4.8481576e+2", "-6.53713e+3", 1); + t("1e+0", "1.103e+2", -1); + t("6.57977e+2", "-3.852e-16", 1); + t("3.861e+2", "-6.2072117462e+5", 1); + t("-6e+0", "1.3494901111e+6", -1); + t("-5.870696e-1", "-3.801808e+1", 1); + t("-3.83761721e+8", "8.081107501e-5", -1); + t("6.50057174e+5", "2.0206519e-12", 1); + t("5.5207e+4", "-2.48e+2", 1); + t("0e+0", "1.05116516384e+11", -1); + t("-1.75279284e+4", "3.899762267e-1", -1); + t("-1.6197e+0", "4.3274e+4", -1); + t("1.256294e+6", "-5.58921e-15", 1); + t("3e+0", "2.0586937916e-17", 1); + t("-3.28553e-13", "-1.18e+1", 1); + t("-2.81418e+5", "1.72529458e-12", -1); + t("7.8666421e+3", "5.9153e+0", 1); + t("4.84347589e-8", "2e+0", -1); + t("3e+0", "-2.6655512e+2", 1); + t("6.2696e-10", "-2.054382974e+1", 1); + t("6.1413274e-2", "0e+0", 1); + t("-2.9095e-18", "-6.9975956783e+8", 1); + t("4.01e-20", "-7.5588e-6", 1); + t("9.490622e-18", "-2.77e+0", 1); + t("-1.0267e-14", "-8.790091e-9", 1); + t("-4.077591e-14", "-3.0259558246e+0", 1); + t("-2.8261e+2", "-4.99857e+0", -1); + t("9.899113e+1", "1e+0", 1); + t("5.5e+0", "-7.0265e+0", 1); + t("5.286e-7", "-4.3972682e+2", 1); + t("1.5520187e+6", "1.150018e+2", 1); + t("-2.04e-10", "-4.0474e+2", 1); + t("-2.32245517e+7", "-4.96976e+4", -1); + t("-3.6487688611e-10", "-1.1763503e+2", 1); + t("8.3414625e+0", "0e+0", 1); + t("9.905071e+6", "-5.9541e-4", 1); + t("1.984307e+4", "-2.4291e-7", 1); + t("-1e+0", "-1e+0", 0); + t("2.060415969e+9", "-2.03455e+2", 1); + t("3.1982e-19", "-1.993945e+3", 1); + t("3.093739e+1", "-1.99128676855e+0", 1); + t("1.881e+1", "-1.09028754e+5", 1); + t("0e+0", "-4.7092316e-14", 1); + t("-9.455374693e-10", "-9.45812534991e+6", 1); + t("-1.67881e+4", "-2.1683630866e+3", -1); + t("6.3514013642e-17", "-4.5e+0", 1); + t("1.20179765e-20", "4.9098e+3", -1); + t("0e+0", "-7.476983768e+1", 1); + t("-8.5797e+2", "2.1e+0", -1); + t("-2.75e+1", "-1.749e-18", -1); + t("-1e+0", "8.4e+1", -1); + t("7.110682e+4", "8.5646556e+2", 1); + t("-3.1875423048e+6", "7.216e+1", -1); + t("-1.41969e+0", "0e+0", -1); + t("-3.707432e+6", "1.5048071e+2", -1); + t("-2.65447780189e+11", "2e+0", -1); + t("3.808865e+6", "-7.22140745e-10", 1); + t("2.972544e+3", "0e+0", 1); + t("1.142002886e-2", "-3.063e+0", 1); + t("-3.292e-15", "-2.2e-1", 1); + t("-9.29480350675e-6", "9.4830355594e+4", -1); + t("-2.49267401e-19", "3.3296905e+4", -1); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalConstructorTests.cs b/DecimalSharp.Tests/BigDecimalConstructorTests.cs new file mode 100644 index 0000000..50479bf --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalConstructorTests.cs @@ -0,0 +1,320 @@ +using DecimalSharp.Core; +using DecimalSharp.Tests.Extensions; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalConstructor")] + public class BigDecimalConstructorTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Constructor() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15, + Crypto = false, + Modulo = 1 + }); + + var t = (int[] coefficient, int exponent, int sign, BigDecimalArgument n) => + { + BigDecimalTests.assertEqualProps(coefficient, exponent, sign, bigDecimalFactory.BigDecimal(n)); + }; + + t(new int[] {0}, 0, 1, 0); + t(new int[] {0}, 0, -1, "-0"); + t(new int[] {1}, 0, -1, -1); + t(new int[] {10}, 1, -1, -10); + + t(new int[] {1}, 0, 1, 1); + t(new int[] {10}, 1, 1, 10); + t(new int[] {100}, 2, 1, 100); + t(new int[] {1000}, 3, 1, 1000); + t(new int[] {10000}, 4, 1, 10000); + t(new int[] {100000}, 5, 1, 100000); + t(new int[] {1000000}, 6, 1, 1000000); + + t(new int[] {1}, 7, 1, 10000000); + t(new int[] {10}, 8, 1, 100000000); + t(new int[] {100}, 9, 1, 1000000000); + t(new int[] {1000}, 10, 1, 10000000000); + t(new int[] {10000}, 11, 1, 100000000000); + t(new int[] {100000}, 12, 1, 1000000000000); + t(new int[] {1000000}, 13, 1, 10000000000000); + + t(new int[] {1}, 14, -1, -100000000000000); + t(new int[] {10}, 15, -1, -1000000000000000); + t(new int[] {100}, 16, -1, -10000000000000000); + t(new int[] {1000}, 17, -1, -100000000000000000); + t(new int[] {10000}, 18, -1, -1000000000000000000); + //t(new int[] {100000}, 19, -1, -10000000000000000000); + //t(new int[] {1000000}, 20, -1, -100000000000000000000); + + t(new int[] {1000000}, -1, 1, 1e-1); + t(new int[] {100000}, -2, -1, -1e-2); + t(new int[] {10000}, -3, 1, 1e-3); + t(new int[] {1000}, -4, -1, -1e-4); + t(new int[] {100}, -5, 1, 1e-5); + t(new int[] {10}, -6, -1, -1e-6); + t(new int[] {1}, -7, 1, 1e-7); + + t(new int[] {1000000}, -8, 1, 1e-8); + t(new int[] {100000}, -9, -1, -1e-9); + t(new int[] {10000}, -10, 1, 1e-10); + t(new int[] {1000}, -11, -1, -1e-11); + t(new int[] {100}, -12, 1, 1e-12); + t(new int[] {10}, -13, -1, -1e-13); + t(new int[] {1}, -14, 1, 1e-14); + + t(new int[] {1000000}, -15, 1, 1e-15); + t(new int[] {100000}, -16, -1, -1e-16); + t(new int[] {10000}, -17, 1, 1e-17); + t(new int[] {1000}, -18, -1, -1e-18); + t(new int[] {100}, -19, 1, 1e-19); + t(new int[] {10}, -20, -1, -1e-20); + t(new int[] {1}, -21, 1, 1e-21); + + t(new int[] {9}, 0, 1, "9"); + t(new int[] {99}, 1, -1, "-99"); + t(new int[] {999}, 2, 1, "999"); + t(new int[] {9999}, 3, -1, "-9999"); + t(new int[] {99999}, 4, 1, "99999"); + t(new int[] {999999}, 5, -1, "-999999"); + t(new int[] {9999999}, 6, 1, "9999999"); + + t(new int[] {9, 9999999}, 7, -1, "-99999999"); + t(new int[] {99, 9999999}, 8, 1, "999999999"); + t(new int[] {999, 9999999}, 9, -1, "-9999999999"); + t(new int[] {9999, 9999999}, 10, 1, "99999999999"); + t(new int[] {99999, 9999999}, 11, -1, "-999999999999"); + t(new int[] {999999, 9999999}, 12, 1, "9999999999999"); + t(new int[] {9999999, 9999999}, 13, -1, "-99999999999999"); + + t(new int[] {9, 9999999, 9999999}, 14, 1, "999999999999999"); + t(new int[] {99, 9999999, 9999999}, 15, -1, "-9999999999999999"); + t(new int[] {999, 9999999, 9999999}, 16, 1, "99999999999999999"); + t(new int[] {9999, 9999999, 9999999}, 17, -1, "-999999999999999999"); + t(new int[] {99999, 9999999, 9999999}, 18, 1, "9999999999999999999"); + t(new int[] {999999, 9999999, 9999999}, 19, -1, "-99999999999999999999"); + t(new int[] {9999999, 9999999, 9999999}, 20, 1, "999999999999999999999"); + + // Test base conversion. + + var t2 = (string expected, BigDecimalArgument n) => { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ValueOf()); + }; + + long randInt() + { + Random random = new Random(); + return (long)Math.Floor(random.NextDouble() * 0x20000000000000 / Math.Pow(10, (long)(random.NextDouble() * 16) | 0)); + } + + // Test random integers against Number.prototype.toString(base). + for (long k, i = 0; i < 127; i++) + { + k = randInt(); + t2(k.ToString(), "0b" + k.ToString(2)); + k = randInt(); + t2(k.ToString(), "0B" + k.ToString(2)); + k = randInt(); + t2(k.ToString(), "0o" + k.ToString(8)); + k = randInt(); + t2(k.ToString(), "0O" + k.ToString(8)); + k = randInt(); + t2(k.ToString(), "0x" + k.ToString(16)); + k = randInt(); + t2(k.ToString(), "0X" + k.ToString(16)); + } + + // Binary. + t2("0", "0b0"); + t2("0", "0B0"); + t2("-5", "-0b101"); + t2("5", "+0b101"); + t2("1.5", "0b1.1"); + t2("-1.5", "-0b1.1"); + + t2("18181", "0b100011100000101.00"); + t2("-12.5", "-0b1100.10"); + t2("343872.5", "0b1010011111101000000.10"); + t2("-328.28125", "-0b101001000.010010"); + t2("-341919.144535064697265625", "-0b1010011011110011111.0010010100000000010"); + t2("97.10482025146484375", "0b1100001.000110101101010110000"); + t2("-120914.40625", "-0b11101100001010010.01101"); + t2("8080777260861123367657", "0b1101101100000111101001111111010001111010111011001010100101001001011101001"); + + // Octal. + t2("8", "0o10"); + t2("-8.5", "-0O010.4"); + t2("8.5", "+0O010.4"); + t2("-262144.000000059604644775390625", "-0o1000000.00000001"); + t2("572315667420.390625", "0o10250053005734.31"); + + // Hex. + t2("1", "0x00001"); + t2("255", "0xff"); + t2("-15.5", "-0Xf.8"); + t2("15.5", "+0Xf.8"); + t2("-16777216.00000000023283064365386962890625", "-0x1000000.00000001"); + t2("325927753012307620476767402981591827744994693483231017778102969592507", "0xc16de7aa5bf90c3755ef4dea45e982b351b6e00cd25a82dcfe0646abb"); + + // Test parsing. + + var tx = (Action fn, string msg) => { + BigDecimalTests.assertException(fn, msg); + }; + + t2("NaN", double.NaN); + t2("NaN", -double.NaN); + t2("NaN", "NaN"); + t2("NaN", "-NaN"); + t2("NaN", "+NaN"); + + tx(() => { bigDecimalFactory.BigDecimal(" NaN"); }, "' NaN'"); + tx(() => { bigDecimalFactory.BigDecimal("NaN "); }, "'NaN '"); + tx(() => { bigDecimalFactory.BigDecimal(" NaN "); }, "' NaN '"); + tx(() => { bigDecimalFactory.BigDecimal(" -NaN"); }, "' -NaN'"); + tx(() => { bigDecimalFactory.BigDecimal(" +NaN"); }, "' +NaN'"); + tx(() => { bigDecimalFactory.BigDecimal("-NaN "); }, "'-NaN '"); + tx(() => { bigDecimalFactory.BigDecimal("+NaN "); }, "'+NaN '"); + tx(() => { bigDecimalFactory.BigDecimal(".NaN"); }, "'.NaN'"); + tx(() => { bigDecimalFactory.BigDecimal("NaN."); }, "'NaN.'"); + + t2("Infinity", double.PositiveInfinity); + t2("-Infinity", double.NegativeInfinity); + t2("Infinity", "Infinity"); + t2("-Infinity", "-Infinity"); + t2("Infinity", "+Infinity"); + + tx(() => { bigDecimalFactory.BigDecimal(" Infinity"); }, "' Infinity '"); + tx(() => { bigDecimalFactory.BigDecimal("Infinity "); }, "'Infinity '"); + tx(() => { bigDecimalFactory.BigDecimal(" Infinity "); }, "' Infinity '"); + tx(() => { bigDecimalFactory.BigDecimal(" -Infinity"); }, "' -Infinity'"); + tx(() => { bigDecimalFactory.BigDecimal(" +Infinity"); }, "' +Infinity'"); + tx(() => { bigDecimalFactory.BigDecimal(".Infinity"); }, "'.Infinity'"); + tx(() => { bigDecimalFactory.BigDecimal("Infinity."); }, "'Infinity.'"); + + t2("0", 0); + t2("0", "0"); + t2("-0", "-0"); + t2("0", "0."); + t2("-0", "-0."); + t2("0", "0.0"); + t2("-0", "-0.0"); + t2("0", "0.00000000"); + t2("-0", "-0.0000000000000000000000"); + + tx(() => { bigDecimalFactory.BigDecimal(" 0"); }, "' 0'"); + tx(() => { bigDecimalFactory.BigDecimal("0 "); }, "'0 '"); + tx(() => { bigDecimalFactory.BigDecimal(" 0 "); }, "' 0 '"); + tx(() => { bigDecimalFactory.BigDecimal("0-"); }, "'0-'"); + tx(() => { bigDecimalFactory.BigDecimal(" -0"); }, "' -0'"); + tx(() => { bigDecimalFactory.BigDecimal("-0 "); }, "'-0 '"); + tx(() => { bigDecimalFactory.BigDecimal("+0 "); }, "'+0 '"); + tx(() => { bigDecimalFactory.BigDecimal(" +0"); }, "' +0'"); + tx(() => { bigDecimalFactory.BigDecimal(" .0"); }, "' .0'"); + tx(() => { bigDecimalFactory.BigDecimal("0. "); }, "'0. '"); + tx(() => { bigDecimalFactory.BigDecimal("+-0"); }, "'+-0'"); + tx(() => { bigDecimalFactory.BigDecimal("-+0"); }, "'-+0'"); + tx(() => { bigDecimalFactory.BigDecimal("--0"); }, "'--0'"); + tx(() => { bigDecimalFactory.BigDecimal("++0"); }, "'++0'"); + tx(() => { bigDecimalFactory.BigDecimal(".-0"); }, "'.-0'"); + tx(() => { bigDecimalFactory.BigDecimal(".+0"); }, "'.+0'"); + tx(() => { bigDecimalFactory.BigDecimal("0 ."); }, "'0 .'"); + tx(() => { bigDecimalFactory.BigDecimal(". 0"); }, "'. 0'"); + tx(() => { bigDecimalFactory.BigDecimal("..0"); }, "'..0'"); + tx(() => { bigDecimalFactory.BigDecimal("+.-0"); }, "'+.-0'"); + tx(() => { bigDecimalFactory.BigDecimal("-.+0"); }, "'-.+0'"); + tx(() => { bigDecimalFactory.BigDecimal("+. 0"); }, "'+. 0'"); + tx(() => { bigDecimalFactory.BigDecimal(".0."); }, "'.0.'"); + + t2("1", 1); + t2("-1", -1); + t2("1", "1"); + t2("-1", "-1"); + t2("0.1", ".1"); + t2("0.1", ".1"); + t2("-0.1", "-.1"); + t2("0.1", "+.1"); + t2("1", "1."); + t2("1", "1.0"); + t2("-1", "-1."); + t2("1", "+1."); + t2("-1", "-1.0000"); + t2("1", "1.0000"); + t2("1", "1.00000000"); + t2("-1", "-1.000000000000000000000000"); + t2("1", "+1.000000000000000000000000"); + + tx(() => { bigDecimalFactory.BigDecimal(" 1"); }, "' 1'"); + tx(() => { bigDecimalFactory.BigDecimal("1 "); }, "'1 '"); + tx(() => { bigDecimalFactory.BigDecimal(" 1 "); }, "' 1 '"); + tx(() => { bigDecimalFactory.BigDecimal("1-"); }, "'1-'"); + tx(() => { bigDecimalFactory.BigDecimal(" -1"); }, "' -1'"); + tx(() => { bigDecimalFactory.BigDecimal("-1 "); }, "'-1 '"); + tx(() => { bigDecimalFactory.BigDecimal(" +1"); }, "' +1'"); + tx(() => { bigDecimalFactory.BigDecimal("+1 "); }, "'+1'"); + tx(() => { bigDecimalFactory.BigDecimal(".1."); }, "'.1.'"); + tx(() => { bigDecimalFactory.BigDecimal("+-1"); }, "'+-1'"); + tx(() => { bigDecimalFactory.BigDecimal("-+1"); }, "'-+1'"); + tx(() => { bigDecimalFactory.BigDecimal("--1"); }, "'--1'"); + tx(() => { bigDecimalFactory.BigDecimal("++1"); }, "'++1'"); + tx(() => { bigDecimalFactory.BigDecimal(".-1"); }, "'.-1'"); + tx(() => { bigDecimalFactory.BigDecimal(".+1"); }, "'.+1'"); + tx(() => { bigDecimalFactory.BigDecimal("1 ."); }, "'1 .'"); + tx(() => { bigDecimalFactory.BigDecimal(". 1"); }, "'. 1'"); + tx(() => { bigDecimalFactory.BigDecimal("..1"); }, "'..1'"); + tx(() => { bigDecimalFactory.BigDecimal("+.-1"); }, "'+.-1'"); + tx(() => { bigDecimalFactory.BigDecimal("-.+1"); }, "'-.+1'"); + tx(() => { bigDecimalFactory.BigDecimal("+. 1"); }, "'+. 1'"); + tx(() => { bigDecimalFactory.BigDecimal("-. 1"); }, "'-. 1'"); + tx(() => { bigDecimalFactory.BigDecimal("1.."); }, "'1..'"); + tx(() => { bigDecimalFactory.BigDecimal("+1.."); }, "'+1..'"); + tx(() => { bigDecimalFactory.BigDecimal("-1.."); }, "'-1..'"); + tx(() => { bigDecimalFactory.BigDecimal("-.1."); }, "'-.1.'"); + tx(() => { bigDecimalFactory.BigDecimal("+.1."); }, "'+.1.'"); + tx(() => { bigDecimalFactory.BigDecimal(".-10."); }, "'.-10.'"); + tx(() => { bigDecimalFactory.BigDecimal(".+10."); }, "'.+10.'"); + tx(() => { bigDecimalFactory.BigDecimal(". 10."); }, "'. 10.'"); + + t2("123.456789", 123.456789); + t2("-123.456789", -123.456789); + t2("-123.456789", "-123.456789"); + t2("123.456789", "123.456789"); + t2("123.456789", "+123.456789"); + + tx(() => { bigDecimalFactory.BigDecimal((string)null); }, "null"); + tx(() => { bigDecimalFactory.BigDecimal("undefined"); }, "'undefined'"); + tx(() => { bigDecimalFactory.BigDecimal((BigDecimal)null); }, "null"); + tx(() => { bigDecimalFactory.BigDecimal("null"); }, "'null'"); + tx(() => { bigDecimalFactory.BigDecimal(""); }, "''"); + tx(() => { bigDecimalFactory.BigDecimal(" "); }, "' '"); + tx(() => { bigDecimalFactory.BigDecimal("nan"); }, "'nan'"); + tx(() => { bigDecimalFactory.BigDecimal("23e"); }, "'23e'"); + tx(() => { bigDecimalFactory.BigDecimal("e4"); }, "'e4'"); + tx(() => { bigDecimalFactory.BigDecimal("ff"); }, "'ff'"); + tx(() => { bigDecimalFactory.BigDecimal("0xg"); }, "'oxg'"); + tx(() => { bigDecimalFactory.BigDecimal("0Xfi"); }, "'0Xfi'"); + tx(() => { bigDecimalFactory.BigDecimal("++45"); }, "'++45'"); + tx(() => { bigDecimalFactory.BigDecimal("--45"); }, "'--45'"); + tx(() => { bigDecimalFactory.BigDecimal("9.99--"); }, "'9.99--'"); + tx(() => { bigDecimalFactory.BigDecimal("9.99++"); }, "'9.99++'"); + tx(() => { bigDecimalFactory.BigDecimal("0 0"); }, "'0 0'"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalCosTests.cs b/DecimalSharp.Tests/BigDecimalCosTests.cs new file mode 100644 index 0000000..39c6b6e --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalCosTests.cs @@ -0,0 +1,143 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalCos")] + public class BigDecimalCosTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Cos() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Cos().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", 20, RoundingMode.ROUND_HALF_UP, "1"); + t("-0", 20, RoundingMode.ROUND_HALF_UP, "1"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + + t("0.00006", 10, RoundingMode.ROUND_CEIL, "0.9999999983"); // 0.9999999982000000005399999999352000000041657142... + t("0.000000065", 18, RoundingMode.ROUND_HALF_UP, "0.999999999999997888"); // 0.99999999999999788750000000000074377... + + t("14044.44444444444", 10, RoundingMode.ROUND_HALF_UP, "0.04549771706"); + t("-14044.44444444444", 10, RoundingMode.ROUND_HALF_UP, "0.04549771706"); + t("5", 8, RoundingMode.ROUND_HALF_DOWN, "0.28366219"); + t("6723", 3, RoundingMode.ROUND_FLOOR, "0.999"); + t("2.04964", 8, RoundingMode.ROUND_CEIL, "-0.46075321"); + t("476", 6, RoundingMode.ROUND_DOWN, "0.0486937"); + t("5298612.00024", 2, RoundingMode.ROUND_FLOOR, "-0.26"); + t("12.5703596425462281326763791506392117455", 8, RoundingMode.ROUND_HALF_UP, "0.99999204"); + t("2797", 8, RoundingMode.ROUND_DOWN, "0.55491269"); + t("0.3834777777", 3, RoundingMode.ROUND_HALF_UP, "0.927"); + t("16355.3334", 9, RoundingMode.ROUND_HALF_UP, "0.979658167"); + t("0.997737586545708065463833973312637902054356957830033", 5, RoundingMode.ROUND_HALF_DOWN, "0.5422"); + t("7803700", 4, RoundingMode.ROUND_CEIL, "-0.9032"); + t("841822094288189413002174891207354317", 5, RoundingMode.ROUND_CEIL, "-0.86017"); + t("67942", 8, RoundingMode.ROUND_FLOOR, "-0.33958641"); + t("899999929799999999999919999999999999999999999999999999999999999999999999.99999", 7, RoundingMode.ROUND_HALF_DOWN, "-0.8773558"); + t("0.00058849862302952064864312588263928354414752285369272291803582192021298679", 10, RoundingMode.ROUND_HALF_EVEN, "0.9999998268"); + t("20000000923980793370370313003363533778888888888.7777777777777777", 9, RoundingMode.ROUND_HALF_UP, "-0.801329944"); + t("49.73807738608", 3, RoundingMode.ROUND_DOWN, "0.864"); + t("88000", 5, RoundingMode.ROUND_FLOOR, "-0.66135"); + t("75465048517642702658117738264729233565816440737178306250850477902340698", 7, RoundingMode.ROUND_CEIL, "0.4233356"); + t("0.704", 10, RoundingMode.ROUND_CEIL, "0.7622592047"); + t("0.94828132184399998008581", 6, RoundingMode.ROUND_HALF_DOWN, "0.58308"); + t("0.8", 8, RoundingMode.ROUND_FLOOR, "0.6967067"); + t("0.002", 6, RoundingMode.ROUND_CEIL, "0.999999"); + t("61688.77777079779777777777777797777777777777777", 1, RoundingMode.ROUND_HALF_UP, "0.9"); + t("8111", 7, RoundingMode.ROUND_CEIL, "0.8296971"); + t("22.1513", 10, RoundingMode.ROUND_HALF_EVEN, "-0.9872031473"); + t("800000000", 8, RoundingMode.ROUND_CEIL, "-0.98618707"); + t("7332769805669601096865534", 4, RoundingMode.ROUND_UP, "0.8803"); + t("2116627523999999999999999999", 2, RoundingMode.ROUND_HALF_DOWN, "0.58"); + t("16967658790", 8, RoundingMode.ROUND_HALF_UP, "0.70645039"); + t("2539668340778777961946252621835163455556224034680348035809827426444170650792306", 8, RoundingMode.ROUND_CEIL, "-0.49939729"); + t("36", 7, RoundingMode.ROUND_DOWN, "-0.1279636"); + t("61999992993999.999999999999999999949999999999999994999929999999999992999999999999999999999", 2, RoundingMode.ROUND_HALF_EVEN, "0.99"); + t("0.218944155186302719769455371933055277727070161042429", 10, RoundingMode.ROUND_HALF_UP, "0.9761273219"); + t("20", 2, RoundingMode.ROUND_FLOOR, "0.4"); + t("173215504685358227465651988", 10, RoundingMode.ROUND_HALF_UP, "-0.671213895"); + t("5769000000000.2222222222222222", 10, RoundingMode.ROUND_FLOOR, "0.4282801932"); + t("0.5", 3, RoundingMode.ROUND_DOWN, "0.877"); + t("5000000000053", 5, RoundingMode.ROUND_HALF_EVEN, "0.85063"); + t("281084", 5, RoundingMode.ROUND_HALF_EVEN, "0.83761"); + t("80.6", 9, RoundingMode.ROUND_CEIL, "0.470085225"); + t("447162", 7, RoundingMode.ROUND_HALF_UP, "0.9642869"); + t("6856.6636666666626606066666", 6, RoundingMode.ROUND_HALF_EVEN, "-0.137265"); + t("7.37514", 7, RoundingMode.ROUND_HALF_UP, "0.4607514"); + t("1.29", 3, RoundingMode.ROUND_HALF_UP, "0.277"); + t("9", 10, RoundingMode.ROUND_HALF_DOWN, "-0.9111302619"); + t("5067", 4, RoundingMode.ROUND_UP, "-0.9254"); + t("482222222222.62217863079410578", 3, RoundingMode.ROUND_DOWN, "-0.997"); + t("4.2202926299999999999959999999999999999999999999999999990999999999999999999999", 10, RoundingMode.ROUND_HALF_EVEN, "-0.4724745315"); + t("24714170816959", 8, RoundingMode.ROUND_DOWN, "-0.99806747"); + t("31365220956895733422", 5, RoundingMode.ROUND_FLOOR, "0.99149"); + t("377469441384376095492196870000863.83493122", 1, RoundingMode.ROUND_UP, "0.8"); + t("0.1175", 1, RoundingMode.ROUND_DOWN, "0.9"); + t("223953406565183766798339942076619761", 5, RoundingMode.ROUND_HALF_UP, "0.77106"); + t("9.4", 7, RoundingMode.ROUND_UP, "-0.9996931"); + t("67777777777777733221519976680533200000000000", 7, RoundingMode.ROUND_HALF_UP, "0.883886"); + t("3", 7, RoundingMode.ROUND_UP, "-0.9899925"); + t("99127.77777", 8, RoundingMode.ROUND_FLOOR, "-0.44933878"); + t("95555555550.5555555515555555555555555555550055555555555560555555559", 3, RoundingMode.ROUND_UP, "0.0823"); + t("1.3830713", 3, RoundingMode.ROUND_HALF_DOWN, "0.187"); + t("59", 9, RoundingMode.ROUND_HALF_DOWN, "-0.771080223"); + t("1.1", 7, RoundingMode.ROUND_DOWN, "0.4535961"); + t("1090000000000000000000000000000000000050000000.00004", 4, RoundingMode.ROUND_DOWN, "0.9972"); + t("8", 1, RoundingMode.ROUND_HALF_EVEN, "-0.1"); + t("43019456219304869332859776", 8, RoundingMode.ROUND_DOWN, "-0.99906433"); + t("0.0000003104573823727508545651739730202238202717472186710001424", 7, RoundingMode.ROUND_HALF_UP, "1"); + t("81888888888.5555555555555555511111111111111111114304", 8, RoundingMode.ROUND_HALF_EVEN, "0.86581506"); + t("848765718488021014558633685913717744363956181398886593", 5, RoundingMode.ROUND_UP, "-0.97123"); + t("0.4338", 69, RoundingMode.ROUND_FLOOR, "0.907375081713258312704647471639381401468307894324094984616218937905432"); + t("6647167168310148646127", 41, RoundingMode.ROUND_DOWN, "-0.67876552621688089570465682794229097436017"); + t("14", 44, RoundingMode.ROUND_HALF_DOWN, "0.13673721820783359424892887667173824055164518"); + t("0.815", 74, RoundingMode.ROUND_FLOOR, "0.68586839345673735262969403373783813324713582642679411838288343756307680681"); + t("52666376666220.66", 8, RoundingMode.ROUND_CEIL, "-0.46217165"); + t("0.1", 58, RoundingMode.ROUND_HALF_EVEN, "0.9950041652780257660955619878038702948385762254150840359594"); + t("5.481638560270924097", 46, RoundingMode.ROUND_HALF_DOWN, "0.6955963080641265200604938991229596548878269881"); + t("616019185645542611168895104511361.514", 73, RoundingMode.ROUND_UP, "-0.9897418432019178091874564214082330932214823767149588163455308944210649199"); + t("58872.6729", 27, RoundingMode.ROUND_HALF_DOWN, "0.71551991401684231627099417"); + t("0.00000000986995340365791470449236832278868084019660524206930178008", 33, RoundingMode.ROUND_DOWN, "0.999999999999999951292009904810772"); + t("200000000000000000000", 24, RoundingMode.ROUND_DOWN, "0.167301557725715824849981"); + t("8712357290413741268816184846819797318515482698552148280140735653", 57, RoundingMode.ROUND_UP, "-0.279047254515165435013067136950333012052507338721363544685"); + t("0.0177165009539797142337288907", 37, RoundingMode.ROUND_DOWN, "0.9998430669018118198896427823538202954"); + t("255555555555555775027123062979747796598651156132669853568621902", 14, RoundingMode.ROUND_CEIL, "-0.99883756464211"); + t("3741565840746605.71876151239588", 15, RoundingMode.ROUND_UP, "-0.930123581114026"); + t("3050000000000000000000200000000000000000000.0000000000000000000000008", 41, RoundingMode.ROUND_FLOOR, "-0.33127228153577434134804953378906485886176"); + t("0.33482", 27, RoundingMode.ROUND_HALF_UP, "0.944469472783453774254728912"); + t("0.1979574070039662", 30, RoundingMode.ROUND_UP, "0.980470333633282159348863278164"); + t("960492.3601219999999", 74, RoundingMode.ROUND_HALF_EVEN, "0.78272168046024997208016985369610426247753755795663609587331768113997535495"); + t("0.1145342", 57, RoundingMode.ROUND_UP, "0.993448125551484394628225244895937689399175688856818869855"); + t("99999999999999999999999.99", 70, RoundingMode.ROUND_UP, "-0.7059760628345569635155393670172360201795320597371430862306924466086157"); + t("0.10859933721171128209598967066", 80, RoundingMode.ROUND_HALF_UP, "0.99410888528803407646108267824473898405842663808987770888683180574685964084716924"); + t("2813920.875088303362819", 33, RoundingMode.ROUND_CEIL, "-0.866254989781355498995879756871368"); + t("35999999999999999999999999999999999999999.999999999999999999999999919", 38, RoundingMode.ROUND_FLOOR, "-0.9562598584240982386154988349219959087"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalCoshTests.cs b/DecimalSharp.Tests/BigDecimalCoshTests.cs new file mode 100644 index 0000000..b405e11 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalCoshTests.cs @@ -0,0 +1,141 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalCosh")] + public class BigDecimalCoshTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Cosh() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Cosh().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", 20, RoundingMode.ROUND_HALF_UP, "1"); + t("-0", 20, RoundingMode.ROUND_HALF_UP, "1"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "Infinity"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "Infinity"); + + t("0.7356369431260767888795717715533948998814", 4, RoundingMode.ROUND_CEIL, "1.284"); + t("0.32350325607614", 8, RoundingMode.ROUND_CEIL, "1.0527852"); + t("0.39", 10, RoundingMode.ROUND_FLOOR, "1.077018834"); + t("-0.4085", 1, RoundingMode.ROUND_FLOOR, "1"); + t("-0.8353225329554414512103907831003554564", 10, RoundingMode.ROUND_DOWN, "1.369646055"); + t("0.822765764301886756212368544717371789849053470184", 1, RoundingMode.ROUND_CEIL, "2"); + t("-0.608417", 2, RoundingMode.ROUND_FLOOR, "1.1"); + t("-0.3135167132332845", 4, RoundingMode.ROUND_DOWN, "1.049"); + t("-0.3872949", 5, RoundingMode.ROUND_HALF_EVEN, "1.0759"); + t("-0.69", 5, RoundingMode.ROUND_CEIL, "1.2477"); + t("-0.6767082617749", 8, RoundingMode.ROUND_HALF_EVEN, "1.2378392"); + t("-0.8808", 8, RoundingMode.ROUND_HALF_DOWN, "1.4136402"); + t("0.49600945701356094984359748395247735156888479861846043140472804537060894678", 6, RoundingMode.ROUND_HALF_DOWN, "1.12556"); + t("0.046", 8, RoundingMode.ROUND_HALF_EVEN, "1.0010582"); + t("0.9873815", 5, RoundingMode.ROUND_FLOOR, "1.5283"); + t("0.8784", 10, RoundingMode.ROUND_HALF_DOWN, "1.411246223"); + t("0.7", 7, RoundingMode.ROUND_FLOOR, "1.255169"); + t("-0.503676971304", 2, RoundingMode.ROUND_HALF_UP, "1.1"); + t("-0.52", 9, RoundingMode.ROUND_UP, "1.1382741"); + t("0.335", 5, RoundingMode.ROUND_FLOOR, "1.0566"); + t("0.54503134222707683066822814099005615624557424312284166822346112986570184867578297341372133058", 8, RoundingMode.ROUND_HALF_UP, "1.152243"); + t("0.140170026295214447428649742547694034916", 3, RoundingMode.ROUND_FLOOR, "1"); + t("0.9749", 8, RoundingMode.ROUND_DOWN, "1.514066"); + t("0.45175", 1, RoundingMode.ROUND_HALF_EVEN, "1"); + t("-0.519253467128781061573541633704", 2, RoundingMode.ROUND_HALF_UP, "1.1"); + t("-0.406127947", 8, RoundingMode.ROUND_HALF_UP, "1.0836098"); + t("0.9879237062663941347586862695316948803970665245072293680153692819868", 1, RoundingMode.ROUND_HALF_EVEN, "2"); + t("0.93872862", 6, RoundingMode.ROUND_CEIL, "1.47393"); + t("-0.3444", 2, RoundingMode.ROUND_DOWN, "1"); + t("0.08916117467145186539045806046188938916876705938558151882", 3, RoundingMode.ROUND_HALF_UP, "1"); + t("-0.416", 5, RoundingMode.ROUND_UP, "1.0878"); + t("0.96395116729510741473428", 7, RoundingMode.ROUND_CEIL, "1.50171"); + t("0.99122709843935", 6, RoundingMode.ROUND_HALF_EVEN, "1.53283"); + t("-0.982458257490853554631770530367962387675296749498661808", 4, RoundingMode.ROUND_CEIL, "1.523"); + t("-0.499", 9, RoundingMode.ROUND_DOWN, "1.12710543"); + t("0.2", 10, RoundingMode.ROUND_HALF_UP, "1.020066756"); + t("0.32898510410686170443107121609290058087988034054", 1, RoundingMode.ROUND_CEIL, "2"); + t("-0.5054805141", 4, RoundingMode.ROUND_UP, "1.131"); + t("0.905453421072444252766729099661770268735489121", 5, RoundingMode.ROUND_CEIL, "1.4388"); + t("0.8", 8, RoundingMode.ROUND_HALF_UP, "1.3374349"); + t("-0.92256", 9, RoundingMode.ROUND_HALF_EVEN, "1.45661127"); + t("-0.3", 3, RoundingMode.ROUND_DOWN, "1.04"); + t("-0.8022", 6, RoundingMode.ROUND_UP, "1.3394"); + t("0.280279125313444767164013539810445145153395088331", 9, RoundingMode.ROUND_HALF_EVEN, "1.039536"); + t("0.922", 9, RoundingMode.ROUND_UP, "1.4560184"); + t("-0.3831639", 2, RoundingMode.ROUND_FLOOR, "1"); + t("-0.116822455409380771652804478024770757014", 9, RoundingMode.ROUND_CEIL, "1.00683151"); + t("-0.6271139128871161107740496", 6, RoundingMode.ROUND_HALF_EVEN, "1.20317"); + t("-0.365006", 6, RoundingMode.ROUND_HALF_UP, "1.06736"); + t("0.2851921", 4, RoundingMode.ROUND_UP, "1.041"); + t("0.8341406563142720368", 9, RoundingMode.ROUND_HALF_EVEN, "1.36854088"); + t("0.91", 4, RoundingMode.ROUND_FLOOR, "1.443"); + t("-0.578095765576", 3, RoundingMode.ROUND_CEIL, "1.18"); + t("-0.5523113", 1, RoundingMode.ROUND_CEIL, "2"); + t("0.8820775602347211771265107133401152251168847255764663", 3, RoundingMode.ROUND_DOWN, "1.41"); + t("0.6", 6, RoundingMode.ROUND_HALF_EVEN, "1.18547"); + t("0.9519214874557153045994771268316705218216663716829234702503703405", 4, RoundingMode.ROUND_HALF_UP, "1.488"); + t("-0.3218817", 3, RoundingMode.ROUND_CEIL, "1.06"); + t("0.44351821336668159678862896314345092", 3, RoundingMode.ROUND_HALF_UP, "1.1"); + t("0.3049381299213785", 53, RoundingMode.ROUND_DOWN, "1.0468550263953477301259281776879206575932575051887101"); + t("0.26099", 10, RoundingMode.ROUND_HALF_DOWN, "1.034251653"); + t("-0.144401442746890126", 19, RoundingMode.ROUND_HALF_UP, "1.010444017455030066"); + t("-0.5714572371177476181814955346898484074259146899385956872902543373645059", 73, RoundingMode.ROUND_HALF_DOWN, "1.167773824213016730263000463935976580681778400516250742892039174797873742"); + t("-0.86979236712642165283", 49, RoundingMode.ROUND_DOWN, "1.402726925102945094675128817370785304534247058512"); + t("-0.9152145856049272208", 69, RoundingMode.ROUND_UP, "1.44887088581511840041990778954419353285403899090899859306282037305997"); + t("0.387335806024227799329046192853758455983606", 5, RoundingMode.ROUND_CEIL, "1.076"); + t("0.388975556466", 66, RoundingMode.ROUND_HALF_DOWN, "1.07660966083264696675091150003451244766269524553188412387790834976"); + t("0.33160669064983873525", 31, RoundingMode.ROUND_HALF_EVEN, "1.055487176550956129534144973298"); + t("-0.28019", 70, RoundingMode.ROUND_HALF_DOWN, "1.039510693535834131464819444254660971197184738177259681537805828091364"); + t("0.0343866155482285230161896002936333091757205795137", 120, RoundingMode.ROUND_HALF_DOWN, "1.0005912779235089895769422420654318600732389756527372429232171774523704748559241986434711131587505267979139253999862614"); + t("-0.75527206899549804249272338314789674457252085843936589751993516463961504230583153756146668708760395655590486810061", 106, RoundingMode.ROUND_CEIL, "1.29903660802276993760774110068399331119553878155671711944963582837840404664230951744751300716828764841588"); + t("-0.83084942449681844413114311598350904971957", 93, RoundingMode.ROUND_HALF_EVEN, "1.36547331079818409968059488018604532655176218338970363279898668882713647242007579671435739185"); + t("-0.98844124605395210760378949114", 131, RoundingMode.ROUND_CEIL, "1.5295995535325468391822464280546813045893064120694053640627522765165675183539459515034055077956555297594529493277522750037125717944"); + t("-0.229408429422973", 52, RoundingMode.ROUND_CEIL, "1.026429721818672220645820449684681483193384767884207"); + t("-0.8795273546479571", 109, RoundingMode.ROUND_HALF_EVEN, "1.412369739179125250038557346407853960447139468646550916478036613726909366980231455652343138412407973670167567"); + t("0.08734", 48, RoundingMode.ROUND_FLOOR, "1.00381656302446278617584212015393654314148839114"); + t("-0.62885554240228925749059660488815716811800585603869", 110, RoundingMode.ROUND_HALF_DOWN, "1.2043323206984141503358874585487300913633309056345327254563876032684247394072689488447245272709777045418471248"); + t("0.736352757166802915869146657898488678037", 144, RoundingMode.ROUND_HALF_DOWN, "1.28358114765511064759744597771942942566178143747193954192893000446178314298730052934993653082205769261457701471805410675980773447720532092970925"); + t("-0.03585", 71, RoundingMode.ROUND_HALF_UP, "1.000642680077818347803829459573033542748786958454887675462988399590914"); + t("-0.0688528", 140, RoundingMode.ROUND_HALF_EVEN, "1.0023712906116182102872252559253654170023868298415419690478795554725602053890197559688480320707763057478441774639116768661635006893735054584"); + t("0.0168267352", 5, RoundingMode.ROUND_CEIL, "1.0002"); + t("-0.29337986744607176495268228205202618529507623296114708105478490669140318050037567584175308798414405821808486964207338344736952978297599188171", 6, RoundingMode.ROUND_UP, "1.04335"); + t("0.86878215121864496587492106526718403062818412998115479876941611922436896770420563647660680761", 75, RoundingMode.ROUND_UP, "1.40173390305230312316107861896321531639504128694271018346467019916830918736"); + t("0.2", 13, RoundingMode.ROUND_HALF_DOWN, "1.020066755619"); + t("0.7186693973416109381775823439368505900019443708610142063266365964635806721", 64, RoundingMode.ROUND_CEIL, "1.269550877565823873829899249395373137692396168326956113337601496"); + t("-0.6081", 33, RoundingMode.ROUND_FLOOR, "1.19066105804760103593649377284751"); + t("0.33638979922638509091106475953810395641998150066065089020973699789581749159274904445966819915958672238151012655263653519891140163", 56, RoundingMode.ROUND_UP, "1.0571145964853011640156635194135243640222120068086141542"); + t("-0.528693621225218634808351766034027", 14, RoundingMode.ROUND_UP, "1.1430443609004"); + t("-0.143173097658174034133478578859895", 139, RoundingMode.ROUND_HALF_EVEN, "1.01026678782935959075629127133465981817550372382865818357596044596268912805753877412874535411755367732759740274249043367842083642626220661"); + t("0.2", 26, RoundingMode.ROUND_HALF_EVEN, "1.0200667556190758462955038"); + t("-0.888665339961", 143, RoundingMode.ROUND_HALF_EVEN, "1.4215429767257970529790075871798024719315334083688503048535857341028009449476701044589860625229223409387411810670578448660839797632491579578644"); + t("-0.8927373765563130228171556137613812", 76, RoundingMode.ROUND_HALF_UP, "1.425668910210701385640797102156834965294078876259114606262240531040574444596"); + t("0.9", 103, RoundingMode.ROUND_DOWN, "1.433086385448774387841790401624048341627737841305230594247417192533449635356864305114609711796244033432"); + t("-0.833291445811118155331699076307265315671094768698998", 48, RoundingMode.ROUND_CEIL, "1.36774796193155903463660933986762434999452033326"); + t("-0.7", 66, RoundingMode.ROUND_HALF_EVEN, "1.25516900563094301816467474099029711586260477992884178681185039895"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalDivTests.cs b/DecimalSharp.Tests/BigDecimalDivTests.cs new file mode 100644 index 0000000..54c2ece --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalDivTests.cs @@ -0,0 +1,1067 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalDiv")] + public class BigDecimalDivTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Div() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (bool expected, BigDecimalArgument dividend, BigDecimalArgument divisor) => + { + var quotient = bigDecimalFactory.BigDecimal(dividend).Div(divisor); + BigDecimalTests.assertEqual(expected, quotient.IsZero() && quotient.IsNegative()); + }; + + t(false, 1, double.PositiveInfinity); + t(true, 1, double.NegativeInfinity); + t(true, -1, double.PositiveInfinity); + t(false, -1, double.NegativeInfinity); + t(false, 0, 1); + t(true, 0, -1); + t(true, "-0", 1); + t(false, "-0", -1); + t(false, 0, double.PositiveInfinity); + t(true, 0, double.NegativeInfinity); + t(true, "-0", double.PositiveInfinity); + t(false, "-0", double.NegativeInfinity); + + var t2 = (BigDecimalArgument dividend, BigDecimalArgument divisor, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(dividend).Div(divisor).ValueOf()); + }; + + t2(1, 0, "Infinity"); + t2(1, "-0", "-Infinity"); + t2(-1, 0, "-Infinity"); + t2(-1, "-0", "Infinity"); + t2(1, double.NaN, "NaN"); + t2(-1, double.NaN, "NaN"); + t2(0, 0, "NaN"); + t2(0, "-0", "NaN"); + t2("-0", 0, "NaN"); + t2("-0", "-0", "NaN"); + t2(0, double.NaN, "NaN"); + t2("-0", double.NaN, "NaN"); + t2(double.NaN, 1, "NaN"); + t2(double.NaN, -1, "NaN"); + t2(double.NaN, 0, "NaN"); + t2(double.NaN, "-0", "NaN"); + t2(double.NaN, double.NaN, "NaN"); + t2(double.NaN, double.PositiveInfinity, "NaN"); + t2(double.NaN, double.NegativeInfinity, "NaN"); + t2(double.PositiveInfinity, 1, "Infinity"); + t2(double.PositiveInfinity, -1, "-Infinity"); + t2(double.NegativeInfinity, 1, "-Infinity"); + t2(double.NegativeInfinity, -1, "Infinity"); + t2(double.PositiveInfinity, 0, "Infinity"); + t2(double.PositiveInfinity, "-0", "-Infinity"); + t2(double.NegativeInfinity, 0, "-Infinity"); + t2(double.NegativeInfinity, "-0", "Infinity"); + t2(double.PositiveInfinity, double.NaN, "NaN"); + t2(double.NegativeInfinity, double.NaN, "NaN"); + t2(double.PositiveInfinity, double.PositiveInfinity, "NaN"); + t2(double.PositiveInfinity, double.NegativeInfinity, "NaN"); + t2(double.NegativeInfinity, double.PositiveInfinity, "NaN"); + t2(double.NegativeInfinity, double.NegativeInfinity, "NaN"); + + t2(1, "1", "1"); + t2(1, "-45", "-0.02222222222222222222222222222222222222222"); + t2(1, "22", "0.04545454545454545454545454545454545454545"); + //t2(1, 0144, "0.01"); //js only + t2(1, "0144", "0.006944444444444444444444444444444444444444"); + t2(1, "6.1915", "0.1615117499798110312525236210934345473633"); + t2(1, "-1.02", "-0.9803921568627450980392156862745098039216"); + t2(1, "-0.0001", "-10000"); + t2(1, "8e5", "0.00000125"); + t2(1, "1e-14", "100000000000000"); + t2(1, "-94.12E+0", "-0.01062473438164045898852528686782830429239"); + t2(1, "Infinity", "0"); + t2(1, "-Infinity", "-0"); + t2(1, double.PositiveInfinity, "0"); + t2(1, double.NegativeInfinity, "-0"); + t2("0", 0, "NaN"); + t2("0", "0", "NaN"); + t2(3, "-0", "-Infinity"); + t2(9.654, 0, "Infinity"); + t2(0, "0.001", "0"); + t2(0, "111.1111111110000", "0"); + t2("NaN", 0, "NaN"); + t2(0, "NaN", "NaN"); + t2("NaN", "0", "NaN"); + t2(-1, 1, "-1"); + t2(-0.01, 0.01, "-1"); + t2(54, -54, "-1"); + t2(9.99, "-9.99", "-1"); + t2("0.0000023432495704937", "-0.0000023432495704937", "-1"); + t2(double.NaN, "NaN", "NaN"); + t2("NaN", double.NaN, "NaN"); + t2("NaN", "NaN", "NaN"); + t2("NaN", 4, "NaN"); + t2("NaN", "4534534.45435435", "NaN"); + t2("NaN", 99999.999, "NaN"); + t2(double.PositiveInfinity, "354.345341", "Infinity"); + t2(3, "-Infinity", "-0"); + t2(double.NegativeInfinity, "-Infinity", "NaN"); + t2("-Infinity", double.NegativeInfinity, "NaN"); + t2("Infinity", "-999e999", "-Infinity"); + t2(1.21123e43, "-Infinity", "-0"); + t2("-999.0", "Infinity", "-0"); + t2("657.342e-45", "-Infinity", "-0"); + t2("Infinity", 123, "Infinity"); + t2("-0", "Infinity", "-0"); + t2(100, 100, "1"); + t2(-999.99, "0.01", "-99999"); + t2("10", 4, "2.5"); + t2("03.333", -4, "-0.83325"); + t2(-1, -0.1, "10"); + t2("99999", "1", "99999"); + + var t3 = (BigDecimalArgument dividend, BigDecimalArgument divisor, string expected, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(dividend, config).Div(divisor).ValueOf()); + }; + + t3("999.5", 1, "1000", 3, RoundingMode.ROUND_UP); + t3("-999.5", 1, "-1000", 3, RoundingMode.ROUND_UP); + + t3("999.5", 1, "999", 3, RoundingMode.ROUND_DOWN); + t3("-999.5", 1, "-999", 3, RoundingMode.ROUND_DOWN); + + t3("999.5", 1, "1000", 3, RoundingMode.ROUND_CEIL); + t3("-999.5", 1, "-999", 3, RoundingMode.ROUND_CEIL); + + t3("999.5", 1, "999", 3, RoundingMode.ROUND_FLOOR); + t3("-999.5", 1, "-1000", 3, RoundingMode.ROUND_FLOOR); + + t3("999.5", 1, "1000", 3, RoundingMode.ROUND_HALF_UP); + t3("-999.5", 1, "-1000", 3, RoundingMode.ROUND_HALF_UP); + + t3("999.5", 1, "999", 3, RoundingMode.ROUND_HALF_DOWN); + t3("-999.5", 1, "-999", 3, RoundingMode.ROUND_HALF_DOWN); + + t3("999.5", 1, "1000", 3, RoundingMode.ROUND_HALF_EVEN); + t3("-999.5", 1, "-1000", 3, RoundingMode.ROUND_HALF_EVEN); + t3("999.4", 1, "999", 3, RoundingMode.ROUND_HALF_EVEN); + t3("-999.4", 1, "-999", 3, RoundingMode.ROUND_HALF_EVEN); + t3("999.500001", 1, "1000", 3, RoundingMode.ROUND_HALF_EVEN); + t3("-999.500001", 1, "-1000", 3, RoundingMode.ROUND_HALF_EVEN); + + t3("999.5", 1, "1000", 3, RoundingMode.ROUND_HALF_CEIL); + t3("-999.5", 1, "-999", 3, RoundingMode.ROUND_HALF_CEIL); + + t3("999.5", 1, "999", 3, RoundingMode.ROUND_HALF_FLOOR); + t3("-999.5", 1, "-1000", 3, RoundingMode.ROUND_HALF_FLOOR); + + t3("-2.8", "3", "-1", 1, RoundingMode.ROUND_FLOOR); + t3("-3", "-0.0047", "638.297872341", 12, RoundingMode.ROUND_UP); + t3("15", "-3", "-5", 1, RoundingMode.ROUND_UP); + t3("3", "0.38", "7.894736842106", 13, RoundingMode.ROUND_CEIL); + t3("-2.9", "-2.2", "1.3181818181818182", 17, RoundingMode.ROUND_HALF_UP); + t3("-1.20", "0.00035", "-3428.571428571", 13, RoundingMode.ROUND_HALF_UP); + t3("-6", "-1.0", "6", 1, RoundingMode.ROUND_DOWN); + t3("1.1", "-1.5", "-0.7333333", 7, RoundingMode.ROUND_HALF_DOWN); + t3("-1.05", "-2", "0.525", 4, RoundingMode.ROUND_CEIL); + t3("-2", "-1", "2", 13, RoundingMode.ROUND_UP); + t3("-5", "1", "-5", 16, RoundingMode.ROUND_HALF_EVEN); + t3("0.000033", "-1", "-0.000033", 11, RoundingMode.ROUND_DOWN); + t3("6", "-3", "-2", 20, RoundingMode.ROUND_HALF_EVEN); + t3("-1.20", "1", "-1.2", 13, RoundingMode.ROUND_CEIL); + t3("-1", "0.0019", "-526.315", 6, RoundingMode.ROUND_DOWN); + t3("-7", "3", "-2.333333333333", 13, RoundingMode.ROUND_DOWN); + t3("2", "4", "0.5", 8, RoundingMode.ROUND_UP); + t3("33", "-2", "-16.5", 14, RoundingMode.ROUND_FLOOR); + t3("-2", "-1", "2", 4, RoundingMode.ROUND_DOWN); + t3("-10.2", "12", "-0.85", 16, RoundingMode.ROUND_HALF_EVEN); + t3("-1.0", "10", "-0.1", 10, RoundingMode.ROUND_UP); + t3("1.3", "-3.0", "-0.434", 3, RoundingMode.ROUND_FLOOR); + t3("1.4", "6", "0.233333333333333333", 18, RoundingMode.ROUND_HALF_DOWN); + t3("55", "2", "27.5", 4, RoundingMode.ROUND_HALF_UP); + t3("1", "7", "0.14285714285714286", 17, RoundingMode.ROUND_HALF_DOWN); + t3("-1.4", "2", "-0.7", 12, RoundingMode.ROUND_HALF_DOWN); + t3("-5", "3", "-2", 1, RoundingMode.ROUND_HALF_UP); + t3("-1", "2", "-0.5", 15, RoundingMode.ROUND_UP); + t3("-8", "-3", "2.67", 3, RoundingMode.ROUND_CEIL); + t3("-16", "7", "-2.285714285714", 13, RoundingMode.ROUND_HALF_UP); + t3("1", "1", "1", 13, RoundingMode.ROUND_HALF_EVEN); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t3("-9.0201582007891419174890e+493625", "-5.50622769083719199346231074389e-8", "1.638173847369118854685833779858335057671769579218908745636679e+493633", 61, RoundingMode.ROUND_HALF_UP); + t3("5.8729543161021068260124718708021832883057695897e+49274", "-8.708403405379587884587853336e+41461", "-6.7440081065538470526693072631940999905631492068918496007e+7812", 56, RoundingMode.ROUND_FLOOR); + t3("-1.11303135570566757735452613975119540626335099312445395511e+909913", "-4.9428912981238120390359176251627374079558e-50436", "2.25178198057510227e+960348", 18, RoundingMode.ROUND_DOWN); + t3("9.34964786072062858037053820543908584e+34427", "-5.5139174707961944758881146494671658725524731327174937382473e+727", "-1.69564523049899134866471123135148425607621655195972485244321739609622142643026524021192529472e+33700", 93, RoundingMode.ROUND_HALF_UP); + t3("-8.95495805776908286477460208890137140530903524050e+3546735", "-514449923650777303707976731752571405.60601209", "1.740686050494577121230344265740919289154954933388084539546267265149437887923633011167e+3546700", 85, RoundingMode.ROUND_UP); + t3("-112977.156416947803174690696837418982360160807579018", "-6.7793027141628576643753135768314185053384986437525e+32928", "1.666501131169782697443349597254128378095825062301415158287415940806830463694e-32924", 76, RoundingMode.ROUND_HALF_DOWN); + t3("-7.519050808224891132821326159698e-555", "0.0417050002083", "-1.80291e-553", 6, RoundingMode.ROUND_DOWN); + t3("0.0312143762310912553081058912", "-4.08382620086677699331679658629041009e-90", "-7.643414458839e+87", 13, RoundingMode.ROUND_DOWN); + t3("4.0891643182290652875211844988576636684270563255557e-173776", "-4.3512242516716750610555570756791193e-72054", "-9.3978e-101723", 5, RoundingMode.ROUND_UP); + t3("1.6121785095818917662044501035572e+171567", "5.6108971779838795537551844770788131976757e-524750", "2.8732989724e+696316", 11, RoundingMode.ROUND_FLOOR); + t3("7.5653760375e+30", "8.15774224e+1590", "9.27386011340805e-1561", 15, RoundingMode.ROUND_HALF_UP); + t3("-8.660566651142957641766979855e-18592", "6.487325740700605731241602360168e-47415", "-1.33499796e+28823", 9, RoundingMode.ROUND_DOWN); + t3("-4.500945343043809676875681e-43152", "5.940827660904742303158570004409569371251583570495996069e+867097", "-7.57629340548545e-910250", 15, RoundingMode.ROUND_UP); + t3("8.96986622064415401423819967094260833389514278486115338442e-7572812", "8.4104122599652535974085220853977252989342871715575506e+4831", "1.066519207785090396984112228095053363096953582614945755253738194960648243775759819978376352442801954e-7577643", 100, RoundingMode.ROUND_CEIL); + t3("-6.856960316080e-75", "-2e-97", "3.428e+22", 4, RoundingMode.ROUND_FLOOR); + t3("-7.24821889609458e-116548", "-1.25771065437743895862578613162692675e-296408", "5.7630257570509453279427403558712890904042059962e+179860", 47, RoundingMode.ROUND_HALF_EVEN); + t3("1.66634161834784366386855049316805612010518245355860875e-1433178", "-1.2323759671622999856410026493670230698834833365211381e-119", "-1.35213738562656649534995020628832773189172872015634e-1433059", 52, RoundingMode.ROUND_CEIL); + t3("-9.89858514790913976013855098325866480343405831726e+1326732", "-3.128944043635047374403186608489765604611130599212469197e+459", "3.1635545442383396285744071213319905e+1326273", 36, RoundingMode.ROUND_UP); + t3("-8.070e-906304", "-1.5055451435372855159976696184756e-124", "5.36018467107502097209360022333300020062468708142031209526934182877919e-906180", 69, RoundingMode.ROUND_HALF_EVEN); + t3("-9.046986850521113233994088030748718263e+649192", "7.42739066e+75", "-1.2180572242205330874563272306385885272661826030839207264749e+649117", 59, RoundingMode.ROUND_FLOOR); + t3("-7.0140966397407758056324106e-567327", "53259.7776732322775987808330561104626988", "-1.31695942907887432785089328517373629792e-567331", 39, RoundingMode.ROUND_DOWN); + t3("7.40231507068915012684011850565156286998231535809e-895430", "-8.86406984919e-643", "-8.35092141265738645015908443920311470645480941163030158470835428757522e-894788", 69, RoundingMode.ROUND_CEIL); + t3("-4.921794410e+414322", "-1.0785013517e-841504", "4.5635495980064982611184983274230976561881299309270026573671840860243587583442e+1255826", 77, RoundingMode.ROUND_HALF_DOWN); + t3("601866548.752324072028390640262687694145312", "9.1268385395129583279994237e-1284", "6.594469115966654151749202035640916912881336984e+1291", 46, RoundingMode.ROUND_CEIL); + t3("2.867568612241923911789069819170160836469e-1906692", "-7.12441896102389693918811169596243150730e+81791", "-4.0249859362984554655443106786916039152860369641143618688585255330551064941359213504322433e-1988484", 89, RoundingMode.ROUND_DOWN); + t3("-5.23144143309771e-1367", "-7.6883670574418716341842245776e+81971", "6.804e-83339", 4, RoundingMode.ROUND_HALF_DOWN); + t3("-1e+46", "9.71058916684636392105974344694162750232811143394e-47", "-1.029803632733401478090931970815421478665673365628839811617483095659275091488624129e+92", 82, RoundingMode.ROUND_CEIL); + t3("7.2e-59409", "5.7831139640342802478088151675935006389840e+703", "1.245003996943076834455034433890469750759315904851845063541633723247163682755452146320767e-60112", 88, RoundingMode.ROUND_DOWN); + t3("9.5511191557227891017e-976054", "9189124852", "1.0393937735696344962122e-976063", 23, RoundingMode.ROUND_HALF_EVEN); + t3("4.23712926488581167975667516493342425898064e+57103", "-0.0001397286766", "-3.0323977640004440432499416980332469984e+57107", 38, RoundingMode.ROUND_CEIL); + t3("1.2743888136325381752424465340840098569178e-7", "-18573238529588601.01391", "-6.86142490229874847637478954198611190873400267067557244764e-24", 57, RoundingMode.ROUND_FLOOR); + t3("-1.104892840718228416873e-7", "3.5597797377667191893695e+934", "-3.10382361300645918144338685515593065286843980322155334919919021986707800416857125298e-942", 84, RoundingMode.ROUND_HALF_EVEN); + t3("-1.55519573186342035670507252118450593339698096309942436625e-817998", "5.0563859624221211468025641352239672653831983e+64587", "-3.075706133632344533175127773502161481034704186956042445418520782007015e-882586", 70, RoundingMode.ROUND_HALF_DOWN); + t3("-6.202151355028114221575433171095985096e+308", "6.033804697384754103136626236314", "-1.027900581156749571100486532662322045801648336202116385320823112202169619166115945348630645e+308", 91, RoundingMode.ROUND_FLOOR); + t3("8.024875460866071e-302608", "5.359320147511614393506518038e-445413", "1.497368181035443540224019658376422e+142805", 34, RoundingMode.ROUND_CEIL); + t3("3.55055235944317737144206844338561241970e+384", "-0.0022624534102156295443300961", "-1.56933722630990306246023742223862701e+387", 37, RoundingMode.ROUND_DOWN); + t3("8.124983863334591032859756583631905836816939039683944086589e+609557", "-1.60542904153166299378981482239854e+559466", "-5.06094237312596070034955736800076847046972453544295277599851337171871887357766954662496371928334e+50091", 96, RoundingMode.ROUND_HALF_EVEN); + t3("1.2361212094491178193e+83711", "-6.1097447943101726e+77", "-2.023196141678915138239321117934234676090045505345373146119122780711362684355605637208296539355003037e+83633", 100, RoundingMode.ROUND_FLOOR); + t3("-9.7913464098919312889521180664170915225195748592237470281501e-2442", "-7.117703009727629530310739342559e-531056", "1.3756328968081815297848119554475753176429302386798137109462696314553328545836837194134940777e+528614", 92, RoundingMode.ROUND_HALF_EVEN); + t3("-1.8008395847460187443885218251028268177940e-181136", "-1.9315535289572721940531408208e+1701436", "9.32327040254577916615185349472487605397250031648341346028e-1882573", 57, RoundingMode.ROUND_FLOOR); + t3("-1.69914659289020442692747108811266537843629740471379191228e-750409", "1.99579900340005978891346263731685e+87", "-8.5136157999654481886972931e-750497", 26, RoundingMode.ROUND_UP); + t3("-3.468594080438267571477376858183887124615200e+92", "5.6257641868735912825310409703621015617e+971497", "-6.165551852549068675875315487455698620448242921611056694146328281821305148315378561e-971406", 82, RoundingMode.ROUND_HALF_DOWN); + t3("-1.8252099405739206816451704100248812959e+1186", "-3.42243088142742109427052805672e-9", "5.333080502746823979506640819479922185269986904173244526721149958304591733214947e+1194", 79, RoundingMode.ROUND_HALF_UP); + t3("-2.26794496381269349400848879905354658898089516910667e+492", "6.9657557700813802540e-7189957", "-3.25584909760078670021134909504190734019544459726e+7190448", 49, RoundingMode.ROUND_UP); + t3("-0.46804364341836888128551806365696954134445", "7.987261632972183047981868785502422780e+821", "-5.859876199450382023516232392475110813719370468990469393875819714917792471118581757029002014878e-823", 96, RoundingMode.ROUND_CEIL); + t3("-9.96705038725844823301661858980473138e+947", "-7.2408733e+507", "1.3765e+440", 6, RoundingMode.ROUND_HALF_UP); + t3("6.4e-65903", "2725.9585677573990738059898886877", "2.347797973050329194430525714895592743169714777546007978234095454030731491e-65906", 73, RoundingMode.ROUND_HALF_UP); + t3("3.248366411826949431866026704463662e+52511", "-9.2033435415451915214110831e+8071781", "-3.5295503174073259785984985357981547e-8019271", 35, RoundingMode.ROUND_FLOOR); + t3("-9.98470001351862389956296e+451", "3.7474300286329393632461064424e+815", "-2.6644126607378010385763797854701476440577291827637607081033950365026e-364", 68, RoundingMode.ROUND_UP); + t3("-1.53740039467703159465920401080173826327989263865383e-74", "-1027.743193807096525634910", "1.49589936857864103759617619966197637279298146868e-77", 48, RoundingMode.ROUND_HALF_UP); + t3("-7.1898403140998064976226699627450254188793061616078584e+4075", "3.312101273050083107245022e+70", "-2.170779128223561156107980514002547628515920675156954075597305599528830244568459314942e+4005", 85, RoundingMode.ROUND_HALF_UP); + t3("4.06e+13901", "-5.85611e-50381", "-6.9329298800739740202967498902855308387308298512152264899395673920059561722713541924588165182e+64281", 92, RoundingMode.ROUND_FLOOR); + t3("3.78987311925956596100530099233127e+533", "-7.7787839e-446", "-4.8720637672677421479793274528827957285199811245559861869925451972e+978", 65, RoundingMode.ROUND_HALF_DOWN); + t3("5.71355915176845523331889400e+85", "7.9368447699694051170227763009331626968309196669062001362222e+28146", "7.19877900773216182411356396344316798e-28062", 36, RoundingMode.ROUND_FLOOR); + t3("-7.6300279510508555176447528888582183176281948759413355783e+924643", "-6.525229144297962820139259674034141343420e-98555", "1.1693118789120709003842725006130814665259894299168791890471624080948019031651507617258471260255226e+1023198", 98, RoundingMode.ROUND_HALF_DOWN); + t3("7.28439100831730318544400863622338e-975118", "-90382941.9311", "-8.05947544158308297233205000580769151550908738308801809853417304107e-975126", 66, RoundingMode.ROUND_HALF_EVEN); + t3("5.9080280425535882593423530335827988725154144673935e+150783", "-9.7116925492708374913103514832318668414602235998045246e+240", "-6.0834175017e+150542", 11, RoundingMode.ROUND_HALF_DOWN); + t3("-8.32876439894620965060923423888278658060936060382855e+5391166", "8.04186747558480860e+491", "-1.035675410497925143157313386715336111549526162006770420515223349892e+5390675", 68, RoundingMode.ROUND_HALF_DOWN); + t3("6.615091161705197007910219512584837928991296e+289223", "3.671292452338065773949802592091439062162827897496531e-514040", "1.8018426065437446911933669148638e+803263", 32, RoundingMode.ROUND_CEIL); + t3("4.22074155824438744041754715460773774e-26794", "-0.392620260033033013334236126522330408072615", "-1.075018787336465097611404243630364449447595646694657386098906315606038505272594760203526802864099342e-26793", 100, RoundingMode.ROUND_UP); + t3("-4.67699736667236482648690536440818e-535947", "-0.000003272760314495064262408864180258266590034864302365641", "1.4290681006971182312140595347675928317716659547290799132515275441516238979e-535941", 74, RoundingMode.ROUND_HALF_EVEN); + t3("-0.000084398040461600827616061519", "-1.189305971339233178095314502175250728139881670533927588e-451", "7.09641105783428769600139659965663184560402725e+446", 45, RoundingMode.ROUND_HALF_DOWN); + t3("5.36563080174153764198593156640406584047160058605498e-827949", "-5.117680469211393e+56", "-1.048449748674588988737499894175e-828005", 31, RoundingMode.ROUND_HALF_UP); + t3("85.589843957916002336981173213", "0.0000578255253220352633511490632580338770863578897775", "1.4801394968962e+6", 15, RoundingMode.ROUND_DOWN); + t3("-351607.1187872102002591263170005488", "-9.43211176998759831430041388795767495627847463971963992990e+9816897", "3.7277666694536265675007568840266918599145597645718155579541605e-9816893", 62, RoundingMode.ROUND_DOWN); + t3("5.54766258186312012212070335772068830425136308583014956e+69623", "6747132.4960288947760609757117734740909355201", "8.222252319971874031e+69616", 19, RoundingMode.ROUND_FLOOR); + t3("-7.40794403e-1867427", "1.07829970890779e-80", "-6.870023212288082e-1867347", 16, RoundingMode.ROUND_DOWN); + t3("2.8138856089460929272361416217404739394197772e-5864", "4.120358854405098750175445168459012485500020673033832e+13388", "6.829224609739396965225736675346830773941251044978533929261416840376667913341292696644e-19253", 85, RoundingMode.ROUND_CEIL); + t3("1.25611e-7382", "5.22783672860544552165472229850258202818243975e+561", "2.402733798335500653391738916406216392904413019e-7944", 47, RoundingMode.ROUND_DOWN); + t3("-4.298240874909906897e-28", "-4.25064103499e+369", "1.01119827327880178894776703201179105690352e-397", 42, RoundingMode.ROUND_HALF_DOWN); + t3("-3.3734578706259646249822280062e-9836", "2.04159630139282492575938762375186e+823662", "-1.6523628439e-833498", 11, RoundingMode.ROUND_UP); + t3("-1.4929903958127657150797046e-31761", "-9.34820994328909660952679308089769623534838087e-504367", "1.597086934151e+472605", 13, RoundingMode.ROUND_DOWN); + t3("-6.17416836518150351171259742611706e-97", "-9.88775533288148875e+37187", "6.244256817975114615221762745361996320156750169699731652e-37285", 55, RoundingMode.ROUND_FLOOR); + t3("-9e-296674", "-9.429077635688888467419778561698443234851940034555559e-7593", "9.54494209056e-289082", 12, RoundingMode.ROUND_UP); + t3("2.6439727192e+992732", "-2.01160292191790849717605363585281e+3688", "-1.3143611447328658640835497026217432813435045010572027729281904104297711381081829e+989044", 80, RoundingMode.ROUND_UP); + t3("-4.53845718907359787719378104959276674317e-49650", "5.08475248507297756177418035662893e+69", "-8.9256206715e-49720", 11, RoundingMode.ROUND_CEIL); + t3("-5.693328123037558e-50195", "2.7199658e+64302", "-2.09316165778171107886724163958238005e-114497", 36, RoundingMode.ROUND_FLOOR); + t3("4.978838741243446e+7675146", "-2.79566412024916162230460222172486e-50", "-1.7809144901e+7675196", 11, RoundingMode.ROUND_CEIL); + t3("-1.88784650527777086088949271343154160454393e-1404757", "-0.0000502787620604091848652480080339383261497", "3.75475932165861872458913296058527751903692013400759286e-1404753", 54, RoundingMode.ROUND_HALF_DOWN); + t3("-5658507039746715423.167542720210950494520611683594823141492", "5.7725075471049662533145488840960912984928824220440e+302000", "-9.8025112891962792177142779236158942424695123056e-301983", 47, RoundingMode.ROUND_HALF_DOWN); + t3("-5.67859887941334558531160e+4269739", "9.0616208329978377544345050634619764178276772330038011031e-903", "-6.266648079927116266831922933734264307785369125e+4270641", 46, RoundingMode.ROUND_CEIL); + t3("-5.153438159204456445e+441963", "-3.910302066e-1945068", "1.3179130594573499747116467395693005779160182148444794852838358702900268473e+2387031", 74, RoundingMode.ROUND_HALF_DOWN); + t3("6.50766000334324292674204104205256939890391290244703e-570636", "-6.13825054376718197194260486288608e-36", "-1.06e-570600", 3, RoundingMode.ROUND_HALF_DOWN); + t3("0.0003561032581306", "4.77053286770261875972371870e+87", "7.46464321714423724166117282096633e-92", 33, RoundingMode.ROUND_FLOOR); + t3("423561.59245453820356744150114646992866121611599555557", "-7.96e+8386897", "-5.32112553334846989406333544153856694298010195974316042713567839195979899497e-8386893", 75, RoundingMode.ROUND_HALF_UP); + t3("-5.1558130542057773853e+483", "6.2", "-8.315827506783511911774193548387096774193548387e+482", 46, RoundingMode.ROUND_HALF_EVEN); + t3("9.80010135321953141397e-9479241", "1.48559844e+2465", "6.59673643250428521853455904275182195264017643960369263715705032646641712951717962224031414573e-9481706", 93, RoundingMode.ROUND_HALF_EVEN); + t3("2.921469205835105144020568210975511896e+994", "-2.850750914899798e+8528563", "-1.02480689932104883493349188185159896705506939026865209759783571883322480129714412160052799e-8527569", 90, RoundingMode.ROUND_HALF_DOWN); + t3("6.02475139808495394997772158116702e-21", "2.37617147374471492952579010471604836012667268737402989000675e-7788231", "2.53548679657797536354423e+7788210", 24, RoundingMode.ROUND_CEIL); + t3("87513.32883116404188225508498894548197167557912759240052210", "3.7772896063968138047935970431e-5045", "2.3168286774453519584522693858683014239766232911352581157877601882e+5049", 65, RoundingMode.ROUND_FLOOR); + t3("5.7718214554244629387781323483e-928", "-8.80697537569701968499916566682238518251640403050597553611e+765307", "-6.5536931911401621494952381236078093131919781294446e-766236", 50, RoundingMode.ROUND_FLOOR); + t3("-7.31783566924948556509724994049448360187e+43", "4.193922413377111528576823606882686875e+132239", "-1.7448667256953e-132196", 15, RoundingMode.ROUND_CEIL); + t3("1.5763909385752914105437373419998105285263445570305756313e-939065", "5.2696546007e-743", "2.99145e-938323", 6, RoundingMode.ROUND_HALF_DOWN); + t3("-7.3695076326257297560e+939", "-7.566e+873913", "9.74029557576755188474755e-872975", 24, RoundingMode.ROUND_HALF_UP); + t3("-7.615009147460135e-2238951", "5.098853922503091887250195828406763584e+2029", "-1.493474663757739247e-2240980", 19, RoundingMode.ROUND_UP); + t3("4.7118761952579331686862200927113271192e+972298", "-8.1045590739e+3987", "-5.81385878280794397787160794e+968310", 27, RoundingMode.ROUND_UP); + t3("3.05259816713008214309752e-34", "9.072438477569600795244081994373265659e+3600595", "3.3646942601784797867441e-3600630", 23, RoundingMode.ROUND_HALF_DOWN); + t3("3.5933388527257947e-69", "7.1641505002922391424671237937068824e+93521", "5.0157221747075465058e-93591", 20, RoundingMode.ROUND_CEIL); + t3("9.39168343132314935e+371121", "5.3947954122933792607331297865723793172399569985e-387897", "1.74087851597149903151101989151427616342421252127054094524491742593e+759018", 66, RoundingMode.ROUND_DOWN); + t3("6.8421850057907933405544695887211983810452221801e+684439", "9.162088e-434522", "7.46793198863708069662119550556728813458812246738952954829e+1118960", 57, RoundingMode.ROUND_CEIL); + t3("2.54275263810343519553437544378832436e-303", "-0.08770599033318", "-2.89917784229e-302", 12, RoundingMode.ROUND_CEIL); + t3("31981.165449494238805174660659817376468695645961", "2.23651670491568483146967340797091924533e-989818", "1.429954239966e+989822", 13, RoundingMode.ROUND_FLOOR); + t3("-4.3304985248849022107e+84598", "721382.36921875", "-6.00305567430874344247379626761969984667e+84592", 39, RoundingMode.ROUND_FLOOR); + t3("-5.69941467419121688624215027573910521249071692951357140749241e+2238", "1.47308952694108000853902e-188201", "-3.869021244096577970516432071542636232690279162375e+190439", 49, RoundingMode.ROUND_FLOOR); + t3("-807045896.37201888946402216019903869620386", "-9.08231770105120e+35", "8.88590250788749971057617554208065127368874350003175872528293248627303374010246161422038e-28", 87, RoundingMode.ROUND_HALF_UP); + t3("-3729", "1.0546094247819167974007e+3449", "-4e-3446", 1, RoundingMode.ROUND_HALF_DOWN); + t3("-5.47050611316e-521048", "1.682277204e+919126", "-3.25184583144360315542859843686e-1440174", 30, RoundingMode.ROUND_HALF_UP); + t3("-4.3283158011e-852855", "8.1631725039603251121269990518659693605483302e-6995", "-5.30224713369726996773806997000061981936102436057537e-845861", 51, RoundingMode.ROUND_CEIL); + t3("3.830790634e+338750", "-1972.99790017035104904780622921", "-1.9416090780782102488343413702801e+338747", 32, RoundingMode.ROUND_HALF_EVEN); + t3("-675363513.402269898572629297102147534327342971037825167", "2.3e+4480635", "-2.936363101748999559011431726531076236205839e-4480627", 44, RoundingMode.ROUND_HALF_EVEN); + t3("-6.9843101214254330530310114e+875601", "1.78702225591614033015555756095728421e-37748", "-3.9083509443170505610410562761111795229709958845170193696171800343480046642337394354637126600389418e+913349", 98, RoundingMode.ROUND_CEIL); + t3("6.16537500715193614011018728455679e-885", "7.872343857695937901e-745", "7.831689162211476312583530674208619972304918867871e-141", 49, RoundingMode.ROUND_CEIL); + t3("3.727006137610643885052534419530511e+78", "-1.425386648485847138744055919504080772e-886", "-2.61473344202413429907946769817909664196987836016435350482399200706130745727594349802635891586e+964", 93, RoundingMode.ROUND_HALF_UP); + t3("7.43959327574e+5181", "-7.9074313981397299324949e-52", "-9.4083563943282623716203312085417443848809831081928646668382343690834056267e+5232", 74, RoundingMode.ROUND_HALF_EVEN); + t3("-3.4490340985404845139552633843307403193543e-6651", "7.2842692393679412330016944012164504254989382282e-426825", "-4.7349074906514005968e+420173", 20, RoundingMode.ROUND_HALF_EVEN); + t3("-3.12646845651434317784659897194601292447905599816047557896e+83609", "-4.44821508711659247554239e+84531", "7.028591e-923", 8, RoundingMode.ROUND_DOWN); + t3("-4.9158931676508508586366306659252842802577412066912290e+6841", "-9.97885279829e-4348", "4.92631093675742970055851625020542497534673412306023848256715519495285e+11188", 69, RoundingMode.ROUND_HALF_EVEN); + t3("4.5204228951407159990066208e-3745", "-0.004", "-1.1301057237851789997516552e-3742", 69, RoundingMode.ROUND_UP); + t3("-3.09307e+5347", "-0.8984736838504547635274923785", "3.442582744042642266786782278260624614507789e+5347", 43, RoundingMode.ROUND_FLOOR); + t3("1.278957083641480297045115728536640377e-882", "-9.1829578959430558e-90519", "-1.3927506780865362298960771170837187909688134215939e+89636", 50, RoundingMode.ROUND_HALF_UP); + t3("-1.280e-30680", "-7.809867371408833685193380117868583027e+33846", "1.638952288339691587843478189801175e-64527", 34, RoundingMode.ROUND_UP); + t3("-4.796625599778919175150221338154194105391e-3693", "1.0644936863715949e-3575", "-4.5060160160541399e-118", 17, RoundingMode.ROUND_HALF_EVEN); + t3("-2.338716751466980568104931647443388782971007e-594", "-8.76079791822909184588455192060496995121228203764073135e-7", "2.6695248233048262067724344845187321954535e-588", 41, RoundingMode.ROUND_HALF_DOWN); + t3("-2.88857445130347e+34", "-4.5727677050043269726429416e+57466", "6.3169061663514715799083365164448167754425592465222489e-57433", 53, RoundingMode.ROUND_UP); + t3("9.0464589776483057165017421e-30", "6.06745997e+141768", "1.490979589874130758624805908690650990813211743364826847e-141798", 56, RoundingMode.ROUND_HALF_UP); + t3("4.0891e+8682457", "-0.285100211208484985423775082", "-1.43426761511929129076674694508290636841735067147441019762532785721934538893495633683716943287921582e+8682458", 99, RoundingMode.ROUND_CEIL); + t3("-8.36533512511e+2210", "-2.2074165483312369355092715221e+9854", "3.7896495482169086724607338870566377482914270703864737066601275861373795191e-7644", 75, RoundingMode.ROUND_HALF_DOWN); + t3("5.52706150135816541190537725676638784816e-39", "5.506157558676409241502564869727746514208939474698e+18904", "1.00379646649391942543124561396333984453880182681374708614940506997100647153719275030013e-18943", 87, RoundingMode.ROUND_HALF_DOWN); + t3("-1.288279714202288615454e-596927", "-3.77546319534770573354581697206296e-42949", "3.412242809808778910720913252239877519936414468601131742686648528257078142609085752972025220629296596e-553979", 100, RoundingMode.ROUND_HALF_DOWN); + t3("-6.153052379002130168510557374994653393268", "1.7358896156255864099559044599825626297210e+3157200", "-3.5446103966608902581464527977e-3157200", 29, RoundingMode.ROUND_HALF_DOWN); + t3("3.42374045880379367998282136916009048354975475e-459", "-3.71961470952892229383923198866553177381531730879349520967e+9323392", "-9.204556724740449869859132948088048642326875592013709820825989488772e-9323852", 67, RoundingMode.ROUND_HALF_DOWN); + t3("-8.029527535353e-8923", "-382173906.1", "2.10101406903798029867638836161765885669398400614667187504249129058997259467788e-8931", 78, RoundingMode.ROUND_FLOOR); + t3("7.54405949614753081e+2945477", "-1.2969572371386e-39", "-5.81673726790834124060476166960328240382299131951266748135316067254764231735799071285353603929078e+2945516", 96, RoundingMode.ROUND_DOWN); + t3("-52465", "6.04671115345965326980458938153601846588748169e-44", "-8.67661753116517096859514986859114860862090070653645935252959574e+47", 63, RoundingMode.ROUND_HALF_UP); + t3("1.4633750786e+28385", "6.4e-67", "2.2865235603125e+28451", 20, RoundingMode.ROUND_HALF_UP); + t3("7.4803238e+6937754", "-398287514481567281059186496112.143318", "-1.87812159006209291405314267025131725835563091083703200385262e+6937725", 60, RoundingMode.ROUND_HALF_EVEN); + t3("-3.99879850022268386238702401202296926182374685e-101020", "4.941987958200394155523261928737367666185011455660081e+1521", "-8.09147762812200559345178485001850079766691e-102542", 42, RoundingMode.ROUND_DOWN); + t3("-6803066.78655613559643867402367500170440266090475412341", "-4.35752016541514522894124887798932462e-9", "1.561224395597949169169135e+15", 25, RoundingMode.ROUND_HALF_UP); + t3("4002943.595339596145529525507585154374501889180", "7.48365108818012585828282380463973422306674153125104052e-5682614", "5.3489179923e+5682619", 11, RoundingMode.ROUND_HALF_UP); + t3("3.76872899581827988357416381361938138263757177508e-8", "-1.3878956626098432e-4521", "-2.715426740891632926325292842225052328752037516453023854502281226161793716837461e+4513", 79, RoundingMode.ROUND_FLOOR); + t3("-1.8143315369896313220192384990961747995084538536e-652154", "-1.64972e+37", "1.099781500490768931709161857221937540618076918264917683000751642703004146158135926096549717527822904e-652191", 100, RoundingMode.ROUND_UP); + t3("1.077950051217448803307899727500419929851e+67383", "9.63133018252238196604554120627877300948e-5273897", "1.119212020343321654951674321950063587369212979650466228152527216933560442214435806e+5341279", 83, RoundingMode.ROUND_DOWN); + t3("-4.9692553578428e+924108", "2.1462368e+32185", "-2.3153341503802376326787426e+891923", 26, RoundingMode.ROUND_HALF_EVEN); + t3("5.930990738383053010721102273e-97036", "-3.65966511964763315813782962456128293763264222893735645e+500", "-1.6206375568467619650484357428145577548720152013649725255302838490585441e-97536", 73, RoundingMode.ROUND_UP); + t3("4e-75671", "-1.70839225333645877614084793215132655045157016180043878649e-12843", "-2.3413826609129567713111285198617587201274761608761376874e-62828", 56, RoundingMode.ROUND_DOWN); + t3("6.91439488419339340315975001e+5596001", "-5.16903704616137e+77", "-1.33765628345e+5595924", 12, RoundingMode.ROUND_DOWN); + t3("-3.7272665275459591457414082845e+890800", "6.572249044180767e+314787", "-5.6712192470036931497313123e+576012", 26, RoundingMode.ROUND_HALF_DOWN); + t3("-5.7045884550662551247342877917788744897456312e-51697", "-3.44612644750133357600866e+9136468", "1.65536248944157397260819252517234149348139815239687213295268100601194e-9188165", 69, RoundingMode.ROUND_DOWN); + t3("-5.798080270240466658842194604602234815273651577331e-604", "0.000005507441779976069848143514575", "-1.05277195871976328938e-598", 21, RoundingMode.ROUND_DOWN); + t3("-1.12716558087499949577479980549898647746137202857e-42550", "-3e+6", "3.75721860291666498591599935166328825820457342856666666666666666667e-42557", 66, RoundingMode.ROUND_HALF_EVEN); + t3("9.029304e-44495", "-3.64145555513779926589009748930107e-983355", "-2.479586490424243225977952663944442587563972524447300319836489006379990970201351934707743567069631277e+938860", 100, RoundingMode.ROUND_FLOOR); + t3("-4.520055620360621304275037267801651847705e+3563240", "-1.756992768930296764206837935869004010161438300752191e+31082", "2.572609119565443404701767686555306e+3532158", 34, RoundingMode.ROUND_HALF_DOWN); + t3("-6.511633724726488e-908197", "8.741385376254644142100e+9923", "-7.449201065e-918121", 10, RoundingMode.ROUND_FLOOR); + t3("-4.727173765422559931e+2550", "-5.0e-7235", "9.454347530845119862e+9784", 87, RoundingMode.ROUND_HALF_EVEN); + t3("1.70316439e-9459", "-7.8361e+58", "-2.173484756447722719209811002922372098365258227945023672490141779711846454231058817524e-9518", 85, RoundingMode.ROUND_HALF_UP); + t3("-5.406631153924624319629205640970181e+2086152", "3.480623868294410918927077008146482778988703493268074099466e-189433", "-1.55335116878745163354434679883585669329899340343081904982491891350342123010900374959249020654229e+2275585", 96, RoundingMode.ROUND_DOWN); + t3("-9.7492472756056798812336104410110379537907097266e+46638", "7.75465e-1490378", "-1.2572130625631949709185599e+1537016", 26, RoundingMode.ROUND_UP); + t3("-3.1908288340733e-2109630", "-8.088574102565401236091654734238720e-89", "3.9448594939141e-2109542", 14, RoundingMode.ROUND_HALF_DOWN); + t3("4.73970296075144109211823587827902601864e+995", "9.0e+70025", "5.2663366230571e-69031", 14, RoundingMode.ROUND_DOWN); + t3("-1.8152795e-62017", "-0.0000180100506137", "1.007925818164631713535804587054268307128e-62012", 40, RoundingMode.ROUND_HALF_UP); + t3("-2.99866476344257805037744687194745964863e+3924687", "9.10646106540838364998613834e-20", "-3.29289802251858799226153509010269776429660641640999375e+3924706", 54, RoundingMode.ROUND_FLOOR); + t3("7.18895376979e+443864", "-2.96156741318470092385755745122158310400744307157681974007161e+125453", "-2.4274152051326795744379402883333820009191903153566464579425606259197487511e+318411", 74, RoundingMode.ROUND_FLOOR); + t3("-7110585455931675754137078581369901739.4931396", "-7.18603961126806198e+4805", "9.894998971035e-4770", 13, RoundingMode.ROUND_HALF_UP); + t3("5.41147077742840731903379861397587833933128736130e+650796", "5.508976354152810651962713290752845896831e-59274", "9.82300599883515369313243246351436879284328663208903699032e+710069", 57, RoundingMode.ROUND_HALF_EVEN); + t3("-2.36680800333145618131527e+5696847", "-1.291231267094664e-67", "1.83298535564190179e+5696914", 18, RoundingMode.ROUND_FLOOR); + t3("9.45737237992012431716214361370012434470559418118050763503e-5773252", "-4.821896580749656394283744178082087e-41286", "-1.961338701803885270803274517454726731856417298e-5731966", 46, RoundingMode.ROUND_CEIL); + t3("4.3048259706272995008493754e-75086", "8.83757752624666508015471400935746193366955380200151811e-5510566", "4.87104747635019249417585435907066331197959e+5435479", 42, RoundingMode.ROUND_UP); + t3("6.02391563857731888562808414061253329299057097272948390377", "-0.00000859431905432706316128773457656901972898376", "-7.0091831598274223499618905455260634629806935712003129886689780108271e+5", 68, RoundingMode.ROUND_DOWN); + t3("5.155706593542208005e+69", "-3.752836823906004493059531004405347243836788044737e-44000", "-1.37381581866276755530952503327693855569871767143331967690218722410662644294938506519268901862e+44069", 93, RoundingMode.ROUND_CEIL); + t3("-9220750598.310382412855687591895656971256794", "6.208189361093807955850040654218e-48438", "-1.4852560162059550267737769309184427579439118150391115871709338604990312946561e+48447", 78, RoundingMode.ROUND_HALF_EVEN); + t3("-4.566238640798811448714676926894105655e+575", "2.880e+191881", "-1.58549952805514286413704059961600890798611111111111111111111111111111111e-191306", 72, RoundingMode.ROUND_HALF_EVEN); + t3("8.91604e+170", "-6.264368339072541e-53173", "-1.423294339891905e+53343", 16, RoundingMode.ROUND_HALF_UP); + t3("8.3087090877835785554965e+35979", "1.3611234824345e+2711755", "6.10430221432e-2675776", 12, RoundingMode.ROUND_CEIL); + t3("-0.902795617323001343413834248792", "-1.9622832254556375292432978323544368070474621301919288930e-7605547", "4.60074063525347791647263727570223375233476678038450676053498613441846299e+7605546", 72, RoundingMode.ROUND_HALF_DOWN); + t3("5.130267430039513e+89942", "3.306068983128470569399947418640252356869061293022225007324e+38394", "1.55177265090967277132534306390671014600343477066067674e+51548", 54, RoundingMode.ROUND_HALF_EVEN); + t3("-5.42709593652831824838271990398766047426230233281511774e+441", "6.060905321454542443148625e-79491", "-8.95426615115954695687550461846409521895630824450275734448571400865841848473595221582490459e+79931", 90, RoundingMode.ROUND_FLOOR); + t3("-2.67313108587637342e+66", "-4.2978091362412049644038575659830e-8788943", "6.2197529046491139763897883718412103051148839554074761661717609361495199609413826e+8789008", 80, RoundingMode.ROUND_CEIL); + t3("-5.062479752314056826234932702569182e+978760", "-9.0280152787587150771", "5.60752235790423930474788883129459576987903407906072606460557140943628831849657297853921988860216893e+978759", 99, RoundingMode.ROUND_CEIL); + t3("-9.682208878743727894539541638693047e-8149861", "2.68789960374616143221198636526210862719600140e-805", "-3.602146771125493149886358094423260127318575198065409723915337473739698227e-8149056", 74, RoundingMode.ROUND_DOWN); + t3("-7.74270044930678819329480422147363893912745e+46050", "-1e+850", "7.742700449306788193294804221473638939e+45200", 37, RoundingMode.ROUND_HALF_UP); + t3("3.837820335697429248772856e-24", "-9.455691040938667713520206049214946596676072547630808599e+18858", "-4.0587412586573348e-18883", 17, RoundingMode.ROUND_DOWN); + t3("-8.9043692e+441", "4.922502215686303689613411049123590850286314e+575", "-1.808911161405853749472468658351477252530084855738408407062362524906222612956452727322923633285164153e-134", 100, RoundingMode.ROUND_HALF_UP); + t3("9.983855174767877564750840e-16", "4.442077176133267221847948159903169825858e+4843459", "2.24756454669673458228e-4843475", 21, RoundingMode.ROUND_HALF_DOWN); + t3("9.1600446121e+70", "-8.8825588136102715227205181620111211101906144801558076662e-70392", "-1.03123939896e+70462", 12, RoundingMode.ROUND_UP); + t3("-5.455091346996779943893118119386347518740324439893518e-378", "8.45021012932221140260940220693e+149", "-6.4555688716753023998259305299997301767155121789813739345022368676343759e-528", 71, RoundingMode.ROUND_HALF_EVEN); + t3("4.92731241140976103504385528e-85", "-7.519758995215778653646e-775817", "-6.5524871402722027658916864184976681654878155377984377065047487e+775731", 62, RoundingMode.ROUND_HALF_EVEN); + t3("-8.923714924347837557972462364680155791045288887882610e+6873", "9.56049787920712725220195633365229138986759e+45", "-9.333943730855050949857016361651494295053372418814941087257474684725684596833663177979308872e+6827", 91, RoundingMode.ROUND_UP); + t3("9.120994782870624984584405564109022983116068171157228e+22644", "-3.928918196021315074729587563484036421484733019e+3670", "-2.32150284831767517357787307199788401065025409196970414726140444186928253286397518539667412e+18974", 90, RoundingMode.ROUND_HALF_UP); + t3("5.260714966994821283e+7974", "2.2913553636054275189474093725394183782817319448922e-9815", "2.2958965905302146301937347743405869476376213710869775730184386683339649366593429618e+17789", 83, RoundingMode.ROUND_FLOOR); + t3("-4.4740423949e-72435", "-1.99011935060167359745521083763866204854294900538e+336309", "2.2481276781452132166604677212513978692998883937953944582350859781573893143723276447e-408744", 83, RoundingMode.ROUND_UP); + t3("5.92364961196923e+621", "-3.07947537997234899379967457947260721873267015441e+64", "-1.92359050846589954327755584024104053274424702849524072478922488187e+557", 67, RoundingMode.ROUND_FLOOR); + t3("7.4307644562561968240753606201216532907e+101310", "-3.054126964798505532855206526040009849562e-582", "-2.43302408246359126563744935804440189495732397304842343038283559694e+101892", 66, RoundingMode.ROUND_HALF_EVEN); + t3("-3.6515736e-67", "4.031148294860998414946968992580399564234775910e+722", "-9.0583956056767024362785126665230736574031747156e-790", 47, RoundingMode.ROUND_DOWN); + t3("5.12232095778e+2370495", "-6.760344688038305e-44250", "-7.57701151960992474378716794694436925607132532879604376221126604539e+2414744", 66, RoundingMode.ROUND_FLOOR); + t3("-2.6171943577487375211769996917725770478183344962847645e+962716", "5.73323562459228e-723128", "-4.5649516767154668110122243660466465821745959913049747153161639490316092433928472494475807769621e+1685843", 95, RoundingMode.ROUND_CEIL); + t3("8.821270839203e-679", "5.07429888713154541185707012184700541507e-9249", "1.7e+8570", 2, RoundingMode.ROUND_DOWN); + t3("2.29412204114808702060785497978943701643961929542569413e-6510", "-9.622814515785763564752210878e+32", "-2.3840447484307e-6543", 14, RoundingMode.ROUND_UP); + t3("122852209.33596955", "70.15723957573339050956281378262617021489887806918", "1.7510981058e+6", 11, RoundingMode.ROUND_DOWN); + t3("-75049944334321968158467581412161257581486904.997273845949678", "-4.082759261570570772444092418194591442e+74", "1.83821625342297260377506424790352766382547125503984388883015500358689104592368594475582683259678766e-31", 99, RoundingMode.ROUND_HALF_EVEN); + t3("-4.5117823143987985011645809838922723", "-6.00323433799578982350060902993223313807644382e+4086", "7.515585866509885184268837828897735923269261979645976910830709421410102482169159766563263e-4087", 88, RoundingMode.ROUND_FLOOR); + t3("-7.4593069795167803409689743730979615453017626076532e-14", "5.5663346748483061802960115581505188409329657206216e-7", "-1.340075186858947079885e-7", 23, RoundingMode.ROUND_DOWN); + t3("-5.98823559467477311715849890335487330180e+11528", "-0.003290162508620091707157720499945878173131108817", "1.820042499112381186000767125637133671860118544803644749917362074e+11531", 64, RoundingMode.ROUND_HALF_DOWN); + t3("-8.26599479873320138912892557999e+28004", "8.900215927286791832913039917332244601e-6874", "-9.2874092789039432437557331596139479758721345609181199154644688864812475e+34877", 71, RoundingMode.ROUND_UP); + t3("-1.02023863943303515301017615619e+4322", "1.10816762232827920665124979716e+93", "-9.20653716e+4228", 10, RoundingMode.ROUND_UP); + t3("-2.86670168042560191292495661545255583", "-6.110204394707469252122e+5003425", "4.69166249644394664609668567108779207194760268516395373342e-5003426", 57, RoundingMode.ROUND_HALF_DOWN); + t3("-3.2754199252801842e+61139", "734417820.90652525258577181729193558978088046760353", "-4.45988622830146565668192617213406602125787940156794498910758882e+61130", 63, RoundingMode.ROUND_CEIL); + t3("-4.8114404362823181773e-460582", "7.076937099607761048243002399544008585999255767779024301e+4204", "-6.79876105801334884e-464787", 18, RoundingMode.ROUND_FLOOR); + t3("-6.55206394837274730440426799270292389479407549e+19106", "-2.8756448116862e+42", "2.278467744606746127818328395006356350085655193447054475691515164242056420749349939129807249261e+19064", 94, RoundingMode.ROUND_DOWN); + t3("-3.74215532185692341306475613849903028366059824562097819775e-36588", "-7.799292840730172469140913e-91", "4.799e-36498", 4, RoundingMode.ROUND_CEIL); + t3("7.403316510551448450015823234611e+84", "9.427386319491878362336646183983738886083245526967593306113e-959113", "7.8529894285168912383267263952350231825317953199580227385482034e+959196", 62, RoundingMode.ROUND_CEIL); + t3("-6.495564848717913850474651218168419900484433726760148327e+9447", "-8.28504059637611534949554557191770292978508196249942660685e+23213", "7.8401123e-13767", 8, RoundingMode.ROUND_HALF_UP); + t3("-2.47788321661263918678937483451126081321445035903756456684e-83587", "0.0000211725639826162452333210075163338973686809659349232", "-1.17032741931827797153160037796004944997696446802029767333159344823471506e-83582", 72, RoundingMode.ROUND_HALF_UP); + t3("9.695e-11", "8.40163469685e-2967682", "1.15394210172395588925455912183e+2967671", 30, RoundingMode.ROUND_HALF_EVEN); + t3("-132.33407303466944376", "1.466164851817703355310499908522445029294180477755498710e-9277", "-1e+9279", 1, RoundingMode.ROUND_UP); + t3("8.64e+4", "960.48225415038070623990188582991488335939999902826672627897", "8.99548113738211054297392811171307844646e+1", 39, RoundingMode.ROUND_DOWN); + t3("5.76902324039256465315903434891205015e-14", "-2.06583234799685176901e-8", "-2.7925902341429288008595625270227784057263759253579132018454586176243668723938326054166325985390393e-6", 98, RoundingMode.ROUND_CEIL); + t3("-8.9822947743878120795004898246535294114e+40578", "-7325362666.571509696", "1.226191136635122599643895425505792565835728664039384330091318557180407984887976e+40569", 79, RoundingMode.ROUND_CEIL); + t3("7.411696574592452492944841579170107451491527089716e+302976", "4.60e-64", "1.611238385780967933248878604167414663367723280373043478260869565217391e+303040", 70, RoundingMode.ROUND_HALF_DOWN); + t3("-6.2805e+17", "-8.14519184598728277263411977061042382499210282e+702", "7.7106839455157577783689155766117434339899018121092010961599488908636077855522951995e-686", 83, RoundingMode.ROUND_HALF_EVEN); + t3("-2.8398440377370809032542023717780905984097412510e-27869", "-1.93622897192071928506033735794847981683038501244695388206506e+5016185", "1.466688123626197339169243462412413297918925848556589849020950423396516735218e-5044054", 76, RoundingMode.ROUND_CEIL); + t3("1.0458363877686671976882334204321e-758448", "19933633.4230586928695660055656", "5.2465918559477054268771147104906644541657992619773953716966e-758456", 59, RoundingMode.ROUND_UP); + t3("-8.961720064943983913809726185290897467761236027926e-34", "-8.54549052659300653125164e-1656624", "1.0487075068488693931384182600836645475478951778840793459989591994005165139e+1656590", 74, RoundingMode.ROUND_HALF_EVEN); + t3("4.30e+906951", "40771588.456183336193414605924790075225845780200889", "1.05465599031569513067326760432739256111800229582599411083097e+906944", 60, RoundingMode.ROUND_DOWN); + t3("-4.31084416090164708660205e-7129", "4.860738807588668796955241690436591422767347415963e-5582619", "-8.868701511324746031924325113140342087764175889291559606764508669018310708707116574358e+5575489", 85, RoundingMode.ROUND_HALF_UP); + t3("-8.29149114e+780586", "0.00008544744301211095214406291719339499873664232", "-9.7036152841048734444845633309028372074266373e+780590", 44, RoundingMode.ROUND_UP); + t3("9.77129327906576217122091545215586069348608483973944671214e-7", "1.8079e+28684", "5.404775307852072665092602163922706285461632191901900941501189225068e-28691", 67, RoundingMode.ROUND_HALF_UP); + t3("-8.20793963126552000537116838363086168572853745991121568541006e-98", "9.64641262763382542567710e-51", "-8.508800056668165397129310597666269931308661076836174672419479896e-48", 64, RoundingMode.ROUND_CEIL); + t3("-3.6176843981400574677912736582474339026e-48453", "3.02183549648586787061e-5539", "-1.1971811180148985936879986164134867347294384304e-42914", 47, RoundingMode.ROUND_UP); + t3("-5.968397680044276695651584e+9096", "-4.614517534700289e+64", "1.293e+9032", 4, RoundingMode.ROUND_HALF_EVEN); + t3("-21", "-3.70850481417723207e-614", "5.662659495470833e+614", 16, RoundingMode.ROUND_UP); + t3("-9.58661405316543228368760763975257686567373339e-7358831", "-2.313910171251627663e+3318", "4.1430363945286144463766335205684117955699333404499322374415e-7362149", 59, RoundingMode.ROUND_DOWN); + t3("9.65292758714380486538411461404177406107749655e+1440", "6.913227056152443861643199181616e-7", "1.3962983580227062849823277930997746828646307420760691273736897836246753675296903744375626149e+1447", 92, RoundingMode.ROUND_FLOOR); + t3("8.28174704078297432040643187958300524608847208333945719e+62", "-1.6483284829858043084e-818", "-5.02433048161693276182981867844595002e+880", 36, RoundingMode.ROUND_CEIL); + t3("8.007467117669440167e+153", "4.898987298575040484146486444e-3508", "1.6345147741041413902344373075023182759224927102422822243087e+3661", 59, RoundingMode.ROUND_FLOOR); + t3("-1.7319482835320547453650748664417271887834e+76106", "9.07e+8", "-1.90953504248297105332422807766452832280418963616317530319735392e+76097", 63, RoundingMode.ROUND_UP); + t3("-0.0000071078844445129430615963499634064247374302210295295", "7.5313362575336085260948518769569382108628333091694834619e-8632", "-9.437746770903920413267641328108432493433838e+8625", 43, RoundingMode.ROUND_HALF_DOWN); + t3("-6.1022385943659518760557754527900393e-3645", "3.03803883650519539927744887222990463938825e-9462604", "-2.00861112143834714e+9458959", 18, RoundingMode.ROUND_HALF_EVEN); + t3("-6.9559158998e+448800", "-2.83723925006274622872827466006593836684867e+631", "2.45164939814158014559493e+448169", 24, RoundingMode.ROUND_DOWN); + t3("-1.86525869429085843675029030328801229562176172716503e+4891", "-2225.25499400768849598889728", "8.38222450601728103256212833080730582971587606623242284309192267e+4887", 63, RoundingMode.ROUND_HALF_UP); + t3("-1.906282980853706848014890041641367947435380267110901137e-3574933", "1.393506253039343502489912911533790314655218002047561960911e+5053282", "-1.36797590731721379975696052094740594e-8628215", 36, RoundingMode.ROUND_DOWN); + t3("-7.942417661436444666155e+243", "7.9066254470361738759260423817051935299974117e-718604", "-1.0045268635323667224715069595144811241329305690943480061913796102858899724016410305300273325e+718847", 92, RoundingMode.ROUND_HALF_UP); + t3("-9.4258441909533543e+3824", "7.5311536707110947031690119091143449064693815063e+7969", "-1.25158038238029501255670509975896601916114366217107847634e-4145", 57, RoundingMode.ROUND_HALF_UP); + t3("2.67526716565508e-5542754", "598.5082971777964923719713", "4.4698915257650120185982682961161925623265030562587694578125e-5542757", 59, RoundingMode.ROUND_FLOOR); + t3("7.357388541446e+903", "-8.70e-80439", "-8.4567684384436781609195402298850574712643678160919e+81341", 50, RoundingMode.ROUND_CEIL); + t3("6", "5.069e-636", "1.1836654172420595778260011836654172421e+636", 38, RoundingMode.ROUND_UP); + t3("-4.5006987760521270831425994465786984664029797647500e-2740", "-5.8530498514e-6525", "7.68949332453677635e+3784", 18, RoundingMode.ROUND_FLOOR); + t3("5.610359611286545027530565260019970209914123141279299572e+919", "-7.29792650493826357380686644e+915", "-7.68760771637012473609298163803943493633238634644086242284276111447734152268959520000822891579e+3", 94, RoundingMode.ROUND_UP); + t3("9.00460498005390008542e-158", "-9.8366977177e-2228489", "-9.154093414755599067868670651404132249601089111649809338330929363778511792745276829e+2228330", 82, RoundingMode.ROUND_FLOOR); + t3("-4.31679605994773674e-200", "-6.2903952146452115088e-1380", "6.8625196234052697e+1179", 17, RoundingMode.ROUND_UP); + t3("-3.24019021513028894806e-7925", "-9.896685402e-420154", "3.274015575432443101579758592390992120980021832162105136299047126162250822651743416e+412228", 82, RoundingMode.ROUND_FLOOR); + t3("-8.93283097346249e+596", "-206.523149385868409472", "4.325341251102250290661334596938869666714176248e+594", 47, RoundingMode.ROUND_DOWN); + t3("1.706099938516851624077006505602294759546662998e-6526", "8.173763490727923844908558949e-8", "2.08728811452912854602428498444772623223702284906999212887528020533162563531780103382e-6519", 84, RoundingMode.ROUND_DOWN); + t3("-9.1420418890725205738446381441692606915744140036041779681e+2049857", "-7028.51299481467620386544270009618145", "1.300707830492326305594803888902470033688553715e+2049854", 46, RoundingMode.ROUND_HALF_UP); + t3("-97844933.5221767675567896378267842185851320254998283854279", "-3.984129207696201e+16493", "2.4558674787245421182755980924171950909759385497886788661291e-16486", 60, RoundingMode.ROUND_CEIL); + t3("-9.8085e-422015", "2.753411590324229807865787348169528242e+91", "-3.5623079507866071e-422106", 17, RoundingMode.ROUND_UP); + t3("-7.2082319041935610025852720095088945984474220489692e+760057", "-6.5127446850e+764", "1.10678865099616000110178923888045744855533547588610868445244449191854e+759293", 70, RoundingMode.ROUND_HALF_DOWN); + t3("9.4949511094413271181353095e-7", "-1.24729106197516e+6702", "-7.612458229601600865603423417703e-6709", 31, RoundingMode.ROUND_FLOOR); + t3("5.830e+9", "5.3982762998061964186554130446166827650082856620307e+99", "1.0799743614845e-90", 14, RoundingMode.ROUND_UP); + t3("2.86615622875847212162366436370915972265965884e-5476172", "-8.40255e-3962269", "-3.41105524960693137395631607513095396357017672016233167312304002951484965873455082e-1513904", 81, RoundingMode.ROUND_HALF_UP); + t3("-3.269001223052524569046431792699991008948195216420357774e-1055", "6.157009595957380488387716880092084e+1410", "-5.30939764199638736845678477540631651720812563006691070214554660430398502501459003e-2466", 81, RoundingMode.ROUND_CEIL); + t3("2.0576609123471778786976374890818605197262967111915944874206e-7929618", "3.06513502427732802e+61576", "6.713116701383541863881278061804986519025581619685243593454921929406481357691445292070279e-7991195", 88, RoundingMode.ROUND_CEIL); + t3("-6.85006782303648011e+174", "-2.7778230253422225241763545329403653828444e+56", "2.465984247571914613320915578953410428134545546025707559e+118", 58, RoundingMode.ROUND_FLOOR); + t3("-9.52136e-5293", "5.59831195288791076586059401808341296063420272874517134177e-29", "-1.70075552776017953077524755677982633471486048609444011953018554104509035575938786360609389e-5264", 92, RoundingMode.ROUND_UP); + t3("-3e+60", "-53399419.8569659", "5.6180385630325402341196339417374033872626693292561486830335778243264266518716597e+52", 80, RoundingMode.ROUND_HALF_UP); + t3("9.39182367043563579687809217392347e+6340", "-4.250798904654189760777762103e-30", "-2.20942e+6370", 6, RoundingMode.ROUND_CEIL); + t3("5.231864e-4086", "-3.28882441273043192689015188108526433185e+69", "-1.5908006458929277793631053189e-4155", 29, RoundingMode.ROUND_HALF_EVEN); + t3("7.940389593197326135731489e-811", "-0.00003654997953972994164737553239538850432513732114022407000", "-2.1724e-806", 5, RoundingMode.ROUND_DOWN); + t3("-4.3228e-1116", "8.864865600e+73676", "-4.87632886391419177296946272936162732123090506865665284310683740089641e-74793", 70, RoundingMode.ROUND_DOWN); + t3("-7.4069871103057949618107450715592133674212655227878996e-29192", "6.8e+70", "-1.089262810339087494383933098758707848150186e-29262", 43, RoundingMode.ROUND_HALF_UP); + t3("4.0625650056253826300522320976800667101600873578330069374116e-192152", "-2.187469292246038738933083932611541230120e+823", "-1.8571986450397402047180017019e-192975", 29, RoundingMode.ROUND_HALF_UP); + t3("0.398403625460754165392379235799719286513099098812226095", "1.928598171255202747846347676206686401776333632651588679809e+245", "2.06576793133355719719522812910771e-246", 33, RoundingMode.ROUND_FLOOR); + t3("8.45165895812645331905668372378472054458248243354e+7729", "-1.0808170932433517e-9", "-7.819694017573718633260261936900325520474069230490279124e+7738", 55, RoundingMode.ROUND_UP); + t3("0.04038302045383689737537715305", "-1.32939446599768226497472436070147847456299779152729975e+7854", "-3.03770035807470430831018e-7856", 24, RoundingMode.ROUND_CEIL); + t3("-9.13633591654216316034e+614", "-8.00626", "1.14114904044362325984167389018093341959916365444040038669740927724055926237718984894320194447844562e+614", 99, RoundingMode.ROUND_HALF_UP); + t3("8e+28", "8.703838751073686338701653179112604871e-47614", "9.1913467480232646270448834541777807310648243266524730865928427e+47641", 62, RoundingMode.ROUND_UP); + t3("-6.434512167015392179622e-5531245", "7.408522842627232539e+6763987", "-8.6852835628614546067092282202348002625881186498390751169432899715675788304629e-12295233", 77, RoundingMode.ROUND_DOWN); + t3("6.0902487774260370428642976805816787645545214e-6148964", "7.5854119021155769446167801709686445998651364641091e+4694042", "8.0288965925e-10843007", 11, RoundingMode.ROUND_DOWN); + t3("0.831725477620089540637251608898947983", "-7.46450893627041736511113807836155914e-8335", "-1.114240045421735e+8334", 16, RoundingMode.ROUND_HALF_DOWN); + t3("-4.09008155574639725039819291788738e+13271", "8.9971609112347516886481809085842319543", "-4.5e+13270", 2, RoundingMode.ROUND_HALF_EVEN); + t3("-3.2120904155341355747476839359766307e-9", "-7.8836687595691879463347598866117461e+1176", "4.07435993760557732e-1186", 18, RoundingMode.ROUND_DOWN); + t3("-5.1752466278763480562829198898656891176023042534294070243e-8246", "1.9377683998247856651135e+326222", "-2.67072506e-334468", 9, RoundingMode.ROUND_HALF_EVEN); + t3("-466866.110860556329593288994009716567594004453227", "-8.853628717569284701e+75", "5.2731611608480896934533923886716855438675844611536944119677243703e-71", 65, RoundingMode.ROUND_CEIL); + t3("2.3265655965468872571645946973229428895228525e-5966882", "-6.82123278223710542769086195351367924671468484078e-795", "-3.41076997490160723531099556292e-5966088", 30, RoundingMode.ROUND_HALF_DOWN); + t3("-6.515253415e-1689939", "-4.9409375880627692779120032067933438865277266139028064942566e-698062", "1.31862694e-991877", 10, RoundingMode.ROUND_FLOOR); + t3("-305865320.7641477", "7.22301542136e-77", "-4.23459321240874815010765995510689114118693492253208681442304908334041092e+84", 72, RoundingMode.ROUND_CEIL); + t3("7.50585975540953514e-58849", "6.529777913039545664460982387159988245322879e+895268", "1.149481629e-954117", 10, RoundingMode.ROUND_HALF_DOWN); + t3("6.473006748046229360908291331313309523793e-5755841", "8.02336037096096949319672589791582590501057e-964042", "8.0677e-4791800", 6, RoundingMode.ROUND_FLOOR); + t3("9.54840299023736708149984236017234055477610043557437948e-272", "1e+705", "9.54840299023736708149984236017234055477610043557437948e-977", 88, RoundingMode.ROUND_DOWN); + t3("2.3026675461e-906200", "8.43757563441351707e-93124", "2.7290629985091148594510005022879253829661e-813077", 41, RoundingMode.ROUND_FLOOR); + t3("-95675736706055295.677406551742811040917583753585191172113196", "-1.820098938888938311178e-733", "5.25662284955012491159526249792727745494970648252567199389049386376e+749", 66, RoundingMode.ROUND_CEIL); + t3("-0.00000367878882129254076004368914186463", "2.21534e+7414", "-1.6605978410955161555534090215789133947836449484e-7420", 47, RoundingMode.ROUND_CEIL); + t3("-8.523221035207e-290", "-9.22950311628931292976250786203698455520043289656e+86478", "9.2347561161382748540585461990341573507302574000703952620656129161e-86769", 65, RoundingMode.ROUND_HALF_UP); + t3("6.1e-558", "5.083820386089577292843972361554693918170842e-8020", "1.199885034626893592002313284596062998690006879533206435358120004976236854862833e+7462", 79, RoundingMode.ROUND_UP); + t3("5.75437017863019687e+5601793", "-50265686011064078917406015064.05038", "-1.14479093697509492717111975944408926832484246759405446142254875451648396850802376531153446864527813e+5601765", 99, RoundingMode.ROUND_FLOOR); + t3("-7.02479085615239757380511080902628306127526377163034580709690e-1929109", "5.937151585632715191e+2105098", "-1.18319210059444253820374823475694931242101809142953904771552228077106021985746268e-4034207", 81, RoundingMode.ROUND_FLOOR); + t3("983326.3529671", "4.94670376809815834641010722044433880038e+1258390", "1.9878415993063518243178667667199833409018125874458e-1258385", 50, RoundingMode.ROUND_HALF_UP); + t3("-4.75992158e-5024", "-5.74257395010042921477085748004249382743005431374588507872780e-74735", "8.28882940186909728377127651680904728016558720061e+69710", 48, RoundingMode.ROUND_CEIL); + t3("3.602616015331472560955592560521969863314446783038758114320e-51892", "-0.000009441970853418132", "-3.81553392957919659196739917915e-51887", 30, RoundingMode.ROUND_DOWN); + t3("9.1497455227169232552314436076169103347782270651e-219", "8.373249799378905593133718575799e+456533", "1.0927352870083e-456752", 14, RoundingMode.ROUND_FLOOR); + t3("8.4683622821934687328543351512700150155587470586503736e-78", "5.91343666713537280212039965446622473725e+65", "1.43205427890306135113135547671752046828696421139270728527469421798846833607098329784358305203559283e-143", 99, RoundingMode.ROUND_HALF_EVEN); + t3("3.189138486227352332426732440e-598458", "-621882029.123105326595384964817058122413466827221502", "-5.1282049277485119126158079163601873401925833903091364654e-598467", 56, RoundingMode.ROUND_HALF_UP); + t3("8.36327002464142378308e-5456846", "-4.1226702772597622341370819150656144937577e+170", "-2.0286051180887267413705307718807271002754666407162366416533614250649191231300041619677e-5457016", 86, RoundingMode.ROUND_DOWN); + t3("-8.374182824415045331433178480296e-9", "6.147680930636187947068915894326103429660857246967961753e-897", "-1.36216939670427065891719674e+888", 28, RoundingMode.ROUND_UP); + t3("-6.1555075166107317522046137450664e+1059243", "-0.00000787", "7.8214835026819971438432194981783989834815756035578144853875476493e+1059248", 65, RoundingMode.ROUND_HALF_UP); + t3("8.878418479987526159e-22", "-4.64013766942433523967e+99058", "-1.913e-99080", 4, RoundingMode.ROUND_HALF_UP); + t3("-1.643833156167073156227836724712230496026e-31390", "1.95796758465874581171150957275752554e-5636", "-8.39560965690643367874396342e-25755", 27, RoundingMode.ROUND_UP); + t3("-9.109741755526673003743735919690524222898437842e+183", "8.236165559556987020556098725141774367711141832664077433e-9827", "-1.10606588583640304424494579923987e+10010", 33, RoundingMode.ROUND_HALF_EVEN); + t3("-5.4149584e+8284753", "1.54056e-560104", "-3.514928597393155735576673417458586488030326634470583e+8844857", 52, RoundingMode.ROUND_FLOOR); + t3("2.690472873319424346621055802539580796027419185779186808860e-24432", "3.268504216190878954310096433055532399962763307309182634339e-72997", "8.231511099150138356502834964202409620452717229808497e+48564", 52, RoundingMode.ROUND_DOWN); + t3("5.511122960487624576329342700193361e-4398", "8.2470250190446060067026043384322816060e-86002", "6.6825587987922367549111897380349609664e+81603", 39, RoundingMode.ROUND_HALF_UP); + t3("-7.917e-98", "4.79652886e+27883", "-1.650568615571719920809566441345252324823914433822462188e-27981", 55, RoundingMode.ROUND_FLOOR); + t3("7.428249642380234695622316151679325106710e-62390", "2.4e-977", "3.09510401765843112317596e-61413", 24, RoundingMode.ROUND_DOWN); + t3("604.4744600260950239251801774458251452270154165496606", "3.85136383475361979e-428203", "1.56950754579842125925300989434603040384295630928408984826598160297536279981120155879629e+428205", 87, RoundingMode.ROUND_FLOOR); + t3("6.67e-284", "-4.72088315743215515882516e-40", "-1.412871231413410813e-244", 19, RoundingMode.ROUND_FLOOR); + t3("-155151.809518011593063914917713333906645884471601871177", "6.338188022666799058422649809028e+39", "-2.4478890333191995048e-35", 20, RoundingMode.ROUND_HALF_DOWN); + t3("-2.22820726393277647144506439090068833253219972870532e-46", "5.56841444938689968910723598834822695961194434430534984855e+68617", "-4.00151117375630911580611713636285050732371989524994875555666134152593754919e-68664", 75, RoundingMode.ROUND_DOWN); + t3("2.338716212847876184951897169726620037171397775970546724e-9", "6.7256468684977240454503848810066203901786164055e+491", "3.47731044845990282013489394411795073677106e-501", 42, RoundingMode.ROUND_FLOOR); + t3("-8.230327025182274219825664526246374e-668", "-5.0930940348440986089411798148973918058986185512e-19276", "1.615977825831406902502437049283858159926001981843491735777952747247195e+18608", 70, RoundingMode.ROUND_HALF_UP); + t3("2.3392164138920437971579e+704", "7.31e+13", "3.200022454024683717042271e+690", 25, RoundingMode.ROUND_UP); + t3("-2.79932318853820678394061e-21", "-9.65201e+795", "2.90024895181232384129379269188490273010492115113846753163330746652769733972509352974147353e-817", 90, RoundingMode.ROUND_FLOOR); + t3("5.262694813393922563321996504321750944298404865e+575", "-5.27194871272972704640595467498038359604198471206982404550e-6428575", "-9.98244690940664904824180323510480234891254747217390046867982787938145121410706590862433793592286912e+6429149", 99, RoundingMode.ROUND_DOWN); + t3("-4.3032495194572e-1791", "4.170871137116609104632427816969e-8", "-1.03173878501365214057079824e-1783", 27, RoundingMode.ROUND_CEIL); + t3("-9e+8", "3.2664588981099192225e+355657", "-2.755277e-355649", 7, RoundingMode.ROUND_DOWN); + t3("7.9856701729158152160178915270177478260463473296e-98", "-2.15e+219", "-3.7142651967e-317", 11, RoundingMode.ROUND_HALF_DOWN); + t3("-9.24426980659693e+5552", "-2.360371109184588582050804305650031929948074e-2907835", "3.91644761e+2913387", 9, RoundingMode.ROUND_FLOOR); + t3("738078.09969552153351935869902827601706320582953", "8.906309895128553028387337269294725851683085877664e-982516", "8.28713696678379691594990928450730337629e+982520", 39, RoundingMode.ROUND_HALF_UP); + t3("9.3107363647475354115363146495992673271e+5571", "4.1390180629e-470", "2.249503680161273502408593378453233066971837302343559192685348743e+6041", 64, RoundingMode.ROUND_UP); + t3("-4.6488388360919e-9351", "1e-3552626", "-4.6488388360919e+3543275", 37, RoundingMode.ROUND_HALF_UP); + t3("3.502125971589041207828696400973199183170931575e-82", "9.904207204795497308966962641344218578493956925920528420e+3548198", "3.53599828756950296897419759303716701189355473124227765928807732432119654387837196648e-3548281", 84, RoundingMode.ROUND_HALF_EVEN); + t3("9.626778775512443898886198120e-9711", "7.65144880552399643302293049643e-419330", "1.25816417520330914099639287218543216722553820660528264158268029998306536564450700364e+409619", 84, RoundingMode.ROUND_HALF_UP); + t3("3.6373670222495719639910226014743e-9583639", "-6.07946609592801701149048389895673e-7772448", "-5.9830369391908516894138809710480605955155889487697065431530475e-1811192", 62, RoundingMode.ROUND_HALF_UP); + t3("-5.413414359362491050376993e+974936", "-9.24500668218936221853305801534354e-1217", "5.855500753494869122525762250264453613312731841180143e+976152", 52, RoundingMode.ROUND_HALF_DOWN); + t3("-3.69528652339681914004592099858729090908267654e-539", "-9.2994862604892540e-1857549", "3.973645876651262374221097377505640866928128627967019046518019594709834308762109480776941e+1857009", 88, RoundingMode.ROUND_FLOOR); + t3("-5.603651212122744684360301186677920904987516640e+797071", "4.9958064506424300553261469051348812542e+10837", "-1.12167099896397097658540051011786267488651144897649339081833e+786234", 60, RoundingMode.ROUND_DOWN); + t3("3.72422571684e-5479", "6e+261", "6.2070428614e-5741", 35, RoundingMode.ROUND_HALF_EVEN); + t3("-3.16039807859960646663838964073463294295045516614321232e-304", "6.299543644013528164775335365232981750549918232246358e+885967", "-5.01686829585337e-886272", 15, RoundingMode.ROUND_UP); + t3("9.67423623391707022179457264639757180688635006848e-9402", "495973672.925098457189712686141111899121970990995137558614709", "1.9505543866595648012867e-9410", 23, RoundingMode.ROUND_UP); + t3("-0.0008581694", "7.820967675296252e+74422", "-1.0972675449237082155925496257359580492418377059710845942002508336411181101106074e-74426", 80, RoundingMode.ROUND_HALF_DOWN); + t3("1.226198817917201442232008153782416893056584e-1854", "7.189408017858061042470833e-25", "1.705562982197416890856662477715422791996245047064069983970266716961215470414672e-1830", 79, RoundingMode.ROUND_HALF_DOWN); + t3("-6.35189227314088953150171322959882305313405e+48", "-6.694886542643052998499564284e+473123", "9.487677248423161703764467275166572204266404817544554045922423528094758875270330077509010918430467e-473076", 97, RoundingMode.ROUND_UP); + t3("7.4616536852330028276844750455006760e-8213273", "-8.2616947301811015785381280075461055528562843038319069159e-89", "-9.032e-8213185", 4, RoundingMode.ROUND_HALF_DOWN); + t3("-7.2684620847414561029923060748011961389878918997817e+87108", "1.948949090678718996919e-536318", "-3.72942634546202e+623426", 15, RoundingMode.ROUND_FLOOR); + t3("-5.017576430311015662375160024056601527714e+8326", "3.4813441259481e-48", "-1.441275624811879878e+8374", 19, RoundingMode.ROUND_HALF_EVEN); + t3("455317007.49227692213377339503163384422094806", "-5.65275506053420792162316654536951391432754e-116", "-8.05478041444179693663347923332141134756382641597760190726596537031004841221031083469960305598910834e+123", 99, RoundingMode.ROUND_CEIL); + t3("-9.633607066849e+57758", "9.02343831685532970072242113378955028698e-515", "-1.06762042677832747096251659449918592253561599947896316645079438705808961282465257e+58273", 81, RoundingMode.ROUND_HALF_UP); + t3("-5.53047387401759485491421040802881710250733e-60", "4.832438868686975373399225473898e+6688", "-1.144447767327946138566275743e-6748", 28, RoundingMode.ROUND_HALF_EVEN); + t3("-8.5517e+999376", "9.6709761353725e-467008", "-8.8426440933106609382861204631117022322680864436317976499429295071253175787715682e+1466383", 80, RoundingMode.ROUND_DOWN); + t3("-4.7985931982836001286789522e+3083", "5.8754920117e+84", "-8.16713423952930761956558239736905197909929787063589141361439526438153186264845177340265534379e+2998", 93, RoundingMode.ROUND_UP); + t3("-0.07439743626604329095911613823765871837095179096615", "-9.567422335725e+374", "7.77612126395229348289773448812196298503460679537357436759941658658788819681845695978744714880971133e-377", 99, RoundingMode.ROUND_CEIL); + t3("-9.3513764e+35", "6.3337512065852698115383106285012045646880436155304e+9430729", "-1.4764357005809247057710477075102868262504333e-9430694", 44, RoundingMode.ROUND_HALF_EVEN); + t3("-6.4526743163882376690571082e-523", "2.67548292599e-9608", "-2.411779291770503887706294874287328174391375e+9085", 43, RoundingMode.ROUND_FLOOR); + t3("-1.7351679399705858734112711e-7", "-7.700225783512425379281739340851003461459979259249134278e-990", "2.25339878174208077097179e+982", 24, RoundingMode.ROUND_DOWN); + t3("-0.0004775444877931838264447996", "-9.45257809685942648262068211096105377974029e-9558", "5.052002563743384263167828462454906927095954922595940600820474e+9553", 61, RoundingMode.ROUND_HALF_DOWN); + t3("5.61325106751824e+33478", "7.0e+730198", "8.0189300964546285714285714285714285714285714285714285e-696721", 53, RoundingMode.ROUND_FLOOR); + t3("4.54882500559155710013485527076437069018865104e+9974066", "4.8906436370421086920470075e+952447", "9.301076388265971471355717622194478e+9021618", 34, RoundingMode.ROUND_UP); + t3("2.93236783716e+32", "-5.663565141e-50", "-5.1776006175541929729523349363379380260226091394399307395553446853e+81", 65, RoundingMode.ROUND_HALF_DOWN); + t3("-7.30289545768349143493882e-46", "-5.144108787179330100997948996487019772996e+79", "1.4196619394761845879192934848753033761430984e-125", 44, RoundingMode.ROUND_UP); + t3("-2.472060745e-6363", "-3.7231031996015984083496038307e-2183", "6.6397857176361109727293604341430323063265900296318742853356936680116395513e-4181", 74, RoundingMode.ROUND_FLOOR); + t3("2.47103852713966506e+686152", "-8.526641704891077560618072669077e-574980", "-2.898020830079233415870600138873590163204027879e+1261131", 46, RoundingMode.ROUND_FLOOR); + t3("-9.25e-89", "-1.5070207e+9915", "6.137938251279494e-10004", 16, RoundingMode.ROUND_DOWN); + t3("1.119365099713806799416359", "-0.00010141064", "-1.103794532520262961969630602863762618991458884393195822450188658704845960936643334466679236e+4", 91, RoundingMode.ROUND_HALF_EVEN); + t3("0.0070606848678199435435749361053874132790999688086830", "2.814984075612565257476863631e+880049", "2.5e-880052", 2, RoundingMode.ROUND_HALF_UP); + t3("-5.00908986898781781403504e+571", "9.594306468292974628815546812025040297907943190487345e-30529", "-5.22089833751061988567640162835383536040375896870047458122903418260221e+31099", 69, RoundingMode.ROUND_DOWN); + t3("6.536235082892238482944e+136255", "-1.50376540589127238953100e+66", "-4.34657896589811005907720591974213630955054958458773945203e+136189", 57, RoundingMode.ROUND_FLOOR); + t3("-2.59747179123742e+16947", "2.16814390894744105231364264491757e+374", "-1.1980163219416569074208688960981e+16573", 32, RoundingMode.ROUND_CEIL); + t3("-7016364441823846934204633960.3246656336726794986082", "6.267890414729140882953463043550540194e+71", "-1.1194140257040614563483e-44", 23, RoundingMode.ROUND_UP); + t3("3.81096696335100355559824657758339e-27", "-2.66e+499444", "-1.432694347124437426916634051723078e-499471", 34, RoundingMode.ROUND_CEIL); + t3("-5.3001546173537375421251306682432058841675552963350451100e+458406", "2.543e-80", "-2.084213376859511420418848080315849738170489695766828592213920566260322453794730633110499e+458486", 88, RoundingMode.ROUND_CEIL); + t3("4.9725550366e+208", "4.320790745427404224419192661705787428967725606692482e-3161", "1.150843752815926872292918e+3369", 25, RoundingMode.ROUND_CEIL); + t3("3.704010e+554", "2.885131087270377727451557613008319e+39", "1.2838272813123245436918555271613317085199348008316522416757736e+515", 62, RoundingMode.ROUND_FLOOR); + t3("1.6173538174534536423307034636137041553e+890", "78043.749364184251171298739776580568", "2e+885", 1, RoundingMode.ROUND_FLOOR); + t3("7785.38926714803", "5.7128906668117937069399910232699277065548249552272e+415034", "1.362775820719992957199284214478469761555796732349660451706183955300180161313835764446e-415031", 85, RoundingMode.ROUND_HALF_UP); + t3("-5.07868461604023e+126062", "8.106710194968426653e-9549", "-6.26479113462376589e+135610", 19, RoundingMode.ROUND_FLOOR); + t3("9.3112e+31902", "5.802920972045397225171810479e+9962", "1.60457122281264059215138442381891442719754901809875966906068353237e+21940", 66, RoundingMode.ROUND_HALF_DOWN); + t3("-3.62116210365102980919563849163417520549036635149e-859891", "4e+279430", "-9.05290525912757452e-1139322", 18, RoundingMode.ROUND_DOWN); + t3("-29741.72386912651648227429513933355112481075034929319615168", "-1.81254559267e+865246", "1.6408814e-865242", 8, RoundingMode.ROUND_HALF_UP); + t3("5.8020204908101208375565271248827e-8422", "-8.21e-574867", "-7.06701643216823488131123888536260657734470158343483556638246041412911084043848964677222898e+566444", 90, RoundingMode.ROUND_CEIL); + t3("4.2249210117868151825850569355007155971e+4443684", "-2.296799414051960498455283054114e+6935", "-1.83948192686679028592157851487994594041898951624008242379071453644286557491435400935466725337e+4436749", 93, RoundingMode.ROUND_DOWN); + t3("-5.5683967199378466381245121771765180601322725857e-5782", "7.63989281e+2878", "-7.28857964165317476244082562877805357603213884e-8661", 45, RoundingMode.ROUND_HALF_DOWN); + t3("4.890056674046618952861254179424762170739416e-981373", "-4.788878637890516129744512240101667588921071707e-41173", "-1.0211277093880732348828801954836327803781607041506663717693804718e-940200", 65, RoundingMode.ROUND_FLOOR); + t3("-7.5489699907035199753435159498025523e+7333222", "-510.03729222053270862928676321455378034348461", "1.48008196770040397791935767373126144302782359243310019996660175167506e+7333220", 69, RoundingMode.ROUND_CEIL); + t3("-7.3270584615286236633654430861733084802309157028492e+351", "-8.84687011420092814735489917e-10", "8.282091142908592656216924750530931007470543029276830203292965428595765458179031126780952065735072164e+360", 100, RoundingMode.ROUND_HALF_DOWN); + t3("6.083061611465e+8023446", "6.08718592e+880", "9.993224606e+8022565", 10, RoundingMode.ROUND_UP); + t3("0.0015756454197115404268201989899732397545221953", "-2.2625460695220128276222100052234505e+921527", "-6.964036847410636172915824361955334e-921531", 34, RoundingMode.ROUND_HALF_EVEN); + t3("3.778140914519654343155865295708356480390693e-4233", "-6.36608e+3186", "-5.934799616906564704112837563631554238072240688147e-7420", 49, RoundingMode.ROUND_DOWN); + t3("-1.037059766939040576436457737042171551398340625385e-2015", "9.58872e+581668", "-1.08154140170850809746916975054248278331032778659195387914132438949098524099149834388e-583684", 84, RoundingMode.ROUND_CEIL); + t3("-0.0000530084462581851788143636634433353360733168428056102", "-9.612800144197474955e+9901451", "5.5143605883e-9901457", 11, RoundingMode.ROUND_HALF_DOWN); + t3("-7.5993961461969e+9399", "446.47891237020844546821761352121943801", "-1.70207280470520469485545830180759296578670882013617711034068981979e+9397", 66, RoundingMode.ROUND_UP); + t3("6.915626408396995959757568961988119758281756464113147402772e+286302", "-3162.5608939936388120318745", "-2.186717233344410689191305768633537907690605443288196266993964591605791604315e+286299", 76, RoundingMode.ROUND_HALF_UP); + t3("-5.5437383828828567108517373e-776", "-2.1140533665e+309", "2.622326602880891233571296555062627365324838406817011636683297512205919991849931381569028144021e-1085", 94, RoundingMode.ROUND_HALF_DOWN); + t3("-5.613748719378402450137898026316048568184578645980579e-9740", "8.6217788896525220020177465853e-64264", "-6.51112582591949275423601496056334250886183469397e+54523", 49, RoundingMode.ROUND_HALF_EVEN); + t3("-7.23012652470383234547804544659544027917108007437e+92575", "7.9142419737684090279744728848831732235974822361464930703e-1068", "-9.13558942052560035722583534016743762565074490431624107788163e+93642", 60, RoundingMode.ROUND_FLOOR); + t3("6.51068003e+842", "-6.64386076662392515945318968640865e+889537", "-9.79954316e-888696", 9, RoundingMode.ROUND_UP); + t3("-9.4220842814894740355643871550053e+81204", "-351.6319547964917916245896910470732083574798711796107577637", "2.679530160148e+81202", 13, RoundingMode.ROUND_CEIL); + t3("-3.0704509983896666335891441257686892358819812695e-87", "-2.92831001734855596829254121942366818e+3082", "1.048540277565902156270373e-3169", 25, RoundingMode.ROUND_CEIL); + t3("6.926278921765102227557189450", "-7.812398429709661207988000287030472469e-5915", "-8.865752283e+5914", 10, RoundingMode.ROUND_DOWN); + t3("9.53634e+9", "1.965138983505348446115414087092375e+2823774", "4.852756003541998481759701658454e-2823765", 32, RoundingMode.ROUND_UP); + t3("4.082089070477382148438037008743948177675540493962936e-250", "-3.70981132278431827653065681305312802364964588974562536682743e-150415", "-1.1e+150165", 3, RoundingMode.ROUND_HALF_EVEN); + t3("3.21546866478602997320941159e-7809804", "2.62951330458537889745968954585764480040058726479e-950855", "1.22283795224722941388512706360049152523621791432774199557610762019505424325062326677e-6858949", 84, RoundingMode.ROUND_UP); + t3("0.000001127403718694283526088035899517087999169464688", "5040.5820754022433780182", "2.2366538265410857475691712665224191379092605641551473288691761417416e-10", 68, RoundingMode.ROUND_CEIL); + t3("6.413972006320308603410995781591590851e-444", "-3.2406899986995856418987390184575532612629808e+462275", "-1.979199494210827954302790460021418282864705538491682126209e-462719", 58, RoundingMode.ROUND_HALF_DOWN); + t3("-5.2367600337694e+824", "4.7e+5112625", "-1.114204262504127659574468085106382978723404255319148936170212765957446808510638297872340425532e-5111801", 95, RoundingMode.ROUND_FLOOR); + t3("7.15018163450037e+1043420", "-7.696127791261132765e+2500843", "-9.2906222823110103051626310097830063941749614706048755651973922142971166784633139143550974e-1457424", 89, RoundingMode.ROUND_FLOOR); + t3("-7.7870434680448997482202649e-701", "4.890909233287873419915520169498642163367953112705806720e+3297", "-1.59214638763805558495114202287446668688246661401731068853250999357151987686894e-3998", 78, RoundingMode.ROUND_FLOOR); + t3("7.90371913475853302971e-383818", "-4.441915588351562702723111858272999177138721291129e+95233", "-1.779349241909317480964260091333971618643975276275877872610237534154609112143514e-479051", 79, RoundingMode.ROUND_CEIL); + t3("5.52588573333732102332213278851769771097086764096e-8724", "2.02383031022516609043346e+50", "2.7304096126134830768336584365822907780869250235184735679058135774495742756972e-8774", 77, RoundingMode.ROUND_DOWN); + t3("-7.951110327860274247709e-925", "7.2814109864640187205483337377e+33027", "-1.091973841696507960691114551726008615002680220148021354595019556540182019932304e-33952", 79, RoundingMode.ROUND_CEIL); + t3("-8.873697338599954480139605635456864714416268787583e-738803", "-5.91062688993286e+924", "1.50131238256873842251701844999129311191366440778955739978014259056389850612452719811e-739727", 84, RoundingMode.ROUND_HALF_DOWN); + t3("-9.1436152843889238774692104695050201272912884890200195506754e-1683102", "-5.1803330099891957216255347730391e-164215", "1.765063224074082085292551095234045505e-1518887", 37, RoundingMode.ROUND_CEIL); + t3("-7.29640957067304272880720e+5081", "-1.33628370095834306203522543771616626623455384353366e-93", "5.4602249248720717426278865744444652435574141226720132536e+5174", 56, RoundingMode.ROUND_CEIL); + t3("2.33133930445796588877032528e+7156", "-9.9677887295e-61", "-2.3388731119e+7216", 11, RoundingMode.ROUND_HALF_UP); + t3("-0.00025785307906304864870180865683793673660493", "-3.0100e-2761", "8.566547477177695970159756041127466332389700996677740863787376e+2756", 61, RoundingMode.ROUND_UP); + t3("-9.6770193467199039717825616309703958882916034534672395359137e+17688", "4.18979882378258924597780062e+496", "-2.30966205150236810986706968918539917699847241253752508255359e+17192", 60, RoundingMode.ROUND_DOWN); + t3("1.86580566344553757970697514420e+6799650", "7.183157009290574082361044470e+8288", "2.5974730345339e+6791361", 14, RoundingMode.ROUND_HALF_UP); + t3("32247647.57900330176", "4.95060627882350112486901533975e-743", "6.513878455037808507585850262360816147927774047594341235776473855525437e+749", 70, RoundingMode.ROUND_HALF_UP); + t3("8.71e-52", "7.03973305194871690612804091405988801409802e+4222", "1.237262824559650740798598369147166862397725876647363701770872319086241898425822176503588167155e-4274", 94, RoundingMode.ROUND_HALF_UP); + t3("7.7259064897661884349401371280937076e-9161", "-3.8203883860072154274824008666988387842750011e-7660594", "-2.1e+7651433", 2, RoundingMode.ROUND_FLOOR); + t3("-5.9e-23258", "8.5803408660842006874930413872203e-54484", "-6.87618369955572119402196294175433788610487746425290374504322286841107516242783695487400261964372e+31225", 96, RoundingMode.ROUND_FLOOR); + t3("6.90798422701265445098778106e-24", "4.0360722484987e+722897", "1.7115610924909040265927784803960678188103834405789e-722921", 51, RoundingMode.ROUND_HALF_DOWN); + t3("-1.6717449184931518514025394010707104237e+51", "-2.6045e-900585", "6.418678896115000389335916302824766456901516605874448070646957189479746592436168170474179305049e+900635", 94, RoundingMode.ROUND_HALF_EVEN); + t3("-8.08874022564473140199035422086674705e-18474", "7e+60396", "-1.155534317949247343141479174409535292857142857142857142857142857142857142857142857142857142857143e-78870", 97, RoundingMode.ROUND_HALF_EVEN); + t3("-3.99756e-8744832", "-1.129777112335753948998878000850812586076825723004920940396e+82563", "4e-8827395", 1, RoundingMode.ROUND_CEIL); + t3("-2.1986880829005591347235935044e-66", "-5.53128913507041640704954869060137865e+22329", "3.9750011782245561542585386936073468939246936098645050823063861338176931635325497215244e-22396", 88, RoundingMode.ROUND_HALF_UP); + t3("-0.000226930118", "-5822.7730802712548122145", "3.8972859644640046e-8", 17, RoundingMode.ROUND_CEIL); + t3("3.5358228603437829467542565252394409759941451716564387844e+5819", "-1.1211285523789752278505749782883138380764249835122752e+654", "-3.153806807293378336299434516590902750456037343818220344010026e+5165", 61, RoundingMode.ROUND_UP); + t3("1.540945741255801235146421640530441629341e-59", "-0.28959050868264919998", "-5.321119632910562022779265944683536368088159036094e-59", 49, RoundingMode.ROUND_DOWN); + t3("5.67465911290e+60", "1.82139318766325427065720e-489", "3.1155596448564028586441404475e+549", 29, RoundingMode.ROUND_FLOOR); + t3("-0.000073324629052045985374799060767559177945662087945380531962505", "-8.6235020738126851431568817200653038002538e-45105", "8.502882984711473461151286399869019847200978176981996060734467871714834324909852815521082684024201e+45099", 98, RoundingMode.ROUND_UP); + t3("2.33655464176415788042730153765978361685159812387632344e+966733", "0.000271032054732387189879751975458037143324874109460138147524913", "8.6209531343856555071879118346685369655541121912109514462e+966736", 56, RoundingMode.ROUND_DOWN); + t3("-7.3857752173247842104384133616842993670558572216964745352905e+593726", "3.5159864077115843821601402777019512966207959178114659e+86157", "-2.1006267831768699436790676448e+507569", 29, RoundingMode.ROUND_HALF_DOWN); + t3("2.297954795295988905597e+35", "4146.8211032798097836971", "5.541485243910057160840790548754435007075456066243014035815812282364190103557437813616906558929018991e+31", 100, RoundingMode.ROUND_HALF_EVEN); + t3("3.01e+69", "-7.42216850812595777997133787752109191066448160807243548474e+555672", "-4.055418570333702329360565078021946914153372178576123824979e-555604", 59, RoundingMode.ROUND_HALF_UP); + t3("-4.412068782529924812219217692595557950834519815e-8", "-5.543105213195272592447854502e+80", "7.95956167677832671851525278405651096717750940224758071101327343e-89", 63, RoundingMode.ROUND_HALF_UP); + t3("6.0399317841e+79092", "-36677.6188495002669617", "-1.64676224181393229943713741633116474956001090019712342463957e+79088", 60, RoundingMode.ROUND_FLOOR); + t3("-5.0141298538386961519854674556082694550280506139337568380169e-8654417", "7e-7975299", "-7.163042648340994502836382079440384935754358019905366911452714285714285714285714285714285714286e-679119", 94, RoundingMode.ROUND_FLOOR); + t3("-7.29985014324738862670793202560933158762654831493606e+644533", "-5.742610820531e-7269184", "1.271172707220371224664309552725807599674523039e+7913717", 46, RoundingMode.ROUND_HALF_DOWN); + t3("-2.356096137810041e-8", "8.51666515563839e-30", "-2.7664538815996615880251302469e+21", 29, RoundingMode.ROUND_CEIL); + t3("4.0e-187474", "5.57545409734318035788872379534690e-187", "7.174303527861673281695766646416424586540746909e-187288", 46, RoundingMode.ROUND_HALF_UP); + t3("-8.3408180480517571e+10261", "-4.95082841688375001488467e+93", "1.68473179551267957952978522430716289057086493073281654507483485966953015258527807096102260243e+10168", 93, RoundingMode.ROUND_HALF_DOWN); + t3("9.485789339622840784590481050e-758233", "-7e+726", "-1e-758959", 1, RoundingMode.ROUND_DOWN); + t3("8.129451975131457857e-74", "8.869163209722283113995855593533903424761637e+93582", "9.165974042e-93657", 10, RoundingMode.ROUND_HALF_DOWN); + t3("115297180.9500040358261890643216883791745981094374599890744", "1.6156778e+59619", "7.1361493578734594128971175021213003715591134220857641959554064554207528e-59612", 71, RoundingMode.ROUND_DOWN); + t3("6.57e-9104596", "4.59782738301854050988146364667782520337e+9668429", "1.42893576742e-18773025", 12, RoundingMode.ROUND_HALF_DOWN); + t3("3.53298148390840216063756828528528731362938e+37569", "-9.693e+1242", "-3.64487927773486243746783068738810204645556587227896420096977200041266894e+36326", 72, RoundingMode.ROUND_HALF_DOWN); + t3("9.680686421339337e+81140", "-4e+5337866", "-2.420171605335e-5256726", 13, RoundingMode.ROUND_FLOOR); + t3("-3.1049010007243138532000993279548588709755e+1456", "-5.8689398253118613130602e+73", "5.2903950170580031454614795341541860027427127591621462e+1382", 53, RoundingMode.ROUND_DOWN); + t3("-385306.7431768853361651458", "5.299549444959349552757082715023594875873292038137301e-6847426", "-7.270556623325190052068228882650212113848551007603369953259657763300398903e+6847430", 73, RoundingMode.ROUND_CEIL); + t3("-5.435380099616010286e-158026", "7.3872183184755192092675802546", "-7.3578170635922066041185497089932822622241189992455124805127369709866132541296736072e-158027", 83, RoundingMode.ROUND_HALF_UP); + t3("-9.8161192725730583900346322467838080325819591676675e+67273", "8921123217228.625485161520374979079834199241555733", "-1.100323247818839811644712336352805812090694235673509811515801464524277016494901066683240684988785e+67261", 97, RoundingMode.ROUND_HALF_UP); + t3("-1.864801574014925385704410998424068774884363551529322918439e+120", "9.92571328569748e-9", "-1.878758251764155965301353804071955e+128", 34, RoundingMode.ROUND_DOWN); + t3("2.217008116600306723453013180713380171420e+100835", "1.14660112752e-28", "1.9335478252978045906788601940388402134544588573422e+100863", 50, RoundingMode.ROUND_CEIL); + t3("6.20e+34", "-6.426989860828637290655138377524103575311848105114906759462e-1672", "-9.646817770458764510831701666413893777968947562533879503975426e+1705", 61, RoundingMode.ROUND_CEIL); + t3("9.727031936826544042916483357e-85", "-1.89632939742514066776200722457594141263447e+9547", "-5.129399960805347109409011815190515409432537267368130140053722143e-9632", 64, RoundingMode.ROUND_HALF_DOWN); + t3("-8.83141803151495457159535149e-251704", "-4.844900529997879600e+9506665", "1.8228275228426247370397069826926702651387770675304659480581723315579117882554000331882e-9758369", 86, RoundingMode.ROUND_FLOOR); + t3("-2.7746632190032869089126814262857001229975904e+74", "-3e-3595", "9.248877396677623029708938087619000409991968e+3668", 86, RoundingMode.ROUND_DOWN); + t3("-4.8913969468539595739229875634648105516559842059174585002e-7160", "-4.0157e+5", "1.218068318563e-7165", 13, RoundingMode.ROUND_HALF_DOWN); + t3("-7.8358544722217023164122950825167760865007006130021e+5126", "8.5634284165424837389049497735142038323e+38885", "-9.150370729e-33760", 11, RoundingMode.ROUND_FLOOR); + t3("-3.339303256823800935989097276894281516540e+4548", "-2.6988482496225472744646183693876133e+407", "1.2373067871788737121967452402266068399668e+4141", 43, RoundingMode.ROUND_DOWN); + t3("-548800521893.8564475915153910333667398576296634307", "-2.5e-9087", "2.1952020875754257903660615641334669594305186537228e+9098", 62, RoundingMode.ROUND_HALF_EVEN); + t3("-3.23665793569776385550085525852436847903310590312e-156", "-9.79026643429840e+8372", "3.3059957636686243240936332506488908316402035527114606879e-8529", 56, RoundingMode.ROUND_HALF_DOWN); + t3("-9.143e+3159", "9.63305968857275e-8821327", "-9.4912730696000098685765139367599e+8824485", 32, RoundingMode.ROUND_DOWN); + t3("-1.3447e+993", "-5.7289053674945975212302570073", "2.3472197806403512398449179483606256965048752905323068e+992", 53, RoundingMode.ROUND_CEIL); + t3("4.2e+4697", "6.67283818842789008830786329896620947816689867e-18309", "6.294173305871085754601221156061039486728147858539713818065820568e+23005", 65, RoundingMode.ROUND_FLOOR); + t3("9.69383851251244836506017776859981387098944e-1119", "-3.82486379521501469397596288e+9198", "-2.534427114669977233684743545593026338923169057834944305720357823361e-10317", 67, RoundingMode.ROUND_DOWN); + t3("3.5355491459875958e+83773", "-526916578.223339198631317192353972585023365789985", "-6.70988405395932650363426244693308215766147991508e+83764", 48, RoundingMode.ROUND_DOWN); + t3("2.718081113664408632444613291904096612330859388072304159155e+594", "-3.007577482890046655563515677964208993e+306799", "-9.03744335475123100808781769700866206e-306206", 36, RoundingMode.ROUND_HALF_EVEN); + t3("8.8280996164510722828588026346315877842e+49752", "-2.578833566225900100617160782290e-462", "-3.42329172850457241836122644670733151462648422285155e+50214", 51, RoundingMode.ROUND_HALF_EVEN); + t3("6.18681765136134904e-7", "3.732459269136594316351364685108041682930269e-3789940", "1.6575713772738652251097576250282215785789005e+3789933", 44, RoundingMode.ROUND_FLOOR); + t3("-8.323397905126013e+48228", "7.36322886312e+679", "-1.13040054300297319643962874557566832355716223527807796889969229301300843252608254e+47549", 81, RoundingMode.ROUND_HALF_UP); + t3("6.9873812870178255895e+27249", "-7.07149107988029991181662887992194025064562374268e+95", "-9.881057909976324172662205032137680894515657641325e+27153", 49, RoundingMode.ROUND_UP); + t3("2.1152163290656455693673204267197398831e-61", "-6.456271859817401712122612921625581674711229e+1338571", "-3.276219426617312200927697655913806547948256572e-1338633", 46, RoundingMode.ROUND_HALF_EVEN); + t3("-1.09183e+7", "9.954814761688306975626749165618904112910970292700419135987e-84", "-1.0967858530145355305021090386646e+90", 32, RoundingMode.ROUND_DOWN); + t3("-5487828.385013699423427876683829029974006362", "9.70775568463159251831771571625e-3286", "-5.65303512293939798174704195640977462372739276120496777814221708332632e+3291", 70, RoundingMode.ROUND_DOWN); + t3("-8.098437997145103e-7652166", "-8.36676608646337215744959966866e-20", "9.679292947184936412297378769435397836153709746294399932731e-7652147", 58, RoundingMode.ROUND_HALF_DOWN); + t3("-4.181701311108074144453210348e+84615", "-2.59250909222674097767953708202021830271e-97", "1.61299388443662296483276372047788464624876472791715240051235668441708534365931838065838e+84712", 87, RoundingMode.ROUND_CEIL); + t3("-2.1946536e-9244", "-8.491803457524430e-4644213", "2.58443758263782946131100536322795270476575807105843776888003208538e+4634968", 66, RoundingMode.ROUND_HALF_EVEN); + t3("-6.23973769513358772836843552665264653907865499141648514068563e+87532", "3.5819515125833579189611124225908919919509690960e-881", "-1.7419939028246069095236056731585987829852075e+88413", 44, RoundingMode.ROUND_HALF_UP); + t3("-7.62222718575298084791963989755171157896421922098e-8", "2.700391860215424e-906440", "-2.82263744683e+906432", 12, RoundingMode.ROUND_FLOOR); + t3("1.58106346989151921e+21462", "7e+349080", "3e-327619", 1, RoundingMode.ROUND_UP); + t3("-2.429317513732e+172", "-5e-2651", "4.858635027464e+2822", 77, RoundingMode.ROUND_HALF_DOWN); + t3("0.1236426444791588877989785775274150", "-1.352448944441565231465913465014929481e+8735", "-9.1421302805786670098968277535229542497707635857461e-8737", 50, RoundingMode.ROUND_HALF_EVEN); + t3("-4.43954145466498120433459608109189970592e+612", "7.4921997112e+361", "-5.92555140785737949234632794113057666075525741786369055e+250", 54, RoundingMode.ROUND_FLOOR); + t3("7.657832561234625660962641308353880838095e-9", "933670.6227621730949083132641808337450043175977092665", "8.201856601827824492429351726267199805326131202106177177883172191743197722895012036050487e-15", 88, RoundingMode.ROUND_HALF_DOWN); + t3("-5222835755032571284423392644738827053269141.769044897870", "518814015064458662316010618618424300078235878355386.8098048", "-1.006687484027137161766303e-8", 25, RoundingMode.ROUND_UP); + t3("7.39473264091755859436653746796717e-5209", "-6.721318739047255408321612e-868447", "-1.1001907405399672166463321e+863238", 26, RoundingMode.ROUND_HALF_UP); + t3("1.270035347e-88", "-3.00179606772863413672234360098596983e-398", "-4.23091815148188e+309", 15, RoundingMode.ROUND_FLOOR); + t3("5.42341558926388220256812026598127331278996e+3907", "-5.5796791105079578934372876987929350954316723338048e-137", "-9.7199417e+4043", 8, RoundingMode.ROUND_CEIL); + t3("2.53e-483213", "-7.966921641312718232192e-2431923", "-3.1756305809267746027072698119990131640262859733199129780927577641050825e+1948709", 72, RoundingMode.ROUND_HALF_DOWN); + t3("0.000042126661266767803321258525491351033371350260142", "9.72490468370304629953429108483e-42", "4.33183281861502274715200268119738320464373364656108e+36", 51, RoundingMode.ROUND_CEIL); + t3("-4.4016804546058e-4158", "6.230344780997698886503234850021581e-128", "-7.0649066935e-4031", 11, RoundingMode.ROUND_UP); + t3("8.579819712873667561921525458950450385e-173879", "2.3706e-53", "3.6192608254761105044806e-173826", 23, RoundingMode.ROUND_UP); + t3("3.333e-406", "-9.9074541823186649148847716345401e-3311558", "-3.36413e+3311151", 6, RoundingMode.ROUND_HALF_UP); + t3("-9.6258606127655262116652631e-69532", "-4.13989779428048150120217031932511436148151629840975e-2524647", "2.3251445062397997427574041686374e+2455115", 32, RoundingMode.ROUND_HALF_EVEN); + t3("-7.628490657079218476257318680041600655852404463308105946e+2329368", "5.693190065891644457394636018303104369077399869e-792", "-1.3399325455129478535630116e+2330160", 26, RoundingMode.ROUND_CEIL); + t3("7.671288250098857278422e-5154", "7.65464653550507385129773313472822218277275048177557113679144e-28", "1.002174067021e-5126", 13, RoundingMode.ROUND_FLOOR); + t3("-6.550", "65.24407556804507818824129951207996", "-1e-1", 1, RoundingMode.ROUND_CEIL); + t3("5.16845703096e+864260", "6.38050241889733345267661156e-44", "8.10039193097461926869608786757567756023918792372036351176269746428823309632946149469979405e+864303", 90, RoundingMode.ROUND_UP); + t3("3.4e+13", "-7.7241638463e-56834", "-4.40177094589811847399159435927409788560015621324767443779903703361451052392857887634475048e+56846", 90, RoundingMode.ROUND_DOWN); + t3("7.3261049958962e+1748927", "-6.075938e-837670", "-1.2e+2586597", 3, RoundingMode.ROUND_CEIL); + t3("-4.6e-810", "-7647911169041102028645.23085440342151535045257679732464", "6e-832", 2, RoundingMode.ROUND_FLOOR); + t3("-0.658690924922719154496897934506963532092562393", "3.178280915e-896", "-2.0724754750720930358570835596102855247222928153284399e+895", 53, RoundingMode.ROUND_DOWN); + t3("3.9815061582932841373774251441439598018e-8672718", "-8.76586022531041505298742893882824972430228637623734717706e+253352", "-4.542059827508020484292661296321338357331458332746425418203076039e-8926071", 64, RoundingMode.ROUND_UP); + t3("1.766e+595", "-1.238144981467114374483386903529211573850150543339463709e-376317", "-1.42632730934903495852e+376912", 22, RoundingMode.ROUND_HALF_EVEN); + t3("4.68799944924864471835382215330057183815440997980", "3.3262e+6", "1.4094159849824558710702369530697407e-6", 35, RoundingMode.ROUND_FLOOR); + t3("3.6160987687856049722327795342435359628748991066127660711e+154100", "8.15262479979128916e+8083", "4.4355025008365142935437780656007729100441496442755736312484852932e+146016", 65, RoundingMode.ROUND_HALF_EVEN); + t3("-5.4360264840619213662653828446211298602863088747498635663e+29205", "-6.6302974279241108090102742e-540", "8.19876716415102750498425729926174616102731e+29744", 42, RoundingMode.ROUND_UP); + t3("9.19375245353160279550786460056093972e+53", "-4.88322873029981e+22", "-1.8827200119637124818277812e+31", 26, RoundingMode.ROUND_HALF_DOWN); + t3("-0.00068057022162", "7.9525181690146489435304154080285534016552420821019967139466e-72504", "-8.5579209900041707781076145540989e+72499", 32, RoundingMode.ROUND_HALF_DOWN); + t3("-5.5421150462317965e+33", "4.78372888e-180", "-1.15853e+213", 6, RoundingMode.ROUND_HALF_UP); + t3("5.583964880100101519614006016321350750070309274344588e-723933", "7569375.505649745568210769434496142249054374987677", "7.377048312548712794845656020809478472657797031487486220292017445592517433987514021192812958059720214e-723940", 100, RoundingMode.ROUND_FLOOR); + t3("-14436.794120156598569472498872714165315278079740318413185", "6.6320636108595148656301315412050918227799049538458e-885011", "-2.1768178001968215908645437787428641555429323464706365786309184838585674671237694e+885014", 82, RoundingMode.ROUND_HALF_EVEN); + t3("-6.86576762320457954957632017250413494e+805983", "-1.360284335931e-22", "5.0473033040592503577549160627761754571373349303512645242e+806005", 56, RoundingMode.ROUND_FLOOR); + t3("-7.9411065506146760086723365948809513e-9", "3.42103970887144239704323559099e+8998", "-2.32125529850524486434684044554593567945578602178703876399467113e-9007", 63, RoundingMode.ROUND_UP); + t3("-3.723639718833818449506469228915776046300483314070e-1778309", "6254.1094835086163039802618367", "-5.953908751761762120004110355669262627859980279687078574792e-1778313", 58, RoundingMode.ROUND_HALF_DOWN); + t3("9.54488753339e-4675471", "2.28437621186903100394786e+8691", "4.178334323303324720268639443218208362729656466390705136120907341e-4684162", 64, RoundingMode.ROUND_CEIL); + t3("3.730e-28", "0.000016603702599326119872662740990573447853384148302520", "2.246486877060413191379069423161442689e-23", 37, RoundingMode.ROUND_CEIL); + t3("6.218344456458442779750475e-749114", "2e-564", "3.1091722282292213898752375e-748550", 56, RoundingMode.ROUND_UP); + t3("2.3965159581727651349084845200811431899626484394e-74696", "-8.7820838878771364433e+87", "-2.728869353526e-74784", 13, RoundingMode.ROUND_DOWN); + t3("2.4245195050801974604261387e-164", "-3.90714729460362923730e-63588", "-6.2053445193347e+63423", 14, RoundingMode.ROUND_HALF_DOWN); + t3("-2.559217707902385701741133457867299301673784025e-780581", "-2.29673750237058112350514e-2402", "1.114283938e-778179", 10, RoundingMode.ROUND_HALF_UP); + t3("0.000096551501836111089013103", "-7e+6", "-1.379307169087301271615757142857143e-11", 34, RoundingMode.ROUND_FLOOR); + t3("0.000865430942545005171975190659906707039606", "1.6789219995971750975218048456704752992760e-67647", "5.15468224701712532995139975237591506850389520048483e+67643", 51, RoundingMode.ROUND_DOWN); + t3("-3.9e-6581", "-6.225081719160733767991800835415465289124308278e+2724", "6.26497799698892699470412280632425399280623762440415468282701539582804690488e-9306", 75, RoundingMode.ROUND_HALF_DOWN); + t3("885.79618773833589239786405248344813254970337625132353", "-8.36295e+93", "-1.059191060257846683763341945705101827165896455498745693804219802820774965e-91", 73, RoundingMode.ROUND_DOWN); + t3("9.65741929292706227426625727019365e-7429", "-2.4677357009003e-3116544", "-3.91e+3109115", 3, RoundingMode.ROUND_HALF_EVEN); + t3("2.9517e+521", "-7.89119997561653605330960087176194e-3494", "-3.74049575365042621551648678541640064830712526e+4014", 45, RoundingMode.ROUND_UP); + t3("8.867967317389959920447289565924941031782833389334349e-7", "-2.15597467819795821286944654e-778", "-4.1132056916374029289811136978844562622420666552450392725601270294149736498308822078693437195e+771", 92, RoundingMode.ROUND_HALF_UP); + t3("4.2e+29", "-7.2670916568e+6284", "-5.779478501650594456005788464104569046421e-6256", 40, RoundingMode.ROUND_UP); + t3("1.81964562441201581939637324335e+8789123", "8.64395135574162716211962342249e+4709", "2.1051085892603282107384e+8784413", 24, RoundingMode.ROUND_HALF_EVEN); + t3("5.9960913695715898415691301696531290039795025e+14500", "5.89122546044981786106445388225669718e+14319", "1.01780035577076098909745108803e+181", 30, RoundingMode.ROUND_HALF_EVEN); + t3("7.529782e-546162", "9.85281532358565594289257252593829270736e-713", "7.642264421596554309468762746976449164492474436119157625330483881336e-545450", 67, RoundingMode.ROUND_HALF_UP); + t3("-1.971426891389372279137085743136216e-80", "1.85913479947398602884855788896892386692178840892e-955", "-1.060400188274221747224002264052111973309156283e+875", 46, RoundingMode.ROUND_HALF_DOWN); + t3("-4.7085518328747609603158779940804238202760068052179512325e-23490", "6.268859274786868560202e+172733", "-7.511018554543712229373369387555499855697154599160758496651837829116552972684558088349015751459e-196224", 94, RoundingMode.ROUND_UP); + t3("-8.564812358541786440990732054002872056425634845601e+13487", "-1.128288391682675565490143555563496097e-22389", "7.5909779996660546e+35876", 17, RoundingMode.ROUND_HALF_DOWN); + t3("-3.0219497137492408e+150601", "2.1739338547946078322037258010e-499", "-1.39008356076903410474939025923850508002e+151100", 39, RoundingMode.ROUND_HALF_UP); + t3("-5.077762068268951791099e+477", "1.254827e+657", "-4.04658336828021058e-180", 18, RoundingMode.ROUND_UP); + t3("-4.414134432648238065705595685568e+731", "-0.000243884827122881795080201216906389363908828868891", "1.8099258099496975844e+735", 20, RoundingMode.ROUND_HALF_DOWN); + t3("7.57309768842641e-44706", "-7.661786932306425303078887126145321132645923916e+20684", "-9.88424470079420858030371166638081350563339295871236978392607333711323823153613714037685144159702e-65391", 96, RoundingMode.ROUND_FLOOR); + t3("3.476538981895993084917129e+283", "-4.1578570024018268638582769751912130176633735596389394e+45198", "-8.36137216813309417736884617066e-44916", 30, RoundingMode.ROUND_UP); + t3("-401.8327781843881003083062634374850727", "9.510854329658366e+43", "-4.224991407252707943141843e-42", 25, RoundingMode.ROUND_CEIL); + t3("-4.374988579918127897401853077450179e-35", "-4.460e+991228", "9.80939143479400873856917730369995291479820627802690582959641255605381166e-991264", 72, RoundingMode.ROUND_HALF_DOWN); + t3("3.050545157e+18842", "5.7857208273730260532973e-666278", "5.272541224e+685119", 10, RoundingMode.ROUND_HALF_EVEN); + t3("-0.077", "8.9691283285351815216604e-10354", "-8.5850037126824644368703490403211252399744760748e+10351", 47, RoundingMode.ROUND_HALF_UP); + t3("4.75352044791872245587622456495450866485337e+547558", "6.819501344970945426843487713942e+9985", "6.97e+537572", 3, RoundingMode.ROUND_HALF_EVEN); + t3("2.3794046802606184156e+6383909", "-4e+80", "-5.948e+6383828", 4, RoundingMode.ROUND_CEIL); + t3("5e-8242899", "-4.6340333152980603418e-636", "-1.078973684434636123202797262876291457371835514544489323948999413008602919202503930976e-8242263", 85, RoundingMode.ROUND_CEIL); + t3("1.081835133966826259588560869304219194277241e-2014217", "-49858578302402487496090.519165915520287193379", "-2.1698074249234998895175679433883336953413728036380998366881518478532879988065637670159030374377e-2014240", 95, RoundingMode.ROUND_DOWN); + t3("2.33745385599444758369211913838826364580840764e-94684", "2.173362335414754919677478542441835426383774721030332800e+611330", "1.0755012258682481304453563089276001858000756370506149746287776676100234367527278276983679818e-706014", 92, RoundingMode.ROUND_HALF_DOWN); + t3("0.00213122587016272668", "-7.58628230959649788913899270117964644350805206960481e-767", "-2.80931526561668800323756802149661289612286702824601498737049316481e+763", 66, RoundingMode.ROUND_DOWN); + t3("5.177219e+3007", "7.57376706609665322147622649022190501e+994221", "6.8357251481e-991215", 11, RoundingMode.ROUND_DOWN); + t3("-3.438778511509205e-70994", "8.58474724e-923", "-4.0056840526258813882096312016753098953208085366995615819668559047755959324e-70072", 74, RoundingMode.ROUND_HALF_UP); + t3("-930181956746305447242.741079684", "-93.89693731745104693920496861473020555987338050", "9.90641424e+18", 9, RoundingMode.ROUND_HALF_DOWN); + t3("-0.00065334084295423337281605069932694588215", "-5.74629048655423902711933339780593769504704527e-143475", "1.1369784463263516087085853341189212311146322428223393365e+143471", 56, RoundingMode.ROUND_UP); + t3("-3.1282343516e-600174", "-0.000015895747997176137898735540296430739374", "1.9679693e-600169", 8, RoundingMode.ROUND_HALF_UP); + t3("6.39686e+277", "-7.906309782490789221065222639304572322378123362273262e-5175", "-8.0908289404070694641756770133509507743717844675986060772277329908781e+5451", 68, RoundingMode.ROUND_HALF_EVEN); + t3("4.737506677e+978", "-4.0511567005287017e-982388", "-1.16942074257007270673779175e+983366", 27, RoundingMode.ROUND_HALF_UP); + t3("8.03286219355e-5232384", "4.1792100463970e+820005", "1.9221006133624052971313912028817e-6052389", 32, RoundingMode.ROUND_CEIL); + t3("-313.15844233122798717550199042645348186125070753543765", "-0.000061647130269359434025223", "5.079854341360600191055751776461384370855844602783223715e+6", 55, RoundingMode.ROUND_FLOOR); + t3("9.5829954577883112636092276856688120516999010058291560e-827", "-0.37275", "-2.570890800211485248453179794948038109107954662864964721663313212608987256874580818242790073776e-826", 94, RoundingMode.ROUND_HALF_DOWN); + t3("4.82566933780114581921801210238052742577e-445148", "7.43134277828364e-7599", "6.49367076957213578489282821099579649398500028152598487499724e-437550", 60, RoundingMode.ROUND_UP); + t3("8.26309973038850379189095093801704159994943776522251606e+61", "-2.9327639943e-41", "-2.81751267624954685972460383394207084287015306024705312238154955447312925980298339071e+102", 84, RoundingMode.ROUND_HALF_UP); + t3("2.16291e+610", "8.3322564625086376096233691073857300e+7181", "2.59582744450091129871829401711146328244665238776950885484738131274826e-6572", 69, RoundingMode.ROUND_UP); + t3("-7.9706804878661e+2983", "0.000857857628062799904256871927899554790296844936822", "-9.291379160276e+2986", 13, RoundingMode.ROUND_FLOOR); + t3("-4.52081189107e-61610", "4.599e-99", "-9.829988891215481626440530550119591215482e-61512", 40, RoundingMode.ROUND_HALF_DOWN); + t3("3.590093370267e-279730", "-7.94338314583262669315278661903164e-4311", "-4.5196024217344810428662626158420120904314161404134544766543981381097224910556952453892e-275420", 86, RoundingMode.ROUND_HALF_UP); + t3("-3.4588464981592976457361749762633608958e+8492172", "-3.521141e-96056", "9.8230843302193739067426580652787289568921e+8588227", 41, RoundingMode.ROUND_HALF_UP); + t3("-3.883052074965960868576743506148856564e+74", "-1.850053967655721709377e+1640", "2.0988858394689606685040972119186668540423783e-1566", 44, RoundingMode.ROUND_UP); + t3("6.0053221370669650064718306816e+919", "-6.2550557938528524724323975796103534127e+553", "-9.6007492e+365", 8, RoundingMode.ROUND_FLOOR); + t3("-9.981988992266175326096983489e+785844", "4.9262608738395023e-726", "-2.0262810370588970908199108167273414274913326131390490495456873672336640585632246896659299548241e+786570", 96, RoundingMode.ROUND_DOWN); + t3("1.3567442371744515525949659296916525228583601957509939673e+6350", "9.20e-633611", "1.474721996928751687603223836621361437889521951903254312282608695652173913043478261e+639960", 82, RoundingMode.ROUND_HALF_EVEN); + t3("-925.132495132060664105582168942832170018704128335178427", "2.816905877176005772911736153920553399863448721846484035787e-17", "-3.2e+19", 2, RoundingMode.ROUND_CEIL); + t3("4.25802451194307177337299273323929680282896657712757298589e-91", "-5.58385255192431028361423347018637947437431001891313252e+166754", "-7.625603420483710776519206081097236371938875933318402963771462011031121583425021086602836253169576672e-166846", 100, RoundingMode.ROUND_HALF_DOWN); + t3("-4.624166e-70", "-9.3289351920", "4.9567993611590736410381100222783067652e-71", 39, RoundingMode.ROUND_CEIL); + t3("3.095934977386501436397164003e+8543046", "-0.8113213089353323344967667936292695786579663", "-3.8159172491712132469758486541178761750384395407780130776116031191500742554815487e+8543046", 81, RoundingMode.ROUND_CEIL); + t3("3.57895373869154219312736490614832144495301e+5024", "4.73762127542716365462398965067586e+5381", "7.5543263815845e-358", 14, RoundingMode.ROUND_CEIL); + t3("-9.953070670236959435989542552e+581594", "0.00000233495966134446698866063053490907985902957073882564195531482", "-4.2626306719602998249171628986000174657055786192572518354967928005561185698616724356182389674e+581600", 92, RoundingMode.ROUND_HALF_EVEN); + t3("-2.280332344157424082436289042722055625046720019119092679414e+2600", "6.70489912007486008818693915571900115e-976566", "-3.40099426303070792419457e+979165", 24, RoundingMode.ROUND_UP); + t3("-6.398e+53469", "7.98315991521555996711172647379199e+8622698", "-8.014370334490840848235213e-8569230", 25, RoundingMode.ROUND_DOWN); + t3("8.5952018097e+828135", "9.74749e-4369017", "8.8178616338154745479e+5197151", 20, RoundingMode.ROUND_UP); + t3("-6.45481980644574225e-726", "9.84161678749869714232432560603044784e+427640", "-6.558698581563315879188760226492731345323598196072329499159200289768400292595353610439103749518635909e-428367", 100, RoundingMode.ROUND_HALF_DOWN); + t3("-4.9674477463727121938073542124e-16695", "-582987902987.1962384145646624091245", "8.52067036197457569830597616633680114892907226669e-16707", 49, RoundingMode.ROUND_HALF_EVEN); + t3("-9.14717211469063496048017806673626480487794e+89", "-1.03e-5696782", "8.880749625913237825708910744404140587260135922330097087378640776699029126213592233009708737864e+5696871", 94, RoundingMode.ROUND_FLOOR); + t3("-4.8635400322120376778537175147648e+743", "-2.36707469602975260e-75339", "2.054662677257104235075798298889121242810358e+76082", 43, RoundingMode.ROUND_FLOOR); + t3("-5.63548988694627886787587349987896646686700785196658157584e+40477", "5.77209e-747", "-9.7633437575406462267148875015e+41223", 29, RoundingMode.ROUND_HALF_DOWN); + t3("6.83695e-558731", "-3.94342139703431498783160018151252988e+637969", "-1.733760943008e-1196700", 14, RoundingMode.ROUND_HALF_DOWN); + t3("-7.98262e-86673", "5.741118846201109301e+436", "-1.3904293246e-87109", 11, RoundingMode.ROUND_HALF_EVEN); + t3("-4.26874941731106819593450850675989330588172453740311826632e-20063", "-3.2403577474686503538650654271626333181e+3762", "1.317369793704350008e-23825", 20, RoundingMode.ROUND_HALF_EVEN); + t3("9.2882326610961883e+27", "-4.30662480016486641955935993893450580735e-32370", "-2.1567313365075628892952376606705082040079243923653220981290489607445066878641885316581063574733e+32397", 96, RoundingMode.ROUND_UP); + t3("9.666240186989400476881729679425669361845280068784e-81", "-4.92037839801832192380005136e+6049161", "-1.9645319e-6049242", 8, RoundingMode.ROUND_FLOOR); + t3("9.232486226130084335699618763355315307990627088319426399605e+8844068", "3.9e+63", "2.367304160546175470692209939321876e+8844005", 34, RoundingMode.ROUND_UP); + t3("8.1743684175973623740577760207067029620194414583e+42788", "-3.020710372345526921392741874806840122036278485855143377e+690828", "-2.706107971301503253744450452957962096033375556282593804502133202e-648040", 64, RoundingMode.ROUND_HALF_UP); + t3("-5.8537208685979961804257724819363504650619833457e-406", "2.70006233530852421326150389e-2810", "-2.167994713325430435716938510175728970929943257751040650986980622372211e+2404", 70, RoundingMode.ROUND_HALF_DOWN); + t3("3334.78107253269059738584567915642232492818", "-8972180632559.4892", "-3.71680108671795584813762107152084186283616736293492881508957866299771835729380542351661992694e-10", 93, RoundingMode.ROUND_HALF_UP); + t3("-6.242100006184550179391666553480790558550805652e+556", "-9.82836522790083710919500145623437928471e-19562", "6.351107087946253510204772800761927631308542246178465075452e+20117", 58, RoundingMode.ROUND_HALF_UP); + t3("4.66473793450477093405098e-46", "-3.852341070586643781632611090691822273760467745e+70646", "-1.21088394019e-70692", 12, RoundingMode.ROUND_HALF_UP); + t3("-8.162327659811364194903775226733127923186e-5345495", "-3.9499236279e+297", "2.06645202002321078723046548621931342106646203289747408840020929357574427749355e-5345792", 78, RoundingMode.ROUND_HALF_DOWN); + t3("3.605662873886263663818e-8434", "3.30377906613266298e-124080", "1.091375301347550388541276612640161450663677797598174358554637487080243306482718e+115646", 79, RoundingMode.ROUND_CEIL); + t3("2.03535220477482354809298305754935022943376057531e-85928", "-77546278827463270.20383055638116849129227", "-2.624693583690049169943640617270614776575433786581076462305222301986434947657494818191072613273e-85945", 94, RoundingMode.ROUND_HALF_EVEN); + t3("7.40e-591592", "-7.75e+8851393", "-9.548387096774193548387096774193548e-9442986", 34, RoundingMode.ROUND_CEIL); + t3("6.8056650204973653378574186579424614131830798174e-638822", "-46.622459", "-1.4597396118676119888608661027386954028278688212048189049831112511675971445435771631e-638823", 83, RoundingMode.ROUND_CEIL); + t3("9.316220168516861881103685684687558948260e+575928", "5.70085284063452695599704573572461275330557667344e+6237", "1.634180083041738465127651313886726776260150759121302582819452585393977e+569691", 70, RoundingMode.ROUND_HALF_EVEN); + t3("4.6967739383923396529003234520007972819053916837e-552919", "-4.447393368690689980558657011961109601730e+50", "-1.05607342302061019777230189726663e-552969", 33, RoundingMode.ROUND_HALF_UP); + t3("5.450138739805869994519508442987338921445437908601849112045e+518492", "4.06527155698e-80", "1.3406579765743022303223209960814397180422027838872e+518572", 50, RoundingMode.ROUND_UP); + t3("-1.2681888006403972113682033787e+43558", "1.9862908180410938e-5896128", "-6.38470856896525218528734572580007711248107717486e+5939685", 48, RoundingMode.ROUND_UP); + t3("1.37781586723665857435505727168797934320870e+99", "-8.818473958990057520654237407084886e+5158617", "-1.56241984003596693849913085767307745854104466211882791063779148459391961491e-5158519", 75, RoundingMode.ROUND_UP); + t3("-2.237687692624590743731212540513663805303704545e+74", "4.8223370446511479025767805692595965616237395703771e+72474", "-4.6402556932568512262677842519047e-72401", 32, RoundingMode.ROUND_FLOOR); + t3("1.424005635978500062890684347838676663498465572e-81342", "-1.19460163218743874946880467e+9870178", "-1.1920339e-9951520", 8, RoundingMode.ROUND_FLOOR); + t3("-3.3537956017922014741624740e-765", "7.7873218541505224509926023073605323645e+44220", "-4.306738137456948875377946472291268131032224e-44986", 43, RoundingMode.ROUND_CEIL); + t3("-9e+59210", "-8.835655602951134414622109234388728872915343354967232709e+125", "1.01860013613409446193397447087244985344864095534013e+59085", 51, RoundingMode.ROUND_HALF_DOWN); + t3("8128823887199812657410247368065460.20360163414228", "0.08378484866", "9.702021328685196e+34", 17, RoundingMode.ROUND_DOWN); + t3("-6.00859143064029334973412510864364391574678988749749915712449e-43", "9.59071377531e+3708057", "-6.26500964517218954408196509104673e-3708101", 33, RoundingMode.ROUND_HALF_DOWN); + t3("-7.9621423782632874685119197214509e+4326", "-6.07930777589e+2675", "1.309712005343839296531734280805951873e+1651", 37, RoundingMode.ROUND_HALF_EVEN); + t3("-8.3512004035417319093448522511292813852817411e+32516", "-1.790e+45712", "4.665e-13196", 4, RoundingMode.ROUND_HALF_UP); + t3("-6.83e-158", "2.8175895559853748461816585e-27970", "-2.424057821158197187219767074023250518311886226126555993e+27812", 55, RoundingMode.ROUND_DOWN); + t3("-4.2410547403160631485383629457023185296339353385e-580201", "2.1918565642234396487048e+1925729", "-1.934914e-2505930", 7, RoundingMode.ROUND_DOWN); + t3("-7.02824208339755034174567248094791164180597828587379234335959e+974220", "-4.659990013559070650618250297109844154e-9", "1.5082096877777910744915140833790404573363236163698256319748698307926e+974229", 68, RoundingMode.ROUND_CEIL); + t3("-6.464231475077962521236042754690e-560291", "-5.383e-816", "1.200860389202668125810150985452349990711499164e-559475", 47, RoundingMode.ROUND_HALF_EVEN); + t3("-4.7429026700504370681e+73", "-4.4919439983271391345e-49571", "1.055868610965933312279661988616829847461366643593609978489232372194518375246873e+49644", 79, RoundingMode.ROUND_DOWN); + t3("-9.126340058738e-2028530", "-2.2702873716958548283767243705751672333942550136640e-61307", "4.019905221038526202647646276192742677227481870128713776738013527397e-1967223", 67, RoundingMode.ROUND_HALF_UP); + t3("-5.60966468517303883042747184299310307195911155058e-70028", "-3.801205231009667327576458080e-460", "1.475759487914577212164668726373048195407577084818334116296294690839368062e-69568", 73, RoundingMode.ROUND_UP); + t3("0.0688564910139141584898941610196660443328", "5.429194425261882771686899930228932516786965978e-8425928", "1.26826349584253090908028349363034170653783057416832776839847699116577108526703435844801317155878e+8425926", 96, RoundingMode.ROUND_HALF_EVEN); + t3("-5.007847896e+61561", "9.1904561e-85", "-5.44896558071802334162719084203013602339061279015303712728686e+61645", 61, RoundingMode.ROUND_HALF_DOWN); + t3("-120646117.83189454698870016934788021124925395", "5.274802609769103166e-363", "-2.28721578336323102371472756402809367659579855197299786e+370", 54, RoundingMode.ROUND_HALF_EVEN); + t3("3.561126432513e+516", "1.491357423223653286290089185524875706766793345e+584049", "2.3878423623060286390699561437183025363357073935830038523234525524927636838016362437763979188998006e-583533", 98, RoundingMode.ROUND_HALF_UP); + t3("0.0000428655126657096175785391128804551661098359211821992803", "0.00000793983755664915807204546612311444442002550375501", "5.3987896301243861003330218819639490714046381445221466096e+0", 56, RoundingMode.ROUND_FLOOR); + t3("2.661588631416e-15850", "8.094740032625594480114127e+56588", "3.2880470783355005090592053672745e-72439", 33, RoundingMode.ROUND_DOWN); + t3("1.598566217012987004339943101673162639730215928921906639e-635", "-5.5152130078801634771423297e-35708", "-2.89846686742e+35072", 12, RoundingMode.ROUND_CEIL); + t3("2.703209117229891481438995327412080901452327075200757612e-34985", "-1.883761695300124878143165356512865376593709417888891529e+5144", "-1.43e-40129", 3, RoundingMode.ROUND_CEIL); + t3("-5.534342773127e+71", "-2.3090e+8498", "2.3968569827314854915547856214811606756171502815071e-8427", 50, RoundingMode.ROUND_HALF_UP); + t3("3.27e+439", "1.11341826878604717185126474711666056503463301846874978e+54", "2.93690169424403294345291e+385", 24, RoundingMode.ROUND_FLOOR); + t3("5e-240", "3.38821907290638529740171e+74688", "1.4757015093805734438e-74928", 20, RoundingMode.ROUND_HALF_DOWN); + t3("2.03316186915365377e-630389", "-8146428678.19829265722968550184876355949713211", "-2.495770784312959362699322831209217182948509522379341695956869850581819979308406e-630399", 79, RoundingMode.ROUND_HALF_EVEN); + t3("-8.80968952319354396523912357e+2456695", "-6.492980183108946861591227042230148725400050615256e+614", "1.357e+2456081", 4, RoundingMode.ROUND_CEIL); + t3("6.73e+4224706", "-9.233799954672042747306446103052e+9209532", "-7.288440331215e-4984827", 13, RoundingMode.ROUND_HALF_DOWN); + t3("-0.000003414722628277670669974879878851201242852897449127509002623", "-7.014149958310288e-8", "4.868334222355689335058624170936971298180118484017358304397577854928e+1", 68, RoundingMode.ROUND_HALF_EVEN); + t3("0.072", "5.1983683086560884587699109613617418155e-9", "1.385049995016875722967743429414378372439e+7", 40, RoundingMode.ROUND_DOWN); + t3("-1.338978994e+8067997", "-3.97070916485840e+5074731", "3.372140689250781509100506146409902491645127e+2993265", 43, RoundingMode.ROUND_FLOOR); + t3("9.56220432914296527994334833884e-291911", "-1.3300786550684799774706702e+8422272", "-7.1892e-8714183", 5, RoundingMode.ROUND_CEIL); + t3("37129207042.34059433", "-3.4143681924e+36210", "-1.087440046008688747354791577515399771213e-36200", 40, RoundingMode.ROUND_DOWN); + t3("-3.8252411190396990353e-5554705", "-5.558332697645348325983931729040156241965445418932890464e+1891319", "6.8819938048331811059310395225218740856654538852094678988262914449015997267270979957638614105e-7446025", 92, RoundingMode.ROUND_HALF_EVEN); + t3("-9.493901598022e-7007008", "7.831756437e+943619", "-1.212231467409971498325848664284757301882369557657887107757613223640141657791e-7950627", 76, RoundingMode.ROUND_HALF_EVEN); + t3("8e+3736", "415529.64400479270780702", "1.925253737109482425719934804193610266756072568e+3731", 47, RoundingMode.ROUND_HALF_UP); + t3("4.8261982665872253349e+8954", "-5.633701332273250863710377840063314953449559081e-6349328", "-8.5666562388386490227642480002993e+6358281", 32, RoundingMode.ROUND_UP); + t3("9.758536600372596325785494255136077167427367e+14592", "-3.585215106457210755904915e-7", "-2.7218831536207752639190418827482157555625712612874502608548806056775718717619968e+14599", 81, RoundingMode.ROUND_DOWN); + t3("5248.18337176732283137202642608365", "9.0757472991007097541861102207041693219054e+276847", "5.782645989148850083866552505497745692741757445028131910249582e-276845", 61, RoundingMode.ROUND_FLOOR); + t3("-8.0883700308754e+523", "4.082408241691223176384316789368180e-4525", "-1.981274177401871791343969565861270460864529e+5048", 43, RoundingMode.ROUND_UP); + t3("-9.4263305836241369821327693986430750344739839184327753e-395", "7.80053e-4202", "-1.208421810264704703671772225559426735680009424799696e+3807", 52, RoundingMode.ROUND_HALF_UP); + t3("827369713437207.8", "5270746.693443841509271", "1.56973909307072872298433504431718708411091593563381731e+8", 55, RoundingMode.ROUND_FLOOR); + t3("-7.34972710593718317572113e-213", "-9.27768949044257177207565537e+569431", "7.92193693646302513719601435836648594e-569645", 36, RoundingMode.ROUND_CEIL); + t3("1.12753491736721481618528e-6356224", "-9.95603226182194995745e-3889", "-1.1325143267071699637599563469e-6352336", 30, RoundingMode.ROUND_UP); + t3("2.53415295977175651933249676513e-969125", "-5.9177478931779603437e-13", "-4.28229286802358325518944712427e-969113", 30, RoundingMode.ROUND_CEIL); + t3("2045768316.447", "8.667e+14375", "2.3604111185496711664935964e-14367", 28, RoundingMode.ROUND_DOWN); + t3("1.0745413851003e+670334", "-0.0005812493288670238534450263", "-1.8486754852600092072717422551e+670337", 29, RoundingMode.ROUND_HALF_UP); + t3("1.0342009147082649505352372932771459593766933290995e+11321", "6.06616927193404744763816689964266409963740849048647890693882e-43039", "1.7048665613291329544205259224167695273692375637911853156678814141196410111663047887e+54359", 84, RoundingMode.ROUND_UP); + t3("9.60056356103035832418236626389542455410e-187", "-6.26348208e+436", "-1.53278375165884697864137040269067466607967049536126396964e-623", 57, RoundingMode.ROUND_HALF_EVEN); + t3("-6197516404.5727345", "4077346541.2387566306616005827481760152", "-1.5199876541987131942033977753149629852393423205812488857917610969656973883190681815e+0", 83, RoundingMode.ROUND_DOWN); + t3("6.163639583583888177274965738338099883087298530097564809998", "4332065.091903051587081610175387143489927575548196714000264", "1.42279477635370347587358751666663337470283118e-6", 45, RoundingMode.ROUND_HALF_UP); + t3("6.6115091139797029905176079494224764948219022e+691017", "7.6055417816055105231823229703355815267288674655065e+4880439", "8.693015308876562683032125349295039508925e-4189423", 40, RoundingMode.ROUND_HALF_DOWN); + t3("4.081743186005789617453227486530252062883326e+3732", "-9.636212118238603608715858526409473e+53323", "-4.2358378332915823824929359201722e-49592", 32, RoundingMode.ROUND_HALF_UP); + t3("9.996147e-107080", "3.414026574568310e+6122", "2.9279640277152713115961628015455467038358355650992235920418058938069417888e-113202", 74, RoundingMode.ROUND_UP); + t3("6.077174e+13", "-9e-8468", "-6.75241555555555555555555555555555555555555555555555555555555555555555555555555e+8480", 78, RoundingMode.ROUND_DOWN); + t3("-2.691e-91", "1.5631861078143808079652313930129878e+9055", "-1.72148408084467219701462721427665493327930551598941271394e-9146", 57, RoundingMode.ROUND_DOWN); + t3("-7.1186912e-554", "-3.3021539378796648848498e+10266", "2.155772060878227621617125677860322420008775232683732837e-10820", 55, RoundingMode.ROUND_UP); + t3("9.298831373664187864963e-875910", "6.092526889598348072692618e-39198", "1.526268417385223311898121582721796944492167527e-836712", 46, RoundingMode.ROUND_FLOOR); + t3("-3.959199513713537470721417013508925579431591685403665e-23", "2.177878829998357051791642667058828071220900322e-344", "-1.817915422648432746650098260870105271574e+321", 40, RoundingMode.ROUND_CEIL); + t3("-6.260661890e+975", "9.6354947098881745806e+7470091", "-6.497499172e-7469117", 10, RoundingMode.ROUND_HALF_DOWN); + t3("244.4549960429", "-5.72687888477033537235946280197051727843316295863216378e-6816", "-4.268555367793557970295249887962477722e+6817", 37, RoundingMode.ROUND_HALF_DOWN); + t3("-6.1423370070253e+74", "-9.5379e+13283", "6.43992598687897755271076442403464074901183698717747093e-13210", 54, RoundingMode.ROUND_FLOOR); + t3("9.19510650518108750615390751758334209738009e+2057", "6.69005112058700081722e-9", "1.374444879335135370200330960253771661552962647029987667998755566016991577308754896885437262139721e+2066", 97, RoundingMode.ROUND_HALF_EVEN); + t3("7.3215842477188520866324170442227693187792985524973e+9421", "3.24858883704858393023258050e+326349", "2.253773750688214563968520941574608349783978250431353830408605841e-316928", 64, RoundingMode.ROUND_CEIL); + t3("-8.71579276054510e-840725", "-4.5318428404942247115517113500e+4076272", "1.9232336749777029760673710759179490621192e-4916997", 41, RoundingMode.ROUND_UP); + t3("-1.434965893134070200e+737", "6.56713666493874217451706755585572060113737727797e-1753374", "-2.18507085560622403906384487e+1754110", 27, RoundingMode.ROUND_HALF_UP); + t3("3.0712e-14392", "-7.759710318697827649447486735203e-695", "-3.95787970666846253106476319638807542737616396452358012718290267156312677821860868274851929e-13698", 90, RoundingMode.ROUND_HALF_DOWN); + t3("4.515454616130906017e+7619844", "9.884728661928585523753677730e-160", "4.5681118527030023482697598985949953012524191993079407720918526810486454082388753e+7620003", 80, RoundingMode.ROUND_HALF_EVEN); + t3("-2.8110373e-8559", "-4.437402446799e-59", "6.33487120832998204565922852639953595216609541e-8501", 46, RoundingMode.ROUND_DOWN); + t3("9.898174463814491001960787200757e-351779", "5.17618853629777668395280867942999428217292400609474171e+9746", "1.912251533035169003660476364567518725666095003821083516178081878907004775e-361525", 73, RoundingMode.ROUND_HALF_EVEN); + t3("-2.36612760320894668924700844852e-11", "-3.2745317602179171193943683425524684e-5640419", "7.22586e+5640407", 6, RoundingMode.ROUND_CEIL); + t3("-6.9596693490802999514161313229487402867972607764597969656", "0.285226683055", "-2.440048481627601891131e+1", 22, RoundingMode.ROUND_DOWN); + t3("8213460144.175071054072894126373913199631949943627338", "-6.406146817044620719196002718063148338027967572686073281975e+3322", "-1.282121746308060279295936331964983994097358126750768e-3313", 53, RoundingMode.ROUND_HALF_UP); + t3("-5.003483249812549e-4611", "-7.5567e+11", "6.6212543171126933715e-4623", 20, RoundingMode.ROUND_UP); + t3("2.449575143613357647196960436154e+202032", "-5.57899958218e-96022", "-4.390706805997256525137717457355e+298053", 31, RoundingMode.ROUND_HALF_EVEN); + t3("-4.46938143438468080209676025575587201656881822e-9659", "-5.984e+4", "7.468886086872795458049398823121444e-9664", 34, RoundingMode.ROUND_HALF_UP); + t3("5.6387496904523695598823606916050957932186171021418578327e+9365", "-9.544373379e+557", "-5.90793074258706613397501775543759958054195178625341353873704106269332068635953979059e+8807", 85, RoundingMode.ROUND_HALF_DOWN); + t3("1.974211512831110190393842525e+2159", "-7.5333111e-954", "-2.6206424859197839186461349312920317335626826827847319354699157452823e+3112", 68, RoundingMode.ROUND_HALF_UP); + t3("-2.75661977053791701e+2119", "-7.053741385645802389176689645132526282432285239880e+94", "3.908025003790999946844454749816e+2024", 31, RoundingMode.ROUND_FLOOR); + t3("5.1342e+9743616", "5.275918495265529345902796796716985476235726904590e-53416", "9.73138611714206009726988993150647502487193836013279e+9797031", 51, RoundingMode.ROUND_CEIL); + t3("8.699730749512133925496377234206818932534723e-26", "3.4453652768954455250050574257269430987581619e+18096", "2.52505323828865520349873985458855189292005057179257850602e-18122", 57, RoundingMode.ROUND_UP); + t3("5.664812257591541352640567193767046909e+5285462", "-4.50890863902081e-98996", "-1.25635995562e+5384458", 12, RoundingMode.ROUND_UP); + t3("2.48787856672556002496774233785963666018036490e-3933029", "7e+9", "3.55411223817937146423963191122805237168623557142857142857142857142857142857143e-3933039", 78, RoundingMode.ROUND_CEIL); + t3("5.9539641341102645550947770478494e+92", "-4.75178622046245861e-353826", "-1.25299494924054185512831751632966705933995697937245501289820563149146969666625336886948648e+353918", 91, RoundingMode.ROUND_HALF_DOWN); + t3("-6.6467837002751853908074751004e+306", "-4.038815721317747800760251e+9875034", "1.645725915443979128881e-9874728", 22, RoundingMode.ROUND_HALF_EVEN); + t3("-3.90481922628843248465563624942610858391358568576661024620e-9430363", "6.86298535478499436869820023137287780e+42", "-5.689680254914027591083142859442789256657e-9430406", 40, RoundingMode.ROUND_HALF_UP); + t3("-8.2518803333e-533225", "-9.24020999585292426696466624169357039545383424430979282339e-18", "8.93040346161343297196403649076651682277186476894263236646878545305731717653e-533208", 75, RoundingMode.ROUND_DOWN); + t3("-6.41067821e+1929563", "-634707603.4845767020225598693480791090464897823639", "1.01002070477887043351480601517769897426205015629537362848124473191484020741186184361711283e+1929555", 90, RoundingMode.ROUND_UP); + t3("-5.29769762830211349249371432620016208443703741565651e-50", "-6334138.745141023440", "8.363722111969881402006309448199286039523090527712710816906890818173036e-57", 70, RoundingMode.ROUND_HALF_UP); + t3("-2.3246540870049496042975e+2618120", "1.84626e-2187859", "-1.259115231335212594270308623920791221171449308331437609004148928103300726874871361563376772502248e+4805979", 97, RoundingMode.ROUND_UP); + t3("589439697404682003466316343821213808907714760264392950296.63", "5.0538982896632129382945e-19414", "1.166307004259006792096343990731e+19470", 31, RoundingMode.ROUND_UP); + t3("8.26480049309339941034744554426537640559003873e+24071", "1.434717967251003e+3742407", "5.7605750271108703532514803677705634244967e-3718336", 41, RoundingMode.ROUND_HALF_DOWN); + t3("-5.30821970682964756e-76", "-526439554137776.72963094920296618803361", "1.00832463387437845435615560827809802074792353644794953149743469241120147e-90", 72, RoundingMode.ROUND_UP); + t3("4.311965340061586939626215684855913788626e-8", "-9.32810863172e+10503", "-4.6225505e-10512", 8, RoundingMode.ROUND_DOWN); + t3("2.13266501674148824", "7.37536229399840276277838997115967667e-146", "2.89160712617e+145", 12, RoundingMode.ROUND_FLOOR); + t3("-4.66156710e-446412", "-6.820532155030260614e-8", "6.8346090804102631685015214277836006333821193730158535e-446405", 53, RoundingMode.ROUND_HALF_EVEN); + t3("-8.82064291547559016172450119651e+79", "-5.4674580800399448262374442512877928110e-1791", "1.61329e+1870", 6, RoundingMode.ROUND_DOWN); + t3("6.3596711367398199051223744060326168881439e+3056", "-8.883549974554361168e+2140706", "-7.158929881586e-2137651", 13, RoundingMode.ROUND_UP); + t3("8.63344450591553536794379391357748211859613547151595216686882e+631007", "-9.306113242e-9", "-9.2771754237326476839618431043131315880414852483652510521092367339150846752612512428e+631015", 83, RoundingMode.ROUND_FLOOR); + t3("6.32284303943007431017430713697567343622998485776636892e-18204", "-4.31887792782567090607946548286754406305e-12", "-1.4640013320805515334524558592826803332326816100722554340228220377e-18192", 65, RoundingMode.ROUND_DOWN); + t3("1.5815379736946253094296859750535722520523348159337501e-17665", "-4.11605663823501643028e+647", "-3.842362029237760670080940768743697502e-18313", 37, RoundingMode.ROUND_UP); + t3("-7939.872355277727171649400758601209134330843696485138807139", "-2.91112674291440540550e+1323", "3e-1320", 1, RoundingMode.ROUND_HALF_EVEN); + t3("-0.00000148115859547900950011238279210334603860165011296461564704918", "-4.4295118395258202244277902683985985624021130912914319919e-7", "3.34384159956905704091232369069871203206530571769674042045243027875e+0", 66, RoundingMode.ROUND_HALF_UP); + t3("266981379708464635528679062258.658592890445", "4.964727712220529955255959094237e+36", "5.37756338683585589150289962166402092299189400317172648438999576e-8", 63, RoundingMode.ROUND_DOWN); + t3("-3.187e+919", "10981.102917099818918109034451475537138036009209", "-2.9022586e+915", 8, RoundingMode.ROUND_HALF_EVEN); + t3("80.135553297053310740901117923616751991741861777471022922438", "-82833381935785564468926997.89", "-9.674306592863288431519859031141859534552449136845119431629912988063819273790784971905634170315096e-25", 97, RoundingMode.ROUND_HALF_UP); + t3("-9.447e-2214870", "-4.02859195e-248", "2.34498805469737385539878269378957578466094090268933789633373e-2214622", 60, RoundingMode.ROUND_FLOOR); + t3("3.537998468838195685676415551113685395e+48", "9.69335109087128902877435769874994e+97", "3.649922958191522497244e-50", 22, RoundingMode.ROUND_FLOOR); + t3("-4855720230870.4513269267507827161759675488297126143951243", "-8.978021104558769533582361710462833003030e+3869986", "5.4084526805187196503132422238527776973593807115231502537719311625302164553227775876408569e-3869975", 89, RoundingMode.ROUND_CEIL); + t3("7.9073150787460439055865282028109202712084498e-544790", "6.713853057839122093518452955731930140287889480527347558e-575", "1.177761117293657583125510758944553850835483047228170334416596532458195983379713435e-544215", 82, RoundingMode.ROUND_DOWN); + t3("-7.0246617720278760567399028884942086203916538845346940146531e-58891", "2183595774.1495622228711848208567", "-3.2170156469385e-58900", 14, RoundingMode.ROUND_HALF_EVEN); + t3("-4.1554766870736563308759442357139307684550517467617353e+4024363", "4.9462375307766183668878880051431621794434865e+640537", "-8.4012881735204432464215822e+3383825", 26, RoundingMode.ROUND_HALF_UP); + t3("-4.29667656930e-8", "-5e-767928", "8.5933531386e+767919", 65, RoundingMode.ROUND_HALF_DOWN); + t3("-6.5683068343471e-734", "-2.4572504884364226184e+103947", "2.673031042320227954491762381864192357452574244095247807952231531984e-104681", 67, RoundingMode.ROUND_HALF_DOWN); + t3("6.21382e-75932", "9.82665802304965078603145627378041998277e-4604600", "6.323431613702960816871350284176133492595459728316355381847081047538451474732340194023040634744e+4528667", 94, RoundingMode.ROUND_HALF_EVEN); + t3("-0.000009258864551042", "4.990762091803464240668236178624803445974525855403435282722e-9604371", "-1.85520054467196855669308613647928e+9604365", 35, RoundingMode.ROUND_FLOOR); + t3("3.283065692310497267366594014029117947915679163022009e-4099", "5.0673e+72044", "6.478925053402200910478152100781714025054129739747023069484735460698991573421743334714e-76144", 85, RoundingMode.ROUND_FLOOR); + t3("-246205519.6160710857", "2.0786429621526408051589737776", "-1.1844531461098103557356950933e+8", 29, RoundingMode.ROUND_HALF_DOWN); + t3("1.96996176661e-32", "-0.007520124374695263931707081680897322788587342963575305", "-2.61958668295273807174439251980211589593757178491479789069225901928231849254098778e-30", 81, RoundingMode.ROUND_HALF_UP); + t3("85309.282645332177647", "9.0530400989665391896526077147820833230375706618634454476763e-468", "9.42327458099636194382951e+471", 24, RoundingMode.ROUND_HALF_UP); + t3("7.46549264710535489902e-22021", "8.219797516276011666e-6526472", "9.082331568780059900776833452013563141000516755655840228779e+6504450", 58, RoundingMode.ROUND_DOWN); + t3("-2e+9408647", "6.792365459e-279427", "-2.9444824e+9688073", 8, RoundingMode.ROUND_FLOOR); + t3("-1.4869439219432551169022982211734456823791811e-53821", "-4.753962373314970926600160e-174260", "3.127799097211614676184374590345322354170231441e+120438", 46, RoundingMode.ROUND_UP); + t3("-9842810715.9", "6.60e-1698463", "-1.4913349569545454e+1698472", 17, RoundingMode.ROUND_DOWN); + t3("7.4395147817040973452e+40720", "3.84413418436305e-7547520", "1.9352900874184e+7588240", 14, RoundingMode.ROUND_HALF_DOWN); + t3("0.000332961362352164511623710207423", "3.56408060371164469639468861134271077818745896596463780230e-383", "9.34213895177952784485746495343061820660593602008243425404005852292077e+378", 69, RoundingMode.ROUND_HALF_EVEN); + t3("9.11885341940473839408575938384012774321e-67661", "-7.9088914133010387e-82", "-1.152987560819055655134282968842532883671228044459732713502144508654141256434344544533783737e-67579", 91, RoundingMode.ROUND_HALF_DOWN); + t3("-8.5299488303848936302456362584099035594107537410287271e-8718651", "-9.00665e+994", "9.470723110573735662255817932760686e-8719646", 34, RoundingMode.ROUND_HALF_EVEN); + t3("0.833089432216403153611265477411666667722437374885897542", "8.452416810975134215117323697872422419111482142244267e-3703", "9.8562275245899960143964693715285659594591676668928363960727587189814679235958067247966474e+3701", 89, RoundingMode.ROUND_HALF_UP); + t3("5.267800714111572978525196102401627", "-7.1623611695175815037718380616992824807e-3141", "-7.35483814545809056755308e+3140", 24, RoundingMode.ROUND_UP); + t3("77089446871073734.20656227941369002814763630781", "8.8360092452637473565059972961820798580628476486164e+369045", "8.724464261102375048586255640858e-369030", 31, RoundingMode.ROUND_UP); + t3("96.057686032", "-9.7664635750735133301862997579178533878422944783e-153548", "-9.8354624776529678911279137666105749233297209023387053186670156e+153548", 62, RoundingMode.ROUND_HALF_EVEN); + t3("4.6073647059765138615100569747306494e+460449", "-4.016357979536216937024597732603461e-74", "-1.14714991279451204739420697127464043074572817763e+460523", 48, RoundingMode.ROUND_FLOOR); + t3("4.350908566861098931216756910746119162724e+35343", "4.2609754978301988244448e+850", "1.0211062159537637329667714295253130817127687109713938473797596231e+34493", 65, RoundingMode.ROUND_HALF_UP); + t3("-9.696817050283784414e+276", "-5.58646555503374552833341e+848", "1.7357696e-572", 8, RoundingMode.ROUND_HALF_UP); + t3("-7.331827097971634879917964286056959941446213902723568401e-304729", "0.00000831207514828107390", "-8.82069395088163e-304724", 15, RoundingMode.ROUND_UP); + t3("3.93298669402072794114299899887e-1512", "7.72901242e+6084", "5.088601855320511881313549e-7597", 25, RoundingMode.ROUND_FLOOR); + t3("-2.96069842842096310574354374361594164148796243762076951755e-52360", "9.4498830587855422289076008000990209e+3302491", "-3.13305298065927512091787709367118789213584665501097002376246990602481396197340165632300247435479079e-3354852", 99, RoundingMode.ROUND_HALF_DOWN); + t3("282915.480593920130121418412422920892712008902242859399312", "-3.354915161e-23", "-8.432865423326874110525932683128164882736624952849572e+27", 52, RoundingMode.ROUND_CEIL); + t3("6.140988363085712725567739450374627167244289442639108773e+6386792", "9.1120851642928672190039064249101487287727949738e-1704960", "6.739388682570853684179467563520673598429275815020203947894675160880482100515988907105380019e+8091751", 92, RoundingMode.ROUND_UP); + t3("7.513800104665443626e-9", "4.351697135827428703651877809027189690e+429", "1.72663672818691570922446114251232631073214343999185786701640482832705308105395741077e-438", 84, RoundingMode.ROUND_HALF_EVEN); + t3("4.99868913267e-21296", "-1314559598.28304496971968258586544140117578601", "-3.8025580119751292422e-21305", 20, RoundingMode.ROUND_HALF_UP); + t3("3.122011910671616030999170882e-19115", "3.11255681556277824063788823568894500609528e+3240", "1.003037726110431890768655418563117605342573532007920614522264041479690874526694135e-22355", 82, RoundingMode.ROUND_HALF_EVEN); + t3("-9.19840826446854973629e-95", "-4.0521142148298574429375388605104558951973577402808e-43504", "2.27002689874939221510659964466029590690036233697910568845721348412425768805251323e+43409", 81, RoundingMode.ROUND_CEIL); + t3("1.1673464029850883003119121721172557888837420940492827e+957504", "4.71e-592", "2.478442469182777707668603337828568553893295316e+958095", 46, RoundingMode.ROUND_HALF_DOWN); + t3("0.0003131148567813440028672576", "-6.13903486298707232884630445312e-2634", "-5.1003922240146979403385557685681305352589500148346590588099546742473128356912091213547398e+2629", 89, RoundingMode.ROUND_CEIL); + t3("7.45962530480932527632954615098339718750060776e+71", "6.04e+779", "1.2350373021207492179353553230104962230961271125827814569536423841059602649006622516556291390728e-708", 95, RoundingMode.ROUND_HALF_UP); + t3("-8.007e-2746151", "8.2348473447307518277589610315123817900739797596584615055354e-84", "-9.723313213721508799981483924981536944935804447e-2746068", 47, RoundingMode.ROUND_HALF_DOWN); + t3("5.52206533635738356000288e+42829688", "2.97651439558070354509685445493557826e+333821", "1.85521203746103682221328466556500511430721560358069905849521383076460210798e+42495867", 75, RoundingMode.ROUND_HALF_EVEN); + t3("-5.088e+875712901", "1.4199149740929254e+2656459117", "-3.584e-1780746216", 4, RoundingMode.ROUND_FLOOR); + t3("9.2e-326014121238", "-9.07e-76", "-1.0143329658214e-326014121162", 14, RoundingMode.ROUND_HALF_UP); + t3("-7.22327739417772967251812419997120919619633699046547e-6186894660293", "-6.3769027162794938112644712016423387e+15531292765228", "1.1327250415374127268627640555328593529976903962e-21718187425521", 47, RoundingMode.ROUND_DOWN); + t3("-9.12342611074207276438290905850859777332891323899289165355751e+23642610836", "6.638794680948338252998590908e-512696438889772", "-1.37425941743973470637312280491167133324e+512720081500608", 40, RoundingMode.ROUND_UP); + t3("-2.718876507122563373164805019732402755726e+610154533", "4.308847138979439886664436527015146639e-5717273", "-6.309985987960889637562597121517139258568481214838008e+615871805", 52, RoundingMode.ROUND_HALF_EVEN); + t3("-2.95e-84395067694", "-9.051e-25", "3.25930836371671638492984200640813169815490001104850292785327588111810849629875151916915257983e-84395067670", 93, RoundingMode.ROUND_HALF_EVEN); + t3("6.12234136045360125959997290809070858536820218876929808e+880", "76.92743310785533857019259359198418220218", "7.9585930702638079165374686911356231401285147e+878", 44, RoundingMode.ROUND_HALF_EVEN); + t3("6.4140648917e-84014232852473", "-5.510e-848230403796", "-1.16407711283121597096188747731397459165154264972776769509981851179e-83166002448677", 66, RoundingMode.ROUND_CEIL); + t3("2.623435946859656088898662e-439110203108669", "-2.59934167915826734419163896376463735432272483690964181443e+22771179081", "-1.009269e-439132974287750", 7, RoundingMode.ROUND_HALF_DOWN); + t3("3.77771400014986649e-3640965368", "-7.768388036705130880554826e+60288744811328", "-4.862931643347902095997739979134e-60292385776697", 32, RoundingMode.ROUND_HALF_UP); + t3("-3.7190486e-9449640603576", "3.010673196779523061481248096425808318766627214198e+460955994", "-1.23528804254749956038144330221809830464007779452844731e-9450101559570", 55, RoundingMode.ROUND_HALF_DOWN); + t3("2.62926579885660625e+4862548", "-8.59856524321313877484710204275252176986556420841500574858e+4819840", "-3.0578e+42707", 5, RoundingMode.ROUND_FLOOR); + t3("-2.524950163943407096544e-866668", "394.90557961", "-6.39380726511130060491271669525652058689584236538105772650417477852e-866671", 66, RoundingMode.ROUND_CEIL); + t3("550.4642428428653", "9.1101038960828308023431523605217648626593940842806e+17458828824", "6.0423486836364e-17458828823", 14, RoundingMode.ROUND_HALF_UP); + t3("-6.8e-38", "8.9551e-1822287", "-7.59343837589753324920995e+1822248", 24, RoundingMode.ROUND_HALF_DOWN); + t3("-5.447540e-28798686244", "-5.345151786051220e-306831268640896", "1.01915534264452015382856476e+306802469954652", 27, RoundingMode.ROUND_HALF_UP); + t3("-5.024994880550e+2137246", "7.895448984359022572465424e-386506976500376", "-6.36441941491177264370878071531473745226066140771862199179510949585079669357392134354992036344e+386506978637621", 93, RoundingMode.ROUND_FLOOR); + t3("-6.08564742269871323619829704490073949296602829e+19025916382", "-3.6e-43810970160450", "1.69045761741630923227730473469464985915723008055555555555556e+43829996076832", 60, RoundingMode.ROUND_HALF_EVEN); + t3("-7.3315478778634806938360668122298015018709306244776522955182e-371912096", "8.91746537243695600952885083953e+2702", "-8.22156e-371914799", 7, RoundingMode.ROUND_HALF_UP); + t3("9.73260146343212982991740729169222462263658685696162754956027e-22368507555", "-5.41457945052064335762744916138190772711113115303334672e+2471502", "-1.797480589650648399009368412431136314816546487012269e-22370979057", 52, RoundingMode.ROUND_FLOOR); + t3("-0.00009077766680012965169574", "-9.864458426424591130875595041492160946022032e+901238013227", "9.202498796787199549471832328e-901238013233", 28, RoundingMode.ROUND_FLOOR); + t3("9.781679164322202110e+9597", "-8.641207387556310909276425467620158738317e+729052237", "-1.1319806047483846773794769631121259324922385e-729042640", 44, RoundingMode.ROUND_UP); + t3("-9.8262134872771847603721e-884906848471488", "-8.40191682826069e+27069057754468", "1.16952044255256e-911975906225956", 15, RoundingMode.ROUND_UP); + t3("9.68468476476931178176001218812114617858e-9042", "-4.351426837802378087e-3922", "-2.22563428635293669783342668520694795499991487062628653382642814248e-5120", 66, RoundingMode.ROUND_DOWN); + t3("-6.673881203135270007501032890781676e+197", "-8.6130247e+5574477675", "7.74859173e-5574477479", 9, RoundingMode.ROUND_DOWN); + t3("117689.2203859123922039850242", "4.672903266480619296129041823997391978768000422443130e-159602702578", "2.5185460445995839266693837903e+159602702582", 30, RoundingMode.ROUND_UP); + t3("396858.23797993900145", "-1.1351391313670681683112832752941408479772854e-231501514616", "-3.496119788435058122899220192e+231501514621", 28, RoundingMode.ROUND_HALF_UP); + t3("-2.3747155e-943", "-6.252178142e-495179", "3.798221109612138751500084816e+494235", 28, RoundingMode.ROUND_HALF_EVEN); + t3("0.00840506301611388376116385269076480", "-1.9099e+8284284716", "-4.4007869606334e-8284284719", 14, RoundingMode.ROUND_CEIL); + t3("-4.16692746895958397175358959429449784278165607548e+340931500", "-5.717754287e-87", "7.2876994354822018810434929665498895244528301212045420656951011088455e+340931586", 68, RoundingMode.ROUND_FLOOR); + t3("-9.28389313299006329424285545887e-3925", "-1.97555681198482273934125909e+5297566071", "4.69938048689302234899586964124151630183496133717869393459635207158684409706031e-5297569996", 78, RoundingMode.ROUND_HALF_UP); + t3("2.59540333821819953654940688e-246897272142", "-4.9195761293882986672634895403121365796657943e+725", "-5.2756645490531572282469478803463890191217367723692684945787639199827846880769858499841263419547e-246897272868", 95, RoundingMode.ROUND_DOWN); + t3("6.9395240e+2278489037670", "8.95379929543273201870087684015352822705e+2686557018", "7.7503680516267555657047785558173852295405088184624218108643043e+2275802480651", 62, RoundingMode.ROUND_DOWN); + t3("-9.43461909417195191736082247633595980338e-44506", "3147834.7690127", "-2.997177357289012066606108455208457679374102048833411593840812447280717383143e-44512", 76, RoundingMode.ROUND_FLOOR); + t3("8.0096127e-8067961309810", "-2.4861943641101754193763318966517820013802487677849556e+28737902", "-3.2216357721761189414886402877242567323592454396651199043193694782512026268261382719200753e-8067990047712", 89, RoundingMode.ROUND_DOWN); + t3("-3e+47914044916", "7.39032227496857769766000637292224305e+3151003", "-4.059362891603743292519367648173262662931001810631877144424048461001341365751815846570031160429e+47910893912", 94, RoundingMode.ROUND_HALF_EVEN); + t3("-8.794913236e-82269964025977", "1.99104078230641940199220131540233592723e-4032340415018", "-4.41724414394565158181607764560046776038373016888813781624061504013452734e-78237623610959", 73, RoundingMode.ROUND_HALF_DOWN); + t3("1.41968105004406037270658e-9756", "-6.45346706e+86374", "-2.19987339649341972887761202890528e-96131", 33, RoundingMode.ROUND_HALF_DOWN); + t3("2.42668305687527863637722979736247525202724198845375321e+21217079928", "-1e-32283604", "-2.42668305687527863637722979736247525202724198845375321e+21249363532", 75, RoundingMode.ROUND_CEIL); + t3("4.5960279e+6886974", "3.384439396e-9878", "1.3579879448962660639115193658500954289210738167403131127008072e+6896852", 62, RoundingMode.ROUND_DOWN); + t3("8.20302760909992674523110835076e-3190635561", "-0.00593408148019", "-1.38235843853584542319248668631e-3190635558", 30, RoundingMode.ROUND_FLOOR); + t3("-1.446056788247471381740e+2539", "5.8746691249772632743e-204100", "-2.461511886855530870086019294051905971145867015553516078749595608714911097966096169396492e+206638", 88, RoundingMode.ROUND_HALF_EVEN); + t3("8.32020591493941974120926689522320401504559e+824", "-4.13656016816944653681263343833701120610642568125182e+36485506", "-2.0113827859e-36484682", 11, RoundingMode.ROUND_HALF_DOWN); + t3("-5.887058727145392610657250e-2197", "3.78194900860346014025947378458706e-8294267936", "-1.556620333524611679761108765636991252383460065276994885579337256044375049207119109e+8294265739", 82, RoundingMode.ROUND_HALF_UP); + t3("-7.6723323078147436832774113998379e+59830074", "5.39266e+7420616030062", "-1.422736146505573072153151023768956322111907667088227331224293762262037658595201625913743e-7420556199988", 88, RoundingMode.ROUND_FLOOR); + t3("-2e+520902", "2.096256902873932e+850706884", "-9.540815332596088537412307660142977619618078320312637700439893846e-850185983", 64, RoundingMode.ROUND_FLOOR); + t3("-5.91755623713028987336574603543834970e-772733", "-3.396837696660708e-743484", "1.742078004771201e-29249", 16, RoundingMode.ROUND_HALF_UP); + t3("-4.4261203993578076655836e+787568578554", "-1.09996983956065779587019620309266550937270720011352e+59408794921163", "4.0238561460245650861475347988199477648605072309975919369249233277670985289138655590183690383863e-58621226342609", 95, RoundingMode.ROUND_DOWN); + t3("-5.461625333592658715783389213939486766866733272971751e-8493558571126", "-7.04460022714407607499e-639442", "7.752924449208716784930185168011748e-8493557931685", 34, RoundingMode.ROUND_HALF_UP); + t3("1.615766164740165668562139888290618789895261e+863655", "-46413982727354151235644606048354659364.730096733328316079589", "-3.4812055975276420840108237250312e+863617", 32, RoundingMode.ROUND_HALF_UP); + t3("3.09253256167906696109040961441832872372394818118267e+73897720", "-2.0e-95602765", "-1.546266280839533480545204807209164361861974090591335e+169500485", 54, RoundingMode.ROUND_HALF_DOWN); + t3("-9.26915652715987334687941849664813e-6847", "8.76573855902163943304395e-34831559", "-1.05743018283611932638742e+34824712", 24, RoundingMode.ROUND_HALF_UP); + t3("0.428254", "6.08587970298546333861572751514e-437013115144", "7.036846288465372292244370006092052112772901167702223e+437013115142", 52, RoundingMode.ROUND_DOWN); + t3("7.690393e+80", "-7.604559818520535e-58509606603", "-1.0112870676972548059475609571154e+58509606683", 32, RoundingMode.ROUND_DOWN); + t3("-8.7801511725350736391998727179413695428856e-46359854365", "2.656781732693285651736344541155412284165970972485e-52097919051350", "-3.30480711474716594625752093810676249541657e+52051559196985", 42, RoundingMode.ROUND_DOWN); + t3("-1.27344496055459765937e+271188", "-8.32335945788509645225021195304781189636479e+3554126038", "1.52996511444451123611236024918713725931624703340785401601483423e-3553854851", 65, RoundingMode.ROUND_HALF_UP); + t3("-3.65362545705027531865430033750885949341477432262361470e+31405568", "2.255132753727929182126744495e+730457", "-1.620137639795491831777414566302950142374935254948e+30675111", 49, RoundingMode.ROUND_UP); + t3("3.13885105182978617280583072515316525825875033e+332826699874507", "-9.338570883214e-738313", "-3.361168524695618746504239051218405301858301969629363403151813526982628773e+332826700612819", 73, RoundingMode.ROUND_HALF_DOWN); + t3("7.916679560335212649839057098992815521111e+719168799789", "-9.3934455354681629e-26112", "-8.4278761509214954487660555758252e+719168825900", 32, RoundingMode.ROUND_FLOOR); + t3("-7.4050648550717e+50457757", "-6.2446992145755164825827251414468888532118248382938e+41758863714", "1.185816097881514920689222170540626820579389457787832291775344955065933067404e-41708405957", 76, RoundingMode.ROUND_HALF_UP); + t3("-8.929984835073619447381098534882495124442070497803e+58", "-6.587552599082064547988352408462234967908817169753363929e+31478", "1.355584596974293397998024892163270225765679420243e-31420", 49, RoundingMode.ROUND_UP); + t3("-4.60e+3009732668", "-5.937435922938207873836812582485666474437571935215e+593", "7.7474520309831614048631736455137088e+3009732074", 35, RoundingMode.ROUND_FLOOR); + t3("-2.115852508924661360352573897314e-83492", "-3.615253334615070879769043191528101492811972e+633", "5.852570520206556541343590796945702040066516674420075510945e-84126", 58, RoundingMode.ROUND_FLOOR); + t3("-2671969484816629153.223031082473984381206", "-6.958622418800189e-6567179660", "3.839796620661208652769876288190432072799554268055501997751724529e+6567179677", 64, RoundingMode.ROUND_FLOOR); + t3("-9.80911731960529794611006207152828152873100802686147229842508e+6602461063", "5.3006989098e+8373928", "-1.8505e+6594087135", 5, RoundingMode.ROUND_HALF_DOWN); + t3("-4e+4572149243", "6e-202556705641", "-6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e+207128854883", 96, RoundingMode.ROUND_UP); + t3("-0.00277841246858389626011775371318910", "1.8029407e-8536873", "-1.5410448433406025279243813804797351349e+8536870", 38, RoundingMode.ROUND_CEIL); + t3("4.7366313774491542565994e+38590", "2.406574840920790361677323136428733366735190265835e-255", "1.96820447754570996174179187399056431789444073676092111382443598571041094824984995983407986690911147e+38845", 99, RoundingMode.ROUND_FLOOR); + t3("-6.8793e-250", "5.6614239616418945369613535047947337585454417557391441e-22075572042", "-1.21511832475533308422685002589067048097909869932735928124654100237696191523886602e+22075571792", 81, RoundingMode.ROUND_UP); + t3("-7.9691e+5609", "4.7681728586005155851684044977835802380288408393935015223658e-824", "-1.67131105274966347e+6433", 18, RoundingMode.ROUND_CEIL); + t3("1.0163534771988257390384167798155678794959252153462087931e-7715", "9.857359701875963927124446349477232948130e-437", "1.031060555703777856579890730713937713166817989375566680949e-7279", 58, RoundingMode.ROUND_HALF_EVEN); + t3("-9.7119632239e+8914261", "-7.649129054596519809384883678662352318e+253", "1.26968222847068850083141642946053701890587434551e+8914008", 48, RoundingMode.ROUND_DOWN); + t3("3.82363000571632324625934315425582292e+9180", "-1.80015752902682364919840204196030449769953e-99958", "-2.12405300317e+109138", 12, RoundingMode.ROUND_HALF_DOWN); + t3("-9.98558786096530479519949931833477023441119520278653470635367e-9264430688990", "6.171492751155687501557785e-17356584223488", "-1.61801824349471711425087129591403125504623734104116821827862506496897452602816398117264777747324619e+8092153534498", 99, RoundingMode.ROUND_HALF_EVEN); + t3("-3.12121494951535774296813228065142594e-478824224292", "8.50191771196677938994457457569983125317092894e+3040", "-3.6711893189957913554e-478824227333", 20, RoundingMode.ROUND_CEIL); + t3("-3.905945148e-172570", "8.89926102560e-12918480850270", "-4.389066841352320025379703702395017431e+12918480677699", 37, RoundingMode.ROUND_HALF_UP); + t3("-5.836899e-182382713103", "6.38e+19389700249", "-9.14874451410658307210031347962382445141065830721003134796238244514106583073e-201772413353", 75, RoundingMode.ROUND_FLOOR); + t3("-8.594943581149000619660143727800023854493343961823123e+67054", "7.72e+2366970549", "-1.113334660770595935189137788575132623639034191946000388601036269430051813471502590673575e-2366903495", 88, RoundingMode.ROUND_HALF_DOWN); + t3("4.422365172768345093341e-2474975", "8.142617173685931298235094554798454571552396073414454172878e+9459870092", "5.431134828565771941340664370852421405016220824937189375783467328373642722704174130143294674583e-9462345068", 94, RoundingMode.ROUND_HALF_UP); + t3("-7.510777732366610825653301072159051623394773695674094995e-3800345125", "-7.54354768818769002580340046770133074466784814214428947940e+5562", "9.9565589598215265433145400278831188933392065e-3800350688", 45, RoundingMode.ROUND_UP); + t3("6.1671423e+660", "6.873408012860653767381e+81013597436", "8.972466480181041945852762170983402582389595248407929170371790700151282177e-81013596777", 73, RoundingMode.ROUND_HALF_DOWN); + t3("2.02905811715297381814621675599006739725025165e-51", "8.306267856406390279349177689134436968649054e-88657834", "2.443e+88657782", 4, RoundingMode.ROUND_CEIL); + t3("-7.30e-114863902", "-6.58150691865777045498e+8689204889449", "1.10916847618975970006982958021532537105975629156199373295733575150771e-8689319753351", 69, RoundingMode.ROUND_HALF_UP); + t3("-16267894490157915816.761057622507335134", "-2.6263660e-57826799", "6.19406986313328599927087756333555000864312133e+57826817", 45, RoundingMode.ROUND_DOWN); + t3("4.4960822e+39834", "7.33025617737765e-5481077978", "6.1335949129249167141534547767142719606447193876923e+5481117811", 50, RoundingMode.ROUND_CEIL); + t3("11645961997440560519.2779", "7.61704147340133475340398370e-85", "1.52893509088905360245309042010759347198609170499739373773404875920893e+103", 69, RoundingMode.ROUND_HALF_EVEN); + t3("-3.200086468434878624724682260146719593251199021453006e+804185673862240", "-3.263005e+866674275403947", "9.80717611047142e-62488601541708", 15, RoundingMode.ROUND_CEIL); + t3("-1.195589034688348019231392777232e+387700847749", "1.2e+193718376381", "-9.9632419557e+193982471367", 11, RoundingMode.ROUND_DOWN); + t3("-7.7e+1775502", "261635432706832846.96155773903613920484498458287709539496460", "-2.9430264549175137e+1775485", 17, RoundingMode.ROUND_DOWN); + t3("0.00000546080760524465654739580663090511882514661697598240953776895", "-6.157849021385171979316104052444661102794551310655966818e+72472889810", "-8.86804399e-72472889817", 9, RoundingMode.ROUND_CEIL); + t3("2.8745074607815233067829206777233019531e-3845392237116", "-6.551146743e-662", "-4.3877928148273861780948366061e-3845392236455", 29, RoundingMode.ROUND_HALF_DOWN); + t3("-5.009861751554417108711752976e-74", "6.4649177022317048296284966530107e-89", "-7.749304758860272920489918385655728441338390550598260504191304956289874399458870815138e+14", 85, RoundingMode.ROUND_HALF_DOWN); + t3("6.6207966524387094348639971078e+8382394", "6.7558172830535640711220000733714793906928341502e-2246070", "9.80014167796760391792195206447498138446966736663067272302432667301486207936e+10628463", 75, RoundingMode.ROUND_HALF_UP); + t3("4.4513588705101755662795e+635486688804809", "-6.556877492876530213198836587854853e-4323337939", "-6.78883946717959097065518224297035382056172928446181486912391244568509234794436034526869106696e+635491012142747", 93, RoundingMode.ROUND_HALF_UP); + t3("-6.16322132e+994316265", "-4.3969e-2987200797", "1.4017196934203643476085423e+3981517062", 26, RoundingMode.ROUND_DOWN); + t3("-8.332e+2033", "-5.24183781e-7534", "1.5895188485429311671129328589432262498789522829589418372332279392e+9567", 65, RoundingMode.ROUND_CEIL); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalDivToIntTests.cs b/DecimalSharp.Tests/BigDecimalDivToIntTests.cs new file mode 100644 index 0000000..80529e5 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalDivToIntTests.cs @@ -0,0 +1,1036 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalDivToInt")] + public class BigDecimalDivToIntTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void DivToInt() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 100, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = 0, + ToExpPos = 0, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument dividend, BigDecimalArgument divisor, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(dividend).DivToInt(divisor).ValueOf()); + }; + + t("0", "1", "0e+0"); + t("1", "3", "0e+0"); + t("5", "2", "2e+0"); + t("5", "3", "1e+0"); + t("36895644873019582.63", "7.718100793996604914489691733070282", "4.780404643292329e+15"); + t("64651655727943229435811115735289253096959446020560124180.868366968824689", "7360719838491229774079511358613.90160374119", "8.783333307954736831172335e+24"); + t("5732393766279203252222389165296003290.63682245014985462079498107494454", "604416262214131.2554110409995038281134160791152213968353", "9.484181886966409051084e+21"); + t("54718351636204349658226278525013052787257592035681265.6551696525453015879627795539", "1733778739362714568517963678482776130.326376987489790108496", "3.1560169930516731e+16"); + t("3624502246404620098804280609381269252487775685790155421714.37", "7349043547918880804458209119523987375.3", "4.93193736405469396185e+20"); + t("687735627911862004719398564058596925.0620935155879", "661665211998060549450363044996.55374284667971784770628959", "1.039401e+6"); + t("66572157335610232175829083999736410997178640962241864841145.38440153149463694336448032", "54270243268146994464714529492351249645.652699808036888630134152758877664710", "1.226678808250038544511e+21"); + t("292732942971276303164400.91406459997909437226470385768809366689", "198192438228187.19331064172815960167534", "1.477013682e+9"); + t("59513888891694622872074991579832352747.76750953213187581", "1034906258845141436777187279.59996358842591625637494529316402", "5.7506550359e+10"); + t("1172999106594898633290312234824434379243.4801860622", "95738279960066655037917155155088.714077938577519507", "1.2252143e+7"); + t("761675922203981329104560243.9835854112143", "42099630209991.5141510026559149", "1.8092223575474e+13"); + t("5809679691291868349384510.869889159148782403055857608", "968063734.6587296392560462419982700451", "6.001340080506112e+15"); + t("6448211701617320255603371664198.5340", "3368801816950100745696.3161966526612111", "1.91409648e+9"); + t("296307971666440825302127543787554134590.8787941480", "70132070748.312321207262275", "4.224999611516123207381673265e+27"); + t("43316267360881134909526915727057444938633273740017.8743", "8449981286489717202695708883073303677909.127", "5.126196839e+9"); + t("819020770378245595322971.46148843954356073808", "2415.98170292066380708174348146592639105118", "3.39001230592159274458e+20"); + t("83927285454555017922297698666610175739865729347545202310339537.3278652647460600458", "910726592947247598215539743673389743548.91620652260659513559851122880", "9.2154205339446339839657e+22"); + t("14061020300091766687182333004064.977713896865594430775781461672", "1603155675.6098707422715529327283189", "8.770838985891179036316e+21"); + t("884417829852997942464829140829902963210303.998238049169987867", "929333994109662294460328961115.627127094639098273434", "9.51668437245e+11"); + t("36341626756628760.847811686627543419", "5675392302633600.96", "6e+0"); + t("1354393047076228971811094773.75142710111809116877400907981", "94010.663", "1.4406802418532342143051e+22"); + t("2323899790063830737512.4", "863478123123107.92481976439554835777064960348", "2.691324e+6"); + t("987618440115997794400749.66886993666234", "22675878469307144.8162244378033455161783123", "4.3553701e+7"); + t("10311755146414307104995151982206075782.656417449", "26423572369798720085998726358.52329618044", "3.90248335e+8"); + t("85825439910365248211723523342206879351067408802952823475398167070694.74877359955732", "9395294670590615962717315621184478652114.656", "9.134938596339949352358380082e+27"); + t("3887675240713332987390.06624570539414391734158464", "89243744783895207.1304749", "4.3562e+4"); + t("54189806660036935939439.080081712985235676947745502890219", "9525065684586.21811741894896243303", "5.689179314e+9"); + t("898745419120337851777961502628920754162493.8824413149687522658714849", "170677067198475739114538472.94204577", "5.265765541162077e+15"); + t("12657400526086334981940854550597105983225457.660202372124944932422", "68233473796487276154104883270147087.72180051463205586927918446190326023184", "1.85501335e+8"); + t("6345632808902376230689521063946963315827012597069.0529159662416267", "73258270548407389105574043380.7057", "8.6620019301565783647e+19"); + t("63844115443924159839.5354397381645502603251748", "52081622.69982819025995364", "1.225847278451e+12"); + t("77617359154359399979637128706216412797126694348836163.2512945227699082", "718837603415233008062911431359648059.3372340819820519509408068646262423172349", "1.07976208792633395e+17"); + t("668732048375068249003372962771883048177204902854.96487726443895268994951328539", "8871569348254537734994873755556956.3636585318947549817", "7.5379227972403e+13"); + t("7324307406251123088063945918653711585851876699.033332143835", "245602869892404795648901.144816419", "2.9821750085655759570877e+22"); + t("633680500600797246057382.84246458752199925433851961230831876420", "912114822400474893.4436760573240757178", "6.94737e+5"); + t("314980768367918935839846907821.91091077739529142726", "3947642548649479218168.675916915139048700595146576", "7.9789586e+7"); + t("766601157334780.36684250893", "2236910563.0047379551661118203782187993331185216256", "3.42705e+5"); + t("451179146035244376593938188389561517876737396268.3722082", "79787399441228066679210.54567781854364900", "5.654766907995114695463082e+24"); + t("188304063671200134806361092560975924383338052875254060764.641132643293192088709181800993803516908", "206116970278546727444881787333344078.52121483611191414235001972", "9.13578651077229552158e+20"); + t("3026382628170838932467292571682.1146045206189752690464743138046368419051", "1702246654223795785.80918175927260070027874366225531172", "1.777875503917e+12"); + t("483178392966349.6198121233391337620537347847685050911", "2747037840.81789827", "1.7589e+5"); + t("4023724691049830855319641297898623523.4200255290132117", "26383494434081.792819331307675", "1.52509164436233477471225e+23"); + t("6877796550342118800424967.1290389332492906987967", "30648658827696068.217878734991427414542918900", "2.24407749e+8"); + t("719011971274811849964719.809683493988763885568", "9.89194861037076", "7.2686585787657318957512e+22"); + t("790578656386098075660101307.104299875185979641661080042756754480274", "787268.019818325211180976689745004412384010257", "1.004205221709039886117e+21"); + t("858494198854556721817549727788176491362841015.84030009705645443659557259", "78790750228395754125645617606916509.017", "1.0895875421e+10"); + t("869646688222700738547643533332444218371582088896608051507.0", "1281647576220391717154866999785857.626735735318666", "6.78538082042263828610696e+23"); + t("66469857783722559995.211087204", "2172489924203217901.75259287934585", "3e+1"); + t("51984084611381601914008899838258105152.42433636049132506114610098605444573042", "9569816310.665266871464705", "5.432088028006026973165219661e+27"); + t("414951.2936961", "278516.75236654920204095", "1e+0"); + t("27889165636159229278421958574241971.7173321250321597407510931", "608780684433367768970.0958260198328624819790316963233", "4.58115152949e+13"); + t("31325348586591798934669006781575695118.72248093700625749849", "790477742343281400653.7740497194731301702067416467193682", "3.9628375232592083e+16"); + t("477297820763430240725102689.193874438652153546852540937610726", "50977.4033214710912988", "9.362929252271229984862e+21"); + t("13536773796609199399681306836634656854430251561095182562440.479700785161646843522660227938435", "6899697641187817329320644306067456122618.255451005721950718445", "1.961937247192005407e+18"); + t("2381373889138322049844907125209701606782407040.2330330510", "59573438790896784513124463685.01873763149827085", "3.997375235458477e+16"); + t("15009874504474088125494995090180881793574446435649285.95399729241871266079155820", "7994023476339887537558053452485.039756512235934240847094702083", "1.87763703082674093196e+21"); + t("149321894113620366433430659314130451.761009381237977752848331", "25875774828915149345499986378863322.0688818323564091828578268222349", "5e+0"); + t("493939976672086336405697.925291445190636467775112366908", "813926251653843673127.91682695105099073346580", "6.06e+2"); + t("963855060561684717831949176179796196.178851705050651576", "5674764504641093.4230471198398883271513279954", "1.69849349655549233494e+20"); + t("78579569768408197574.74415", "177668308997.891532298623383736397428619051", "4.4228242e+8"); + t("61108686571149946806212728223514943268914773.0", "5323064826026393379647255196088.928594643315913887175120559775135677258", "1.1479981658755e+13"); + t("1382828795086651444895299842.0701840449690096552", "48341628323.19524099674532", "2.8605341670362056e+16"); + t("141044777022706624397071865824451960354988292245534902.103835164801884160519466008814448546356", "625516891024850859709023021152499441.3940965259710380354179927630495354", "2.25485161226610464e+17"); + t("3383909955260533298806816503965026713181287831421002006689567.728388493726457139215233375717342848657", "489326232373007421141886950266739.662366358", "6.915447673528812565401505757e+27"); + t("92164023674341088.45012071227433289171688115770593447138", "1675199316534042.27750136403224942402891755971059965", "5.5e+1"); + t("4899344037352161457244324553904105556058425616763379.109691688138005854234064606", "562503659482979470924953274636537.3581621291285722942485", "8.70988829095859129e+18"); + t("512036851746554679379839026143992368083802967.057532394186266483130002476", "25468746832409733351.6898012461168020860537046999219826224", "2.0104516924836389935030372e+25"); + t("21178399750404.078200242066551371801579539042343659263", "806447904.4971825664", "2.6261e+4"); + t("4395521.80197383578918426307715499005", "2.19042050141541184092988028602", "2.006702e+6"); + t("1293749948117192138846929064803097702233184539371626321.3", "9894614327858326850919726257818672366.67012981899426520818538052648708", "1.30752943495193531e+17"); + t("950489904629218491182882.385", "50.055435994820274365748051876345109893948", "1.8988744893313385180963e+22"); + t("6721462722883.9311966354726787087082601741413325501", "25867.234256139566", "2.59844661e+8"); + t("9413983486163527516754421885066.479846304", "6633314177361.5759471", "1.419197588784792426e+18"); + t("7002240892739457.282399", "89015591879.3352", "7.8663e+4"); + t("17753832635768617659957602186770835847249564068657452538085.314", "5414272225835478934993841035541.91854", "3.279080159850849623699144592e+27"); + t("8553729051867653860352315550061555116210505978.8606644", "532148649404416860727903449060162092.468154664085308852337024918613284774", "1.6073946746e+10"); + t("8536876691971494129815868.6897706141137069461978", "46996438914351984548.0", "1.81649e+5"); + t("6738142388415833700.472993767579581588927912315304", "9199801.9", "7.32422552317e+11"); + t("826273980599097834993195211608140757140700093970401848613162.236180591377571758304", "8351332797745115916334876517053914.483416162382", "9.8939175411880868510041549e+25"); + t("487322874591251153754954926588608421417109463092990.1011277861883295118105474283076435", "91582945462431373829924.9", "5.321109428514263331756120898e+27"); + t("8433481464909454370642509052001964899280.2228783627688673301539647974222391298082", "30266532928398398232484872798443265706.1822461140566", "2.78e+2"); + t("65686681801982542.84396075122813", "957582365.894647770624411634929499145", "6.8596377e+7"); + t("7850604940208544890.9247585846806664911793", "1155040930918143.1609220900458103474609331025000", "6.796e+3"); + t("39392511281642750969008458658939595.80913687142", "5191932341769498710256865324795.288", "7.587e+3"); + t("9558675981301105859991877229873598.5154339956398358275171123983825685256", "231734499604794002120530879887.26727981104", "4.1248e+4"); + t("476674914347542301687791458999.66939117704198747838897927533336612", "3857790966727905.18069799747", "1.23561623337992e+14"); + t("31757061510157749074255570260815.3141745252309571619347", "5558718183494207037354935.115718972099325505519", "5.713018e+6"); + t("55815824571357071724508377429858590197270365301036620.6499621562531443269376352974542", "6344982556836106788319067366422.148316894830679515811039239944513903", "8.796844446990780720846e+21"); + t("55247716219685823858100730862446011271407657968442.2388", "2767291514389721456022328296.4650633073505614236873593850598833", "1.9964545091256768937684e+22"); + t("6761209.130763539353969547801764942251023246540", "1.590885201", "4.249966e+6"); + t("2405606665780351532451871199611687931502546956131339306340566.0", "6825669102701242156374198698389735.1059222967206052225797371246792243831433", "3.52435289432407215761911266e+26"); + t("877076167194583592693.876598666861", "6190254976506.51774", "1.41686597e+8"); + t("79069661333784501383656688613214.257990", "142518071705.177741054004263011", "5.54804456640089858664e+20"); + t("950777525591301850271871918739602342179.4975192615224", "16476852885091323001963060603651240434.4840677075888597330272", "5.7e+1"); + t("26551682789560636085042330404191471793442124027063025992124766.6037274321361454227147709963325345384", "774803664250584587578851487141713088.4957299207587035513251688453163648", "3.4268917423412408573383842e+25"); + t("46468371103211225997.1814005593644996981741", "18137114254170450.82878438255568214357155", "2.562e+3"); + t("8701396622178709820158605599474684817.7939194512400429727126808819", "5269807610180215.90684341342722968626667120953", "1.651179182589009367347e+21"); + t("522080413680928259313223.8350838672113571792330389637633", "967093098979306539029.5142749231584391", "5.39e+2"); + t("631057279219476761359550973233448182657555784618785135880254.4433511291602483132340946422059", "3739479405111145117383015003991123678215.9094479375490407161549872537597", "1.68755382997147546666e+20"); + t("9340382392708974624402664792170319874649661502.613864741909659563936687835", "94789964379299654069146.0880932655391611156772128371364143791387", "9.8537671723703469565858e+22"); + t("96144558384720050671049376570.336225113556797167876983377", "128639182834148126420949170.21703913656313462457355167212385179", "7.47e+2"); + t("44590415926988658828909817888389.1677103148", "9586443276004126152513920155.356137636194947762", "4.651e+3"); + t("9215124017686364502116144876460066.07953", "389873392412923003312746.50237370928673677566574783327261160564", "2.3636196255e+10"); + t("11561994696060972430401104454693593439978392.61858304753448649547803907017833175", "7392485698765829306705400315.1", "1.564019893605102e+15"); + t("3649070.164", "4043.453844671869616230574177458607576071808", "9.02e+2"); + t("28753538171328476925.0017010314596831751138657770", "49897.25884", "5.76254865292886e+14"); + t("59819348348776332442992247927722843864528890.75097663327918991715", "573076046726374761677061258.316253554", "1.04382915130525656e+17"); + t("47609439462721678715653967619481244095905572670134015715.65729840144", "885323310774998183628174741626809.26089705926186718635169318481577351", "5.3776331068302177444681e+22"); + t("298236340363707692048708241861991295188088551.4221467040362905598412803266728698", "463565019023489856620642648.3290607854102222131745220674", "6.43353851401361676e+17"); + t("54929430658455389942886768773694574289.0796444733881465290886813482232", "44918151271303370631927846249206.32550877632482876046", "1.222878e+6"); + t("939795570873706469603035770969517140837.0641903247563112818840087", "1543654040561654608534472.791305843048", "6.08812302613974e+14"); + t("3394118249472724410996.60867940867996614427101453", "986008213590938059946.4278174507441549093044701878559133", "3e+0"); + t("3219025755604178377990.9595258558146826339702675765494335625362", "0.0061921662377979164972614769813413", "5.19854543948571621850347e+23"); + t("622531843497701836225.44014041222798344570830", "8748034164866276.4452753664305923975621872503904739881720", "7.1162e+4"); + t("662614977396838089149840859098991636538.2", "9397894691412111466054.4947143904863027853588236090636071521", "7.0506746367603179e+16"); + t("4578829625898584634467190705373383011906064239155.1185477334628882810", "632007407091540422974017864157542424182.34755362226514919952546271946914195931", "7.244898674e+9"); + t("916832081126482424615311749127.615921221158127735810556635102616644566", "8384.837472180636635629849053055370895702252", "1.09344049204097784978620853e+26"); + t("4954.23611284032403311231075118740", "88.498212500550930", "5.5e+1"); + t("79610898256319046500444146615.6864031929205528585105087035692", "80896642883513608017325.0294514915892271454512031885360702636", "9.84106e+5"); + t("61808853465770082537520295307.248478033009783289862114", "955641982486404001.613606147559792147544273131898", "6.4677833957e+10"); + t("8110549327848459643976.8303173991466", "30737279.373498300268975735386980334643263", "2.63866857872963e+14"); + t("5810839929023546534104132044.1", "84893733939290740.4809653570525806400882710060", "6.8448396122e+10"); + t("172691117791905665518300359308210758886006820428.87539418140101206249892865907830466693", "660835601179363510263672967172874227337.06", "2.61322358e+8"); + t("3279456955978403711154968614687388316452522612700723465.149695243983336856328", "577588631529180012819465736405090.8861257433453983", "5.677841939679389639385e+21"); + t("666161807347337989311252336805857030347518.318052095204396913164161131565370664", "872761809105274731.8877136229902994508991839235", "7.63280199015885067221879e+23"); + t("8275938190286405120150409214247983637248944.941738387004126831286000172841", "12096490665151859987460112.926843", "6.84160259316209586e+17"); + t("7695708448947073283007565247678919802765643921.6229", "20676645248620766235122033771379805992.5085467726850799060647673284", "3.72193281e+8"); + t("8794449979449374744464818.38092335698594675809515993704042518861", "87246163726525037961.18644647", "1.008e+5"); + t("34236691816994475206275629492066992140.1738230523709146", "2129216496065696627150.95546985718524552965839741619272227", "1.6079478944605221e+16"); + t("4853912271361439786989095336830718.6076759482394948759", "72348458301853642853158792417807.55445527491", "6.7e+1"); + t("366715548457842547998161006130835982863471526.1874", "592192383096570032979767219778531853.99651", "6.19250701e+8"); + t("252654835644880329287257339.0192092664921880441830937674972", "114583965.7", "2.204975487638235314e+18"); + t("15914954356187834913890394667884070882296058039272228.29247061503", "89211668928209478511971223318021909.25768471588110887949696377740", "1.78395433550233614e+17"); + t("60941262.9", "86784.8541488681791123390630463904486146686497", "7.02e+2"); + t("812940878087050080928021459149088335661916.37", "59149491291803059507480051333312058007.062712657891575524497489888510", "1.3743e+4"); + t("8593971316358957359050500.50716500974128139452230", "25290964518847571007.492624342212869491225663005554920112", "3.39804e+5"); + t("775472515891.0522315643764386165675035428537", "75451710.196830619592652514326721501715662228", "1.0277e+4"); + t("268761594453672559012.57845518051", "53032431321491.356897991306736326010290480785407", "5.067872e+6"); + t("619377812175076884453708563003062095749704505261.1547623731721222869788885", "89106640169384537277237056784847388168.868903457426831166694818279050214563", "6.950972576e+9"); + t("6978479696336.407750472510412676812", "93141102668.5857961", "7.4e+1"); + t("516436650078318840329669774.078824828754", "5017214.837481322761649964308586776", "1.02932935265250407626e+20"); + t("490631762562589558.665786505312776194035633603735834", "649155.033821223610", "7.558005977e+11"); + t("947869242801417639782630473107601572138496682152399.17956931525088166548167556227", "840790471807620355694329990198.9874", "1.127354881607528220077e+21"); + t("2564692393707169.216665682542053468831487490978977829", "323563220479178.32428957186821386", "7e+0"); + t("2067552564632662838907661952976372191277000771111345175.796442275947", "3381292480845674951573463021547.80115165450475391748410248580874894107", "6.11468122425055511343146e+23"); + t("70216186412133337741582965462.52439383368643519565826224295231457", "4847013501.817153511151121174556393162", "1.4486484592173958541e+19"); + t("60223297680959656543180144197075879548136208100.5879200429893598", "6610583797054930889.55336697264241489373263078", "9.110133012426168452797858087e+27"); + t("1100714749763916836353092605748.52655085", "779697712515.67699911984429463192045202", "1.411719865398201107e+18"); + t("79626424799554585294898673037572734444630623847083.669713990919063402455473", "3128504487858810656625667140003.174840434", "2.5451913241157582834e+19"); + t("6499560612.7645915152780064074524537175219032747797", "50307.1949994616624234103", "1.29197e+5"); + t("966011316836321370187257766888009716196999338557221680156.778158238236921197664814398230256191359", "358196212874876634005370496387309158.587736035444731188320341011", "2.696877527216525217891e+21"); + t("140971373374810910985007504309.42888593963", "431202282197312494293.70224", "3.26926315e+8"); + t("675794608397379290709048966424086.68028114190127", "1240347490080565.063897869467564696954714209", "5.44842968443854376e+17"); + t("836232084565440359935123668.528958", "7271445413139990104.53416630912543262333107860536", "1.15002181e+8"); + t("850358657575460995515858566.890400808", "777933377391397802395.254509486818479707392046991771632811505", "1.093099e+6"); + t("761818224703452918328839655440734786723729570416.4198584034818320201087492939538562770", "21346360079648970861757141531.562732730023110894118984", "3.5688436897949142043e+19"); + t("519514128427497.31939346721795747746", "9491421.0538075082665", "5.4735126e+7"); + t("102986940807998690465748208569646362.946274165446616106329669", "5974890620275324316992866746565611.522984821183469702378289711906920", "1.7e+1"); + t("6707587600519349898241892091.77518934590", "594205895259507615.538773903283415731263438", "1.1288322202e+10"); + t("488150589181424309139864207010310632454374146702168720363.1847512517764753412429149", "97003800941413717490725115964913798.62744", "5.032283111011774364885e+21"); + t("6799686285593498192221915896.212905290078445310739698403963", "78132247733377074935645330.296657617326379526947267653278984790", "8.7e+1"); + t("7108556948604887166624271892.627550941216360716459572502", "42805403698.0650970130373336924750741731549185397", "1.66066812469431525e+17"); + t("912137671512451054186447604601690.5574512047932493751657398", "1263902716779730.336", "7.21683448736043839e+17"); + t("704346766625443412065178734792137256.31026366", "72396278074342368559021.9", "9.729046649361e+12"); + t("25627773207438202279.636045104992624487718634", "756649304601923860.46033906136178", "3.3e+1"); + t("1880709.9929396954456209927640755693275", "52.21986114320", "3.6015e+4"); + t("1041659292054230145523905801406135905.767574486006304", "1077256602740300721008754.2018892591164", "9.66955588301e+11"); + t("618444195.362352747", "982633.647761051003411599741028168777054568126", "6.29e+2"); + t("8149897727387665433811.65013493798188347071989440808507136850", "597.9009250302148183861539562679711032074904", "1.3630849838500938565e+19"); + t("77968836131557152730.6066503205214825633736137387446983", "26.623386260991337602910092388126481759", "2.928584492116140631e+18"); + t("58448947986859579208055033.3456389015102041572478", "2153905666033468518224.3437080580833650080075946108", "2.7136e+4"); + t("6993476184005449151432283167418719409242730550.1744014504259312", "504344745739771251341596348502601429.875559823", "1.3866459883e+10"); + t("9156021789624387244321355068223756591822.5416168", "929009690841898347514853467259.26937447940747702070366316654", "9.855679526e+9"); + t("54330185842672278.4555577425007916412274148109731", "1577.7918977414848348786821735039896", "3.443431666777e+13"); + t("95914671847110222364375303076989923584529.321328513604213290549860344185884058", "2312554910790387236242675768763668.633528273398", "4.147563e+7"); + t("9536271622989657941117893870005898725035.3960398586472072666106052", "107536934433621117261934491721512386591.0", "8.8e+1"); + t("718176021859626777576712.9692740745420691564825232525573", "609238197799407984.53913836735676967982363463448876432", "1.178809e+6"); + t("44147152562206392320344564636849995094742739797.0", "22991031307190888201.0855628802911798788502", "1.920190180785779688164390762e+27"); + t("660415483245802503290291333.923018585223", "292424134822327709.238637726447021751", "2.258416473e+9"); + t("20545531617482656229157718922767746778787657.207138153658", "61225931256372223626.90739984159221368036456893", "3.35569115828586678799015e+23"); + t("3077763588319523000185225537563626.44185631365877", "757408543454069.33478", "4.063544852932021776e+18"); + t("74210773509491015321971288853188186456501.62032549124720896856800", "9752831883987.0206", "7.609151310332355723859683074e+27"); + t("481521621431311221533120267738316547022210533280414092045.4966374181245341881928472226", "2388901580093030146538832183486060171435.86476411367808", "2.01566119527016887e+17"); + t("72192973602112762236525695725845138549950913.81954382461791921273690806972190", "96776330870187794023873578780566785636.058678146", "7.45977e+5"); + t("119742591046966404722195948781966721.01695296051172651603", "93983136488596469171.4752185", "1.274085921376921e+15"); + t("444082753643723744248929533277488477679501792598151270869562.76763265462818198600263743750205090", "6228439537840261298334866243936411059.67481135791895089583192454967", "7.1299199574105745428311e+22"); + t("110828482274142230779699188.529887251", "65.1586610488934782951339558171920581322976", "1.700901775605536564540131e+24"); + t("921304159208172291.2529216431120383371594612299467928045", "917514.9982922883265577583593400254752840711", "1.004129808148e+12"); + t("21372434357889783069576532404722246146517354041407290499765647.669218667449701212888", "24768136761466020720232473820284452179.17480045254367", "8.62900369281744600990052e+23"); + t("31633231595423543509401836426.27562360735", "39889291950325418827287.1439022707953", "7.93025e+5"); + t("31313038000190427467108862.953277601714227296394211746230459", "3310916247527933729395.4129976255128526", "9.457e+3"); + t("798828627572603.727971269738387662892849210789563", "756287390377309.8390763877257066774437887466165861796", "1e+0"); + t("9968141807136584404505388614528597002153666330600.32971832610670788226214273532224490", "97522181053577338999726881380804207134.5123753140759376519585414845", "1.02214098366e+11"); + t("409813948864900137311883423.38693292822924359250", "17428515002538920.0", "2.3513991226e+10"); + t("5087528663920644703276124295927173535751.4813142", "52830793960867582981156894718.060279975065", "9.6298546406e+10"); + t("33665958929797992460635570950732102086743.3833606153246096", "5132636402232017.45586123490333075481", "6.559194201864319963457884e+24"); + t("6761486086216997010.410185811259", "292.0", "2.3155774267866428e+16"); + t("27787087572938204426418141471262654835343.60473034315690449", "77635481413450955794455666.6760410840988434", "3.57917373178339e+14"); + t("2510639329969261502036105561.339791319063145213211372777606691685493", "46415415.49834833", "5.4090635686727858383e+19"); + t("90878252791773403803339322705716421483.63796461", "6737299372021.40332539299479421129588297700252", "1.3488825087567252917794333e+25"); + t("3043219466230196057545184137448.20174300", "179929605.27300054493937405646", "1.6913389331415647543365e+22"); + t("91235011323473120445158535647706675461799661544627662400.005721378402", "202734257522659312725891424885778.6194767584722957599226218253027670", "4.50022667300201674564366e+23"); + t("8484774342019449621624889342469393014750556168432472799.614503685556194991919663231407157", "26275635180415559306948656874732365.405171488523027822183897956371676", "3.22914147793600917325e+20"); + t("6242565779763524175877055161662911.88242895611525", "57244009222715052251.63296787522676108", "1.09051861749865e+14"); + t("9047285283920262654132188752851469760735.87672786068296691868390646", "172909606762078054346389651501946337483.36843656846586227537959", "5.2e+1"); + t("68651866334998005083777146996360950316005966076.35", "3199273631047355849734912810241.0626361122212", "2.1458579118949333e+16"); + t("90633833673440118887041300078024994593666353748975238.069036497377133717563318251", "698618159080301184414663689781005767130.332211682464", "1.29733005784956e+14"); + t("30988956441582629111918442206834.60645499990734957844500845606315281", "2217558000.667213998887496318434508958688383847610", "1.3974361181199652819142e+22"); + t("92411429921158629387441350086627665.16980803470607768851", "36656291337236255254028.58254986", "2.521025083279e+12"); + t("119410032331444575139.618912597435460007", "7816086.64930284781397775", "1.5277470387575e+13"); + t("6380616366644073709925285687254469007039153713114039505254.1418958672720", "71824778398422273933520161172698392.21614486127072549439", "8.8835865684818212691548e+22"); + t("11515434813901993618828527975116915272455948577608.0547126112132063424010", "6951623736036943717945331.61", "1.656510083278304172235235e+24"); + t("663553565463598017529814434530178210.43517205528967697167627411158858611780", "53946805542957.4891878403867888656831266035760", "1.2300145648757916607581e+22"); + t("1581657405986931669572670757908528745076166.25350485892", "4606973503493929803773540062612781.045030980261409248581231481", "3.43318103e+8"); + t("330805341115.415670001343300934342503387084729339", "148960643.23947943737425628979", "2.22e+3"); + t("482405705547678428551230144071583528261809512809463678579524.39989145135685423388999379509935", "98210098866885069227678568296796802.8213658332545965782306145369373187348432", "4.911976579939460716205322e+24"); + t("512415092983743942300235267575283292185729.0", "42913557004929820006.3800674340766", "1.1940634353029248173899e+22"); + t("2718709006709830896776883653257.965793050126809653361775289697064924621", "14941557018.9366131234", "1.81956204648832557673e+20"); + t("161319849408178477030430097879303610160.322417615481", "3936704418565912038725111146946774212.0992762597601570950353881413046808837945", "4e+1"); + t("7152365455807252.8114475144932", "21508450545649.800434851925939251", "3.32e+2"); + t("779267811590474773868960921493.5650187412978893643567710537304", "2036059179953184193229622.9950471042714096728277880668", "3.82733e+5"); + t("95267070358418654094356060.8770636288409152", "3428.4475058783244559", "2.7787233199597275914351e+22"); + t("111163702048072914414011690881589.35170454316948290135586650279", "191438999446236684122904138.909020", "5.80674e+5"); + t("9136258406578664576943286771.301299154717494825815", "26503453909182932.0", "3.44719538739e+11"); + t("3756118441930715228117924643520422937125620282010.835088520518383154810869922423000", "149968478128924180613155.136316782701504640295856933586", "2.5046052935882121680034743e+25"); + t("802662856201110019.5591", "641215895128.341535793413376913309286576", "1.251782e+6"); + t("97021890556855823302.697281829410469843325864", "39795963477131274741.655612288760", "2e+0"); + t("5659341372147094581269027793.4894973218792631215", "26.48605745427436161374536", "2.13672472089037969245119456e+26"); + t("642772579197291.2646018074748153069314", "96.1603340960838097", "6.684383797533e+12"); + t("2382436885798095836321091772155940596719817.2515282", "9618331673254347019264376508.2257465817491230496579", "2.47697518315252e+14"); + t("2634566212367964745889737226041.93413351", "70454.7698022148649745", "3.7393723941812420717963864e+25"); + t("78949225333267788753613658890057098294.9633956776049997856126989293", "74158942398944189125148354676.85457667996238842974887364261", "1.064594811e+9"); + t("80943544365286449702780512060783168840523788813127.36811828784445366271", "24164546692345354434314746697.38377176450140784020552977", "3.349681887098137756762e+21"); + t("76230861714240544361532502928340607.2", "879575540099893084959932639171525.27478310735045680646044881569425969023", "8.6e+1"); + t("22543573393132549729259835685359101139970668524531302589.385947082858850468774143474447350", "38534853334332089157818475391453264.72", "5.85017755161602444718e+20"); + t("2302099171318247978761229241856614273640938814838127.316025435470415", "6863809868240966824468333654517.477845841795365695426580878969795", "3.35396698846528786351e+20"); + t("3118733392162576122858669448825954701.5732582828812599341068", "32636435861513474722964.235490115", "9.5559864606427e+13"); + t("79787464002980766.83", "67900978906468.635", "1.175e+3"); + t("84088526972984871391117456567495346740780071311331.5672798087923110948298214293391880124", "8186166353490997806363848112580395620070.3202079646", "1.027202763e+10"); + t("79540039953293855128849508689228623.85282131097088041146552401226318075482", "7756085995721585071504594633.28437099509", "1.0255177e+7"); + t("2861497226975839919662576662161309647.590473116140437413930118502215930525540", "93972481576005234.010", "3.0450374183866285409e+19"); + t("2409441287657038852505645875108993665.867", "520646641534332968.8307946391", "4.627786094147220609e+18"); + t("289454627088798262252340538248.3802600969646187727594802120095865", "7195.9764229951559842797091162997132", "4.0224510208764633470802687e+25"); + t("1288427480779604805742409181012.715356", "87198068426597666.49450539968273104876311749", "1.477587180574e+13"); + t("7450529558798962209403045339750.12317696201063871380682", "94615223634543811568747189170.761803735124782784720306672091", "7.8e+1"); + t("6219346401711891004949077187092224172252284899312121135.1358317628566764381135660434617541423", "3536452048506796341070283035104620356160.58181165231317856207178068705476808815", "1.758640104943003e+15"); + t("82720661721559047695186558320322890551785.8020770293384802834226676", "481038277700139876760017826858.976505337207480194780", "1.71962743e+11"); + t("947820270859795201628025830751730199909329865719805.326312524950590254835", "9891634595298979464924926934927.997300487", "9.5820388604958053761e+19"); + t("2565856001004088462040.104574163550268292745107433180284", "22.08984611745283285041925479914651983", "1.16155449311928290008e+20"); + t("89395163286394733047950062858829661190369055387.916634595679755", "5324944231421784460507849019.132889909341579187", "1.6787999911602044262e+19"); + t("67020091012342182.667446584679610209992", "13165110795.696119314770017127130", "5.090735e+6"); + t("32168609543204150227989635423701256239535092652043.6367502", "25205664291332806421258770230171.4690566997139308531926021489", "1.276245258660594592e+18"); + t("9505453290790869892565597067.38868612564613879357851628785016", "253241585.949939667100150", "3.7535119894052039659e+19"); + t("8828873915187218757419862356968362143.50376096", "18756765814162.33582560951751034", "4.70703425241944364143991e+23"); + t("414114555441261.5312415247329177240739996510", "533130798.9388904086409432503419897717012645547592", "7.76759e+5"); + t("19618680000282311916500403354885184361606.642238794664", "8397012046467794680170976686258596.71", "2.336388e+6"); + t("71213360145365479249598187248.3995", "25674986587158866013809893.18695355206000676949064102778363776593", "2.773e+3"); + t("89931978982582358651624915242201220773585268.25338060326735544043391594482", "604135926699031727314326020012861963989.54356149910340529956", "1.4886e+5"); + t("663191961669969962089847255128.00118617609406688676758487058461", "74344812903947014713360584.943405225215165676594884730006300", "8.92e+3"); + t("3453684526349591493121097637486775230.4165542", "896430781880729196376411093803353621.10554993642898021538381485913", "3e+0"); + t("700904883925451647853111747240303629023037023479.817525768", "988213577749684468373499862389.615289577824174434460", "7.0926457570186471e+17"); + t("34304309480313373.9875291919106797094", "2852691.377889555940287865797", "1.2025243861e+10"); + t("72209105815015395.4974517632374", "4853684.6637480956386877685466", "1.4877172873e+10"); + t("134803423888410099739656804729708675286498528.68032655047189119852582329753796", "86270788461110954469491628365821.302519644554621448692942184662666880006", "1.56256163057e+12"); + t("9665100926318185012179790538122021712.51", "643419546740603465273801385977643189.2883366878842408163169751927709259739", "1.5e+1"); + t("74362350236173641211885717889321879221471541685530672266536.290", "374426606237330464580009496896023430.0", "1.98603274974105429076185e+23"); + t("48930446848745077381509.58122499904688859", "9176987.234127144792", "5.331863889576285e+15"); + t("724163725926717513233532951951953930.00769440745720157858", "574204318905111691405350744529483.74695328821448558184", "1.261e+3"); + t("64427345729731168842579.69353507216784468961793130610", "27886950.4553795099221482243880208144404436809", "2.310304449847181e+15"); + t("14625006587630445.1742266210212", "6493633417368531.742883363127497198728752371516115", "2e+0"); + t("45847346883375687542169754775096250885345986510920803636974822.4349140548040319500217516282224710273", "293842391428818462649351400920841266.6823", "1.56027000258340632545418441e+26"); + t("88171794730830036063587935.9173305168985052689304904019759376", "12346360484139807.2286576081064648152998290", "7.141521166e+9"); + t("58774904753494470330901679050542558512634978538039730556941.3975110861734563843", "48530977814030803461859438584459215128.2467448463158848", "1.211080167778981830451e+21"); + t("10103619775034070815534445192301102141420263090.57906948870005547034", "81251977684446480682256664971575512.87059357907", "1.24349216634e+11"); + t("682570795216008085387498777383328850764866.4275304280843133581735973060", "75700398504466.027948194334852487207", "9.016739788704534672820096766e+27"); + t("323049978347236756602.8736687071337656352021296128", "772285262389.107797", "4.18303953e+8"); + t("1670139212904113008352808556949589110633968120849209.65210", "18056863391168830887289330.7911988536322623700403670922899", "9.2493318286992033397174035e+25"); + t("41132494903721339483096065.0876", "6397828427660218120.209104552234381803145865772", "6.429133e+6"); + t("81602309462563170149276620735045588.695282362", "959432788.78361", "8.5052658629710136944422896e+25"); + t("312145183791151049094273388413398062853.4850", "4673970731553.0674601358464635907429889720798645400763", "6.6783726668188060377370818e+25"); + t("72002030363877564923312584549524073.38529927014235327939192", "115214098943258757.5635337952040245", "6.24941140227443011e+17"); + t("2537576337938613417266707796231193660.3196705577175458950373044706979707860", "7323837365536379313606246.4342373293216213777744435006821", "3.464817979e+11"); + t("89172180969323428161381535638.5475049390748970587383153170115949304", "5037398.358892835744180192166975", "1.7702030813565136415691e+22"); + t("85891691778312059856703662.0707948448590903782630269041201", "6812080080048505801543.8991272170959993208", "1.2608e+4"); + t("3204900.881455322009276880727382769875645792", "22535.0", "1.42e+2"); + t("881401812458415945276.07836418455626124690", "603260.4149646026", "1.461063564911902e+15"); + t("717601961033851598.500", "5962190022.8964479613858421", "1.20358787e+8"); + t("5665.81434153812741", "55.908142147894", "1.01e+2"); + t("555151613262784555706923026886665310223608304507.834927141", "920792528203117496860222732.700202787237775891117250770408", "6.02906296759527720524e+20"); + t("42705180.0566060960740365117503344", "3190.20224129117646987313244", "1.3386e+4"); + t("53586654973677554832036.727614103798730848361452294522577362756", "1723850381634853.49382244176351725", "3.1085444e+7"); + t("8075529207621427035938411625290288940134761326.4843276467765000599161555327752801960629", "167009832742854705129928349.888531038241700194137", "4.8353615323088980672e+19"); + t("12243920347.78019931332457206", "10662.008760937878621429771725", "1.148369e+6"); + t("46640036995527230277528065524416100039949894476399366063170906.06870634", "9874651542271593808246793378280876256.734192", "4.723208388252454663095329e+24"); + t("4006876842465714844188831.5969407920172227004831742365", "50620571340123469707.4512458295341091594261343811112", "7.9155e+4"); + t("377737226023460183796284932215619897.386107004559722515", "6631049403470.465849436547545829720910662394630", "5.6964924107753647569656e+22"); + t("94168901831971474.682921766601", "280027190802.352984098460106745060880", "3.36284e+5"); + t("8125311.3838638875892831184832347446836074799", "2706397.62499523203762104999832486849167", "3e+0"); + t("1229640029170100454145051119275323467913.08755250628433771816821520120996802", "833320318021599178.70735873", "1.475591081337619441891e+21"); + t("7337693315048668346529194627233957003612546756586.35620919922707320525396265709", "9431553067702071781247594.327397", "7.77994171519457198716547e+23"); + t("97184775385346771375916499941.689361878336539", "571501494.0", "1.70051655867319169905e+20"); + t("44224858244830574454824248881390239063.6133313897996145", "74774869906020882299909426.9392871921522884130202053799", "5.9144012287e+11"); + t("509909572685498641599903.3088790695123575709126360", "32956460.533703604907286497437726189968858704154", "1.5472218934555459e+16"); + t("506141615004556063927954912721836947545.0", "73874087425678873716325379036359388.40538007978691386098015", "6.851e+3"); + t("83526906870910217716094867719438531428990694252.6890464145636170454377614", "4615168421685768818138.7945460018", "1.8098344250760970781261434e+25"); + t("8905988891311767590658659200511373424.3967936493859651449815682188452290253048", "233305960057090435.72214224180", "3.8173002049036613856e+19"); + t("190.4039639829880345703909", "9.09195692708342896839903829973071174", "2e+1"); + t("8192358398252559153762.6003760084421357364780201173738", "0.3638925185811148730837", "2.2513126761154914301471e+22"); + t("6995524432510729335957664879027514919179245781821.93828373179206164507322583357399213", "7694679647506406867852.344619229", "9.09137839777091851952716007e+26"); + t("9667707732553.10419349", "966794924081.31798549845948989367780425646", "9e+0"); + t("16809269109290.7", "2937700.1531634090336858", "5.721914e+6"); + t("88246600933914227428679998714.022024360344558515035362983835986", "2232278447500334580999253.32744151863", "3.9532e+4"); + t("232724246935564123335739247303843798574.2", "86908236501.8069242383339661044104431703453870349", "2.677815777917959629762205118e+27"); + t("98345970681326307966292.8718651360031962708", "653171802335228283312.050253775614299894015215874962047822889", "1.5e+2"); + t("51397600091748480127.2088050853", "790.60640695479", "6.5010351092041678e+16"); + t("1798241768560345355621133025824.6984102763295559923584224085607168030", "3410020656672334915.43679411642568775188", "5.27340432686e+11"); + t("666787224655039756153910917958143384064633.78890700527098985467264094400074647", "3971614846428591185037.8071527020551782826483005888589226624965", "1.67888189171877307007e+20"); + t("45330989381349088176036500519957232026899506483903.3693057963751666194165", "19635428226308045377682221845614880482.0", "2.308632582843e+12"); + t("837932897464721.87352992669372598648319113910", "57.5192307354847545533321868737335021062", "1.4567873852801e+13"); + t("7341715434779841853967728937477.927067", "1989085313982.55425058192619566001618556450153985108", "3.691000774662717221e+18"); + t("252521402072303815947752206072867063949.6881953197", "527640044408832839908.0", "4.78586499921984575e+17"); + t("15154437827507975634.79", "4426306937054478942.8831086551423519835", "3e+0"); + t("373588908036.532213022532", "85331.576260935156", "4.378085e+6"); + t("448726769169701581880.4554411167433794366094382", "5048771777.832488929244107374177", "8.8878402295e+10"); + t("67023217149624564.0", "316166826310268.648884140875", "2.11e+2"); + t("61873040465546604543754427696088758690115.26451168879610092947219098363126097", "58155881015946579806737.84774119324", "1.063917171998146919e+18"); + t("21164038018831557445589982613341139225.95934817572123653193", "881074848284120.843058236535", "2.4020703871014117078626e+22"); + t("8535408832459569490517181424509365728977141172353903808407083739.0", "4065093747822348218936491329017064777.653", "2.099683146798754207037050758e+27"); + t("605997568940930614213036397430024135296072660.334", "64940520114726172393873694050702.5431763234711583293426774709121913633", "9.331578617946e+12"); + t("1033949280835117588546664225.495976052157564530541615768808", "104151056711.4", "9.927400772324043e+15"); + t("331281.263520042191716194360794901934975725622", "91877.8928739058075054259406", "3e+0"); + t("740017335.015847113341777580343920231", "2.0384101060100990", "3.63036531e+8"); + t("731705717200752945308243442895300383.5929840908728685572861789469818599144", "365483284760500911492.98814080", "2.002022384362216e+15"); + t("792509704762196705701313629865043733577.9714652359144623801253515417934664964158", "1998668251133300.0", "3.96518884168406564858004e+23"); + t("36170472034683461372712043735465401502730842.8", "24540827927027403747853146287597.8927564183376510547715651519420915007914", "1.473889639837e+12"); + t("141534430887319794686774773268132280030.586045742162904", "51082373606872630877984685.86186490140", "2.770709755512e+12"); + t("4264318965192230091576077097.971897", "89.28717698303952603962", "4.7759590002518002939797376e+25"); + t("1158478377824188531161302177318406854795685070.9550062040598448300018410915666082047", "103814356501289272212596382955.340898589810343804790815516", "1.1159134602060567e+16"); + t("945837294552976506396924887.0972458764014664", "6901049.5968489833042637234541648", "1.3705702028063172674e+20"); + t("82411904611172859259289852777372.080994051", "195511.4658429135", "4.21519547489802412182038977e+26"); + t("12988166325.178390270777355323613951141546773375", "6056741.16488739901468364101952", "2.144e+3"); + t("7790188862262297808696351311081431455169380810981.2939501502961939496906887843663", "9688371966647101054015381213650353.22811234186", "8.04076153256766e+14"); + t("266378599338336385563929960568675732178127.885617596130174737749796442558222867", "300570837142623382332880.809678383580955", "8.86242330994798097e+17"); + t("86674550910063542149424960021255620457265485577362030.98980221655183625573653105", "748054979535232472776520776212.16742388", "1.15866551632227022724247e+23"); + t("9481867473683193803434.37819093657035214116725658042072168", "203655287.120843941491920908666165094", "4.6558415485952e+13"); + t("805324866738363320828474614.480", "56162041772.86042", "1.4339308923193852e+16"); + t("83336980219606474398009952692713912501367.199636061482", "11028967292584166416059836.01660672243509704304971087766", "7.556190712039007e+15"); + t("1219197584212.314", "740428.311346198893835548942436837046", "1.646611e+6"); + t("60286481904069902987819067201196524141276256703545309769273822.8290996", "998434833685899026302538967695719608295.1511229", "6.0380988192801404374872e+22"); + t("51942693184307148401246.54", "210093.29233134999782920826486648079089831170", "2.47236323482357509e+17"); + t("23143496.6170754380877", "33495.1455", "6.9e+2"); + t("3219782254166081070465676620420674480730.6098428791655097397340502823", "22684372849660.8726765476922245", "1.41938341231867745474078657e+26"); + t("1489210346390353090.057706915504976", "5433229.770496111663561525526276159", "2.74093018203e+11"); + t("18886595312176134995881605303205215213314030163608932.135", "90056933448243013080703797857650593.51719467086101579937951953", "2.09718392454818896e+17"); + t("775491933997.85604801861329954", "80.01408326981", "9.691942996e+9"); + t("8314969138262557800135767152359567965100210088.79881810647114453482512806", "64881320851812180590625843229063.34216535482000987", "1.28156594673123e+14"); + t("643599228630699698138.61707155379173789887223474164204024", "901850962627.1260234925", "7.13642558e+8"); + t("107262910245411125074503825531966126300180.7334098229251453350138049173602916", "1674763691207585887054481597538809894213.160870171702394336933245669040455093", "6.4e+1"); + t("10549847583080788210210.0", "79.1140498671952593977604111238", "1.3334986138100984541e+20"); + t("51714789116197039772826251968311155828678142.0235925", "5974295247854190490012266909930.55388296616882857043630825537859054", "8.656215833117e+12"); + t("494464156424723513701626680573687038259.76983269036055", "70631921709.17", "7.000576289863683959820347046e+27"); + t("227427126175204729364406565216174.89594445722876228593249391484698233655", "408026842199709696111900549.3596993089", "5.57382e+5"); + t("51355869550418745948099893914016132848452568924392592845077111920.7527832094925304167849253842987899337", "6692588091904374595313774594134776022.5518694286746263", "7.673544052791906336781872002e+27"); + t("62562658979141095134666293620315609.514760", "39910486009197711398555305163694.859024314073340", "1.567e+3"); + t("5882598360847202450057037300708604929663365612.613267", "746909960921258658708342948678766967471.789516223744690514247094501440062", "7.875913e+6"); + t("1035899914160894694.5932195869435633503679886256384", "467429676.711783998471976711978441449372240473", "2.216162057e+9"); + t("32014756177149871404089537663.7992867927278939011716211454806", "78822116925773698220688.604565846104090577367660805604242639238", "4.06164e+5"); + t("811047709964587452166468548109808480618197091287118.810388659849653906987223807682836270125", "507799380874387879398641129728623823.5923973499133316603645406939943701", "1.597181368295548e+15"); + t("64536966331244179.16796086997039227341629854457", "1242256600268.0", "5.1951e+4"); + t("818098686921433992987866.814826105155714053393988633", "40222455151702942.5528416292814973154300490435546545317394", "2.0339352e+7"); + t("7553910276659070269012425398712783883640354541860301350.386", "5276669978521301013319441166008388021.342100525663226970109985092942668675191", "1.431567694664870431e+18"); + t("389038896164242499541198314451931079986136659431914455.45316690341083511362266562976204", "2016084668783051664723727725.0906017568", "1.92967538609910676229133227e+26"); + t("413798364691378933308195970832279005620430.783537334249902", "814455764481894163.3287631692357373086825102247", "5.0806732880650870189962e+23"); + t("495946883432974042086212520052457189266839439093.069888410216520174041679171922", "567535586959552538209354.703151101338215315485008162648175890", "8.73860414797776333669985e+23"); + t("919887450258077609131348933600446927261389293524.86268780214409854", "50564182510486180008824025560.26102044728169633594307467897978553722", "1.8192471520078626366e+19"); + t("23417242.576401", "654840.494192113794548448", "3.5e+1"); + t("961076684076787384638982528361293567.75542843473435300975640022102693", "77803179946554567675429867233716702.3985463476147399550177187863499189466", "1.2e+1"); + t("5660427029579194203790076069569696490919640382855226.0", "794447177869687614654803.061366421855736501754582104181926574754", "7.124988529454715307227747492e+27"); + t("18930273927713844627800392879508195439086821394463807043985.04914885764232103824", "5643013585711862489310655561529575242.996519321", "3.35463908427323109103e+21"); + t("228317191958555.7225476894890091701225948", "2919428056.8261594655", "7.8206e+4"); + t("3061669462783201488069005144486118745732136.15526392196914643568", "534684714327299321996694660978581073202.71400659963085643530863", "5.726e+3"); + t("92628605127976455588891125728711821.40135243", "11124782648.29543697098256292", "8.326329426505173914272545e+24"); + t("21511442998453.517762739302559255", "902746605318.327889162", "2.3e+1"); + t("2962060175673.62", "32433317513.5168529879758376889375657028", "9.1e+1"); + t("64985922853767749842545544085.2717", "223407.467744925334070488550597674002025924335", "2.9088518620140841279627e+23"); + t("973926374599015178148662.5259866315512108465148365695805882751099", "9.4091182", "1.03508783065241456755072e+23"); + t("22193665339942615554382782614650171731850824767.63804235990814293990430881", "13714781804383342431932474816.61", "1.618229561103871244e+18"); + t("8957788951943961360270476580624778700757.982153820787123027519095955687", "8338556574534.0", "1.074261339102873106583487496e+27"); + t("13124504224292047553135309370212610.412051689087164440390552435", "75867646822799373867407096829.05846377393460162880047071013254", "1.72992e+5"); + t("8802571884604783177143254551802.9749165405841112281414813663", "55506.8889755962971813985632673746", "1.58585214323123921048952801e+26"); + t("228133215837923334347376.8", "8.0942854514290085656", "2.8184478692637096567755e+22"); + t("60755294701803481203259511590584832932.9243814408215937015800820132027313373", "344145858708540370721325173327588609.76204", "1.76e+2"); + t("3737998232577326418208777257575812502506681.176309724811752734111260", "865844200246832560021235181.11617825", "4.317171878626325e+15"); + t("2482869486164457530779219919206588532.015090664378275207193", "484868618070764670571.73500697863855033528206243419771", "5.120705679083756e+15"); + t("7678179515444583767305211117920005874287.0348872752341152383326", "58948138012690721302417849534876584.8507906817743797", "1.30253e+5"); + t("253101141231994716211434301823688578.88419213", "88980764614395768934502383.13323363239965231", "2.844447812e+9"); + t("13437433580887136898079980164773375711629747617906.59782866812193", "915710531535318736826281561973122673.07455864794948945076948", "1.4674324601637e+13"); + t("83871749375325108839030467146052963497.4692700383", "255639976626247979.87938673130755769849453057652", "3.28085421076171109725e+20"); + t("9667852729932020997859594881983126939897294149718545.86", "53276667404701666452116833535295.49004839723063601006527599933777", "1.81465042783040759301e+20"); + t("350906500011846355.8273233292905629308012211261389697163002", "2111.5672435048781815240419703157", "1.66182962484962e+14"); + t("6108320931314187291333165918.3653887896219000336", "544.0012490193824689", "1.1228505343186355691116019e+25"); + t("7018134189630833771719846889372118013253966448096168667628164868.2848130598881217708", "61395642559830451588068252642627915613.81763283750750235", "1.14309972125328218829894409e+26"); + t("6792706962535547029423049967756843316427715327621023843293.99754099", "17917253246980051091656767456311122081.0", "3.79115418468534300789e+20"); + t("922994140497324355475.834956546924452670220", "719880621923.7057", "1.28214889e+9"); + t("1352679126725378326854008716.7965829738976648246087243059940", "1820598.592849207046102243871272362762", "7.42985923442057372255e+20"); + t("76503786436164400549400743007711834321461783586810.848781583682368614456752", "68033827523005350933093.8925146274036045506135661203851", "1.124496286943358711448473601e+27"); + t("45973960760251736315612.8850335657688649999644706240015429118551", "979396122754515038300.504", "4.6e+1"); + t("38965069032425085319587380019668643395599207200105433.924242400708365718491463542768", "9669834888916196306100871331690443991.89540941", "4.029548537285554e+15"); + t("75858080763736.3923195686875407070735", "37595.949812032844887175315464", "2.017719492e+9"); + t("61365224397509015787179994388507306694584460780241.28865690785494660543707", "81301293123658261669746534003.499243431263464593", "7.54787802749622544989e+20"); + t("270363854672727763934343410366562010602905.5338331818769657245861611175566644", "39512591176531504.8444253062759596836252722", "6.842473414735460784465363e+24"); + t("80400563186512577796425698999803.72015603113776727399439321261242220051", "82411715.97645606857017909", "9.75596275770813334555033e+23"); + t("5605174880.4615394225916327092168458661610045726", "111281719.154480383488", "5e+1"); + t("938351294487473024356890313366077778.055", "761831620825.17844684059889286777704256", "1.231704314755401161926259e+24"); + t("4375833205432171.6511", "57719879600764.8001308599082918364616528592967301", "7.5e+1"); + t("6120020249.1146409009261736", "83.65271168020874178151779922934209022", "7.3159854e+7"); + t("981408760407713100873.89778485781406447480283999", "1521946172699.5527156182886049003883501937477", "6.44838022e+8"); + t("38538349280587515007335145.999", "3709516008515909506489965.34400410465003826007135", "1e+1"); + t("8584786247295696635849880972737274.787572868522059149822533", "52236266518476151488948888902.03424688095139505061892391246696480", "1.64345e+5"); + t("3244545167456459130903706130422316843570078186.1799991", "631073597340634538.6142441622182109047512019794124736639", "5.141310270512159105644094899e+27"); + t("614671823727003035129151685158800.803254728851354679804436350922835482651", "25259397281814139.98842204498364783655926245803534781552", "2.4334382046777683e+16"); + t("465095032175032244364463920017883760737017674348.0615578821783815808957174932", "70985271244306592317.30060629", "6.551993449096461883345213181e+27"); + t("15818596909712603700184340663887.31342904433178633694581999257", "489906483756732030218156.941443066315836", "3.2289013e+7"); + t("82637303002.953366803342921531", "600775891.7771684357864", "1.37e+2"); + t("33105794634277840430921189.466083185231373647776236843", "27016.157374896843919656567779131468", "1.225407232230569897537e+21"); + t("1746174517321651.5425445750157907832014633309401907098", "503.368887060226046", "3.468975858876e+12"); + t("561032973847296055911806154067031533181458226.66194627890501798507283854006810645", "49401541468260263270523284.959099", "1.1356588421593103173e+19"); + t("66477202714079751609653743916550503014019582118.757220506915612", "6057213950960906134844006024147782.55730996551298", "1.097488106781e+13"); + t("24881080667363045.331135990427524077789", "43684578354627.4", "5.69e+2"); + t("8397241126576897311689233279315465.0", "301013015400271428556468.299642866777535532281", "2.7896604787e+10"); + t("6891406846562302648530697611742760781101.62358245438762588272", "6804056434035104412507907.096124036643670", "1.012837990597822e+15"); + t("644172231943697609853434007.384520571840507418154494098557", "76809376.688905217210855165179818", "8.386635326474996732e+18"); + t("197048824145495971039233393158.8184", "399477827792536414326077.404681871354", "4.93265e+5"); + t("240624714382.13074885691260207241421406557543", "280284265.786238679146521241", "8.58e+2"); + t("582666844098553.6452820", "5018357.6087833775040937646618421748624218", "1.16107079e+8"); + t("89255722401309302794554089323005507181614902010.0360164", "231436436698118788309411.0", "3.85659767643816348378973e+23"); + t("5905426535715551276673.531597223521224487887107526671", "1.181772144", "4.997094038557361085229e+21"); + t("877284142606703781733785916605.25696944404776326332", "93965143081177.27032851", "9.336272088138158e+15"); + t("641036989529903876393831578699934346785405573.3061721652106126969327", "1532264756298183858529957963388.05423116758312043450314169", "4.18359155553895e+14"); + t("1475751036714199648730114791302586077974.61293470514499506180056202617357", "3919352924891352850.48363174980500125417055753479449812740", "3.76529254954785292521e+20"); + t("576169499544913597462200498273373.53883", "84564.711959125125", "6.813356141074644445772001868e+27"); + t("246743115959012089116630129324832275.174021327273809809", "593820460022.806618664", "4.1551804387059268308482e+23"); + t("28464638018062038796734654380509529112425242649432599258325.879718519724842794883", "3744289828084468731129445277209494961.104416633705223", "7.602146021005053236087e+21"); + t("905716746746118236746727683787565617988324760298.73294999196351744", "88687614376337460418652677.39381356020119326231825989", "1.0212437814628718333835e+22"); + t("92780707147669867441791795884.2", "156984.3045780775234015", "5.91019002804350847823795e+23"); + t("1674313388937290714206797076186815940423.184", "46851850558144683564364589233499411597.445721170123830124291600043079805", "3.5e+1"); + t("249652940819093482750237128996478577370147733399078.4905553504741465517375548620325", "79880760524920405053047706187721379625.932966107325835", "3.125320029235e+12"); + t("62834486063565808589316509620013809246483.6505641618819111952502277779007", "947710974134020649525465452708562.83736468233378", "6.6301317e+7"); + t("96193220127246778885524413.185635330457", "6380508446305644746115133.07412351734010033708155669403863", "1.5e+1"); + t("7580650115744834373189331133115580074.61211244967648672", "675252898757227563291525957118638256.336561025544290749725678047219", "1.1e+1"); + t("70560594149448343111145683612953200504794319.5383", "489010139936740146734403309.1865325747097562148583380003111", "1.44292701494035028e+17"); + t("860838595129418010646370600373108183845660387189823638.575381", "51568893255892013279628825715.3137964813074812", "1.669298177212796282705545e+25"); + t("537876061632907031173.12311", "7130054624956245.954845037201414", "7.5437e+4"); + t("82517781723258535465647176042595855354729468716.4472832952760823011730702065", "66813907098853784951329174453633547.47650", "1.235039010683e+12"); + t("5929488358592320773181960868920987073927.88388798", "78381852979368124522137795.03829502863", "7.5648739257964e+13"); + t("329474717898975874349.7680975234826011699866078", "5466714505023339377.8818320716212482595455181231170899070", "6e+1"); + t("2363937356314299614865551.44358270704619557", "1751299123897.3300202916", "1.349819299317e+12"); + t("512416652245569543.3154632560", "9776695186900.48320409293674323583534", "5.2412e+4"); + t("16034242201902131727081995909786820.01552514763268990218547200626152", "492008550.19555130788786", "3.2589356822212216387853918e+25"); + t("817169387695035335471598718443872510381117711315504.0", "9101340502043511373576061821503048.976238366099726222", "8.9785607681808786e+16"); + t("23411656442010254481460585957096192134.8256228477857107700192", "87218597453850.59945343434318080138448396299555764635", "2.68425050682544048729303e+23"); + t("50186003460954759408598176130706.024", "308474741313972.60501793934227227599", "1.62690803296190478e+17"); + t("370075324733804302055668773879119811957377288.295419956275803962503", "91199554513928468372982827400.55464528364564258008494470784781", "4.057863294466909e+15"); + t("51502495983003442300.619", "296926214208034418.849861", "1.73e+2"); + t("3583528344846306480436129439929808888424.42466", "24342028840043104277506703.77883521906683", "1.47215680681116e+14"); + t("5766326460559780759068072534.58915444563708122429160116243", "377910423.4296010523787859394382202595", "1.5258447777728362723e+19"); + t("180274339760144355990114953568506117729934023255258264716.38662967422373966237767", "27921103221453533490786036075189.336171", "6.456562204233688105355529e+24"); + t("362935691993204202680684283816730463773864450949685945479.29313112422729722", "17765287007829061039732061314035614014.55560793546", "2.0429486550555614748e+19"); + t("5616635952311116330479498514997451466685212721.0", "216925723990378429575242490394987120263.98217824390476587786", "2.5891977e+7"); + t("908867457059680459503.8000922962056", "216739363927427342.99", "4.193e+3"); + t("86572.26545176746337999355140", "99.231132400837556249532965123248969", "8.72e+2"); + t("24894966097035607043093284813225.433538462048", "93110968159.061165432883446992856156705643", "2.67368781457707722081e+20"); + t("2479035965964570524519.6142406174", "6648913817051.135854296249356259674109323937599707", "3.72848262e+8"); + t("3745718869762873333877546287564370424928436334953.657083255564322065476129", "860932496131051739412786235012610254.501753045889833751056030724146", "4.350769527919e+12"); + t("76453779215626803.6", "75340521401661.1712171521533006", "1.014e+3"); + t("47648843504876298933631392474199377619997720783511108.20686193122727474672989555446808", "178711012787755038033028893838667624361.03852302141862617142951171281458813", "2.66625110347654e+14"); + t("660863380874451536224019971035.75674411388", "840389119338967306486352.57091034135117406296679818460406630219", "7.86377e+5"); + t("747008207215667353354825194912374772.3974976636688", "134970124990204800086917459949386474.5009256065771559975848878254", "5e+0"); + t("15528691276348317242573014134083070905939781624669488405.7843550153", "6914696514331753618564652431184457.44853605868855997872776284404", "2.24575167459088877637e+21"); + t("287768310550872638548086585697753456559139335958282317587.23191916903473", "997489457262817650565646280422.0", "2.88492583511137497209733338e+26"); + t("4648066385553972249793152218642202397825903584.9258", "23661329091900485591508861791521.2517555568813324781728162296842476790", "1.96441474927334e+14"); + t("524765164027660689994.15949255815917046572441114", "3066266.72426681731954108816912", "1.71141394802547e+14"); + t("190490932740982153.48172762609584794574238007904", "12109845.09842738202500874498314434", "1.5730253458e+10"); + t("6100554503860766970820861666872611.472055983", "1308567008402862419634141539629.29561052118459376089249257", "4.662e+3"); + t("9576129306900745743833.7892390491254081", "1845747222585301.424260854904699096322141518", "5.188212e+6"); + t("5774071563125913615175508321973071301289458299543842620.57338", "47042321260907973936392257714.44456189", "1.22742063069157038893316274e+26"); + t("3944977961857323296496868253757648787.49134237786", "161835971708047011.807349291091", "2.4376397411658795871e+19"); + t("8301359297555255069323390093063.118588896655951890584115498376125163", "836906658004203459551072.206798816477132034281163728820325", "9.919098e+6"); + t("425077594123576362502584289150268.240163781070536336104180233828412726528", "5484169689661701.28490401", "7.7509927332280973e+16"); + t("295495897255430088060820608010945481278241.40136144869817695904329547089", "79380394688882221954387669405793099899.0", "3.722e+3"); + t("183402619395073781201846941968210908658.624573245303286431188281087772742282905", "21000266277924029458940.886026788274656804", "8.733347328451301e+15"); + t("2853949204886190873376484052090.81779870013388679345878271", "44422311122.0718327278676189", "6.4245851528156246354e+19"); + t("2770730951663082795845216105701650.63966150841", "1270181920.360265247", "2.181365446358433943474513e+24"); + t("4075662200552324547747960218405782969927.522410610189", "3628433916561.324019129124576837808", "1.123256560344039530464604966e+27"); + t("49611192458214171234601518170885756005842106176272867.0", "811905282079787975910861362204906.1590802515", "6.1104655374490782612e+19"); + t("7395876334328287701799216059289864.1018515952466658", "5363333777680047940098.7447523", "1.378969991594e+12"); + t("700688724998592249249818831201658251801341.3950921022294637", "5658396427970257655152065376334.341554836060179606378", "1.23831678094e+11"); + t("799266016233539362803348120261274639480099702103437917131441246827.505673476016425430577781543363", "634961892753780527822427751527985471584.78575616449583782751509400717141776085", "1.258762179832847263983575865e+27"); + t("831437805238854155543255569668615851868717701786645193132.4748090031682316436105677287221295366", "2639947692694379180890824465060584665.8020242987632232245073095483704556850", "3.14944802709433017588e+20"); + t("1524116189273822437974634217738377081.56195679213239831683660128153", "2161255145746626512270.883549", "7.05199565295795e+14"); + t("2138786264689971279545458908232294612423595232476018.32156845794513493", "4650416907207762990140488131400.47045737135703125625129735667091418747", "4.59912800801800977291e+20"); + t("1722961298797463449221516.69698043", "73140624275750030.8645347", "2.355683e+7"); + t("5664040959624684800081311993807539454829817592177057.2235463150383", "6786997722350817359678152409180046969885.0126633838152003809989320406587419206", "8.34542929191e+11"); + t("989220963875496751137020289087943190582563897580.145850849988435047070", "8155059952991074472066292680253624214753.9249470792964565", "1.21301494e+8"); + t("38853137783710316283791187819075078269.946594881991260935654924", "986547548109655355003118952199289163.051227658145928663248", "3.9e+1"); + t("725957759795556950158074990355887715830644852.3692", "8065853418690133424.167043460736655444801572724412416569376", "9.0003837425730204814302503e+25"); + t("32088858102842394073608457839795886568988330440978.0161197349938871569663004", "802989027138275657047783010125743468.533418584189051750228", "3.9961764131699e+13"); + t("28965583599454043041124815060.13686814935381262023573", "999891504871430276978600010.153133904889128835101380177144547", "2.8e+1"); + t("26515257722369694797539993349.31877021826710009422632263935", "51198070.1082927717730898641", "5.17895648532949377362e+20"); + t("133703335477582803080434536613536036.0", "296171390.6000347887663418368", "4.51439064410318834057921287e+26"); + t("823265088050079195729206154986514794.44547638157831072211790540661232523112", "92317675740438405459302612.4359720491338630549753705", "8.917740632e+9"); + t("3380342497400460184193453623777.95892579897390240281297204847745", "1570891186154165257353002912783.526647337536149313027212894692810300940", "2e+0"); + t("6247972405536355678947466357438120426251243903.9305320060436472142127292544220375959", "1533421981053460089676554550560318329452.899974413627", "4.074529e+6"); + t("2716407670765519404881587.16861", "9828142719310.0596358402888719208749454961679897423", "2.7639074323e+11"); + t("426616624010935294584.8916444383149377219598202726980", "524718745.250558453111289080764372451824305", "8.13038657132e+11"); + t("34762025677296.95231615157241284876453116024906485", "6.3050313693279", "5.513378703618e+12"); + t("7883496393743948753637.0", "69093337181057413.4987943658100904865315727583299380", "1.14099e+5"); + t("2443575067989995697.875583731051458565069", "177.0", "1.380550885870054e+16"); + t("86889593677856.9039750374636772613430798", "461810400529.41380175516855390917821473227372387516", "1.88e+2"); + t("6763186575537880733509054405276164444.98019448671532", "811682419061944827259061.0", "8.332306351237e+12"); + t("7346968501763855715188418.611109374612124128409569825492948734685", "97754082528915010.899915186175", "7.5157664e+7"); + t("954706519843885360732477138861615152918.76", "531526746461346600548.766", "1.796158944399071759e+18"); + t("60123231899910551746160055808359423727268.002501558897295570690710978", "5897514273637978770737220310907.010", "1.0194673401e+10"); + t("242584369186891559081106018472673.929658691970879223", "2292878.8900960224265317394685509427451", "1.05799032925255149091154841e+26"); + t("7657436607957.23712799884773079113828232332968444", "6851920519242.6559591019837108861376191510697", "1e+0"); + t("636988182896251041400392471091836236426.02093141289343573541676746349265851330", "88261949223276393393.8588486104256638962141", "7.217019208185183193e+18"); + t("472242785915093044775057366487742701368.71350317318224989070185482591462582546", "599479773980880534572731368903.4519997357844817584", "7.87754327e+8"); + t("842714118404631781120281372089196713491514.0768765924559932542808541", "300440190753001681848635558.937825", "2.80493137849671e+15"); + t("230138933857226101108260938066607.3390595350004713124885001", "20368980005038820671695427865.029264270447", "1.1298e+4"); + t("28032974977972472111431733075161777605007837673267547100.105118489872990033273842547296", "3463769346405392686011843397687040802555.8088954447504416", "8.093199106073372e+15"); + t("542480853839190756315422597296630730854.8883529830802438030634059165038203", "420520333529427.92", "1.290022884948625358347827e+24"); + t("92958977483214424823290447211633263954519124160937696258821804.526224744796", "59067954116139628255893409230305132.3993237", "1.573763284579624037586254009e+27"); + t("886726286787705419656067390034024611.703119880413137004958377314078", "564347800918557955939394837893373.2090763928787672557192349491967876926418", "1.571e+3"); + t("26979186938350014835642270689258925099378479.293530708503798615083", "754506777745829513461.7706380655271011747", "3.5757381820946989518503e+22"); + t("552699468651491710686388924130720.3910122665", "99386979934711111.8548615445701", "5.56108525497574e+15"); + t("44120269215918698818579.38403624566187861579530268459325", "36515322943559921588664.79468605522348664943253957511773012", "1e+0"); + t("11349498953480951846718831274527747384.36484545018827755207645801399632507427", "52205519928.7492928635101332201", "2.17400362432380357513058349e+26"); + t("85005118239428643124161807372561420182076032177.246974350642495653208", "23885994497173400650388933310888.0", "3.558784971230228e+15"); + t("66305973787758204988597760181032038.8575114968058556446750", "7257645309423526653413250493.911783964261785449956429260966", "9.136017e+6"); + t("9369183717300959788345149160871976514.61107909263601396460927307314214612", "980038506515881957475708365698703492.3101805871968126291692843635910934337", "9e+0"); + t("10149354572632995038433.4537528567", "534258.34061270606461041", "1.8997091483856596e+16"); + t("671693770003566113425226170852844663796675522210732685.86", "498500917004712084299330472530.819647727840774517124959527", "1.347427350865268161905358e+24"); + t("401805678036513527257136852046672234017669611204907.99470684480162285917282975790", "966974489640042938212190034759423804626.08250793047834745733677790052947", "4.15528726291e+11"); + t("93083829244269.1772451858164016", "5175723028143.09689348544683", "1.7e+1"); + t("94979187266222991507033401382750865856832498959623683155690.60108706", "269395570664823076489579680956903206.94987277160273418472829942348672561375", "3.52564027061878895693049e+23"); + t("639420974071508796108192604584174187.040640405366823168", "48411666416047971.0675668666593001133661424524519745955676", "1.3207993473646412199e+19"); + t("64410558621083455990660666793546886.61386888888764210", "3811004319064199133.66544519689001814058235", "1.6901203259958418e+16"); + t("436614677312657570241710697053751466703168.83091107760", "78857680289281986616558627.6243797419399919847", "5.536742593885309e+15"); + t("783443689068905357592904766.69295314871493", "432397133625363102.3568190913582983152062", "1.81186143e+9"); + t("2380500732004218579406731922828711255907.0744642", "50321820032530710.4714529850959619954053", "4.7305537249354968549456e+22"); + t("9380743439743963800617491039426820151773926736.284332259240265037", "942458341132411207957.26", "9.953483385241757908315983e+24"); + t("98911449293.910674708529245186903512060", "65584339994.7082", "1e+0"); + t("38264919095682985581229713080575.268847010852024", "474231780804633958153297418.53987", "8.0688e+4"); + t("911640346805840414733884893534538784856223741803214909.623379015", "1278906484019925720444179959750065728.07278", "7.12827996571199496e+17"); + t("93227509302643255791150709513211.07429051412383871105867012632979472", "272464.32909", "3.42164090301334409408251796e+26"); + t("29453687738968750265780182320735921581434056042297.0501371448639257538906688100", "411740116444390700740758056598633855.631285262061594240201482644211", "7.1534656358768e+13"); + t("6405058589882512176040319211.780904925185197", "43255.777847894147547205473", "1.48074058739746701742242e+23"); + t("6392527538099376.6280009290630753358584493673927", "79469509.79749974881912670128419776087279216", "8.0440002e+7"); + t("194876360343334476666226442655.3420610330925113817471077925", "383.4798436", "5.08178887614771303891880597e+26"); + t("5629120163652013964663712375140136941542940988942778284009151.0790530593768", "82876432600944658019194915249810528598.03782758387", "6.7921844449514240428659e+22"); + t("967064289756767694329723138039399781474062678.898160307", "2285960011009927546768875988017379.25173260750120", "4.23045147377e+11"); + t("97644762359043110685414120821548962899798403.3", "88046768978680627477664276383.3", "1.109010171431577e+15"); + t("93823589306198662.662410960196364078796020793010778080032", "7190.729043924165593592860417964083123225800", "1.3047854916112e+13"); + t("124993822002540896039551622435869499798.31384584143778350964543", "918650894466803131175369150.5388", "1.36062374461e+11"); + t("247179597952684644056881699035151419745147787977622.333307123164", "8853637706378684566990129083320011015746.57485817013845666026370110", "2.7918422477e+10"); + t("35366670561265100727992169442792782149933048820648717.862365009", "19586161548003313192953453.5490093480793052891245070", "1.805696867892448882697911414e+27"); + t("2318553167279443271255738463.65640483655793543633756705528313578", "7570906.43975804083154456135990494", "3.06245122130123970512e+20"); + t("42034526992594230405352674285345.92283", "169384559452757841809640750967.172046888", "2.48e+2"); + t("82881473307503531109377985048321384647956.04996568339358933118721298808", "2884065169131350517942975763.064128359836264398384937198874633", "2.8737725553013e+13"); + t("22345945033634108856160307934591254868.8012599520815125267755499", "43277957256069.212094606859", "5.16335484630581987276344e+23"); + t("4953919543758944966711.50824014751491388051", "2791413813450.9616979724", "1.774699086e+9"); + t("82505924801259036707732838324439722235194659868269154088.56378531649230", "5617309801103767035671839807356663852079.57574", "1.4687800339060367e+16"); + t("46861199121420536574478617976028636417069826676089733588147.5464727", "96129937534226155207337006200370404.361234590028223442792328187529576031", "4.87477682014887919486311e+23"); + t("41209618773916217775336133440994974543936682971912.2", "648931827637529144466628112993249.66230566939525419956734353190287896", "6.3503771919990468e+16"); + t("647370515179137634951532189057150169056356.469295768248", "85546849744977418457527492323915187.36380200015", "7.567438e+6"); + t("928576607292091712859378138341.37877", "12676.497851518013092795965656044336", "7.325182539914953583432076e+25"); + t("254888.294022576507950612233", "5.0920008028563", "5.0056e+4"); + t("651070839176054169346.5724279", "63.429092657946244688788718092558681", "1.0264545997639926435e+19"); + t("592520312.747791", "6514.3", "9.0956e+4"); + t("5997700342224962859078806717279682924264667334150407795.0", "99816575074499663527170214172.43294013907586", "6.0087218357757569914037448e+25"); + t("39651101924524.3850", "8749373.6549232712", "4.531878e+6"); + t("9274856833900596452933419588584356221454651796.2452871261522293796551", "300663402588305055742848075354366.3196822925203290195", "3.0847974026957e+13"); + t("78714814236813720890732479245415302022160114.8291970", "389999753713205692513253843.232444588996781361468806110", "2.01832984475929366e+17"); + t("6940968305815375511785.2535238589855678532454435667", "61051.86510652160649369520540215728594", "1.13689701268011483e+17"); + t("731860419012318378399432352134.787371236083803", "14949479666.87478452397916602307938077319", "4.895557807500032599e+19"); + t("80784287281774387394074508131216132508362431708.815939", "2314579171467569751616572566828.362237158270383809870299180295", "3.4902365094105954e+16"); + t("18762358230636626098456730753291785222815692676.18122730", "37729433645333441073620728338386.9138", "4.97287036084551e+14"); + t("565045537.4148860673942946036700922", "96804.4728558713344872578302915665197489073924", "5.836e+3"); + t("8731689827527071716.452542980", "329.4337388484325556483032593", "2.6505147463188004e+16"); + t("8226836207818090134162860453311885877860615442781.033712927971610385824609828082286627", "7278422088684442640153126021234.0", "1.130304907791500599e+18"); + t("17975819012854816436612499618926828518.918725803062807207677", "986297878342186.47804", "1.8225547684508229737974e+22"); + t("6883836670964966860767875159005738948461277819011199374301698098.53332887940707792650452929955035379124", "6047062259907485005834302693734782626560.852842593848652129", "1.138377012686865209066817e+24"); + t("2272595358608820919830758.63922834972891213468852166345", "5174.5868675439809386", "4.39183922655349103325e+20"); + t("67920964277002612658611530553240223932457224697.996109340917875605643", "33102913577979899256921.89063739295314655284624359146819559392", "2.051812270753826502042244e+24"); + t("655442506066280472309.90519", "924893087363.8976617", "7.08668401e+8"); + t("12971389770902249880901599275.75715358347909374147", "695047489166421262508808.0", "1.8662e+4"); + t("538049.1528880985372536672787228267264685282058", "39.99558861", "1.3452e+4"); + t("62884922762097346.31", "36217072242288.1188626329088835522438182857691393063958", "1.736e+3"); + t("36982395199435414348006362712132205654293718330757846665220.112392485889020544", "5983974636708958949032875131238532961950.3780504021215865996762648003143", "6.180239296564738713e+18"); + t("71162384450576076564185797705656879.8269824210256515890429", "10133604731208315653482573531.86972343827207", "7.022415e+6"); + t("969371600339254828265118428848.8526437790752", "76836705083969387512384032150.19929325", "1.2e+1"); + t("59102267349265458280001859275.572350247469018629081171236", "17722571444612800150078037.3806337318355958412671577879677067", "3.334e+3"); + t("635856112894203035902342801.079651859844832", "324490.6216455149878657982098", "1.959551587869416775643e+21"); + t("11496626271749455819590771908494907693082726431.564858850937", "9251420015807026480730296219.70769958426081523828", "1.242687744379377191e+18"); + t("5586266522979560347614298468558995025901991389789951.992917217389218499874627587932783644279", "580753397778733804170034088806469589183.30903077611411774313315275382", "9.618999293582e+12"); + t("9540190410107198530994381942289002665943247486643155838.240291", "24804592101319623660137984057490757015.251040810616308878755565663819444299", "3.84613880008115632e+17"); + t("2386517175768350878010637481464263337.079511947488116813634823392361372557125", "427683156753694195956490415.4245", "5.580105594e+9"); + t("6645014989837633569621.13367841392582403915619031939052", "42.96752022496360507396604681372", "1.54652047757155902274e+20"); + t("5736718330338745782318444593059.828503153803087049110965035661627823497", "94690867663573124539288115.7181749407602672732650406499995", "6.0583e+4"); + t("4577582455661230307023257272719934839494402207767.7563309778548148077215742197816423245365", "83203568465772833478959694594.023188804339444050628740258", "5.5016660223464991143e+19"); + t("56207509645732333529889283846930948361144.5674", "7776759276001405586.75485276", "7.227626270905054882675e+21"); + t("1359567720.06788441106973585", "99102.491052963404895944241759224", "1.3718e+4"); + t("583805860462774216863901838980966556.15448832198901807325512978674", "3994119096474.42425703955113908532139841", "1.46166362685102404578586e+23"); + t("693777001856849522808825.4288056084047387814349038200", "492580904875945789.91078941808189673840525212734", "1.408452e+6"); + t("95179226009086304165204368746052557.0", "36898758585168784104911349884927.354802683423", "2.579e+3"); + t("55631659696227416421238.8917851599665861984659397057623309390581", "11429813874170059.8665", "4.867241e+6"); + t("3804793895340493946116355718900597847050999258518047817035.08183207", "91199883284905744770392357893051.53931256736447977290180669367312107661", "4.1719284699679165898340333e+25"); + t("27597155368962758339704541018436645975752.3910766378386381678748632672363", "61082895292364281.987684550", "4.51798416510432891130307e+23"); + t("1968485462047071312833662.8", "3570.727131472", "5.51284203348123373825e+20"); + t("51361403908246359015248.88597428", "971321.08787760420014240431423443171403680837", "5.2877884099555748e+16"); + t("792577574914755602585060567095267520717259.77513161605865452608", "96387274244185380020295289522612884.0671674", "8.222844e+6"); + t("64001983010779865329216086506172.2243582034351104715013003", "325396290496854.3", "1.96689344285559982e+17"); + t("82641014824889602802987463507539061296137081974385.345992184578384509592", "97813001794214892676238620119685576.099164255170675133907079088055395644605", "8.44887829930369e+14"); + t("51429878275477.373607218215165471642843251860479", "269514.79886734", "1.90823949e+8"); + t("409003577538383416123.446584635", "258394.2", "1.582866711166053e+15"); + t("4017794.35779095182404974497321", "1.949858145694306536849321361887", "2.060557e+6"); + t("693158766643223341675321795349696070641685236.09576768604", "5418760772171659890772560927426239352931.7770106200193159768732895950794", "1.27918e+5"); + t("36597106767812853423107340822080103649288844136.6069722231717475", "282302474803234933159.17864", "1.29637923979664252678164779e+26"); + t("644862.8722413059444331223975795916972219742469", "62.548264929075049", "1.0309e+4"); + t("341506801170536802375565999614038064447.7297855940242974264707", "53682561275.9267247070722275919833219937579957", "6.361596634989196565630781141e+27"); + t("7908985861763007965029602421651545185761364855121.268942417", "16793989045538311416956411140892211412.665454158340901947589986540260798080564", "4.70941468421e+11"); + t("31533738859974693360072770442715853673.655466988635567099598989226105413173132", "3453971840501.94532941", "9.129703517036224974201986e+24"); + t("8888497757908937230115564677144106.14", "8675987227.523277295438878048335951393", "1.024494103646384117292616e+24"); + t("3832408485883255944563126.75", "23470507232088813361.40379333248482363899", "1.63286e+5"); + t("44412568137928885568673909551103.0", "4609303923025.73374408072", "9.635417598754190502e+18"); + t("5980199495060323094622686412.36801000662261930689900697959426", "564130464.64561936605965841544636735526264816052", "1.060073842815246558e+19"); + t("42668844022510160312097768715558145019410562816214802678.286681256123301472767371805315", "5845762170575892760204767094999936.0", "7.299107075768472016233e+21"); + t("153580616596186472068747513.38940142804308393077430419129275642755", "2496443776126.2457333179815663759811866", "6.1519757851105e+13"); + t("50386864955601032867872486555643101.85213563998463737619891005063733838076", "1624371436509170901416990548021.667918309610622619078595", "3.1019e+4"); + t("12152881302772810116039892499942.008", "656950854431037026.69687990251623343210969", "1.8498920004142e+13"); + t("93760332495878064292466041.71", "233540814.5857575", "4.01473004460420527e+17"); + t("910859566602409178144.2", "876677205.717494987924045167903047408551946446", "1.038990817443e+12"); + t("4025.1487051565297843490074303315163578020", "66.16130299", "6e+1"); + t("6375404836829202.7333829751919053178915219731553", "5229479132674344.448094528210294672", "1e+0"); + t("8400233618968760824801844.3581979200830", "4130786943730816203456.058913094982907", "2.033e+3"); + t("796421.11453016934151355", "343986.56558310355987", "2e+0"); + t("6639929678119504878947.25", "96859440.4053734619746358", "6.8552220107098e+13"); + t("557629736662030.50806408951252974", "238395.20", "2.339098004e+9"); + t("792602563830327630617720071679475686474354492993017.9926091441078957", "125147857962710073161102.87606826510", "6.333329045603776992930610624e+27"); + t("4627023788931064878124628746104079817244198024917313366166138422.1570808733600", "815738692378904775832725069924927990957.397915671980498734685278430738", "5.672188694933015991094016e+24"); + t("9439333403176876890363560254484700606.86", "63082293493230549385786879556845.712215613078084576", "1.49635e+5"); + t("2733443019935446615635364481.104981558510317617330", "331510535512988.315380", "8.245418251053e+12"); + t("37902328487171282033743961194864143625182011.1662801", "110983332772099550179781835746.3640329334259423125968073885804169927149", "3.41513698863255e+14"); + t("9496321.22914701121676628", "39.3311222595505274959486106", "2.41445e+5"); + t("835638348474609789515956933.06717723489839192204", "8325443822870684996.48184175349500213896473649078400944468", "1.00371627e+8"); + t("932160263119977217772090188274.21279235201503589269039635889539291883", "2835899214843529946087133.11283853499855064716", "3.287e+5"); + t("450264866.6275081527659", "87.79963962373938236194326027135334508080", "5.128322e+6"); + t("1799024761260895898937518585982847408126649350012958291691728.553452", "7737306728355044167456810268341347.4742460461719014700987149967816", "2.32513046777372569198422497e+26"); + t("365858028137169430349738214047744690765.600147965741196260380082202776", "36297751677518885339399350.6417377299782620546077350609637930626104", "1.0079357845289e+13"); + t("422939609684291907.47807319547111869154773225694", "5.669087579160461785923021751469004817997", "7.4604529173092305e+16"); + t("336225964209286251534670898409176.7999702692719126784263708", "233633.866367", "1.43911483997414615081599198e+27"); + t("8475749899217974687795958718675121219516.181607683214193278712483174162967696", "2392113753076465.2733785800390260335562217279", "3.543205204316653804720413e+24"); + t("648064533277152731636694149741417.0", "478432733699912.0246299253982352469883971883298", "1.354557260882653312e+18"); + t("75575916009381126069705419.640880259918282", "23300005784058057158257.386529481437978642261113085121", "3.243e+3"); + t("774673439062933591391270466801445534270076.7386165104152570", "685455317640794938980.76976768652859796462690616604", "1.130158916454554947282e+21"); + t("732472474211574805287505655.9188080", "422214783125578470083787953.285088274329", "1e+0"); + t("3323950381639456571479885881658157095.140", "458742653.10763637480673", "7.24578444825697644652746652e+27"); + t("77221335.57381020778982003856627720864096553", "629762.10776099206641600699933138667050138", "1.22e+2"); + t("977287057364828231831.005384213880964476071738838783", "441245095952.1728411040920", "2.214839476e+9"); + t("4656164015778698194.7427643", "34163427.003143749419309395853876705", "1.36290894217e+11"); + t("587079066888787270602134813353500.9315836371295975970760048758012403829473", "1033927619199386247.60425201715751690347050", "5.6781447365086e+14"); + t("6504820824.6679", "244533.439467270497421", "2.66e+4"); + t("594242888128145797482002587731347748403304.38672682292524749769", "5436414927778610.7", "1.09307861158964389546037039e+26"); + t("989.656128573591134745696183496715069", "34.73477175628767959355518713810215373319", "2.8e+1"); + t("120369063196541563112456357675209274396896134191.00428225945", "79264329028251723320.1774705279", "1.518577961514556171965172451e+27"); + t("58414822992025969288274937174517262951433342166897791443604.71087680019355101373372382877339765", "54259093314317983827744671065849.739792759423736052896955777029385081393", "1.076590474036014978745015363e+27"); + t("1893572691390077779880.8798", "63917.098849", "2.9625448048941026e+16"); + t("117105915719721336986102833649470173042927.6845904617613922858074108509811", "333773878999877823.520844744800865894910471122800686263922", "3.50854045471198191330232e+23"); + t("26488378327897381716452599.82853", "75692651986696063.3213353397", "3.49946495e+8"); + t("20674501736171706714386659080.33987650601226792768649218", "37224374605608504973059.66319793943848478493689438465572", "5.55402e+5"); + t("488668888954306581773387452820386.50275367736471579901880632943792210263", "424971412.314919369846853566543", "1.149886497758548169126868e+24"); + t("9414299273169503353740070805208412425001376125309.6494529706749228", "649198730792783830398295123038.231006511305116008163545769339", "1.4501413552785319175e+19"); + t("8837663816566420476673692992828192752926654623.3820298251338", "1000505072899959919210115.68884512320089", "8.83320240541158631281e+21"); + t("62640550960750033485.161416496332923818538", "551009212582214658.0850309331075223732119860256757512611", "1.13e+2"); + t("18279447400606728962079824580221915709.20093", "44249934066501551647833671723820325.573014982949332765767790368980", "4.13e+2"); + t("776261796756651767293668987691727663279875601087615054.70838217536832729780", "618413129352061650023022110189682.959376671530710294265584778255638", "1.255247923940384376935e+21"); + t("15730379995642783522033341238016121720018756579287469.53566562634607645106952749389445433683", "68301163568490831992380058.665860", "2.30309107104284118981937299e+26"); + t("889734378202484475581878128819183811697078164443.14565084281602", "68395823891803288251380393538883565945.26547129989242737", "1.3008606777e+10"); + t("364315008770017468358113939742493787326171.7855594", "799780067786791936.647", "4.5551899008708202772452e+23"); + t("18748989359411410187093728553272118179776164624.79288559651828723940141507770090507", "950112582825403040391796097478.6930538719679703915366", "1.973343969791084e+16"); + t("1171084325875.4446225348322", "90.0172338618478200509825", "1.3009556899e+10"); + t("2065250102941880307969219804513555.095062", "1797856218617859507488766535234.4044247712288678619559217322395206786988", "1.148e+3"); + t("548766408492366309880682898409.8530984273908359606505728637337989455659", "367458008.139188513732158501695423998857", "1.493412570517446537187e+21"); + t("444677165645723563306089367825908182929191.08964559115323804585", "2370949907187948235305802.36208925477214748336986668759410", "1.87552324196140612e+17"); + t("46285062301054914436645816994588244411429108375.538183215973994207585288819216075831048", "136463860344306334886102425.40085747458", "3.39174505134729324576e+20"); + t("4885123264349473011404996618821001197721833035124.6", "64344104993632648195924141700927339579.1127718859046238322211340848505609", "7.5921846528e+10"); + t("8527098343430191438975192446424493491958946.0", "27112973650638679113124785110073327.7088253327631045907703479548900582037", "3.14502512e+8"); + t("843048576064275489790467362477723997.6951146198517759929178177", "63589299487542886020184435860209963.6059875060655921", "1.3e+1"); + t("388979443725929873035622799.131196516484091384", "55249117649795546113.294732338780674626272131484691595874994", "7.040464e+6"); + t("116736702672372229726597847132478823564405740562059.50007104141245180", "40948232623253264853612392403.64895458796549183668952040", "2.850836170303501235954e+21"); + t("2492647031287379964435460781.0000322662479887755705529336", "55050637611724888607.0", "4.5279167e+7"); + t("16992122752687446745002805212790371152631729.5813386522994341164157008", "968361709437805282602217.33760138", "1.754728898001599001e+19"); + t("334460218373859061266920082.83592158959030", "130034558556902541912194.7510446423718827904254408178", "2.572e+3"); + t("780518698732439267132572446317593359618462.56173280268", "27854048834290010065155.5046591169557067059585", "2.8021732257881797994e+19"); + t("6372593567849541999494129145.5970", "18.2439383764900306", "3.49299226753668283155161926e+26"); + t("964255508932309410212037662823733721301170254666458.2889563588631864504513496180233497", "684763819810975862069683055938450341008.0093475043424162143679799949291", "1.408157792563e+12"); + t("4945973223760108770860653167100409478716899180270137669545.8204083501846722785429534187", "54143998752657849905388022730004561.249426920186016601478396158204493069833", "9.1348502838780782906863e+22"); + t("95412058468584656926318451839723.08644800648533", "40141416271939471871836929326.10509090738420761083011", "2.376e+3"); + t("131745880157305.8413059469987124356254993429844336801247", "32721632078350.5104514632914633356280387859", "4e+0"); + t("5724677863015063.1981069184019357756477", "544272444398393.1366742806928", "1e+1"); + t("879850028955366298821171490664419601687932576187733.92426359314744420046638752451714051", "4921328677966596268308514832403356554968.63970470980141334", "1.7878302518e+11"); + t("91458700440845030747247649.09484", "380498.9084975880475582880", "2.40365211038246066886e+20"); + t("5105248384156310477483847709.27193077830735334327510", "762124353200103274312.538621396670007835495536810190956950", "6.698707e+6"); + t("70912319558160913584743566839718563110943976.9286007329910", "9121926192939404916619411198828855030.97375536513607418710635520444122127", "7.773831e+6"); + t("48260033607911589895643426429677.399378342869093", "8866717097223287064.85285269790401564636952536203808655561", "5.442829976274e+12"); + t("4241534910579192804542571508724905003322926.70406", "3735337150041905838584017370718997540631.7454018", "1.135e+3"); + t("8208823070773994924478395637634.2047014111937409226484", "974282901837711.772967933758356581452408", "8.425502546837627e+15"); + t("28366693965832816989363948708682028.265866735838052407917380", "581752801.4298", "4.8760734621500263733226331e+25"); + t("31072548776170976987968.042971306125685670133932859398262", "325478.0851041", "9.5467406864682824e+16"); + t("75548981188587472919633956.992631367600938606851842", "2540521549405937737419.0143498", "2.9737e+4"); + t("697859488464358546038375437817655711295586979071525.8503476333610581722438767283", "5731639709806250101606802527771.4121625967025155313", "1.21755644771319495558e+20"); + t("351122538216878516792386564259.049", "54106303632724959138497353.0091585141717", "6.489e+3"); + t("8809597211168905637.098652129530294915846", "8983599481818.979459720310660682972192953163", "9.80631e+5"); + t("1728708563415941940086203.794324", "1071376602720044.852562", "1.613539589e+9"); + t("22806891597004711966077.699013", "479325120881635355753.7770006339554837609918893911085676", "4.7e+1"); + t("638577089423173124033878879944099159959139409.3816935781732076301616575373525629225", "8483818736750661487041699402167.060460488588264", "7.5270006259911e+13"); + t("9004807819814488719168159771153631523999067.830302", "87591023120596495214689153.3867302495777428524082705440214", "1.02805144853902991e+17"); + t("5085912487300437681400422.9694951662826312556", "63911858290.3", "7.9576977158123e+13"); + t("9338356978160104295315532990932090424.1932761", "26156833135415571674.5726839", "3.57014051732288935e+17"); + t("44325675592262736297656618986234547463666335781851325840056.02135667526620128595", "8133263073223001480434454185962150.97214900757", "5.449925225976690217408235e+24"); + t("2624533365963783630845531.55763635971275746967672", "334239053600512.95360082641561987173", "7.852264233e+9"); + t("99212442272871592262065490646614558903179938078409227.085304129731783165851355", "62660147219089824365023379901717.84", "1.583341991297554304794e+21"); + t("316892334348803283300740.963014662126978804764731714335", "49.82523850250185751", "6.360076617252745871987e+21"); + t("30692950229334301031331672911451292920211558.80975236148397198595877", "26066207311649700327.5885959916305", "1.1774996593239240779141e+24"); + t("3777678164868474.819138632271194", "68967.86576074036902416", "5.4774468126e+10"); + t("51065608944378517112134329010831340183.2941187", "366496307677949056630789.1", "1.39334579570311e+14"); + t("45885182901134873.637095168246291402450697794227338", "35256.599914251808371074147623002262229771023", "1.301463641211e+12"); + t("359612826822443561101955855534067069807.8857144965820735", "305070573641160183759072.8979984730616749534", "1.17878569057086e+15"); + t("411829970896188741315395475047815.83068409829074481092942913141131", "76734534776378.3347704319434677008067878567", "5.366944259144253024e+18"); + t("231951931926.3774381970401", "84917559.626574267921654043428852295986", "2.731e+3"); + t("8360204881039968772919143230381.81930437859", "8967686070600437.002746464634054128", "9.32258869815701e+14"); + t("74507019.91881031337041765338828759850849179", "34.3218212574383046476961210", "2.170835e+6"); + t("258149347393794828261579665192468197748.66486445752482955367874", "435089547505456594.84815787", "5.93324635983256518267e+20"); + t("2843079409804570572108013.3", "70.9451783461957", "4.0074314788963037230276e+22"); + t("1377128112032650878841034583088679260997985.42416876080194", "21397435384848978.893113547162", "6.4359493895598485100778808e+25"); + t("218432319644457421305162.401835860986944152509049932", "407214205.1937655338", "5.36406433907482e+14"); + t("907985.6567558033094578292300927378817867", "93850.446607385442111685", "9e+0"); + t("5948611106662732283903895862826.507", "992167115515033581789318610.758370667106258628206501856092130", "5.995e+3"); + t("5308731349023318985589323817683459513.9685216237281288089437997488999877", "46629198534935.894162842457218535816350781199264", "1.13849937717584178742458e+23"); + t("979426870038381078377985421570.027996766908635541576250", "937790990997853111332269.3559926248560", "1.044397e+6"); + t("5202895046879436882836975648603160535.289156272206444", "1322515986198931643341494669903.78544330", "3.934088e+6"); + t("432734050215788.8683282", "62325116564.664654092300350081811661943", "6.943e+3"); + t("31502315244297516163490365506938780417796910.0", "1384815106987231572431.553817608002", "2.2748390803472060435691e+22"); + t("634371348736639116832295001776.65500230", "4412275558423696692053708.03689304780821978396387892", "1.43774e+5"); + t("93386857934649730106088239.304114842548213194199071181", "3618484641170703172128928.424", "2.5e+1"); + t("2918650142879345661011245097537.07", "6311171332659.6451", "4.62457757686855912e+17"); + t("524425924762470946176035890480694342268414828.775323811936309625549", "727347521521977465470337542540286018.635", "7.21011496e+8"); + t("5629534427223902812688429320.6057590567538443", "6795110015243353401.67557455", "8.28468474e+8"); + t("374152685740399489053197877871200862.877211010889052643353", "507242438266770936593853860924986.37868214297472", "7.37e+2"); + t("20569633853349023540430901730460194655391536018.315582825834", "5964675384634528421.8746674638", "3.448575576524753307873079131e+27"); + t("74122414922133904122126378667358459096.36235455752218973737795959", "4875294206278295872.8245110651979384776003117201", "1.520368039054560036e+19"); + t("5040344467746021934407447354622712.557653653723784664260912", "52478595.81171317662788340674747770487", "9.6045719017143013251272835e+25"); + t("168256655361066610448560474611231502419180046848009680959203.7", "6231517121979307187693733815433845482.8419146079106875868892148695199525764823", "2.7000913592551200132228e+22"); + t("989604660969633182585321729130944898270146.5223", "35391258916806180870606672993.0244502", "2.7961838353811e+13"); + t("497762151474232632913608675861135072185.54658079820981848050202132048389", "1858392513545639894748695.15108751606616254891895985232302924", "2.67845542772096e+14"); + t("61908209351270.16475164", "973.19441720006446301081", "6.3613403711e+10"); + t("6471635686464059575788503054149569453179426343.1840496281268409794108671", "8808614265074625092460794.5608585", "7.34693958858378159572e+20"); + t("68482047134678499374073535307346761265849781283137392497.1426771216592749255872243439847190980", "76453360579112893304983135557.601550292802095092097868537948763", "8.95736258235688833414571268e+26"); + t("943569281336244910946766867838666154.5290089569130230851", "4417550502.33344", "2.13595584439347649878052438e+26"); + t("9797177555993974057849706470.1450943513242155902867435762", "5167758209477555255.082641754247006012", "1.895827389e+9"); + t("39.3606089079664786581920", "3.69170", "1e+1"); + t("30577848496139497656061740899501094743941244.8500151877385571", "90787177408984109701540649882.8433289859919", "3.36808009333635e+14"); + t("89370053571336534679011.817884735230368562774518835", "376467.60756575521400", "2.37391084319855681e+17"); + t("1575163396854211836236965797487708259472166210952250022116758.62583877509", "26040484517242182429818575594085333217.3388246107023856153521568481", "6.0489020310326757286152e+22"); + t("696608122938281102539263073547.95314717108", "5679391023780094036.669911487", "1.22655425559e+11"); + t("5436034939939629823888268543299451017440.454250887392220959809738559154352", "2502779784018130815116190.65515950836586422899148740781515", "2.171998900843067e+15"); + t("160306956090198788059693348858808753931552942000535108918676.21897297186109016442739093072891", "927928162504937776458216727283956.323300517000169048257614", "1.72757938133325862905695084e+26"); + t("293797359376817008144668384802447572.3764386107124", "501128527366910.73199791644834685007735642783398844", "5.86271471952559015306e+20"); + t("24831324193025226341.0", "64558925.42312", "3.84630382712e+11"); + t("533485089686200350775137697402200865376695282543269147.23533326145204295", "460565610701955988893247824.9106050912860273813175768466107", "1.158325930746558620816794039e+27"); + t("58821629618378611015847259936060891032758903.6971980453491017", "428400877719881294180.6529908", "1.37305109950872558010184e+23"); + t("20931473116681535831217.0", "414842228106.08168672", "5.0456466816e+10"); + t("629230897716929482.32960452558", "8.0690242408233115348099494", "7.7981039458709916e+16"); + t("7655055639165238511317463726763855304374382237588.050610015689216089892249218479914", "92749486699664993536480.9751", "8.2534749372288312468063535e+25"); + t("31844028771920351958374345661002220574354837502580133079626.7532363953718116700821093000116510928", "136974103400501161232583400814613088101.7945120443675821", "2.32482111445628494888e+20"); + t("41839964248999070703454850042037890.239112587124232561561339543508351067127", "273196418511407991438383689.4431498102789532280", "1.53149753e+8"); + t("9200633792893293261278693120806370309.611089663058207949587461558760498686458", "348451403790040025950163944474.46371619282006921462242273336372713272", "2.6404352e+7"); + t("45451838299322091484332414760072649150758790938341.7676", "800335918595291521630791346.263509434996689116875", "5.6790951453355764021581e+22"); + t("73216481323022991342477901716008097.0525124284772470133466660736098811444468", "173864275.399067094399881265024", "4.21112854581372211457759023e+26"); + t("61835797619342818029306328618170752667444632.53794473092725974985", "8502821305914898321953677.8156065455872895240798723062156098951", "7.272385881651704826e+18"); + t("773387774539406095197372040503475159809686163.5635669715466074720894926625029663", "8054330790871718934724555870937.440717932113229", "9.602135728221e+13"); + t("83602318215136721787.5331349762534991826319306", "0.25516", "3.27646646085345358941e+20"); + t("896023331779796818654049263822.897505196222086420708451", "307.2155960716622434192", "2.916594545450052966656343157e+27"); + t("1836661677021546482706.353181215646635", "5950287956751398.73169169424737311297", "3.08667e+5"); + t("50094830147435801921021467357673.706648", "6398487.5682678664286990264190048622", "7.829167379471359287854063e+24"); + t("86245848859.82299516945749155", "972004588.3290128504990028276356531", "8.8e+1"); + t("93409301879706870795110440786716125538.475952535", "54688335233161988953263.7537315238534047949773", "1.70802971934434e+15"); + t("17450536470.967537888", "54899.8922267571045", "3.17861e+5"); + t("91257959785425622.0298785306198280471348361", "197954540027.5855929991794442334851024397384", "4.61004e+5"); + t("4202536605240358069756648239541895992276639753295.934857", "531278006638819157953.2397208386366398106034102580971908793480", "7.910240124239483639347289198e+27"); + t("18407965143845580576350416597248667206215366170.844708780301969529007119404728708", "92629597251971014171828598932052548.39166289650913864806229648401", "1.98726602403e+11"); + t("96264329543942208255742727502.3545", "34432528228141249488567451.918", "2.795e+3"); + t("754446579994069814.6522571348308", "628724229431161095.83609398509662303272933115383801268113", "1e+0"); + t("170574055055373483852079.5", "57.2143294972512360824", "2.981317032887161957198e+21"); + t("48961691322516926824017033399929409897137214.761039821711860575197515216987090091", "505516504973477773772390953529.164514275675936866296111582", "9.6854782862303e+13"); + t("92187073172881502954948670373537813.47812852532158564268343019402", "42642313665864035462857.4236383474969667618", "2.161868464625e+12"); + t("114324509096175781545191660.5076906930294633074814383842", "44293132129875875.7446847878100495", "2.581088841e+9"); + t("69817005725578817678416821739798701307975.18318091450744390761689273", "1426798825565743784094673.939", "4.8932620685257076e+16"); + t("48943208538423511113953697075456400596606226853311.0", "861168984548243515809623268132650.91745856510741750851964130", "5.6833454776704937e+16"); + t("741387728060971108963531137.0913114958122720632615583366", "2618492562414160562570833.86254242276656726923358307595", "2.83e+2"); + t("7218068503304897168145406982527870918.6303914185092452486930342230876442", "75168674387793596406974416591426.1496078649831668234746598", "9.6024e+4"); + t("271036477517035033975043752870456515584.5993738217652679853953574", "5259877412151.7785335242", "5.1529048355930396839766319e+25"); + t("2228272676082608727491.34203168554193960650", "5324210728657560.20277789418656976201819659642400528", "4.18516e+5"); + t("363830937077844409.4764440905646484992434153538", "957279656569.785987882004", "3.80067e+5"); + t("81051533892191039560015819249521712454183090611.0798349549460795452793", "3931220250450309009331206243668905152.0", "2.0617398346e+10"); + t("1952060075559595864752523843866665624395383613.6272243537047174177377211324946", "984070219762854168973311364766521387.2641157106071", "1.983659332e+9"); + t("490499388437329.21533448493772433971", "1119.1328994110799543709582930", "4.38285201601e+11"); + t("81956558749460069678928850000725724774712599125965354758.54", "76370361609074674458760711950916471.992", "1.073146139715562349967e+21"); + t("5863793442974415.80153236603595931237654864826109791470", "3984146318899987.66919425100257", "1e+0"); + t("85809301.08220025655578", "48968276.0", "1e+0"); + t("35396154886841444190999037918091202805035781232270.515818099015", "9218467546648761517485.27813851458", "3.839700547593639511962885085e+27"); + t("81873496771173427028241388412904762756.91675153501842092997101", "574161444082.2118860476463958415", "1.42596647014581299076400842e+26"); + t("2876299592495519957824718596573.11367933890816118525952626742", "3945333.501453574", "7.29038392175416528401649e+23"); + t("8465011800924324937014295668646.6097338156509015", "8734411241027015785811.30533685609560792834974319673338", "9.69156542e+8"); + t("2715808428862800072950042020375441831566006820665941759518285167542.503732228", "2427333921802245216654971196321179764345.0960557", "1.118844178985629016048576325e+27"); + t("9648464517206942465009407066172161553314248003911206718659.479959349993937016183770868536261811", "7446375787730027060043405327322.4062678285715815821817", "1.295726242168098525728935341e+27"); + t("3051022926532997299164629581742013507245.25609871536501059924061465912869311", "22560867095894060118140354.396077354652863", "1.35235180171256e+14"); + t("86597231946028939866529694.08292297341417", "52556536560235760169928464.4371111293", "1e+0"); + t("64155849083282775727106565564.09683837323626863653486184704735686", "887755006473.17981", "7.2267515942441496e+16"); + t("458238468121892050492777440806399723.51029", "20401446313054.48340548535", "2.2461077567264154508575e+22"); + t("15697792352949219.327716733457", "18643984669.488905958968185211597707771110", "8.41976e+5"); + t("49356713849410104382776046.29609499", "9600.3320897019953", "5.141146513291311593276e+21"); + t("237628674750215981635095192318367418899899327519.3417067", "99870843925964094624234622.3649438352534", "2.379359835252559207898e+21"); + t("533371823115763843951555557624614062487903.507338370987667117", "1124528302131838269150637007598757.3828654998", "4.74307158e+8"); + t("692998394350964907084.1794689035422872582254093", "106.08742097871375644", "6.532333314898980766e+18"); + t("563817454550622204720369034118279206692924648686972046.9250246162380168326834950", "94212526330251570476582155947131.99955724099948672", "5.984527498755554008774e+21"); + t("60113394247283310838484270771514878207983.766785778804191813", "73579044220522.9248281034189038321239166369841042528520", "8.16990691902957231989970303e+26"); + t("2195460317024982007027.520694010929929", "7.906626405205089525032703861357", "2.77673460779640073159e+20"); + t("63420086214693422141119967131969872.883784598507", "351245077587626195806474.41244888248299459326", "1.80557935929e+11"); + t("11430366298089988657644762834809212.056078289510945282811181517544682567", "432162711472718490846619825.082421", "2.6449219e+7"); + t("119511160387298190586363781744507297703146760717.676834782610199244791291020733453846108", "325012118935394438939814.8416046143", "3.67712935686113572600204e+23"); + t("4819163049355593489964336799.90", "712890140928620741222880104.17672760761076902033211671870619", "6e+0"); + t("5429574271548987853127824844129.59540157053276302039437", "3550063252188102650232708.2346262119937035822658588851471", "1.52943e+6"); + t("17459526968945296716557475697545.883680546567004102", "764651567.959111107995775862448235699541204", "2.2833310883734335714304e+22"); + t("486451658916108573050605230610899764528305498016322.72928533465528132043305389892991", "89977301967353766174050060632537.94765", "5.406381923883498768e+18"); + t("9812801303507913382807703084162416821734530282134921.9389935751232203", "5766199104262958232513611700618022806735.3529287", "1.701779825163e+12"); + t("268738770237064607361.26199", "386334685121563.152418284303359154345157759918872503", "6.95611e+5"); + t("8836033937577112251809.81970179529687429478", "3050412231073542478732.44142275907", "2e+0"); + t("424408.092849042", "37661.2", "1.1e+1"); + t("140332624677141933211867464082417944107641117198278.66800176095", "82870716315480526319164852766.84431933315300", "1.693392200725159300691e+21"); + t("164162963944967196002364161509895429188439760997063518.96915565722509113659735125371883836", "26081221503935511559836204140616618.1198911534840439", "6.294297371010629848e+18"); + t("35209175801549132643285834701.90066452379", "20144.22592000666906224996338800214642256446", "1.747854493956026685231981e+24"); + t("4300524770734216335082744915088556789.0", "5690996406204412719187405509.3", "7.55671672e+8"); + t("401961353249848705352564164795538451994065395934.3999784608165760770619779275568", "7302224058177448742737694008979.59300454740986360367730982838296", "5.5046428327505146e+16"); + t("86378272191344155490139082190444263045830.901712616968968672384456975", "71470631877176403770470397534526521.7034218557546741752055279481973222907", "1.208584e+6"); + t("51325968783742120977676085084258157993302721461013640409.17703", "5698175068781056014611238017.1194049", "9.007439779262816774136069756e+27"); + t("7560786.390496127", "5.5345", "1.366119e+6"); + t("138863086.9281", "74389606.521329767", "1e+0"); + t("931310492502983715448716195108143147606116526583237141420.7719854862045544791366693525170", "5055800853185777459170883871225565614.8233515616544829966", "1.84206324486879929034e+20"); + t("40573829115419050101423263510.8064493689271314", "9529051001967140863315330424.8962235735", "4e+0"); + t("2642474773370539644573.846027356885139196339313623032333412763", "6.0", "4.40412462228423274095e+20"); + t("151070187965.3707401832235214", "23.48357234618168833", "6.43301563e+9"); + t("9300538177433446547188.9280117743211754518", "4502329260313.22408330534712358734374683537379365193", "2.065717018e+9"); + t("215042801078074574976683040.0", "8266001448451.63921174", "2.6015335518523e+13"); + t("764803224894813157446505921175345980083.74546549076", "4378198618054804435977069972433487.673592659283417335278057539", "1.74684e+5"); + t("824486952023835299294807662355902426682974.083786", "35907690843579614909051.5023", "2.2961291373913442058e+19"); + t("54903489124748598323529.793968669069834977444568670", "65417.285358163468116434179564", "8.39281068056382655e+17"); + t("80944338663865565814713852408.38", "61769163293759016580625.660811509", "1.310432e+6"); + t("1926230834079012299263182518652.55627834234476512950081618", "923834854177542946228068.409501673406972130568004454914862958911", "2.085038e+6"); + t("19618101600841856694.1727651445711627002129", "17841521302801279927.83288787042208976848180388359388", "1e+0"); + t("584039865361652690686302377225386639.13854279100771071", "8154682570892629793.822030620613363177947698815281", "7.1620183898552703e+16"); + t("459533853470889732705547695280332999264443760814905.106260890", "479639882096629005830784.930033387912876507068482200988", "9.58080990809499279833140285e+26"); + t("10087317799834.03718184933635283321820511195", "92.016867317151849226040080059225677462", "1.09624660064e+11"); + t("131465139134685765648136766.340366550389254321932", "16146700648.442256378", "8.14191964024358e+15"); + t("32541564719436719559490281443785.43108810661285365036228048082658", "688405969942215.02988332810975631041282950252261", "4.7270892671323385e+16"); + t("122460857129116448887315603312538889321.548018642648817", "2268641736150702117171543104584784335.673939746559575908887159", "5.3e+1"); + t("367417332468652914812097284826107934511645.43", "91736033054162029137.6427263493947014171944448714330324", "4.005158281170992158407e+21"); + t("971760611992491925.54338202598020", "986.84442480386397178800071536640447556", "9.8471510561113e+14"); + t("340490588.50764491734941885019470906711786375", "4263241.750886902445", "7.9e+1"); + t("226183388539294343586586303110168459692954908764826547.0", "86745014870815815830297985627.0001805530675510236607842628717", "2.607451147205816873750305e+24"); + t("14057232044306402364619170284589941.23187749922579299559968580264914959", "4840969536436335462195957.592597022426007981189796", "2.903805103e+9"); + t("552189894.0", "7087707.765706071403321702171562408048111681", "7.7e+1"); + t("24276504561422192863854991.92374470004020899881390669869015", "8751757082211452020.0897771876810067", "2.7739e+6"); + t("1512721932254306233889.273637582", "17556541.11552312423127636", "8.6162867862211e+13"); + t("557096761753924832177147529824169573242356689080347232345.79678", "3736514959036238790014270880270700467035.3962774693798803", "1.4909528474030707e+17"); + t("3323405336377158232197294287.82086456781421866728554", "8356533063151.4694342568938725440957210113170722575814", "3.97701452415939e+14"); + t("220640196995143567374001122016.110907295267401095453348683", "37.174992158248244086099029277142338739811", "5.935178037319068276595164618e+27"); + t("50390659887149153421298.0", "1850974969302907.304813168340340692703000933618277725", "2.7223847e+7"); + t("9064774049223140371550605423344.893477", "968198891361906782353832605.0896311034634292118142013277497", "9.362e+3"); + t("87609117962016584220698707830.9803704377612089423639053", "28446132839167858.16528005077336", "3.079825242234e+12"); + t("4113765531.6375234789707476488597819636052834", "5119.0738535118570308085279254669345", "8.03615e+5"); + t("85919371885787677473760061397312.9347654085343258734742087278", "1393586.0", "6.1653440753414340753825068e+25"); + t("580820148874038769205.8737772", "57176552037.92462632955934645851968194010191400757", "1.0158362618e+10"); + t("34416747793390562233441330.652505492669604433038", "2.9006372989233846373120025", "1.1865236583065679470059039e+25"); + t("611675614481655117500968303318910213038853032.170527534518160799027854811815", "5747036287202707371143079617529.34904701751831118809786986512241503204", "1.06433226434242e+14"); + t("2538519921671621.6", "12588548518.0637153942747619217819071653445", "2.01653e+5"); + t("8169713234307006618070378734.4366051506965198817890150721", "8022882.413370", "1.018301504792381787747e+21"); + t("86201439630585044365038308732.69241", "174154.70", "4.94970503986312424327556e+23"); + t("9703307875836954050302915770653.5006178515495594361060870543", "80541.7255288268870679439438092474", "1.20475540002728390319806364e+26"); + t("27414798.42261007811991881558112422474950548", "5.001007587072768974970347651814551", "5.481854e+6"); + t("35695497073543915770986412.8440883", "784117886046309.1561991312", "4.5523125678e+10"); + t("87958233319063300964559411135476924335417736205751272475.0", "5722695385403642769976512049652073.08122872578060932", "1.5370070813730597161003e+22"); + t("28870470584885559979180367060997793251.9458770229981608111026979888901", "723588591052430584652204831251120.12838074602677268884092", "3.9899e+4"); + t("484933748610956934.47700527370", "12981.212", "3.7356584932975e+13"); + t("8126504568986305331935055713958335.5671492266807229266951803", "519782549077776669059.77090737243041411560882", "1.5634431327878e+13"); + t("55751811791259483647823990951483.0", "908126452022542960697896.5916051381392790468202244403", "6.1392124e+7"); + t("1948695236331460833964919579913203571942453373.2777627338870", "9782044122946332936568261842392755201644.8393044734693675219", "1.99211e+5"); + t("62727055281506910370273437210483.8857", "567745.7015834541805298558646610754209483242786", "1.10484421293829070989243895e+26"); + t("5091959395871698003267111313478.3930282513482774", "1853117282823.84571", "2.747780425485207302e+18"); + t("545938243671057478539883158.1701797", "63484705985497792.1901323771809622868025", "8.599523856e+9"); + t("62185571391527882074520530900922983055063438.3", "8132189321579975808060040833041132.5054769062768231989", "7.646842557e+9"); + t("14189533280272285522181426322083264.813727", "4495620394504365095179605.47822357956638761503516116594119924", "3.156301474e+9"); + t("3344.8457665459740400719", "404.52834953043956863339867078569499285", "8e+0"); + t("9001461502259033.96344026870345", "86427682285.2024330259102465418590937015910", "1.0415e+5"); + t("9723935868793796935386841714805114356.6682737", "10657456542385.647512973222742463237992912427340265", "9.12406804580515409844635e+23"); + t("147228461297369670552030722260657371.0", "56606316550133403276386769525380.3", "2.6e+3"); + t("338613476612936820.6080787952655111841989226343115083", "332.2219230446732547", "1.019238807330015e+15"); + t("416684342300044414140161801.40782766874545811239465000", "19945435058137032.227867316737888305805966836804697773", "2.0891213507e+10"); + t("417315060548680214158514722481522252838542626059.36278712651463579339320939901240848", "829914977763197458583245996203652116.8848666032180229404696", "5.02840738786e+11"); + t("6002019663528594333452543368414083591.5214270808120156894", "621508935485425828324.0", "9.657173567168029e+15"); + t("6634005133357052451687820090403.454214503998864567", "4395572927917156531546770565399.1531171242645042057", "1e+0"); + t("561358196950822401.219331193970618850927926", "284094044873.429723", "1.975959e+6"); + t("96655318615507296355355495509191724349087481421.443366160438423650455312664494", "874385663187385109096974951306517.17058901699706997489060938757056530330", "1.10540831906107e+14"); + t("319355089917280495417975890926.0520068968103712371405701029957", "5695608669464798606.8", "5.6070405895e+10"); + t("6589390657819358431145194.3", "4816208376091416.4092260609510653840221", "1.368169759e+9"); + t("5749207204280111971.2399521327579206", "66529.44005149597717850445686559974354830", "8.64159866644e+13"); + t("25764054577770392742769216567530.5291120848448893908087666587441447527269", "55456959929839256.945", "4.64577477928207e+14"); + t("267192937054112929962259218278.498", "15432851717050353.319030872004920819263922925152", "1.731325758537e+13"); + t("83319775729074952878575984405873869997269.2300715131706353767647252433118", "419776246474292174386248279272614367.3064065847293656934464", "1.98486e+5"); + t("574046336479.3351930280634467150899678620165869701", "6.1437964", "9.3435117166e+10"); + t("3540182073920138072.026853859582039465", "253208876988.0692081973320", "1.3981271e+7"); + t("9696575248.21815763101560149840735433053481716997", "55942.44194499822718543729613724768383737224", "1.73331e+5"); + t("55921114169344145191055435.2610620944516952481039", "9348400660268970144532200.507114435077496149942220", "5e+0"); + t("53697301590823117750393292519687928.74", "89874089751736615846952289.255365960779471017146746835466719349", "5.9747255e+8"); + t("78323098848769137295265.7869219344486", "5132901523696.5446022535238996301111552952", "1.5259030099e+10"); + t("102948125446933881360352618908870409248110847326846.2979756693", "878653185315123406289344586830412199992.7979934870485306494633", "1.17165825114e+11"); + t("4008793273264.1170983408822972440861271321647", "976361919213.2316106634997273614874628961", "4e+0"); + t("39546984927010933113107020217275209737865987546262881.468", "201979668131620624713040583190.1768", "1.95796860608960046428552e+23"); + t("7419080256297.6574077483845468492819497936", "6869058.54609711927386335531674712790758057530", "1.080072e+6"); + t("71448125354018967793592240554420279044.57840455284860239840288843", "390651079363301369559854785.959061826619434879", "1.82894990256e+11"); + t("929678221451.38847376", "2349.608615532033240403816841599825313959", "3.95673651e+8"); + t("648400065576167051979400608343532495736976782.56791661659156612969265453", "6745748155220524090476072.09945", "9.6119815127454949757e+19"); + t("29256953782350909705357102906085177781979404563625087.3984329813578161157713732347270", "137130661855963480915204957002415.5182", "2.13350926673724032098e+20"); + t("37773103217068750212158006668857854578024531065313432743998.5108607129067709807869775934", "34530484343089936093734546612069.4836703339688164121854", "1.093905977158056006873414475e+27"); + t("940375544506545701153097768382485552.348369746129330854687", "30997856492924275904214.0", "3.0336792633426e+13"); + t("5336324471503412892246454790435298131.765637937108", "5817186143.6718203755279228968801748571927967895", "9.17337753977237083211474264e+26"); + t("50126263736046640973332.3288784846756566112538814354582229133824", "36609431742269.619", "1.369217203e+9"); + t("1507134497657611561623405861394090.68553354328170", "411101209821411.522390382504107295533735686993", "3.666091127078738578e+18"); + t("55357474445527737454819685783907416458065524230069.691764259118022601576858833805268105595", "5621244695803326955806044602896191021.516717035980774112599044", "9.847903345473e+12"); + t("974583367533285749398509705552380.3128857952218", "64089042.8129609139918343282157132268887862111", "1.52067081166672208966032e+25"); + t("1221280778169778846.1922578706405272685587395438266959", "5.0235", "2.43113522080178928e+17"); + t("322737069.1510", "2365.14198886884160659", "1.36455e+5"); + t("903762742058357468352979073788437717394.2893711503", "323669258716028958819.62509", "2.792241517293037703e+18"); + t("8708722977474890817302295046.3316560", "15351740.74166533", "5.67279185078928304778e+20"); + t("1253081893096805021302658411202795225103.777985055051413714537965120957263", "7008004654558238416648387968378527.0", "1.78807e+5"); + t("893869087741829442344628143655848625177274219955704697909879408.567931339299986894853610537", "66045860445982080245479594994024166209.3284078", "1.3534066809121391903010568e+25"); + t("8045157196926269967176822342266261944431.285036014152642196", "44012203486684537298371034278.883376887762729452659", "1.82793783532e+11"); + t("77046343920956351207888110679283583298479.0610470596656394786408146174425755", "298470931606474634432309.449810602254052307182", "2.58136842694416039e+17"); + t("623500529132658429674646646136332752270911793714.1131931861676", "773553792860593262829196473575.6467364605464340907119", "8.06020906221609302e+17"); + t("13297783934980798196167395943.5044663930215602538350779570681", "63844203906341285954.6639150529335", "2.08284904e+8"); + t("902379170865051968232758716229790.4947026226317058737703674", "13079087155542675027347.417882642382689085044819", "6.8994048295e+10"); + t("327761534382376789582393358484099274419818218907346678492.47724682758", "703890614074045530088421622059.9702661722116", "4.65642711848830006066449093e+26"); + t("7787320.80173823747928201752064367", "86.0740053903220147186986", "9.0472e+4"); + t("25712537197492699240821504825869.9757710573733278074695", "257025.259727429610260664059510936859", "1.00038950353596976918982639e+26"); + t("2055719336331506637100585335116853672706.9842245710219885055487221126", "5195105286874.782596", "3.95703113375814736151318069e+26"); + t("879858160870518396458962028816059568554493.077883892616265", "35676646861167640026083873733299515789.898807336821599632968510259020286302", "2.4662e+4"); + t("1113878505.60294076059743593328371713765962", "3637.63107629701348", "3.06209e+5"); + t("16740018616182376046668.749145532", "8408377480.7", "1.990873822518e+12"); + t("9641879632067985881566327.0237796573555855098220202232961805", "90527.54028", "1.06507694810284597755e+20"); + t("5097191061953955922095657392188.86087552877924", "90651471742300412247426507.82337292166927", "5.6228e+4"); + t("8763741403975499656817131217909530870752109.109990571987170602723324618870753441516", "30495028465595390590584125549314520236.6905848098088837862649336", "2.87382e+5"); + t("4758065138779986462430459839401160855804453083.28884561707", "9216359459863343487318696535793851.04274104385246472828653045362864845934", "5.16262973411e+11"); + t("80945716455293829628805000255504572029356862035773630.9840004557183223077032737738", "19041026008058976122521722290.56334", "4.251121574070333309215334e+24"); + t("922185019562223341922956940658234584269225102945.8638950", "9191156079948274898662304.275523792591358", "1.00333952719407320280756e+23"); + t("146688497828016194730729113679.662095257190217278639558303", "20018943711272755727383284644.24507", "7e+0"); + t("9632455.0", "5.91258874108", "1.629143e+6"); + t("749709927599711673286168724713.637721694323007571652", "68831371497.82470573187401020", "1.0891980085322067643e+19"); + t("703334852897742025459017143133534769379436366529.28693683670471993263060", "43404555974140947273348.88169434203533719911009901", "1.6204171131638036825989489e+25"); + t("266446231005960024131312641770116963442589808.95592697589", "908813209562489394364082.9707572", "2.93180411774856973797e+20"); + t("7365331456946807654134746419826200283228175270946.87441478287000755797033173195980998", "72570173729965791642605682209056791163.095609209261129", "1.01492542712e+11"); + t("1885375657396122344090283190476150429471.29065818802987431905865902497995", "67122860797766366857816021232423265355.80132760264091339569551013509671764", "2.8e+1"); + t("1988895029701763458653106419453898805.1", "40999033655994650376584088995662929.9872018665953", "4.8e+1"); + t("9205310802789903367648277912472047986.41931455321056110337551393595", "6878892446038808663400976440763.36", "1.338196e+6"); + t("7254812952281947165494.39874884828253729493", "278987038678.2602011075217990146458934669", "2.6004121864e+10"); + t("75121545671313909531478916112276629156.02750137976105193542131649494474", "7556481823445448485668050317.73936186381", "9.941338764e+9"); + t("14230274566049623.3174995100578869246434729", "4217337009791.19808", "3.374e+3"); + t("18563145159921228668292804829417744799073736.9369852598006749423827382921969171129", "334308200499652466018.93584328063247000337134", "5.5527041012386192428781e+22"); + t("-1.939705899412577956E+107", "4.16011175E+95", "-4.66262931377e+11"); + t("-2.17572499998013E+90", "-8.5667512E+88", "2.5e+1"); + t("53.0528", "5.81484336338007548323701145501824145289496435180610403", "9e+0"); + t("-9.262020368015430982320E+31", "-961048023.41740322816166130721520234700463741290443", "9.6374168015875956889595e+22"); + t("72052512835997.5407791032688023719", "-7.7902408903663348543130", "-9.249073789887e+12"); + t("5386665.48728950474757", "-55787.95154355082444905369697247039", "-9.6e+1"); + t("8200969461.781648200152056735094101250", "-6173584.6386638", "-1.328e+3"); + t("-6162044682.46579949512756133331211291134216377880642", "70883.101619290546467", "-8.6932e+4"); + t("2.2858509075765580228170996569682255", "7.024E-8", "3.2543435e+7"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalDpSdTests.cs b/DecimalSharp.Tests/BigDecimalDpSdTests.cs new file mode 100644 index 0000000..6250545 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalDpSdTests.cs @@ -0,0 +1,82 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalDpSd")] + public class BigDecimalDpSdTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void DpSd() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long? dp, long? sd, bool? zs) => + { + BigDecimalTests.assertEqual(dp, bigDecimalFactory.BigDecimal(n).Dp()); + BigDecimalTests.assertEqual(dp, bigDecimalFactory.BigDecimal(n).DecimalPlaces()); + BigDecimalTests.assertEqual(sd, bigDecimalFactory.BigDecimal(n).Sd(zs)); + BigDecimalTests.assertEqual(sd, bigDecimalFactory.BigDecimal(n).Precision(zs)); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t(0, 0, 1, null); + t("-0", 0, 1, null); + t(double.NaN, null, null, null); + t(double.PositiveInfinity, null, null, null); + t(double.NegativeInfinity, null, null, null); + t(1, 0, 1, null); + t(-1, 0, 1, null); + + t(100, 0, 1, null); + t(100, 0, 1, false); + t(100, 0, 3, true); + + t("0.0012345689", 10, 8, null); + t("0.0012345689", 10, 8, false); + t("0.0012345689", 10, 8, true); + + t("987654321000000.0012345689000001", 16, 31, false); + t("987654321000000.0012345689000001", 16, 31, true); + + t("1e+123", 0, 1, null); + t("1e+123", 0, 124, true); + t("1e-123", 123, 1, null); + t("1e-123", 123, 1, true); + + t("9.9999e+9000000000000000", 0, 5, false); + t("9.9999e+9000000000000000", 0, 9000000000000001, true); + t("-9.9999e+9000000000000000", 0, 5, false); + t("-9.9999e+9000000000000000", 0, 9000000000000001, true); + + t("1e-9000000000000000", (long)9e15, 1, false); + t("1e-9000000000000000", (long)9e15, 1, true); + t("-1e-9000000000000000", (long)9e15, 1, false); + t("-1e-9000000000000000", (long)9e15, 1, true); + + t("55325252050000000000000000000000.000000004534500000001", 21, 53, null); + + tx(() => { bigDecimalFactory.BigDecimal(1).Sd(2); }, "new Decimal(1).sd(2)"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalExpTests.cs b/DecimalSharp.Tests/BigDecimalExpTests.cs new file mode 100644 index 0000000..82eddbd --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalExpTests.cs @@ -0,0 +1,164 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; +using System.Globalization; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalExp")] + public class BigDecimalExpTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Exp() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, string expected, long pr, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Exp().ValueOf()); + }; + + t("0", "1", 40, RoundingMode.ROUND_HALF_UP); + t("0", Math.Exp(0).ToString(CultureInfo.InvariantCulture), 40, RoundingMode.ROUND_HALF_UP); + t("-0", "1", 40, RoundingMode.ROUND_HALF_UP); + //t("-0", Math.Exp("-0").ToString(CultureInfo.InvariantCulture), 40, 4); + t("Infinity", "Infinity", 40, RoundingMode.ROUND_HALF_UP); + t("Infinity", Math.Exp(double.PositiveInfinity).ToString(CultureInfo.InvariantCulture), 40, RoundingMode.ROUND_HALF_UP); + t("-Infinity", "0", 40, RoundingMode.ROUND_HALF_UP); + t("-Infinity", Math.Exp(double.NegativeInfinity).ToString(CultureInfo.InvariantCulture), 40, RoundingMode.ROUND_HALF_UP); + t("NaN", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("NaN", Math.Exp(double.NaN).ToString(CultureInfo.InvariantCulture), 40, RoundingMode.ROUND_HALF_UP); + t("1", "2.718281828459045235360287471352662497757", 40, RoundingMode.ROUND_HALF_UP); + + t("4.504575", "90.42990317191332252519829", 25, RoundingMode.ROUND_HALF_DOWN); + t("6.3936622751479561979", "598.04277120550571020949043340838952845520759628012", 50, RoundingMode.ROUND_HALF_UP); + t("0.000000000000000004", "1.000000000000000004000000000000000008001", 40, RoundingMode.ROUND_CEIL); + t("0.9", "2.45960311115694966380012656360247069542177230644", 48, RoundingMode.ROUND_DOWN); + t("-0.0000000000000005", "0.999999999999999500000000000000124", 33, RoundingMode.ROUND_DOWN); + t("-0.00000000000000000001", "0.99999999999999999999000000000000000000004999", 44, RoundingMode.ROUND_FLOOR); + t("-0.000000000000004", "0.999999999999996000000000000008", 31, RoundingMode.ROUND_UP); + t("-0.0000000000000000006", "0.99999", 5, RoundingMode.ROUND_FLOOR); + t("0.0000000000000000006", "1", 5, RoundingMode.ROUND_FLOOR); + t("-0.0000003", "1", 1, RoundingMode.ROUND_HALF_UP); + + // Initial exponent estimate incorrect by -1 + t("20.72326583694641116", "1000000000.0000000038", 20, RoundingMode.ROUND_DOWN); + + // Initial exponent estimate incorrect by +1 + t("-27.6310211159285483", "0.000000000000999", 3, RoundingMode.ROUND_DOWN); + + t("-0.9", "0.40656965974059911188345423964562", 32, RoundingMode.ROUND_DOWN); + t("-0.00000000000005", "0.999", 3, RoundingMode.ROUND_FLOOR); + t("-0.9999999999999999", "0.367879441171442358383467887305694866395394004", 45, RoundingMode.ROUND_HALF_UP); + t("-0.99999", "0.36788311998424806939070532012638041", 35, RoundingMode.ROUND_FLOOR); + t("-0.00000000001", "0.99999999999000000000004999999999983333333333375", 49, RoundingMode.ROUND_CEIL); + t("-0.9999999999999", "0.367879441171479109539640916233017625680100198337", 48, RoundingMode.ROUND_UP); + t("-0.999999999", "0.36787944153932176295090581241", 29, RoundingMode.ROUND_UP); + t("-0.0000000003", "0.9999999997000000001", 19, RoundingMode.ROUND_CEIL); + t("-0.0000001", "0.99999990000000499999983333333749999991667", 41, RoundingMode.ROUND_CEIL); + t("-0.0000000000000001", "0.9999999999999999", 26, RoundingMode.ROUND_DOWN); + t("-0.999999999999999", "0.36788", 5, RoundingMode.ROUND_CEIL); + t("-0.999999999", "0.367879441539321762951", 21, RoundingMode.ROUND_HALF_UP); + t("-0.000000000001", "0.9999999999990000000000005", 31, RoundingMode.ROUND_UP); + t("-0.1", "0.9048374180359595731642491", 25, RoundingMode.ROUND_UP); + t("-0.99999999", "0.36787944485", 12, RoundingMode.ROUND_FLOOR); + t("-0.99999999", "0.36787944485023675170391910600205499737", 38, RoundingMode.ROUND_UP); + t("-0.1", "0.9048374180359595731642491", 25, RoundingMode.ROUND_UP); + t("-0.9", "0.4065696597", 10, RoundingMode.ROUND_FLOOR); + t("-0.9999999999999", "0.367879441171479", 15, RoundingMode.ROUND_FLOOR); + t("-0.99", "0.371576691022045690531524119908201386918028", 42, RoundingMode.ROUND_FLOOR); + t("-0.999999999999999", "0.3678794411714426894749649417", 28, RoundingMode.ROUND_UP); + t("-0.9", "0.4", 2, RoundingMode.ROUND_DOWN); + t("-0.00000000009", "0.99999", 5, RoundingMode.ROUND_DOWN); + t("0.9", "2.45960311115694966380012656360247069542177230644", 48, RoundingMode.ROUND_DOWN); + t("40.95984262795251", "614658133673303019.41715", 23, RoundingMode.ROUND_DOWN); + t("50.57728", "9234930123395249855007.64784227728909958776637", 45, RoundingMode.ROUND_UP); + t("-9.295952106254287693", "0.00009179505707794839996147521992", 28, RoundingMode.ROUND_FLOOR); + + t("24.429", "40679902037.5", 12, RoundingMode.ROUND_DOWN); + t("3.085347", "21.875056169741656067", 20, RoundingMode.ROUND_CEIL); + t("6.079163", "436.663554324263441178", 21, RoundingMode.ROUND_UP); + t("0.89588138", "2.4494937731", 11, RoundingMode.ROUND_HALF_DOWN); + t("3.06", "21.3", 3, RoundingMode.ROUND_HALF_UP); + t("0.828620743", "2.2901578446832146", 17, RoundingMode.ROUND_HALF_EVEN); + t("0.8747", "2.39815573", 9, RoundingMode.ROUND_DOWN); + t("4", "54.5", 3, RoundingMode.ROUND_FLOOR); + t("1.74023", "5.698653962365493026791", 22, RoundingMode.ROUND_FLOOR); + t("0.3178134", "1.37411982654", 12, RoundingMode.ROUND_HALF_DOWN); + t("1.0212228", "2.77658790066265475", 18, RoundingMode.ROUND_UP); + t("2.8", "16.444646771097049871498016", 26, RoundingMode.ROUND_HALF_EVEN); + t("2", "7.389", 5, RoundingMode.ROUND_DOWN); + t("2.13349", "8.44428600324102919", 19, RoundingMode.ROUND_DOWN); + t("1.0306766", "2.8029617", 8, RoundingMode.ROUND_HALF_UP); + t("1.38629371", "3.99999739553", 12, RoundingMode.ROUND_UP); + t("2.140864956", "8.5", 2, RoundingMode.ROUND_HALF_UP); + t("1", "2.7182818284590452353602874713", 29, RoundingMode.ROUND_DOWN); + t("2.8", "16.4446467711", 13, RoundingMode.ROUND_HALF_UP); + t("1.7923271", "6.0034067514286690274238254973", 29, RoundingMode.ROUND_UP); + t("2", "7.38905609893065", 15, RoundingMode.ROUND_HALF_UP); + t("1.839758663", "6.2950188567239", 14, RoundingMode.ROUND_DOWN); + t("3.1541", "23.4319388536798", 15, RoundingMode.ROUND_FLOOR); + t("6.23103", "508.27874", 8, RoundingMode.ROUND_DOWN); + t("0.15", "1.16183424272828312261663", 24, RoundingMode.ROUND_UP); + t("3.6454", "38.298089", 8, RoundingMode.ROUND_HALF_UP); + t("2.8086602", "16.5877", 6, RoundingMode.ROUND_CEIL); + t("1", "2.71828182845904523536", 22, RoundingMode.ROUND_HALF_UP); + t("3.712", "40.9355959021562903", 19, RoundingMode.ROUND_CEIL); + t("1.742336005", "5.71066800248", 12, RoundingMode.ROUND_HALF_DOWN); + + t("67.0234090932359557332", "129000000000000000000000000000", 3, RoundingMode.ROUND_CEIL); + t("6.4350484439574", "623.3127778698531510658792212713024749828103299", 46, RoundingMode.ROUND_FLOOR); + t("-90.6147801309103528", "0.0000000000000000000000000000000000000004430992452392223286671364132586", 31, RoundingMode.ROUND_UP); + t("52.6735295600", "75131702520984694212520.839", 26, RoundingMode.ROUND_HALF_DOWN); + t("4.91754742409", "136.667015585278752656929641054712859399847337855456678258883", 60, RoundingMode.ROUND_UP); + t("-8.291786018917236430647515856", "0.0002505", 4, RoundingMode.ROUND_FLOOR); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + // Max integer argument + t("20723265836946413", "6.3207512951460243608e+9000000000000000", 20, RoundingMode.ROUND_HALF_UP); + + // Min integer argument + t("-20723265836946411", "1.1690154783664756563e-9000000000000000", 20, RoundingMode.ROUND_HALF_UP); + + t("2.08E+16", "Infinity", 10, RoundingMode.ROUND_DOWN); + t("9.99999999e+9000000000000000", "Infinity", 100, RoundingMode.ROUND_HALF_UP); + + t("-2.08E+16", "0e+0", 10, RoundingMode.ROUND_DOWN); + t("1e-9000000000000000", "1e+0", 10, RoundingMode.ROUND_DOWN); + + // Initial exponent estimate incorrect by +1 + t("2302585095.29663062096", "9.999998439e+1000000000", 10, RoundingMode.ROUND_DOWN); + + // Initial exponent estimate incorrect by -1 + t("557.22559250455906", "1.0000000000000044e+242", 17, RoundingMode.ROUND_DOWN); + + t("-7.2204571E-4550853476128405", "9.99999e-1", 6, RoundingMode.ROUND_DOWN); + t("-1.239848698043325450682384840", "2.894280056499551869832955260486309228756785711877e-1", 49, RoundingMode.ROUND_CEIL); + t("-358219354.0214584957674057041104824439823073474823", "1.7279578060422445345064581640966e-155572689", 32, RoundingMode.ROUND_FLOOR); + t("8.82661445434039879925209590467500361019097244359748402", "6.813181388774733211e+3", 19, RoundingMode.ROUND_HALF_EVEN); + t("9.02366224E-9", "1.00000000902366228071324023326175156155718e+0", 43, RoundingMode.ROUND_HALF_EVEN); + t("-4.4768686752786086271180252E+574398129049502", "0e+0", 15, RoundingMode.ROUND_FLOOR); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalFloorTests.cs b/DecimalSharp.Tests/BigDecimalFloorTests.cs new file mode 100644 index 0000000..b6bc3cc --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalFloorTests.cs @@ -0,0 +1,143 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalFloor")] + public class BigDecimalFloorTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Floor() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-1e3, + ToExpPos = (long)1e3, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).Floor().ValueOf()); + }; + + t("0", 0); + t("-0", "-0"); + t("0", "0.000"); + t("Infinity", double.PositiveInfinity); + t("-Infinity", double.NegativeInfinity); + t("NaN", double.NaN); + + t("0", 0.1); + t("0", "0.49999999999999994"); + t("0", 0.5); + t("0", 0.7); + t("-1", -0.1); + t("-1", "-0.49999999999999994"); + t("-1", -0.5); + t("-1", -0.7); + t("1", 1); + t("1", 1.1); + t("1", 1.5); + t("1", 1.7); + t("-1", -1); + t("-2", -1.1); + t("-2", -1.5); + t("-2", -1.7); + + t("1", "1.0000000000000000000000001"); + t("0", 0.999999999999); + t("9", "9.999999999999"); + t("123456", 123456.789); + t("-2", "-1.0000000000000000000000001"); + t("-1", -0.999999999999); + t("-10", "-9.999999999999"); + t("-123457", -123456.789); + + t("-2075365", "-2075364.364286541923"); + t("60593539780450631", "60593539780450631"); + t("65937898671515", "65937898671515"); + t("-39719494751819198566799", "-39719494751819198566798.578"); + t("92627382695288166556", "92627382695288166556.8683774524284866028260448205069"); + t("-881574", "-881574"); + t("-3633239210", "-3633239209.654526163275621746013315304191073405508491056"); + t("-23970335459820625362", "-23970335459820625362"); + t("131869457416154038", "131869457416154038"); + t("-2685", "-2685"); + t("-4542227861", "-4542227860.9511298545226"); + t("-834103872107533086", "-834103872107533086"); + t("-1501493189970436", "-1501493189970435.74866616700317"); + t("70591", "70591.2244675522123484658978887"); + t("4446128540401735117", "4446128540401735117.435836700611264749985822486641350492901"); + t("-597273", "-597273"); + t("729117", "729117.5"); + t("-729118", "-729117.001"); + t("4803729546823170064608098091", "4803729546823170064608098091"); + t("-6581532150677269472830", "-6581532150677269472829.38194951340848938896000325718062365494"); + t("2949426983040959", "2949426983040959.8911208825380208568451907"); + t("25166", "25166.125888418871654557352055849116604612621573251770362"); + t("4560569286495", "4560569286495.98300685103599898554605198"); + t("13", "13.763105480576616251068323541559825687"); + t("9050999219306", "9050999219306.7846946346757664893036971777"); + t("39900924", "39900924.00000005"); + t("115911043168452445", "115911043168452445"); + t("20962819101135667464733349383", "20962819101135667464733349383.8959025798517496777183"); + t("4125789711001606948191", "4125789711001606948191.4707575965791242737346836"); + t("-6935502", "-6935501.294727166142750626019282"); + t("-2", "-1.518418076611593764852321765899"); + t("-35416", "-35416"); + t("6912783515683955988122411164548", "6912783515683955988122411164548.393"); + t("657", "657.0353902852"); + t("0", "0.00000000000000000000000017921822306362413915"); + t("1483059355427939255846407887", "1483059355427939255846407887.011361095342689876"); + t("7.722e+999999999999999", "7.722e+999999999999999"); + t("7722", "7722"); + t("0", "0.00000005"); + t("8551283060956479352", "8551283060956479352.5707396"); + t("0", "0.000000000000000000000000019904267"); + t("321978830777554620127500539", "321978830777554620127500539.339278568133088682532238002577"); + t("2073", "2073.532654804291079327244387978249477171032485250998396"); + t("677676305591", "677676305591.2"); + t("39181479479778357", "39181479479778357"); + t("0", "0.00000000000000000087964700066672916651"); + t("115083055948552475", "115083055948552475"); + t("9105942082143427451223", "9105942082143427451223"); + t("0", "0.00000000000000000000004"); + t("0", "0.000250427721966583680168028884692015623739"); + t("0", "0.000000000001585613219016120158734661293405081934"); + t("0", "0.00009"); + t("0", "0.000000090358252973411013592234"); + t("276312604693909858427", "276312604693909858427.21965306055697011390137926559"); + t("0", "0.0000252"); + t("1", "1.9999999999"); + + bigDecimalFactory.Config.ToExpNeg = -100; + bigDecimalFactory.Config.ToExpPos = 100; + + t("-1", -1e-308); + t("-1e+308", -1e308); + t("2.1e+308", "2.1e308"); + t("-1", "-1e-999"); + t("0", "1e-999"); + t("0", "1e-9000000000000000"); + t("-1", "-1e-9000000000000000"); + t("-0", "-9.9e-9000000000000001"); // underflow to zero + t("9.999999e+9000000000000000", "9.999999e+9000000000000000"); + t("-9.999999e+9000000000000000", "-9.999999e+9000000000000000"); + t("Infinity", "1E9000000000000001"); + t("-Infinity", "-1e+9000000000000001"); + t("5.5879983320336874473209567979e+287894365", "5.5879983320336874473209567979e+287894365"); + t("-5.5879983320336874473209567979e+287894365", "-5.5879983320336874473209567979e+287894365"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalHypotTests.cs b/DecimalSharp.Tests/BigDecimalHypotTests.cs new file mode 100644 index 0000000..0a14da2 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalHypotTests.cs @@ -0,0 +1,141 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalHypot")] + public class BigDecimalHypotTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Hypot() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument a, BigDecimalArgument b, long pr, RoundingMode rm, string expected) => + { + var bigDecimalFactoryClone = bigDecimalFactory.Clone(); + bigDecimalFactoryClone.Config.Precision = pr; + bigDecimalFactoryClone.Config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, bigDecimalFactoryClone.Hypot(a, b).ValueOf()); + }; + + t("1", "NaN", 20, RoundingMode.ROUND_HALF_UP, "NaN"); + t("NaN", "1", 20, RoundingMode.ROUND_HALF_UP, "NaN"); + t("Infinity", "NaN", 20, RoundingMode.ROUND_HALF_UP, "Infinity"); + t("NaN", "-Infinity", 20, RoundingMode.ROUND_HALF_UP, "Infinity"); + t("Infinity", "-9", 20, RoundingMode.ROUND_HALF_UP, "Infinity"); + t("9", "Infinity", 20, RoundingMode.ROUND_HALF_UP, "Infinity"); + t("9", "-Infinity", 20, RoundingMode.ROUND_HALF_UP, "Infinity"); + t("0", "0", 20, RoundingMode.ROUND_HALF_UP, "0"); + t("0", "-0", 20, RoundingMode.ROUND_HALF_UP, "0"); + t("-0", "-0", 20, RoundingMode.ROUND_HALF_UP, "0"); + + t("-73859972487135996812.3348849386076204815086183608621433996131", "-40900275", 92, RoundingMode.ROUND_HALF_UP, "73859972487135996812.334896262958542538634842711692934521304033086425417371740907212824629036"); + t("87777821928367383886207001990043726894046439498880958101", "13100000", 53, RoundingMode.ROUND_CEIL, "87777821928367383886207001990043726894046439498880959000"); + t("-9068023035566545177890098186515752036653463863403529285431568942304.1209958989782427940509418772899870623734", "2666666666666.6666666666662666666666666666666666666666766666466666666666666666666666666668", 93, RoundingMode.ROUND_HALF_DOWN, "9068023035566545177890098186515752036653463863403529285431568942304.12099589897824279405094188"); + t("-19.8731062176484", "-631970.6", 60, RoundingMode.ROUND_UP, "631970.600312467344715323508497215861344293021711284138304041"); + t("-1111111111111141067315396649709360127244075372005400124355334298632449424416463580266666666666", "-0.0000000015372402412953773290762250418563358319557966420343267849914304381916024954828959476537495440147246975615343391", 43, RoundingMode.ROUND_UP, "1111111111111141067315396649709360127244076000000000000000000000000000000000000000000000000000"); + t("-0.983064721909232202799884070088", "-1888888888888371106396282947223787931710", 20, RoundingMode.ROUND_HALF_UP, "1888888888888371106400000000000000000000"); + t("861123450449582222", "-3268941330032700177909698138482", 73, RoundingMode.ROUND_DOWN, "3268941330032700177909698251903.062363755594001549793838456512462423760753"); + t("-1.759", "-0.1666933060407184714285777825813947232316520181597980844428", 8, RoundingMode.ROUND_FLOOR, "1.7668807"); + t("0.1852451289933636289285652675346736246965605", "-48506.827382527105658688770367877324273166861983575641312454026244237512829473955620223096782936193504746", 48, RoundingMode.ROUND_CEIL, "48506.8273828808265642535390473175215096921677017"); + t("-3000008000000000000000070000000000000000000001000000000000.000000000000002000000000000000000900000000010002", "-802.661566839437264337325468337423185084", 22, RoundingMode.ROUND_UP, "3000008000000000000001000000000000000000000000000000000000"); + t("-8", "-5482493793", 53, RoundingMode.ROUND_CEIL, "5482493793.0000000058367599140481142689669647662254134"); + t("4111111111111111.11111111111611110111171111811111111611", "-0.7801745669150266383906952786894096943691775116027", 26, RoundingMode.ROUND_DOWN, "4111111111111111.1111111111"); + t("4649136268549586431953848205459087026588854116776105905", "-0.4538997053719724982993", 76, RoundingMode.ROUND_HALF_UP, "4649136268549586431953848205459087026588854116776105905"); + t("-711281636404745616773671624856748035918060782119438", "0.6011202051617683354856452418581", 80, RoundingMode.ROUND_UP, "711281636404745616773671624856748035918060782119438.00000000000000000000000000001"); + t("-55102601.0381", "-5160591", 93, RoundingMode.ROUND_HALF_DOWN, "55343729.0091054507509667515051408897750996134016431347788775107555545851579689419350413225929"); + t("183", "0.6", 22, RoundingMode.ROUND_FLOOR, "183.0009836039139981977"); + t("4000000000080000000000000000000000", "0.55", 82, RoundingMode.ROUND_UP, "4000000000080000000000000000000000.000000000000000000000000000000000037812499999244"); + t("-0.55", "-9000000.000000000000000000000000000000000000000000000000000000000000000000000000000009", 62, RoundingMode.ROUND_DOWN, "9000000.0000000168055555555555398651834705075738799986293162621"); + t("-0.388099754174217471056249565014913560596333083573199500992", "0.0000363576265205", 75, RoundingMode.ROUND_UP, "0.388099755877229375967849346839104152672911497025034368058113842991365933724"); + t("52222222222227378067480110037255168691979179742111111111", "-867069820.333078943531805179108670644728376893549909696519412570032111919516568762799", 7, RoundingMode.ROUND_CEIL, "52222230000000000000000000000000000000000000000000000000"); + t("-8.0898982865397951925970316274645291728205275567128", "-0.0000945902", 28, RoundingMode.ROUND_HALF_EVEN, "8.089898287092787678956284349"); + t("-1664553204017852793900913959927482283751", "-933333388888.15884290172642527", 32, RoundingMode.ROUND_DOWN, "1664553204017852793900913959927400000000"); + t("-0.09771882084", "-8", 41, RoundingMode.ROUND_CEIL, "8.000596788236885020873363221344096704335"); + t("-10.11111111545", "-0.306711465294651568375461540673418284608909142237604855", 98, RoundingMode.ROUND_CEIL, "10.11576195409518993106696772029199668325921193685867908705991646038726063827463162781415087647978"); + t("-4437098359999999999993.9999", "-0.2241991", 56, RoundingMode.ROUND_FLOOR, "4437098359999999999993.9999000000000000000000056642012823"); + t("901390573372408932467350822015112608121945120543338853670905789705602623427861.103187236210204922562771581943724285507586728737018434159395", "-23333333333333333351020223106390010419253302605986582847591694927992733993338709578970900366475156635422035555555", 18, RoundingMode.ROUND_UP, "23333333333333333400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); + t("19999999999999999999999999999999.919999999999999999999", "-95670705629746263190920599520452475212900072593749902459133558626394349560336068069498100861613875411", 24, RoundingMode.ROUND_HALF_EVEN, "95670705629746263190920600000000000000000000000000000000000000000000000000000000000000000000000000000"); + t("459.273", "9638369683361034.552409", 63, RoundingMode.ROUND_HALF_DOWN, "9638369683361034.55240900001094229083644388522937457239375956406"); + t("19333333333.33313333333333", "-307058050750", 19, RoundingMode.ROUND_HALF_UP, "307666092230.143791"); + t("-4888.8813611", "61856704783261924843882364363459938129336598998376", 35, RoundingMode.ROUND_HALF_EVEN, "61856704783261924843882364363459938000000000000000"); + t("-90316963180999999999997999999999999.99999999999999959999999999999999999999999999999", "-899997034414865629076187032", 24, RoundingMode.ROUND_UP, "90316963181000004484176000000000000"); + t("-0.00001175529004148059889839195560772120687431522218537528816456748920635963047412762382567334499074596992570830887179621917584255805343012605460010989845894713567382571024", "59.8600988774488317444932", 22, RoundingMode.ROUND_DOWN, "59.86009887744998599287"); + t("-844444444444445105013379803702088715444444.44444444", "851735648360163016915210118100049528358186144013411569", 13, RoundingMode.ROUND_CEIL, "851735648360200000000000000000000000000000000000000000"); + t("-0.1098958603115877986399807307790849607335424187223724689574921530969578406825061416021390586394788741395795498746592063682753064315701974886", "-52222222222222262283923266176757777", 76, RoundingMode.ROUND_HALF_DOWN, "52222222222222262283923266176757777.00000000000000000000000000000000000011563"); + t("-10027999242546642659855555555555", "-703.824", 25, RoundingMode.ROUND_FLOOR, "10027999242546642659855550000000"); + t("-17118682794143106193517128.496346472179213795", "19999999999999999997919330.00231406838630646574151545822388888888888888888", 38, RoundingMode.ROUND_HALF_DOWN, "26325829533112365449334045.441841092728"); + t("0.465596788868", "-9431769081", 29, RoundingMode.ROUND_FLOOR, "9431769081.0000000000114920312"); + t("-587359.66395", "-0.49568003707000085674015751654640980033", 13, RoundingMode.ROUND_HALF_DOWN, "587359.6639502"); + t("-0.059956811106228018570509499080322651692489744383276282735", "0.7728191", 54, RoundingMode.ROUND_HALF_DOWN, "0.775141393890713275121528253795513914835075182802874717"); + t("2222215171676429123638899593785648371510606061543680191659124444444444.6906517318485520720388589138008481347302123923691909983086306231440651", "788888.888888885011536108582122208072284443333", 80, RoundingMode.ROUND_HALF_EVEN, "2222215171676429123638899593785648371510606061543680191659124444444444.6906517318"); + t("70000000000000010000000000006.100000000000004", "-78957772777.77777777777777777777777777777777777777277771777777777777", 1, RoundingMode.ROUND_UP, "80000000000000000000000000000"); + t("-41720000000020000000000000000000000000000000000000000700000000000000600000004000000001000000000000060000000000.00080000000000000006", "-46835015.87548144758089751035240583513", 34, RoundingMode.ROUND_HALF_EVEN, "41720000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); + t("28666666666666666666666676666666666666666666666666616666666666666666666.6663666666666666666666666666666666666666666666666664666666666666666666", "-7.8461", 56, RoundingMode.ROUND_HALF_UP, "28666666666666666666666676666666666666666666666666616667000000000000000"); + t("0.6", "-91.5250722217761303", 63, RoundingMode.ROUND_UP, "91.5270388748665715095625471128327141160527733302883072128489811"); + t("30000.6", "511111111111145686553087261381.999991267342292294981021024064788686134890483114665388298481703", 51, RoundingMode.ROUND_CEIL, "511111111111145686553087261381.999991267342292294982"); + t("72926343.726877231000712798686463998173070827809981833334964558342793176683041794308836271", "-82222222222221937444", 49, RoundingMode.ROUND_CEIL, "82222222222221937444.00003234071924617295968730272"); + t("-242915822316177763142341053724.3195904798466883740740090079450439", "-299999999999.999999999999999999995999999999999999999999999999990999994", 51, RoundingMode.ROUND_CEIL, "242915822316177763142341053724.319590665096045830207"); + t("-306555555555555555555555055555555555555555555555555555559555555555555555555555555555555555555555555555555595555555555555555555555555555555555555555555525555555555555555555555555555555.5555555555", "0.15666773914679673976142669430328125908359330664846715765297103124831482667541495", 15, RoundingMode.ROUND_FLOOR, "306555555555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); + t("-5734991.83220402694035812590544522858837047993475498775680667010453187699606727653014592756227908536357219129844096200521", "99399999.699", 55, RoundingMode.ROUND_UP, "99565305.56110721338952690556051338361260372609898394192"); + t("-0.585223", "9742275700501", 25, RoundingMode.ROUND_DOWN, "9742275700501"); + t("-817", "2706343113769608709474153626083514693465686442858333333333333333", 54, RoundingMode.ROUND_CEIL, "2706343113769608709474153626083514693465686442858333340000000000"); + t("521999999999199999929999999999999999.99999995999999", "-6777777777777777777777777.777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777770777777775", 54, RoundingMode.ROUND_CEIL, "521999999999199999930044002175866866.547023411749520706"); + t("-4516475899411196.1710280841858351554959449", "0.00362", 26, RoundingMode.ROUND_CEIL, "4516475899411196.1710280842"); + t("79996999999999999999999999999999999999999999999.999999999999999999299999999999999599999999999999999996", "0.000000006393873924327515206665863616080266830154605167288849831012562983901", 32, RoundingMode.ROUND_FLOOR, "79996999999999999999999999999999000000000000000"); + t("165014180635256662053.5623866609995456978976014664", "126847933143118145017958510547081.01687771", 82, RoundingMode.ROUND_CEIL, "126847933143118145017958617879061.6649297630723081683143413440383325550496316428679"); + t("4444444444.44444444444444444444444444444444444444444444", "0.0000390055319967605996065972540356157510147289248305250742502606", 19, RoundingMode.ROUND_HALF_DOWN, "4444444444.444444444"); + t("-8905370954396883647914407290800692779839518281513035906502493568844696561439275153317671748655256327646885877826948402873397232451", "0.000000002433575166551955655019349462492613256751863629697572595342683572506451544556497587139362820461701547049759568493058791704546964632763776550260691", 95, RoundingMode.ROUND_HALF_EVEN, "8905370954396883647914407290800692779839518281513035906502493568844696561439275153317671748655300000000000000000000000000000000000"); + t("700000000", "0.10532749524343436", 67, RoundingMode.ROUND_HALF_UP, "700000000.0000000000079242008958969198076099247634079046096355599626"); + t("9555555555555555555555555555555555555555.55555555555555555555555555555555555555555", "757773470777777777787727.7777777777777747777", 34, RoundingMode.ROUND_HALF_DOWN, "9555555555555555555555555555555586000000"); + t("-0.297233184499378290751031871", "94444444444450932925402136569369568252675313623114112449951937227491", 57, RoundingMode.ROUND_HALF_UP, "94444444444450932925402136569369568252675313623114112450000000000000"); + t("706.6640602786138076271815698607630793709065809977913853658899180593912800991919896234768331533404376463838897508518404177667748", "589272858", 76, RoundingMode.ROUND_HALF_DOWN, "589272858.0004237205967572977795909916847730224498576503592425079948021269944"); + t("141421829337978396523958245492.356577241347882862045", "-0.0000009062726880615943999813266035730355189554501814541380840728", 17, RoundingMode.ROUND_FLOOR, "141421829337978390000000000000"); + t("288888418696038361803537630426270.71151743887471708693463333333333333", "-81195599558835246729685688119938533071101", 8, RoundingMode.ROUND_HALF_UP, "81195600000000000000000000000000000000000"); + t("382666666.66666666666", "-310.351", 17, RoundingMode.ROUND_CEIL, "382666666.66679252"); + t("509146", "27974901", 27, RoundingMode.ROUND_DOWN, "27979533.8704760590941855702"); + t("600075881745331917265194619524368592248337558828411479126381966442789", "-199999999959999999999999999999999999999999999999.9999999999999999999999999999999999999999999999999999", 68, RoundingMode.ROUND_HALF_DOWN, "600075881745331917265194619524368592248337592157529679693993900861880"); + t("33333333333333333333933.333", "92675418847792981854934.77651107680859649467120073", 26, RoundingMode.ROUND_CEIL, "98487787921777255092429.556"); + t("-194.04494819612983", "87934613325863285610318426691747541751704168685", 55, RoundingMode.ROUND_FLOOR, "87934613325863285610318426691747541751704168685"); + t("-0.00006", "-9108555555555555755555555555555555555555555555.555855555555565555555555585555555", 69, RoundingMode.ROUND_HALF_DOWN, "9108555555555555755555555555555555555555555555.55585555555556555555556"); + t("-1867112.3", "-7443151922333351621784797114283077371961143985830384399", 98, RoundingMode.ROUND_CEIL, "7443151922333351621784797114283077371961143985830384399.0000000000000000000000000000000000000000003"); + t("0.640650325", "8337529018416437", 88, RoundingMode.ROUND_DOWN, "8337529018416437.000000000000000024613577836791740925174427714878489185918199187020262415"); + t("-7.0711298394245347979492394379496305607768672891309791", "-92.5549672712666393257898900443199898401181108080123982312500316214214726463524089322636338782070900725995605695513761536504989976346266550486346671844299550305743931825324317787", 26, RoundingMode.ROUND_HALF_DOWN, "92.824688762156584043556536"); + t("11.000500000000070000000000000000515", "-928864249591777933822222222", 69, RoundingMode.ROUND_HALF_UP, "928864249591777933822222222.000000000000000000000000065139227989011355"); + t("8.9929999999999999999999999999", "-94444444444444.7777777777777777777444449232900948624986161628952947337337208243", 100, RoundingMode.ROUND_UP, "94444444444444.77777777777820593447444492177895346249764146644605457433165778719182374051141272166291"); + t("-3", "8000000000", 48, RoundingMode.ROUND_HALF_EVEN, "8000000000.00000000056249999999999999998022460938"); + t("524224294278833258504244689131128804963", "-0.1964918169532600262422065880715612530725541194753716933743653473301573055", 92, RoundingMode.ROUND_UP, "524224294278833258504244689131128804963.00000000000000000000000000000000000000003682491879045"); + t("-5563710.400490441356383129065751744241271474147187007959891690143773431654594134378", "234644300000000000.86356426586528430874003818", 73, RoundingMode.ROUND_HALF_UP, "234644300000000000.8636302271381993667815855570906197025798452968278931064"); + t("0.005336508972581768759465256138116638362412237071722728683544001", "-2744818576", 62, RoundingMode.ROUND_HALF_DOWN, "2744818576.0000000000000051876521573143355893278038250258951491"); + t("6100958683940338086146995110755471006768600255866666666666666666", "95009361293210581532023714", 96, RoundingMode.ROUND_CEIL, "6100958683940338086146995110755471006768600255866666666666666666.00000000000073978363081733130453"); + t("4948457219440599111007826250603151703105812225460181157894774181631869", "-500000000050000000000000000000000000.7000000000600000000000000000000000000000000005", 23, RoundingMode.ROUND_UP, "4948457219440599111007900000000000000000000000000000000000000000000000"); + t("0.000000002979", "-9", 43, RoundingMode.ROUND_DOWN, "9.000000000000000000493024499999999999986495"); + t("0.47555305129875312820342601735", "-0.2673085693", 12, RoundingMode.ROUND_UP, "0.545531461807"); + t("3290866969805582657729329868.97622844503712282586503", "8996300581562651076861828923126756911315531038131347433298", 26, RoundingMode.ROUND_HALF_DOWN, "8996300581562651076861828900000000000000000000000000000000"); + t("-95721335544.654143365002196", "-1822222", 96, RoundingMode.ROUND_DOWN, "95721335561.9987248947602645712748098096888624484242375216519098735810157428711542690977103766782"); + t("0.974893703406145670332688066323452747831483011640048285105884619867888725281346574205291151337004770627960177971", "0.000239596749", 4, RoundingMode.ROUND_HALF_EVEN, "0.9749"); + t("-0.00012856579", "-21536540290437517549950.6925", 13, RoundingMode.ROUND_UP, "21536540290440000000000"); + t("6300828.297308463126", "-555138043489683551066925156982819307", 3, RoundingMode.ROUND_HALF_UP, "555000000000000000000000000000000000"); + t("0.4519719010451812700381881242155284703426402593258190987", "92346327717009585478189395590602.34545881237122995324639951758026247635570631069180557087", 55, RoundingMode.ROUND_HALF_UP, "92346327717009585478189395590602.3454588123712299532464"); + t("69398002688216703269792743800286307271116693445111111111111111", "-211393667179764005100083390018873694", 100, RoundingMode.ROUND_UP, "69398002688216703269792743800286307271116693445111111433074862.06409526630410784634920186057594444197"); + t("0.19", "-5288.143883", 42, RoundingMode.ROUND_FLOOR, "5288.14388641329593020355143132324946951485"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalIntPowTests.cs b/DecimalSharp.Tests/BigDecimalIntPowTests.cs new file mode 100644 index 0000000..d70c823 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalIntPowTests.cs @@ -0,0 +1,569 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalIntPow")] + public class BigDecimalIntPowTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void IntPow() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, BigDecimalArgument exp) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).Pow(exp).ValueOf()); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("4", 2, 2); + t("2147483648", 2, 31); + t("0.25", 2, -2); + t("0.0625", 2, -4); + t("1", 1, 100); + t("0", 0, 1000); + + t("NaN", 2, double.NaN); + t("NaN", +0, double.NaN); + t("NaN", "-0", double.NaN); + t("NaN", double.PositiveInfinity, double.NaN); + t("NaN", double.NegativeInfinity, double.NaN); + + t("1", double.NaN, +0); + t("1", double.NaN, "-0"); + + t("NaN", double.NaN, double.NaN); + t("NaN", double.NaN, 2.2); + t("NaN", double.NaN, 1); + t("NaN", double.NaN, -1); + t("NaN", double.NaN, -2.2); + t("NaN", double.NaN, double.PositiveInfinity); + t("NaN", double.NaN, double.NegativeInfinity); + + t("Infinity", 1.1, double.PositiveInfinity); + t("Infinity", -1.1, double.PositiveInfinity); + t("Infinity", 2, double.PositiveInfinity); + t("Infinity", -2, double.PositiveInfinity); + t("0", 2, double.NegativeInfinity); + t("0", -2, double.NegativeInfinity); + + t("Infinity", 1 / 1.1, double.NegativeInfinity); + t("Infinity", 1 / -1.1, double.NegativeInfinity); + t("Infinity", 1 / 2, double.NegativeInfinity); + t("Infinity", 1 / -2, double.NegativeInfinity); + + //js only + //t("NaN", 1, double.PositiveInfinity); + //t("NaN", 1, double.NegativeInfinity); + //t("NaN", -1, double.PositiveInfinity); + //t("NaN", -1, double.NegativeInfinity); + + t("0", 0.1, double.PositiveInfinity); + t("0", -0.1, double.PositiveInfinity); + t("0", 0.999, double.PositiveInfinity); + t("0", -0.999, double.PositiveInfinity); + + t("Infinity", 0.1, double.NegativeInfinity); + t("Infinity", -0.1, double.NegativeInfinity); + t("Infinity", 0.999, double.NegativeInfinity); + t("Infinity", -0.999, double.NegativeInfinity); + + t("Infinity", double.PositiveInfinity, 2); + t("Infinity", 0, -2); + t("Infinity", double.NegativeInfinity, 2); + + t("-Infinity", double.NegativeInfinity, 3); + t("-Infinity", double.NegativeInfinity, 13); + + t("-Infinity", "-0", -3); + t("-Infinity", "-0", -13); + t("-Infinity", double.NegativeInfinity, 3); + t("-Infinity", double.NegativeInfinity, 13); + t("-Infinity", "-0", -3); + t("-Infinity", "-0", -13); + t("-Infinity", "-0", -1); + + t("-Infinity", "-0", -10000000001); + t("Infinity", "-0", -2); + + t("Infinity", double.PositiveInfinity, 1.1); + t("Infinity", double.PositiveInfinity, 2); + + t("Infinity", +0, -1.1); + t("Infinity", +0, -2); + + t("Infinity", double.NegativeInfinity, 2); + t("Infinity", "-0", -2); + + t("NaN", -0.00001, 1.1); + t("NaN", -0.00001, -1.1); + + t("-Infinity", double.NegativeInfinity, 1); + t("-Infinity", double.NegativeInfinity, 10000000001); + + t("NaN", 2, double.NaN); + + t("Infinity", double.NegativeInfinity, 0.5); + t("Infinity", "-0", -0.5); + t("Infinity", double.NegativeInfinity, 0.6); + t("Infinity", "-0", -0.6); + t("Infinity", double.PositiveInfinity, 0.1); + t("Infinity", 0, -0.1); + + bigDecimalFactory.Config.Precision = 20; + + t("1.9801312458591796501e+301030", 2, 1e6 + 1); // Math.pow( 2, 1e6 + 1) == Infinity + t("5.0501702959901511235e-301031", 2, -1e6 - 1); // Math.pow( 2, -1e6 - 1) == 0 + t("-1.9801312458591796501e+301030", -2, 1e6 + 1); // Math.pow(-2, 1e6 + 1) == -Infinity + t("-5.0501702959901511235e-301031", -2, -1e6 - 1); // Math.pow(-2, -1e6 - 1) == -0 + t("-1.9801312458591796501e-698971", -0.2, 1e6 + 1); // Math.pow(-0.2, 1e6 + 1) == -0 + t("-5.0501702959901511235e+698970", -0.2, -1e6 - 1); // Math.pow(-0.2, -1e6 - 1) == -Infinity + t("1.9801312458591796501e-698971", 0.2, 1e6 + 1); // Math.pow( 0.2, 1e6 + 1) == 0 + t("5.0501702959901511235e+698970", 0.2, -1e6 - 1); // Math.pow( 0.2, -1e6 - 1) == Infinity + + bigDecimalFactory.Config.Precision = 600; + + t("4096", "8", 4); + t("-1.331", "-1.1", 3); + t("5.125696", "-2.264", 2); + t("6.7266e-7", "6.7266E-7", 1); + t("4142779.6499215776", "21.06", 5); + t("731.1616", "-5.2", 4); + t("1", "61818", 0); + t("3.2", "3.2", 1); + t("5.4139923025768140625e-41", "-1.945E-7", 6); + t("1280630.81718016", "5.8", 8); + t("3965.318943552", "15.828", 3); + t("53.721", "53.721", 1); + t("1", "-1.9", 0); + t("4.58357323731267363492522744606954913014016e-39", "-0.0000161306", 8); + t("-8560814308.6108448224", "-96.94", 5); + t("4.4127502627834341562081e-74", "-6.77E-10", 8); + t("79327261142.56790234534719652175488087744161", "23.0371", 8); + t("3.101121e-38", "1.761E-19", 2); + t("1", "-1", 4); + t("6.23201296e-28", "-1.58E-7", 4); + t("-8.50893402176e-19", "-9.476E-7", 3); + t("16", "4", 2); + t("90368789.0625", "-97.5", 4); + t("1", "-112.8", 0); + t("4.122181458338334221291398681640625e+27", "40042.5", 6); + t("5.94467302491009e+21", "1290.0", 7); + t("5.6599836943004175019970957e+25", "141437", 5); + t("69.75757441", "1.7", 8); + t("1e-42", "0.0000010", 7); + + t("8", "8", 1); + t("-2.5090696333749305038864384e+25", "-664", 9); + t("24794.911296", "5.4", 6); + t("7077398515.1515538432", "93.32", 5); + t("-1.4520042511984659693722813984375e-130", "-2.8295E-19", 7); + t("4", "4", 1); + t("372088627687.312953646321", "781.019", 4); + t("-5.3864523289963490660381317787272961329536e-23", "-0.000658806", 7); + t("-1.8", "-1.8", 1); + t("1", "-5.9", 0); + t("1", "2", 0); + t("-6.4097340625", "-1.45", 5); + t("170859375", "15", 7); + t("595732589817199.440265999920799232", "43.82", 9); + t("1.7080198121677824e+36", "-4200", 10); + t("1", "658.8", 0); + t("136.460505366756569881", "2.269", 6); + t("-1", "-1", 3); + t("236007.159691873761", "-22.041", 4); + t("1", "-1.1", 0); + t("287803125756.085809269657829376", "18.76", 9); + t("4.1069049025e-34", "-2.02655E-17", 2); + t("-8", "-2", 3); + t("1704883919.2576", "203.2", 4); + t("22106814.0740608", "11.2", 7); + t("3.7481851264119295287828498195966142655968201e+23", "227.71", 10); + t("-3", "-3", 1); + t("5.308416e-54", "4.8E-14", 4); + t("1", "-1", 8); + t("1", "-4.1", 0); + t("398", "398", 1); + t("1", "1.17981E-18", 0); + t("255896509713547.45824", "761.4", 5); + t("16807", "7", 5); + t("1", "232.6", 0); + t("2.67066142562472466573674890357652039841e+30", "-6358.1", 8); + t("390625", "-5", 8); + t("85766121", "21.0", 6); + t("2206809.987903620081317314341735861401", "4.309", 10); + t("6.1917364224e-80", "-1.2E-8", 10); + t("64", "-2", 6); + t("-39.8778220049", "-2.09", 5); + t("892496818.033068251283537321", "-31.029", 6); + t("1.1289646949223432899980166202016362758071452681629968849e+25", "320.087", 10); + t("1932991.455312009", "124.569", 3); + t("635307227133823.258624", "-293.2", 6); + t("784", "-28", 2); + t("-43361725294765860565.175323475675341312", "-152.02", 9); + t("1589.6036888689492933115234375", "4.36775", 5); + t("1", "-18.4", 0); + t("20832.8532313216810321678408500840248440324096", "3.46612", 8); + t("6.5536", "-1.6", 4); + t("174729381067.247616", "5590.56", 3); + t("-4.084101e-14", "-0.0021", 5); + t("7.46848810699576790739263937619996819197249e+21", "153.93", 10); + t("2.09881105970752e-16", "0.0000059428", 3); + t("23298085122481", "-169", 6); + t("1", "-4.095E-11", 0); + t("30016915.773120638290557721", "17.629", 6); + t("16807", "7", 5); + t("130666515.5580240243056896", "-10.34", 8); + t("-5.97080224872032e-91", "-9.02E-19", 5); + t("-3450.25251", "-5.1", 5); + t("43046721", "-9", 8); + t("1", "1", 1); + t("3545.66529682492339392399", "5.1279", 5); + t("3396.171616714297", "15.0313", 3); + t("4.622674003397519975764019459730496e+33", "-408146", 6); + t("3.24210716131761936e-27", "2.38620E-7", 4); + t("9", "3", 2); + t("14641", "121", 2); + t("62.81386652381601821841", "2.81523", 4); + t("1", "8", 0); + t("4.29981696e-160", "-1.2E-20", 8); + t("1.692652673311521044295612689449216e-7", "-0.14242", 8); + t("1", "-19.5", 0); + t("1", "8621.8", 0); + t("7.907e-7", "7.907E-7", 1); + t("1.61051", "1.1", 5); + t("1.553e-14", "1.553E-14", 1); + t("858461358961485360081", "171171", 4); + t("64", "-2", 6); + t("-2.9", "-2.9", 1); + t("-2.0661046784e-179", "-1.4E-20", 9); + t("39.0625", "-2.5", 4); + t("-391460020121.8781037", "-45.3", 7); + t("-80.1", "-80.1", 1); + t("3.5831808", "1.2", 7); + t("41.08469075197275390625", "-1.45", 10); + t("-128", "-2", 7); + t("-5277043158.170301334052958483", "-12.03", 9); + t("100.31024025", "10.0155", 2); + t("262144", "4", 9); + t("-2.66450474490105494016e-70", "-1.86E-8", 9); + t("1.58541338622748269695158625134808009096449e+21", "-131.83", 10); + t("1.69e-14", "1.3E-7", 2); + t("81", "-3", 4); + t("1.3979045762098993055105649e+25", "327", 10); + t("-2.8334269484119140625e-17", "-0.0145", 9); + t("8455365204.69607", "96.7", 5); + t("4.826809", "-1.3", 6); + t("-4.2027e-14", "-4.2027E-14", 1); + t("-3671885391606530844.02199", "-5163.9", 5); + t("1.4833", "1.4833", 1); + t("1078702060.96", "32843.6", 2); + t("16384", "4", 7); + t("0.000041046707114327285209693732389121", "-0.185729", 6); + t("9.04141586678594150656e-76", "1.73404E-19", 4); + t("7", "7", 1); + t("-5.408864751631992324037382349788164206309e+39", "-25989", 9); + t("3.6213725246884329693766314512921496510839580087890625e-58", "0.00000180255", 10); + t("51.58686976", "-2.68", 4); + t("32562222.2784028467808485507564561204461862636001", "5.6399", 10); + t("1.5269627878770126091369423832739776731492122624e-24", "-0.0041532", 10); + t("2.27128515349184346452713121698128944001e-82", "-6.849E-9", 10); + t("788.12330352545906108118941549114886272", "2.59298", 7); + + t("49478904727733663575.051582184770446498259493718971258958961046708278746324459568256251259157238318185790764612200843144821137580796334089638532287323488178607687532035618686192601481827902773410791645057647691925965756808571011539462511641266331263543939501901006735272661302011976870015625991111560481188335365459566760212844848008439578745211448299643484693328447464460429576345111356618402802188681216", "-1.60380", 96); + t("1.17647340482075248419254427344376045314316013640615098803852731448350843468375614975229837000370025634765625e+81", "-1312.5", 26); + t("7.0251816660378376802360594609084621021532608383100803495211258733288152327693358768741786747381360859889479870288549139760601303377485234176e+87", "-2391.76", 26); + t("85.717123455378345835968064", "2.0998", 6); + t("7.8189586726154755713303078223442071754329e+40", "187", 18); + t("9.145283009860369082115124525217171723626500086794105722560960199131059600008740516579605574000306840952542591838726900925804876261491646795282472377021036430500854987560433039755667787412917103148092128371355207976203112911565783359385741850905996481e+41", "-6.4113", 52); + t("2.05766289512932241998482631797034621069017517962263802542480365981262536498089637707776e+86", "26", 61); + t("98190573319064.214163360748608660888346857427032348178060040012159036566957731914573312588336568078808326155328828092023492584783227218123097647282496144318320115860427194595696623235777670393347299594686642872330179664094829207439052010438267983369137644871417464586087393161049", "-1.6293", 66); + t("1.392598192044227355988772015943279484446048049140235246881310663971517522995991944491655264930301742862780134225258915488062891063359354742689683631308848403923615202977361e+171", "109", 84); + t("1.5469996446227372120183605762031536360861258626528255060075983309687394111102266369973688377324297491658050323998067994446097153176237864040180207896595918522219595889946775556217e+64", "13.37", 57); + t("417.53905413413116367045797", "1.3", 23); + t("1.624290817967129588779052613030846258081e+39", "79677", 8); + t("6.613998972307900952958925063693292646912001305426127894831260851822286968476028114198011923029274945784114379928252947652708965396453170282038903005249536e-263", "0.00000908", 52); + t("17179869184", "2", 34); + t("9.7756260861181096053516970094092017016032995016954767790504110039917368643756356818044285001644705953440430468819149794081183248976623767084182482857941562203266736374606395800621259352114936429301555533971456e+141", "131.6", 67); + t("4294967296", "2", 32); + t("131621703842267136", "-6", 22); + t("7.9228162514264337593543950336e+28", "2", 96); + t("-1", "-1", 41); + t("5.0096959237841976223015468271587016074738912992534254294320102857326166341642003475731604090433896328441157235303061782495282575910872792923981113856240569836427242032573810996210128117467500761653330557379347005097932959928243111015057764620250811725789666461853189934772359267843261626881e+197", "140.9", 92); + t("2.404907604760405225358828131112281116032698930082119547604265954848982041717359046106827774346003151904701415424e+111", "32", 74); + t("2.69721605590607563262106870407286853611938890184108047911269431464974473521e+22", "-2.7", 52); + t("18.174", "18.174", 1); + t("1.36891479058588375991326027382088315966463695625337436471480190078368997177499076593800206155688941388250484440597994042813512732765695774566001e+43", "2.7", 100); + t("1.25668660115116491467662710973545031109788152235501170924313646703423681882164573441433515503588152722789494580469301248e+72", "34.2", 47); + t("1.56438420672167084519979701497174364597412396629019101951505612890666817698608365177006994887516584111152450449887451995069033040411213741933147153316594951835865202053237255800944727011696760985308614176976019463960094165747239428884158901702435389388132623055120422260406418255249330452909476806656e+299", "1308", 96); + t("-1.366174308182025187777528918308146941320736787278460889575749404867695325446359807161410602138908197731224033169833047036778978022709170976735608988099868310813030127497812540494011203545816852288666658682985428600019476831917843e+58", "-4.83", 85); + t("2.966806088806219456880539423158152815514806645521282752514016241570099725287916962770395912230014801025390625e+28", "-5.15", 40); + t("8589934592", "2", 33); + t("3.92012913845865034844198476089476040042936801910400390625e+28", "-10.5", 28); + t("6.26204859896956162110746451442214931102399028194694661966016701109504299345041406486245804277657094315831017177064948219797627444240188709011456e+72", "10.6", 71); + t("-7.4010922571797388655581604684527426699437277457499992187268655958229686891933340740793991046504324130585438416249947232728346081088006867719609592595610095069331022367447133421906806310032697675369409918188139600222703781482594772971289070262621142441874895437059567046831661495957273728351051362944953711082346089727330717918651409489163662706555003193741825901442633007312863953564385259087744338361955671878877893732351367361843585968017578125e+364", "-31956.5", 81); + t("6.192736416792149755132475219493405669399778858602560762871794455317449717448580836229845787580888290473782381059983387805505374173265513677435445890655671110840202944429668728225878544903602239e-270", "0.000319", 77); + t("2.321827472731847506187210910989207010589651530892302311791322352855446782760907718473019283821056753242967949096791603718944064726033664384082861996009850744961116407128920163494805886357836270766853975184523023642990429569615539676822828070446559161161124635674389704743948383107212919966543969471039720464085404567773913503635201792672811032312063265454094042341369554833714443413857449688164664657173315113983032808001e+220", "159.83", 100); + t("4.953736650985698001275587761883016173298229503362193331584010106486052779761329981195411366329068322677550960044762649449732919438910119549694010717647780952298320287365138145210431380601324547389442337520392258009e+27", "-2.797", 62); + t("-3.181403788572786716059998378326698266679069780899509454959934125355133265193e-226", "-0.0000057", 43); + t("2.2481244795444847556680083178853571141700204725943661497539185751725919215990484669445118877448657555202573745174750533635052209260608084995835891707958259234271442982681066779696130155696868114346639852814575962457281749995256623713554214237458259176913852401064878760784275382146658972801541462348779288776844691139086889351786721e+179", "229.03", 76); + t("1.09544203269304121665791452848994634135137143229447033238750572549632571476402641497730897157401184093614916314911584167715115647604065370616785146866296916632437569033863034458711783186506727022529378159297811462454675308057682780534190256280910865229376785975491743196806996272790525705427972427376758443312371576466422700240638756574402393677191376501159420836822933903938571935476091044876631814554274289087939783553959776485376e+31", "-2.0436", 100); + t("-18437563379.178327736384102280592359424", "-2.4", 27); + t("-9.9938258857146531850367031e-85", "-0.0000000231", 11); + t("2.45673281757908854552870925433471410070214400334169452520459965621921664416713287959754208329284439619509099451538227140937811535553399003066102795766261859069268099803838998995339331311912275460846260697085073312049264485545427543086425664188963659692922005683716104197951717376e+78", "-6.08", 100); + t("-1.270210714458885172439348525985048001607770314656078008119108251089872343340175575576722621917724609375e+24", "-4.15", 39); + t("1209.5", "1209.5", 1); + t("1220703125", "5.0", 13); + t("2.2282376678496302739664556233420633e-74", "0.000000006553", 9); + t("2.218088039378445352751296336694731578146959285984085545221611060271486214348079661041003283535646898758718143100202167951881147633680620698026648392938984778649e+159", "893", 54); + t("2.10030968607618842407969732186669026418164521383378412734005003194384320968659491239802049483617846390172315534146347011074332799904332281963786542263761412332465321180532568441958976108339460464558490863953503079336356338135760894630619724493454777575270501253639608281424341291617698518141921861556244699796561591915201261004739209197698527393965924844797945393999012105081714167479170123104969e-75", "-0.16053", 94); + t("2.5812157101662325924336748344070521698410946762506012782923924916938485004644329931151074914373301798478548152505612780265485671672098712055026947247254600014458282820627468534250894082132928621697659949721616819635951012296371246281717642419683893063297904005186874144169940879165882368e+286", "25488", 65); + t("-15.625", "-2.5", 3); + t("2.9729685996261878754343622542880008372085710279050331084451543295302017053107644303792930816e+59", "-72.2", 32); + t("8.15730721", "1.3", 8); + t("1027.334860999330573407176938442293022889", "-1.47", 18); + t("1.20109289910050514343148045475506579676136202628631781424931463646123976128634333627993215283736800191296195442718065238702508520055513255346146658609301480565930380776363581062628797012612519067602295957218821773367819208495782017345400726347727499503218384384326417098721424389373157748956399698521853695814977704822352568748499324367082691064737392226159651276162776412093080580234527587890625e+315", "8679.5", 80); + t("-6.00774319642841528092711102659123449286352750007573133369794363392e-33", "-0.22", 49); + t("-4.399348626310072691340857398671747903319767685984244866658805429802943497233040561059795990923598510826890908258017493538766494536483606174431755682553269424176946343755577041745496403493430254087811474250251864009392456889456030217048416123130922140883015639602300329038985615284964386359900403921860549312983015992252637174331659470716194350399038561704290046291e+177", "-81.31", 93); + t("-3.05410827582876268390180635074883196222812916959850956275590047122226930793718597160851022493537771838978253152932907298258251555751167476560688772053768410645587233357374279876239597797393798828125e-247", "-0.000000217485", 37); + t("5.94029530519133658573841651381893916937282220672559984930445801765696530117833330901747112098660456061962952244422396324466169433806822249922825538552986841011e-19", "0.491", 59); + t("6.30523820693302485362185385323378612453984181696300485861970499164041182778517073604560519798249286847423997356860449832519236757706844668669858983416671702949907296869514603475482872905487176008793424936405673085021973514041591620544995041842415714193527926259387876594710020672351902248919941484928131103515625e+217", "-207.5", 94); + t("1.3437482898194084408359108790569717431056936319064040016470306278420649755238589129250716839755182586596297106623509972801915917688676116852207e-198", "0.0047", 85); + t("-7.2125976851811538835264180669311252876757309817127885777282268797579465235996423577991265862898834402822899090972405912847104748143261578733778979456054998346007864343435284069799588577484912513898046820531311312862161018665360468415091050892814436289818311468501837802070896183140379745282036670643116477155731121958797307187300620339307163520531060733946755523082115115646976e+279", "-767.6", 97); + t("-3.6014175419419889979825978713404525121917028354184157603813105843373968813713708575013260529677555144144724689493141661197266911743582631754736205113266715503341523389605232359965730457026715491821102337726896541765297511282920487936650122950956509166185123335946923710632464810273024751e+116", "-23.51", 85); + t("864441744884.215763637320205869663958329635842919446190153261333597518371076208416885489806126587561695103959519298009135858834566699504679568405218950836778578735139166130606578479646072479355927241854902595925015466294859320621226069690609744261681250304", "1.404", 81); + t("2.1740698194376449374483147468467027620784304276072222988616865620688896e+52", "808.4", 18); + t("3.8358611506121121577937e+22", "113", 11); + t("7.708142065054490966774434895299862856570563111111152865942369472254266622057906176e-375", "0.0000000000000002582", 24); + t("1.697054670829812124918589801369405630774787179949418285317226086899030607907838200923128944336540480137932154797404155642362243064347816887752994688507537824596616056930370261936449615792564115353680658971035397858675806419291627327666883921628766762017e+153", "35.3", 99); + t("-4.710128697246244834921603689e+27", "-9", 29); + t("3.2505902718449668133084058626546515621706592677748264541998335302067693284031047914414370910433910917853346703702752017311701370087768406221174636457161634693311184118695477205673579866365261461786447054994132502457715569269165081396243597525386428206972507983546973520886724081775555138991647659604473279e+52", "6.8159", 63); + t("10125003344964.40019736846338763496828575459544161517257186895064610033021488387585533013795387142569984", "1.4", 89); + t("-1.4631650542473900277009650505078819321358806229e+27", "-26.90", 19); + t("0.000005295825289418576524939548312590198218162176", "0.468", 16); + t("-2.13825209215512828440269455240169347772084407562319954177735966744864590012014618496355742013223900851293500036195697397558882293948621657334016332630442341312358031641684225772703692879077286212410249112292259617578818732032e+224", "-203479518", 27); + t("5.444517870735015415413993718908291383296e+39", "8", 44); + t("-33338.549041729", "-33338.549041729", 1); + t("2.7214030202002235259872217354276868322505756236796101744750922254072943468398158090938361760503196297567571421573431913968089480080443473498108606049915577803053551131894096917430267992139228904833591260925102332702863889641131058350845466180073805176058062062511496305436593986927276878340795001904960142635221849217162104418149855782368706167456898339731322626805338533602069310753044118499679070391659043014863756212342671519561753648641528938961249781667596503442752009505056776106357574462890625e+355", "25403380.775", 48); + t("-134217728", "-8.00", 9); + t("6.4919612772480684272077477598407081955951769084986853540654908040236664132468736e+31", "4.6", 48); + t("-408518.488", "-74.2", 3); + t("2.6122383559387081296537383480965114437482497294603331038492821930754511334614082451247995976011754175948033208350877260508339210350470971773483611262598975948388081226982520139805939801386768827832059816233575763932242012655210850575522139572300856461682889553829554870249034765972111622144e-53", "0.119534", 57); + t("1.88522188856624562372708154656751441041381726119427387599765763695834615013232142421520586436232009071932931843172032205056661409003338693915273301223126561630347970098203184279906247655542800284362476149094060315694708604230353242909365032002466875120342181047689475694706227284673985251088619705863125778538982501735383260557349198668384156297528069830916927729430864813333996813440323955895348081117644429414429531206777610934118661932545955356203081687958272101e+350", "1396953.01", 57); + t("-7.4641079962956705920034912695642465787383566977879750308559196923222402311665962335871104200586964218306687527948988363660881738310704671349709669487610144905689251123467238632699575375039822099609504292687413249132266915915320573775450823119373280252201183083672896166447786672561808861768782076443312543759437244643146889964363933455672502577964296155349186564340392078021387512970362139779496580009767098175116221996336815276032e+365", "-425417.2", 65); + t("1.915651048048760989675223006710502095760272088541579446290639477213455428121307995153274075329786132157611746651e+72", "363227.051", 13); + t("-7.65032026817518248876564402449082201253180407179105772287243705588834467106246226864795794350056707139677395342984049031608196167e-158", "-0.0000000000008205956327", 13); + t("1.5286700631942576193765185769276826401e+37", "7", 44); + t("1073741824", "8", 10); + t("-7.492788722116264058568890205770570774859100309722464309788118049412229345772411480224300523702767256086276612012745150464681862935165491623598382139203570285583278591609354972796097254467143774807748614976801272704624819215123157317922738427454525033948883547809409740884056108275497786621497433099431568320476275959806764951584862378486525479494452910448127181400467328943711415916384184330110378180608e+38", "-2.6742", 91); + t("-9.9615483925456314514941835282258027490657130453558630944504898425429565393128463181577359582035968e+22", "-34.13672", 15); + t("1.399922200750534682219817715626042346444265577310152832656021878942015248035909712686518235139333930615671437276362060231490721869741275050613538630628001507198150040959125681675660226363983554975062957910826317184614904091530578807538850671607301864207908455029708464592014690257839027200102495492869235566493012545340996194182688131148892605629158333606816661843824439253963260085811270982958376407623291015625e+181", "8668.79595", 46); + t("1.1972515182562019788602740026717047105681e+40", "9", 42); + t("2.809433795080632851709145012225734908409054034941321241601987773815883609706743541544402166343924517939889529050536360240983658675834106822309237371584880050176e+67", "29.26", 46); + t("-1.130764362193076554708917348657069436161383119992010510285626112959278426786936465605907875370782367006311207257151205709430547608789956273155866459033031412425747753017041228269946019068798157376004812291000927158419091251680264057450083682494989856683271885476193403159681085354715517423876371812000883161101039915298940406738346701704184093773206563783365396974283025554248166993067633181013835776e+229", "-495.16", 85); + t("-3.077228040283419501485435148888847716813106712632276671229710377509021026817676725408321326107948661263691709915698886286976007892051135335651197784824163323643144277812710153968406419716183905139635176333083510237302643593683953953477494067043109636077672667948180821005422658784541128359007025402810248257138220199195378601727145592714535208968044372704483391015842523268884989073259915535384596690721656759730286732238685451797332150695395077171985430070293527840123294365665570804795301448909420756992e+418", "-5398620298.48", 43); + t("2591500643510.8703986391408896", "35.620", 8); + t("-3.35390966929685775566428232543003229321430942684482327393890454463616e+26", "-6156.933746", 7); + t("-4911940958770.721866380729238693889243243167048192", "-25.7122", 9); + t("2.09670982511886308779364382461226064522913244291274975553909045464953985730555995547122852179186171376596687978705841751285402054060384366505333092240660435368377833186306191605049e+179", "2093", 54); + t("-1.3120135409024675389197377e-32", "-0.0000000000235855553", 3); + t("3.06580286249339590556181770635869764259023245764469206004664101e-78", "0.0061", 35); + t("-4.429293345196932276984549040219058245905488651609667018402382745119170674779904528756935495114384894434070998056621967747005022674509457845620395626349316891933712941619646377506486625368600115937614507993729672492431012578899815005421568e+37", "-32.051870380", 25); + t("1.299270565684257922619246441017034698039805547412943905460754496572097300952165266370194652051376805296279609746312644347199238836765289306640625e+56", "-18.85", 44); + t("1.566108714385843340192620380546546555641735293434509574033302065853656477829384746549085411912657151882140111651595251043453318950397645765893613409097202898027341727466585518405768283017471302953847629952837298920882176e+24", "41.0192888808596", 15); + t("3.23590932372253866812859949454563891250217856922745576253641197253435665205998361592799809e+89", "2474977", 14); + t("-9.7368504802272205153595678239454304952368475046930119079817985916928e+67", "-12", 63); + t("3.44552147465294110719732986332367243247925798357929806000836849e+62", "-7", 74); + t("128", "2", 7); + t("5.65251025822228531444194278761233641822281792819659230058333528631972497846690920646507426317458140864925211864848848044857090776165664263450974899867329254381660849739991179791628529582217569168185463633540183106805961127540063207424e+251", "-96880334819820", 18); + t("1.214529036103353599078303402353988354368901290518483617131872964733929620706476271152496337890625e+43", "6.5", 53); + t("-1.3089738102615705488950036718911116878301386483323342409513651601949943841095689259436086715966084434967103664037924413474102289403813212913777522181382481044473580351805322191321973e+181", "-78533", 37); + t("1.252453015827223091648143056289e+30", "47", 18); + t("4.593884321465082753417847006029094939767153045428871371185146539475234934788078659649525017869031479813190380591953477672897146298354193774199686172307595609685062957351072442717423824419651156326307969688849329e+172", "34973.7", 38); + t("6.4993779802563991313942147088910855038980304493628711994552936552675080091715543868582664478495863312478503560216160496462563144213423384672637506819444007554298505039521124189159003567749810227911510054190116940785207230365438230686589958633589792785739898681640625e+25", "19.527362557915", 20); + t("22876792454961", "3", 28); + t("429643228077338878294.90980773552148447232", "13385.0992", 5); + t("-7316.89", "-7316.89", 1); + t("5234016485162380478.15409743331356736233224871362317808951664029477472141754368438049197212877764328120319129016485361", "2.41", 49); + t("-9.18448171920669942200338050009727274073573579465100492416464784644248864677562331387086995022599687737054074140424187879986024804042070022603490146718362719056788563440317890910682257768632925460866552260450415793672740716743856864948011399578402033107962721324762764871499139470157293091799845778141752390211181570286270362089589942764421437922022663206638528993662330911966459538905107421403529415706249287725923857606476849002798755812680628308770502507877888997449832630062999974358780733e+247", "-11613.6333", 61); + t("2.648409294963988844015616e-24", "0.0000000138355056", 3); + t("2.40863472207038829716951461596425356200891165327233287498341065017430044564718221477455813374032856667895504085743031089347856425830213625711815509685491800628989456526993157007511653813393067316060298253585492583958097263354394562221211900373157618798878275619835293896301261289133749847496154802330721946407650402052956106639135229248180394944200385403412146150497882700273381421471626181859523581299015700836664867216504968658889499860010034200157321932124862289179191239642591047175122517733014555125735104472403712501002006088016431555682009e+357", "6337.73", 94); + t("-3502571449.82200575261531309080576", "-2.6", 23); + t("1", "1", 25); + t("-1.1809125003067061836785344667120764389443931749265317457525459548456128442105786285468877390219672806038351135283671645849621670658638427296075188535296e+27", "-7.46960", 31); + t("-7804725.584345565904628551916716032", "-1.8", 27); + t("652.68343537143736977925527144667849979675453569710942641839519790994481", "-1.1", 68); + t("1", "-3", 0); + t("4.26825223812027400796974891518773732342988745354489429495479078935112929549619739019072139340757097296812815466676129830954465240517595242384015591919845376e+55", "3.6", 100); + t("1.143346541001259437465016483752642875340200408207372315398374410086504054045958634479945641547514904516533919702060746490155830653988883705469429546657675670673347514271976875109918113055399954802405065425692486675365016543448426931378922954782957026636988416e+190", "-388997.14", 34); + t("1.391479860226959780852496779461260634580951060711489905798047445581119629509685004732118558920853318033429289719854192097911392274604744812177542476869031306237630906988638098552100901480110526866015997536096860367785128698535455722265589251495705036009334110148089566472594008624482378925581538366245059147829461639938451131334656e+162", "785.994", 56); + t("-2.039429275458086101347617297850948854294429450037773018607110681185721614063201210356599410953e+93", "-27753", 21); + t("1.8072708076715752612606017458825273480777271963492548142293548724970849500539908571180569517655791008990836891664536992680448e+43", "64022.984420938", 9); + t("-155568095557812224", "-14", 15); + t("2.18753957001465798602093911444285519704647324430365134831536108015616e+44", "4954.46", 12); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("2e+0", 2, "1.0"); + t("1.6e+1", 2, "4.00000000"); + t("6.25e-2", 2, -4); + t("5.0600621890668482322956892808849303e+20", "907.27", 7); + t("-7e+0", "-7", 1); + t("-9.01e+2", "-901", 1); + t("1.016984074247269470395836690098169093010136836967e+39", "21584.7", 9); + t("-8.983272e+1", "-89.83272", 1); + t("5.308416e+6", "-48", 4); + t("3.83432050166120236679168e+23", "52088", 5); + t("-2.679971527468745095582058350756311201706813294321409e+51", "-517889", 9); + t("5.067853299870089529116832768e+2", "3.47508", 5); + t("3.48822062687911109850066182676769e+32", "4129", 9); + t("1e+0", "-429.32321", 0); + t("-4.2773e+0", "-4.2773", 1); + t("-5.8169306081172252508071119604378757744768e+12", "-66.6082", 7); + t("1e+0", "-7.0654", 0); + t("-1.51655708279450944384385164853883404204414169862685507e+46", "-3956084.3", 7); + t("8.1e+1", "-3", 4); + t("1.296e+3", "-6", 4); + t("2.9e+0", "2.9", 1); + t("1.764e+3", "-42", 2); + t("-9.3418332730097368870513138581415704704611459349313e+49", "-356673", 9); + t("1.517108809906561e+15", "79", 8); + t("3.1063e+4", "31063", 1); + t("1e+0", "-21914.49416", 0); + t("1.4586250332983909737249e+10", "49.43", 6); + t("-4.208092749838142546109102616048103440952842087045576022556672e+46", "-4577028.48", 7); + t("3e+0", "3", 1); + t("1.4301918832998497740081358663795354088849575358074712812593899025686055664154241e+71", "784195396.7", 8); + t("1.914994057877243921847839041839022064004621019747303000421532785660701999616e+57", "2315715.86", 9); + t("1.40379741624014849127481344e+26", "804", 9); + t("2.1305364420464979969795870610432e+21", "18437.32", 5); + t("1e+0", "-48", 0); + t("7.018e+3", "7018", 1); + t("-5.8149737003040059690390169e+25", "-729", 9); + t("2.537640625e+9", "50375", 2); + t("1e+0", "-287", 0); + t("-1.879616311308566413901e+11", "-179.81", 5); + t("-3.73314280039567349e+17", "-3269", 5); + t("8.503056e+6", "-54", 4); + t("1.114538684361769559136325232186960408417483078419495901986816e+28", "3205.4344", 8); + t("-4.27504205e+3", "-4275.04205", 1); + t("-4.18195493e+8", "-53", 5); + t("-1.32651e+5", "-51", 3); + t("-4.309348e+6", "-4309348", 1); + t("5.2697770766776504576e+19", "-7259323024", 2); + t("7.334473e+6", "7334473", 1); + + t("4.2587208337796928798976e+22", "-674", 8); + t("2.5398714208994744315474847375553672678449979949471296663472852498581058264323e+76", "82219173067", 7); + t("3.8595867893817789e+16", "38595867893817789", 1); + t("1e+0", "6607929.612", 0); + t("2.03571124747179512510686558355453870501244709050625e+34", "-377727882.4895", 4); + t("2.45293306092383728169089251608498030232760591201e+47", "-838901", 8); + t("1e+0", "-3", 0); + t("3.834566459566834602823771544700625e+33", "248845085", 4); + t("9.9603189655699799982630929090395077799549456e+43", "-99900649454", 4); + t("4.96981290961e+11", "-89", 6); + t("1.58714182711801961914035004098749014540213215369889902124332186866896819339082286680313155541911581006508901525889227579394470766224134369e+74", "175595288.8066529", 9); + t("1.326409999413464946341631126231535779147856072448189797080406801e+19", "-60348.91227522707", 4); + t("-2.050107090202653994550415295865311714194868710425929507925126964581376e+69", "-72837546696276", 5); + t("2.0550048143314549586011369057890711537772093948321e+49", "-2129135057417", 4); + t("1e+0", "3943801.89538088", 0); + t("2.17438998607457e+14", "737", 5); + t("-2.273581752472e+10", "-22735817524.72", 1); + t("1.51891070159203e+12", "1518910701592.03", 1); + t("-6.42199562432576e+14", "-86276", 3); + t("1.33010089e+8", "11533", 2); + t("5.1662108991396663099278667856407361e+26", "-4767525.59", 4); + t("-2.197e+3", "-13", 3); + t("5.7261215932713209368576e+22", "489176", 4); + t("2.63105908732834720740862027188940646962896811537209872829318157804817881e+71", "800488505731", 6); + t("-7.8151742291e+2", "-781.51742291", 1); + t("-2.5619022164869008875e+19", "-2947955", 3); + t("1.888497394256858387595532951034741052100428552247961627495355202904723558656e+3", "-6.592180609971056972", 4); + t("1.227102111503512992112190463e+27", "1023", 9); + t("4.762033342402709161761620616017059035607e+39", "86210167", 5); + t("1.0526899962331857933889886363874543386374239042307e+34", "6374705.107", 5); + t("8.3043861038534085480857730707894983974895341475449922046323943309856240866914720437665233e+61", "7584431.953", 9); + t("5.4787291089024129877918140548999194405505068584642366052046899220357579072497678119620025119214429570421679076944647727607529032984620150444553526120397e+151", "72419131838243117", 9); + t("6.1203577224967e+13", "61203577224967", 1); + t("-2.6742593337474927167986914400257603e+34", "-82827", 7); + t("3.490938536648870448335810684618787855050175354916141007545163425555957335829e+75", "247548469", 9); + t("6.634204312890625e+15", "-95", 8); + t("-9.171271e+1", "-91.71271", 1); + t("5.65625765123605544067809018296482219675982471958093705254464e+59", "-9093998202", 6); + t("3.518743761e+9", "-39", 6); + t("1e+0", "-5420353171006060062", 0); + t("5.93548365959371477646876280183482286894691258676416e+26", "840398698.65610156", 3); + t("3.05021119744369888239209417566581849921624834657246971302432870103990316674041818082170961e+89", "-820455414011161", 6); + t("3.2696530375744e+11", "571808.8", 2); + t("7.5976962512577721e+4", "-275.639189", 2); + t("1.902906615566371112511312310657143013376e+4", "7.1760176", 5); + t("1.518464318469541965652429354308518011195184133938752135708801e+60", "33317743", 8); + t("2.13200587786233626937431579432326390786198510967574168821917803373975072742648456640669209424089001389646413824e+92", "2444169945946508.968", 6); + t("2.22147484530834915265639755288996e+8", "-14904.612860817114", 2); + t("1.492078384275163354935132877205588401e+36", "-1105217899", 4); + t("-8.7063159741318127407528723363285743789464660953004359884056134456089069164858324456719131936164339926111276712486987242162931090900645752178720048529774274761e+31", "-3538.91793390607241", 9); + t("-2.13718835678657210508559759338095142848187133522908355458407047497607984468725768078407393313580673815584615486794665109272908382172581587476837516398285148210296241056810064518192239263716914808770258390627580625498767684881468120398755080836616073670778327363332334149416019505078840253645081995145611223104498789608205428495349224542916922658293232780298744501314853052243306816366148311919597221018850456061527891844821902500302159789434488225792e+125", "-43837.525307806238", 27); + t("6.6067183217034216835242910438119195789788339709493349261334009277024675568767116522521737472677079426635748603259327817717050761351617610783486587612028204471198915744801916514515768618923473461233676712402753179616115705829361991013069927369820940249862144e+28", "-63581.52864975395137421365938883267810362492", 6); + t("3.4979655423042386318207008930737637967359866053138998526505479068249644854876701482811561341347105355107695596776164641704434681969517211923069874207364828070027467521475982678466251216378786468053405366050900916905682920934733855175647035328921497719019616796867272653837232009633511918699584196136643032274244642212313884180837128156688381283842300678798685499010807063746785776492193558002382725297304258913361e+62", "860658355.93419774133511168973596889241553275604551215135281", 7); + t("2.43e+2", "3", 5); + t("1.1341259418236998571758990926811782086077524757263871423863079766086030645673726799115988350322336274469528121736526520039192242333771040454545272536238688950013853620343757910936524944674880346697808001951639020756685105416346426508389541123017097529060283829118103883424462596062875341251599735321937114348037712815556934333412355272212045907182873831909566029976608100685207198148793211027456e+142", "-77969657.57799062937836", 18); + t("-3.0028686351108853762578194984762919284354267811356443985818417209466959135294437327385632801156377236905276696018118450080884435331856383482308738976558186955588239868161702337334759747439195397392938819582577110829644281561085620841415307488010481547467558616309027516654381610456065415065653113913265920029870297942479155862011879884534002975129045737955826661617772520189976935251896803639204375428428030749e+58", "-3144155.647351179442684823966727126493552586749", 9); + t("1.201753576366394485531985516556867241747342491824062593983537252565487129409802473156809713616241453319630220923725569628522288147931699557284946119375022985149050727430775477724150730989713693887368264655960182781852240604839836052804518341222619522792226084796948765314193322314769946060633722353531243331728258530762514582945950418550784e+31", "27540.61485935537676544614263765574563131573245204", 7); + t("3.37155040678778244943012545203918986928745669295171850695394544390939711301031039954614562269468815944072319615611367890859596537480727045421148118535227427436434942469760108682572253320836320356162649649114580786938367825230347818905248996593031355662611333376e+4", "-3.68110925219710489918033269313682", 8); + t("-1.157385562678413511184308898769846329872668259271078544423253372613586833033423503791374542602879075132311305638124240471079826030985837104460703581522437292662638238646090030670166015625e+186", "-7784665", 27); + t("5.7216584769709576633639728428105243709762039786762015993329350164736e+39", "-8697220540.1137988", 4); + t("3.605080945893673836738483946060969335788919921875e+3", "2.48435", 9); + t("-1.36240450766284865053749603054987406024313651234922549391481734582321604854817272341996695098685037495173906240642212299142117181990034526636150309000822666516664160854969363947955605850108340373472205128364217170231566407701356867606602700453971968987168686696650431666690097496345998516797552915475256643599049488322243247996920458277719083301674288561258518312772229949771006312491204843363917607453589630126953125e+161", "-3009460118.872263767875045", 17); + t("-3.8433712973156659829312033596061261378003902713922379084688365643813353176050190118421109324160544394293788636677094907930777317141076841010276342345029919613746057639577024242309077555840877645790649554834063514938596292845365250946008190566774814236719875110926196028928250892121252859736673222597350006754961294389605594296221696e+157", "-271616.155606", 29); + t("8.880125173267286184293229956929e+30", "-143903", 6); + t("1.2933690030633029978317864458950890700698349292432976269804895466563737201880939364145851524416113479708518067001609042030295271670130750045121e+14", "-7.62048571", 16); + t("4.49118544044091499255717578905704133184433268994940305778505055836352880272044837700029253390614132345790751503571600332872e+26", "765808758.66956931514481639498062905791538", 3); + t("-1.128193052103617375313057818469912250487118062091774976e+29", "-646363.29196", 5); + t("-3.852842458277771128223673975490918109e+4", "-38528.42458277771128223673975490918109", 1); + t("4.47317529320544012507678955001652121720459770030481180787405405093720278140090456738247550862238112656659162732461713512251836889602737214995151906586537236627456e+105", "5932.48", 28); + t("1e+0", "-13.97065588562499", 0); + t("3.600545803275794460618862354918801e+11", "600045.48188248151", 2); + t("2.569380011313067359691205257942517240115628560689496193366261158908199626359277748729466511294505469537479575614097255886064905027804073982599354300474897943e+129", "62080.7", 27); + t("5.818461494039866039726986100228248575472782020261098417686712139322808092966875943575012778303872663798273362332843148103605110550575434794509775866235877112057573531799569068637521409971342270836350080123911710082519119058044202449706075905917444188007277340785315892319100567144025511009943278859996309146349108129588009524947393206783018441414022970002633906397294399684375635228021017590940658971148436650082905540838555648e+102", "6398.880593717242", 27); + t("1.34971356455758975292534311187056647652453780619004003032217331555704261585125261846040712896856946037144900053640398406244356726653396169868958721875222540716653887768486266703330919098362921e+11", "4.1528548909", 18); + t("-1.77396388128500114222945974047586725531284545911409446577e+56", "-913", 19); + t("-1.23493440106890737225414566980096565722401440419412087747352443276574932419181598097379536554237254841727093836607763912665203669933311010821309594074994067411700657618950544400833319706872315553946358432623522564358319794505880365894233180227408889879677018966524371664896e+230", "-90520083747.46", 21); + t("-2.17525001942067723150294558531604730954322658381064353285681098867925681081506083705983156066163186746091443633027643554689317160117967955473175500964155968361524273945120598810972722792061e+14", "-3.121741", 29); + t("1e+0", "-562610.16179592649796590823394093366548", 0); + t("5.5399516545866639955830015026176e+11", "14.94", 10); + t("1.494189395849269188211255039709933309086424259778445906419464942576097148044216376789735318980392750336285644804638743600807550074206128272345650029255016954321611264002141919840462369550905098763723254901675135787504979910497931539962354019230845564318816091666473025536e+126", "-32698949771.110178432792", 12); + t("1.1504940871276742926708823617505372960241390892442547940194260102743306128298973371802547471453755938653944600792141533514422490556963535378521856840746722206160260148176604222079226186281680715577736316488196108040509176925372372483300649927835887344415603493563915019264675154039059770309142781930141352329958156926976e+15", "-8.7358521345995835476", 16); + + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow((string)null); }, ".pow(null)"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow((BigDecimal)null); }, ".pow(null)"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow(""); }, ".pow('')"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow(" "); }, ".pow(' ')"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow("4e"); }, ".pow('4e')"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow("hello"); }, ".pow('hello')"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow("\t"); }, ".pow('\t')"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalIsFinitEtcTests.cs b/DecimalSharp.Tests/BigDecimalIsFinitEtcTests.cs new file mode 100644 index 0000000..0fc2aa4 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalIsFinitEtcTests.cs @@ -0,0 +1,292 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalIsFinitEtc")] + public class BigDecimalIsFinitEtcTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void IsFinitEtc() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (bool actual) => + { + BigDecimalTests.assert(actual); + }; + + var n = bigDecimalFactory.BigDecimal(1); + + t(n.IsFinite()); + t(!n.IsNaN()); + t(!n.IsNegative()); + t(!n.IsZero()); + t(n.IsInteger()); + t(n.Equals(n)); + t(n.Equals(1)); + t(n.Equals("1.0")); + t(n.Equals("1.00")); + t(n.Equals("1.000")); + t(n.Equals("1.0000")); + t(n.Equals("1.00000")); + t(n.Equals("1.000000")); + t(n.Equals(bigDecimalFactory.BigDecimal(1))); + t(n.Equals("0x1")); + t(n.Equals("0o1")); + t(n.Equals("0b1")); + t(n.GreaterThan(0.99999)); + t(!n.GreaterThanOrEqualTo(1.1)); + t(n.LessThan(1.001)); + t(n.LessThanOrEqualTo(2)); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("-0.1"); + + t(n.IsFinite()); + t(!n.IsNaN()); + t(n.IsNeg()); + t(!n.IsZero()); + t(!n.IsInt()); + t(!n.Equals(0.1)); + t(!n.GreaterThan(-0.1)); + t(n.GreaterThanOrEqualTo(-1)); + t(n.LessThan(-0.01)); + t(!n.LessThanOrEqualTo(-1)); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal(double.PositiveInfinity); + + t(!n.IsFinite()); + t(!n.IsNaN()); + t(!n.IsNegative()); + t(!n.IsZero()); + t(!n.IsInteger()); + t(n.Eq("Infinity")); + t(n.Eq(double.PositiveInfinity)); + t(n.Gt("9e999")); + t(n.Gte(double.PositiveInfinity)); + t(!n.Lt(double.PositiveInfinity)); + t(n.Lte(double.PositiveInfinity)); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("-Infinity"); + + t(!n.IsFinite()); + t(!n.IsNaN()); + t(n.IsNeg()); + t(!n.IsZero()); + t(!n.IsInt()); + t(!n.Equals(double.PositiveInfinity)); + t(n.Equals(double.NegativeInfinity)); + t(!n.GreaterThan(double.NegativeInfinity)); + t(n.GreaterThanOrEqualTo("-Infinity")); + t(n.LessThan(0)); + t(n.LessThanOrEqualTo(double.PositiveInfinity)); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("0.0000000"); + + t(n.IsFinite()); + t(!n.IsNaN()); + t(!n.IsNegative()); + t(n.IsZero()); + t(n.IsInteger()); + t(n.Eq("-0")); + t(n.Gt(-0.000001)); + t(!n.Gte(0.1)); + t(n.Lt(0.0001)); + t(n.Lte("-0")); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("-0"); + + t(n.IsFinite()); + t(!n.IsNaN()); + t(n.IsNeg()); + t(n.IsZero()); + t(n.IsInt()); + t(n.Equals("0.000")); + t(n.GreaterThan(-1)); + t(!n.GreaterThanOrEqualTo(0.1)); + t(!n.LessThan(0)); + t(n.LessThan(0.1)); + t(n.LessThanOrEqualTo(0)); + t(n.ValueOf() == "-0" && n.ToString() == "0"); + + n = bigDecimalFactory.BigDecimal("NaN"); + + t(!n.IsFinite()); + t(n.IsNaN()); + t(!n.IsNegative()); + t(!n.IsZero()); + t(!n.IsInteger()); + t(!n.Eq(double.NaN)); + t(!n.Eq(double.PositiveInfinity)); + t(!n.Gt(0)); + t(!n.Gte(0)); + t(!n.Lt(1)); + t(!n.Lte("-0")); + t(!n.Lte(-1)); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("-1.234e+2"); + + t(n.IsFinite()); + t(!n.IsNaN()); + t(n.IsNeg()); + t(!n.IsZero()); + t(!n.IsInt()); + t(n.Eq(-123.4)); + t(n.Gt("-0xff")); + t(n.Gte("-1.234e+3")); + t(n.Lt(-123.39999)); + t(n.Lte("-123.4e+0")); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("5e-200"); + + t(n.IsFinite()); + t(!n.IsNaN()); + t(!n.IsNegative()); + t(!n.IsZero()); + t(!n.IsInteger()); + t(n.Equals(5e-200)); + t(n.GreaterThan(5e-201)); + t(!n.GreaterThanOrEqualTo(1)); + t(n.LessThan(6e-200)); + t(n.LessThanOrEqualTo(5.1e-200)); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("1"); + + t(n.Equals(n)); + t(n.Equals(n.ToString())); + t(n.Equals(n.ToString())); + t(n.Equals(n.ValueOf())); + t(n.Equals(n.ToFixed())); + t(n.Equals(1)); + t(n.Equals("1e+0")); + t(!n.Equals(-1)); + t(!n.Equals(0.1)); + + t(!bigDecimalFactory.BigDecimal(double.NaN).Equals(0)); + t(!bigDecimalFactory.BigDecimal(double.PositiveInfinity).Equals(0)); + t(!bigDecimalFactory.BigDecimal(0.1).Equals(0)); + t(!bigDecimalFactory.BigDecimal(1e9 + 1).Equals(1e9)); + t(!bigDecimalFactory.BigDecimal(1e9 - 1).Equals(1e9)); + t(bigDecimalFactory.BigDecimal(1e9 + 1).Equals(1e9 + 1)); + t(bigDecimalFactory.BigDecimal(1).Equals(1)); + t(!bigDecimalFactory.BigDecimal(1).Equals(-1)); + t(!bigDecimalFactory.BigDecimal(double.NaN).Equals(double.NaN)); + t(!bigDecimalFactory.BigDecimal("NaN").Equals("NaN")); + + t(!bigDecimalFactory.BigDecimal(double.NaN).GreaterThan(double.NaN)); + t(!bigDecimalFactory.BigDecimal(double.NaN).LessThan(double.NaN)); + t(bigDecimalFactory.BigDecimal("0xa").LessThanOrEqualTo("0xff")); + t(bigDecimalFactory.BigDecimal("0xb").GreaterThanOrEqualTo("0x9")); + + t(!bigDecimalFactory.BigDecimal(10).GreaterThan(10)); + t(!bigDecimalFactory.BigDecimal(10).LessThan(10)); + t(!bigDecimalFactory.BigDecimal(double.NaN).LessThan(double.NaN)); + t(!bigDecimalFactory.BigDecimal(double.PositiveInfinity).LessThan(double.NegativeInfinity)); + t(!bigDecimalFactory.BigDecimal(double.PositiveInfinity).LessThan(double.PositiveInfinity)); + t(bigDecimalFactory.BigDecimal(double.PositiveInfinity).LessThanOrEqualTo(double.PositiveInfinity)); + t(!bigDecimalFactory.BigDecimal(double.NaN).GreaterThanOrEqualTo(double.NaN)); + t(bigDecimalFactory.BigDecimal(double.PositiveInfinity).GreaterThanOrEqualTo(double.PositiveInfinity)); + t(bigDecimalFactory.BigDecimal(double.PositiveInfinity).GreaterThanOrEqualTo(double.NegativeInfinity)); + t(!bigDecimalFactory.BigDecimal(double.NaN).GreaterThanOrEqualTo(double.NegativeInfinity)); + t(bigDecimalFactory.BigDecimal(double.NegativeInfinity).GreaterThanOrEqualTo(double.NegativeInfinity)); + + t(!bigDecimalFactory.BigDecimal(2).GreaterThan(10)); + t(!bigDecimalFactory.BigDecimal(10).LessThan(2)); + t(bigDecimalFactory.BigDecimal(255).LessThanOrEqualTo("0xff")); + t(bigDecimalFactory.BigDecimal("0xa").GreaterThanOrEqualTo("0x9")); + t(!bigDecimalFactory.BigDecimal(0).LessThanOrEqualTo("NaN")); + t(!bigDecimalFactory.BigDecimal(0).GreaterThanOrEqualTo(double.NaN)); + t(!bigDecimalFactory.BigDecimal(double.NaN).LessThanOrEqualTo("NaN")); + t(!bigDecimalFactory.BigDecimal(double.NaN).GreaterThanOrEqualTo(double.NaN)); + t(!bigDecimalFactory.BigDecimal(0).LessThanOrEqualTo(double.NegativeInfinity)); + t(bigDecimalFactory.BigDecimal(0).GreaterThanOrEqualTo(double.NegativeInfinity)); + t(bigDecimalFactory.BigDecimal(0).LessThanOrEqualTo("Infinity")); + t(!bigDecimalFactory.BigDecimal(0).GreaterThanOrEqualTo("Infinity")); + t(bigDecimalFactory.BigDecimal(10).LessThanOrEqualTo(20)); + t(!bigDecimalFactory.BigDecimal(10).GreaterThanOrEqualTo(20)); + + t(!bigDecimalFactory.BigDecimal(1.23001e-2).LessThan(1.23e-2)); + t(bigDecimalFactory.BigDecimal(1.23e-2).Lt(1.23001e-2)); + t(!bigDecimalFactory.BigDecimal(1e-2).LessThan(9.999999e-3)); + t(bigDecimalFactory.BigDecimal(9.999999e-3).Lt(1e-2)); + + t(!bigDecimalFactory.BigDecimal(1.23001e+2).LessThan(1.23e+2)); + t(bigDecimalFactory.BigDecimal(1.23e+2).Lt(1.23001e+2)); + t(bigDecimalFactory.BigDecimal(9.999999e+2).LessThan(1e+3)); + t(!bigDecimalFactory.BigDecimal(1e+3).Lt(9.9999999e+2)); + + t(!bigDecimalFactory.BigDecimal(1.23001e-2).LessThanOrEqualTo(1.23e-2)); + t(bigDecimalFactory.BigDecimal(1.23e-2).Lte(1.23001e-2)); + t(!bigDecimalFactory.BigDecimal(1e-2).LessThanOrEqualTo(9.999999e-3)); + t(bigDecimalFactory.BigDecimal(9.999999e-3).Lte(1e-2)); + + t(!bigDecimalFactory.BigDecimal(1.23001e+2).LessThanOrEqualTo(1.23e+2)); + t(bigDecimalFactory.BigDecimal(1.23e+2).Lte(1.23001e+2)); + t(bigDecimalFactory.BigDecimal(9.999999e+2).LessThanOrEqualTo(1e+3)); + t(!bigDecimalFactory.BigDecimal(1e+3).Lte(9.9999999e+2)); + + t(bigDecimalFactory.BigDecimal(1.23001e-2).GreaterThan(1.23e-2)); + t(!bigDecimalFactory.BigDecimal(1.23e-2).Gt(1.23001e-2)); + t(bigDecimalFactory.BigDecimal(1e-2).GreaterThan(9.999999e-3)); + t(!bigDecimalFactory.BigDecimal(9.999999e-3).Gt(1e-2)); + + t(bigDecimalFactory.BigDecimal(1.23001e+2).GreaterThan(1.23e+2)); + t(!bigDecimalFactory.BigDecimal(1.23e+2).Gt(1.23001e+2)); + t(!bigDecimalFactory.BigDecimal(9.999999e+2).GreaterThan(1e+3)); + t(bigDecimalFactory.BigDecimal(1e+3).Gt(9.9999999e+2)); + + t(bigDecimalFactory.BigDecimal(1.23001e-2).GreaterThanOrEqualTo(1.23e-2)); + t(!bigDecimalFactory.BigDecimal(1.23e-2).Gte(1.23001e-2)); + t(bigDecimalFactory.BigDecimal(1e-2).GreaterThanOrEqualTo(9.999999e-3)); + t(!bigDecimalFactory.BigDecimal(9.999999e-3).Gte(1e-2)); + + t(bigDecimalFactory.BigDecimal(1.23001e+2).GreaterThanOrEqualTo(1.23e+2)); + t(!bigDecimalFactory.BigDecimal(1.23e+2).Gte(1.23001e+2)); + t(!bigDecimalFactory.BigDecimal(9.999999e+2).GreaterThanOrEqualTo(1e+3)); + t(bigDecimalFactory.BigDecimal(1e+3).Gte(9.9999999e+2)); + + t(!bigDecimalFactory.BigDecimal("1.0000000000000000000001").IsInteger()); + t(!bigDecimalFactory.BigDecimal("0.999999999999999999999").IsInteger()); + t(bigDecimalFactory.BigDecimal("4e4").IsInteger()); + t(bigDecimalFactory.BigDecimal("-4e4").IsInteger()); + + // Decimal.isDecimal + + t(BigDecimalFactory.IsDecimalInstance(bigDecimalFactory.BigDecimal(1))); + t(BigDecimalFactory.IsDecimalInstance(bigDecimalFactory.BigDecimal("-2.3"))); + t(BigDecimalFactory.IsDecimalInstance(bigDecimalFactory.BigDecimal(double.NaN))); + t(BigDecimalFactory.IsDecimalInstance(bigDecimalFactory.BigDecimal("Infinity"))); + + t(!BigDecimalFactory.IsDecimalInstance(null)); + t(!BigDecimalFactory.IsDecimalInstance(0)); + t(!BigDecimalFactory.IsDecimalInstance(1)); + t(!BigDecimalFactory.IsDecimalInstance("-2.3")); + t(!BigDecimalFactory.IsDecimalInstance(double.NaN)); + t(!BigDecimalFactory.IsDecimalInstance(double.PositiveInfinity)); + t(!BigDecimalFactory.IsDecimalInstance(double.NegativeInfinity)); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalLnTests.cs b/DecimalSharp.Tests/BigDecimalLnTests.cs new file mode 100644 index 0000000..897595d --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalLnTests.cs @@ -0,0 +1,560 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; +using System.Globalization; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalLn")] + public class BigDecimalLnTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Ln() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, string expected, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Ln().ValueOf()); + }; + + t("0", "-Infinity", 40, RoundingMode.ROUND_HALF_UP); + t("0", Math.Log(0).ToString(CultureInfo.InvariantCulture), 40, RoundingMode.ROUND_HALF_UP); + t("-0", "-Infinity", 40, RoundingMode.ROUND_HALF_UP); + //t("-0", Math.Log("-0").ToString(CultureInfo.InvariantCulture), 40, 4); + t("1", "0", 40, RoundingMode.ROUND_HALF_UP); + t("1", Math.Log(1).ToString(CultureInfo.InvariantCulture), 40, RoundingMode.ROUND_HALF_UP); + t("-Infinity", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("-Infinity", Math.Log(double.NegativeInfinity).ToString(CultureInfo.InvariantCulture), 40, RoundingMode.ROUND_HALF_UP); + t("Infinity", "Infinity", 40, RoundingMode.ROUND_HALF_UP); + t("Infinity", Math.Log(double.PositiveInfinity).ToString(CultureInfo.InvariantCulture), 40, RoundingMode.ROUND_HALF_UP); + t("NaN", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("NaN", Math.Log(double.NaN).ToString(CultureInfo.InvariantCulture), 40, RoundingMode.ROUND_HALF_UP); + t("2.7182818284590452353602874713526624977572", "1", 39, RoundingMode.ROUND_HALF_UP); + + t("91247532.65728", "18.3290865106890306", 19, RoundingMode.ROUND_DOWN); + t("727579403.9", "20.40523369730819818291393006", 28, RoundingMode.ROUND_FLOOR); + t("419065154.52076499608", "19.8535369658470908", 19, RoundingMode.ROUND_CEIL); + t("130749452.494110812", "18.68879347348", 13, RoundingMode.ROUND_HALF_EVEN); + t("1185619573.5511384009507900359", "20.89353132177529891789", 22, RoundingMode.ROUND_UP); + t("530465273.44", "20.089265053819159", 17, RoundingMode.ROUND_HALF_UP); + t("93521824.19043496087", "18.353705380823595707150211318", 29, RoundingMode.ROUND_FLOOR); + t("93587439.79738005953", "18.354406742245", 14, RoundingMode.ROUND_UP); + t("913009834.17782778193371741", "20.63225720978034314683755252", 29, RoundingMode.ROUND_HALF_UP); + t("96363417.9729392663575231665", "18.3836372059508935007674191717", 30, RoundingMode.ROUND_UP); + t("210401674.5643546532430157", "19.1645289977522148145584372801492541489626022147443118341", 57, RoundingMode.ROUND_FLOOR); + t("952417276.8651321118737418", "20.67451381275802954644121920485653995422386303532469652920020456933991073071", 76, RoundingMode.ROUND_FLOOR); + + t("142322563.253900033190831713543268828109981967888490291406527346535501984011990242137300064766425179727442507442591862989037644368590904104621357145575632132596634560836335843482822061685451360570260600926717066081883739008412790434377893984866700040372917562269733068809727985812968781985268403920729907489962116060023323078359102582924017315196797171078484331048743611378544575282691634826207", "18.77360661165643483904346", 25, RoundingMode.ROUND_HALF_UP); + t("371400293.53826507744653292410472631048281764405036030167939649508120465472946573115185753424640793913438158589233749086894500415028950753895660006551599374916249772634013307822672548085573611750200419176163913242813545244921337312493040312898991903677477383181667469789752847529551033664230833747974881304800992388176411266053764", "19.732790997238693", 17, RoundingMode.ROUND_HALF_DOWN); + t("308061625.88823978041274039804998186206865791141980152103127270513511076834989316028752984249313112128128502539231626511285494530858340408577571344790765131399576822101736125139886541136712372342853393859483419254236049454263746814598084065516321822244266672902276617353573868701264411419113453133557772924904083715036037838173144284202571542029689590647862395", "19.5", 3, RoundingMode.ROUND_HALF_UP); + t("56166207.244290436722984261495400654889250285124533321022981475832539124544579218170536475258779537248807554699941937121725987852537935501915601362", "17.8438258394282509999", 21, RoundingMode.ROUND_HALF_EVEN); + t("222624724.707607328646707303867967259139519139629423079746317622391060720425657380049896682204826804719116517331792375328854607227578421004813898208914187979742668659057386237112777304292626154363413399007128375956303978756008642562104282496678212208286912567720592497594790267585324990906417857716073248926170009724869749739256517", "19.2209980629988594846457575", 27, RoundingMode.ROUND_UP); + t("185258598.8193913934519764713459928878217005284578212999298749640634191497175066526732902777761314076480735321777689520905932035413871290869941575745986362030629539", "19.03726323844184819241728391212796712905475895", 46, RoundingMode.ROUND_FLOOR); + t("269693209.738329262863103619932258583418154544819938948520850885129975757878155942909813913575593873613967345697983513739799036745044974770565058447912595936725318596664619637466457786273308379783363276858754429871221986504763671381169376146393662591214420480616860804709987497567541966840009610585879458456647716651843692095645431144825029791181857768800342074145503590855886070320931830102002860548331131946643428330049680453526744262227", "19.4128", 6, RoundingMode.ROUND_CEIL); + t("1023342793.682203550119853590855855440825349592189658219400017324862237829261909743084375742003621225707754353154890001299178609037775929182416", "20.7", 3, RoundingMode.ROUND_HALF_UP); + t("288066409.930742086163569035868595871340060157483817829526835857178700227646660208478255306458767689905569779533532613990984463726169225", "19.4787016015557225466209307245195728148", 39, RoundingMode.ROUND_HALF_EVEN); + t("659962551.7196736389816108624246917556391933488125636501841767846136469655007635589597690345289565290187266991221823977105182413305954975153418768184526414022291854836356848438340284898272452919407497723633962181806929526702888572755311195630908175133297801595820610915241491322973994939537556926297001075794108221345170572608247217166782978965314275924298103649904183225053518681061802488451326", "20.307693651556304624603", 23, RoundingMode.ROUND_CEIL); + t("1507364652.7412807014310450849045388639397320237966928257974087635919752464931336652652563316012320514301796477028177198948086347984093073988211028197354698778354347658908468312563297806615829593697914663744507730778747959075016883455899218807867027301117084501104764662133718266594886462034333606057118803676760138265831276687149773555531764176520964444746495235029665718222485165667080758798726878577774041717453053559075165574861878572784439577325279859720699815", "21.133628699942067740343303809380556857137955185", 47, RoundingMode.ROUND_HALF_DOWN); + t("390145000.967298821818782016684792033527978825236257109725032636684195216173865101534596314015627154955417417356051726409514707961291776124601310897", "19.782029025340505793950028597475307602798983116", 47, RoundingMode.ROUND_DOWN); + t("1582186416.193367134722504736788921341001732540902935815137028669849087377143230724513115136185091885228053584573993361147951779854091136019178181014965525402328169438038737972227467851264", "21.18207353512", 13, RoundingMode.ROUND_DOWN); + t("444181511.379330635761040379043896319", "19.9117438462696047845568005370964420406847915", 45, RoundingMode.ROUND_CEIL); + t("1649165442.81508159186866091659911601847915727898761380479217148722967003628844958192423020437941929274541019164440472673454567347131337845196944956123772899539516241995922964069898844748283940385593209556832209762517653421012964293705687275161487307996022854435621786593342404292930985767687391343569565159759022658057195057590383081972675845225107300959105018192214115690180632353307", "21.223535204669576956240210909820794512745", 41, RoundingMode.ROUND_HALF_DOWN); + t("956193088.33977562292786906645507064275401232361020165960269744050571700135755870903976551991970971401541090373022939626590186869869098847675469870075789885973042670437758904496341260362989490245294442892663605116104481315514350394492341667402397008571518074733491886421982724176798753763402802355543297381889941871793636978236549161242963426659386692353226535780947411516134695241409391848436453976510684", "20.678470425872231784432536313273269750899620287", 47, RoundingMode.ROUND_HALF_EVEN); + t("524656579.6561082202986522788989992058097028959478133491616251386650273315481201712733337497961653741466850177948", "20.07825447252854998238544895", 28, RoundingMode.ROUND_DOWN); + t("412184042.8896878204667114461794718285421610397268782502943123737616921059160330553262782457035088179494074564563410048773731594742762676033110116212190491442443442166045598309788282584460671280467345157657971668722189192696185094311918310776057781011454221034130478455744396828404806478740586228712397995429199362271635020780002483852222338852479130612370279841990621710882872848128725669571603659740938524254161291050199148884609411958653228755273145468", "19.83698051361329059", 19, RoundingMode.ROUND_HALF_DOWN); + t("54177615.4161615199898039376707204324649188748836298320352749128620609118474310429998270745885186642610341190928928278585051565238331611651463560104044550438095405103019768593446391808685915870067181972775276870790595322163624212767962894314519491376965719216779872096909267426650844863008221945010966830813924747797605343830807190598639058151734866383440974952571052161557282681608575287009214045591019", "17.807779", 8, RoundingMode.ROUND_UP); + t("202208538.0186996731425487962109425863325508616918249176043925148428750848485730129706779656165064759679330957399949664528408543769938770452288279928848232018815279096218064756460984277961961770343996043873166572208624824439463192886927974622714849727874835303030139509530094904609301858682577824229369378223655885781140501472159022060380707281531318049222808388638845419183185", "19.124810089270938003831849629", 29, RoundingMode.ROUND_HALF_UP); + t("419077532.2448607619101987942607612824719743129742324423040412531483957695007192401517535342220366141599584852033167948744863351374575147495928944631030285526934314990168106650729902570735596692781194661598925404746581114061618262181809902436423306258562179673075380899236033671", "19.85356650192559415566417", 25, RoundingMode.ROUND_FLOOR); + t("146708483.32674399300686866605976073019721421720619119889933263331964327217855614280622971093931911986466782717253122036096979367739887439449073138969919020714899901453823470883487750734885842377270384469297548135028684586032301609167142204835412029755367943305773471371240556395996807312138338709086180854612022228560209117316657640810924077420852085218504347155816788970471703339876", "18.803958069162751518238485267", 29, RoundingMode.ROUND_HALF_DOWN); + + // 0.00000000000000000000000000000000000000000000000000012300000000007559999999999999999999999999999999999999243549999999070119999999714232000000000000000000000062028900000114375240000070298928000014402707200950... + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.000000000000000000000000000000000000000000000000000123", 3, RoundingMode.ROUND_DOWN); + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.000000000000000000000000000000000000000000000000000123", 3, RoundingMode.ROUND_DOWN); + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.0000000000000000000000000000000000000000000000000001230000000000756", 16, RoundingMode.ROUND_UP); + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.0000000000000000000000000000000000000000000000000001230000000000755", 16, RoundingMode.ROUND_DOWN); + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.00000000000000000000000000000000000000000000000000012300000000007559", 17, RoundingMode.ROUND_DOWN); + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.0000000000000000000000000000000000000000000000000001230000000000755999999999999999999999999999999999999924354999999907011999999971423201", 85, RoundingMode.ROUND_UP); + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.00000000000000000000000000000000000000000000000000012300000000007559999999999999999999999999999999999999243549999999070119999999714232", 83, RoundingMode.ROUND_DOWN); + + // 0.000000001229999999999549999690409... + t("1.000000001230000000756", "0.00000000122", 3, RoundingMode.ROUND_DOWN); + t("1.000000001230000000756", "0.00000000122999", 6, RoundingMode.ROUND_DOWN); + t("1.000000001230000000756", "0.00000000122999999999954", 15, RoundingMode.ROUND_DOWN); + t("0.9999999", "-0.0000001000000050000003333333583333353333335000000142857155357144", 58, RoundingMode.ROUND_FLOOR); + + t("0.999", "-0.001000500333583533500142983", 25, RoundingMode.ROUND_UP); + t("0.99", "-0.0100503358536", 12, RoundingMode.ROUND_FLOOR); + t("1.0000000000001", "0.00000000000009999999999999501", 16, RoundingMode.ROUND_CEIL); + t("1.0000000000001", "0.0000000000000999999999999951", 15, RoundingMode.ROUND_CEIL); + t("1.0000000000001", "0.000000000000099999999999996", 14, RoundingMode.ROUND_CEIL); + t("1.00000000000001", "0.00000000000000999999999999996", 15, RoundingMode.ROUND_CEIL); + t("1.000000000000000000000000000000000000001", "0.0000000000000000000000000000000000000009999999999999999999999999999999999999995000001", 46, RoundingMode.ROUND_UP); + + t("8.1", "2.09186", 6, RoundingMode.ROUND_DOWN); + t("39.6", "3.67883", 7, RoundingMode.ROUND_CEIL); + t("13.83", "2.62684015", 9, RoundingMode.ROUND_HALF_UP); + t("46.7", "4", 1, RoundingMode.ROUND_UP); + t("47.9", "4", 1, RoundingMode.ROUND_HALF_UP); + t("98.9", "4.59410924", 9, RoundingMode.ROUND_HALF_UP); + t("28.1", "3.33576957", 9, RoundingMode.ROUND_FLOOR); + t("19.4", "2.9652731", 8, RoundingMode.ROUND_UP); + t("1.8", "0.587786665", 9, RoundingMode.ROUND_HALF_UP); + t("63.8", "4", 1, RoundingMode.ROUND_HALF_UP); + t("3.5", "1.25276296", 9, RoundingMode.ROUND_FLOOR); + t("72.91", "5", 1, RoundingMode.ROUND_CEIL); + t("7.54", "2.020223", 7, RoundingMode.ROUND_UP); + t("61.1", "4.11251186", 9, RoundingMode.ROUND_FLOOR); + t("64.3", "4.16", 3, RoundingMode.ROUND_HALF_UP); + t("70.4", "4.26", 3, RoundingMode.ROUND_UP); + t("40.34", "3.6973435", 8, RoundingMode.ROUND_DOWN); + t("97.56", "4.580468", 7, RoundingMode.ROUND_UP); + t("4.2", "1.4350845", 8, RoundingMode.ROUND_DOWN); + t("14.23", "2.65535", 6, RoundingMode.ROUND_DOWN); + t("21.41", "3.06", 3, RoundingMode.ROUND_DOWN); + t("86.5", "4.46014", 6, RoundingMode.ROUND_FLOOR); + t("53.5", "3.97968", 6, RoundingMode.ROUND_HALF_UP); + t("41.2", "4", 1, RoundingMode.ROUND_HALF_UP); + t("22.67", "3.121", 4, RoundingMode.ROUND_DOWN); + t("39.1", "3.666122466", 10, RoundingMode.ROUND_DOWN); + t("20.8", "3.035", 4, RoundingMode.ROUND_UP); + t("27.72", "3.3221541743", 11, RoundingMode.ROUND_FLOOR); + + t("484260633.26", "19.9981", 6, RoundingMode.ROUND_DOWN); + t("739084458.57", "20.420922760027607325270794371574372", 35, RoundingMode.ROUND_FLOOR); + t("173897238.6257338023989", "18.9739751001054747115892", 24, RoundingMode.ROUND_UP); + t("234294644.588885865140275679", "19.2720900461484484624992", 24, RoundingMode.ROUND_HALF_EVEN); + t("663446355.03930603", "20.312", 5, RoundingMode.ROUND_FLOOR); + t("236924096.650141980105861288", "19.2832503", 9, RoundingMode.ROUND_DOWN); + t("383519031.802423", "19.7648998041", 12, RoundingMode.ROUND_FLOOR); + t("495413774.3180056262693", "20.02090387906982718762754628426", 31, RoundingMode.ROUND_UP); + t("103272854.9147823146420226558", "18.4528851204168398068299228814439335", 36, RoundingMode.ROUND_CEIL); + t("1255876919.801289301817086", "20.9510999", 9, RoundingMode.ROUND_HALF_UP); + t("892565379.904099781", "20.6096103237295763729453899449191", 33, RoundingMode.ROUND_HALF_DOWN); + t("714436577.20394836", "20.38700479", 10, RoundingMode.ROUND_CEIL); + t("114209899", "18.5535", 6, RoundingMode.ROUND_HALF_EVEN); + t("11138070.731145", "16.225879593546584", 17, RoundingMode.ROUND_DOWN); + t("173982352.98970322915408", "18.9744644324360810729339336092249432", 36, RoundingMode.ROUND_UP); + t("601898865.418395208648", "20.2155999915160485142287883", 27, RoundingMode.ROUND_CEIL); + t("1737398240.940989286501485", "21.3", 3, RoundingMode.ROUND_HALF_DOWN); + t("1223195313.271302839406", "20.93", 4, RoundingMode.ROUND_CEIL); + t("483960664.70757792519406292", "19.9975141901128827175535702", 27, RoundingMode.ROUND_UP); + t("254561643.88559655966887725", "19.35505359", 10, RoundingMode.ROUND_UP); + t("230901371.26208883297662", "19.25750121307751", 16, RoundingMode.ROUND_CEIL); + t("39049637.3708272077470901", "17.480344148", 11, RoundingMode.ROUND_HALF_DOWN); + t("605727.08861135233", "13.314184814787811646051719561794", 32, RoundingMode.ROUND_HALF_DOWN); + t("110166953.414692391364862", "18.51750753144102983720945609400314449", 37, RoundingMode.ROUND_FLOOR); + t("341161100.758980208051", "19.6478653599282687781757344218", 31, RoundingMode.ROUND_HALF_UP); + t("316912316.269705411968295", "19.57413568875", 13, RoundingMode.ROUND_DOWN); + t("1471705773.129049604979506", "21.1096879548887928212", 21, RoundingMode.ROUND_CEIL); + t("43608215.24072301429834", "17.6", 4, RoundingMode.ROUND_UP); + t("692035632.3", "20.3551480040192941281921918635691", 33, RoundingMode.ROUND_HALF_UP); + t("437966495.9954174972446009", "19.9", 3, RoundingMode.ROUND_CEIL); + t("1021072161.39012", "20.74411905080098544439092", 25, RoundingMode.ROUND_UP); + t("420919239.137", "19.85795154221623", 16, RoundingMode.ROUND_CEIL); + t("1478634317.69367498567837", "21.114384740403810652547", 23, RoundingMode.ROUND_FLOOR); + + t("7030.0000000004", "8.8579419848047674873993819813049734644306", 41, RoundingMode.ROUND_FLOOR); + t("14302.00090090005", "9.5681547295995328150820246661661705098", 38, RoundingMode.ROUND_DOWN); + t("31131.999969929999979999", "10.34599150711339159800792", 25, RoundingMode.ROUND_CEIL); + t("11604.0000000000070005080090000000805009", "9.35910514524129523926613596795448321965442856295", 48, RoundingMode.ROUND_FLOOR); + t("31917.99991999999899997969", "10.37092539045270895006814258635431", 34, RoundingMode.ROUND_CEIL); + t("26753.94999", "10.194438", 8, RoundingMode.ROUND_CEIL); + t("29279.05000800090000700009000000000080004005030000097", "10.2846275224669583306543625537", 30, RoundingMode.ROUND_FLOOR); + t("11553.00407000007000030000092", "9.3547007747724112152725332649758224586144889", 44, RoundingMode.ROUND_HALF_UP); + t("26807.0000000200007", "10.1964183264243228688799088559564488641428510584", 48, RoundingMode.ROUND_CEIL); + t("3714.999299999999899999999959999496999998995979949999999969399979", "8.2201337687265389341123277272836362405282053685", 47, RoundingMode.ROUND_CEIL); + t("11275.000001000060000080002000020000001000000000000005", "9.330343164459576214650017260944374", 34, RoundingMode.ROUND_DOWN); + t("18404.00107000000000000700701009003008000000000000700203", "9.820323369414893", 16, RoundingMode.ROUND_UP); + t("11735.00000000200002", "9.37033110828529432", 18, RoundingMode.ROUND_FLOOR); + t("29285.9", "10.28486145051", 13, RoundingMode.ROUND_CEIL); + t("24143.9999999999999599999999", "10.09179118100763013383", 22, RoundingMode.ROUND_UP); + t("1189.0000030020000000000000000080000006000030900907", "7.08086789921559259321173351103264209976", 39, RoundingMode.ROUND_FLOOR); + t("27341.0000008", "10.2161426860830683625276502597036387295831", 42, RoundingMode.ROUND_DOWN); + t("21469.99999999999969", "9.9744118908728266982", 20, RoundingMode.ROUND_CEIL); + t("3243.000000900007000000305000060209000000004000000900600000600013", "8.0842542", 8, RoundingMode.ROUND_UP); + t("16240.999999", "9.695294188113030278102040381421186919123", 40, RoundingMode.ROUND_DOWN); + t("2258.999199", "7.72267716188626709813978452604048821542674214", 45, RoundingMode.ROUND_FLOOR); + t("14805.999994993999999999994994999999999799999999999299999999999", "9.602787782664937484827890675974506248220680541057", 49, RoundingMode.ROUND_DOWN); + t("6159.00400302", "8.725670355633251921000813056", 29, RoundingMode.ROUND_UP); + t("22763.99999999996999998992999959999939899999", "10.03293561972301", 16, RoundingMode.ROUND_HALF_UP); + t("12087.000090000000900500000000020500000000002", "9.3998857813", 11, RoundingMode.ROUND_HALF_UP); + t("24056.00008007005", "10.0881397279968507", 18, RoundingMode.ROUND_UP); + t("1273.9", "7.14983834011574117903670501641161393434448327659", 48, RoundingMode.ROUND_UP); + t("31641.0006006003000000000000000000050001", "10.36220904592643417978456213185992074668712", 43, RoundingMode.ROUND_HALF_UP); + t("28152.060004000000000000000007", "10.2453758104285329372599741260889658", 36, RoundingMode.ROUND_FLOOR); + t("27680.00040003001010000500400000070000000000000050002", "10.228465424183556996128", 23, RoundingMode.ROUND_CEIL); + t("31218.00002030000000100090000050704010007079", "10.348750131168624384483033071", 29, RoundingMode.ROUND_UP); + t("11417.9", "9.342937578384608", 16, RoundingMode.ROUND_HALF_UP); + + t("0.9999999999999999999199499999969999979699999999999999", "-0.00000000000000000008005000000300000203320400125024025016", 37, RoundingMode.ROUND_HALF_UP); + t("0.000010000000000000900406000400000060000021", "-11.51292546497013837", 19, RoundingMode.ROUND_CEIL); + t("0.999999999999939994989999999", "-0.000000000000060005010000002800300612550182023047506056", 41, RoundingMode.ROUND_FLOOR); + t("0.979999999999999999", "-0.02020270731751944942845346428", 28, RoundingMode.ROUND_DOWN); + t("0.009009005050040300000400008", "-4.7095306407579573919326957858245838", 35, RoundingMode.ROUND_HALF_UP); + t("0.060080080020000000060000000000000080900000000000600000008087", "-2.81207693963633246203151", 24, RoundingMode.ROUND_HALF_UP); + t("0.999997999999399997999993999949", "-0.000002000002600005866683246750786841565741132", 40, RoundingMode.ROUND_HALF_UP); + t("0.999999999999999999929929999997999979999999929799", "-0.00000000000000000007007000000200002000245497265114014", 34, RoundingMode.ROUND_HALF_UP); + t("0.08000009", "-2.5257275193088882518096775704454984610695", 41, RoundingMode.ROUND_FLOOR); + t("0.00090400000000000000000004060600070700000809", "-7.0086811975720976072740759519732589", 35, RoundingMode.ROUND_HALF_UP); + t("0.000704006", "-7.25872367911527720999907560001613988913676912731866147366599498415", 66, RoundingMode.ROUND_DOWN); + t("0.08", "-2.52572864430825543979", 21, RoundingMode.ROUND_UP); + t("0.9999999929999199999499999999999999799999499", "-0.0000000070000800245505601178872580008623040894857280221937339", 53, RoundingMode.ROUND_UP); + t("0.99499998999694996999999999999999999397999299999", "-0.0050125518769", 11, RoundingMode.ROUND_FLOOR); + t("0.0000000000020000007000005000002", "-26.93787358536841414877187370746409029977817", 43, RoundingMode.ROUND_UP); + t("0.009000002000002", "-4.71053048", 10, RoundingMode.ROUND_UP); + t("0.03000004", "-3.5065565639875372314061705613342488", 36, RoundingMode.ROUND_CEIL); + + t("0.1754385964912280701754385965", "-1.74046617484051", 15, RoundingMode.ROUND_FLOOR); + t("6.0", "1.791759469228055", 16, RoundingMode.ROUND_HALF_EVEN); + t("0.5", "-0.6931471805599453", 17, RoundingMode.ROUND_CEIL); + t("2.5", "0.91", 2, RoundingMode.ROUND_DOWN); + t("0.142857", "-1.94591114905582", 15, RoundingMode.ROUND_FLOOR); + t("0.4545454545454545454", "-0.788457360364270169", 18, RoundingMode.ROUND_CEIL); + t("0.05", "-2.995732273553990993", 19, RoundingMode.ROUND_CEIL); + t("9.0", "2.1972245773362194", 17, RoundingMode.ROUND_HALF_EVEN); + t("2.0", "0.693147180559945", 15, RoundingMode.ROUND_DOWN); + t("0.02132196162046908315", "-3.84801767545223368", 18, RoundingMode.ROUND_HALF_UP); + t("0.1063829787234042553191", "-2.2407096893", 11, RoundingMode.ROUND_UP); + t("2.7", "0.9932518", 7, RoundingMode.ROUND_UP); + t("0.013440860215", "-4.3094559418430461815", 20, RoundingMode.ROUND_DOWN); + t("0.0107526881720430107526881", "-4.53259", 6, RoundingMode.ROUND_CEIL); + t("0.03125", "-3", 1, RoundingMode.ROUND_HALF_DOWN); + t("2.3", "0.8329", 4, RoundingMode.ROUND_HALF_UP); + t("0.015151515", "-4.18965475203", 12, RoundingMode.ROUND_HALF_DOWN); + t("0.01162790697674418", "-4.45434729626", 12, RoundingMode.ROUND_UP); + t("0.01584786053882725", "-4.1447207695471679983", 20, RoundingMode.ROUND_FLOOR); + t("9.3", "2.2300144001", 11, RoundingMode.ROUND_FLOOR); + t("36.0", "3.5835", 5, RoundingMode.ROUND_FLOOR); + t("0.0111111111", "-4.4998096713302", 14, RoundingMode.ROUND_CEIL); + t("2.8", "1.1", 2, RoundingMode.ROUND_CEIL); + t("9.0", "2.197224577336219", 16, RoundingMode.ROUND_FLOOR); + t("0.011363636363636363636", "-4.4", 2, RoundingMode.ROUND_CEIL); + t("70.0", "4.248495242", 11, RoundingMode.ROUND_DOWN); + t("0.0111111111111111", "-4.49980967033", 12, RoundingMode.ROUND_HALF_DOWN); + t("4.0", "1.39", 3, RoundingMode.ROUND_HALF_DOWN); + t("0.01117318", "-4.49423901528089", 15, RoundingMode.ROUND_HALF_DOWN); + t("0.2", "-1.60943791243410038", 18, RoundingMode.ROUND_FLOOR); + t("0.2941176470588235294117", "-1.2237754316221157056", 20, RoundingMode.ROUND_HALF_DOWN); + t("25.0", "3.218875824868200749", 19, RoundingMode.ROUND_HALF_UP); + t("0.19230769230769230769230", "-1.64865862558738168", 18, RoundingMode.ROUND_FLOOR); + t("35.0", "3.5553480614", 11, RoundingMode.ROUND_FLOOR); + t("50.0", "3.9120230054281460586", 20, RoundingMode.ROUND_HALF_DOWN); + t("0.0241545893719806763285024", "-3.7233", 5, RoundingMode.ROUND_HALF_UP); + t("12.0", "2.484906", 7, RoundingMode.ROUND_FLOOR); + t("0.077519379844", "-2.55722731138003", 15, RoundingMode.ROUND_UP); + t("78.9", "4", 1, RoundingMode.ROUND_HALF_EVEN); + t("4.9", "1.589235205116580927", 19, RoundingMode.ROUND_CEIL); + t("59.8", "4.091005660956586", 16, RoundingMode.ROUND_DOWN); + t("4.2", "1.43509", 6, RoundingMode.ROUND_UP); + t("0.02", "-3.9121", 5, RoundingMode.ROUND_FLOOR); + t("60.0", "4.09", 3, RoundingMode.ROUND_DOWN); + t("0.7692307", "-0.26236435", 8, RoundingMode.ROUND_CEIL); + t("0.333333333333", "-1.09861228866911", 15, RoundingMode.ROUND_UP); + t("0.02732240437158469945", "-3.600048240407", 13, RoundingMode.ROUND_HALF_DOWN); + t("0.061728395061728395", "-2.8", 2, RoundingMode.ROUND_HALF_EVEN); + t("8.0", "2.07944154", 9, RoundingMode.ROUND_HALF_DOWN); + + t("0.9999999999999999999999999999999999999568192301488826794261698690972956411635111284787367786816502083882422798578731605252106199479075698", "-0.00000000000000000000000000000000000004318076985111732057383013090270435884", 37, RoundingMode.ROUND_HALF_UP); + t("0.9999999999999999999999979550666058305047704469654544926170385722676726565280928302935213393351515069436413391635857924053031503612857234287", "-0.000000000000000000000002044933394169495", 16, RoundingMode.ROUND_HALF_EVEN); + t("0.9999999999999999999999999999788589934323601088222420429829335393675583983311669404940044418555472559469792115593688854910667629732945617", "-0.000000000000000000000000000021141006567639891177757", 23, RoundingMode.ROUND_CEIL); + t("0.99999965612996150232225742078449327047019615530457466722741143133687180033806758021000178033650121765045177844535360974813202360649705716806472085515573024723452129710679277030691649", "-0.00000034387009762099298460124920225891418549479847", 44, RoundingMode.ROUND_FLOOR); + t("0.999999999999999999998", "-0.000000000000000000002", 11, RoundingMode.ROUND_HALF_EVEN); + t("0.99998389456495199790866464051967145510973599943414379845553913640458143099808775839406749813252", "-0.0000161055647419136538238914419840240365", 36, RoundingMode.ROUND_HALF_DOWN); + t("1.000000000000000000000000000000000000000002453877989156637807977474490521127775312951564217698150", "0.0000000000000000000000000000000000000000024539", 5, RoundingMode.ROUND_HALF_UP); + t("0.999999987593466883036919655717507752311798436584262710410080485802440651098", "-0.00000001240653", 7, RoundingMode.ROUND_HALF_EVEN); + t("1.000000018472078439367595548243230561734", "0.0000000184720782687587567141685374276721136", 36, RoundingMode.ROUND_UP); + t("1.000000000000000000000000000027061294139028140296788935076920940602313183007831066627748504596064337387546517866314036676735728406098988897643792775080246506595767189394976464369", "0.0000000000000000000000000000271", 3, RoundingMode.ROUND_HALF_EVEN); + t("0.999999999999999999999999999999999999999999999999983236514849608313776995668242152423498923869153102324092773269164486380023512206", "-0.0000000000000000000000000000000000000000000000000167634851503916862230043317578", 30, RoundingMode.ROUND_CEIL); + t("0.999999999999999999998364", "-0.000000000000000000001636", 12, RoundingMode.ROUND_HALF_UP); + t("0.999999999984247763351546132381201803224221320759305237486792312341695697664625337191197409538174918606370093200173235377160974530349186640210056578324041384176737202852579773243", "-0.0000000000157522366485779340985139462", 27, RoundingMode.ROUND_HALF_EVEN); + t("0.9999999999999999999990018683160077458539750633020995640413381403082761992348270405950390259594627171842", "-0.0000000000000000000009981317", 7, RoundingMode.ROUND_HALF_UP); + t("0.99999999999999999999999999999999999999999999999999985408483944", "-0.00000000000000000000000000000000000000000000000000014591516056", 35, RoundingMode.ROUND_DOWN); + t("0.999999999999999999999999999999999999999999999999998739619976", "-0.000000000000000000000000000000000000000000000000001260380024", 19, RoundingMode.ROUND_HALF_EVEN); + t("0.99999999999999999999999999999999999999999999999999999885639999798325100337440101041086693875558962971018414706077286569119145472180293030705985903425546926770196944598420458571451206946321039210", "-0.0000000000000000000000000000000000000000000000000000011436000020167489966255989895891330612444103702898", 50, RoundingMode.ROUND_HALF_DOWN); + t("0.9999999999999999999999999999998813849879156043674936830517787361054747787", "-0.0000000000000000000000000000001186", 4, RoundingMode.ROUND_CEIL); + t("1.0000000000000000000278495935577735173108449580311901557454985107031530689779032404701969152386509968231412912032547047938976884258008764161145204", "0.000000000000000000027849", 5, RoundingMode.ROUND_DOWN); + t("0.9999999999999999973362461433229285135656310591384423930035289356669163226763087894358613606844049018612982044184276721128495686590536237237362306901212", "-0.0000000000000000026637538566770714899821612453425437643031829", 44, RoundingMode.ROUND_HALF_DOWN); + t("1.00000000000000176253868933517211924999595559448630464030179930682524750778432581467161581396555777249054042674040627129810092955303337", "0.000000000000001762538689335170566", 20, RoundingMode.ROUND_HALF_DOWN); + t("0.99999999999999999999999999999999999977092768577305435532481001390241851854279230037455", "-0.000000000000000000000000000000000000229072314226945644675189986097581481", 36, RoundingMode.ROUND_DOWN); + t("0.9999999999999999999999999999999999999999999999999999999872655993173067727213258266707420877839338907224927740881477058093177568467325181347117970284259875332114167", "-0.0000000000000000000000000000000000000000000000000000000127344006826932272786742", 24, RoundingMode.ROUND_FLOOR); + t("1.0000000172264280662442594957709154039786849716698889540202736142143930380", "0.00000001722642791786934923900676", 25, RoundingMode.ROUND_HALF_DOWN); + t("0.999999999999999999999999999999999982912873108922", "-0.000000000000000000000000000000000017087126891078", 29, RoundingMode.ROUND_CEIL); + t("0.999999999999999999999999999999999999999999993901016148293422192196736265601661935467416309801727317670352425687933", "-0.0000000000000000000000000000000000000000000060989838517065778078032637343983381", 35, RoundingMode.ROUND_HALF_DOWN); + t("1.0000000000000000000000000000000000001557068218834187197100492745906330662942472387805706361042981050161586903484636128434617775053436339425448812194544548", "0.0000000000000000000000000000000000001557068218834187197100492745906330663", 37, RoundingMode.ROUND_HALF_EVEN); + t("0.9999999999999999999999999999965", "-0.000000000000000000000000000003500000000000000000000000000006125", 37, RoundingMode.ROUND_HALF_UP); + t("0.999999999978069784575542971695341560698127887742654234264366033657806", "-0.00000000002193021542469749548", 19, RoundingMode.ROUND_HALF_EVEN); + t("0.99999999999999999999999999999999999999971989402139646726487926603258362083338", "-0.00000000000000000000000000000000000000028010597861", 11, RoundingMode.ROUND_FLOOR); + t("1.0000000005777313213100622689185785411683162890830022421832393625555641832484284367817582206653835891277275299383003063423401888577943921722016789943432463695865333", "0.00000000057773132114317552917152047", 26, RoundingMode.ROUND_UP); + t("0.99998899817496551713109615150897242336013399949226209047495781001932", "-0.000011001885556", 11, RoundingMode.ROUND_FLOOR); + t("0.9999999999999999999999999999999999999998297812400933250983600309185363087152186898130964880717734025466693634260269779753896445207544565324993821252294277099318291490267724329103905", "-0.00000000000000000000000000000000000000017021875990667490163996908", 26, RoundingMode.ROUND_CEIL); + t("0.999999999999999999999999999999867678505517799638290521749019978249164551148555611278304293867128540415736157410807909474981350886279390744210330912921984627066838448347590465998102019224", "-0.0000000000000000000000000000001323", 4, RoundingMode.ROUND_HALF_EVEN); + t("0.99999999999999955124573963968202720343790876222338286616005694319199910050972066877767645901567386160990300", "-0.0000000000000004487542", 7, RoundingMode.ROUND_CEIL); + t("1.00000000000000000000000000000000000000000000000000000000238653373610066251324626982217917546085298331873741456053912434675", "0.0000000000000000000000000000000000000000000000000000000023865337361006625132462698221791754608529833187", 47, RoundingMode.ROUND_HALF_EVEN); + t("0.9999861381597997249299307707821689337357639252598918981802356169251231384862641946832270120025664317350590928784923055179837234141982333351243328116077696716052298729080148160342", "-0.000013861936276469802", 18, RoundingMode.ROUND_HALF_DOWN); + t("0.999518302013578741663390652958008318798483548326838687601953768440697860", "-0.00048181404016638611452172080975", 30, RoundingMode.ROUND_CEIL); + t("0.999999999999999999999999999999999999999999999999999998330036520393109006599069774962", "-0.000000000000000000000000000000000000000000000000000001669963479606891", 18, RoundingMode.ROUND_UP); + t("0.9999999999971982592566014030229274322557335630334721819051248984500648246070196539508012557622985639254125086208121666523259793307451588484063477678399192077493910841989290", "-0.00000000000280174074340252185266918493667", 30, RoundingMode.ROUND_HALF_EVEN); + t("1.0000000000000000000000000000000000000000000000000003081468179941393977604635738549120099277215766896592811135855391834253391376095954064189345149319503595848525394170943997567283", "0.0000000000000000000000000000000000000000000000000003081468179941393977604635738549120099", 37, RoundingMode.ROUND_FLOOR); + t("1.0101564097626380683093087282120826613421424331759509214909151214101003", "0.0101051800145446340394781491861117815898", 39, RoundingMode.ROUND_HALF_EVEN); + t("0.99999999999999999999999999999999999999999999999999998835768423821199588003439629108184316187951135202946432288978839496371393350180031770629223550075209192125418982248995945098956877584132", "-0.00000000000000000000000000000000000000000000000000001164231576178800411996", 22, RoundingMode.ROUND_DOWN); + t("0.999999999999999999999999999999999999999999999999999999999976872096656109063431181886276194814782001823830665873550337102544082509981820955995454425929992234626018878531564551440745722576230", "-0.00000000000000000000000000000000000000000000000000000000002312790334389093657", 19, RoundingMode.ROUND_HALF_DOWN); + t("0.9999999967066363395314220", "-0.00000000329336366589170011195437", 24, RoundingMode.ROUND_HALF_EVEN); + + t("1.0857744658E-87", "-200.242609564754818345602", 24, RoundingMode.ROUND_HALF_EVEN); + t("7967796600342935039987851875126979686690856098804803834653251050081030306760096147743650654823921573015034335799167324649191446374757438.0484311242", "312.924395547087248674854", 24, RoundingMode.ROUND_CEIL); + t("4.959906063275914201262895287E-84", "-191.8157610097980062", 19, RoundingMode.ROUND_FLOOR); + t("247605260094390353104779047655089617126976010142339438487265438023612656.077017582415972838691597824259541", "164.390207201496998614488673041664777028805542", 45, RoundingMode.ROUND_UP); + t("7.397668035008368", "2", 1, RoundingMode.ROUND_FLOOR); + t("1.0643E-106", "-244.011702551303980943176356044", 30, RoundingMode.ROUND_UP); + t("2.350797564113792872976049891678503E-39", "-89", 2, RoundingMode.ROUND_HALF_DOWN); + t("89.249409735932840957", "5", 1, RoundingMode.ROUND_UP); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("3.22623980772186395511829472880667363767934689738221E+295688495330", "6.808479215178688102694343822133e+11", 31, RoundingMode.ROUND_HALF_EVEN); + t("3.1424008119820360904816828115594380261542633787339288E+6142101067398", "1.4142710357454596074562853825e+13", 29, RoundingMode.ROUND_UP); + t("8.799993E-79577", "-1.832306391942611440981400905118e+5", 32, RoundingMode.ROUND_UP); + t("8.70504056438959496505198875861603616462926E-5971", "-1.374657168803434206833683423555e+4", 31, RoundingMode.ROUND_HALF_UP); + t("8.4006029856E+923125420044", "2.1e+12", 2, RoundingMode.ROUND_FLOOR); + t("4.0119839E-3299350", "-7.59703273728404749704426251310976420299891015285939e+6", 51, RoundingMode.ROUND_CEIL); + t("4.3302768368838848441860607605878081415720594735E+76594", "1.7636566824426052100565028315589397992162e+5", 41, RoundingMode.ROUND_FLOOR); + t("3.8E+329784205242", "7.59356194896453019208845913197638776266462015689e+11", 48, RoundingMode.ROUND_HALF_EVEN); + t("7.6732416747937E+1102", "2.53948651164891795785685349144456466914229134475e+3", 48, RoundingMode.ROUND_CEIL); + t("2.077820490683659388975846E+723625853", "1.666210102754220135345042493516555e+9", 34, RoundingMode.ROUND_HALF_UP); + t("6.688785E-28910", "-6.65658346062145642467325909920069259e+4", 36, RoundingMode.ROUND_HALF_EVEN); + t("6.0136041193424216912E-17927305397954", "-4.1279146166878774234420729153e+13", 29, RoundingMode.ROUND_FLOOR); + t("5.096332862894596814711832511046074722E+745", "1.71705441551516514163775766e+3", 27, RoundingMode.ROUND_HALF_DOWN); + t("5.84975137363E+67993", "1.565614346271e+5", 13, RoundingMode.ROUND_HALF_EVEN); + t("86581147739152189809997746256.485303", "6.6630879609165666865732779356483110831e+1", 39, RoundingMode.ROUND_DOWN); + t("2.12911330891919120203E+120504404889", "2.774716463382859039792244911807807628997e+11", 40, RoundingMode.ROUND_CEIL); + t("7.73433077472591367533265625623113999102E+390676254432750", "8.9956531964360115679915101731401388487e+14", 38, RoundingMode.ROUND_HALF_EVEN); + t("6.6826213753466680887906226588379005611546E-372991246306821", "-8.58844083563354531569986979442855776105e+14", 39, RoundingMode.ROUND_HALF_DOWN); + t("6.3492829903214E+3226", "7.42998785189041059280107543537699949138759874551e+3", 48, RoundingMode.ROUND_UP); + t("5.6620362147525246713E+777935299", "1.79126222452504931719151086e+9", 27, RoundingMode.ROUND_UP); + t("3.534154532190555885356307279594067464756994468E+36066880", "8.3047061501279186616689782347665205e+7", 35, RoundingMode.ROUND_HALF_DOWN); + t("3.5985126E+813569", "1.87331313204266617163386909806087492179897e+6", 42, RoundingMode.ROUND_HALF_UP); + t("8.02230502097885864396312997120584356127409109053488632E+57250", "1.3182507879969879935820551962408658e+5", 35, RoundingMode.ROUND_FLOOR); + t("3.2733347380805773227156921973744955625117401773271E+7057864470", "1.625133351818013021763445401573927815324e+10", 40, RoundingMode.ROUND_FLOOR); + t("3.200965011955166876210847170951991936E+25194197", "5.801178360560763736986182698175e+7", 31, RoundingMode.ROUND_UP); + t("2.49662549037205161930152513676222984332E-1769526964968889", "-4.074486411188359782e+15", 19, RoundingMode.ROUND_DOWN); + t("8.933353606087814264271069533725820479127E+94", "2.1863279060963e+2", 14, RoundingMode.ROUND_CEIL); + t("7.8520496399200949742657682831082508285588236E+751160063", "1.729609965577042813e+9", 20, RoundingMode.ROUND_HALF_EVEN); + t("9.8629670476255586848298885792269963362202371766864992350515E+76670756", "1.76540942122970827049200662319103105281075e+8", 42, RoundingMode.ROUND_CEIL); + t("7.164E+232", "5.36168810058817064037155119131349345287989327560924493423e+2", 57, RoundingMode.ROUND_CEIL); + t("7.0140848964616709789085128982324775586720562136938322979723E+94920694282961", "2.18562975672593082614e+14", 21, RoundingMode.ROUND_UP); + t("5.15295798111342379029337279689740749964293074731042E+75391", "1.73595832316829153955358568211169000080658e+5", 42, RoundingMode.ROUND_FLOOR); + t("4.75511906567739510224E+9281276469", "2.1370928843035034699971447557867150369194e+10", 41, RoundingMode.ROUND_DOWN); + t("9.3428582919353239756E+9473", "2.1814623198164992616236995269818e+4", 32, RoundingMode.ROUND_CEIL); + t("8.69428902381899286125995853877646262336481547649342271017E+28073656389526", "6.464198270836177218138049860623405271087114955052778e+13", 52, RoundingMode.ROUND_DOWN); + t("3.736323028448724390151054937514728816501552616248E-859672555164790", "-1.979469210378545532338977821722936e+15", 34, RoundingMode.ROUND_UP); + t("8.3704021992314838607708728021923440173295401079057777619E+51053", "1.175560014545608380866313681e+5", 28, RoundingMode.ROUND_UP); + t("6.328946425890222657711855468334E+28226", "6.4994611968630829105921275070197989840133161484e+4", 47, RoundingMode.ROUND_DOWN); + t("581028.112757643064563527683530", "1.327255e+1", 7, RoundingMode.ROUND_HALF_UP); + t("5.044E+675213", "1.554737006595206671115965015e+6", 28, RoundingMode.ROUND_CEIL); + t("8.419E-4010970724", "-9.235601395387443688559191477601e+9", 31, RoundingMode.ROUND_DOWN); + t("51.2111719483", "3.9359577104e+0", 11, RoundingMode.ROUND_CEIL); + t("8.81634594656560180086916089974763812544168318286235E-824049757446", "-1.897444687e+12", 10, RoundingMode.ROUND_HALF_UP); + t("6.2212997114E-553559942", "-1.27461886869986969345097622349731651e+9", 36, RoundingMode.ROUND_FLOOR); + t("235519025969854529810574120108993578243.19971", "8.8354855047659717507839540458e+1", 29, RoundingMode.ROUND_FLOOR); + t("7.0258964578196427071536597563115415415640043575157590", "1.9e+0", 2, RoundingMode.ROUND_FLOOR); + t("9.738596641858094986444163000772706367196726E+109229400188311", "2.52e+14", 3, RoundingMode.ROUND_UP); + t("8.62703833E+5568507422742", "1.28219621818345766335259463697135358656004154175e+13", 48, RoundingMode.ROUND_UP); + t("8.41305546301539271737600098357065745E-7295979", "-1.67996103544128833514984735034663e+7", 33, RoundingMode.ROUND_FLOOR); + t("2.5232060242873444092576213384933104665517329499810802952E+8132082", "1.872481171374e+7", 13, RoundingMode.ROUND_CEIL); + t("7.9297195306E+65", "1.5173864871148797849494244247043518353031307868144564e+2", 53, RoundingMode.ROUND_UP); + t("3.64689986228734945266932E+62", "1.44054153219522787090894392411068439321378481560180842e+2", 54, RoundingMode.ROUND_HALF_DOWN); + t("1.334192043174385742450630E-39646400", "-9.1289209342554e+7", 14, RoundingMode.ROUND_UP); + t("2.612654672780E+2075312996908189", "4.7785847699775949720482e+15", 23, RoundingMode.ROUND_HALF_UP); + t("2578000917.79692", "2.16702800974745614276078088977272042e+1", 36, RoundingMode.ROUND_HALF_EVEN); + t("6.596856211693040993166106964362605852614690053358144E-8062494978", "-1.85646e+10", 6, RoundingMode.ROUND_FLOOR); + t("6.0879876921111929476500485212617470990636329749748587985E-601", "-1.382047323290527848037209499935e+3", 31, RoundingMode.ROUND_CEIL); + t("3.286699439E+4569470654914505", "1.052159501287987952020793970337e+16", 31, RoundingMode.ROUND_UP); + t("3.637336824738188102903230332461981310841753899084935587E+10761051833", "2.477823753689330253840044863e+10", 28, RoundingMode.ROUND_CEIL); + t("3.7477430030903749357328391677904495853650E+20869", "4.8053969459485685179695549117734336870515492158e+4", 47, RoundingMode.ROUND_CEIL); + t("3.140337150756E-13712400984", "-3.1573970093770953376660919898558265466406669093e+10", 47, RoundingMode.ROUND_CEIL); + t("8.48368791870432056292625630300375084950237347894278E+624032870", "2e+9", 1, RoundingMode.ROUND_UP); + t("6.5815151328134220328E+98443649460178", "2.2667487974693907959622819142544911252715e+14", 41, RoundingMode.ROUND_HALF_DOWN); + t("1.7723561424140845E+247846099271", "5.7068673353869932302832431846669628468118839468307384e+11", 53, RoundingMode.ROUND_DOWN); + t("3.0949198435280859777489812648334758766940462500408883433646E+2469192456080", "5.68552574110429262534321058697983662070785392e+12", 45, RoundingMode.ROUND_FLOOR); + t("0.85025805182099765686920489225574772214389", "-1.6221538519436441661125978316259087269126272e-1", 44, RoundingMode.ROUND_HALF_UP); + t("4.432834164971387041E-4507057882525783", "-1e+16", 2, RoundingMode.ROUND_DOWN); + t("3.988922913035675507988353278783407292371E+4694273500", "1.08089641849205055e+10", 18, RoundingMode.ROUND_FLOOR); + t("3.01186469E+2545169058", "5.860468333203e+9", 13, RoundingMode.ROUND_HALF_DOWN); + t("9.0748866591646251314532E+47614", "1.096374921287092159e+5", 19, RoundingMode.ROUND_CEIL); + t("5.6180796113670596347965219927087524242601615E+3880377312075", "8.93489895397792489522883676797722624255e+12", 39, RoundingMode.ROUND_DOWN); + t("8.098147787316401427624109754110153170688558350457541922717E+8910511", "2.05172118911948342992282908397e+7", 30, RoundingMode.ROUND_HALF_UP); + t("5.42868111005864502392394132989497156E+59059832747", "1.359902905e+11", 10, RoundingMode.ROUND_HALF_UP); + t("4.70991012341588450130232666320921407597912267207E+65217922", "1.5e+8", 2, RoundingMode.ROUND_FLOOR); + t("7.6016818135485428149331576079477334360182454470810066E+628508014", "1.44719318589e+9", 12, RoundingMode.ROUND_HALF_UP); + t("8.76577418121734880922387712030769537853138823619109E+32845", "7.5630579e+4", 8, RoundingMode.ROUND_CEIL); + t("3.989639481915478229949501547E-3562148605", "-9e+9", 1, RoundingMode.ROUND_UP); + t("7.50095976711871808229778395340891745932E+459172412", "1.05728355300035123967283065534499540845423548025e+9", 48, RoundingMode.ROUND_FLOOR); + t("1.094234101086547061145E+8105185598", "1.8662879534e+10", 11, RoundingMode.ROUND_HALF_EVEN); + t("8.6184097550403752866225958864653E-99458373", "-2.29011364889340897937584119444696367e+8", 36, RoundingMode.ROUND_DOWN); + t("8.370E+4643496155876", "1.0692045027897357766979173674e+13", 29, RoundingMode.ROUND_CEIL); + t("8.8260530736377112408404700113658970187344553009119498E+69", "1.6105607934074696962533009034085e+2", 32, RoundingMode.ROUND_HALF_DOWN); + t("7.21733459581750946992541376472150E+771894752", "1.7773533512920215e+9", 17, RoundingMode.ROUND_DOWN); + t("8.0398697796858068264510296618162080456174991956226525E-45122871", "-1.03899248033280440664832913861293e+8", 33, RoundingMode.ROUND_FLOOR); + t("3.85595703190443742440250277361605E+6091482618322", "1.40261570711819248808711059594479942105082367007e+13", 48, RoundingMode.ROUND_CEIL); + t("7.357095166801105623865E+549536691", "1.265354994745540324309072336890594e+9", 34, RoundingMode.ROUND_HALF_DOWN); + t("1.34533963650515436161701665448464441752127512E+350235747270701", "8.0644761e+14", 8, RoundingMode.ROUND_HALF_UP); + t("6.4170057575167730015652576742667741692190869016E+8059951144", "1.8558723356293656512085e+10", 23, RoundingMode.ROUND_FLOOR); + t("2.4077049295833173373548E-25994301660937", "-5.98540915073e+13", 12, RoundingMode.ROUND_HALF_EVEN); + t("4.535541075E+20", "4.8e+1", 2, RoundingMode.ROUND_HALF_DOWN); + t("7.29846078607878771302050492452384424889888683E-537191033751", "-1.236928066403126e+12", 16, RoundingMode.ROUND_DOWN); + t("2.634898074241585E+90138333023", "2.0755118193e+11", 11, RoundingMode.ROUND_CEIL); + t("5.46374939035500947103431106687153167480402538E-73753665680", "-1.698240911467364203540944369371346431880400463389e+11", 49, RoundingMode.ROUND_HALF_EVEN); + t("2.94299515946637E+607707720", "1.3992987380488273006987151692498736952760425e+9", 44, RoundingMode.ROUND_HALF_UP); + t("3.668100638398885156015068016729087120382965349467E+84070728", "1.935800063496311111975e+8", 22, RoundingMode.ROUND_DOWN); + t("4.4E+2003110597803675", "4.6123326021e+15", 11, RoundingMode.ROUND_HALF_DOWN); + t("1.91685802862500097138466392461E+49834", "1.1474767e+5", 8, RoundingMode.ROUND_FLOOR); + t("7.8060858E-167062888423895", "-3.8467651647738609186703184862365050751052e+14", 41, RoundingMode.ROUND_DOWN); + t("1.978E+5", "1.219501169817074879173281038e+1", 28, RoundingMode.ROUND_UP); + t("5.77970666253418116761098030625E+223072047", "5.13642371840220060515235912414184521974662502e+8", 47, RoundingMode.ROUND_DOWN); + t("5.47649676344748751812140943259036448E-6697621", "-1.5421840572658253455977679095638082e+7", 35, RoundingMode.ROUND_CEIL); + t("5.89272783085181716889488732225953E-80979", "-1.8645926452654519628853278905466928e+5", 35, RoundingMode.ROUND_UP); + t("3.9142246447271235587364475518772E+6792548012", "1.56404197972421574013185426e+10", 27, RoundingMode.ROUND_HALF_EVEN); + t("1.03654E-8829328", "-2.03302789980666878287e+7", 21, RoundingMode.ROUND_HALF_UP); + t("2.966963898883723964406622179262104271E-40046044", "-9.22094228602444715139934346e+7", 27, RoundingMode.ROUND_HALF_EVEN); + t("2.17861809580860432485578624E+39", "9.05795094015633624269836517536636343e+1", 36, RoundingMode.ROUND_HALF_UP); + t("8.5860E+9131106", "2.10251507082814583119796429685249702465e+7", 39, RoundingMode.ROUND_UP); + t("1.5412779579669645484712783548614741E+4221134711453", "9.7195218621118328121695164047507959011952e+12", 41, RoundingMode.ROUND_FLOOR); + t("54.944027854626073894087463822117107421615", "4e+0", 2, RoundingMode.ROUND_DOWN); + t("5.89E+4068309134235820", "9.36762796618291285378e+15", 21, RoundingMode.ROUND_DOWN); + t("1.7782332841915159444510812658618254919081488280E-473555786043", "-1.09040249364311393587934959869e+12", 31, RoundingMode.ROUND_HALF_DOWN); + t("5.856153556936941211324932376345E-5610591872515871", "-1.2918865208528592e+16", 18, RoundingMode.ROUND_HALF_DOWN); + t("8.5879657E+4990177546", "1.1490308e+10", 8, RoundingMode.ROUND_FLOOR); + t("6.806688317295882211444994250555E+7553266453", "1.73920387400077162987035162411978513704566862686e+10", 48, RoundingMode.ROUND_DOWN); + t("3.135921508105851703665460164485160881268374510455809E+807064325772890", "1.8583342856119478444383845e+15", 26, RoundingMode.ROUND_UP); + t("8.7301419368711031383740359E+35766359667870", "8.235508660190309563654957418152355352e+13", 37, RoundingMode.ROUND_DOWN); + t("152800352584718396.185354581216539422462692444", "3.956790857913206e+1", 16, RoundingMode.ROUND_HALF_DOWN); + t("2.61910077229511946E+546201856", "1.2576762523541114e+9", 17, RoundingMode.ROUND_UP); + t("7.448579204378498328767018243284618725336368289559954260E-217700846293938", "-5.0127472340860766741454583700554e+14", 33, RoundingMode.ROUND_HALF_DOWN); + t("7.2047727251858696241230866828095732184425269645695E+469327", "1.0807e+6", 5, RoundingMode.ROUND_HALF_DOWN); + t("6.218121194045431347809839E+4016425286", "9.25e+9", 3, RoundingMode.ROUND_HALF_DOWN); + t("3.96380380194329769560709701426464939552303967224636432913E+5456751169", "1.2564633899294436616578509015890963439260854e+10", 45, RoundingMode.ROUND_HALF_EVEN); + t("8.90161993871518743436E+9653801", "2.222870045956428697966183595567898564e+7", 37, RoundingMode.ROUND_HALF_DOWN); + t("5.87E-8679033343444315", "-1.998421279821315e+16", 17, RoundingMode.ROUND_UP); + t("7.22213E+9285", "2.1381479738372961297283e+4", 23, RoundingMode.ROUND_HALF_UP); + t("4.35089061025101631586337334243547962566776053387632747687140E+45018821795390", "1.03659668e+14", 10, RoundingMode.ROUND_CEIL); + t("8.9507732063667418791057293120281614104087038631714939252E-8440914505", "-1.94359239e+10", 9, RoundingMode.ROUND_HALF_EVEN); + t("3.090280901682869634794313045175007461412804E+841576988836944", "1.9378026291027647750230631e+15", 26, RoundingMode.ROUND_UP); + t("7.7014162551739797973497506E+702559370030249", "1.61770273e+15", 9, RoundingMode.ROUND_HALF_DOWN); + t("4.0025445459842369782426336331309922717E+9723", "2.238942178947647308221847e+4", 25, RoundingMode.ROUND_UP); + t("2.2341E+313775048695", "7.224937496793916263102024244423062e+11", 34, RoundingMode.ROUND_CEIL); + t("7.926192471441099330397999580E-784167", "-1.80560917444508379549407756805599569268569223e+6", 45, RoundingMode.ROUND_DOWN); + t("4.16722E-49749952", "-1.145534964251201622427e+8", 23, RoundingMode.ROUND_HALF_DOWN); + t("7.359482014076842029356125469162217556349E+51298586184260", "1.181e+14", 4, RoundingMode.ROUND_FLOOR); + t("72.7973", "4.287678866602e+0", 13, RoundingMode.ROUND_DOWN); + t("7.458369731089099586537743665754431425332815238574619459129E+851537468000449", "1.96073748e+15", 10, RoundingMode.ROUND_HALF_EVEN); + t("6.811927352E+97672323", "2.248988368565745651603981641555e+8", 31, RoundingMode.ROUND_UP); + t("7.48744078897258414951220797837E+890299", "2.05e+6", 5, RoundingMode.ROUND_UP); + t("9.9786940300229550246920496767E+159423", "3.6708732373261279057236148539102006386167991e+5", 44, RoundingMode.ROUND_CEIL); + t("2.38741991405492015313119224178735E+9478681816955", "2.182547145295516879843288985e+13", 28, RoundingMode.ROUND_CEIL); + t("2.766573766937788216474557230E+30", "7.00951624371767949074247262566550894e+1", 37, RoundingMode.ROUND_HALF_UP); + t("3.62838465078525030E+7741738753458588", "2e+16", 1, RoundingMode.ROUND_CEIL); + t("7E+2084142509237", "4.79891547344626727113852205192e+12", 30, RoundingMode.ROUND_DOWN); + t("6.632399246416402141258204555971393162485E+5282951327214421", "1.216444497305703653967296294053184676613657e+16", 44, RoundingMode.ROUND_HALF_DOWN); + t("9.3160920091238143684430426114185923861195316789176E+9009721765428", "2.0745e+13", 5, RoundingMode.ROUND_DOWN); + t("9.3685E+670410418", "1.543677e+9", 8, RoundingMode.ROUND_HALF_DOWN); + t("2.5346294534658525082446802192095498605896343566597E+4300272406899978", "9.9017431399415154341560132628634710568864551e+15", 44, RoundingMode.ROUND_UP); + t("4.646038E+85", "1.97255748e+2", 9, RoundingMode.ROUND_HALF_DOWN); + t("7.11299819E+7082753304", "1.63e+10", 3, RoundingMode.ROUND_DOWN); + t("7.60429765973931070947601E+223343106", "5.14266508527302571586964653405e+8", 30, RoundingMode.ROUND_UP); + t("1.259774278348886756714714853102551787716753309044316124949E+712621", "1.6408707224870705769939774744309009702195e+6", 41, RoundingMode.ROUND_DOWN); + t("6.0261907885269058826333443505093996174E+6436400131", "1.482035899598163792393092381789529257871165943e+10", 46, RoundingMode.ROUND_FLOOR); + t("2.30437658671337063317129505E+933", "2.15e+3", 4, RoundingMode.ROUND_UP); + t("3.513354973190022585498661637765E+7375148", "1.69819070999962638165306055501e+7", 30, RoundingMode.ROUND_FLOOR); + t("3.59522279140903230506716479623E+86968785461810", "2.002530289601622667750807006104599119026e+14", 40, RoundingMode.ROUND_DOWN); + t("2.323805246716532118808402603969727E+9227297604", "2.12466e+10", 6, RoundingMode.ROUND_HALF_EVEN); + t("4.19231E-7592313503421", "-1.748194789431315881762449482356139169e+13", 37, RoundingMode.ROUND_DOWN); + t("2.824917408520510981566548810161099E-652378", "-1.502154819318141286164e+6", 22, RoundingMode.ROUND_CEIL); + t("9.12243E-50019117136", "-1.1517327347986588780346729255272976018954e+11", 41, RoundingMode.ROUND_UP); + t("3E+762827674466452", "1.756475631749768085398731e+15", 25, RoundingMode.ROUND_HALF_UP); + t("7.88476026918002602572814E-990381735", "-2.280438217319647492655582971583716101855286985546894e+9", 52, RoundingMode.ROUND_FLOOR); + t("1.93876182E+451", "1.0391279265e+3", 11, RoundingMode.ROUND_CEIL); + t("7.3740736325E+654774", "2e+6", 1, RoundingMode.ROUND_HALF_EVEN); + t("7E+4834316708582532", "1.113142558799418024006562114e+16", 28, RoundingMode.ROUND_HALF_UP); + t("8.419903621598494995504679345354396264274607872E-81228", "-1.87032251335338520070667445258625347255285029857514040215222e+5", 60, RoundingMode.ROUND_CEIL); + t("5043072.7", "1.543352611697716150423861515247087376581267e+1", 43, RoundingMode.ROUND_UP); + t("9.967071401753478835579846245480959735737425E-30800642339454", "-7.092109991e+13", 10, RoundingMode.ROUND_HALF_EVEN); + t("7.9191984564270720102158323147796783178696538378E+4299108154110", "9.89906234e+12", 9, RoundingMode.ROUND_FLOOR); + t("64572.983932271806289465556", "1.10755513969156443144229910347268775332908e+1", 42, RoundingMode.ROUND_DOWN); + t("1.937714E+843491028282664", "1.942209867797881766126295470773e+15", 31, RoundingMode.ROUND_UP); + t("6.9114234023582240731E+5055056421210478", "1.16396975597230781881412937544250850646634588400335279264924e+16", 60, RoundingMode.ROUND_CEIL); + t("4.961229890606203486886459941941277127027E+604148", "1.39110378041583852706104753424975e+6", 33, RoundingMode.ROUND_DOWN); + t("1.2295412035299050272723E+2703096359889097", "6.224109383e+15", 10, RoundingMode.ROUND_HALF_UP); + t("9.657371691296E+308989382", "7.1147434715436423514160983064473799366383290739381572967375e+8", 59, RoundingMode.ROUND_CEIL); + t("1.4128908712960608623688853001789149213438E+2145", "4.93939066234102715130453498008430346620462153038006e+3", 51, RoundingMode.ROUND_HALF_EVEN); + t("26144210329259503349147403065.297086", "6.54334252745142805327741060175e+1", 30, RoundingMode.ROUND_HALF_EVEN); + t("8.33725972357462126144877718036E-640752", "-1.47538388278e+6", 12, RoundingMode.ROUND_UP); + t("4.1590152196231371771711659246E+403232512853795", "9.284771731076797069605043792598349156233286259e+14", 46, RoundingMode.ROUND_DOWN); + t("9.82E+13", "3.22180273312889684123493284e+1", 27, RoundingMode.ROUND_FLOOR); + t("7.82843348542643E+46", "1.079766767019947895265445329067662e+2", 34, RoundingMode.ROUND_HALF_DOWN); + t("8.811680861027610685596511333077922481897E+767481402198272", "1.7671912358519e+15", 14, RoundingMode.ROUND_HALF_EVEN); + t("1.2646988103492E-98338836657", "-2.264335393485497795949962419719976584598e+11", 40, RoundingMode.ROUND_CEIL); + t("1.540214958114481019557937E+59181121", "1.3626956743319885978e+8", 20, RoundingMode.ROUND_HALF_EVEN); + t("2.2618706725559597340E-80442266991491", "-1.85225164821253339576e+14", 21, RoundingMode.ROUND_FLOOR); + t("2.25864914751234848775875033898256307911050778157110133811791E-309527450036735", "-7.127132923270444743819e+14", 22, RoundingMode.ROUND_FLOOR); + t("2.330814534885802362082745596145962939767778133925858E+3904036936174", "8.989377251733e+12", 13, RoundingMode.ROUND_HALF_UP); + t("3.0420074653830109395743228528E+921305605563904", "2.121384553463298577109196723086986800668975639e+15", 46, RoundingMode.ROUND_HALF_DOWN); + t("1.0E+872", "2.0078542e+3", 8, RoundingMode.ROUND_FLOOR); + t("1.323555869318702120137287477E-422", "-9.714105872883810124432881156687558071e+2", 37, RoundingMode.ROUND_CEIL); + t("4.84867115556496735086756738807727439043049075112985641565E+614778", "1.415580237005372281896918768840573147097e+6", 40, RoundingMode.ROUND_CEIL); + t("6833491.742", "1.57373463369279317127597002209e+1", 31, RoundingMode.ROUND_HALF_UP); + t("6.13048371442940275525618964841722738636998403233077810E-779320416", "-1.79445157073424472e+9", 18, RoundingMode.ROUND_UP); + t("6.0898902427122806E+4688", "1.07963255460151024248754967714575317203653e+4", 42, RoundingMode.ROUND_CEIL); + t("9.86452924549600460448324612453147245449268E+84761347812", "1.9517021593628361608673649350374236821833483200901459714e+11", 56, RoundingMode.ROUND_UP); + t("3.9176116276489746389198699E+414", "9.54635710688990638428e+2", 21, RoundingMode.ROUND_CEIL); + t("4.095990639970856826151360589E+22632687948659", "5.2113689884969610573321058748008149098043826274e+13", 47, RoundingMode.ROUND_CEIL); + t("8.39387938871195E+763256545", "1.75746314477464181041383599861e+9", 30, RoundingMode.ROUND_UP); + t("7.800050366E+62060334923", "1.428992020619717061857733637740779046196932e+11", 43, RoundingMode.ROUND_HALF_EVEN); + t("8.089598709221611344683604575548820409668250E+87031175958679", "2.00396688388198128829e+14", 21, RoundingMode.ROUND_HALF_UP); + t("5.10635917896490647888E+3182", "7.3284562525678883986172066777758364471375155394546945442e+3", 56, RoundingMode.ROUND_HALF_EVEN); + t("0.0091575773634501050584", "-4.69317361524979007029379576e+0", 27, RoundingMode.ROUND_FLOOR); + t("7.57895891043427E+89609785", "2.0633415715277728333795242903376837197944185472408033310945e+8", 59, RoundingMode.ROUND_DOWN); + t("3.52931879025497378514095E-394665", "-9.087484846216199820657414e+5", 25, RoundingMode.ROUND_HALF_DOWN); + t("9.25007957288654366172E+74427302675", "1.71375197653435e+11", 15, RoundingMode.ROUND_HALF_DOWN); + t("9.689571004958528405688233E+6725552890171551", "1.54861578270520357492776037597261680823721e+16", 42, RoundingMode.ROUND_HALF_DOWN); + t("6.18835267180055712238377841454729349189226E+231771635055534", "5.3367391185773059667279852591e+14", 29, RoundingMode.ROUND_CEIL); + t("9.9940433950867406385462586629E+57", "1.33549339555687132737e+2", 21, RoundingMode.ROUND_DOWN); + t("5.2273640460183882551198285667311888762451852768642903877382E+86461", "1.99085e+5", 6, RoundingMode.ROUND_DOWN); + t("3.7574919683230201675805072575E+3940", "9.0735090181e+3", 12, RoundingMode.ROUND_HALF_DOWN); + t("0.3264874060", "-1.1193639037508e+0", 14, RoundingMode.ROUND_HALF_DOWN); + t("6.617722342369695540731E+87617", "2.01747487844113004556646596647711367404988980698550912078993e+5", 60, RoundingMode.ROUND_CEIL); + t("9.778534925839331822328485E+581875", "1.3398189811755800735983579926048573829203557e+6", 45, RoundingMode.ROUND_UP); + t("8.869065070E+6945", "1.599e+4", 4, RoundingMode.ROUND_HALF_UP); + t("3.13179778997337826067565187594790293739361810498E+22775780", "5.245e+7", 4, RoundingMode.ROUND_UP); + t("5.012E+3260", "7.50803923819762275176671578932335515919818e+3", 42, RoundingMode.ROUND_UP); + t("8.37869137029350445E+900", "2.07445227543587787134124946870990167444156501037595873e+3", 54, RoundingMode.ROUND_DOWN); + t("5.23468330E+979", "2.255886112387006112695230143368806974046102370335747e+3", 52, RoundingMode.ROUND_HALF_UP); + t("5.9982205441659493126046E+2517", "6e+3", 1, RoundingMode.ROUND_CEIL); + t("7E+5", "1.3458835614025541e+1", 17, RoundingMode.ROUND_DOWN); + t("8.36991087473514132639620816460727714124539564560E+114871900769", "2.64502326e+11", 9, RoundingMode.ROUND_DOWN); + t("9.9102170675767525486462268743104768E+722282888", "2e+9", 1, RoundingMode.ROUND_HALF_DOWN); + t("88.7213950103796184597368396487398", "4.4855e+0", 5, RoundingMode.ROUND_DOWN); + t("8.245971550E+8358202", "1.92454734391578027453548100134030572e+7", 36, RoundingMode.ROUND_CEIL); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalLog10Tests.cs b/DecimalSharp.Tests/BigDecimalLog10Tests.cs new file mode 100644 index 0000000..7862a49 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalLog10Tests.cs @@ -0,0 +1,540 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalLog10")] + public class BigDecimalLog10Tests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Log10() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = 0, + ToExpPos = 0, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, string expected, long sd, RoundingMode rm) => + { + var bigDecimalFactoryClone = bigDecimalFactory.Clone(); + bigDecimalFactoryClone.Config.Precision = sd; + bigDecimalFactoryClone.Config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, bigDecimalFactoryClone.Log10(n).ValueOf()); + }; + + t("4841183675443663188762.78", "2.16849516e+1", 9, RoundingMode.ROUND_UP); + t("2.2001084261754258861227E-824263894", "-8.242638936575559156644572542921e+8", 31, RoundingMode.ROUND_HALF_EVEN); + t("9.841678323183423382979E+889", "8.8999306917e+2", 11, RoundingMode.ROUND_CEIL); + t("6.674865349047819300515860303037383179383821E-556564097058", "-6e+11", 1, RoundingMode.ROUND_HALF_UP); + t("8.45466498447465675136763E+70601305204", "7.07e+10", 3, RoundingMode.ROUND_CEIL); + t("4.0697767991474535745859451E+8734161", "8.7341616095705916437228490323670178068211817e+6", 44, RoundingMode.ROUND_CEIL); + t("6.70979951730012416235067887E-4547", "-4.546173290455960817819339e+3", 25, RoundingMode.ROUND_HALF_DOWN); + t("1.961351051236741863413961315199797E+4394416", "4.3944162925e+6", 11, RoundingMode.ROUND_DOWN); + t("1.20350E+4555", "4.55508044609461104879595186822027e+3", 33, RoundingMode.ROUND_DOWN); + t("5.343396356119981189485859467758323594750088722349E+24892595", "2e+7", 1, RoundingMode.ROUND_HALF_DOWN); + t("2.7775691E+2645806266", "2.64580626644366e+9", 15, RoundingMode.ROUND_HALF_DOWN); + t("1.764240941317483253710000989961978299234E+5939", "5.93924655789618074686663713956005233457194e+3", 42, RoundingMode.ROUND_HALF_UP); + t("8.68143916033713750663285740502710E+89575", "8.95759385917261e+4", 15, RoundingMode.ROUND_HALF_DOWN); + t("2.0184251149898158170597E-39207177567322", "-3.9207177567321694987359e+13", 23, RoundingMode.ROUND_UP); + t("7.8630374961E+539873632527965", "5.39873632527965895590346671032e+14", 30, RoundingMode.ROUND_UP); + t("1.770739036205380713465840899E+522651", "5.226512481545614797481e+5", 22, RoundingMode.ROUND_HALF_DOWN); + t("56.141270516453102320117316389420550463886324330", "1.74928223679933121812e+0", 21, RoundingMode.ROUND_DOWN); + t("2.6E+5789", "5.78941497334797081796442024405e+3", 30, RoundingMode.ROUND_HALF_EVEN); + t("8.407507657913886653E-27559", "-2.755807533272843934770788577111161e+4", 34, RoundingMode.ROUND_CEIL); + t("4.1537022577487997501227235564273504628803975515504335733E+8622517869456", "8.622517869456618435362577e+12", 25, RoundingMode.ROUND_HALF_UP); + t("3.726614237233359549085256054317096792396039592E+7200803438362342", "7.20080343836234257131444e+15", 24, RoundingMode.ROUND_HALF_EVEN); + t("3.07938388321764455968132812427213516E+38172329267940", "3.817232926794048846383244686011975e+13", 34, RoundingMode.ROUND_HALF_DOWN); + t("8.6068240435353592489E+94696427410", "9.469642741e+10", 10, RoundingMode.ROUND_HALF_DOWN); + t("9.37151210825471283E-865158860842", "-8.65158860841028190329358923938336e+11", 33, RoundingMode.ROUND_DOWN); + t("34073473340739909295181032371.558228583698065018839103", "2.853241641e+1", 10, RoundingMode.ROUND_UP); + t("2.28321371080052769522193640E+397673232597", "3.976732325973585465637362e+11", 26, RoundingMode.ROUND_HALF_EVEN); + t("5.53931220752051773202347E+2499", "2.499743455843605290956496e+3", 25, RoundingMode.ROUND_FLOOR); + t("5.4924555890498123253396556014992712521439747540053861140793E+504", "5.047397665539842493968484323e+2", 28, RoundingMode.ROUND_HALF_UP); + t("4.914452734123226135400656595986723583025E-1514546", "-1.514545308524837502946553307e+6", 28, RoundingMode.ROUND_HALF_UP); + t("4.215555113580235490775E+55076305", "5.507630562485e+7", 13, RoundingMode.ROUND_HALF_UP); + t("1.3930997480622E-57275499306", "-5.7e+10", 2, RoundingMode.ROUND_HALF_EVEN); + t("85038.039893969528357085115812100515349", "4.929613241248970252641e+0", 22, RoundingMode.ROUND_HALF_DOWN); + t("7.047729155038798766423401020155837037817938179206464104E+488246", "4.8824684804920574277260014554145031e+5", 35, RoundingMode.ROUND_FLOOR); + t("3.88173E+2768", "2.7685890253240487e+3", 17, RoundingMode.ROUND_DOWN); + t("6.33149E+1646322918853513", "1.646322918854e+15", 13, RoundingMode.ROUND_HALF_DOWN); + t("6.43213140539E+60", "6.080835490826104516024510232434e+1", 31, RoundingMode.ROUND_HALF_EVEN); + t("5.050356774201666667327888987E+215326920301064", "2.1532692e+14", 8, RoundingMode.ROUND_HALF_EVEN); + t("2739258.451754141451285499174145021701678302438665131045", "6.4376330103e+0", 12, RoundingMode.ROUND_HALF_DOWN); + t("1.7192003502495036108123878166266976088E+7685", "7.685235326490961406452549530538800289e+3", 37, RoundingMode.ROUND_HALF_EVEN); + t("9.6E+85774181", "8.57741819822712e+7", 15, RoundingMode.ROUND_HALF_DOWN); + t("1.87124860546679312974E+3052798657448", "3.052798658e+12", 10, RoundingMode.ROUND_UP); + t("3.083315086E-33", "-3.251098209216645436858e+1", 22, RoundingMode.ROUND_HALF_UP); + t("7.2156825787920272800526474440273278298991942831883189391E+61531910219648", "6.153191021964885827742013e+13", 25, RoundingMode.ROUND_DOWN); + t("8.468E-3306315551035784", "-3.306315551e+15", 10, RoundingMode.ROUND_CEIL); + t("4.69070189E+72479", "7.24796712378329382129172143247016859e+4", 36, RoundingMode.ROUND_DOWN); + t("3.35742E+835737", "8.35737526005673173223374107868535147886e+5", 39, RoundingMode.ROUND_HALF_DOWN); + t("3.45402661747687024737712705E+1600722944676", "1.60072294467653832568001163266841e+12", 34, RoundingMode.ROUND_DOWN); + t("4.7922316977869430764493052417197764722676671E+2312846442", "2.3128464426805378074275316244e+9", 29, RoundingMode.ROUND_HALF_EVEN); + t("9.851193152845829667E+66954099", "6.69541e+7", 9, RoundingMode.ROUND_UP); + t("1.1854901245488693749594005242978061319893665204E+36534622", "3.6e+7", 2, RoundingMode.ROUND_DOWN); + t("2.36333459535347419E+18828941140", "1.882894114037352521237663e+10", 25, RoundingMode.ROUND_UP); + t("3.85857292671500073837429E+902683316", "9.026833165864267128e+8", 19, RoundingMode.ROUND_HALF_EVEN); + t("9.6016490111491709821226489279E+51808023", "5.1808e+7", 6, RoundingMode.ROUND_HALF_UP); + t("5.17351178517133458351944997054985443108308070481852782E+72447629057", "7.2447629057713785442739598355e+10", 29, RoundingMode.ROUND_HALF_UP); + t("1.110105859069230266011E-30284901880", "-3.0284902e+10", 8, RoundingMode.ROUND_HALF_DOWN); + t("9.048827409E+7267517760358", "7.267517760358956592304863221501460291e+12", 39, RoundingMode.ROUND_DOWN); + t("1.088912795176892276835248776534961914045425466464600675903E+31952", "3.1952036994e+4", 11, RoundingMode.ROUND_CEIL); + t("970.687987526534321426239801143994613178912", "2.9870796551693774977726248e+0", 26, RoundingMode.ROUND_UP); + t("1.96809E+340418195", "3.4041819529404495466933301447841666e+8", 35, RoundingMode.ROUND_UP); + t("6.86872871627264284462705542579681663626E-9", "-8.1631e+0", 5, RoundingMode.ROUND_CEIL); + t("9.67348055315179509539189364657869462004005689059E-35611", "-3.561001441723707953133e+4", 22, RoundingMode.ROUND_HALF_DOWN); + t("1.8744707925587479720553595210808247818401843056803276529372E+810679", "8.1067927e+5", 8, RoundingMode.ROUND_DOWN); + t("8.942329972495772937474882956276E-40155184557896", "-4.015518455789504854931e+13", 22, RoundingMode.ROUND_HALF_DOWN); + t("5.012575871519977416116054585544633184998370041087525008E+73424", "7.34247e+4", 6, RoundingMode.ROUND_HALF_DOWN); + t("7.683518340090388031524844343382673720835893274744999E+2054546124012473", "2.05454612401247388556013e+15", 24, RoundingMode.ROUND_HALF_DOWN); + t("3.815810146227322026775444113884081509750E+36773121563", "3.67731215635815867584594686290771255e+10", 36, RoundingMode.ROUND_HALF_DOWN); + t("7.4861378005232013255069E+1485805", "1.485806e+6", 7, RoundingMode.ROUND_UP); + t("9.07761360146935072886298392797676264735146941104416705855E+5852", "5.85295797169258163209871826529944651947e+3", 39, RoundingMode.ROUND_HALF_UP); + t("3.4888777700553647252456603687651697829004766607593E+790861779850044", "7.9086177985004454268575e+14", 23, RoundingMode.ROUND_HALF_UP); + t("7.6776640508986078666E-160824", "-1.6e+5", 3, RoundingMode.ROUND_DOWN); + t("6.0310855923559920575167841704099767E+220096231795", "2.20096231796e+11", 12, RoundingMode.ROUND_UP); + t("5.354591927609993818150377979653E+206804676737", "2.06804676737728726e+11", 18, RoundingMode.ROUND_DOWN); + t("6.635487235E+6294451574004", "6.29445157400482187e+12", 18, RoundingMode.ROUND_FLOOR); + t("8.8584E-7247204157652366", "-7.2472041576523650526447131e+15", 27, RoundingMode.ROUND_FLOOR); + t("3.565918492306569022483822438092572617805207953592E+730255", "7.302555521714121e+5", 16, RoundingMode.ROUND_HALF_UP); + t("354539328516823449672.983298997050733493", "2.054966441782787142944577776331757526e+1", 37, RoundingMode.ROUND_HALF_UP); + t("5.1031831539356080897895506E-82341", "-8.2340292158844500189385823717987586e+4", 35, RoundingMode.ROUND_UP); + t("9.3648851529395696724E+3631", "3.63197150245573683604e+3", 21, RoundingMode.ROUND_HALF_EVEN); + t("9.353521E+1822", "1.822970975e+3", 10, RoundingMode.ROUND_HALF_DOWN); + t("7.93249517949211819801840221693753800779017848E-53570", "-5.356910059018314442492287309e+4", 28, RoundingMode.ROUND_FLOOR); + t("51.59851352524098568099996391240738929", "1.712637190443409949195148634e+0", 28, RoundingMode.ROUND_HALF_DOWN); + t("8.69810649237836206E+4576415322", "4.57641532293942472050213e+9", 24, RoundingMode.ROUND_DOWN); + t("5.743720268213722512570210325542067E+58", "5.8759193280654602219732387e+1", 26, RoundingMode.ROUND_FLOOR); + t("8.619379022453270498382221769546056490709529450344410959315E+47788560", "4.77885609354759784887019304047e+7", 30, RoundingMode.ROUND_HALF_DOWN); + t("6.544820735E+43543", "4.35438158977555672160892806801649648482e+4", 39, RoundingMode.ROUND_HALF_EVEN); + t("9.7140458707335387296463547584212801920234541874110852E+56136", "5.613699e+4", 7, RoundingMode.ROUND_UP); + t("670.08557647535", "2.8261302698e+0", 11, RoundingMode.ROUND_DOWN); + t("8.3343821492312863357729036128803472E+20716943608421", "2.0716943609e+13", 11, RoundingMode.ROUND_CEIL); + t("8.0445178773508301187593293762052E-5077691", "-5.077690094499978846538805108623135e+6", 34, RoundingMode.ROUND_FLOOR); + t("22.767730836345951349056967", "1.3573198e+0", 8, RoundingMode.ROUND_CEIL); + t("7.457764361860907275E+83607531272", "8.360753127287260865712126e+10", 25, RoundingMode.ROUND_HALF_EVEN); + t("3.415842397810612774258963557343915245829E-783248777", "-7.8324877646650217526059645247e+8", 29, RoundingMode.ROUND_HALF_DOWN); + t("6.781552710927048827039026094701379639485822363E-63935527", "-6.39355261686708582592412650368413182e+7", 36, RoundingMode.ROUND_HALF_DOWN); + t("6.18215839966859296918377E-95603", "-9.560220885987160841432001e+4", 25, RoundingMode.ROUND_DOWN); + t("9.4568E-890882", "-8.90881024255795675e+5", 18, RoundingMode.ROUND_HALF_DOWN); + t("5.1258099656456511679058622861734211977997669237E-5298117838", "-5.298e+9", 4, RoundingMode.ROUND_DOWN); + t("6.29591891528059956655696230115941216487334752792035E-1099146", "-1.0991452009408738626139726375999e+6", 32, RoundingMode.ROUND_FLOOR); + t("8.0754743E-772876752955", "-7.7287675295409283196066e+11", 23, RoundingMode.ROUND_UP); + t("1.469473602473045923603275116E-3456356954867", "-3.4563569548668328382111587476011e+12", 34, RoundingMode.ROUND_HALF_EVEN); + t("5.275444573067300813303017433E+1246343974825", "1.246343974826e+12", 13, RoundingMode.ROUND_UP); + t("9.357019981170384806302965944044067572833526212960677676185E+919738937", "9.197389e+8", 7, RoundingMode.ROUND_HALF_EVEN); + t("3.9438932490723162010961026802042639423318395E+81451", "8.1451595925151206732965697738591566e+4", 35, RoundingMode.ROUND_HALF_EVEN); + t("8.6846426025687648324E+5885", "5.886e+3", 5, RoundingMode.ROUND_UP); + t("5.9725023280777779427848795005502784720E+15955137", "1.59551377761563277e+7", 18, RoundingMode.ROUND_HALF_EVEN); + t("4.9108147887698410693495984791291047177096873731080442999E+256", "2.566911535550373155e+2", 19, RoundingMode.ROUND_HALF_UP); + t("7.7891782748328973413016239994909833278529860E+5147735", "5.14773589149164386906993465073054e+6", 33, RoundingMode.ROUND_HALF_EVEN); + t("1.3446738004511849218508667329449356E-104", "-1.0387e+2", 5, RoundingMode.ROUND_HALF_EVEN); + t("9.4585604116535644814652908019807413769068321E+8657106925648", "8.6571069e+12", 8, RoundingMode.ROUND_FLOOR); + t("473796.95276", "5.675592263217112e+0", 17, RoundingMode.ROUND_CEIL); + t("6.7975863449656604442210773071454621832E+911843", "9e+5", 1, RoundingMode.ROUND_HALF_EVEN); + t("3.246E-892605", "-8.92604488651484509786930611884958125035e+5", 39, RoundingMode.ROUND_UP); + t("7.95794039837E+53", "5.3900800682139352423105080345e+1", 29, RoundingMode.ROUND_HALF_EVEN); + t("5.678427235419145307694573911035564508172906E+947452164", "9.474521647542280650134995059521995e+8", 34, RoundingMode.ROUND_DOWN); + t("8.0029879722391808789882801725596316284E+390572713525", "3.905727135259032e+11", 16, RoundingMode.ROUND_FLOOR); + t("5.9907384197073313096317126931E+438", "4.388e+2", 4, RoundingMode.ROUND_UP); + t("9.780224646978402584108429856691E-991154968270", "-9.9115496826900965116956591580413645e+11", 35, RoundingMode.ROUND_UP); + t("4.0789430894606339087011E-68068516", "-6.806851538945235403706815e+7", 25, RoundingMode.ROUND_HALF_UP); + t("6.27212568421917649954621498988165460E+964956854808", "9.64956854808797414752389e+11", 24, RoundingMode.ROUND_FLOOR); + t("8.1285688633483981E+10047259786", "1.004725978691001408932568816558895806e+10", 37, RoundingMode.ROUND_HALF_EVEN); + t("3.1728152468829356912309147407245214539710141133899042E+1655257278", "1.655257278502e+9", 13, RoundingMode.ROUND_UP); + t("9.176094625036158762929748341685687808135628065919022704611E+754162756635", "7.54162756635962657883415352047953e+11", 34, RoundingMode.ROUND_HALF_EVEN); + t("1.7913862265763242730616208060249388655022492727773301E-239576700616", "-2.3958e+11", 5, RoundingMode.ROUND_HALF_DOWN); + t("8.75596177370E+15252741413", "1.525274141394230385688088809408546e+10", 34, RoundingMode.ROUND_HALF_DOWN); + t("7.484860784482E+8186", "8.18687418372e+3", 12, RoundingMode.ROUND_DOWN); + t("7.4550422084407536881639416021211E+31334619524362", "3.2e+13", 2, RoundingMode.ROUND_UP); + t("338.0180791974408458407648664273", "2.52893992952530145949164e+0", 24, RoundingMode.ROUND_DOWN); + t("111.522870347581464280157552128257477754581", "2.047363938659902688627435e+0", 25, RoundingMode.ROUND_HALF_DOWN); + t("8.7234E+6747953961417", "6.747e+12", 4, RoundingMode.ROUND_FLOOR); + t("5.078468711341770084967E+877358148263834", "8.7735814826383470573278108977878e+14", 32, RoundingMode.ROUND_CEIL); + t("2.341942200530809328432361125802E+11440534189151", "1.144053418915136957617241854576e+13", 31, RoundingMode.ROUND_UP); + t("3.39486879133784644485267648691675642751667E+179533", "1.79533530823e+5", 12, RoundingMode.ROUND_HALF_UP); + t("8.92409276216985731888299548546727483294336E-906957612", "-9.0695761104943592405728109779e+8", 29, RoundingMode.ROUND_CEIL); + t("6.1439191715203256047657562390017034647E+7017", "7.01778845e+3", 9, RoundingMode.ROUND_HALF_EVEN); + t("0.0607565815281965620", "-1.21640666972047895359738631018593e+0", 33, RoundingMode.ROUND_DOWN); + t("1.26909860997369767419453053919499402281899674939E+90874", "9.08741034953684332361358740036169927e+4", 36, RoundingMode.ROUND_HALF_UP); + t("8.0331252127E+293887", "2.9388790488453638465032e+5", 23, RoundingMode.ROUND_HALF_EVEN); + t("2.30551730283257381646749362695831153232E+690979756252091", "6.9097975e+14", 8, RoundingMode.ROUND_DOWN); + t("4.834354800443539089821414753900904180773116496518816E+406287936", "4.062879367e+8", 10, RoundingMode.ROUND_CEIL); + t("9.78143205772408908E+8880", "8.8809904e+3", 9, RoundingMode.ROUND_FLOOR); + t("7.20267097210042335643600516492543902753411809195260386415528E-843", "-8.421425064239384218021880814198309397e+2", 37, RoundingMode.ROUND_HALF_EVEN); + t("5E+8794086216615750", "8.794086216615750698970005e+15", 25, RoundingMode.ROUND_UP); + t("2.2230867570633275409316194970723911385E+42569127", "4.25691e+7", 6, RoundingMode.ROUND_HALF_DOWN); + t("4.05179770267110143930997262E+6702495011458367", "6.702495e+15", 8, RoundingMode.ROUND_HALF_EVEN); + t("8.8769455861184153541120093E+14381620996623", "1.438162099662394826355775109194182e+13", 34, RoundingMode.ROUND_DOWN); + t("5.55E+67416654", "6.741665474429298312268e+7", 22, RoundingMode.ROUND_UP); + t("9.936193379889E+9340", "9.340997220035227980491424693376424e+3", 34, RoundingMode.ROUND_HALF_UP); + t("1.6293380311554057252084909989087523183E-629443289410211", "-6.294432894102107879888052949467041124e+14", 37, RoundingMode.ROUND_DOWN); + t("6.535720212535925818263E-6016865", "-6.016864184706547778054995494541617498e+6", 37, RoundingMode.ROUND_HALF_DOWN); + t("8.26030664595E+27993", "2.8e+4", 2, RoundingMode.ROUND_HALF_UP); + t("8.58844737E-64797968909", "-6.47979689081e+10", 12, RoundingMode.ROUND_HALF_EVEN); + t("2.89074766828843309E+80683", "8.068346e+4", 7, RoundingMode.ROUND_HALF_UP); + t("5.914787661096986461920174515416305183764410E-229133", "-2.2913222806084178315871148029698774e+5", 35, RoundingMode.ROUND_HALF_UP); + t("6.611970244E-8755011013", "-8.756e+9", 4, RoundingMode.ROUND_FLOOR); + t("4.7499572E+9079499490292", "9.07949949029267668969638538e+12", 27, RoundingMode.ROUND_HALF_DOWN); + t("6E+89592077", "8.959207778e+7", 10, RoundingMode.ROUND_HALF_EVEN); + t("2.8939846181700349595255006347368997997E+245588275", "2.455882754615e+8", 13, RoundingMode.ROUND_CEIL); + t("9.72535836507884579605194672928453281902058875E+961918318165", "9.619183181659879056134e+11", 22, RoundingMode.ROUND_DOWN); + t("1.802571230724667168480756934002949337067746121E+42330194", "4.2330194255892435388381046734221557465e+7", 38, RoundingMode.ROUND_CEIL); + t("1.291996644845554714675888790E+329589440762", "3.295894408e+11", 10, RoundingMode.ROUND_HALF_UP); + t("1.057909734340004695619340250E+391253093", "3.91253094e+8", 9, RoundingMode.ROUND_CEIL); + t("8.9822369527734239294875384027479645330225153967804276E-700117169572369", "-7.001171695723680466155e+14", 22, RoundingMode.ROUND_UP); + t("7.45867503089770208658991644494696036321625401664926340E+3178562323202", "3.1785623233e+12", 11, RoundingMode.ROUND_UP); + t("9.347942753E+9361211", "9.3612119707160440997000626e+6", 26, RoundingMode.ROUND_CEIL); + t("1.21145320194702852291842307817094E+1899683", "1.89968308330664213946e+6", 21, RoundingMode.ROUND_HALF_UP); + t("4.46661546613826630813244418390131151141E-623", "-6.22350021434616288e+2", 18, RoundingMode.ROUND_HALF_DOWN); + t("1.4E+9", "9.14612803567823802592596e+0", 24, RoundingMode.ROUND_CEIL); + t("4.5E+97105311", "9.71e+7", 3, RoundingMode.ROUND_FLOOR); + t("4.201530151746487591796293480191397700881554324272425E+723480211317860", "7.23480211317860623407484e+14", 24, RoundingMode.ROUND_FLOOR); + t("1.762216E-864", "-8.63753940859908806915202533635e+2", 30, RoundingMode.ROUND_CEIL); + t("8.642227400751456E+6087945602262", "6.0879456022629366256e+12", 20, RoundingMode.ROUND_DOWN); + t("6.523314129677137548107192190002930715248594495481671162E+598", "5.988144682924425501602464837799e+2", 31, RoundingMode.ROUND_HALF_EVEN); + t("2.2403991884402140E+24395579910347", "2.44e+13", 3, RoundingMode.ROUND_HALF_EVEN); + t("1.6557366956033476E+70057240", "7.0057240218991274031917e+7", 23, RoundingMode.ROUND_HALF_EVEN); + t("9.9343328233987582609641213169601E+15633099572", "1.56330995729971387057e+10", 21, RoundingMode.ROUND_DOWN); + t("7.68263067382226322729272701061395977949395460570024940310836E+10175", "1.0175885509955903658e+4", 20, RoundingMode.ROUND_CEIL); + t("8.21658797619717429167944100449766461100777451E+167541", "1.6754191469150966433790137774168e+5", 32, RoundingMode.ROUND_HALF_UP); + t("8.274172700943149949248680999419886629978E+55223547", "5.5223547917724581375045860432e+7", 29, RoundingMode.ROUND_FLOOR); + t("4.459590759E+2120225", "2.12022565e+6", 9, RoundingMode.ROUND_HALF_DOWN); + t("2119293200287310544361006449292.097790087086884621200104", "3.03261910447042660599268663431444993e+1", 36, RoundingMode.ROUND_HALF_EVEN); + t("9.648537852327574E+137078236442", "1.37078236442984461504973030348183e+11", 33, RoundingMode.ROUND_FLOOR); + t("5.7903459194922814675456E-9701270005", "-9.701270004237295490428153e+9", 25, RoundingMode.ROUND_HALF_UP); + t("7.342558758386103195254009211254457570228171605E-4943687121", "-4.9436871201341525694e+9", 20, RoundingMode.ROUND_UP); + t("2.282545429409039868294662520556324477527757977536E+6695763172262261", "6.69576317226226135841943003780236539e+15", 36, RoundingMode.ROUND_HALF_UP); + t("8.4985445E+5296565596620", "5.2965655966209293445529e+12", 23, RoundingMode.ROUND_CEIL); + t("6.66867820057434922039563598610448084365023382055459E+7882014", "7.88201482403976089e+6", 18, RoundingMode.ROUND_HALF_UP); + t("7.6622494809303404482041186857493199308751059E-70020501626429", "-7e+13", 2, RoundingMode.ROUND_HALF_DOWN); + t("7.98673156225E-75063484", "-7.506348309763091216108166285e+7", 28, RoundingMode.ROUND_UP); + t("5.232969470376787870655528179123539518571846237E+95896", "9.589671875e+4", 10, RoundingMode.ROUND_HALF_DOWN); + t("1.239584E+881548295", "8.81548295093275961924e+8", 21, RoundingMode.ROUND_CEIL); + t("1.8882461259780200932716727517429440850023951693614993E-29676693042490", "-3e+13", 2, RoundingMode.ROUND_FLOOR); + t("3.5413691828218E-9", "-8.4508287962848912e+0", 17, RoundingMode.ROUND_HALF_EVEN); + t("9.58573533146370355175749633935031597475E+32021008", "3.2021008981625433661436e+7", 23, RoundingMode.ROUND_HALF_EVEN); + t("792761.93385093612011907717194655264284481632519605064178", "5.89914278840534e+0", 15, RoundingMode.ROUND_UP); + t("6.3955989097974232284047639485531180916376215E-57323114414217", "-5.7323114414216194118780185915422e+13", 32, RoundingMode.ROUND_FLOOR); + t("6.9019088922329566961649111017E-632349784", "-6.323e+8", 4, RoundingMode.ROUND_HALF_UP); + t("4.62685910E-480838608091", "-4.80838608090334713725705251106331291e+11", 37, RoundingMode.ROUND_HALF_EVEN); + t("8.311855917119072957E+7154", "7e+3", 1, RoundingMode.ROUND_HALF_EVEN); + t("4.8159504049967133953919395504883957993255351483817314E+405363840", "4.0536384068268200587701e+8", 23, RoundingMode.ROUND_FLOOR); + t("6.9580783101209078140E-48581", "-4.85801575106877669287286809338773712e+4", 36, RoundingMode.ROUND_HALF_EVEN); + t("9744128587282332519285270430948194876663392379.213638707444", "4.598874300644e+1", 13, RoundingMode.ROUND_HALF_EVEN); + t("2.766501232677186977E+737011644", "7.37011644441930868059942073866556713753e+8", 39, RoundingMode.ROUND_DOWN); + t("2.6900544536085441652753777658456769593839030E-446077922855484", "-4.4607792286e+14", 11, RoundingMode.ROUND_FLOOR); + t("9.0732956736279418804179350529593096E+5862634", "5.86263495776506356e+6", 18, RoundingMode.ROUND_DOWN); + t("2.80882768445289586E+559928111119", "5.59928111119448525096985e+11", 24, RoundingMode.ROUND_UP); + t("7.3788369345555762835103181872689688744053494426218E+6730765357554464", "6.730765357554464867987912946224e+15", 31, RoundingMode.ROUND_HALF_EVEN); + t("2.959460383657043931925109388039896307947059E+217118802", "2.171188024712125307332e+8", 22, RoundingMode.ROUND_HALF_DOWN); + t("3.956189822575E+31473", "3.147359727712138e+4", 16, RoundingMode.ROUND_HALF_EVEN); + t("5.66115558664E+656037", "6.5603775290509084832386e+5", 24, RoundingMode.ROUND_DOWN); + t("2.22832507208902004302625237287424619121911957244944985098E+965119341084500", "9.651193410845003e+14", 16, RoundingMode.ROUND_HALF_EVEN); + t("4.924937211894443794211731987696726309241E+961", "9.6169240069804e+2", 14, RoundingMode.ROUND_DOWN); + t("6.74532192538022727744623280343816817441519585193095942574196E+274000599011", "2.74000599011829002681522e+11", 24, RoundingMode.ROUND_CEIL); + t("7.209E+208438", "2.0843885787502552356253390365498272e+5", 35, RoundingMode.ROUND_DOWN); + t("3.66697296539827857449270491425623117403827284683586725756528E-2693946", "-2.6939454356922918e+6", 17, RoundingMode.ROUND_DOWN); + t("9.66672E+117", "1.1798527913928017009e+2", 20, RoundingMode.ROUND_UP); + t("6.35397593596472700403828628827329751167708023099200772E+42960", "4.296080304557e+4", 13, RoundingMode.ROUND_HALF_EVEN); + t("6.9268983421699860434226567468545468532202E-50369901213127", "-5.0369901213126159461e+13", 20, RoundingMode.ROUND_DOWN); + t("2.7752758404982212331606452073789068022122859E+572216430298383", "5.7221643029838344330615504524e+14", 29, RoundingMode.ROUND_FLOOR); + t("5.9258659730795671523367757357164829426084718E-5779", "-5.8e+3", 2, RoundingMode.ROUND_HALF_DOWN); + t("8.651770318575700584685873853475430890180871856E+1831200086", "1.83120008693710498156002691964e+9", 30, RoundingMode.ROUND_HALF_EVEN); + t("7.811677E+59875", "6e+4", 2, RoundingMode.ROUND_HALF_UP); + t("8.069294827273051E+60413580", "6.0413580906835583544206068198867779449e+7", 38, RoundingMode.ROUND_DOWN); + t("96665.84467385029724052359044402479905118965902303", "4.9852730501952027669068e+0", 23, RoundingMode.ROUND_HALF_UP); + t("5.6731273082624732574896505617039E-747376", "-7.4737524617747050624329252258e+5", 29, RoundingMode.ROUND_HALF_EVEN); + t("3.74224118190321841992531573E+30710", "3.07105731317737022950403907165374789e+4", 36, RoundingMode.ROUND_DOWN); + t("1.880930049536958430407325630040606122564969559449375102711E+6994552", "6.9e+6", 2, RoundingMode.ROUND_DOWN); + t("2.6006760504974637046746E-584358746865379", "-5.843587468653785849e+14", 19, RoundingMode.ROUND_CEIL); + t("4.58411E+47", "4.8e+1", 2, RoundingMode.ROUND_HALF_UP); + t("4.8472940870263640617671667416887043990955652178E+722180", "7.221806854993693201e+5", 19, RoundingMode.ROUND_HALF_DOWN); + t("4.41132498237110029E+49926409", "4.992640964456905343733638300111372e+7", 34, RoundingMode.ROUND_HALF_UP); + t("5.955180538536509606243984685694900793228258492011E+249149478", "2.5e+8", 2, RoundingMode.ROUND_HALF_DOWN); + t("2.55444785662336E-338393366512546", "-3.3839336651254559270295804802e+14", 30, RoundingMode.ROUND_DOWN); + t("6.451901656123260006240045354922178833320449E+109909171528", "1.0990917152880968773898219e+11", 29, RoundingMode.ROUND_FLOOR); + t("1.710514210188E-797", "-8e+2", 1, RoundingMode.ROUND_FLOOR); + t("8.1009E-1730350", "-1.73e+6", 3, RoundingMode.ROUND_HALF_UP); + t("6.4931410787499275369834890711938163837E+89747838", "8.97478388124548390435534618704031653e+7", 36, RoundingMode.ROUND_CEIL); + t("6.3496571795452363841138351936963590345581E-6935067975204336", "-6.935068e+15", 8, RoundingMode.ROUND_HALF_UP); + t("1.913624275E+7985454456610", "7.99e+12", 3, RoundingMode.ROUND_HALF_DOWN); + t("4.7516451294602805754081622774048795977503526E+296", "2.966768439984562e+2", 16, RoundingMode.ROUND_DOWN); + t("7.2727487252E+78582919900076", "7.9e+13", 2, RoundingMode.ROUND_HALF_DOWN); + t("9.9865454795458494E+1089656", "1.089656999415284159183e+6", 23, RoundingMode.ROUND_HALF_UP); + t("4.2018E-11544", "-1.1543377e+4", 8, RoundingMode.ROUND_UP); + t("5973677.8938888646013555597779580024611356600086806925613", "6.776242e+0", 7, RoundingMode.ROUND_HALF_DOWN); + t("1.785067221240412565271613355740530371935437309566266992884E+9012", "9.012251654575218e+3", 16, RoundingMode.ROUND_HALF_DOWN); + t("6.77262870644E+6524865", "6.525e+6", 4, RoundingMode.ROUND_HALF_DOWN); + t("5.401E+511754", "5.117547324742e+5", 13, RoundingMode.ROUND_HALF_DOWN); + t("4.350575000774444710047916754464678E+6459269855", "6.45927e+9", 6, RoundingMode.ROUND_UP); + t("2.32195277540589382014822154598157053567762490148686198057E+608316438358", "6.08316438358365853383e+11", 21, RoundingMode.ROUND_UP); + t("3.572760520633713318131179974412938E+6806", "6.81e+3", 3, RoundingMode.ROUND_HALF_UP); + t("8.610880702359934210E-170943074757322", "-1.7094307475732106495242757e+14", 26, RoundingMode.ROUND_UP); + t("8.1124646679657343581775011534919850721271601470915952884E+2753677807", "2.7537e+9", 5, RoundingMode.ROUND_UP); + t("7.657060557417E+7004", "7.00488406208181354696172876236543438249e+3", 39, RoundingMode.ROUND_DOWN); + t("1.094879339057202065200575548271891233128089058656211E+5216487789997", "5e+12", 1, RoundingMode.ROUND_DOWN); + t("7.01458738335172723967235286302265082E-92570843", "-9.25708421539978702e+7", 18, RoundingMode.ROUND_DOWN); + t("2.25E+533", "5e+2", 1, RoundingMode.ROUND_DOWN); + t("4.628672919927535486155536E+4800249379", "4.8002493796654564929259595102215430412e+9", 38, RoundingMode.ROUND_HALF_DOWN); + t("1.9732236825240345467809524550476270818E+9940971", "9.94097e+6", 6, RoundingMode.ROUND_HALF_UP); + t("0.000855603314909656837", "-3.06772754148692485696222290491457355e+0", 36, RoundingMode.ROUND_FLOOR); + t("8.4439743851E+7039", "7.0399265469072e+3", 15, RoundingMode.ROUND_CEIL); + t("1.965407355492395E+2641", "2.641293452577056282791097210449374e+3", 35, RoundingMode.ROUND_FLOOR); + t("8.77139E+43903", "4.3903943068421358703475e+4", 23, RoundingMode.ROUND_HALF_UP); + t("5.6313680606869681980405411323367891136242806344419E+673496449331", "6.73496449331750613913329559541527910906e+11", 39, RoundingMode.ROUND_UP); + t("3.70306748317210360217571459282646861523E+114549656", "2e+8", 1, RoundingMode.ROUND_CEIL); + t("7.9114974323311922708214149955178938396453680456512556208E+337714", "3.37714898258691468596e+5", 21, RoundingMode.ROUND_UP); + t("4.5241008127108799713242E+92522989", "9.252298e+7", 7, RoundingMode.ROUND_DOWN); + t("6.8084805182416E+4122762480376", "4.122762480376833050199111848192603042e+12", 37, RoundingMode.ROUND_DOWN); + t("7.3147485894705860825228409814E+6295", "6.2958641994038609222771252895147509e+3", 35, RoundingMode.ROUND_HALF_EVEN); + t("6.46562047642498844954E+863581336896", "8.6358133689681061020849827277507e+11", 32, RoundingMode.ROUND_DOWN); + t("6.9164633640051450512951E+55676", "5.5676839884080855434e+4", 20, RoundingMode.ROUND_HALF_DOWN); + t("6.0917452602066E+92256", "9.22567847417340599791691820043e+4", 30, RoundingMode.ROUND_CEIL); + t("0.001510148291305447959465032592", "-2.82098040440647561863609e+0", 25, RoundingMode.ROUND_CEIL); + t("6.431896480622181048622277E-61873878791340", "-6.187387879133919166e+13", 19, RoundingMode.ROUND_CEIL); + t("6.6912701039557846323852298837E+6543285327637841", "6.5432853276378418255085612e+15", 26, RoundingMode.ROUND_FLOOR); + t("4.630341805517258573405153915987E+84165036", "8.4165036665613051227654781093827e+7", 32, RoundingMode.ROUND_HALF_DOWN); + t("6.6767502E-769588258", "-7.695882571754348719005572207e+8", 28, RoundingMode.ROUND_HALF_DOWN); + t("5.3660664E+9937317733853", "1e+13", 1, RoundingMode.ROUND_HALF_UP); + t("7.1104058881899289022794101576230407E+2931553762", "2.93155376286e+9", 12, RoundingMode.ROUND_CEIL); + t("9.0851565025843092256354899724035225E-574", "-5.7304e+2", 5, RoundingMode.ROUND_DOWN); + t("8.3224026230079773841863189513325893044219334182578E+9379449140735", "9.37944914073592024e+12", 18, RoundingMode.ROUND_DOWN); + t("7.3148E+964538455935", "9.64e+11", 3, RoundingMode.ROUND_FLOOR); + t("0.088925797553215699187518", "-1.050972231046232305698200949769295607e+0", 37, RoundingMode.ROUND_HALF_UP); + t("3.344526235079323928990625352E+118763", "1.18763524334606987858365877234611e+5", 33, RoundingMode.ROUND_FLOOR); + t("5.25123229692563277522479E+17940635681", "1.79406356817202612304450305496852e+10", 33, RoundingMode.ROUND_UP); + t("3.760845196952513780E+979276087629549", "9.7927608763e+14", 12, RoundingMode.ROUND_HALF_UP); + t("3.558E+527", "5.2755120594375e+2", 14, RoundingMode.ROUND_HALF_UP); + t("9.6965442455388605748343160757809944360E-86", "-8.5013384e+1", 8, RoundingMode.ROUND_FLOOR); + t("4.105569485528819786620782603033703933E+88797225395276", "8.879722539527661337340683150145e+13", 31, RoundingMode.ROUND_HALF_UP); + t("1.91555944621E+813", "8.132822956341370931533119992804509e+2", 35, RoundingMode.ROUND_HALF_EVEN); + t("9.68951676654401806E+253127258067", "3e+11", 1, RoundingMode.ROUND_HALF_UP); + t("8E+5", "5.903e+0", 4, RoundingMode.ROUND_HALF_UP); + t("1836.634244419306349744257939937833631670519823", "3.26402267e+0", 9, RoundingMode.ROUND_DOWN); + t("4397784391509474398016375655554633061123389089.8634817139642", "4.564323393355751008e+1", 19, RoundingMode.ROUND_HALF_DOWN); + t("9.58322571E+731476802160807", "7.31476802160807981511717e+14", 25, RoundingMode.ROUND_HALF_UP); + t("7.01201371678194158217581603456218E+6878052429", "6.87805243e+9", 10, RoundingMode.ROUND_HALF_UP); + t("3.041163573728602511700770124120098256116370007710598988E+411", "4.1148e+2", 5, RoundingMode.ROUND_DOWN); + t("1.967922198E+61733161", "6.1733161294007924559145088394728e+7", 32, RoundingMode.ROUND_HALF_EVEN); + t("425.6382600813202", "2.62904065921972255e+0", 18, RoundingMode.ROUND_DOWN); + t("8.0822478421743991E+68533", "6.853390753216395349522e+4", 22, RoundingMode.ROUND_HALF_DOWN); + t("2.1228162931375958562519008684361087507E+8090388", "8.09038832691241228719325e+6", 24, RoundingMode.ROUND_HALF_EVEN); + t("203110.992750698269353255", "5.30773342887884e+0", 15, RoundingMode.ROUND_CEIL); + t("7.48005636875895E+2937", "2.9378e+3", 5, RoundingMode.ROUND_FLOOR); + t("4.16308890258537660817667952193346640552129139713E+86307216", "8.63072166194156853e+7", 18, RoundingMode.ROUND_HALF_EVEN); + t("1.837949274E+6774278101554978", "6.7742782e+15", 8, RoundingMode.ROUND_UP); + t("8.79134871951167023906325966695773979628115E+2294220087861", "2.294220087861944056e+12", 19, RoundingMode.ROUND_HALF_EVEN); + t("8.48392244778725902939519101308465866886622E+87", "8.792859668994212084008e+1", 22, RoundingMode.ROUND_FLOOR); + t("3.277969751826558179529913334137335285368628126773876030E+870", "8.7051560494170689524582890328993518e+2", 35, RoundingMode.ROUND_HALF_UP); + t("9270.9466671234823512338", "3.967e+0", 4, RoundingMode.ROUND_FLOOR); + t("2.05000850836E+7932", "7.93231175566355e+3", 15, RoundingMode.ROUND_DOWN); + t("2.8771E+457370240210", "4.573702e+11", 7, RoundingMode.ROUND_FLOOR); + t("1.0401380741318923836486E+963745538", "9.6374553801709099396546639851e+8", 29, RoundingMode.ROUND_FLOOR); + t("7.565084298622151223299800630215724758148082623284064089163E-7708241360680", "-7.7082413606791211862e+12", 20, RoundingMode.ROUND_HALF_EVEN); + t("2.202424317826404394525541194184509298850156534E+6682", "6.68234290099362661e+3", 18, RoundingMode.ROUND_HALF_EVEN); + t("2.301525704833612235599549077113939656987426316438237947E+352351588647043", "3.52351588647043362015829721e+14", 27, RoundingMode.ROUND_HALF_EVEN); + t("2.3E+69", "6.936172783601759287886777711225e+1", 31, RoundingMode.ROUND_HALF_UP); + t("0.0023724981953987595", "-2.624794109239e+0", 13, RoundingMode.ROUND_HALF_UP); + t("1.636856E+832", "8.32214010474673898960782798539167823293e+2", 39, RoundingMode.ROUND_UP); + t("6.023E-92998", "-9.29972e+4", 6, RoundingMode.ROUND_HALF_UP); + t("5.750066890974305701482238212778089E-213689", "-2.13688240327103e+5", 15, RoundingMode.ROUND_HALF_EVEN); + t("6E+620838161", "6.2083816177815126e+8", 17, RoundingMode.ROUND_CEIL); + t("4.1964793930094E+1235150489006", "1.2351504890066228850948328e+12", 26, RoundingMode.ROUND_HALF_DOWN); + t("5.65102392645855754045555512257227119E+747964", "7.5e+5", 2, RoundingMode.ROUND_UP); + t("3.747046938286996368687346559251063750074E+55104332582", "5.5e+10", 2, RoundingMode.ROUND_HALF_UP); + t("7.316024918931619975E+28", "2.886427517605e+1", 13, RoundingMode.ROUND_CEIL); + t("7.188182778879818939E-84858665754", "-8.48586658e+10", 9, RoundingMode.ROUND_HALF_EVEN); + t("6.46323461493736556247481975257051362291072091E+357481253", "3.58e+8", 3, RoundingMode.ROUND_UP); + t("7.2362803608381682631379135460041040392E+285046289079184", "2.8504628907918485951538472263279356188e+14", 38, RoundingMode.ROUND_HALF_DOWN); + t("8.82583049866E+5498885147", "5.4988851479457555825035e+9", 23, RoundingMode.ROUND_HALF_EVEN); + t("8.262733965223247826311588406300E+398526734255312", "3.9852673425532e+14", 14, RoundingMode.ROUND_UP); + t("7.9724498208761428598305797621108619E+9680", "9.680901591794446e+3", 16, RoundingMode.ROUND_HALF_DOWN); + t("5.358807684948694056397783740398961810436E+135", "1.3572906817151193724055824197500226e+2", 35, RoundingMode.ROUND_HALF_DOWN); + t("7.50452481987293059567804821632785100731441200223007722872E+2647", "2.647875323198293e+3", 16, RoundingMode.ROUND_HALF_DOWN); + t("1.861461E+9765741622802", "9.76574162280226985394162224667547e+12", 33, RoundingMode.ROUND_CEIL); + t("5.3024E+18854", "1.88547244724867392427181951867e+4", 31, RoundingMode.ROUND_CEIL); + t("3.83567154703630127817968E+800", "8.00583841410955099993108474050708348e+2", 36, RoundingMode.ROUND_HALF_DOWN); + t("6.058225248967488175416955447960471E+45", "4.578234541666356245010242759860926972e+1", 37, RoundingMode.ROUND_HALF_DOWN); + t("5.583839582E+116575", "1.1657574693293295805902330044e+5", 29, RoundingMode.ROUND_HALF_UP); + t("5.45305449487944883848104927757569550811171661855161528497E+95598", "9.55987366398378128398982292162333013618e+4", 39, RoundingMode.ROUND_DOWN); + t("7.2E-1565", "-1.5641426675035687315397687275093163e+3", 35, RoundingMode.ROUND_FLOOR); + t("5.688412098470009264410177753102487670040610414E+588291", "5.8829175499105143628966275381434335459e+5", 38, RoundingMode.ROUND_FLOOR); + t("4.98687953451750846362292968828642954842916767E-8976294073461431", "-8.97629407346143030217112268322195e+15", 33, RoundingMode.ROUND_FLOOR); + t("6.4059724761943175459267148700508435280570604843E+9068767037", "9.07e+9", 3, RoundingMode.ROUND_CEIL); + t("1.2558188143253810752E+5309", "5.3090989269852492340203207e+3", 26, RoundingMode.ROUND_UP); + t("2.9500993033018210931127104257014011E+6087", "6.0874e+3", 5, RoundingMode.ROUND_FLOOR); + t("6.3695895298144359051982808553323123578E+67347444222", "6.7347444222804111446357e+10", 23, RoundingMode.ROUND_DOWN); + t("1.6970240931142969870064278143954369E+5862362", "5.8623622296880081587565662032e+6", 29, RoundingMode.ROUND_UP); + t("7.269866317942465252993451469798183786315582691680988137666E+6170368171023", "6.17036817102386152642490116878e+12", 30, RoundingMode.ROUND_UP); + t("5.010931460057255056843380556922E+952799", "9.527997e+5", 8, RoundingMode.ROUND_HALF_EVEN); + t("8.133134838508903211104693919333E+981997020692", "9.8199702069291025798e+11", 20, RoundingMode.ROUND_UP); + t("1.70776601623E+84", "8.42325e+1", 6, RoundingMode.ROUND_UP); + t("11.60521553826555618167636122646191312", "1.06465321081607303039810006711404092473e+0", 39, RoundingMode.ROUND_HALF_UP); + t("4.190828079947720296599477701349354520240413371E+88722", "8.87226e+4", 6, RoundingMode.ROUND_FLOOR); + t("2.1159289143262425E+9818509", "9.818509325501073e+6", 16, RoundingMode.ROUND_HALF_DOWN); + t("4.70706E+1342622659861", "1.342622659861672749734211174727e+12", 31, RoundingMode.ROUND_CEIL); + t("4.3897940E-37", "-3.6357e+1", 5, RoundingMode.ROUND_CEIL); + t("3.223190179078E-9459981404844", "-9.45998140484349171406889429071e+12", 30, RoundingMode.ROUND_HALF_DOWN); + t("7.63774540593993554693734475525176E-2338460665997443", "-2.338460665997e+15", 13, RoundingMode.ROUND_HALF_EVEN); + t("7.08395369461253774236501117501869481991E+75775709160114", "7.57e+13", 3, RoundingMode.ROUND_FLOOR); + t("4.764349864880E+2714827071468", "2.714e+12", 4, RoundingMode.ROUND_FLOOR); + t("4.673416448899800598981630284876539E-328423146423", "-3.2842314642233036552e+11", 20, RoundingMode.ROUND_HALF_EVEN); + t("7.826045736338822738638958732226685960362E-1412", "-1.41110645761835949762542371879e+3", 30, RoundingMode.ROUND_UP); + t("5.796700333799240103896E-28859", "-2.885823681e+4", 10, RoundingMode.ROUND_DOWN); + t("8.97096663631613993250462383164860567863227128721354276181812E+176", "1.7695283924150562685124197e+2", 26, RoundingMode.ROUND_UP); + t("7.8585954305551819623439174147023744645039746762452852218E+73629027", "7.362902789534493137419777269992467e+7", 34, RoundingMode.ROUND_HALF_DOWN); + t("3.4382907684711E-42584717", "-4.258471647e+7", 10, RoundingMode.ROUND_FLOOR); + t("1.41699080539874712712879548325887844471678E+3194156", "3.194156151367032196972e+6", 22, RoundingMode.ROUND_UP); + t("7.331289659351565E+1696410", "1.6964108651803788e+6", 17, RoundingMode.ROUND_HALF_EVEN); + t("1.745022889562179361781933066447101432E+535599", "5.355992418011279974051832982044808e+5", 34, RoundingMode.ROUND_HALF_EVEN); + t("4.30739431731149846909077453595545769250098838827929287457735E+6256201941", "6.2562019416342146307581404214050605352e+9", 38, RoundingMode.ROUND_HALF_EVEN); + t("1.588554116485404477492730355848E+3496", "3.4962010020143099479653792462688377e+3", 35, RoundingMode.ROUND_FLOOR); + t("9.900888E-106498", "-1.064970043258522504e+5", 19, RoundingMode.ROUND_DOWN); + t("8.83580012650210959E+73456", "7.345694624589e+4", 13, RoundingMode.ROUND_UP); + t("8.8949043525769342851448782098279774889770917544263726E-82775565", "-8.2775e+7", 5, RoundingMode.ROUND_CEIL); + t("3.6224442E-141", "-1.4045e+2", 5, RoundingMode.ROUND_UP); + t("8.59405672549749313626581182770673689820022E-32033035", "-3.20331e+7", 6, RoundingMode.ROUND_FLOOR); + t("9.51074073247087480768657837136488292943959703869E+275930276482999", "2.7593027648299997821435e+14", 23, RoundingMode.ROUND_CEIL); + t("2.54065063418647762504692974337669E+406474715003143", "4.064747150031434e+14", 17, RoundingMode.ROUND_DOWN); + t("9489953385.25328239339198556294098175754101987164777", "9.977264079173657754167815e+0", 25, RoundingMode.ROUND_UP); + t("4.5232942439068434456152833847455813722535773E-4462", "-4.46e+3", 3, RoundingMode.ROUND_DOWN); + t("7.0802826525E+787135580", "7.87135580850050595538747730277159237612e+8", 39, RoundingMode.ROUND_HALF_UP); + t("5.8216966113439E+223611", "2.2361176504956911165649331380712912243e+5", 38, RoundingMode.ROUND_HALF_UP); + t("3.33244818745948041153812422494096916019823856474870E+517782641176005", "5.1778264117600552276340578e+14", 26, RoundingMode.ROUND_HALF_DOWN); + t("2.05912361945417878137840483E+5552624271309", "5.552624e+12", 7, RoundingMode.ROUND_DOWN); + t("6.84742824413083454475067895412838639947431E-39838897", "-3.9838896164472510127860873720016710505e+7", 38, RoundingMode.ROUND_CEIL); + t("3.95807149459035557997365582562827797684887001622411167547181E+1549", "1.54959748363e+3", 12, RoundingMode.ROUND_HALF_DOWN); + t("2.0195949695778122120385695521227579706871529732687E-55200", "-5.5199694735719719133330807334889920748e+4", 38, RoundingMode.ROUND_HALF_UP); + t("7.8171596648329304689657474893269001820416900818139E+131702572699", "1.31702572699893048982476210061446323262e+11", 39, RoundingMode.ROUND_CEIL); + t("5.0668399219162114869148E+3655", "3.655704737183720975024589242605e+3", 31, RoundingMode.ROUND_UP); + t("4.75555399593131396464117509556003E+610", "6.10677201117143314e+2", 19, RoundingMode.ROUND_HALF_UP); + t("4.478467972936253610790510078714E+1024", "1.024651129472772477335e+3", 23, RoundingMode.ROUND_FLOOR); + t("1.4408051213207621033E+529220956779", "5.292209567791586053e+11", 19, RoundingMode.ROUND_UP); + t("7.10903333703321992919455115881016884828773E+216193", "2.161938518105508e+5", 16, RoundingMode.ROUND_HALF_DOWN); + t("3.01777E+59773", "5.97734796861368520217703676e+4", 27, RoundingMode.ROUND_FLOOR); + t("8.207881805736931035390756744751707691802017739454540300E-2164854877141559", "-2.16485487714155e+15", 15, RoundingMode.ROUND_CEIL); + t("9.633610519523911273743199583415128174038760209192103E-124", "-1.23016210915904169742864e+2", 24, RoundingMode.ROUND_HALF_EVEN); + t("4.69414682782169969201733241661926387578671440642216E-7082634132334465", "-7.08263413233446432844333026e+15", 27, RoundingMode.ROUND_DOWN); + t("3.739788296386425205173905702442336339893085E+3772780166993", "3.772780167e+12", 11, RoundingMode.ROUND_HALF_UP); + t("2.55408368428247917203004684693105826775753E+390699550133", "3.90699550133407235122773402e+11", 27, RoundingMode.ROUND_HALF_EVEN); + t("7.251474452851442402672495958892746452E+49940264985545", "4.9940264985545860426321279e+13", 26, RoundingMode.ROUND_HALF_DOWN); + t("1.721182063637637944851802912796631080152254327700488E+39830", "3.98302358268116704603889e+4", 24, RoundingMode.ROUND_HALF_DOWN); + t("6.0160E+6432654", "6.432654779e+6", 10, RoundingMode.ROUND_HALF_UP); + t("6.1412E+58567968", "5.856796878825e+7", 13, RoundingMode.ROUND_HALF_UP); + t("4.6942768850847549904995671905357285207275829424268523550395E+813", "8.136716e+2", 7, RoundingMode.ROUND_CEIL); + t("4E-20586837", "-2e+7", 1, RoundingMode.ROUND_HALF_DOWN); + t("9.581407894052410E+716956335992", "7.169563359929814293290882793134e+11", 31, RoundingMode.ROUND_UP); + t("9.02517435211003151096977993840249057659E+49790830466082", "4.97908304660829554556005420051e+13", 30, RoundingMode.ROUND_UP); + t("6.35042592535315544207236947351E+38", "3.8802802854556101872830211083071e+1", 32, RoundingMode.ROUND_HALF_UP); + t("7.3857993596821934361411966047009506536956121E+769171391", "7.692e+8", 4, RoundingMode.ROUND_HALF_EVEN); + t("8.62E-5441684634440", "-5.441684634439064492735e+12", 22, RoundingMode.ROUND_UP); + t("3.38129500769046530005909717304004367640216011150E-19802852", "-1.980285147091693671045805032352e+7", 31, RoundingMode.ROUND_HALF_DOWN); + t("6.529755524524004983762782691926155E+41790", "4.17908148969214990010338098e+4", 28, RoundingMode.ROUND_HALF_EVEN); + t("6.2356159650232275E+435456077183", "4.35456077183794879360300148491e+11", 30, RoundingMode.ROUND_UP); + t("1.06610584819233041984469468751207423544105865915E-54045758", "-5.404575797219967e+7", 16, RoundingMode.ROUND_HALF_EVEN); + t("4.0645298587882401075248650399370490791E+1661984", "1.66198460901031830839250688097659180396e+6", 39, RoundingMode.ROUND_DOWN); + t("5.293607557105180254720699965156017448949177246642E+70986909", "7.098690972375174163076659557650674483e+7", 37, RoundingMode.ROUND_CEIL); + t("3.3597230648953198398658762540008674386627018103381E+556809183042954", "5.5680918e+14", 8, RoundingMode.ROUND_HALF_UP); + t("4.5827E-3063727", "-3.06372634e+6", 9, RoundingMode.ROUND_HALF_DOWN); + t("6.827387820647755116E+91567807", "9.15678078342545730704445336689514619209e+7", 39, RoundingMode.ROUND_FLOOR); + t("2.107416729706044661767557E-507964854044716", "-5.08e+14", 3, RoundingMode.ROUND_FLOOR); + t("5.50927251577102E+865656592439", "8.656565e+11", 7, RoundingMode.ROUND_FLOOR); + t("3.98021181734497757342512733248537061996368597496710547724438E+36994589", "3.699458959990618480139602631124e+7", 31, RoundingMode.ROUND_HALF_DOWN); + t("5.301444115538624029E-123333622739", "-1.23333622738275605812289583781e+11", 30, RoundingMode.ROUND_UP); + t("7.76903608002529822525212598E-5393243350993", "-5.3932433509922e+12", 14, RoundingMode.ROUND_UP); + t("8.99577590795471215209062998374857929772E+27728726", "2.7728726954e+7", 11, RoundingMode.ROUND_HALF_DOWN); + t("9.2800343E+116", "1.16967549581420715521021089418e+2", 30, RoundingMode.ROUND_FLOOR); + t("3.977785722122324570544976154849E+2026608816324425", "2.0266088163244255997e+15", 20, RoundingMode.ROUND_CEIL); + t("5.076612022561327891899414337745979097225486208822555E+1487002218", "1.4870022187055739739424853775232485e+9", 36, RoundingMode.ROUND_HALF_EVEN); + t("6.0380E+10771969", "1.0771969780893108687079e+7", 24, RoundingMode.ROUND_UP); + t("4.136300926E+4521437761", "4.5214377616166121272201e+9", 23, RoundingMode.ROUND_HALF_DOWN); + t("9.22197478861493479118165328708963109905458469027359887185E+9801078721222", "9.8010787212229648239e+12", 20, RoundingMode.ROUND_DOWN); + t("9.4956474346866285754042480762819121552440915291460650971217E+71762533504", "7.176253350497752458126112751125707e+10", 34, RoundingMode.ROUND_DOWN); + t("1.2644471156926304326001813E+84", "8.41019006701033912892e+1", 21, RoundingMode.ROUND_FLOOR); + t("9.506977552139186104379591692476780E-76004", "-7.600302195753154429093352099592805779e+4", 37, RoundingMode.ROUND_DOWN); + t("2.957532705030717197E+99157", "9.915747092955584801104179643091e+4", 31, RoundingMode.ROUND_HALF_EVEN); + t("7.09E-856335", "-8e+5", 1, RoundingMode.ROUND_DOWN); + t("3.07871052E-960121094972360", "-9.60121094972359511631144314377046968e+14", 36, RoundingMode.ROUND_CEIL); + t("6.8E+958593705", "9.58593705832508912706236318968e+8", 30, RoundingMode.ROUND_HALF_DOWN); + t("5.6609E-810185", "-8.1018e+5", 5, RoundingMode.ROUND_HALF_EVEN); + t("3.6558695839138249990426146888447712E-845885711328867", "-8.45885711328866437009e+14", 21, RoundingMode.ROUND_HALF_DOWN); + t("4.3751179237797712870357135036405450959980035923344E+88017014", "8.8017014641e+7", 11, RoundingMode.ROUND_UP); + t("3.126326E+7", "7.5e+0", 3, RoundingMode.ROUND_CEIL); + t("5.5446354250391559981621639541476945764347487E+99", "9.9743872995372639427954942e+1", 27, RoundingMode.ROUND_HALF_DOWN); + t("6.83359216868393351813673053376398E-768516737", "-7.685167362e+8", 10, RoundingMode.ROUND_FLOOR); + t("3.5756036122224666277275933636622914974272944179692E-33164602799132", "-3.3164602799131446650632651919e+13", 29, RoundingMode.ROUND_HALF_UP); + t("6.3647380108303890323974286224992387800147568486084145918E+92960", "9.29608037805316672236175396822532819958e+4", 39, RoundingMode.ROUND_HALF_UP); + t("3.655327513874682496408952E+241392", "2.41392562926295410475695688e+5", 27, RoundingMode.ROUND_FLOOR); + t("3.50605948150100548853692707939376333427406113641347093729713E+82773535153", "8.277353515354481927977504146210064151e+10", 37, RoundingMode.ROUND_UP); + t("7.310307960686719E+1014647837216539", "1.014647837216539863935672827860541609e+15", 38, RoundingMode.ROUND_DOWN); + t("8.9958342461392085028378371339449567463900820E+9042", "9.04296e+3", 6, RoundingMode.ROUND_UP); + t("7.9074217927308678583E-8055", "-8.05410196509472092e+3", 18, RoundingMode.ROUND_DOWN); + t("4.71498107545049919E+3918717021260325", "3.91871702126032567347995394e+15", 27, RoundingMode.ROUND_DOWN); + t("3.95444611001117195409E+86", "8.65970857e+1", 9, RoundingMode.ROUND_HALF_DOWN); + t("3.18843306841991860797879308596248315871925802644766577402711E+45977468583", "4.597746858350357730471013599925e+10", 31, RoundingMode.ROUND_FLOOR); + t("6.22570422125935111934774E+4254868031441062", "4.2548680314410627942e+15", 20, RoundingMode.ROUND_HALF_DOWN); + t("16.03204924004841325542492869198973017652", "1.204989e+0", 8, RoundingMode.ROUND_FLOOR); + t("1.3654185685412343953580259247722E-531996253", "-5.31996253e+8", 9, RoundingMode.ROUND_HALF_EVEN); + t("4.71252353423253553966540276306417102E+953823831", "9.53e+8", 3, RoundingMode.ROUND_FLOOR); + t("1.278141210944641028302392491356322105E+23751988941935", "2.375198e+13", 7, RoundingMode.ROUND_DOWN); + t("2.953816209213038450561378564E+63693096648", "6.369309664847e+10", 13, RoundingMode.ROUND_FLOOR); + t("9.83165012596577211760566749445836512198588929716039287E+84414627", "8.4414628e+7", 9, RoundingMode.ROUND_CEIL); + t("4.68956719459375555E+6671031", "6.67103167113276304063696287334162702e+6", 36, RoundingMode.ROUND_CEIL); + t("8.5619E+46140632620", "4.61406326209325701511e+10", 21, RoundingMode.ROUND_HALF_EVEN); + t("6.7286418039128390E+53588775321541", "5.358878e+13", 7, RoundingMode.ROUND_HALF_UP); + t("9.21845775502E+309965433290", "3.0996543329096465826980535055070799804e+11", 38, RoundingMode.ROUND_HALF_EVEN); + t("1.3869745783736495958786116744238903364E+825322", "8.25e+5", 3, RoundingMode.ROUND_FLOOR); + t("1.825E-2472008736902690", "-2.47200873690268973873713120751e+15", 30, RoundingMode.ROUND_HALF_UP); + t("5.9219317E+3999610292171", "3.999610292171772463394190706e+12", 28, RoundingMode.ROUND_HALF_EVEN); + t("5.72750456430116440072740529290526066460700960580E+57751419", "5.775141975796544395484753985352e+7", 31, RoundingMode.ROUND_HALF_UP); + t("2.68091712962E-815", "-8.1457171661037557e+2", 17, RoundingMode.ROUND_HALF_DOWN); + t("1.38094E+2063", "2e+3", 1, RoundingMode.ROUND_HALF_UP); + t("8.5209845773496385982442318897466408E+48727127237", "4.9e+10", 2, RoundingMode.ROUND_HALF_DOWN); + t("2.302011E+6115146295", "6.1151462953621073945448099e+9", 26, RoundingMode.ROUND_FLOOR); + t("2.89175443197729017916360237450799650414E-3096072526420", "-3.096072526419538839e+12", 19, RoundingMode.ROUND_UP); + t("9202.20225997385641312038794860942786773", "3.96389177461e+0", 12, RoundingMode.ROUND_FLOOR); + t("0.000007310305777806927856977926355044917154612541", "-5.136064456853788246578869978739617164e+0", 37, RoundingMode.ROUND_DOWN); + t("3.92871079665090398794493191930758E-213143923295", "-2.13143923294e+11", 12, RoundingMode.ROUND_DOWN); + t("4.938356900829494427605602164551241E+430201502312221", "4.30201502312222e+14", 15, RoundingMode.ROUND_HALF_UP); + t("6.491874137133116252625941441690426276235236284508843505192E-97563443", "-9.756344219e+7", 10, RoundingMode.ROUND_UP); + t("6.15092047610497936007038744E+8208499133204", "8.2084991332047889401e+12", 20, RoundingMode.ROUND_HALF_UP); + t("286.92707068747734494438523412969996882", "2.46e+0", 3, RoundingMode.ROUND_CEIL); + t("7.60950578077754732903891601421880E-83599", "-8.35981186435487026309413e+4", 24, RoundingMode.ROUND_FLOOR); + t("6.977587013708000E+6917", "6.917843705261045671e+3", 19, RoundingMode.ROUND_HALF_UP); + t("9.63689981460249470383307333E-98768150428115", "-9.87681504281140160626559e+13", 24, RoundingMode.ROUND_CEIL); + t("1.738318789984661940353053893061128387825642031515449517E+5964494192", "5.9644941922401e+9", 14, RoundingMode.ROUND_HALF_UP); + t("8.38787701253582907E+463", "4.6392365205398588e+2", 17, RoundingMode.ROUND_DOWN); + t("9.802636321113883267418E+484162298747106", "4.8416229874710699134e+14", 20, RoundingMode.ROUND_DOWN); + t("4.492325834E+59858434", "5.985843465247124865269261063433e+7", 31, RoundingMode.ROUND_HALF_UP); + t("9.336327683727813389043806701E+25573134966275", "2.55731349662759701e+13", 18, RoundingMode.ROUND_FLOOR); + t("5.7690E+6930821612762", "6.930821612762761100538958142296e+12", 31, RoundingMode.ROUND_DOWN); + t("7.234860786329978712579251553140673876E+4617", "4.61785943017881229510597105156e+3", 30, RoundingMode.ROUND_HALF_DOWN); + t("2.31892719704128397385272539633537327546738574387107382E-343156242878", "-3.4315624287763471289e+11", 20, RoundingMode.ROUND_FLOOR); + t("2223999943.89810311445890834443656215387", "9.3471347719546491108598298398282171e+0", 35, RoundingMode.ROUND_FLOOR); + t("3.7327171497158E-7", "-6.427974917915026222e+0", 19, RoundingMode.ROUND_HALF_DOWN); + t("2.793677314157573549808840E+532", "5.3244617624115755788973705e+2", 26, RoundingMode.ROUND_HALF_EVEN); + t("7.640898943682386533902335E+536009329594188", "5.36e+14", 4, RoundingMode.ROUND_HALF_UP); + t("8.9074250430447141026785391328342688479479051E+21963922635578", "2.1963922635578949e+13", 17, RoundingMode.ROUND_FLOOR); + t("5.5762216618089304820E-6976208", "-6.976207253659970816237e+6", 22, RoundingMode.ROUND_HALF_DOWN); + t("1.91357401642E+49961236827", "4.99612368272818452652545816872375e+10", 33, RoundingMode.ROUND_CEIL); + t("5.957297990106291252829815394260394318083353E-26245957645478", "-2.6245957645477e+13", 14, RoundingMode.ROUND_DOWN); + t("8.01844860599820804155768000879876725329864650214532E+436946856", "4.36946856904090349951357241211271e+8", 33, RoundingMode.ROUND_CEIL); + t("5.5574947893333547365232067522673911E+7059", "7.05974487906417987536846332910957964e+3", 36, RoundingMode.ROUND_HALF_DOWN); + t("9.552816484569040E+6270", "6.2709801314347641e+3", 17, RoundingMode.ROUND_UP); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalLog2Tests.cs b/DecimalSharp.Tests/BigDecimalLog2Tests.cs new file mode 100644 index 0000000..257a115 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalLog2Tests.cs @@ -0,0 +1,199 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; +using System.Globalization; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalLog2")] + public class BigDecimalLog2Tests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Log2() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, string expected, long sd, RoundingMode rm) => + { + var bigDecimalFactoryClone = bigDecimalFactory.Clone(); + bigDecimalFactoryClone.Config.Precision = sd; + bigDecimalFactoryClone.Config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, bigDecimalFactoryClone.Log2(n).ValueOf()); + }; + + t("NaN", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("-1e-234", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("0", "-Infinity", 40, RoundingMode.ROUND_HALF_UP); + t("-0", "-Infinity", 40, RoundingMode.ROUND_HALF_UP); + t("1", "0", 40, RoundingMode.ROUND_HALF_UP); + t("Infinity", "Infinity", 40, RoundingMode.ROUND_HALF_UP); + + // Test powers of 2 + for (var i = 0; i < 54; i++) + { + t(Math.Pow(2, i).ToString(CultureInfo.InvariantCulture), i.ToString(CultureInfo.InvariantCulture), 40, RoundingMode.ROUND_HALF_UP); + } + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("7.47572e73", "2.4e+2", 2, RoundingMode.ROUND_FLOOR); + t("2.4e1", "4.5849626e+0", 8, RoundingMode.ROUND_UP); + t("4.443333e5", "1.9e+1", 2, RoundingMode.ROUND_CEIL); + t("5e-2", "-4.321928094e+0", 10, RoundingMode.ROUND_CEIL); + t("3.89999999999999996202830641978029954e-2", "-4.68038206e+0", 9, RoundingMode.ROUND_CEIL); + t("4.087056706550000000000000000000000000459999999999994e-839", "-2.7850666e+3", 8, RoundingMode.ROUND_HALF_DOWN); + t("7.103772438222211905867777771222222222222222288888888806e-81", "-2.66e+2", 3, RoundingMode.ROUND_HALF_EVEN); + t("2e-1", "-2.321928095e+0", 10, RoundingMode.ROUND_HALF_DOWN); + t("7.0327e30", "1.02e+2", 3, RoundingMode.ROUND_FLOOR); + t("7.74113385511898770142564798256591111493439379377358402241596885033503e2", "9.5965e+0", 5, RoundingMode.ROUND_UP); + t("5.0168236102e-7", "-2.092672e+1", 7, RoundingMode.ROUND_DOWN); + t("3.88888888888888888888888888888888888888888888888888888888888885105520953776999999999999999959888e626", "2.09e+3", 3, RoundingMode.ROUND_UP); + t("3.33333341e-109", "-3.603532e+2", 8, RoundingMode.ROUND_FLOOR); + t("9e7", "2.64234e+1", 6, RoundingMode.ROUND_HALF_DOWN); + t("9.9e-7", "-1.9946e+1", 5, RoundingMode.ROUND_DOWN); + t("2.9998837933e43", "1.4443e+2", 5, RoundingMode.ROUND_HALF_EVEN); + t("2.280014556961415390190701451555357370581333198813706555078628347239292735244389509334786213e3", "1.1155e+1", 5, RoundingMode.ROUND_HALF_UP); + t("9.5e-90", "-2.957e+2", 4, RoundingMode.ROUND_HALF_EVEN); + t("2e893", "2.9674818e+3", 8, RoundingMode.ROUND_HALF_EVEN); + t("8e-27", "-9e+1", 1, RoundingMode.ROUND_HALF_DOWN); + t("1.37e910", "3.0234e+3", 5, RoundingMode.ROUND_HALF_UP); + t("8.12836e-7", "-2e+1", 2, RoundingMode.ROUND_HALF_UP); + t("1.74e-601", "-2e+3", 2, RoundingMode.ROUND_FLOOR); + t("2e-66", "-2.1824e+2", 5, RoundingMode.ROUND_CEIL); + t("4.647228466399999999999999999999999999999999999999999999999999999998943563999999999999999999999999999999919327168257748860613941487999999999999999999999e-80", "-2.6353787e+2", 8, RoundingMode.ROUND_CEIL); + t("6.414199e737", "2.5e+3", 2, RoundingMode.ROUND_HALF_EVEN); + t("9.17e305", "1.01e+3", 3, RoundingMode.ROUND_DOWN); + t("2.239999999999999999999999933510665347417652e-99", "-3.27707382e+2", 9, RoundingMode.ROUND_CEIL); + t("1.3897263212335753192678233873729694699999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999e-233", "-7.74e+2", 3, RoundingMode.ROUND_FLOOR); + t("1e29", "9.63e+1", 3, RoundingMode.ROUND_FLOOR); + t("1e-4", "-1.329e+1", 4, RoundingMode.ROUND_HALF_UP); + t("3.2e-67", "-2.208912e+2", 7, RoundingMode.ROUND_FLOOR); + t("8e94", "3.1526124e+2", 9, RoundingMode.ROUND_DOWN); + t("7.106731e51", "1.722475e+2", 7, RoundingMode.ROUND_HALF_UP); + t("6.8249734444444444444444444444444444348116222222222222222222222222222222274858072062638524585118791096784e-3", "-7.195e+0", 4, RoundingMode.ROUND_HALF_DOWN); + t("7.9313e-38", "-1.2e+2", 2, RoundingMode.ROUND_CEIL); + t("9.463228512135835081894413860589e-58", "-1.8943e+2", 6, RoundingMode.ROUND_FLOOR); + t("9.9e-71", "-2.4e+2", 2, RoundingMode.ROUND_FLOOR); + t("3e-96", "-4e+2", 1, RoundingMode.ROUND_FLOOR); + t("6.99448765077869176308972395456786641951135010547854119007664428296218e94", "3.1e+2", 2, RoundingMode.ROUND_DOWN); + t("6e-473", "-1.568687e+3", 7, RoundingMode.ROUND_CEIL); + t("8e-36", "-1.165e+2", 4, RoundingMode.ROUND_DOWN); + t("3.2289084e203", "6.760424e+2", 7, RoundingMode.ROUND_DOWN); + t("7.22e8", "2.94274236e+1", 9, RoundingMode.ROUND_UP); + t("2.255555555555555830850499999e-684", "-2.2710253e+3", 8, RoundingMode.ROUND_CEIL); + t("6.1558656863559636e853", "2.836e+3", 4, RoundingMode.ROUND_FLOOR); + t("6.47999624483501572920131e2", "1e+1", 1, RoundingMode.ROUND_CEIL); + t("8e2", "9.64385619e+0", 10, RoundingMode.ROUND_HALF_UP); + t("3.7087506033220685595355297226e77", "3e+2", 1, RoundingMode.ROUND_HALF_DOWN); + t("2.999e-2", "-5.059375e+0", 7, RoundingMode.ROUND_HALF_EVEN); + t("7.622e972", "3e+3", 1, RoundingMode.ROUND_HALF_UP); + t("9e897", "2e+3", 1, RoundingMode.ROUND_DOWN); + t("1.11782576e-27", "-8.9531363e+1", 8, RoundingMode.ROUND_DOWN); + t("4.2e579", "1.9254668e+3", 8, RoundingMode.ROUND_HALF_EVEN); + t("4.29366e-6", "-1.78293607e+1", 9, RoundingMode.ROUND_FLOOR); + t("2.5e11", "3.786314e+1", 7, RoundingMode.ROUND_UP); + t("2.2e6", "2.10690721e+1", 10, RoundingMode.ROUND_UP); + t("4.4284847498990825381935141920011840774884214901069306287301873764242619177749447748037035404379e-85", "-2.802e+2", 4, RoundingMode.ROUND_HALF_DOWN); + t("1e3", "9.96578e+0", 6, RoundingMode.ROUND_DOWN); + t("6.6e-7", "-2.0532e+1", 5, RoundingMode.ROUND_UP); + t("8.690141627234254718597780859040018785362077868070223409444967282935124914698055875807134592002580083956972525898044027571687514089085870800669920198834746935239137077743100824925289e7", "2.63728764e+1", 9, RoundingMode.ROUND_HALF_EVEN); + t("8.713956786790365525728798671055089827452503531619162658e-1", "-1.9860013e-1", 8, RoundingMode.ROUND_DOWN); + t("5.252777777777777777777777777820165941111111162978472887747802033488044444444444444444444444444444e1", "5.71501e+0", 6, RoundingMode.ROUND_HALF_DOWN); + t("9.69573459777908e-362", "-1.1992e+3", 5, RoundingMode.ROUND_CEIL); + t("7.5569e-740", "-2.45531e+3", 6, RoundingMode.ROUND_HALF_DOWN); + t("9.74035e-490", "-1.6e+3", 2, RoundingMode.ROUND_DOWN); + t("8e-9", "-2.68973529e+1", 9, RoundingMode.ROUND_UP); + t("1e344", "1.14e+3", 3, RoundingMode.ROUND_DOWN); + t("3.3e-557", "-1.848591483e+3", 10, RoundingMode.ROUND_FLOOR); + t("2.73e60", "2.0076459e+2", 8, RoundingMode.ROUND_HALF_DOWN); + t("7.6e1", "6.2e+0", 2, RoundingMode.ROUND_FLOOR); + t("7.0060379466068591e-849", "-2.817508354e+3", 10, RoundingMode.ROUND_FLOOR); + t("7e917", "3.049e+3", 5, RoundingMode.ROUND_HALF_DOWN); + t("1.64573410691885658042240459216310152314034696136140858593166940573494665902734186270099e26", "8.708886174e+1", 10, RoundingMode.ROUND_CEIL); + t("7.796e-44", "-1.4321e+2", 5, RoundingMode.ROUND_UP); + t("5e7", "2.55754247e+1", 9, RoundingMode.ROUND_DOWN); + t("8.0569e-32", "-1.033e+2", 4, RoundingMode.ROUND_UP); + t("2.28881e-557", "-1.8491e+3", 5, RoundingMode.ROUND_CEIL); + t("7.09e-724", "-2.4022502e+3", 8, RoundingMode.ROUND_HALF_EVEN); + t("1.59e3", "1.063481105e+1", 10, RoundingMode.ROUND_HALF_UP); + t("1.8e-537", "-1.783e+3", 5, RoundingMode.ROUND_HALF_UP); + t("5.02569e-2", "-4.3145345e+0", 9, RoundingMode.ROUND_DOWN); + t("9.999979e-51", "-1.66096e+2", 6, RoundingMode.ROUND_HALF_DOWN); + t("9.95e10", "3.65e+1", 3, RoundingMode.ROUND_HALF_DOWN); + t("3.1e652", "2.168e+3", 4, RoundingMode.ROUND_HALF_DOWN); + t("7e-182", "-6.017835583e+2", 10, RoundingMode.ROUND_CEIL); + t("5.99999309522985100000000000000000099e5", "1.919460131e+1", 10, RoundingMode.ROUND_HALF_UP); + t("9.9e460", "1.53139436e+3", 9, RoundingMode.ROUND_CEIL); + t("1.1447008929998e5", "1.6805e+1", 5, RoundingMode.ROUND_HALF_UP); + t("9.097e-19", "-5.9e+1", 2, RoundingMode.ROUND_CEIL); + t("6.5e52", "1.75e+2", 3, RoundingMode.ROUND_DOWN); + t("9.1022e-66", "-2.16061039e+2", 9, RoundingMode.ROUND_HALF_EVEN); + t("5.5e26", "8.9e+1", 2, RoundingMode.ROUND_CEIL); + t("5.9747169006993667897425525812121903668273701374897278125927633480174019986342932352404691395386370402376825534060778783e-14", "-4.39282e+1", 6, RoundingMode.ROUND_FLOOR); + t("1.94061431409530657832815982480968096203289511358215661231397940293523261488675432814243049614887343783e8", "2.753e+1", 4, RoundingMode.ROUND_FLOOR); + t("9.1129e87", "2.922e+2", 4, RoundingMode.ROUND_UP); + t("8e-6", "-1.6931569e+1", 8, RoundingMode.ROUND_UP); + t("6.958e-344", "-1.14e+3", 3, RoundingMode.ROUND_HALF_EVEN); + t("7.6e5", "1.9535e+1", 5, RoundingMode.ROUND_FLOOR); + t("8.96822222222222222222222222119508e-1", "-1.57106e-1", 6, RoundingMode.ROUND_HALF_UP); + t("7.1e7", "2.6e+1", 2, RoundingMode.ROUND_FLOOR); + t("9e-157", "-5.1837e+2", 5, RoundingMode.ROUND_HALF_DOWN); + t("7.3000000000000004188645678064142e249", "8.30028e+2", 8, RoundingMode.ROUND_UP); + t("3e482", "1.602754e+3", 7, RoundingMode.ROUND_FLOOR); + t("4e-393", "-1.30352e+3", 6, RoundingMode.ROUND_UP); + t("8.0683580222567551105228998180452489561929821735260733495394659472e-8", "-2.35e+1", 3, RoundingMode.ROUND_DOWN); + t("2.5571e4", "1.46422e+1", 6, RoundingMode.ROUND_HALF_DOWN); + t("6e-6", "-1.7e+1", 2, RoundingMode.ROUND_HALF_EVEN); + t("1.863556445038493157629183718741040476555555567232e-19", "-6.221857529e+1", 10, RoundingMode.ROUND_HALF_UP); + t("3.4999322222222222222222222222222222e6", "2.1739e+1", 5, RoundingMode.ROUND_UP); + t("8.29442480297413880904354267107722332538975e7", "2.63057e+1", 6, RoundingMode.ROUND_CEIL); + t("1.6075e519", "1.7247655e+3", 9, RoundingMode.ROUND_HALF_DOWN); + t("5.1e1", "5.67242535e+0", 9, RoundingMode.ROUND_UP); + t("9e64", "2.158e+2", 4, RoundingMode.ROUND_HALF_DOWN); + t("1e-64", "-2.126034e+2", 8, RoundingMode.ROUND_HALF_UP); + t("1.2e9", "3.0160387e+1", 8, RoundingMode.ROUND_HALF_EVEN); + t("7.05241041246611819500000000000000000054212400000000000000000000000000000000000042232977062045088556972000000790972e6", "2.27496851e+1", 9, RoundingMode.ROUND_UP); + t("9.99e6", "2.325205325e+1", 10, RoundingMode.ROUND_CEIL); + t("5.5e8", "2.9034e+1", 5, RoundingMode.ROUND_DOWN); + + t("2.29000000000000000000000000000000941e-6064216", "-2.01448883085178626255335140463713074934932720849229068205713832098265563766344027535592e+7", 87, RoundingMode.ROUND_UP); + t("2.98121814045205686710601835e22573260", "7.4e+7", 2, RoundingMode.ROUND_FLOOR); + t("8.5e-26514", "-8.80745140450022749520253952874708807185261282873713855273316844696e+4", 66, RoundingMode.ROUND_FLOOR); + t("4.27277644444444444445229244718482e59564", "1.9786942021770672585709275516796947196558597384271229335e+5", 56, RoundingMode.ROUND_HALF_DOWN); + t("9.30924698789794524252424189e-7268098", "-2.41440957239301736069970890748362821264083887286824083322114198346358e+7", 69, RoundingMode.ROUND_CEIL); + t("6.82822995960930271945935479943097116891923770438150513664283749e-73845404", "-2.4530911945439596112646746942354967782562830688718370848616148064936766e+8", 71, RoundingMode.ROUND_FLOOR); + t("5.84609801261197461197367777868584502410357518694058115837e53773873", "1.786329420370789890141941994715176283881591558233e+8", 49, RoundingMode.ROUND_UP); + t("8.688278e-5896", "-1.9582968977189900276130445857722403691239834352860488495115901049392035059e+4", 74, RoundingMode.ROUND_FLOOR); + t("7.49799999999999999e773359", "2.6e+6", 2, RoundingMode.ROUND_UP); + t("6.0058011661556442485511374048366250078225418753938770464520434234268903107102453944e10744", "3.56933818082e+4", 12, RoundingMode.ROUND_HALF_DOWN); + t("8.68630429338007830362222222222222222222222222222222222222224311111492169e-9760", "-3.2418899463607355742502233209726140919e+4", 38, RoundingMode.ROUND_DOWN); + t("9.52746022222222222222222222222222215664191409361214604694703455030696517727356425411864400894463350397433931235528e804991", "2.67412547112315240639400188262314420772255929501992193312106238120468244451376588594e+6", 84, RoundingMode.ROUND_DOWN); + t("6.911111111111111111666e1", "6.1108457686882901783628093e+0", 27, RoundingMode.ROUND_DOWN); + t("8.753466841179514488439739259716095758693108071675972857e23", "7.95342006969539499843372117e+1", 27, RoundingMode.ROUND_HALF_EVEN); + t("6.9293897393471771424368590682187732e-4011970", "-1.33274730661169490860155583127171941591541636281413977719351949586860441308997446e+7", 82, RoundingMode.ROUND_HALF_UP); + t("7.248721120952201811052791965700072860844575521374565607742276202674760812016031176300339165917842693831800259732548923e81275591", "2.69991672029200938697950079481902822412413739547133179600205778809e+8", 66, RoundingMode.ROUND_HALF_EVEN); + t("8.839e-750866", "-2.494319717012534627980253814671911210803171821097666700403887940328806381876e+6", 76, RoundingMode.ROUND_HALF_EVEN); + t("2.019694038441111111055555e78", "2.601245281582228388774544331608154321133400916160739209330622912088316832563990039571098875e+2", 91, RoundingMode.ROUND_UP); + t("6.999992707421e-9095", "-3.02101286695814990981946878100430318253824323913669024362543485421644529066733767002654624094e+4", 93, RoundingMode.ROUND_HALF_EVEN); + t("6.573152030373740763721111111111111111111111111111111111111111111111056e-77071", "-2.56021603615710387e+5", 18, RoundingMode.ROUND_DOWN); + t("7.000003608682e589878", "1.959535108111633331253094708685915889078e+6", 40, RoundingMode.ROUND_CEIL); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalLogTests.cs b/DecimalSharp.Tests/BigDecimalLogTests.cs new file mode 100644 index 0000000..8227919 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalLogTests.cs @@ -0,0 +1,290 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalLog")] + public class BigDecimalLogTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Log() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, BigDecimalArgument @base, string expected, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Log(@base).ValueOf()); + }; + + t("0", "10", "-Infinity", 40, RoundingMode.ROUND_HALF_UP); + t("-0", "10", "-Infinity", 40, RoundingMode.ROUND_HALF_UP); + t("1", "10", "0", 40, RoundingMode.ROUND_HALF_UP); + t("-1", "10", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("Infinity", "10", "Infinity", 40, RoundingMode.ROUND_HALF_UP); + t("Infinity", "0", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("-Infinity", "Infinity", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("NaN", "10", "NaN", 40, RoundingMode.ROUND_HALF_UP); + + t("1", "0", "NaN", 40, RoundingMode.ROUND_HALF_UP); // Math.log(1) / Math.log(0) == -0 + t("10", "0", "NaN", 40, RoundingMode.ROUND_HALF_UP); // Math.log(10) / Math.log(0) == -0 + t("10", "-0", "NaN", 40, RoundingMode.ROUND_HALF_UP); // Math.log(10) / Math.log(-0) == -0 + t("10", "1", "NaN", 40, RoundingMode.ROUND_HALF_UP); // Math.log(10) / Math.log(1) == Infinity + t("10", "-1", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("10", "Infinity", "NaN", 40, RoundingMode.ROUND_HALF_UP); // Math.log(10) / Math.log(Infinity) == 0 + t("10", "-Infinity", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("10", "NaN", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("-1", "-1", "NaN", 40, RoundingMode.ROUND_HALF_UP); + t("0", "0", "NaN", 40, RoundingMode.ROUND_HALF_UP); + + t("7625597484987", "59049", "2.7", 2, RoundingMode.ROUND_HALF_DOWN); + t("839756321.64088511", "28", "6.16667503", 9, RoundingMode.ROUND_UP); + t("94143178827", "3486784401", "1.15", 3, RoundingMode.ROUND_UP); + t("243", "9", "3", 1, RoundingMode.ROUND_HALF_UP); + t("512", "16", "2.25", 7, RoundingMode.ROUND_UP); + t("512", "16", "2.25", 7, RoundingMode.ROUND_CEIL); + t("512", "16", "2.2", 2, RoundingMode.ROUND_HALF_DOWN); + t("512", "16", "2.2", 2, RoundingMode.ROUND_HALF_EVEN); + + t("16", "2", "4", 7, RoundingMode.ROUND_UP); + t("16", "2", "4", 7, RoundingMode.ROUND_CEIL); + t("243", "3", "5", 7, RoundingMode.ROUND_DOWN); + t("243", "9", "2.5", 7, RoundingMode.ROUND_DOWN); + t("243", "3", "5", 7, RoundingMode.ROUND_FLOOR); + t("243", "9", "2.5", 7, RoundingMode.ROUND_FLOOR); + t("32", "4", "2.5", 7, RoundingMode.ROUND_UP); + t("32", "4", "2.5", 7, RoundingMode.ROUND_CEIL); + t("4", "2", "2", 1, RoundingMode.ROUND_CEIL); + t("8", "2", "3", 2, RoundingMode.ROUND_UP); + t("16", "2", "4", 2, RoundingMode.ROUND_UP); + t("32", "2", "5", 3, RoundingMode.ROUND_UP); + t("64", "2", "6", 3, RoundingMode.ROUND_UP); + t("64", "2", "6", 2, RoundingMode.ROUND_UP); + t("64", "2", "6", 1, RoundingMode.ROUND_CEIL); + t("128", "2", "7", 1, RoundingMode.ROUND_UP); + t("256", "2", "8", 1, RoundingMode.ROUND_CEIL); + t("1024", "2", "10", 2, RoundingMode.ROUND_UP); + t("1024", "2", "10", 10, RoundingMode.ROUND_UP); + t("16384", "2", "14", 2, RoundingMode.ROUND_UP); + t("16384", "2", "14", 10, RoundingMode.ROUND_UP); + t("243", "3", "5", 7, RoundingMode.ROUND_HALF_UP); + t("243", "9", "2.5", 7, RoundingMode.ROUND_HALF_UP); + t("243", "3", "5", 7, RoundingMode.ROUND_HALF_UP); + t("243", "9", "2.5", 7, RoundingMode.ROUND_HALF_UP); + t("16", "2", "4", 7, RoundingMode.ROUND_HALF_UP); + t("32", "4", "2.5", 7, RoundingMode.ROUND_HALF_UP); + t("16", "2", "4", 7, RoundingMode.ROUND_HALF_UP); + t("32", "4", "2.5", 7, RoundingMode.ROUND_HALF_UP); + + t("1.2589254117", 10, "0.1", 1, RoundingMode.ROUND_CEIL); + t("1.023292992", 10, "0.01", 1, RoundingMode.ROUND_CEIL); + t("1.258925411794167210423954106395800606", 10, "0.1", 1, RoundingMode.ROUND_HALF_UP); + t("1.25892541179416721", 10, "0.1", 1, RoundingMode.ROUND_UP); + t("1.258925411", 10, "0.1", 1, RoundingMode.ROUND_HALF_DOWN); + t("1.258925411794167210423954", 10, "0.1", 1, RoundingMode.ROUND_HALF_UP); + + /* + 6.166675020000903537297764507632802193308677149 + 28^6.16667502 = 839756321.6383567959704282429971526703012698 + 28^6.16667503 = 839756349.6207552863005150010387178739013142 + */ + t("839756321.64088511", "28", "6.16667503", 9, RoundingMode.ROUND_UP); + t("576306512.96177", "985212731.27158", "0.9742", 4, RoundingMode.ROUND_CEIL); + t("97.65625", "6.25", "2.5", 3, RoundingMode.ROUND_UP); + t("223677472.0384754303304727631735", "26", "5.900904252190486450814", 22, RoundingMode.ROUND_HALF_DOWN); + t("2063000845.3020737243910803079", "35", "6.0324410183892767982149330415", 29, RoundingMode.ROUND_UP); + t("302381977.956021650184952836276441035025875682714942", "2623", "2.4805663226398755020289647999", 29, RoundingMode.ROUND_HALF_EVEN); + t("456870693.58", "238920772.66", "1.0336035877093034523", 21, RoundingMode.ROUND_HALF_UP); + t("16", "2", "4", 10, RoundingMode.ROUND_HALF_UP); + t("32", "4", "2.5", 10, RoundingMode.ROUND_DOWN); + t("316.2277660168379331998893544432645719585553021316022642247511089459022980600999502961482777894980004", "10", "2.49999999999999999999", 21, RoundingMode.ROUND_DOWN); + + // Base 10 therefore the following tests pass despite 15 or more zeros or nines as the rounding digits. + + // 4.0000000000000000000173... + t("10000.0000000000000004", 10, "4.01", 3, RoundingMode.ROUND_CEIL); + + // 4.00000000000000000173... + t("10000.00000000000004", 10, "4.01", 3, RoundingMode.ROUND_CEIL); + + // 2.000000000000000000000004342944... + t("100.000000000000000000001", 10, "2.1", 2, RoundingMode.ROUND_UP); + + // 2.00000000000000004342944... + t("100.00000000000001", 10, "2.1", 2, RoundingMode.ROUND_UP); + + // 4.9999999999999999999960913... + t("99999.9999999999999991", 10, "4.999", 4, RoundingMode.ROUND_DOWN); + + // 0.09360000000000000000000000020197... + t("124050.923004222533485495840", 10, "5.093601", 7, RoundingMode.ROUND_CEIL); + + // 0.09999999999999999999999999999972381... + // 10^0.1 = 1.258925411794167210423954106395800606093617409466... + t("1.258925411794167210423954106395", 10, "0.09999", 4, RoundingMode.ROUND_DOWN); + + // 8.959609629999999999999999999999431251938064 + t("911191437.48166728043529900000", 10, "8.959609629999999999999999", 25, RoundingMode.ROUND_FLOOR); + + // 2.4038746000000000000000000000000268051243... + t("253.4396732554691740503010363220", 10, "2.403874600001", 13, RoundingMode.ROUND_CEIL); + + // 3.391702100000000000000000000000000025534271040... + t("2464.348361986885121671329250344224", 10, "3.3917021", 18, RoundingMode.ROUND_DOWN); + t("2464.348361986885121671329250344224", 10, "3.39170210000000001", 18, RoundingMode.ROUND_UP); + + // 4.0000000000000000173... + t("10000.0000000000004", 10, "4.01", 3, RoundingMode.ROUND_CEIL); + + // 4.00000000000000173... + t("10000.00000000004", 10, "4.01", 3, RoundingMode.ROUND_CEIL); + + // 2.0000000000000004342944... + t("100.0000000000001", 10, "2.1", 2, RoundingMode.ROUND_UP); + + // 4.99999999999999999960913... + t("99999.99999999999991", 10, "4.999", 4, RoundingMode.ROUND_DOWN); + + // 4.9999999999999999960913... + t("99999.9999999999991", 10, "4.999", 4, RoundingMode.ROUND_DOWN); + + // 4.99999999999960913... + t("99999.99999991", 10, "4.999", 4, RoundingMode.ROUND_DOWN); + + t("6.626757835589191227753975149737456562020794782", 10, "0.8213011002743699999999999999999999999999999", 43, RoundingMode.ROUND_DOWN); + t("4.20732041199815040736678139715312481859825562145776045079", 10, "0.6240055873352599999999999999999999999999999999999999", 52, RoundingMode.ROUND_FLOOR); + t("64513410281785809574142282220919135969.8537876292904158501590880", 10, "37.80964999999999999999", 22, RoundingMode.ROUND_DOWN); + t("33.51145738694771448172942314968136067036971739113975569076629", 10, "1.5251933153717162999999999999999999999999999999999999999", 56, RoundingMode.ROUND_FLOOR); + t("10232.9299228075413096627", 10, "4.009999999999999", 16, RoundingMode.ROUND_DOWN); + t("1.258925411794167210423954106395", 10, "0.099999999999999999999999999999723814", 35, RoundingMode.ROUND_UP); + t("1.29891281037500", 10, "0.11357", 5, RoundingMode.ROUND_DOWN); + t("16.399137225681149762104868844", 10, "1.21482099999999999999999", 24, RoundingMode.ROUND_FLOOR); + t("0.01", 10, "-2", 17, RoundingMode.ROUND_FLOOR); + t("0.0000000001", 10, "-10", 4, RoundingMode.ROUND_CEIL); + t("0.00001", 10, "-5", 35, RoundingMode.ROUND_FLOOR); + t("0.00000001", 10, "-8", 24, RoundingMode.ROUND_CEIL); + t("0.0000100000000000010000005060000000000800030000000400908", 10, "-4.99", 3, RoundingMode.ROUND_DOWN); + + t("94143178827", "3486784401", "1.15", 3, RoundingMode.ROUND_UP); + t("15625", "3125", "1.2", 2, RoundingMode.ROUND_FLOOR); + t("3", "3486784401", "0.05", 1, RoundingMode.ROUND_HALF_FLOOR); + t("268435456", "1048576", "1.4", 2, RoundingMode.ROUND_FLOOR); + t("25", "9765625", "0.2", 1, RoundingMode.ROUND_HALF_CEIL); + t("524288", "256", "2.375", 4, RoundingMode.ROUND_HALF_FLOOR); + t("177147", "81", "2.75", 3, RoundingMode.ROUND_HALF_DOWN); + t("531441", "59049", "1.2", 2, RoundingMode.ROUND_HALF_FLOOR); + t("387420489", "59049", "1.8", 2, RoundingMode.ROUND_HALF_EVEN); + t("16384", "65536", "0.875", 3, RoundingMode.ROUND_HALF_EVEN); + t("31381059609", "59049", "2.2", 2, RoundingMode.ROUND_HALF_DOWN); + t("8589934592", "65536", "2.0625", 5, RoundingMode.ROUND_FLOOR); + t("33554432", "256", "3.125", 4, RoundingMode.ROUND_FLOOR); + t("4503599627370496", "65536", "3.25", 3, RoundingMode.ROUND_FLOOR); + t("68630377364883", "59049", "2.9", 2, RoundingMode.ROUND_FLOOR); + t("68630377364883", "847288609443", "1.16", 3, RoundingMode.ROUND_HALF_DOWN); + t("16", "1125899906842624", "0.08", 1, RoundingMode.ROUND_CEIL); + t("3814697265625", "390625", "2.25", 3, RoundingMode.ROUND_HALF_FLOOR); + t("8", "4294967296", "0.09375", 4, RoundingMode.ROUND_DOWN); + t("22876792454961", "59049", "2.8", 2, RoundingMode.ROUND_CEIL); + t("32", "33554432", "0.2", 1, RoundingMode.ROUND_CEIL); + t("16", "1125899906842624", "0.08", 1, RoundingMode.ROUND_CEIL); + t("16777216", "1024", "2.4", 2, RoundingMode.ROUND_CEIL); + t("31381059609", "3486784401", "1.1", 2, RoundingMode.ROUND_HALF_UP); + t("131072", "16", "4.25", 3, RoundingMode.ROUND_HALF_CEIL); + t("17179869184", "65536", "2.125", 4, RoundingMode.ROUND_CEIL); + t("131072", "32", "3.4", 2, RoundingMode.ROUND_HALF_DOWN); + t("31381059609", "6561", "2.75", 3, RoundingMode.ROUND_HALF_UP); + t("1162261467", "81", "4.75", 3, RoundingMode.ROUND_CEIL); + t("5", "152587890625", "0.0625", 3, RoundingMode.ROUND_HALF_FLOOR); + t("4", "1024", "0.2", 1, RoundingMode.ROUND_CEIL); + t("268435456", "1048576", "1.4", 2, RoundingMode.ROUND_HALF_FLOOR); + + t("456870693.58", "238920772.66", "1.0336035877093034523", 21, RoundingMode.ROUND_HALF_UP); + t("575547956.8582", "824684975.3545", "0.98248076", 8, RoundingMode.ROUND_HALF_UP); + t("82275648.874341603", "959190115.624130088", "0.88124641544168894893181429200832363", 35, RoundingMode.ROUND_HALF_UP); + t("74257343.4", "743703514.4", "0.88720377341908842250463392057841865999040289364224", 50, RoundingMode.ROUND_HALF_UP); + t("617556576.22", "1390349767.37", "0.96145220002205342499", 20, RoundingMode.ROUND_HALF_UP); + t("385659206.402956", "306197094.245356", "1.0118079926535367225661814147003237994862", 41, RoundingMode.ROUND_HALF_UP); + t("1739848017", "139741504", "1.134455757605027173760473871049514546484", 40, RoundingMode.ROUND_HALF_UP); + t("684413372.332", "749444030.62", "0.99556", 5, RoundingMode.ROUND_HALF_UP); + t("1276559129.76358811", "1814329747.19301894", "0.983510102095361604388", 21, RoundingMode.ROUND_HALF_UP); + t("470873324.56", "770017206.95", "0.975963952980122531477453931545461086248352", 42, RoundingMode.ROUND_HALF_UP); + t("142843622.855", "188030025.676", "0.985573716314165", 15, RoundingMode.ROUND_HALF_UP); + t("208762187.506204", "15673510.715596", "1.1563", 5, RoundingMode.ROUND_HALF_UP); + t("1066260899.1963", "954219284.761", "1.005369396783858165862954752482856604", 37, RoundingMode.ROUND_HALF_UP); + t("98615189.15", "75483684.05", "1.0147363402964731399253", 23, RoundingMode.ROUND_HALF_UP); + t("134306349.93018997", "262971762.95484809", "0.965342550919082621945239", 24, RoundingMode.ROUND_HALF_UP); + t("964681161.089224", "1910911588.814815", "0.9680153968863558918522522557796148", 34, RoundingMode.ROUND_HALF_UP); + t("9303669", "272208139", "0.8262", 4, RoundingMode.ROUND_HALF_UP); + t("388804210", "196979048", "1.035603565223696855965", 22, RoundingMode.ROUND_HALF_UP); + t("699589959.2322617", "574032511.7854473", "1.0098079347111332288609", 23, RoundingMode.ROUND_HALF_UP); + t("100575245.36", "172874206.82", "0.971443699412905370317336892965778", 33, RoundingMode.ROUND_HALF_UP); + t("188632711.8541175", "1056627336.0975408", "0.9170754305183363941127042", 25, RoundingMode.ROUND_HALF_UP); + t("267522787.94", "528716571.79", "0.966083390988836341228896", 24, RoundingMode.ROUND_HALF_UP); + t("145509306.43395", "472783713.04935", "0.941003844701466585568051857", 28, RoundingMode.ROUND_HALF_UP); + t("991525965.6381098", "609527830.0476525", "1.024053580832128", 16, RoundingMode.ROUND_HALF_UP); + t("1023653880.6218838", "953120602.1428507", "1.00345303146", 13, RoundingMode.ROUND_HALF_UP); + t("55755796.19", "1330531177.01", "0.84899920538009273", 17, RoundingMode.ROUND_HALF_UP); + t("334096229.1342503", "563056758.6770503", "0.97409528", 8, RoundingMode.ROUND_HALF_UP); + t("9635164", "231514430", "0.834932623823994616103829175346875687708", 39, RoundingMode.ROUND_HALF_UP); + t("131654133.157309973", "115412751.259558256", "1.007092396906741330059871530698890891053443", 43, RoundingMode.ROUND_HALF_UP); + + // base 2 + t("26880.2432276408875624", 2, "14.7142585720457255", 19, RoundingMode.ROUND_FLOOR); + t("18216.8140929585641372", 2, "14.152983050314836771855701", 26, RoundingMode.ROUND_DOWN); + t("28062.73494235358182", 2, "14.776367997755111083362495", 26, RoundingMode.ROUND_UP); + t("7408.82842447993", 2, "12.8550297084583087071", 21, RoundingMode.ROUND_DOWN); + t("395.067", 2, "8.62595353", 9, RoundingMode.ROUND_FLOOR); + t("27442.6587462411378", 2, "14.74414", 7, RoundingMode.ROUND_UP); + t("29259.23925137426", 2, "14.83660463902", 13, RoundingMode.ROUND_DOWN); + t("31809.09321", 2, "14.95715162", 10, RoundingMode.ROUND_FLOOR); + t("21088.306138691278", 2, "14.3641556", 9, RoundingMode.ROUND_HALF_UP); + t("21417.99322", 2, "14.386535691235055367", 20, RoundingMode.ROUND_HALF_UP); + t("30749.008158228314845157", 2, "14.9", 3, RoundingMode.ROUND_FLOOR); + t("11701.5", 2, "13.51440585840535244680127", 25, RoundingMode.ROUND_UP); + t("31737.6741", 2, "14.954", 5, RoundingMode.ROUND_CEIL); + t("1688.88816886", 2, "10.7218580867075137099751634", 27, RoundingMode.ROUND_FLOOR); + t("31553.4", 2, "14.945507849063278420302384", 26, RoundingMode.ROUND_DOWN); + t("28215.19", 2, "14.7841844442", 12, RoundingMode.ROUND_FLOOR); + t("6080.97", 2, "12.57008575", 10, RoundingMode.ROUND_DOWN); + t("575.881932366571406", 2, "9.16962924962079798", 18, RoundingMode.ROUND_DOWN); + t("4573.55560689675", 2, "12.1591004766309775332", 21, RoundingMode.ROUND_DOWN); + t("24202.85989198517539", 2, "15", 2, RoundingMode.ROUND_HALF_UP); + t("18334.9", 2, "14.16230477704721387108079127958", 31, RoundingMode.ROUND_HALF_UP); + t("20179.623017", 2, "14.4", 3, RoundingMode.ROUND_UP); + t("8607.97004888426002071", 2, "13.07145734276093159769689946319", 31, RoundingMode.ROUND_DOWN); + t("27231.463745", 2, "14.732986911725376996874804951679", 32, RoundingMode.ROUND_FLOOR); + t("24325.08", 2, "14.57015693", 10, RoundingMode.ROUND_UP); + t("826.3541073", 2, "9.69", 3, RoundingMode.ROUND_FLOOR); + t("6877.51851488", 2, "12.7476724030697", 15, RoundingMode.ROUND_FLOOR); + t("13510.031", 2, "13.7217433646123774736072103937", 30, RoundingMode.ROUND_HALF_UP); + t("559.1647711259", 2, "9.12712965971023632", 18, RoundingMode.ROUND_DOWN); + t("1262.018796786493279", 2, "10.30151768", 10, RoundingMode.ROUND_FLOOR); + t("31897.9889", 2, "14.9611778475691091525075", 24, RoundingMode.ROUND_DOWN); + t("24187.818942357666924548", 2, "14.561", 5, RoundingMode.ROUND_FLOOR); + t("7233.846688339241", 2, "12.820547306996872048936910678432", 32, RoundingMode.ROUND_FLOOR); + t("10162.3041", 2, "13.31093992111", 13, RoundingMode.ROUND_HALF_UP); + t("9091.859714971663525", 2, "13.1503597085807068872335", 24, RoundingMode.ROUND_DOWN); + t("16205.492", 2, "13.984195201", 11, RoundingMode.ROUND_FLOOR); + t("17578.3501161869916711", 2, "14.101512046680555", 18, RoundingMode.ROUND_FLOOR); + t("5661.58", 2, "12.466989012642603919950322048", 29, RoundingMode.ROUND_DOWN); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalMinAndMaxTests.cs b/DecimalSharp.Tests/BigDecimalMinAndMaxTests.cs new file mode 100644 index 0000000..b6a787a --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalMinAndMaxTests.cs @@ -0,0 +1,93 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalMinAndMax")] + public class BigDecimalMinAndMaxTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void MinAndMax() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument min, BigDecimalArgument max, BigDecimalArgument[] arr) => + { + BigDecimalTests.assertEqual(bigDecimalFactory.BigDecimal(max).ValueOf(), bigDecimalFactory.Max(arr).ValueOf()); + BigDecimalTests.assertEqual(bigDecimalFactory.BigDecimal(min).ValueOf(), bigDecimalFactory.Min(arr).ValueOf()); + }; + + t(double.NaN, double.NaN, new BigDecimalArgument[] {double.NaN}); + t(double.NaN, double.NaN, new BigDecimalArgument[] {-2, 0, -1, double.NaN}); + t(double.NaN, double.NaN, new BigDecimalArgument[] {-2, double.NaN, 0, -1}); + t(double.NaN, double.NaN, new BigDecimalArgument[] {double.NaN, -2, 0, -1}); + t(double.NaN, double.NaN, new BigDecimalArgument[] {double.NaN, -2, 0, -1}); + t(double.NaN, double.NaN, new BigDecimalArgument[] {-2, 0, -1, bigDecimalFactory.BigDecimal(double.NaN)}); + t(double.NaN, double.NaN, new BigDecimalArgument[] {-2, 0, -1, bigDecimalFactory.BigDecimal(double.NaN)}); + t(double.NaN, double.NaN, new BigDecimalArgument[] {double.PositiveInfinity, -2, "NaN", 0, -1, double.NegativeInfinity}); + t(double.NaN, double.NaN, new BigDecimalArgument[] {"NaN", double.PositiveInfinity, -2, 0, -1, double.NegativeInfinity}); + t(double.NaN, double.NaN, new BigDecimalArgument[] {double.PositiveInfinity, -2, double.NaN, 0, -1, double.NegativeInfinity}); + + t(0, 0, new BigDecimalArgument[] {0, 0, 0}); + t(-2, double.PositiveInfinity, new BigDecimalArgument[] {-2, 0, -1, double.PositiveInfinity}); + t(double.NegativeInfinity, 0, new BigDecimalArgument[] {-2, 0, -1, double.NegativeInfinity}); + t(double.NegativeInfinity, double.PositiveInfinity, new BigDecimalArgument[] {double.NegativeInfinity, -2, 0, -1, double.PositiveInfinity}); + t(double.NegativeInfinity, double.PositiveInfinity, new BigDecimalArgument[] {double.PositiveInfinity, -2, 0, -1, double.NegativeInfinity}); + t(double.NegativeInfinity, double.PositiveInfinity, new BigDecimalArgument[] {double.NegativeInfinity, -2, 0, bigDecimalFactory.BigDecimal(double.PositiveInfinity)}); + + t(-2, 0, new BigDecimalArgument[] {-2, 0, -1}); + t(-2, 0, new BigDecimalArgument[] {-2, -1, 0}); + t(-2, 0, new BigDecimalArgument[] {0, -2, -1}); + t(-2, 0, new BigDecimalArgument[] {0, -1, -2}); + t(-2, 0, new BigDecimalArgument[] {-1, -2, 0}); + t(-2, 0, new BigDecimalArgument[] {-1, 0, -2}); + + t(-1, 1, new BigDecimalArgument[] {-1, 0, 1}); + t(-1, 1, new BigDecimalArgument[] {-1, 1, 0}); + t(-1, 1, new BigDecimalArgument[] {0, -1, 1}); + t(-1, 1, new BigDecimalArgument[] {0, 1, -1}); + t(-1, 1, new BigDecimalArgument[] {1, -1, 0}); + t(-1, 1, new BigDecimalArgument[] {1, 0, -1}); + + t(0, 2, new BigDecimalArgument[] {0, 1, 2}); + t(0, 2, new BigDecimalArgument[] {0, 2, 1}); + t(0, 2, new BigDecimalArgument[] {1, 0, 2}); + t(0, 2, new BigDecimalArgument[] {1, 2, 0}); + t(0, 2, new BigDecimalArgument[] {2, 1, 0}); + t(0, 2, new BigDecimalArgument[] {2, 0, 1}); + + t(-1, 1, new BigDecimalArgument[] {"-1", 0, bigDecimalFactory.BigDecimal(1)}); + t(-1, 1, new BigDecimalArgument[] {"-1", bigDecimalFactory.BigDecimal(1)}); + t(-1, 1, new BigDecimalArgument[] {0, "-1", bigDecimalFactory.BigDecimal(1)}); + t(0, 1, new BigDecimalArgument[] {0, bigDecimalFactory.BigDecimal(1)}); + t(1, 1, new BigDecimalArgument[] {bigDecimalFactory.BigDecimal(1)}); + t(-1, -1, new BigDecimalArgument[] {bigDecimalFactory.BigDecimal(-1)}); + + t(0.0009999, 0.0010001, new BigDecimalArgument[] {0.001, 0.0009999, 0.0010001}); + t(-0.0010001, -0.0009999, new BigDecimalArgument[] {-0.001, -0.0009999, -0.0010001}); + t(-0.000001, 999.001, new BigDecimalArgument[] {2, -0, "1e-9000000000000000", 324.32423423, -0.000001, "999.001", 10}); + t("-9.99999e+9000000000000000", double.PositiveInfinity, new BigDecimalArgument[] {10, "-9.99999e+9000000000000000", bigDecimalFactory.BigDecimal(double.PositiveInfinity), "9.99999e+9000000000000000", 0}); + t("-9.999999e+9000000000000000", "1.01e+9000000000000000", new BigDecimalArgument[] {"-9.99998e+9000000000000000", "-9.999999e+9000000000000000", "9e+8999999999999999", "1.01e+9000000000000000", 1e+300}); + t(1, double.PositiveInfinity, new BigDecimalArgument[] {1, "1e+9000000000000001", 1e200}); + t(double.NegativeInfinity, 1, new BigDecimalArgument[] {1, "-1e+9000000000000001", -1e200}); + t(0, 1, new BigDecimalArgument[] {1, "1e-9000000000000001", 1e-200}); + t("-0", 1, new BigDecimalArgument[] {1, "-1e-9000000000000001", 1e-200}); + t(-3, 3, new BigDecimalArgument[] {1, "2", 3, "-1", -2, "-3"}); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalMinusTests.cs b/DecimalSharp.Tests/BigDecimalMinusTests.cs new file mode 100644 index 0000000..46a845f --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalMinusTests.cs @@ -0,0 +1,1069 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalMinus")] + public class BigDecimalMinusTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Minus() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 200, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e9, + ToExpPos = (long)9e9, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument minuend, BigDecimalArgument subtrahend, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(minuend).Minus(subtrahend).ValueOf()); + }; + + t(1, 0, "1"); + t(1, "-0", "1"); + t(-1, 0, "-1"); + t(-1, "-0", "-1"); + t(1, "NaN", "NaN"); + t(-1, "NaN", "NaN"); + t(1, "Infinity", "-Infinity"); + t(1, "-Infinity", "Infinity"); + t(-1, "Infinity", "-Infinity"); + t(-1, "-Infinity", "Infinity"); + t(0, 1, "-1"); + t(0, -1, "1"); + t("-0", 1, "-1"); + t("-0", -1, "1"); + + /* + IEEE 754 - 2008 section 6.3 + When the difference of two operands with like signs is exactly zero, the + sign of that difference shall be +0 in all rounding-direction attributes + except roundTowardNegative; under that attribute, the sign of an exact + difference shall be −0. + However, x + x = x −(−x) retains the same sign as x even when x is zero. + */ + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + + t("0", "-0", "0"); // 0 - -0 = 0 + t("-0", "0", "-0"); // -0 - 0 = -0 + t("0", "0", "-0"); // 0 - 0 = -0 + t("-0", "-0", "-0"); // -0 - -0 = -0 + t("1", "1", "-0"); // 1 - 1 = -0 + t("-1", "-1", "-0"); // -1 - -1 = -0 + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + + t("0", "-0", "0"); // 0 - -0 = 0 + t("-0", "0", "-0"); // -0 - 0 = -0 + t("0", "0", "0"); // 0 - 0 = 0 + t("-0", "-0", "0"); // -0 - -0 = 0 + t("1", "1", "0"); // 1 - 1 = 0 + t("-1", "-1", "0"); // -1 - -1 = 0 + + t(0, double.NaN, "NaN"); + t("-0", double.NaN, "NaN"); + t(0, double.PositiveInfinity, "-Infinity"); + t(0, double.NegativeInfinity, "Infinity"); + t("-0", double.PositiveInfinity, "-Infinity"); + t("-0", double.NegativeInfinity, "Infinity"); + t("NaN", 1, "NaN"); + t("NaN", -1, "NaN"); + t("NaN", 0, "NaN"); + t("NaN", "-0", "NaN"); + t("NaN", "NaN", "NaN"); + t("NaN", double.PositiveInfinity, "NaN"); + t("NaN", double.NegativeInfinity, "NaN"); + t(double.PositiveInfinity, 1, "Infinity"); + t(double.PositiveInfinity, -1, "Infinity"); + t(double.NegativeInfinity, 1, "-Infinity"); + t(double.NegativeInfinity, -1, "-Infinity"); + t(double.PositiveInfinity, 0, "Infinity"); + t(double.PositiveInfinity, "-0", "Infinity"); + t(double.NegativeInfinity, 0, "-Infinity"); + t(double.NegativeInfinity, "-0", "-Infinity"); + t(double.PositiveInfinity, "NaN", "NaN"); + t(double.NegativeInfinity, "NaN", "NaN"); + t(double.PositiveInfinity, double.PositiveInfinity, "NaN"); + t(double.PositiveInfinity, double.NegativeInfinity, "Infinity"); + t(double.NegativeInfinity, double.PositiveInfinity, "-Infinity"); + t(double.NegativeInfinity, double.NegativeInfinity, "NaN"); + + t(1, "0", "1"); + t(1, "1", "0"); + t(1, "-45", "46"); + t(1, "22", "-21"); + //t(1, 0144, "-99"); //js only + t(1, "0144", "-143"); + t(1, "6.1915", "-5.1915"); + t(1, "-1.02", "2.02"); + t(1, "0.09", "0.91"); + t(1, "-0.0001", "1.0001"); + t(1, "8e5", "-799999"); + t(1, "9E12", "-8999999999999"); + t(1, "1e-14", "0.99999999999999"); + t(1, "3.345E-9", "0.999999996655"); + t(1, "-345.43e+4", "3454301"); + t(1, "-94.12E+0", "95.12"); + t("0", 0, "0"); + t("0", "0", "0"); + t(3, "-0", "3"); + t(9.654, 0, "9.654"); + t(0, "0.001", "-0.001"); + t(0, "111.1111111110000", "-111.111111111"); + t(-1, 1, "-2"); + t(-0.01, 0.01, "-0.02"); + t(54, -54, "108"); + t(9.99, "-9.99", "19.98"); + t("0.0000023432495704937", "-0.0000023432495704937", "0.0000046864991409874"); + t(double.NaN, double.NaN, "NaN"); + t(double.NaN, "NaN", "NaN"); + t("NaN", double.NaN, "NaN"); + t("NaN", 4, "NaN"); + t("NaN", "4534534.45435435", "NaN"); + t("NaN", 99999.999, "NaN"); + t("Infinity", "354.345341", "Infinity"); + t(3, "-Infinity", "Infinity"); + t("Infinity", "Infinity", "NaN"); + t("-Infinity", "-Infinity", "NaN"); + t("Infinity", "-999e999", "Infinity"); + t("1.21123e43", "-Infinity", "Infinity"); + t("-999.0", "Infinity", "-Infinity"); + t("657.342e-45", "-Infinity", "Infinity"); + t("Infinity", 123, "Infinity"); + t("-0", "Infinity", "-Infinity"); + t(100, 100, "0"); + t(-999.99, "0.01", "-1000"); + t("10", 4, "6"); + t("03.333", -4, "7.333"); + t(-1, -0.1, "-0.9"); + t(43534.5435, "0.054645", "43534.488855"); + t("99999", "1", "99998"); + + var t2 = (BigDecimalArgument minuend, BigDecimalArgument subtrahend, string expected, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(minuend, config).Minus(subtrahend).ValueOf()); + }; + + t2("0.000001", "1E-13", "0.0000009999999", 12, RoundingMode.ROUND_HALF_DOWN); + t2("1E-29", "0.1", "-0.09999999999999999999999999999", 30, RoundingMode.ROUND_HALF_UP); + t2("1E-9", "1E-40", "0.0000000009999999999999999999999999999999", 72, RoundingMode.ROUND_HALF_EVEN); + t2("1E-12", "1E-7", "-0.000000099999", 42, RoundingMode.ROUND_FLOOR); + t2("1E-14", "1E-13", "-0.00000000000009", 76, RoundingMode.ROUND_UP); + t2("1E-21", "1E-32", "0.00000000000000000000099999999999", 77, RoundingMode.ROUND_HALF_UP); + t2("1E-19", "1E-16", "-0.0000000000000000999", 43, RoundingMode.ROUND_FLOOR); + t2("1E-17", "1E-39", "0.000000000000000009999999999999999999999", 68, RoundingMode.ROUND_CEIL); + t2("1E-17", "1E-16", "-0.00000000000000009", 67, RoundingMode.ROUND_DOWN); + t2("1E-37", "1E-13", "-0.0000000000000999999999999999999999999", 52, RoundingMode.ROUND_UP); + t2("1E-27", "0.1", "-0.1", 25, RoundingMode.ROUND_HALF_DOWN); + t2("1E-28", "0.0001", "-0.0001", 6, RoundingMode.ROUND_HALF_UP); + t2("1E-20", "1E-34", "0.0000000000000000000099999999999999", 26, RoundingMode.ROUND_UP); + t2("1E-20", "0.1", "-0.1", 1, RoundingMode.ROUND_HALF_EVEN); + t2("1E-21", "1E-35", "0.00000000000000000000099999999999999", 57, RoundingMode.ROUND_FLOOR); + t2("1E-30", "0.000001", "-0.000000999999999999999999999999", 81, RoundingMode.ROUND_UP); + t2("0.001", "1E-37", "0.00099999999999", 11, RoundingMode.ROUND_DOWN); + t2("1E-37", "1E-22", "-0.0000000000000000000000999999999999999", 73, RoundingMode.ROUND_HALF_EVEN); + t2("1E-25", "1E-34", "0.0000000000000000000000000999999999", 77, RoundingMode.ROUND_HALF_DOWN); + t2("1E-35", "1E-15", "-0.00000000000000099999999999999999999", 72, RoundingMode.ROUND_DOWN); + t2("1E-21", "1E-18", "-0.000000000000000000999", 16, RoundingMode.ROUND_FLOOR); + t2("1E-31", "0.01", "-0.0099999999999999999999999999999", 36, RoundingMode.ROUND_DOWN); + t2("1E-13", "1E-10", "-0.0000000000999", 47, RoundingMode.ROUND_HALF_EVEN); + t2("1E-18", "0.001", "-0.000999999999999999", 91, RoundingMode.ROUND_HALF_DOWN); + t2("1E-38", "1E-11", "-0.00000000000999999999999999999999999999", 35, RoundingMode.ROUND_HALF_DOWN); + t2("0.001", "1E-23", "0.001", 17, RoundingMode.ROUND_CEIL); + t2("1E-38", "1E-7", "-0.00000009999999999999999999999999999999", 80, RoundingMode.ROUND_HALF_DOWN); + t2("0.000001", "1E-32", "0.000001", 21, RoundingMode.ROUND_CEIL); + t2("1E-20", "1E-30", "0.000000000000000000009999999999", 99, RoundingMode.ROUND_DOWN); + t2("1E-23", "1E-17", "-0.00000000000000000999999", 7, RoundingMode.ROUND_UP); + t2("1E-27", "1E-13", "-0.000000000000099999999999999", 94, RoundingMode.ROUND_HALF_UP); + t2("0.000001", "1E-39", "0.000000999999999999999999999999999999999", 77, RoundingMode.ROUND_UP); + t2("1E-32", "1E-23", "-0.00000000000000000000000999999999", 26, RoundingMode.ROUND_UP); + t2("1E-37", "1E-19", "-0.0000000000000000001", 17, RoundingMode.ROUND_HALF_UP); + t2("1E-20", "1E-34", "0.0000000000000000000099999999999999", 41, RoundingMode.ROUND_DOWN); + t2("1E-16", "1E-30", "0.000000000000000099999999999999", 37, RoundingMode.ROUND_HALF_UP); + t2("1E-9", "1E-14", "0.00000000099999", 54, RoundingMode.ROUND_CEIL); + t2("1E-33", "1E-12", "-0.000000000000999999999999999999999", 39, RoundingMode.ROUND_HALF_EVEN); + t2("1E-26", "1E-40", "0.0000000000000000000000000099999999999999", 36, RoundingMode.ROUND_FLOOR); + t2("0.0001", "0.1", "-0.0999", 27, RoundingMode.ROUND_HALF_DOWN); + t2("1E-39", "1E-26", "-0.000000000000000000000000009999999999999", 28, RoundingMode.ROUND_HALF_DOWN); + t2("1E-37", "1E-14", "-0.0000000000000099999999999999999999999", 99, RoundingMode.ROUND_DOWN); + t2("1E-21", "1E-14", "-0.000000000000009999999", 79, RoundingMode.ROUND_HALF_EVEN); + t2("1E-30", "1E-33", "0.000000000000000000000000000000999", 5, RoundingMode.ROUND_UP); + t2("1E-24", "1E-16", "-0.000000000000000099999999", 8, RoundingMode.ROUND_HALF_UP); + t2("0.1", "1E-29", "0.09999999999999999999999999999", 53, RoundingMode.ROUND_DOWN); + t2("1E-21", "1E-16", "-0.000000000000000099999", 69, RoundingMode.ROUND_HALF_DOWN); + t2("1E-13", "1E-32", "0.00000000000009999999999999999999", 80, RoundingMode.ROUND_FLOOR); + t2("1E-27", "1E-27", "0", 14, RoundingMode.ROUND_DOWN); + t2("1E-36", "1E-17", "-0.00000000000000001", 10, RoundingMode.ROUND_HALF_DOWN); + t2("1E-20", "1E-39", "0.000000000000000000009999999999999999999", 39, RoundingMode.ROUND_HALF_EVEN); + t2("1E-32", "1E-13", "-0.00000000000009999999999999999999", 69, RoundingMode.ROUND_UP); + t2("1E-35", "1E-22", "-0.00000000000000000000009999999999999", 40, RoundingMode.ROUND_UP); + t2("1E-17", "1E-37", "0.00000000000000001", 8, RoundingMode.ROUND_CEIL); + t2("1E-19", "1E-9", "-0.0000000009999999999", 60, RoundingMode.ROUND_HALF_DOWN); + t2("1E-33", "1E-28", "-0.000000000000000000000000000099999", 6, RoundingMode.ROUND_DOWN); + t2("0.000001", "1E-27", "0.000001", 13, RoundingMode.ROUND_CEIL); + t2("1E-34", "1E-12", "-0.0000000000009999999999999999999999", 66, RoundingMode.ROUND_CEIL); + t2("1E-36", "1E-27", "-0.000000000000000000000000000999999999", 22, RoundingMode.ROUND_FLOOR); + t2("1E-40", "1E-20", "-0.0000000000000000000099999999999999999999", 91, RoundingMode.ROUND_HALF_DOWN); + t2("1E-26", "1E-17", "-0.00000000000000001", 7, RoundingMode.ROUND_UP); + t2("1E-25", "1E-34", "0.0000000000000000000000000999999999", 76, RoundingMode.ROUND_HALF_DOWN); + t2("1E-37", "1E-29", "-0.0000000000000000000000000000099999999", 29, RoundingMode.ROUND_UP); + t2("1E-16", "1E-9", "-0.0000000009999999", 74, RoundingMode.ROUND_DOWN); + t2("1E-20", "1E-26", "0.00000000000000000000999999", 88, RoundingMode.ROUND_DOWN); + t2("1E-35", "1E-22", "-0.00000000000000000000009999999999999", 84, RoundingMode.ROUND_HALF_DOWN); + t2("1E-14", "1E-32", "0.00000000000000999999999999999999", 68, RoundingMode.ROUND_DOWN); + t2("1E-9", "1E-38", "0.0000000009999999999999999999999999999", 28, RoundingMode.ROUND_FLOOR); + t2("1E-15", "1E-18", "0.000000000000000999", 46, RoundingMode.ROUND_DOWN); + t2("1E-8", "1E-20", "0.00000001", 1, RoundingMode.ROUND_HALF_DOWN); + t2("1E-33", "1E-33", "0", 98, RoundingMode.ROUND_CEIL); + t2("1E-30", "1E-38", "0.00000000000000000000000000000099999999", 22, RoundingMode.ROUND_FLOOR); + t2("1E-19", "0.1", "-0.0999999999999999999", 53, RoundingMode.ROUND_HALF_EVEN); + t2("0.000001", "1E-14", "0.00000099999999", 53, RoundingMode.ROUND_CEIL); + t2("0.000001", "1E-25", "0.0000009999999999999999999", 96, RoundingMode.ROUND_CEIL); + t2("1E-13", "1E-16", "0.0000000000000999", 89, RoundingMode.ROUND_CEIL); + t2("1E-25", "1E-40", "0.0000000000000000000000000999999999999999", 74, RoundingMode.ROUND_HALF_DOWN); + t2("1E-33", "1E-18", "-0.000000000000000000999999999999999", 86, RoundingMode.ROUND_FLOOR); + t2("1E-13", "1E-21", "0.000000000000099999999", 44, RoundingMode.ROUND_HALF_DOWN); + t2("1E-29", "0.01", "-0.01", 17, RoundingMode.ROUND_HALF_EVEN); + t2("0.1", "1E-29", "0.09999999999999999999999999999", 30, RoundingMode.ROUND_HALF_DOWN); + t2("1E-9", "1E-18", "0.000000000999999999", 10, RoundingMode.ROUND_UP); + t2("1E-34", "1E-31", "-0.0000000000000000000000000000000999", 90, RoundingMode.ROUND_DOWN); + t2("1E-35", "0.1", "-0.099999", 5, RoundingMode.ROUND_CEIL); + t2("1E-32", "1E-7", "-0.00000009999999999999999999999999", 27, RoundingMode.ROUND_FLOOR); + t2("1E-25", "0.00001", "-0.0000099999999999999999999", 45, RoundingMode.ROUND_HALF_DOWN); + t2("1E-30", "1E-22", "-0.000000000000000000000099999999", 29, RoundingMode.ROUND_HALF_EVEN); + t2("1E-21", "1E-23", "0.00000000000000000000099", 4, RoundingMode.ROUND_HALF_UP); + t2("1E-23", "1E-36", "0.000000000000000000000009", 1, RoundingMode.ROUND_FLOOR); + t2("1E-31", "1E-37", "0.0000000000000000000000000000000999999", 73, RoundingMode.ROUND_UP); + t2("1E-9", "1E-36", "0.000000000999999999999999999999999999", 90, RoundingMode.ROUND_HALF_UP); + t2("1E-39", "1E-31", "-0.000000000000000000000000000000099999999", 45, RoundingMode.ROUND_HALF_EVEN); + t2("0.0001", "0.000001", "0.000099", 7, RoundingMode.ROUND_UP); + t2("1E-7", "1E-36", "0.000000099999999999999999999999999999", 60, RoundingMode.ROUND_UP); + t2("1E-27", "1E-28", "0.0000000000000000000000000009", 95, RoundingMode.ROUND_HALF_DOWN); + t2("0.01", "0.0001", "0.0099", 27, RoundingMode.ROUND_DOWN); + t2("1E-9", "1E-30", "0.000000001", 6, RoundingMode.ROUND_CEIL); + t2("0.1", "1E-23", "0.1", 17, RoundingMode.ROUND_HALF_EVEN); + t2("1E-21", "1E-18", "-0.000000000000000000999", 46, RoundingMode.ROUND_UP); + t2("1E-19", "1E-23", "0.00000000000000000009999", 27, RoundingMode.ROUND_HALF_UP); + t2("1E-24", "1E-19", "-0.000000000000000000099999", 41, RoundingMode.ROUND_UP); + t2("1E-26", "1E-20", "-0.00000000000000000000999999", 53, RoundingMode.ROUND_UP); + t2("1E-19", "0.1", "-0.0999999999999999999", 80, RoundingMode.ROUND_HALF_DOWN); + t2("1E-14", "1E-24", "0.000000000000009999999999", 12, RoundingMode.ROUND_FLOOR); + t2("1E-19", "1E-17", "-0.0000000000000000099", 59, RoundingMode.ROUND_HALF_DOWN); + t2("1E-27", "1E-22", "-0.000000000000000000000099999", 72, RoundingMode.ROUND_HALF_UP); + t2("1E-28", "1E-8", "-0.0000000099999999999999999999", 40, RoundingMode.ROUND_CEIL); + t2("1E-32", "1E-34", "0.0000000000000000000000000000000099", 60, RoundingMode.ROUND_FLOOR); + t2("1E-23", "0.1", "-0.09999999999999999999999", 32, RoundingMode.ROUND_HALF_DOWN); + t2("0.01", "1E-26", "0.00999999999999999999999999", 100, RoundingMode.ROUND_HALF_UP); + t2("1E-22", "0.01", "-0.0099999999999999999999", 62, RoundingMode.ROUND_DOWN); + t2("1E-15", "1E-7", "-0.000000099999999", 57, RoundingMode.ROUND_FLOOR); + t2("1E-11", "1E-7", "-0.00000009999", 51, RoundingMode.ROUND_HALF_UP); + t2("0.001", "1E-17", "0.00099999999999999", 19, RoundingMode.ROUND_UP); + t2("1E-12", "0.001", "-0.00099999", 5, RoundingMode.ROUND_CEIL); + t2("1E-24", "1E-14", "-0.000000000000009999999999", 22, RoundingMode.ROUND_CEIL); + t2("0.1", "1E-27", "0.099999999999999999999999999", 27, RoundingMode.ROUND_FLOOR); + t2("1E-18", "1E-33", "0.000000000000000000999999999999999", 98, RoundingMode.ROUND_CEIL); + t2("0.1", "1E-17", "0.09999999999999999", 48, RoundingMode.ROUND_HALF_EVEN); + t2("1E-30", "1E-33", "0.000000000000000000000000000000999", 34, RoundingMode.ROUND_CEIL); + t2("1E-31", "1E-10", "-0.0000000000999999999999999999999", 37, RoundingMode.ROUND_CEIL); + t2("1E-28", "1E-12", "-0.000000000001", 14, RoundingMode.ROUND_FLOOR); + t2("1E-23", "1E-19", "-0.00000000000000000009999", 41, RoundingMode.ROUND_HALF_UP); + t2("1E-8", "1E-9", "0.000000009", 31, RoundingMode.ROUND_CEIL); + t2("1E-17", "1E-8", "-0.00000000999999999", 67, RoundingMode.ROUND_HALF_UP); + t2("1E-31", "1E-17", "-0.0000000000000000099999999999999", 67, RoundingMode.ROUND_HALF_EVEN); + t2("0.000001", "1E-24", "0.000000999999999999999999", 93, RoundingMode.ROUND_UP); + t2("1E-17", "1E-33", "0.000000000000000009999999999999999", 57, RoundingMode.ROUND_CEIL); + t2("1E-28", "1E-10", "-0.0000000000999999999999999999", 71, RoundingMode.ROUND_HALF_UP); + t2("1E-17", "1E-26", "0.00000000000000000999999999", 82, RoundingMode.ROUND_UP); + t2("0.1", "0.00001", "0.09999", 67, RoundingMode.ROUND_CEIL); + t2("1E-21", "1E-25", "0.0000000000000000000009999", 93, RoundingMode.ROUND_FLOOR); + t2("1E-19", "0.1", "-0.0999999999999999999", 64, RoundingMode.ROUND_DOWN); + t2("1E-10", "1E-21", "0.000000000099999999999", 49, RoundingMode.ROUND_UP); + t2("1E-37", "1E-16", "-0.0000000000000000999999999999999999999", 74, RoundingMode.ROUND_UP); + t2("1E-31", "1E-33", "0.000000000000000000000000000000099", 2, RoundingMode.ROUND_HALF_UP); + t2("1E-21", "1E-28", "0.0000000000000000000009999999", 54, RoundingMode.ROUND_HALF_DOWN); + t2("1E-26", "1E-28", "0.0000000000000000000000000099", 5, RoundingMode.ROUND_FLOOR); + t2("1E-28", "1E-32", "0.00000000000000000000000000009999", 72, RoundingMode.ROUND_HALF_DOWN); + t2("1E-9", "1E-26", "0.00000000099999999999999999", 34, RoundingMode.ROUND_HALF_UP); + t2("1E-40", "1E-12", "-0.0000000000009999999999999999999999999999", 98, RoundingMode.ROUND_DOWN); + t2("1E-30", "0.0001", "-0.000099999999999999999999999999", 59, RoundingMode.ROUND_HALF_DOWN); + t2("1E-40", "1E-30", "-0.0000000000000000000000000000009999999999", 39, RoundingMode.ROUND_UP); + t2("1E-33", "1E-17", "-0.000000000000000009999999999999999", 30, RoundingMode.ROUND_UP); + t2("1E-37", "1E-16", "-0.0000000000000000999999999999999999999", 82, RoundingMode.ROUND_DOWN); + t2("0.1", "1E-11", "0.09999999999", 88, RoundingMode.ROUND_DOWN); + t2("1E-14", "0.1", "-0.09999999999999", 62, RoundingMode.ROUND_HALF_EVEN); + t2("0.001", "1E-14", "0.00099999999999", 56, RoundingMode.ROUND_DOWN); + t2("1E-20", "1E-9", "-0.00000000099999999999", 34, RoundingMode.ROUND_UP); + t2("1E-39", "1E-34", "-0.000000000000000000000000000000000099999", 73, RoundingMode.ROUND_HALF_UP); + t2("1E-14", "1E-31", "0.0000000000000099999999999999999", 42, RoundingMode.ROUND_DOWN); + t2("1E-31", "1E-12", "-0.0000000000009999999999999999999", 34, RoundingMode.ROUND_HALF_EVEN); + t2("0.01", "1E-30", "0.009999999999999999999999999999", 60, RoundingMode.ROUND_HALF_EVEN); + t2("1E-30", "1E-14", "-0.000000000000009999999999999999", 70, RoundingMode.ROUND_CEIL); + t2("0.01", "1E-17", "0.00999999999999999", 31, RoundingMode.ROUND_HALF_DOWN); + t2("1E-22", "0.001", "-0.0009999999999999999999", 46, RoundingMode.ROUND_HALF_UP); + t2("1E-35", "1E-31", "-0.00000000000000000000000000000009999", 10, RoundingMode.ROUND_HALF_EVEN); + t2("0.1", "1E-28", "0.1", 23, RoundingMode.ROUND_HALF_DOWN); + t2("0.00001", "1E-40", "0.00001", 2, RoundingMode.ROUND_HALF_UP); + t2("0.00001", "1E-35", "0.0000099999999999999999999999", 23, RoundingMode.ROUND_DOWN); + t2("1E-25", "1E-12", "-0.0000000000009999999999999", 85, RoundingMode.ROUND_UP); + t2("0.00001", "1E-29", "0.00000999999999999999999999999", 90, RoundingMode.ROUND_UP); + t2("0.0001", "1E-22", "0.0000999999999999999999", 20, RoundingMode.ROUND_FLOOR); + t2("1E-19", "1E-25", "0.0000000000000000000999999", 87, RoundingMode.ROUND_HALF_UP); + t2("1E-22", "1E-23", "0.00000000000000000000009", 22, RoundingMode.ROUND_HALF_EVEN); + t2("1E-21", "1E-23", "0.00000000000000000000099", 23, RoundingMode.ROUND_HALF_EVEN); + t2("1E-12", "1E-7", "-0.000000099999", 55, RoundingMode.ROUND_UP); + t2("0.000001", "1E-17", "0.00000099999999999", 19, RoundingMode.ROUND_DOWN); + t2("1E-17", "1E-19", "0.0000000000000000099", 90, RoundingMode.ROUND_HALF_UP); + t2("1E-16", "1E-37", "0.0000000000000000999999999999999999999", 50, RoundingMode.ROUND_DOWN); + t2("1E-9", "1E-31", "0.0000000009999999999999999999999", 37, RoundingMode.ROUND_CEIL); + t2("1E-35", "0.1", "-0.09999999999999999999999999999999999", 87, RoundingMode.ROUND_CEIL); + t2("1E-32", "1E-13", "-0.0000000000001", 15, RoundingMode.ROUND_HALF_DOWN); + t2("1E-10", "1E-18", "0.000000000099999999", 91, RoundingMode.ROUND_FLOOR); + t2("0.1", "1E-25", "0.099999999999999999", 17, RoundingMode.ROUND_FLOOR); + t2("1E-32", "1E-21", "-0.000000000000000000001", 10, RoundingMode.ROUND_UP); + t2("1E-23", "1E-10", "-0.00000000009999999999999", 77, RoundingMode.ROUND_UP); + t2("1E-20", "1E-18", "-0.00000000000000000099", 71, RoundingMode.ROUND_UP); + t2("1E-17", "0.01", "-0.00999999999999999", 76, RoundingMode.ROUND_HALF_EVEN); + t2("1E-18", "1E-15", "-0.000000000000000999", 70, RoundingMode.ROUND_DOWN); + t2("1E-34", "1E-31", "-0.0000000000000000000000000000000999", 21, RoundingMode.ROUND_UP); + t2("0.1", "1E-28", "0.0999999999999999999999999999", 72, RoundingMode.ROUND_CEIL); + t2("1E-27", "1E-30", "0.000000000000000000000000000999", 76, RoundingMode.ROUND_DOWN); + t2("1E-14", "1E-11", "-0.00000000000999", 95, RoundingMode.ROUND_CEIL); + t2("1E-19", "1E-18", "-0.0000000000000000009", 43, RoundingMode.ROUND_CEIL); + t2("1E-26", "1E-28", "0.0000000000000000000000000099", 87, RoundingMode.ROUND_HALF_DOWN); + t2("1E-39", "1E-36", "-0.000000000000000000000000000000000000999", 97, RoundingMode.ROUND_HALF_DOWN); + t2("0.000001", "1E-35", "0.00000099999999999999999999999999999", 40, RoundingMode.ROUND_DOWN); + t2("1E-20", "1E-27", "0.000000000000000000009999999", 32, RoundingMode.ROUND_DOWN); + t2("1E-17", "0.1", "-0.09999999999999999", 30, RoundingMode.ROUND_UP); + t2("1E-37", "0.000001", "-0.0000009999999999999999999999999999999", 33, RoundingMode.ROUND_HALF_EVEN); + t2("1E-8", "1E-36", "0.000000009999999999999999999999999999", 46, RoundingMode.ROUND_HALF_UP); + t2("0.1", "1E-25", "0.0999999999999999999999999", 75, RoundingMode.ROUND_DOWN); + t2("1E-21", "1E-13", "-0.000000000000099999999", 45, RoundingMode.ROUND_HALF_EVEN); + t2("1E-28", "1E-13", "-0.0000000000000999999999999999", 63, RoundingMode.ROUND_HALF_EVEN); + t2("0.0001", "1E-23", "0.00009999999999999999999", 39, RoundingMode.ROUND_CEIL); + t2("1E-33", "1E-19", "-0.000000000000000000099999999999999", 15, RoundingMode.ROUND_DOWN); + t2("1E-38", "1E-24", "-0.00000000000000000000000099999999999999", 20, RoundingMode.ROUND_CEIL); + t2("1E-37", "1E-27", "-0.0000000000000000000000000009999999999", 24, RoundingMode.ROUND_HALF_UP); + t2("1E-29", "1E-18", "-0.00000000000000000099999999999", 92, RoundingMode.ROUND_FLOOR); + t2("1E-7", "1E-34", "0.0000000999999999999999999999999999", 96, RoundingMode.ROUND_DOWN); + t2("0.00001", "1E-25", "0.0000099999999999999999999", 93, RoundingMode.ROUND_UP); + t2("1E-30", "1E-36", "0.000000000000000000000000000000999999", 37, RoundingMode.ROUND_HALF_EVEN); + t2("1E-24", "1E-37", "0.0000000000000000000000009999999999999", 85, RoundingMode.ROUND_HALF_DOWN); + t2("1E-21", "0.001", "-0.001", 17, RoundingMode.ROUND_HALF_EVEN); + t2("1E-31", "1E-23", "-0.0000000000000000000000099999999", 75, RoundingMode.ROUND_CEIL); + t2("0.000001", "1E-40", "0.0000009", 1, RoundingMode.ROUND_FLOOR); + t2("1E-25", "1E-17", "-0.0000000000000000099999999", 37, RoundingMode.ROUND_CEIL); + t2("0.1", "1E-31", "0.0999999999999999999999999999999", 50, RoundingMode.ROUND_FLOOR); + t2("1E-33", "1E-23", "-0.000000000000000000000009999999999", 95, RoundingMode.ROUND_HALF_DOWN); + t2("1E-32", "1E-35", "0.00000000000000000000000000000000999", 4, RoundingMode.ROUND_DOWN); + t2("1E-8", "1E-9", "0.000000009", 64, RoundingMode.ROUND_HALF_DOWN); + t2("1E-11", "1E-17", "0.00000000000999999", 67, RoundingMode.ROUND_HALF_DOWN); + t2("0.00001", "1E-12", "0.000009999999", 80, RoundingMode.ROUND_HALF_UP); + t2("0.001", "1E-12", "0.000999999999", 27, RoundingMode.ROUND_HALF_DOWN); + t2("1E-40", "1E-39", "-0.0000000000000000000000000000000000000009", 4, RoundingMode.ROUND_CEIL); + t2("1E-13", "1E-15", "0.000000000000099", 51, RoundingMode.ROUND_CEIL); + t2("0.1", "0.01", "0.09", 21, RoundingMode.ROUND_UP); + t2("1E-35", "1E-39", "0.000000000000000000000000000000000009999", 50, RoundingMode.ROUND_HALF_DOWN); + t2("0.1", "1E-37", "0.0999999999999999999999999999999999999", 93, RoundingMode.ROUND_UP); + t2("0.1", "1E-31", "0.0999999999999999999999999999999", 31, RoundingMode.ROUND_DOWN); + t2("1E-12", "1E-35", "0.00000000000099999999999999999999999", 43, RoundingMode.ROUND_FLOOR); + t2("1E-10", "1E-22", "0.00000000009", 1, RoundingMode.ROUND_FLOOR); + t2("1E-7", "1E-19", "0.0000000999999999999", 33, RoundingMode.ROUND_CEIL); + t2("1E-23", "1E-20", "-0.00000000000000000000999", 4, RoundingMode.ROUND_HALF_EVEN); + t2("1E-33", "1E-31", "-0.000000000000000000000000000000099", 65, RoundingMode.ROUND_HALF_DOWN); + t2("0.01", "1E-17", "0.00999999999999999", 50, RoundingMode.ROUND_UP); + t2("1E-21", "1E-12", "-0.00000000000099999", 5, RoundingMode.ROUND_DOWN); + t2("1E-15", "1E-40", "0.000000000000001", 5, RoundingMode.ROUND_HALF_DOWN); + t2("1E-19", "0.00001", "-0.0000099999999999999", 21, RoundingMode.ROUND_FLOOR); + t2("0.1", "0.1", "0", 71, RoundingMode.ROUND_HALF_DOWN); + t2("1E-9", "1E-33", "0.000000000999999999999999999999999", 95, RoundingMode.ROUND_FLOOR); + t2("1E-15", "1E-19", "0.0000000000000009999", 77, RoundingMode.ROUND_HALF_DOWN); + t2("1E-34", "0.01", "-0.0099999999999999999999999999999999", 61, RoundingMode.ROUND_CEIL); + t2("1E-17", "0.1", "-0.1", 6, RoundingMode.ROUND_UP); + t2("0.000001", "0.000001", "0", 72, RoundingMode.ROUND_UP); + t2("1E-15", "1E-40", "0.0000000000000009999999999999999999999999", 37, RoundingMode.ROUND_UP); + t2("1E-34", "1E-24", "-0.0000000000000000000000009999999999", 14, RoundingMode.ROUND_FLOOR); + t2("1E-38", "0.1", "-0.09999999999999999999", 19, RoundingMode.ROUND_DOWN); + t2("1E-36", "0.0001", "-0.000099999999999999999999999999999999", 48, RoundingMode.ROUND_UP); + t2("0.01", "1E-39", "0.009999999999999999999999999999999999999", 94, RoundingMode.ROUND_HALF_UP); + t2("1E-24", "1E-13", "-0.000000000000099999999999", 48, RoundingMode.ROUND_HALF_DOWN); + t2("1E-31", "0.1", "-0.0999999999999999999999999999999", 50, RoundingMode.ROUND_FLOOR); + t2("0.1", "1E-7", "0.0999999", 79, RoundingMode.ROUND_HALF_DOWN); + t2("0.01", "1E-36", "0.01", 26, RoundingMode.ROUND_HALF_UP); + t2("1E-22", "1E-8", "-0.00000001", 3, RoundingMode.ROUND_HALF_EVEN); + t2("1E-25", "0.1", "-0.0999999999999999999999999", 83, RoundingMode.ROUND_DOWN); + t2("1E-38", "0.000001", "-0.000001", 20, RoundingMode.ROUND_HALF_UP); + t2("0.001", "1E-21", "0.000999999999999999999", 100, RoundingMode.ROUND_DOWN); + t2("1E-26", "1E-35", "0.00000000000000000000000000999999999", 40, RoundingMode.ROUND_UP); + t2("1E-12", "1E-25", "0.0000000000009999999999999", 71, RoundingMode.ROUND_CEIL); + t2("1E-11", "1E-33", "0.000000000009999999999999999999999", 78, RoundingMode.ROUND_UP); + t2("1E-13", "1E-25", "0.0000000000000999999999999", 17, RoundingMode.ROUND_UP); + t2("1E-25", "0.1", "-0.0999999999999999999999999", 33, RoundingMode.ROUND_CEIL); + t2("1E-20", "1E-20", "0", 15, RoundingMode.ROUND_HALF_UP); + t2("1E-9", "1E-23", "0.000000001", 12, RoundingMode.ROUND_HALF_EVEN); + t2("1E-29", "1E-40", "0.0000000000000000000000000000099999999999", 29, RoundingMode.ROUND_CEIL); + t2("1E-32", "1E-36", "0.000000000000000000000000000000009999", 73, RoundingMode.ROUND_CEIL); + t2("1E-29", "0.00001", "-0.00000999999999999999999999999", 69, RoundingMode.ROUND_FLOOR); + t2("0.00001", "1E-33", "0.00001", 16, RoundingMode.ROUND_HALF_UP); + t2("1E-10", "0.1", "-0.0999999999", 58, RoundingMode.ROUND_DOWN); + t2("1E-18", "1E-39", "0.000000000000000000999999999999999999999", 84, RoundingMode.ROUND_DOWN); + t2("1E-24", "0.00001", "-0.000009999999999999999999", 21, RoundingMode.ROUND_UP); + t2("1E-23", "1E-39", "0.000000000000000000000009999999999999999", 66, RoundingMode.ROUND_CEIL); + t2("1E-21", "1E-19", "-0.000000000000000000099", 71, RoundingMode.ROUND_HALF_EVEN); + t2("1E-24", "1E-27", "0.000000000000000000000000999", 81, RoundingMode.ROUND_HALF_DOWN); + t2("1E-40", "1E-9", "-0.000000001", 8, RoundingMode.ROUND_HALF_EVEN); + t2("1E-32", "1E-14", "-0.00000000000000999999999999999999", 24, RoundingMode.ROUND_HALF_DOWN); + t2("1E-11", "1E-11", "0", 70, RoundingMode.ROUND_HALF_UP); + t2("0.00001", "1E-29", "0.00000999999999999999999999999", 96, RoundingMode.ROUND_UP); + t2("1E-20", "1E-13", "-0.00000000000009999999", 43, RoundingMode.ROUND_HALF_EVEN); + t2("1E-34", "1E-16", "-0.0000000000000000999999999999999999", 69, RoundingMode.ROUND_FLOOR); + t2("1E-29", "1E-33", "0.000000000000000000000000000009999", 83, RoundingMode.ROUND_CEIL); + t2("1E-26", "1E-27", "0.000000000000000000000000009", 39, RoundingMode.ROUND_HALF_UP); + t2("1E-36", "1E-23", "-0.000000000000000000000009999999999999", 64, RoundingMode.ROUND_UP); + t2("1E-35", "1E-28", "-0.00000000000000000000000000009999999", 49, RoundingMode.ROUND_UP); + t2("1E-11", "1E-29", "0.00000000000999999999999999999", 24, RoundingMode.ROUND_HALF_DOWN); + t2("1E-16", "1E-39", "0.00000000000000009999999999999999999", 19, RoundingMode.ROUND_DOWN); + t2("1E-36", "1E-21", "-0.000000000000000000000999999999999999", 27, RoundingMode.ROUND_HALF_UP); + t2("1E-8", "1E-34", "0.0000000099999999999999999999999999", 52, RoundingMode.ROUND_UP); + t2("1E-39", "1E-18", "-0.000000000000000000999999999999999999999", 79, RoundingMode.ROUND_HALF_DOWN); + t2("1E-23", "1E-36", "0.00000000000000000000001", 3, RoundingMode.ROUND_HALF_EVEN); + t2("1E-29", "1E-15", "-0.00000000000000099999999999999", 22, RoundingMode.ROUND_FLOOR); + t2("0.01", "1E-17", "0.00999999999999999", 37, RoundingMode.ROUND_CEIL); + t2("1E-33", "0.0001", "-0.000099999999999999999999999999999", 43, RoundingMode.ROUND_HALF_DOWN); + t2("1E-33", "1E-32", "-0.000000000000000000000000000000009", 8, RoundingMode.ROUND_CEIL); + t2("1E-31", "1E-20", "-0.0000000000000000000099999999999", 35, RoundingMode.ROUND_HALF_UP); + t2("1E-12", "1E-19", "0.0000000000009999999", 79, RoundingMode.ROUND_UP); + t2("0.000001", "1E-37", "0.00000099999999999999999", 17, RoundingMode.ROUND_FLOOR); + t2("1E-13", "1E-40", "0.0000000000000999999999999999999999999999", 82, RoundingMode.ROUND_HALF_EVEN); + t2("1E-24", "1E-36", "0.000000000000000000000000999999999999", 25, RoundingMode.ROUND_DOWN); + t2("1E-10", "1E-39", "0.000000000099999999999999999999999999999", 67, RoundingMode.ROUND_DOWN); + t2("1E-39", "1E-37", "-0.000000000000000000000000000000000000099", 28, RoundingMode.ROUND_FLOOR); + t2("1E-24", "1E-30", "0.00000000000000000000000099", 2, RoundingMode.ROUND_DOWN); + t2("0.01", "1E-39", "0.009999999999999999999999999999999999999", 37, RoundingMode.ROUND_FLOOR); + t2("0.001", "1E-23", "0.001", 15, RoundingMode.ROUND_HALF_UP); + t2("1E-23", "1E-37", "0.0000000000000000000000099999999999999", 55, RoundingMode.ROUND_DOWN); + t2("1E-10", "1E-21", "0.000000000099999999999", 60, RoundingMode.ROUND_CEIL); + t2("1E-15", "1E-25", "0.0000000000000009999999999", 82, RoundingMode.ROUND_UP); + t2("1E-35", "1E-21", "-0.00000000000000000000099999999999999", 90, RoundingMode.ROUND_FLOOR); + t2("1E-8", "0.00001", "-0.00000999", 82, RoundingMode.ROUND_HALF_EVEN); + t2("1E-8", "1E-17", "0.00000000999999999", 39, RoundingMode.ROUND_CEIL); + t2("1E-38", "0.1", "-0.09999999999999999999999999999999999999", 58, RoundingMode.ROUND_CEIL); + t2("0.0001", "1E-28", "0.0001", 10, RoundingMode.ROUND_HALF_EVEN); + t2("0.1", "1E-39", "0.099999999999999999999999999999999999999", 90, RoundingMode.ROUND_CEIL); + t2("1E-18", "1E-34", "0.0000000000000000009999999999999999", 16, RoundingMode.ROUND_FLOOR); + t2("1E-8", "1E-33", "0.000000009999999999999999999999999", 31, RoundingMode.ROUND_UP); + t2("1E-27", "1E-39", "0.000000000000000000000000000999999999999", 27, RoundingMode.ROUND_DOWN); + t2("1E-24", "1E-8", "-0.000000009999999999999999", 45, RoundingMode.ROUND_HALF_DOWN); + t2("0.00001", "1E-27", "0.000009999999999999999999999", 28, RoundingMode.ROUND_FLOOR); + t2("1E-21", "0.01", "-0.009999999999999999999", 52, RoundingMode.ROUND_CEIL); + t2("1E-33", "1E-9", "-0.000000001", 13, RoundingMode.ROUND_FLOOR); + t2("1E-14", "1E-9", "-0.00000000099999", 60, RoundingMode.ROUND_FLOOR); + t2("1E-28", "1E-27", "-0.0000000000000000000000000009", 86, RoundingMode.ROUND_DOWN); + t2("1E-33", "1E-33", "-0", 21, RoundingMode.ROUND_FLOOR); + t2("1E-13", "1E-26", "0.00000000000009999999999999", 66, RoundingMode.ROUND_HALF_UP); + t2("1E-16", "1E-20", "0.00000000000000009999", 10, RoundingMode.ROUND_FLOOR); + t2("1E-8", "1E-40", "0.0000000099999999999999999999999999999999", 80, RoundingMode.ROUND_CEIL); + t2("1E-25", "1E-8", "-0.0000000099999999999999999", 53, RoundingMode.ROUND_CEIL); + t2("1E-22", "1E-21", "-0.0000000000000000000009", 79, RoundingMode.ROUND_HALF_DOWN); + t2("0.000001", "1E-40", "0.0000009999999999999999999999999999999999", 94, RoundingMode.ROUND_FLOOR); + t2("1E-10", "1E-33", "0.000000000099999999999999999999999", 55, RoundingMode.ROUND_HALF_UP); + t2("1E-37", "1E-12", "-0.0000000000009999999999999999999999999", 52, RoundingMode.ROUND_HALF_UP); + t2("1E-39", "0.01", "-0.009999999999999999999999999999999999999", 55, RoundingMode.ROUND_CEIL); + t2("1E-16", "0.0001", "-0.0000999999999999", 91, RoundingMode.ROUND_HALF_DOWN); + t2("1E-13", "1E-34", "0.0000000000000999999999999999999999", 22, RoundingMode.ROUND_CEIL); + t2("0.0001", "0.1", "-0.0999", 16, RoundingMode.ROUND_HALF_UP); + t2("0.000001", "1E-16", "0.0000009999999999", 35, RoundingMode.ROUND_DOWN); + t2("1E-8", "1E-19", "0.0000000099999999999", 24, RoundingMode.ROUND_HALF_EVEN); + t2("1E-17", "1E-7", "-0.00000009999999999", 58, RoundingMode.ROUND_HALF_UP); + t2("0.1", "0.000001", "0.099999", 53, RoundingMode.ROUND_UP); + t2("1E-39", "0.1", "-0.099999999999999999999999999999999999999", 38, RoundingMode.ROUND_HALF_EVEN); + t2("1E-7", "1E-22", "0.0000001", 12, RoundingMode.ROUND_CEIL); + t2("1E-28", "1E-12", "-0.0000000000009999999999999999", 40, RoundingMode.ROUND_UP); + t2("1E-20", "1E-28", "0.00000000000000000001", 5, RoundingMode.ROUND_HALF_UP); + t2("0.1", "1E-31", "0.0999999999999999999999999999999", 75, RoundingMode.ROUND_CEIL); + t2("0.0001", "0.01", "-0.0099", 36, RoundingMode.ROUND_CEIL); + t2("1E-15", "1E-8", "-0.000000009999999", 77, RoundingMode.ROUND_UP); + t2("1E-30", "1E-13", "-0.000000000000099999999999999999", 45, RoundingMode.ROUND_HALF_UP); + t2("1E-26", "0.00001", "-0.00000999999999999999999999", 53, RoundingMode.ROUND_HALF_DOWN); + t2("1E-20", "1E-9", "-0.00000000099999999999", 37, RoundingMode.ROUND_HALF_EVEN); + t2("1E-34", "0.1", "-0.1", 18, RoundingMode.ROUND_HALF_UP); + t2("1E-8", "1E-17", "0.00000000999999999", 46, RoundingMode.ROUND_FLOOR); + t2("1E-11", "1E-12", "0.000000000009", 15, RoundingMode.ROUND_HALF_UP); + t2("1E-25", "0.0001", "-0.0000999999999999999999999", 54, RoundingMode.ROUND_DOWN); + t2("1E-12", "0.00001", "-0.000009999999", 50, RoundingMode.ROUND_DOWN); + t2("0.001", "0.0001", "0.0009", 9, RoundingMode.ROUND_HALF_DOWN); + t2("0.1", "1E-23", "0.0999999999", 9, RoundingMode.ROUND_DOWN); + t2("1E-30", "1E-29", "-0.000000000000000000000000000009", 5, RoundingMode.ROUND_UP); + t2("1E-25", "1E-11", "-0.0000000000099999999999999", 73, RoundingMode.ROUND_CEIL); + t2("1E-29", "1E-7", "-0.00000009999999999999999999999", 25, RoundingMode.ROUND_HALF_UP); + t2("1E-35", "0.00001", "-0.00000999999999999999999999999999999", 73, RoundingMode.ROUND_UP); + t2("1E-25", "1E-29", "0.00000000000000000000000009999", 35, RoundingMode.ROUND_CEIL); + t2("0.01", "1E-10", "0.0099999999", 52, RoundingMode.ROUND_DOWN); + t2("1E-35", "1E-33", "-0.00000000000000000000000000000000099", 53, RoundingMode.ROUND_HALF_DOWN); + t2("1E-24", "0.1", "-0.099999999999999999999999", 29, RoundingMode.ROUND_HALF_DOWN); + t2("1E-34", "0.01", "-0.0099", 2, RoundingMode.ROUND_CEIL); + t2("0.1", "1E-12", "0.09999", 4, RoundingMode.ROUND_DOWN); + t2("1E-26", "1E-37", "0.0000000000000000000000000099999999999", 70, RoundingMode.ROUND_DOWN); + t2("1E-23", "1E-14", "-0.00000000000000999999999", 56, RoundingMode.ROUND_DOWN); + t2("0.00001", "1E-17", "0.00000999999999999", 42, RoundingMode.ROUND_HALF_UP); + t2("1E-40", "1E-38", "-0.0000000000000000000000000000000000000099", 30, RoundingMode.ROUND_HALF_UP); + t2("0.1", "1E-38", "0.09999999999999999999999999999999999999", 82, RoundingMode.ROUND_FLOOR); + t2("1E-18", "0.1", "-0.099999999999999999", 29, RoundingMode.ROUND_UP); + t2("1E-13", "0.1", "-0.0999999999999", 20, RoundingMode.ROUND_HALF_EVEN); + t2("1E-21", "1E-27", "0.000000000000000000000999999", 53, RoundingMode.ROUND_HALF_EVEN); + t2("1E-29", "1E-23", "-0.00000000000000000000000999999", 41, RoundingMode.ROUND_HALF_DOWN); + t2("1E-26", "1E-20", "-0.00000000000000000000999999", 33, RoundingMode.ROUND_CEIL); + t2("1E-7", "1E-15", "0.0000001", 4, RoundingMode.ROUND_HALF_EVEN); + t2("0.01", "1E-20", "0.00999999999999999999", 88, RoundingMode.ROUND_HALF_DOWN); + t2("1E-24", "1E-26", "0.00000000000000000000000099", 67, RoundingMode.ROUND_FLOOR); + t2("1E-20", "0.1", "-0.09999999999999999999", 63, RoundingMode.ROUND_HALF_DOWN); + t2("1E-24", "0.01", "-0.009999999999999999999999", 29, RoundingMode.ROUND_CEIL); + t2("0.001", "1E-37", "0.0009999999999999999999999999999999999", 92, RoundingMode.ROUND_FLOOR); + t2("1E-21", "0.0001", "-0.000099999999999999999", 39, RoundingMode.ROUND_DOWN); + t2("0.000001", "0.00001", "-0.000009", 35, RoundingMode.ROUND_HALF_EVEN); + t2("1E-15", "1E-34", "0.0000000000000009999999999999999999", 26, RoundingMode.ROUND_HALF_UP); + t2("1E-14", "1E-13", "-0.00000000000009", 63, RoundingMode.ROUND_HALF_DOWN); + t2("1E-27", "1E-25", "-0.000000000000000000000000099", 98, RoundingMode.ROUND_HALF_UP); + t2("1E-19", "1E-32", "0.00000000000000000009999999999999", 61, RoundingMode.ROUND_HALF_EVEN); + t2("1E-22", "1E-15", "-0.0000000000000009999999", 53, RoundingMode.ROUND_FLOOR); + t2("1E-40", "1E-30", "-0.0000000000000000000000000000009999999999", 80, RoundingMode.ROUND_HALF_UP); + t2("1E-10", "0.1", "-0.0999999999", 26, RoundingMode.ROUND_DOWN); + t2("1E-31", "1E-33", "0.000000000000000000000000000000099", 38, RoundingMode.ROUND_HALF_DOWN); + t2("1E-8", "1E-27", "0.000000009999999999999999999", 95, RoundingMode.ROUND_HALF_UP); + t2("1E-28", "1E-31", "0.0000000000000000000000000000999", 30, RoundingMode.ROUND_HALF_EVEN); + t2("1E-35", "1E-9", "-0.000000001", 21, RoundingMode.ROUND_HALF_UP); + t2("1E-17", "0.01", "-0.00999999999999999", 20, RoundingMode.ROUND_DOWN); + t2("1E-22", "1E-24", "0.000000000000000000000099", 51, RoundingMode.ROUND_CEIL); + t2("0.000001", "1E-10", "0.0000009999", 96, RoundingMode.ROUND_CEIL); + t2("1E-26", "1E-21", "-0.00000000000000000000099999", 85, RoundingMode.ROUND_DOWN); + t2("1E-27", "1E-31", "0.0000000000000000000000000009999", 52, RoundingMode.ROUND_HALF_DOWN); + t2("1E-12", "1E-19", "0.0000000000009999999", 78, RoundingMode.ROUND_FLOOR); + t2("0.000001", "1E-17", "0.00000099999999999", 47, RoundingMode.ROUND_UP); + t2("0.01", "1E-11", "0.00999999999", 57, RoundingMode.ROUND_HALF_DOWN); + t2("1E-30", "1E-30", "0", 19, RoundingMode.ROUND_CEIL); + t2("0.000001", "1E-33", "0.000000999999999999999999999999999", 90, RoundingMode.ROUND_DOWN); + t2("1E-34", "1E-27", "-0.0000000000000000000000000009999999", 56, RoundingMode.ROUND_CEIL); + t2("0.000001", "1E-14", "0.00000099999999", 80, RoundingMode.ROUND_UP); + t2("1E-26", "0.0001", "-0.00009999999999999999999999", 41, RoundingMode.ROUND_CEIL); + t2("1E-16", "0.001", "-0.0009999999999999", 33, RoundingMode.ROUND_FLOOR); + t2("1E-35", "1E-12", "-0.00000000000099999999999999999999999", 89, RoundingMode.ROUND_HALF_UP); + t2("1E-26", "1E-25", "-0.00000000000000000000000009", 85, RoundingMode.ROUND_CEIL); + t2("1E-29", "1E-17", "-0.00000000000000000999999999999", 15, RoundingMode.ROUND_HALF_DOWN); + t2("1E-27", "0.1", "-0.099999999999999999999999999", 84, RoundingMode.ROUND_DOWN); + t2("1E-27", "0.0001", "-0.000099999999999999999999999", 54, RoundingMode.ROUND_HALF_DOWN); + t2("1E-31", "1E-7", "-0.0000000999999999999999999999999", 75, RoundingMode.ROUND_HALF_UP); + t2("0.000001", "1E-22", "0.000001", 11, RoundingMode.ROUND_HALF_DOWN); + t2("1E-19", "1E-20", "0.00000000000000000009", 24, RoundingMode.ROUND_FLOOR); + t2("0.00001", "1E-35", "0.00000999999999999999999999999999999", 95, RoundingMode.ROUND_UP); + t2("1E-37", "1E-28", "-0.0000000000000000000000000000999999999", 31, RoundingMode.ROUND_CEIL); + t2("1E-28", "1E-10", "-0.0000000000999999999999999999", 74, RoundingMode.ROUND_FLOOR); + t2("1E-21", "1E-18", "-0.000000000000000000999", 88, RoundingMode.ROUND_DOWN); + t2("1E-40", "1E-30", "-0.0000000000000000000000000000009999999999", 23, RoundingMode.ROUND_HALF_DOWN); + t2("1E-10", "1E-14", "0.00000000009999", 99, RoundingMode.ROUND_CEIL); + t2("1E-9", "1E-22", "0.0000000009999999999999", 51, RoundingMode.ROUND_HALF_DOWN); + t2("1E-16", "1E-16", "0", 56, RoundingMode.ROUND_DOWN); + t2("1E-20", "0.1", "-0.09999999999999999999", 19, RoundingMode.ROUND_FLOOR); + t2("1E-37", "0.000001", "-0.0000009999999999999999999999999999999", 33, RoundingMode.ROUND_DOWN); + t2("1E-16", "1E-16", "0", 96, RoundingMode.ROUND_CEIL); + t2("1E-27", "0.00001", "-0.000009999999999999999999999", 93, RoundingMode.ROUND_CEIL); + t2("1E-17", "1E-22", "0.0000000000000000099999", 38, RoundingMode.ROUND_HALF_UP); + t2("1E-26", "1E-10", "-0.00000000009999999999999999", 56, RoundingMode.ROUND_UP); + t2("1E-40", "1E-11", "-0.0000000000099999999999999999999999999999", 75, RoundingMode.ROUND_CEIL); + t2("1E-8", "1E-10", "0.0000000099", 42, RoundingMode.ROUND_HALF_DOWN); + t2("1E-36", "1E-16", "-0.000000000000000099999999999999999999", 90, RoundingMode.ROUND_UP); + t2("1E-20", "1E-22", "0.0000000000000000000099", 51, RoundingMode.ROUND_DOWN); + t2("1E-25", "1E-26", "0.00000000000000000000000009", 16, RoundingMode.ROUND_CEIL); + t2("1E-36", "1E-40", "0.0000000000000000000000000000000000009999", 17, RoundingMode.ROUND_FLOOR); + t2("1E-17", "1E-31", "0.00000000000000001", 8, RoundingMode.ROUND_UP); + t2("1E-32", "1E-19", "-0.00000000000000000009999999999999", 51, RoundingMode.ROUND_HALF_UP); + t2("1E-30", "0.000001", "-0.000000999999999999999999999999", 92, RoundingMode.ROUND_HALF_DOWN); + t2("1E-17", "0.01", "-0.00999999999999999", 37, RoundingMode.ROUND_FLOOR); + t2("1E-16", "1E-30", "0.000000000000000099999999999999", 20, RoundingMode.ROUND_DOWN); + t2("1E-10", "1E-32", "0.00000000009999999999999999999999", 84, RoundingMode.ROUND_UP); + t2("1E-12", "1E-17", "0.00000000000099999", 37, RoundingMode.ROUND_HALF_EVEN); + t2("1E-22", "1E-10", "-0.0000000000999999999999", 87, RoundingMode.ROUND_DOWN); + t2("1E-9", "1E-11", "0.00000000099", 4, RoundingMode.ROUND_UP); + t2("1E-16", "1E-26", "0.00000000000000009999999999", 13, RoundingMode.ROUND_UP); + t2("1E-37", "0.001", "-0.001", 32, RoundingMode.ROUND_HALF_DOWN); + t2("1E-16", "1E-24", "0.000000000000000099999999", 17, RoundingMode.ROUND_CEIL); + t2("1E-7", "1E-27", "0.000000099999999999999999999", 29, RoundingMode.ROUND_FLOOR); + t2("1E-25", "1E-26", "0.00000000000000000000000009", 24, RoundingMode.ROUND_HALF_UP); + t2("1E-11", "1E-20", "0.00000000000999999999", 47, RoundingMode.ROUND_DOWN); + t2("0.1", "1E-24", "0.099999999999999999999999", 46, RoundingMode.ROUND_DOWN); + t2("1E-17", "1E-16", "-0.00000000000000009", 27, RoundingMode.ROUND_HALF_DOWN); + t2("1E-27", "1E-13", "-0.000000000000099999999999999", 42, RoundingMode.ROUND_UP); + t2("1E-25", "0.001", "-0.0009999999999999999999999", 42, RoundingMode.ROUND_DOWN); + t2("0.01", "1E-35", "0.00999999999999999999999999999999999", 86, RoundingMode.ROUND_FLOOR); + t2("1E-35", "1E-24", "-0.000000000000000000000001", 5, RoundingMode.ROUND_UP); + t2("1E-15", "1E-14", "-0.000000000000009", 62, RoundingMode.ROUND_HALF_EVEN); + t2("1E-28", "1E-10", "-0.0000000000999999999999999999", 91, RoundingMode.ROUND_FLOOR); + t2("1E-37", "1E-35", "-0.0000000000000000000000000000000000099", 67, RoundingMode.ROUND_UP); + t2("1E-7", "1E-35", "0.00000009999999999999999999999999999", 80, RoundingMode.ROUND_CEIL); + t2("1E-35", "1E-20", "-0.00000000000000000000999999999999999", 84, RoundingMode.ROUND_HALF_UP); + t2("1E-24", "1E-27", "0.000000000000000000000000999", 88, RoundingMode.ROUND_CEIL); + t2("1E-21", "1E-11", "-0.000000000009999999999", 33, RoundingMode.ROUND_UP); + t2("1E-15", "1E-37", "0.00000000000000099999999999", 11, RoundingMode.ROUND_DOWN); + t2("1E-14", "1E-34", "0.0000000000000099999999999999999999", 35, RoundingMode.ROUND_UP); + t2("1E-8", "1E-34", "0.00000001", 12, RoundingMode.ROUND_HALF_DOWN); + t2("1E-17", "1E-19", "0.0000000000000000099", 52, RoundingMode.ROUND_CEIL); + t2("1E-33", "1E-33", "0", 100, RoundingMode.ROUND_HALF_UP); + t2("0.0001", "0.00001", "0.00009", 55, RoundingMode.ROUND_HALF_DOWN); + t2("1E-8", "1E-32", "0.00000000999999999999999999999999", 83, RoundingMode.ROUND_UP); + t2("1E-7", "1E-33", "0.000000099999999999999999999999999", 26, RoundingMode.ROUND_UP); + t2("1E-35", "1E-10", "-0.00000000009999999999999999999999999", 87, RoundingMode.ROUND_HALF_UP); + t2("1E-35", "1E-28", "-0.00000000000000000000000000009999999", 58, RoundingMode.ROUND_HALF_UP); + t2("0.01", "1E-26", "0.00999999999999999999999999", 83, RoundingMode.ROUND_FLOOR); + t2("1E-28", "1E-26", "-0.0000000000000000000000000099", 35, RoundingMode.ROUND_CEIL); + t2("1E-14", "1E-38", "0.00000000000000999999999999999999999999", 54, RoundingMode.ROUND_FLOOR); + t2("1E-16", "1E-24", "0.000000000000000099999999", 11, RoundingMode.ROUND_HALF_UP); + t2("1E-25", "1E-21", "-0.0000000000000000000009999", 11, RoundingMode.ROUND_HALF_DOWN); + t2("1E-9", "1E-9", "0", 48, RoundingMode.ROUND_HALF_UP); + t2("1E-10", "1E-31", "0.0000000000999999999999999999999", 46, RoundingMode.ROUND_HALF_DOWN); + t2("1E-22", "0.001", "-0.0009999999999999999999", 81, RoundingMode.ROUND_DOWN); + t2("1E-17", "1E-22", "0.0000000000000000099999", 75, RoundingMode.ROUND_FLOOR); + t2("0.0001", "1E-22", "0.0000999999999999999999", 43, RoundingMode.ROUND_HALF_DOWN); + t2("1E-10", "1E-40", "0.0000000000999999999999999999999999999999", 35, RoundingMode.ROUND_FLOOR); + t2("1E-24", "1E-12", "-0.000000000000999999999999", 20, RoundingMode.ROUND_DOWN); + t2("1E-40", "1E-33", "-0.0000000000000000000000000000000009999999", 78, RoundingMode.ROUND_HALF_DOWN); + t2("1E-39", "1E-23", "-0.00000000000000000000001", 1, RoundingMode.ROUND_HALF_EVEN); + t2("0.1", "0.01", "0.09", 38, RoundingMode.ROUND_HALF_DOWN); + t2("1E-29", "0.0001", "-0.00009999999999999999999999999", 49, RoundingMode.ROUND_HALF_EVEN); + t2("1E-17", "1E-28", "0.0000000000000000099999999999", 100, RoundingMode.ROUND_CEIL); + t2("1E-27", "1E-23", "-0.000000000000000000000009999", 94, RoundingMode.ROUND_HALF_DOWN); + t2("1E-12", "1E-17", "0.00000000000099999", 42, RoundingMode.ROUND_HALF_EVEN); + t2("1E-12", "1E-33", "0.000000000000999999999999999999999", 33, RoundingMode.ROUND_CEIL); + + t2("0.9999999999999999999876881224", "640033848998621900.19735", "-640033848998621899.1973500000000000000123118776", 49, RoundingMode.ROUND_CEIL); + t2("1.000000000000000000000000119823914072125503157964", "3062705906358982193618.98485068689066024569704943195219", "-3062705906358982193617.984850686890660245697049312128275927874496842036", 94, RoundingMode.ROUND_HALF_EVEN); + t2("0.9999999999999998265534546200191793251275036241640334423212917258444307775885354012967962729546", "258319.60193860385931337782", "-258318.60193860385931355126654537998082067487249637583596655767870827415556922241146459870320372705", 98, RoundingMode.ROUND_HALF_UP); + t2("0.99999999999999999989761950386191857639251221379227189329555371776218724908031098142396778431218707", "726355355995140387099932991211229400.158448248205932318709", "-726355355995140387099932991211229399.1584482482059323188113804961380814236074877862077281067044463", 97, RoundingMode.ROUND_HALF_DOWN); + t2("1.000000000000000000000000000000000000027702350484831926292132972134993320024115135851747430016246", "79385320209954140084685835.28094025821251260106069305881382567515", "-79385320209954000000000000", 14, RoundingMode.ROUND_HALF_UP); + t2("0.99998712469413", "794547422607164224869232243086324.8360594446035869419718131828058", "-794547422607164224869232243086323.836072319909456942", 52, RoundingMode.ROUND_FLOOR); + t2("0.9999999999998534962024501557924401736482182589661527", "5698985430281057199751490373953345194.59621391632", "-5698985430281057199751490373953345193.596213916320146503797549844207559826351781741", 82, RoundingMode.ROUND_CEIL); + t2("0.9999999999999999999999985533840413028010928652936714305576280330060940667532288645", "78657501050716794990357190861.70489425564556943595076975008", "-78657501050716794990357190000", 25, RoundingMode.ROUND_HALF_DOWN); + t2("0.9999999961220652049373184", "914035313573641721959451176671.848582838348529711402806", "-914035314000000000000000000000", 9, RoundingMode.ROUND_HALF_DOWN); + t2("1.11874482", "48840191373078238086640881533698465.717620778949", "-48840191373100000000000000000000000", 12, RoundingMode.ROUND_HALF_DOWN); + t2("0.281969520841", "525591380542776020976261376042231280.99050263561330377859863953", "-525591380542776020976261376042231280.70853311477230377859863953", 97, RoundingMode.ROUND_HALF_EVEN); + t2("0.9999999999999959369334762196188619130301649399733281630919124260101076514635673054327688686405515", "6892460359743232550483058284.326802388", "-6892460359743232550483058283.326802388000004063067", 49, RoundingMode.ROUND_FLOOR); + t2("1.000000000000000000000000138365204598651999681848", "4.585694782001886784351261812739727", "-3.585694782001886784351261674374522401348000318152", 93, RoundingMode.ROUND_HALF_UP); + t2("1.00000000000000000001348089658161552137212593704802977308725958902187035801449881713928406671", "2599076526329799757363350602243099450.6957978861778433554878885203926487289", "-2599076526329800000000000000000000000", 14, RoundingMode.ROUND_HALF_DOWN); + t2("1.0000000000000", "66366654979619144184658698072192.357935388883183470438181288188381307278", "-66366650000000000000000000000000", 7, RoundingMode.ROUND_HALF_DOWN); + t2("1.000000", "18105728986041761640887595533283120477.2742082541073753474", "-18100000000000000000000000000000000000", 4, RoundingMode.ROUND_DOWN); + t2("0.9999", "560937701245564854434830710385849233.169675002587006894673914472266909", "-560937701245564854434830710385849232.169775002587006894673914472266909", 79, RoundingMode.ROUND_CEIL); + t2("0.9999998719213481023531897427716397778263888401893910733910220314504983682315253", "38792839790712300540097766016170179.72942773540650288197576877282", "-38792839790712300540097766016170178.72942786348515477", 52, RoundingMode.ROUND_CEIL); + t2("1.000000000000000000000000000000011337132819044149107", "97753977764753722505638575181479019.579624307127638397405681", "-97753977764753722505638575181479018.579624307127638397405681", 60, RoundingMode.ROUND_HALF_UP); + t2("1.01261395071914172725658272307075493652694434213346101402984", "1049710327243884264.3689519321", "-1049710327243884263.35633798138085827274341727692924506347305565786653898597016", 95, RoundingMode.ROUND_HALF_EVEN); + t2("0.99999999998635625720009473958665342273155724466867056964747162778310004832306258429717336387169", "12.1520940727652904005353452973720184", "-11.1520940727789341433352505577853649772684427553313294303525283722168999516769374157", 84, RoundingMode.ROUND_CEIL); + t2("0.999999999999999999999999999999999524622195377650474620654559769514364455807304047052", "7002515.6669052486740556972355374422866181829657", "-7002514.6669052486740556972355374", 32, RoundingMode.ROUND_HALF_DOWN); + t2("0.99999998878183120416824285037203", "38327.8407", "-38326.8407000112181687958317", 27, RoundingMode.ROUND_DOWN); + t2("0.999999999999999999999999999", "2.9094462300972", "-1.909446230097200000000000001", 55, RoundingMode.ROUND_HALF_UP); + t2("0.9999999999999999999999999996779494408046302584202610482", "530770914537012205776892173.865394333047000705228144653463710904", "-530770914537012205776892172.8653943330470007052281446537857614631953697415797389518", 92, RoundingMode.ROUND_DOWN); + t2("1.0000000000000000000000000000000000000211924266373601875662343025201383719314762448306414697", "33086682481347.6314289196308731545826716", "-33086682481346.63142891963087315458267159999999999997880757336264", 64, RoundingMode.ROUND_HALF_EVEN); + t2("0.9999999999999999999999999999999999999995086077216389080791500865", "43010632125906095550264.572650474808124", "-43010632125906095550263.572650474808124", 51, RoundingMode.ROUND_HALF_UP); + t2("0.999999999999999999999999999999392910865226086344321", "4584324554085375538027273692534240749302.742306700543168212764946899734664", "-4584324554085375538027273692534240749301.742306700543168212764946899735271089134773913655679", 91, RoundingMode.ROUND_FLOOR); + t2("0.9999999999999999999999999999999999999921018515820697887426805224100947352172147724109795779", "830076114723591620059141676694501404709.4930298672", "-830076114723591620059141676694501404708.4930298672", 70, RoundingMode.ROUND_HALF_UP); + t2("1.000154688825648481267644205561160017273389804317525860318979525925354", "5590.1166644928260", "-5589.1165098040003515187323557944388", 35, RoundingMode.ROUND_DOWN); + t2("0.99999999999006027143696724994249662", "88359515632902648.759516639917666812111537547", "-88359515632902600", 15, RoundingMode.ROUND_DOWN); + t2("1.00000000000000", "95.33659318661235", "-94.33659318661235", 70, RoundingMode.ROUND_HALF_UP); + t2("0.9999999999999999999775634801237813332795738416510297362767757177787528", "10739394560873313157162707656670.252363942865247660125793434721595385", "-10739394560873313157163000000000", 23, RoundingMode.ROUND_HALF_EVEN); + t2("0.99999998955431286156626", "4902.7915368894281469434", "-4901.79153689987383408183374", 80, RoundingMode.ROUND_CEIL); + t2("0.99999999999999898259041082937473685908796752941185241324258874667581114315116781", "5517546011621870332399416576575.811785782758678907878062576", "-5517546011621870332399416576574.81178578275867992528765174662526314091203247058814758675741126", 93, RoundingMode.ROUND_UP); + t2("1.13135445288218095176064019413277569648722343676398316921046471781497209018036761926374980678", "3619072849985061077293.9012666679115988775", "-3619072849985061077292.76991222", 30, RoundingMode.ROUND_HALF_UP); + t2("0.999964371653162345075430201881", "168105725527169314379065790662916050221.475269915782886990770332731552414180376", "-168105725527169314379066000000000000000", 24, RoundingMode.ROUND_HALF_DOWN); + t2("0.999999999998343581666045", "21225778421730442449952304083.507476189532490354504704824693390193", "-21225778422000000000000000000", 11, RoundingMode.ROUND_HALF_UP); + t2("1.0000000000", "53.0721765572571058497526522442", "-52.0721765572571058497526522442", 68, RoundingMode.ROUND_DOWN); + t2("1.0000000000000000010868737982065976552678875918917937663867883830744", "72274249298653961307161266.2429171261996071156986500328106121752", "-72274249298653961307161265.2429171261996071146117762346040145199321124081082062336132116", 87, RoundingMode.ROUND_DOWN); + t2("1.00000000000000000000000000000000001026071005118758019147403591153361193415866494922695", "145.57075488191632841598918", "-144.57075", 8, RoundingMode.ROUND_HALF_UP); + t2("1.0000000", "526650518510726171000913231536479079.037380846608", "-526650518510726171000913231536479078.037380846608", 75, RoundingMode.ROUND_FLOOR); + t2("0.999999999999999999999999999999999999997106197957371323499604358266134753009", "3584419408840321948825.676382768", "-3584419408840321948824.6763827680000000000000000000000000000028938020426286765003956", 83, RoundingMode.ROUND_CEIL); + t2("0.99999999880681185203794773690375608443466417194000936368334849553283470358861975018", "5.0975685392156383162823410521", "-4.0975685404088264642443933152", 30, RoundingMode.ROUND_FLOOR); + t2("0.999999998177929451382948935869", "10103621840183015475172718.257", "-10103621840183015475172717.257000001822070548617051064131", 70, RoundingMode.ROUND_HALF_UP); + t2("1.000000000000000000000000000000000000000144374259221118949564393862079", "99403923311484468697407136499693668.59308470138007980955", "-99403923311484468697407136499693667.5930847013800798095499999999999999999998556257407788811", 90, RoundingMode.ROUND_HALF_DOWN); + t2("0.999999975691341207638223751903870453583011108741353767405960466759765078360050260758989020", "4.6084648305890876715", "-3.60846485489774646386177624809612954641698889125864623259403", 60, RoundingMode.ROUND_CEIL); + t2("0.999999999999999999895045963233918813836521284190202155769449", "429720283413999973159.756715979", "-429720283413999973158.756715979000000000104954036766081186163478715809797", 72, RoundingMode.ROUND_CEIL); + t2("0.999999999999999999998773564582848665317660249642891385732648080962811751", "59990316469528.036171429611687", "-59990316469527.036171429611687000001226435417151334682339750357108614267351919037188249", 100, RoundingMode.ROUND_CEIL); + t2("1.000011075533608457976204143394074562732956861700803109887313366700147999338062991286462275342326012", "2792362408227880809678840930573.860305000", "-2792362408227880809678840930572.8602939244663915420237958566059254372670431382991968901126866333", 97, RoundingMode.ROUND_HALF_EVEN); + t2("1.000000000000000000000000000000000000015973553865744063022762207811071071600821959910304633272757", "1809301547973844603902311.5654087887338690", "-1809301547973844603902310.56540878873386899999999999999999999998402644613425593697723779218893", 93, RoundingMode.ROUND_FLOOR); + t2("0.999999999999999999999999999999999999893329386351827298183253105991893674068332982263468835259", "2757167858879.682885", "-2757167858878.6828850000000000000000000000000000001066706136481727018167468940081063259317", 89, RoundingMode.ROUND_HALF_UP); + t2("1.0000000000000000000000000000111360158322886005852576303546314011852429419271247", "93939314.46578658799426616", "-93939313.46578658799426615999999999998886398416771139941474236964536859881475705807", 82, RoundingMode.ROUND_CEIL); + t2("0.9999999999999999999998770154790480869633545879631257941833370190599047521999789229", "199829413575720837193657766.733709709179385212202071225", "-199829413575720837193657765.734", 30, RoundingMode.ROUND_HALF_DOWN); + t2("0.999999999999999999999999998135", "554606063.013454693418100772398897875014035248", "-554606062.01346", 14, RoundingMode.ROUND_UP); + t2("0.98773519715148", "2549541405629529059884688169455754452231.105907313888980241014461140", "-2549541405629529059884688169455754452230.11817211673750024101446114", 74, RoundingMode.ROUND_HALF_EVEN); + t2("0.99999999999999999999999999999999999999988230202698086139860756333417913240", "690065016931922.4085310572334", "-690065016931921", 15, RoundingMode.ROUND_HALF_UP); + t2("1.00000000000000", "1289887282480591855765.347633806181", "-1289887282480591855764.347633806181", 51, RoundingMode.ROUND_UP); + t2("0.999999999999999999999999999995658364099102648491089", "414085174968159470504048.51", "-414085174968159470504047.510000000000000000000000001", 51, RoundingMode.ROUND_FLOOR); + t2("0.999999999999999295252487060650057351383150516174879", "6306669915887513524394303183172309.934564178035290474234779480", "-6306669915887513524394303183172308.934564178035291178982292419349942648616849483825121", 99, RoundingMode.ROUND_HALF_UP); + t2("1.00000000000000000000081253348145920781026085647520801897170982656182514222627649830571537940570097", "34180955261225283278.9546214472426960215969277072", "-34180955261225283277.954621447242696021596115173718540792189739143524791981028290173438174857773723", 98, RoundingMode.ROUND_DOWN); + t2("0.99999999999999999999999856479373626889523595783214491795216121174762099354921379755267504653649134", "8233795130549636376322.3369072392151862574878", "-8233800000000000000000", 5, RoundingMode.ROUND_UP); + t2("1.0001", "1607764700164263.45772807689415459406211472014192328", "-1607764700164262.45762807689415459406211472014192328", 65, RoundingMode.ROUND_FLOOR); + t2("0.99999999999999999999999999999999999998756496998614330743704048912", "36423078435.49585469762969072900556033", "-36423078434.49585469762969072900556033000000000001243503", 56, RoundingMode.ROUND_DOWN); + t2("0.99999891041356952032727215514401427884704660602746473835", "195363860454397925.197522412317", "-195364000000000000", 6, RoundingMode.ROUND_HALF_UP); + t2("1.00000", "781339417511868985543776052995.98028599275239777987", "-781339417511868986000000000000", 18, RoundingMode.ROUND_UP); + t2("1.00000000000000001", "72.130607640926138152719501354908", "-71.130607640926138142719501354908", 74, RoundingMode.ROUND_UP); + t2("0.99999999999999999999999999999815156221279091250236161202515555239214607133", "184535429818126810905.866146730925744980274670738002788577", "-184535429818126810904.866146730925744980274670738004637014787209087497", 69, RoundingMode.ROUND_DOWN); + t2("0.999999999999999999999331856438039650339670670738698379280474551045601", "175218340352452.70507614829", "-175218340000000", 8, RoundingMode.ROUND_HALF_DOWN); + t2("1.0000000", "6626035360301835643744155055681183579.72680430492878230246147491362", "-6626035360301835643744155055681183578.7268", 41, RoundingMode.ROUND_HALF_UP); + t2("1.0000000000000000014816657759635935574232", "32818928503629136.252295990697644196564215870800902906892", "-32818928503629135.2522959906976", 30, RoundingMode.ROUND_HALF_DOWN); + t2("1.00000000000000000000000000000", "13043617905561942222230054077.21749663178357", "-13043617910000000000000000000", 10, RoundingMode.ROUND_HALF_EVEN); + t2("1.000000000", "468078670327435157159036637213089.68427", "-468078670327435157159036637213088.68427", 91, RoundingMode.ROUND_CEIL); + t2("1.000000000000000000000364962235111663114736570947300481441647272089259984421671059783280000", "91128496181.82733", "-91128496180.82733", 27, RoundingMode.ROUND_UP); + t2("1.00000000000000000000000000", "248084803156.38225825687792564146883", "-248084803155.38225825687792564146883", 45, RoundingMode.ROUND_HALF_EVEN); + t2("0.999996430603395547879085578374943218533075889", "752798095516784566364107011187.1828743644733064738998075060481075333023", "-752798095516784566364107011186.182877933869910926020721927673164314769224111", 88, RoundingMode.ROUND_FLOOR); + t2("0.9999999864688912316764271500401957202149887487506193902184177755581162789923303216472682", "434.57654697091569924806", "-433.576546984446808016383572849959804279785011251249380609781582224441883721007669678353", 87, RoundingMode.ROUND_HALF_DOWN); + t2("0.999999999999999999999999999982814515318881641819728269066787504001787393727056279440923", "83875621901513231603980702356510524090.18029474594", "-83875621901513231603980702356510524089.18029474594", 66, RoundingMode.ROUND_CEIL); + t2("1.10455706926852759636854514325898495936688404757420394401166868002", "35601365816445214252.5525881378161872928170", "-35601365816445214251.44803106854765969644845485674101504063311595242579605598833131998", 98, RoundingMode.ROUND_DOWN); + t2("1.0000000000000000000000000100777014575445669415762036017243568735466409286660372771012100670802724", "899760814583915.493920081239", "-899760814583914.49392008123899999999999999", 42, RoundingMode.ROUND_HALF_EVEN); + t2("0.984114021239868072775897442427054089380451", "5368174736.76894671250154921560010347054", "-5368174735.784832691262", 22, RoundingMode.ROUND_UP); + t2("0.9999999999380984950253", "83972321187501515671178201780968.114223326", "-83972321187501515670000000000000", 19, RoundingMode.ROUND_DOWN); + t2("0.9999999999999999999", "977684073047763681239701380533.7210843444785440991219674", "-977684073047763681239701380532.7210843445", 40, RoundingMode.ROUND_HALF_EVEN); + t2("1.000182570092457168104845853335311043776", "571449324605826766.57809543188536449255427224746102", "-571449324605826765.5779129", 25, RoundingMode.ROUND_HALF_DOWN); + t2("1.000002907816994100773837", "728233850755.2332313401141380833836258554", "-728233850754.2332284323", 23, RoundingMode.ROUND_HALF_UP); + t2("1.0000000000000000000000", "68592074796033717984633919704192.29865862981318592502795535346119", "-68592074796033720000000000000000", 16, RoundingMode.ROUND_HALF_UP); + t2("1.000000000000000", "903783422370949770321379953874545365.79210759958265665013787195048", "-903783422370949770321379953874545364.79210759958265665013787195048", 90, RoundingMode.ROUND_HALF_EVEN); + t2("0.999999999999999999999999999999999999717820449394897427433674919219243501563657735037982299", "302299275353390.8981647238924456616512453522112", "-302299275353389.8981647238924456616512453522112000002821795506", 61, RoundingMode.ROUND_HALF_UP); + t2("0.9999999999999999999999999999999999984487898167125641473658922", "3585319.7759370122633314703102", "-3585318.77593701", 15, RoundingMode.ROUND_HALF_DOWN); + t2("1.00000000000000", "203506155814552758148.37264782776486", "-203506155814552758147.37264782776486", 87, RoundingMode.ROUND_CEIL); + t2("1.00000000000000120579185273161226763034133156520200356939876275446105426421498158283412", "4739163351387537956850958064407251558.61807582", "-4739163351387537956850958064407251557.618075819999998794", 55, RoundingMode.ROUND_HALF_EVEN); + t2("1.000000000000000000143533559194819040300297231250823252", "15868546371105409745483539490.0", "-15868546371100000000000000000", 12, RoundingMode.ROUND_HALF_DOWN); + t2("1.00000000000", "54832392.01861789482959289047969611", "-54832391.0186178948295928904797", 31, RoundingMode.ROUND_HALF_UP); + t2("0.9999999999998917142347210910448", "7645882914233858938098515181269111721255.2", "-7645882914233858938098515181269111721254.2", 43, RoundingMode.ROUND_HALF_DOWN); + t2("1.000000000019026254756354259135217413250706", "2347731114172144002848808544526073254840.183", "-2347731114172144002850000000000000000000", 21, RoundingMode.ROUND_HALF_UP); + t2("1.00000000000000000000", "5823756950779433872739279788630725.76794045546", "-5823756950779433872739279788630724.76794045546", 89, RoundingMode.ROUND_FLOOR); + t2("0.99999969198488396329717135352024457590848674566799393432083784906001565273156394858272936", "454231689016.0", "-454231689015.000000308015116036702828646479755424091513254332006065679162150939984347268436051417271", 99, RoundingMode.ROUND_UP); + t2("0.999983024504112322076111878226563575778225060676062233866162469025247716629315046304590555306536650", "92208.949978", "-92207.9499949754958876779238881217734364242217749393239377661338375309747522833707", 81, RoundingMode.ROUND_FLOOR); + t2("0.999999999999999999988633888832566250132656497801403179018156138677466111241821611", "9129486452431567225984.698928988441611973802466974072821", "-9129486452431567225983.6989289884416119738139", 44, RoundingMode.ROUND_UP); + t2("0.99822719738396736525667460628136940989020697", "531550942791472583639.938880089389348", "-531550942791472583638.94065289200538063474332539371864", 53, RoundingMode.ROUND_UP); + t2("0.99629097248777667878668059904642041828035606099947021", "55813978579621.14619474187723", "-55813978579620.14990377", 22, RoundingMode.ROUND_HALF_DOWN); + t2("1.000000000000000000000", "99056936495226365315892.123168349533765718909", "-99056936495226365315891.123168349533766", 38, RoundingMode.ROUND_HALF_EVEN); + t2("0.99999999999999999999999999999998537924", "8448121780.740448713003666762457063113", "-8448121779.74044871300366676245706311300001462076", 92, RoundingMode.ROUND_HALF_DOWN); + t2("0.99999999988101657646132948979847662022351119638102579488054328360426024854964444951581938034", "26431528769156126902185.5455342185734", "-26431528769156126902184.5455342186923834235386705102015233797764888", 66, RoundingMode.ROUND_HALF_EVEN); + t2("0.999999999999999999999999999999999773647865082540886511424610602720", "94.88", "-90", 1, RoundingMode.ROUND_HALF_UP); + t2("1", "28714265844773879322429567222.0", "-28714265844773879322429567221", 51, RoundingMode.ROUND_FLOOR); + t2("1.00000000000000000000000000000002230745989026902237", "5182909643868660181.616326849296578520834", "-5182909643868660180.61632684929657852083399999999997769254010973097763", 74, RoundingMode.ROUND_DOWN); + t2("0.99999999998849524198691154110204351283244388511160071147040874333277620620", "487171785.353436844076", "-487171784.35343684408750476", 26, RoundingMode.ROUND_HALF_EVEN); + t2("0.99999999999999999995826254", "623264646061209021513606736676.4070464780349804249191774960065", "-623264646061209021513606736675.4070464780349804249609149560065", 76, RoundingMode.ROUND_HALF_UP); + t2("0.9999999999999999999999840316000599556090993211977492120887044730644124505912", "3400141293380019543581.846146", "-3400141293380019543580.84614600000000000000001596839994004439090067880225079", 75, RoundingMode.ROUND_UP); + t2("1.00000000000000000000000000000000017890501993570751536367804830406693776445", "7596063323395135740831786963557300.828122807129946719956", "-7596063323395135740831786963557299.82812280712994671995599999999999982109498006429248463", 87, RoundingMode.ROUND_DOWN); + t2("0.999999999999999999999999981830537099429946248094516383336914915456449167384292448663913", "6160.9833347271963", "-6159.98333472719630000000001", 27, RoundingMode.ROUND_UP); + t2("1.00000000000000000000000000", "140694913008020347351867336278.2604696945968", "-140694913008020347351867336277.2604696945968", 93, RoundingMode.ROUND_CEIL); + t2("1.00000000000000183062574240181614811643732437563124607364762306403722737412422201569764119662", "315468725452602772046101176967.0405677893315761072465140617", "-315468725452602772046101176966.040567789331574276620771659883851883562675624368753926352376935962", 96, RoundingMode.ROUND_CEIL); + t2("1.00000000000000020487871739872142801523484304068051994930096447885572730358527340688870270096190", "3223913266.58144343252766526385", "-3223913265.5814434325276650589712826012785719847651569593194800506990355211442727", 80, RoundingMode.ROUND_HALF_UP); + t2("0.83864421727143491142189501983147051332126197163408403622694220682570328285455003", "6177991817255640.0", "-6177991800000000", 8, RoundingMode.ROUND_HALF_UP); + t2("1.0000000", "52385.2928549712746987395557277", "-52384.2928549712746987395557277", 31, RoundingMode.ROUND_HALF_EVEN); + t2("0.9999999999999999999999969656277", "189067655662557843433650599.27270881530157259", "-189067655670000000000000000", 11, RoundingMode.ROUND_UP); + t2("1.0000000000", "80884.39846", "-80883.39846", 26, RoundingMode.ROUND_HALF_DOWN); + t2("0.99999999999999999999999620", "8104102.905199872665141004926", "-8104101.905199872666", 19, RoundingMode.ROUND_FLOOR); + t2("0.9999999999999999999", "83532645279145516530203.4814629819050362463403556437845", "-83530000000000000000000", 4, RoundingMode.ROUND_HALF_DOWN); + t2("1.000", "895694428428700219865817784521974121281.8617", "-895694428428700219865817784521974121280.8617", 74, RoundingMode.ROUND_CEIL); + t2("1.0000000000000000000000000000000000000229021152905485877265916049147377596", "46587749069373859988241253.489", "-46587749069373859988241252.489", 63, RoundingMode.ROUND_UP); + t2("1.00000000000000000000000000003315723137560736009063125977104295", "125786914090542197734.1243843248365770", "-125786914090542197733.124384324836577", 38, RoundingMode.ROUND_HALF_UP); + t2("0.99999999999999999999999880956718792058", "7160823998851.8329358", "-7160823998850.8329358000001", 26, RoundingMode.ROUND_UP); + t2("1.0000000000000000000000000", "168185946163980552320.267147742897536930695190349307194331", "-168185946163980552319.267147742897537", 37, RoundingMode.ROUND_FLOOR); + t2("1.013368631237074269967629841470163611", "705721440565168596203735309275.2226143048086127376737122109829328049", "-705721440565168596203735309274.2092456735715384677060823695127691939", 100, RoundingMode.ROUND_HALF_DOWN); + t2("0.9999999999999999999999895953786771511342299983348190561873466109129549287631216974725051767872153303", "564417756540611857691.339744659093279108641571889", "-564417756540611857690.33974465909327910864158229362132284886577000166518094382", 77, RoundingMode.ROUND_FLOOR); + t2("0.99999999999999999998540837496861607141739434483624886985909476644326279641174", "702032398191198338390179.03234814268263959712", "-702032398191198338390178.03234814268263959713459162503138392858260566", 68, RoundingMode.ROUND_FLOOR); + t2("0.99999999997144379431778592551299579284817269428143146335310624910486", "5744510660347753705135441208927833216328.435064197579250286979352170", "-5744510660347753705135441208927833216327.435064197607806492661566244487004", 73, RoundingMode.ROUND_DOWN); + t2("0.9999999999999999999999999999999999999998703780041291982139945219878674624", "5520834448.5302613321828479018112575569", "-5520834447.5302613321828479018112575569000000000001296219958708017860054780121325376", 90, RoundingMode.ROUND_UP); + t2("1.00000000000000000021756877520948475176291147979521588259993838886521586727381224303946367", "8458303053559696574120.570523", "-8458303053559696574100", 20, RoundingMode.ROUND_CEIL); + t2("1.0000000000000000000", "5966.1758018", "-5965.1758018", 58, RoundingMode.ROUND_DOWN); + + t2("606.254575304", "10913610393350.2606", "-10913610392744.006024696", 37, RoundingMode.ROUND_DOWN); + t2("3637644346217992.6517548755488192", "61.23387301712754337", "3637644346217931.41788185842", 27, RoundingMode.ROUND_HALF_EVEN); + t2("8562.3", "3857989719151989094.28436267039053249", "-3858000000000000000", 4, RoundingMode.ROUND_HALF_DOWN); + t2("42885995.8922914272", "706475.796938411", "42170000", 4, RoundingMode.ROUND_DOWN); + t2("7744926264.9828979895736", "23.42189", "7744926241.561008", 16, RoundingMode.ROUND_CEIL); + t2("2652458869.8552735", "275855874.003329237660489", "2376602995.851944262339511", 30, RoundingMode.ROUND_HALF_UP); + t2("982009515496588214.2961068036", "6139.9730427718831", "982009515496600000", 13, RoundingMode.ROUND_HALF_EVEN); + t2("674668148428.007557069664", "9730741.87736", "674658417686.1302", 16, RoundingMode.ROUND_HALF_EVEN); + t2("724155.70665100", "7644638.16160612893825643332", "-6920482.45495512893825643332", 29, RoundingMode.ROUND_CEIL); + t2("7489512119755281.0", "5696661.38689", "7489512114058619.61311", 27, RoundingMode.ROUND_CEIL); + t2("34021417679098405263.210121640063", "469015725494952.249997154054", "34020948663372910310.9601245", 27, RoundingMode.ROUND_HALF_EVEN); + t2("8104166310518.2057288", "331717.89", "8104165978800.3157288", 38, RoundingMode.ROUND_HALF_UP); + t2("685.46727959004970110362", "69830719.4666357936145496499", "-69830033.9993562036", 18, RoundingMode.ROUND_HALF_EVEN); + t2("91409621890423.735243", "583761545405875499.298205826415", "-583670135783985075.562962826415", 40, RoundingMode.ROUND_FLOOR); + t2("63.62", "816473804427740.32776832822474", "-816473804427676.70776832822474", 29, RoundingMode.ROUND_FLOOR); + t2("93913790211035413955.0", "37517895256.691410825590", "93913790173517518700", 19, RoundingMode.ROUND_HALF_UP); + t2("8171950.0", "7916992.81283069266914681297", "254957.18716930733085318703", 33, RoundingMode.ROUND_CEIL); + t2("70570310990471372.535740", "306380460.13915815763162", "70570310684090912.396581842368", 29, RoundingMode.ROUND_HALF_EVEN); + t2("904002719243514578.199046601", "392302713454.30007186959883636", "904002326940802000", 15, RoundingMode.ROUND_CEIL); + t2("61222626759880119720.6", "38.1763782264368", "61222626759880119682.4236217735632", 40, RoundingMode.ROUND_HALF_DOWN); + t2("106992249842.454676", "9783343723646590.895277", "-9783236731396748.44", 18, RoundingMode.ROUND_HALF_DOWN); + t2("315594693.3230", "601427787.397048404134", "-285833094.074048404134", 37, RoundingMode.ROUND_HALF_DOWN); + t2("2624664081780.107816961929532", "638739152166230.6570284141825715", "-636114488084450.5492114522530395", 34, RoundingMode.ROUND_FLOOR); + t2("850761485.0159962973", "16557587439532.009816893", "-16556736678000", 11, RoundingMode.ROUND_HALF_UP); + t2("29143073887560442.2732826582829", "817114655795.2399384597929170", "29142256772904650", 16, RoundingMode.ROUND_UP); + t2("13683256304217.3", "79044625035670693.5671293", "-79030941779366476", 17, RoundingMode.ROUND_HALF_UP); + t2("6052717165.1446", "65455223170949076520.8060582718286379316", "-65455223164896300000", 15, RoundingMode.ROUND_DOWN); + t2("54131.622129937389021", "998107.4", "-943975.7778700627", 16, RoundingMode.ROUND_UP); + t2("4134679559878377.722073883", "77947153111703354860.05228739542293", "-80000000000000000000", 1, RoundingMode.ROUND_FLOOR); + t2("5955452.7441572243480999", "916606845979019189.694793932", "-916606845973063000", 15, RoundingMode.ROUND_DOWN); + t2("1719979601587.803845", "582.660259024590", "1719979601005.14358597541", 33, RoundingMode.ROUND_HALF_EVEN); + t2("179.7986834569433903", "5.3035430636", "174.4951403933433903", 34, RoundingMode.ROUND_HALF_UP); + t2("2571182.9104", "5112317485037139357.0326821757855538364", "-5112317485034568174.12228217578555383", 36, RoundingMode.ROUND_DOWN); + t2("33777941893928234.1403399701827010", "4007790318278125722.91052580512126369", "-3000000000000000000", 1, RoundingMode.ROUND_DOWN); + t2("1608.6048924999255577935", "272293.285196", "-270680", 5, RoundingMode.ROUND_HALF_UP); + t2("53611325447739.249", "633369797029.0", "52977955650710.249", 20, RoundingMode.ROUND_HALF_DOWN); + t2("710416580769.486", "33.64813473834309", "710416580735.8378652", 19, RoundingMode.ROUND_FLOOR); + t2("9611898517968409.49495", "3.912", "9611898517968405.583", 19, RoundingMode.ROUND_UP); + t2("28302362177443.355900", "6595.574858694980", "28302362170847.78104130502", 30, RoundingMode.ROUND_CEIL); + t2("61066.29222627342560448", "12924.77619098", "48150", 4, RoundingMode.ROUND_CEIL); + t2("132.65466", "712167.8700932215292641", "-712035.2", 7, RoundingMode.ROUND_HALF_UP); + t2("688767986059678709.380854", "32846480.81710", "688767986026832000", 15, RoundingMode.ROUND_HALF_EVEN); + t2("1768.11258632743", "33118961361.6262", "-33118960000", 7, RoundingMode.ROUND_HALF_UP); + t2("3648851903469184.5520025290", "616248879.263262", "3648800000000000", 5, RoundingMode.ROUND_FLOOR); + t2("890038068185855.960980", "2709407759.1604115152745810269", "890035358778096.8005684847254189731", 38, RoundingMode.ROUND_HALF_UP); + t2("102.0", "1.670386774", "100.329613226", 38, RoundingMode.ROUND_HALF_UP); + t2("188638666620373.0", "264.8829877746255031", "188640000000000", 5, RoundingMode.ROUND_CEIL); + t2("63940.75794950117047", "31279.29426406007672410", "32661", 5, RoundingMode.ROUND_HALF_UP); + t2("79999.339185864", "77281398922.8", "-77281318923.460814136", 29, RoundingMode.ROUND_CEIL); + t2("2043.1155258", "8703901.5", "-8701858.3844742", 20, RoundingMode.ROUND_CEIL); + t2("6409343803262.388", "823497316.0", "6408520305946.388", 38, RoundingMode.ROUND_DOWN); + t2("78753063306376138.506170034261398", "394.626015216966077", "78753063306375743.88015481729533", 31, RoundingMode.ROUND_CEIL); + t2("3396217318606541981.25623355", "8090252540252652303.5496813397654", "-4694035221646110320", 18, RoundingMode.ROUND_HALF_UP); + t2("572125232723470402.673", "450102582792560243.4928609852", "122000000000000000", 4, RoundingMode.ROUND_HALF_EVEN); + t2("73.1469871709778", "91.10583849", "-17.958851319022", 14, RoundingMode.ROUND_HALF_DOWN); + t2("35811.99", "6730744506562.519", "-6000000000000", 1, RoundingMode.ROUND_DOWN); + t2("12948569823926516.1", "6032050833605576786.28750720978465442", "-6019102263781650270.18751", 24, RoundingMode.ROUND_HALF_UP); + t2("73.460260127414", "5580002381112368469.58572385874194", "-5580002381112368396.125464", 25, RoundingMode.ROUND_UP); + t2("36533488928501951.648348833", "34832817263.64", "36533454095684688.008348833", 34, RoundingMode.ROUND_HALF_UP); + t2("941537063116169.19", "294.64269", "941537063115874.5", 16, RoundingMode.ROUND_HALF_DOWN); + t2("5436517709034324.73139", "2494962.7", "5436517706539362.03139", 36, RoundingMode.ROUND_CEIL); + t2("3055391195233077250.6394833837101256009", "6427707361341089.0024974560131565626", "3000000000000000000", 1, RoundingMode.ROUND_HALF_EVEN); + t2("29074997967.4033077914", "566332182964.6602808", "-537250000000", 5, RoundingMode.ROUND_DOWN); + t2("685.6230300327385", "8297.123231678604", "-7611.5003", 8, RoundingMode.ROUND_UP); + t2("9529.144771387", "8895131556.883", "-8895122027.738228613", 34, RoundingMode.ROUND_DOWN); + t2("265633925199908208.42314005298861", "565128025.144", "265633924634780183.27915", 23, RoundingMode.ROUND_UP); + t2("1376622519151175.50445", "75251508328.9053133011113", "1376547267642846.5991366988887", 40, RoundingMode.ROUND_DOWN); + t2("3338928425.7256095268", "44744429118812497.041340991400", "-44744425780000000", 10, RoundingMode.ROUND_HALF_DOWN); + t2("6505421540677.424332952118826", "5946601.3849316529", "6505415594076.0394", 17, RoundingMode.ROUND_FLOOR); + t2("2967456.687326291008", "53066388425896878.90368577441", "-53066390000000000", 7, RoundingMode.ROUND_HALF_EVEN); + + t2("943058798364.395479068079592238958593748", "4262.860991837775288450967406945", "943058794101.534487230304303787991186803", 40, RoundingMode.ROUND_HALF_DOWN); + t2("3961880712.1739466698112561773101546317748", "768274235.957926640149693329", "3193606476.216020029662", 22, RoundingMode.ROUND_HALF_UP); + t2("705240179905.01961035839697848937836", "5.730085107325974", "705240179899.28952525107100448937836", 35, RoundingMode.ROUND_HALF_UP); + t2("4.677135032771256809341543004", "368037386167.5782655174332095276", "-368037386162.901130484661952718258456996", 94, RoundingMode.ROUND_FLOOR); + t2("1634482637211224074.5176185357539524070468846", "51959012150.180327166277012544968432200", "1634482585252211924.3372913694769398620784524", 71, RoundingMode.ROUND_HALF_UP); + t2("7062679212073143326888924001163.02786", "670367382193775796879309.97397127870279732280890295", "7062678541705761133000000000000", 19, RoundingMode.ROUND_DOWN); + t2("4159462381849975492409125.0", "659.758349477474619798183023482274815728", "4160000000000000000000000", 3, RoundingMode.ROUND_CEIL); + t2("386.361433432357526852389133", "161581451832534896068758.824566698062465908442798606434258", "-161581451832534896068372.4631333", 31, RoundingMode.ROUND_UP); + t2("2989170915162203782.110570", "78042238635700889.19875125602523287111", "2911128676526502892.91181874397476712889", 96, RoundingMode.ROUND_UP); + t2("24459694394745404014469850905.84318799775716933", "206361207751899.635824898631920532", "24459694394745197653262099006.207363099125248798", 97, RoundingMode.ROUND_UP); + t2("961453869.879856", "6205777354.0303077454349819728607", "-5244323484.1504517454349819728607", 50, RoundingMode.ROUND_FLOOR); + t2("224978326.9", "46099.92658151985887055028304994", "224932226.97342", 14, RoundingMode.ROUND_CEIL); + t2("4795500.09497120551913045", "43866652015.225143790341972440190589912", "-43861856515.13017258482284199", 29, RoundingMode.ROUND_HALF_EVEN); + t2("785759919848321456608.53471973157141969206251316", "50515325074711677303149183246092378.4", "-50515325074710892000000000000000000", 17, RoundingMode.ROUND_HALF_EVEN); + t2("1052.813283166117082", "573714957335293801886430730.75448811348282631726775089262354663", "-573714957335293801886429677.94120494736574431726775089262354663", 70, RoundingMode.ROUND_HALF_UP); + t2("16271428.62516560", "32898412714198161463717.4889152072", "-32898412714198200000000", 15, RoundingMode.ROUND_FLOOR); + t2("900560899.913104266482415717003", "5952428176343381136666681609845550966809.5", "-5952428176343381136666681609844650405909.586895733517584282997", 79, RoundingMode.ROUND_UP); + t2("96646163996160433101650646872419298.8222", "589774359042273020.4302680978027718659076738429520984", "96646163996160432511876287840000000", 28, RoundingMode.ROUND_UP); + t2("7560498588.138", "7703300420181340100559937071730.98176915487027", "-7703300420181340100552376573142.8437691548703", 44, RoundingMode.ROUND_UP); + t2("8522365103427764558030271.51366810225", "88935863758311187415.13400", "8522276167564006246842856.37966810225", 45, RoundingMode.ROUND_CEIL); + t2("269622299212099.5658", "67080856574410241738.2", "-67080586952111029638.6342", 43, RoundingMode.ROUND_DOWN); + t2("178101542842138132551032196400994301.93920152593345597972723530172437819734", "9928207710724533478360637492329686410.096810135482", "-9750000000000000000000000000000000000", 4, RoundingMode.ROUND_HALF_UP); + t2("347539.651654349", "999164349246243097554653376.101753100580453", "-999164349246243000000000000", 16, RoundingMode.ROUND_DOWN); + t2("67.82933602918033391813", "80456255662446245353590549764939356874.08639717592445030759922844", "-80456255662446245353590549764939356806.257061146745", 50, RoundingMode.ROUND_FLOOR); + t2("1286189309439198325290138412924.71091621710744938298299045634143848", "55925281201729145416213246160396310313.033984382012126643460839793", "-55925279915539835977014920870257897388.32306816490467726047784933665856152", 92, RoundingMode.ROUND_UP); + t2("409218380262925.03329205577858741776", "98299234078747591.9319529133359131207968770243284522", "-97890015698484666.8986608575573257030368770243284522", 65, RoundingMode.ROUND_FLOOR); + t2("589630075341582712237298018007.626791554398075374457001806", "37072203775488.5460924874", "589630075341582675165094242519.080699066998075374457001806", 80, RoundingMode.ROUND_DOWN); + t2("952406921388034785124870359466.4208", "92386404607924941831558.493321724284807184287113592", "952406829001630177199928527907.927478275715192815712886408", 65, RoundingMode.ROUND_HALF_EVEN); + t2("239797538.62924219574590", "62.7179", "239797475.9113421957459", 29, RoundingMode.ROUND_DOWN); + t2("9117573077.38203829394236794264681559", "9485399161355567.024972352", "-9485390040000000", 9, RoundingMode.ROUND_HALF_EVEN); + t2("195854152327661808049809012.152492452144772559", "52666453496377990502.8656918042014982268", "195854099661208311671818509.2868006479432743322", 61, RoundingMode.ROUND_HALF_EVEN); + t2("68389708692892364357038.550642618", "346589125.87181", "68389708692892017767912.678832618", 74, RoundingMode.ROUND_DOWN); + t2("22366800802617651725451014763352512558.88384367", "56706199621325498.77362822019", "22366800802617651725394308563731187060.11021544981", 77, RoundingMode.ROUND_DOWN); + t2("222099131902528.823008", "23424944387813665353358.766033498779988076936", "-23424944165700000000000", 12, RoundingMode.ROUND_HALF_UP); + t2("94369.805612979192617825311244420237761233", "1404995131175289820.12435079015027778619", "-1404995131175195450.318737810957659960878755579762238767", 77, RoundingMode.ROUND_CEIL); + t2("51595640870900081.31194767388", "7760147060689.98166496533407685834688993271909084", "51590000000000000", 4, RoundingMode.ROUND_HALF_EVEN); + t2("9773886938068800575328768856352095468.6307897839608910717952963742165591", "444564767846600894514602578978208.76080300483076311650", "9773442373300953974434254253773117259.8699867791301279552952963742165591", 73, RoundingMode.ROUND_HALF_DOWN); + t2("999567934641977983949863368480.115289355375579041", "1165149936.615876680281694880228", "999567934641977983948698218543.499412675093884160772", 58, RoundingMode.ROUND_FLOOR); + t2("5501088.6084944677846990708389945743093", "664927.656419331398418627625297930574", "4836160.9520751363862804432136966437353", 53, RoundingMode.ROUND_DOWN); + t2("39.48037672881845226078909407", "5341174765458518115561880076247.366376615978250578161608182949283345", "-5341174765458518115561880076207.885999887159798317372514112949283345", 85, RoundingMode.ROUND_HALF_EVEN); + t2("8117017575502275847692679.264176875515281734668365581147676", "8659713925984172141543085.308002265245744274949016821247", "-542696350481896293850406.043825389730462540280651240099324", 58, RoundingMode.ROUND_FLOOR); + t2("553909918921981594.751577774245505483484884974672361660", "8054222209080795584363855.323441", "-8054221655170876662382260", 24, RoundingMode.ROUND_CEIL); + t2("962163351664.0", "332173.51965410", "962163019490.4803459", 51, RoundingMode.ROUND_HALF_UP); + t2("78570476306710514328422903.566399424510435349164985564", "20645082983476005744595606474867.7059235785374", "-20645004412999699034081278051964.139524154026964650835014436", 71, RoundingMode.ROUND_FLOOR); + t2("666631867650769350383766311.24823253716", "232735963045186976112963962.24048736757366948", "433895904605582374270802349.00774516958633052", 81, RoundingMode.ROUND_FLOOR); + t2("759785915873173118941850738960455977789.03259903086677271090681583525083391", "6239262109019238233981735614.87249900850446524387856346136836303", "759790000000000000000000000000000000000", 5, RoundingMode.ROUND_HALF_DOWN); + t2("47417002283487491793133.162876598099522479641", "5798942052554.5198526293050", "47417002277688549740578.64", 25, RoundingMode.ROUND_HALF_UP); + t2("6626460939175437003981392048059079.7245933323187090582585544", "909561620735130820650.3713179", "6626460939174527442360656917238429.3532754323187090582585544", 60, RoundingMode.ROUND_FLOOR); + t2("65718846993876485099499095393267604350.5432361999471902331", "9133254.0", "65718847000000000000000000000000000000", 10, RoundingMode.ROUND_CEIL); + t2("9831060534.4113885", "40.264960990851888058", "9831060494.146427509148111942", 97, RoundingMode.ROUND_HALF_DOWN); + t2("618365246.16154228299443804064726416551494052021", "4175245358857853690274.6574698427569", "-4200000000000000000000", 2, RoundingMode.ROUND_FLOOR); + t2("5794058568457386772009082293111862955.1723471", "7874.10120139", "5794058568457386772009082293111855081.07114571", 58, RoundingMode.ROUND_FLOOR); + t2("115514655034192092805976.359058975764477", "7321838425189291796508643.82134639311753", "-7206323770155099703703000", 22, RoundingMode.ROUND_UP); + t2("4979836.458", "4343643405.293", "-4338663568.835", 93, RoundingMode.ROUND_HALF_UP); + t2("6962719933111298474232811011939872095.31542793502134199201685731559857711019", "45898320993079771121163323807243350900.791045197014396089", "-38935601059968472646930512795303478805.475617261993", 50, RoundingMode.ROUND_CEIL); + t2("96.45114046", "43788964069986958954302793689691871.503332629337662292231604855967058576", "-43788964069986958954302793689691775.052192169337662292231604855967058576", 83, RoundingMode.ROUND_UP); + t2("19.706629067026369851443323141433225326543", "9130912170755702578573915.749688", "-9130912170755702578573896.04305893297", 36, RoundingMode.ROUND_CEIL); + t2("999909783662285281933157327721667.775471879628", "2795909691798312648666149730968954.548860473478014471571999555369104559", "-1795999908136027366732992403247280", 33, RoundingMode.ROUND_DOWN); + t2("9055989.3253617695654064149036971384419806539658", "16700012813767870416936045681260.961743541", "-16700012813767870416936036625271.6363817714345935850963028615580193460342", 92, RoundingMode.ROUND_CEIL); + t2("3761160947240340619655699804028514166.1545031706631", "90008594170211932230610878657643955.0766771120853201398452422803203", "3671000000000000000000000000000000000", 4, RoundingMode.ROUND_DOWN); + t2("7052186163764582.7718768047025626908949225631756923472405", "279825326258.044979268268396", "7051906338438324.7268975364341666908949225631756923472405", 85, RoundingMode.ROUND_HALF_EVEN); + t2("55148738462073723350464458331198071161.324235957257244236", "890533822519200952605943.67027149110407422724883", "55148738462072832816641939130245465210", 37, RoundingMode.ROUND_DOWN); + t2("22048566656678706770922535389009.8800482", "691835258073242811318135316422877.78205857134", "-669786691416564104547212781033867.90201037134", 85, RoundingMode.ROUND_HALF_DOWN); + t2("360228259046240.247611499704462968697207149395", "2086914304371111332610306394896990.291351096738500858888680941788348731605", "-2086914304371110000000000000000000", 15, RoundingMode.ROUND_HALF_UP); + t2("237765665865861098214622.6280166600682705261137847840237788088", "49282802218452.8192989767794767678363", "237765665816578295996169.8087176832887937582774847840237788088", 73, RoundingMode.ROUND_CEIL); + t2("94963576434071265035613300794191.69660087123956630049887827698659406", "991367147561458404473577.06", "94963575442704117474160000000000", 22, RoundingMode.ROUND_UP); + t2("21039.0941271849563698186545060837025468", "61.986522669935", "20000", 1, RoundingMode.ROUND_FLOOR); + t2("5527758.208579037564171467506", "57746543998576.5", "-57746538470818.291420962435828532494", 57, RoundingMode.ROUND_DOWN); + t2("53.526728183052625", "4566777936616620019069108049674.2001694968892442806307029510968199973907", "-4566777936616620019069108049620.6734413138366192806307029510968199973907", 81, RoundingMode.ROUND_HALF_UP); + t2("8398.06881519554924106264640920848", "78419713421175411471008565354902971834.199590637228446719811837169766362", "-78419713421175411471008500000000000000", 24, RoundingMode.ROUND_CEIL); + t2("46651569150015595210809704661940.8", "96834650155790.328525", "46651569150010000000000000000000", 13, RoundingMode.ROUND_FLOOR); + t2("203662156936266018.56857105801974209381240694301095451", "77270.69753652195683217690846412859892084", "203662156900000000", 10, RoundingMode.ROUND_FLOOR); + t2("69434.88031535436784733509731541971007", "8.5519048231739842309", "69426.3284105311938631", 21, RoundingMode.ROUND_HALF_UP); + t2("695265208240345480799.465208690311427717020174", "963908834.1637317007838017919941336969673787756325", "695265208239381571965.3014769895276259250260403030326212243675", 70, RoundingMode.ROUND_HALF_DOWN); + t2("875031885506622202313972150.7266913315589066826744", "581696758787378729955423404234905245415.0607657848516406595", "-581696758786503698069916782100000000000", 28, RoundingMode.ROUND_UP); + t2("3850085716409132708226314757323424740259.29106821935", "318215482803.0830194832761343614525696063", "3850085716409132708226314757005209257456.208048736074", 52, RoundingMode.ROUND_HALF_UP); + t2("2077002389327078369687189002.91", "239837588404470046844798445464872593503.053633023008384327820145755683896617", "-239837588402393044455471367095185404500.143633023008384327820145755683896617", 95, RoundingMode.ROUND_CEIL); + t2("525304094036133422209603266609297.83269311554678194352008621", "3352818947475215852524.43621", "525304094032780603262128100000000", 25, RoundingMode.ROUND_HALF_DOWN); + t2("2481703604661998598312313771116.683575522902", "121527168476013300130172028650996952931.129337247013280289581101702083117322", "-121527165994309695468173430338683181814.4457617241", 49, RoundingMode.ROUND_HALF_DOWN); + t2("729755648.217572562103468478434322387136565", "843447200457297.639006250839608805585207851529624505", "-843446470710000", 11, RoundingMode.ROUND_FLOOR); + t2("387838224.031176138", "502511403087739175653052910412155182.44006582048399018208099", "-502511403087739175653052910024316958.408889682483990182081", 58, RoundingMode.ROUND_HALF_EVEN); + t2("69132135722.58295408468070686447778925874", "1453815723479122700218782754.639093106402300013304188564319839138", "-1453815723479122631086647032.05613902172159314", 45, RoundingMode.ROUND_CEIL); + t2("456578903803098400.0", "1905158313568197958999531007564638.80281445760356043208682451", "-1905158313568197502420627000000000", 25, RoundingMode.ROUND_HALF_DOWN); + t2("838363997375241408512205.91331625707234", "1817185772520982149742322396855847.0774430711345644250", "-1817185771682618152367080988343641.164126814062224425", 60, RoundingMode.ROUND_UP); + t2("7238789566926067985363334642130.599058758518787968", "6343845415.777256414176861661", "7238789566926067985356990796714.821802344341926307", 51, RoundingMode.ROUND_FLOOR); + t2("9035266192537122485859011581230277071.66843338494296468220058", "360821803539883788027990763992.0", "9035265831000000000000000000000000000", 10, RoundingMode.ROUND_FLOOR); + t2("3516070859853058886674366.675", "777750746025759323785264.6302948541581587174", "2738320113827299562889102.04", 27, RoundingMode.ROUND_HALF_EVEN); + t2("234667843801502022403492664022.51274243509522937067257601080027353748", "7434662831014255662256399.51019323374327636911", "234660409138671008147830407623.00254920135195300156257601080027353748", 96, RoundingMode.ROUND_FLOOR); + t2("801.228464206716", "79633403862832778.892817935631812561652", "-79633403862831977.664353728915812561652", 57, RoundingMode.ROUND_HALF_UP); + t2("148761420566882053922085.5584439797471528210930019899", "1048230527982649187568473020741814535186.994351", "-1048230527982000000000000000000000000000", 13, RoundingMode.ROUND_CEIL); + t2("320094453723.90491004868317673103779600426809241", "6105321.02334476276", "320088348402.89", 14, RoundingMode.ROUND_CEIL); + t2("4470885354629185573049940913387317010.5199552238351", "584051218937333672.77333925100575115", "4470885354629185572465889694449983337.74661597282934885", 88, RoundingMode.ROUND_CEIL); + t2("213143.8021123372696220632021010884971460171", "9503836216.62157633547688479807890", "-9503623072.8194639982072627348767989115028539829", 87, RoundingMode.ROUND_HALF_DOWN); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t2("1.792316612884487564311771281e-23932057", "5.69976456866047320412517423508310354728679470757328490000343592950016294088615989268093866e-32517", "-5.6997645686604732041251742351e-32517", 29, RoundingMode.ROUND_HALF_DOWN); + t2("1.99169479851016450011043646901687400115512860504018833941164718920781076854216762430238626408343644e-9931933", "6.38526426739e+8626025", "-6.38526426739e+8626025", 22, RoundingMode.ROUND_HALF_UP); + t2("-6.2542519003586694651026234e+87", "-6.5757404951359531828365479313153601424485747649226579274168996862092441994766035e-49849", "-6.2542519003586694651026234e+87", 53, RoundingMode.ROUND_FLOOR); + t2("-9.604772015363615559582304998733675e+5850", "8.1340843005908425924790547473450988769558068511930082393e+138332923", "-8.1340843005908425924790547473450988769558068511930082393e+138332923", 96, RoundingMode.ROUND_CEIL); + t2("-4.228107205843224077015863084700000947581407920789023984663576639e+72", "-2.3646076187718393062198539736528060703203e-18947270", "-4.22810720584322407701586308470000094758140792078902398466357663899999e+72", 69, RoundingMode.ROUND_CEIL); + t2("3.42164002916939306745661852229207679178670363e-739642191", "48413603180304870097616580848566368", "-4.8413603180304870097616580848566368e+34", 43, RoundingMode.ROUND_HALF_DOWN); + t2("-2.7082067257439001248731034e+255", "1.463357067849197668312169937835142233343040728649218403546975321163316191984829045020133415427186882e-813", "-2.708207e+255", 7, RoundingMode.ROUND_HALF_DOWN); + t2("1.80544723819507780400985933621596829e-23912898", "-6.8902351056372730055504911816243114779696717903217778350020023536206268396056597e+8117", "6.8902351056372730055504911816243114779696717903218e+8117", 50, RoundingMode.ROUND_UP); + t2("-1.688322353309930289764085302393645579e-2061", "8.304874790464942866574379155442852235973389929444676317853978559698488e+320", "-8.304874790464942866574379155442852235973389929444676317853978559698488e+320", 80, RoundingMode.ROUND_HALF_EVEN); + t2("5.323551831268452061208291787260167129e+3404403", "1.731761449136485742878138678929997425806089831701987933870812710697622052696577114307158491381462e+545", "5.32355183126845206e+3404403", 18, RoundingMode.ROUND_HALF_DOWN); + t2("-478232737.497", "4.0462091688110303902787237905655428288294712510868875182578760417628600744075185622547055498e+3079062", "-4.04620916881103039027872379056554282882947125e+3079062", 45, RoundingMode.ROUND_HALF_EVEN); + t2("3.0612417422416523917303965310500924897578e+6491", "7.827139363104333343854465329937791735830391528894758013298610462720743920", "3.0612417422416523917303965310500924897578e+6491", 54, RoundingMode.ROUND_CEIL); + t2("-5.3813883054823380e+324", "-1.2369677988e-57833611", "-5.381388305482338e+324", 75, RoundingMode.ROUND_HALF_DOWN); + t2("9.21805739519561831297761022643364049172592e-918", "-48895883124010996460744080319445610017323327196869255668.4572", "4.88958831240109964607440803194456100173233271968692556684572e+55", 66, RoundingMode.ROUND_HALF_EVEN); + t2("-9.252715780068260418043e+72", "-12590139569136468029213593074424819654932792387400646295775156790571242103916622815884889.5892", "1.25901395691364587764978130061644016119e+88", 39, RoundingMode.ROUND_HALF_EVEN); + t2("-5.71550608647635849585421199679478092798616968053825229082869453927359310584963054663809359831818000e+75134426", "-1e-353086", "-5.7155060864763584958542119968e+75134426", 30, RoundingMode.ROUND_UP); + t2("-1.82078636582034050e-58370", "6.949920119724528258522072178e-45427578", "-1.8207863658203405e-58370", 71, RoundingMode.ROUND_HALF_EVEN); + t2("-2.795864396006197633901037932062163941946590578075449507267908969758559434326789e+742563919", "-3.486025739887413584063563381470972389366187865215964884178573941676391907e-39238980", "-2.79586439600619763390103793206216394195e+742563919", 39, RoundingMode.ROUND_HALF_DOWN); + t2("9.481503849304826928973950761062868210560506712428214283679344428199e+986553613", "-6.44018958804822470871191968385562129218994153583004246052413787928461266956e-183768", "9.4815038493048269289739507610628682105605067124282142836793e+986553613", 59, RoundingMode.ROUND_HALF_DOWN); + t2("8.42058906940015718798e+23", "-5.12818647090105520279002851228627516477188332698656845964525170861373277e+77", "5.12818647091e+77", 12, RoundingMode.ROUND_UP); + t2("-6.66867298424442973991017135004123e-6016", "1.122942426365938279781316944e-50646915", "-6.66867298424442973991017135004123e-6016", 89, RoundingMode.ROUND_CEIL); + t2("-14434824877681671252494.50", "-4744180884604619155005023739354631157756385352850463825687419180.317893158", "4.744180884604619155005023739354631157756370918025586144016e+63", 58, RoundingMode.ROUND_DOWN); + t2("3.021351757092074226662594776398163721367430180658722006837511458091887e+754145", "-7.7281874393523698296251147e-342", "3.021351757092074226662594776398163721367430180658722006837511e+754145", 61, RoundingMode.ROUND_FLOOR); + t2("-9.222486718751634618635052066622543e+36", "3.38442051790053e+18", "-9.22248672e+36", 9, RoundingMode.ROUND_FLOOR); + t2("7.09899984575865359734e+84", "7.78137675765375240317008124083145599412855878668147615343173099333e-778", "7.09899984575865359734e+84", 36, RoundingMode.ROUND_UP); + t2("-7.731336555060253e+61", "-3.797617486236881717819332e+113", "3.79761748624e+113", 12, RoundingMode.ROUND_HALF_EVEN); + t2("-3203091812097591345956128", "1.54e+804483", "-1.540000000000001e+804483", 16, RoundingMode.ROUND_FLOOR); + t2("-6.8790104211130242454991601642749891042049402313899949070009698688834394612168393565e-552", "-6.47132322792558510008703e+977", "6.4713232279255851000870299999999999999999999999999999999999999999999e+977", 68, RoundingMode.ROUND_FLOOR); + t2("5.11288463e+804121757", "-3.233654093376025263229529432009804011579062041719e-323", "5.1128846300000000000000000000000000000000000000000000000000000000000000000000000000000000001e+804121757", 92, RoundingMode.ROUND_UP); + t2("2215721.822336", "1450572422564612919038700170868560596636485142539113457.847312756478875123323372035942316", "-1.450572422564612919038700170868561e+54", 34, RoundingMode.ROUND_UP); + t2("3.856021532534216364576565205962498e-680406380", "4.0748021e+910929", "-4.0748020999999999999999999999999999999999999999999999999999999999999999999999999999e+910929", 83, RoundingMode.ROUND_CEIL); + t2("587477294349.9128", "5.9009418178397792919787923374434637609777539615615913481542114343091e-601914", "5.874772943499128e+11", 53, RoundingMode.ROUND_UP); + t2("63490679413147320151422267902664.025528745", "-1.1511e+1066189", "1.1511e+1066189", 57, RoundingMode.ROUND_HALF_UP); + t2("4.339186830776212855076142e+864782108", "6.8227815138786859587759979265847699809e-704", "4.339186830776212855076141999999999999e+864782108", 37, RoundingMode.ROUND_FLOOR); + t2("-42.683", "-2.1402464208082777156219367044346794646671634131699440029334548496490648e+95393976", "2.140246420808278e+95393976", 16, RoundingMode.ROUND_HALF_UP); + t2("-5.86269349525893423867699327633641571932e+53447445", "4.4471801597664471649566620984480e+70072792", "-4.447180159766447164956662098448e+70072792", 95, RoundingMode.ROUND_HALF_EVEN); + t2("2.01368392850485088e-7530", "7.80493785717377845822211894268763294620830205670933641096287239110624600304801026405564172615080e+76373", "-7.8049378571737784582221189426876329462083020567093364109628723911062460030480102640556e+76373", 86, RoundingMode.ROUND_CEIL); + t2("-9.443635658940048035845e-138325", "-1.35559639536973582525930597369597363666745264482626811e-35473", "1.355596395369735825259305973695973636667452644826268e-35473", 52, RoundingMode.ROUND_HALF_DOWN); + t2("1.8616211493256324295274776609561325391953686920009343298139595509785385e-3501", "1.03012623565635246794472661292428160395721926954319341162059243941806e+69", "-1.0301262356563524679447266129242816039572192695431934116205924394e+69", 65, RoundingMode.ROUND_HALF_UP); + t2("4.511087857625328082657257239895665113144003584405761127577260517484874613e+778771121", "1.8325842443473932072e-59442002", "4.511087857625328082657257239895665113144003584405761127577260517484874612999999999999999e+778771121", 88, RoundingMode.ROUND_DOWN); + t2("-1.287219294194087073000916324326305e+96", "7.1699261108103554603864614680e-7547516", "-1.28721929419408707300091632432630500001e+96", 39, RoundingMode.ROUND_UP); + t2("5.0461889643211e-8150", "-5.3418458279074099377871e+49476", "5.3418458279074099377871e+49476", 56, RoundingMode.ROUND_HALF_UP); + t2("-6.71547813417393495728240002804006106537518734009661124726571518977786981532e+3318", "-7.2398883759082488170424e+75376", "7.2398883759082488170424e+75376", 56, RoundingMode.ROUND_HALF_DOWN); + t2("1.44735793243277391262764608662589226432402931e+41712893", "-340885521769586478087899909642349839174961017948388220545761927469.281", "1e+41712893", 1, RoundingMode.ROUND_HALF_EVEN); + t2("6.561512285692418871312354839741304442546111797417416511e+94599649", "-440795478877.624", "6.561512285692418871312354839741304442546111797417416511e+94599649", 66, RoundingMode.ROUND_HALF_EVEN); + t2("-688837253042614877399.5", "-3.632441039346975825180266180783847897335359529888336884091855e+188507", "3.6324410393469758251802661807838478973353595298883368840918549999999999999999999999e+188507", 83, RoundingMode.ROUND_DOWN); + t2("1.0360675995358536872163314493066410401378536425375038250374718871686217599980919432e+553425", "8.704062929984294713140931351834846849951498e-593673477", "1.0360675995358536872163314493066410401378536425375038250374718871686217599980919431e+553425", 83, RoundingMode.ROUND_FLOOR); + t2("7.43404688761493575549516036492094029880287e-26712037", "-7.9066293190521765772848055594328963843287417065639566213443958915377769052389889e+928963854", "7.90662931905217657728480555943289638432874170656395662134439e+928963854", 60, RoundingMode.ROUND_DOWN); + t2("1686783212633289750026735931738732785983663746521931468526088783025141583828124.465", "8768590549.7241944309880627200749822214571362095236108237501203844509903955330291000151422", "1.686783212633289750026735931739e+78", 31, RoundingMode.ROUND_HALF_UP); + t2("-1.30273886137268e+5289457", "-1.2899382417e+647330", "-1.30274e+5289457", 6, RoundingMode.ROUND_HALF_UP); + t2("42050878099274497028907191938263035774766181789514211433098485981439.75", "1.43994506473742424499458038815027395361046188494352856430241622193144915292115196755951196e-5923", "4.2050878099274497028907191938e+67", 29, RoundingMode.ROUND_HALF_DOWN); + t2("-4.320626740890915234398134986114517e+94658", "2.78894990560963181013521759e+8249", "-4.32062674089091523439813498e+94658", 27, RoundingMode.ROUND_DOWN); + t2("4.01525027773499792223184009769672475650267777439e+2993", "-9.7541734788872345649674286932141725163703554472540789341298781328709290320275810e-6547602", "4.01525027773499792223184009769672475650267777439e+2993", 67, RoundingMode.ROUND_HALF_UP); + t2("-3.95785198444775477048e-46", "-6.870396030942305e-7108", "-3.957851984447754770479999999999999999999999999999999999999999999999999999e-46", 73, RoundingMode.ROUND_DOWN); + t2("-9711.6203836557758490544267", "9.188784153327143382542570876093e-23501", "-9.7116203836557758490544267e+3", 29, RoundingMode.ROUND_HALF_UP); + t2("7.355460006727234208680888285222108269270481742254887642198770398692713606694685939591959411955545e-487104390", "-32815863771944.87", "3.281586377194487e+13", 24, RoundingMode.ROUND_HALF_DOWN); + t2("-2.6583825751466329584377255122872320456516043330212891532766393709048631359035760266577469045556542e-99686492", "1.3196779556e-3010", "-1.319677955600000000000000000000000000000000000001e-3010", 49, RoundingMode.ROUND_FLOOR); + t2("-7.17914921169565067656826325978347627539814084292339438679298679106912228033991102060926370758854e-7922150", "7.149725093137932026784009177225420e+497084531", "-7.14972509313793202678400917722542e+497084531", 65, RoundingMode.ROUND_DOWN); + t2("6.8401837269807432719138151869469924006494010653417334710e+59", "-3.3013338878941172505094851600658908071364455751e+267", "3.30133388789411725050948516006589080713644557510000000000000000000000001e+267", 72, RoundingMode.ROUND_UP); + t2("-4.54866584280149572085681473646934865513679804760160868303937609538161216745e+50712", "6008765.20498946344036890775138116504265390042946401212817895579352563718709273657", "-4.5486658e+50712", 8, RoundingMode.ROUND_HALF_DOWN); + t2("-2.17306915251811963448649934897203802911487529061830244254311067431220811484827762498e-8070467", "9.76024516020697735879087332971502859486313033396978241761064994198378347207016488940e-15", "-9.76024516020697735879087332971502859486313033396978241761064994198378347207016489e-15", 81, RoundingMode.ROUND_HALF_EVEN); + t2("1.07099326000068746588224496478208445416181740811806641950018390004007596301502960407795142041621e-48973759", "-6.86643594114206914494853806604921827520006935681793235523223528319863051850507291287e-619", "6.8664359411420691449485380660492182752000693e-619", 44, RoundingMode.ROUND_FLOOR); + t2("8.09229557883260745215088204147149523134000618264060088333656193879542292e-9131", "6.8621966724589426049058030194215748202384645065147845415643636106228614429216889627e+5710", "-6.862196672458942604905803019421574820238464506514784541564363610623e+5710", 67, RoundingMode.ROUND_HALF_EVEN); + t2("9.581451793682701427886005083345394028175040878149375394273513e-378782", "-3.042744613335733864056288278187491527807214836284653551560072721302128870257120169275325e+92742406", "3.04274461333573386405628827818749152780721483628e+92742406", 48, RoundingMode.ROUND_HALF_UP); + t2("5.7313e+4575578", "-6.364840640e+39426", "5.7313e+4575578", 73, RoundingMode.ROUND_HALF_EVEN); + t2("8.356458499777e-30", "-4.8e-10939393", "8.356458499777e-30", 40, RoundingMode.ROUND_DOWN); + t2("6.5195472944708148433514527800921108648346637999108500193846733263849685289748056063562486569260648e-3279", "1.937421712038539810513850428488208588363123168835091110018815864672320921451430e+67547265", "-1.9374217120385398105138504284882085883631231688350911100188158647e+67547265", 65, RoundingMode.ROUND_HALF_DOWN); + t2("-3.57599586681284801380522107189891356706964779329156399436948121466556878573027334286577e+33356", "-6.6883693946947144556866042137800276517141450815792257780747268780004604e+17956", "-3.57599586681284801380522107189891356707e+33356", 39, RoundingMode.ROUND_HALF_UP); + t2("-9.7224e-560399300", "2.6205204246262938260068273679375013815833069770430762996326779771138775544825087639482895011e-7856317", "-2.62052042463e-7856317", 12, RoundingMode.ROUND_UP); + t2("-3.715681211128611433143970130865055335882020223143276e+52288355", "287789445446044936290241879917633998688", "-3.715681211128611433143970130865056e+52288355", 34, RoundingMode.ROUND_UP); + t2("-8.2493944690319859817818378061643226370038799191809830064274762378667243798969812972072673e+113", "-1.845641201032288327245060081214715637229922954057240e+444094", "1.8456412010322883272450601e+444094", 26, RoundingMode.ROUND_HALF_DOWN); + t2("-5.89309192204153001500843135046e+69621244", "5.23486399668082298543743497700744461634328561270113191e+51146867", "-5.89309192204153001500843135046e+69621244", 85, RoundingMode.ROUND_HALF_EVEN); + t2("-9.332533364617829013735842749683e-1172", "5.1886033191439624397804333255765500761063229061403068373806210152358593405375e+93591", "-5.1886033191439624397804333255765500761063229061403068373806210152358593405375000000000000000001e+93591", 95, RoundingMode.ROUND_UP); + t2("7.5445762070e+288854366", "3.8063974317472361901e+3723940", "7.544576207e+288854366", 26, RoundingMode.ROUND_UP); + t2("-1.10202097949692682919643989760625683657125288006838604142487011903806380534e-57", "-7.686349839017994404992480435117213704809681451389739987668242695205627997632727166e-756892681", "-1e-57", 1, RoundingMode.ROUND_CEIL); + t2("-2.6397824546988e+8167", "2.24335709768620433408676393186381185893686419138146661581115354856133911663897900777674634334e-667005", "-2.6397824546988e+8167", 96, RoundingMode.ROUND_CEIL); + t2("8.95701118636167267321626e+31", "3.866403036598893507073274582036553740764934411841223762724e+692437", "-3.866403036598893507073274582036553741e+692437", 37, RoundingMode.ROUND_FLOOR); + t2("-5.7548994542146425852173016343954785000442443441023113369093428041115489e+5485526", "2.377230710793e+240213000", "-2.3772307107930000000000000000000000000000000000000000000000000000000000000000000000000001e+240213000", 89, RoundingMode.ROUND_FLOOR); + t2("6.82187852561709017305422060576561581323016263253171768648527e+5000", "7.04611109462407074965728925055745664e-47", "6.82187852561709017305422060576561581323016263253171768648527e+5000", 86, RoundingMode.ROUND_HALF_UP); + t2("-7e+346", "-5.9739701543133697799688640180015825274829505377320867981068366951396904e+48689101", "5.97397015431337e+48689101", 16, RoundingMode.ROUND_HALF_UP); + t2("98575514219130865770354786583585231780940810430604135675363131502461134646460224095552185218.067", "8.6917047455394e-6901", "9.8575514219130865770354786583585231780940810430604135675363132e+91", 62, RoundingMode.ROUND_CEIL); + t2("-307326217766153207641296337408407178240069815", "-2.08928068512362083349037857638914402632806700732817216924871595627504976e+79", "2.0892806851236208334903785763891439955954452307128514051190822154343319359930185e+79", 92, RoundingMode.ROUND_HALF_UP); + t2("-4.555772492857631171176698810e+267939772", "-6.5528127257655266409752878244003501007476069420122758335606274879164568165395899170518329221501437e+1605318", "-4.55577249285763117117669881e+267939772", 32, RoundingMode.ROUND_HALF_UP); + t2("5.991948215377e-6123814", "6.38169244547e-151999802", "5.991948e-6123814", 7, RoundingMode.ROUND_DOWN); + t2("-5.21392008878352879914684467839557603e-6383", "7.9128406143023651297161503149801950528574678665327896050715374145940581e+68652", "-7.91284e+68652", 7, RoundingMode.ROUND_DOWN); + t2("9.161508948580791329450886540869770096703513327961216315071048543864660403509816151467893300e+47184", "-875581155292196024043167430367.03", "9.161508948580791e+47184", 16, RoundingMode.ROUND_HALF_UP); + t2("-4.7064408883914958217230526613884166e-5322567", "4.351015580014501018829827548653770705101061619352333235878130703968596958820676e-219807", "-4.3510155800145010188298275486537707051010616194e-219807", 47, RoundingMode.ROUND_UP); + t2("-5.86864922318646549356624038e-6388", "5.15864e-74", "-5.15864e-74", 67, RoundingMode.ROUND_HALF_EVEN); + t2("6.85870e-682", "-5.937075111928240207419060418231137e+5622", "5.937075111928240207419060418231137e+5622", 60, RoundingMode.ROUND_HALF_DOWN); + t2("-6.2846594717691810204240002443373127012520917569388241491889161091457255e+405", "8.0153128400211520487097219622809800495350464749634911270946865114372247349824051499281e-403780935", "-6.284659471769181020424000244337312701252e+405", 41, RoundingMode.ROUND_DOWN); + t2("-2.51033165877791728750241775443190891984391066633109045373979918847785114646268e+11923016", "4.55723346737173346604225e+453358630", "-4.5572335e+453358630", 8, RoundingMode.ROUND_HALF_DOWN); + t2("-6.4628942182810825075881700012135312694160551114463952887191657863131398435523742532514461e-6893", "-2.02225243286523769309415121074539512381866987210186008388367868075931147507424746610012554354e+933", "2.0222524328652376930941512107453951238186698721018600838836786807593e+933", 68, RoundingMode.ROUND_FLOOR); + t2("-3.962623644340542242418789633415625567324136758413e-1340635", "-8.525681521139144430830605987294226705653004742663e+143", "8.5256815211391e+143", 14, RoundingMode.ROUND_HALF_EVEN); + t2("5.04188783533720818821892800831885659358875702648575435572892191640197223326922385205881e+94", "-4.044799176079958739979061829854269217248659863992017958880957143157173214518526499880140332437e-114", "5.04188783533720818821892800831885659358875702648575435572892191640197223326922385205881e+94", 93, RoundingMode.ROUND_DOWN); + t2("1.907022118659156494293209737808617967820791932710407270985579455491981584539790796605649238854197520e-848365946", "1011010673605111764248575166293951178735325592521363033821328588157771619.377853", "-1.0110106736051118e+72", 17, RoundingMode.ROUND_HALF_DOWN); + t2("-2.5823111978958804549209956134391354686605e-39", "-2.3756e+28994781", "2.3756e+28994781", 70, RoundingMode.ROUND_HALF_UP); + t2("7.3611e-4667", "-8.2885529813162426964849138072454671342893024340594245978772222282845e-4350", "8.288552981316242696484914e-4350", 25, RoundingMode.ROUND_HALF_EVEN); + t2("2.81803362355775841871831055053034976376902815619094990590e-5055230", "-4.63574008674183265911935834304869991074733393973186872200729701292356572e+896792", "4.6357400867418326591193583430486999107473339397318687220072971e+896792", 62, RoundingMode.ROUND_UP); + t2("7.9e-554925", "-9.560683183921193703634759160036460577238395402766596695837039927663889e+632788428", "9.56068318392119370363475917e+632788428", 27, RoundingMode.ROUND_UP); + t2("-3.32941405604212020e-471060", "5.8742682933034054748993473533381157135243211041287576477331104705911641772138481682906049360e-6416", "-5.87426829330340547489934735333811571352432110412875764773311047059116417721384e-6416", 78, RoundingMode.ROUND_DOWN); + t2("-5.7215753817629721723180740209343545067304363734183776559544e+941", "7016523421977501249723778592612429967458684107745534160459415336808848152279743423.0668", "-5.721575381762972172318074020934e+941", 31, RoundingMode.ROUND_CEIL); + t2("-7.02702276643566900354455889172971653055573e+208095", "3.1385249373648119405249018029681510060240311651663321860133526277691069177182640849572656671e+1153567", "-3.13852493736481194052490180296815100602403116516633218601335262776910691771826408495726566710001e+1153567", 96, RoundingMode.ROUND_FLOOR); + t2("-1.7832354748159574129369361988269904804308254487309290902349465951236972e+55700094", "9.90973236504901221625863735557853554449248096229915839712817629426762063100501286822728059080142235e+78756406", "-9.909733e+78756406", 7, RoundingMode.ROUND_UP); + t2("5.806100701116837194078609598286654001909211492267547200e-6351", "-3.1322555058724231886103050203444286e+8361722", "3.1322555058724231886103050203444286e+8361722", 89, RoundingMode.ROUND_DOWN); + t2("6.858541567594014583569e-92403457", "932344125683735556729917290084013738442958.911626146652618624368048421976479", "-9.323441256837355567e+41", 19, RoundingMode.ROUND_DOWN); + t2("-515603412562141323976260579.7608", "-4.3459986742e+61871", "4.3459986742e+61871", 24, RoundingMode.ROUND_UP); + t2("-2482.166560", "-8.7529651707683159200571472364119589276981748230359366217157560936540211030e+129", "8.75296518e+129", 9, RoundingMode.ROUND_CEIL); + t2("7137625499977739961.174647264422176975940443694511971170437331664836965532929116335954039", "6.344746501443024903148745334379114127368257359979286387628469760443123519696786e-564190646", "7.1376254999777399611746472644221769759404436945119711704373317e+18", 62, RoundingMode.ROUND_HALF_DOWN); + t2("-9.718417655944792606998316560239480283922e-4697", "-4.215428946661920636536185801565059268e-4262", "4.21542894666192063653618580156505926799999999999999999999999999999999999999999999999999999999999999e-4262", 99, RoundingMode.ROUND_FLOOR); + t2("-8.73155178653866580e-972", "5.65980788569468390921784398580677872138446786064513360271081e-9214177", "-8.731551786538665800000000000000000000000000000000000000000000000000000000000000000000000000000000001e-972", 100, RoundingMode.ROUND_FLOOR); + t2("-7.4825478541105716433040812574e-2957384", "-8933987726393636136642392373893254836880610561986804046816378730701943482730.285263", "8.93398772639363613664239237389325483688061056198680404681637873070194348e+75", 72, RoundingMode.ROUND_DOWN); + t2("-6.1868661228611360547121138333173109576855395466826784e-9251", "-3.3407355564230790311536623458601152993159e-206708339", "-6.18686612286113605471211383331731095768553954668267839999999999999999999e-9251", 72, RoundingMode.ROUND_CEIL); + t2("-8.2894772800817807e-795566101", "-882094911847133130492689954681328382693767501748865135497984118817292143479942556093392300518133.40", "8.820949118471331304926899546813283826937675017488651354979841188172921434799425560933923005181334e+95", 97, RoundingMode.ROUND_CEIL); + t2("-3.71e-54", "8.1409094135303963371158960125104271236131e-52265", "-3.710000000000000000000000000000000000000000000000000000000000001e-54", 64, RoundingMode.ROUND_FLOOR); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalModTests.cs b/DecimalSharp.Tests/BigDecimalModTests.cs new file mode 100644 index 0000000..82faa83 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalModTests.cs @@ -0,0 +1,1093 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalMod")] + public class BigDecimalModTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Mod() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 400, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15, + Modulo = 1 + }); + + var t = (BigDecimalArgument a, BigDecimalArgument b, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(a).Mod(b).ValueOf()); + }; + + t(1, 0, "NaN"); + t(1, "-0", "NaN"); + t(-1, 0, "NaN"); + t(-1, "-0", "NaN"); + t(1, "NaN", "NaN"); + t(-1, "NaN", "NaN"); + t(1, "Infinity", "1"); + t(1, "-Infinity", "1"); + t(-1, "Infinity", "-1"); + t(-1, "-Infinity", "-1"); + t(0, 1, "0"); + t(0, -1, "0"); + t("-0", 1, "-0"); + t("-0", -1, "-0"); + t(0, 0, "NaN"); + t(0, "-0", "NaN"); + t("-0", 0, "NaN"); + t("-0", "-0", "NaN"); + t(0, double.NaN, "NaN"); + t("-0", double.NaN, "NaN"); + t(0, double.PositiveInfinity, "0"); + t(0, double.NegativeInfinity, "0"); + t("-0", double.PositiveInfinity, "-0"); + t("-0", double.NegativeInfinity, "-0"); + t("NaN", 1, "NaN"); + t("NaN", -1, "NaN"); + t("NaN", 0, "NaN"); + t("NaN", "-0", "NaN"); + t("NaN", "NaN", "NaN"); + t("NaN", "Infinity", "NaN"); + t("NaN", "-Infinity", "NaN"); + t("Infinity", 1, "NaN"); + t("Infinity", -1, "NaN"); + t("-Infinity", 1, "NaN"); + t("-Infinity", -1, "NaN"); + t("Infinity", 0, "NaN"); + t("Infinity", "-0", "NaN"); + t("-Infinity", 0, "NaN"); + t("-Infinity", "-0", "NaN"); + t("Infinity", "NaN", "NaN"); + t("-Infinity", "NaN", "NaN"); + t("Infinity", "Infinity", "NaN"); + t("Infinity", "-Infinity", "NaN"); + t("-Infinity", "Infinity", "NaN"); + t("-Infinity", "-Infinity", "NaN"); + + t(1, "0", "NaN"); + t(1, "1", "0"); + t(1, "-45", "1"); + t(1, "22", "1"); + t(1, 0144, "1"); + t(1, "0144", "1"); + t(1, "6.1915", "1"); + t(1, "-1.02", "1"); + t(1, "-1.02", "1"); + t(1, 2, "1"); + t(1, -2, "1"); + t(-1, 2, "-1"); + t(-1, -2, "-1"); + + /* + Due to the double precision binary floating point representation of 0.1 the next 4 results + match BigDecimal"s remainder method, but not Javascript"s % operator. + 0.1.toFixed(18) // "0.100000000000000006" + new Decimal(1).mod("-0.100000000000000006") // "0.099999999999999946" + */ + t(1, -0.1, "0"); // JS: 0.09999999999999995 + t(-1, -0.1, "0"); // JS: -0.09999999999999995 + t(2, -0.1, "0"); // JS: 0.0999999999999999 + t(-2, -0.1, "0"); // JS: -0.0999999999999999 + + t(2, -0.5, "0"); // JS: 0 + t(-2, -0.5, "0"); // JS: 0 + t(999.99, -0.99, "0.09"); + t(-999.99, -0.99, "-0.09"); + t(999.99, "3.01", "0.67"); + t(-999.99, "3.01", "-0.67"); + + t(1, "0.09", "0.01"); + t(1, "-0.0001", "0"); + t("-0", 1, "-0"); + t("-0", 0.1, "-0"); + t("-0", "-1", "-0"); + t("-0", double.PositiveInfinity, "-0"); + t(1, "1e-14", "0"); + + t(1, "8e5", "1"); + t(1, "9E12", "1"); + t(1, "3.345E-9", "6.1e-10"); + t(1, "-345.43e+4", "1"); + t(1, "-94.12E+0", "1"); + t(1, double.PositiveInfinity, "1"); + t(1, double.NegativeInfinity, "1"); + t("0", 0, "NaN"); + t("0", "0", "NaN"); + t(3, "-0", "NaN"); + t(9.654, 0, "NaN"); + t(0, "0.001", "0"); + t(0, "111.1111111110000", "0"); + t("NaN", "0", "NaN"); + t(-1, 1, "0"); + t(-0.01, 0.01, "0"); + t(54, -54, "0"); + t(9.99, "-9.99", "0"); + t("0.0000023432495704937", "-0.0000023432495704937", "0"); + t(double.NaN, double.NaN, "NaN"); + t(double.NaN, "NaN", "NaN"); + t("NaN", double.NaN, "NaN"); + t("NaN", 4, "NaN"); + t("NaN", "4534534.45435435", "NaN"); + t("NaN", 99999.999, "NaN"); + t(double.PositiveInfinity, "354.345341", "NaN"); + t(3, "-Infinity", "3"); + t(double.NegativeInfinity, "-Infinity", "NaN"); + t("-Infinity", double.NegativeInfinity, "NaN"); + t("Infinity", "-999e999", "NaN"); + t("1.21123e43", "-Infinity", "1.21123e+43"); + t("-999.0", "Infinity", "-999"); + t("657.342e-45", "-Infinity", "6.57342e-43"); + t("Infinity", 123, "NaN"); + t(100, 100, "0"); + t("03.333", -4, "3.333"); + t(43534.5435, "0.054645", "0.019545"); + t("99999", "1", "0"); + + t("-0.111", "21", "-0.111"); + t("0.000621", "-1", "0.000621"); + t("6.41", "11", "6.41"); + t("21", "11", "10"); + t("1531", "-11", "2"); + t("21", "-0.0161", "0.0056"); + t("-41", "-21", "-20"); + t("31", "-1", "0"); + t("31", "2.21", "0.06"); + t("-842658.56", "-19.52", "-19.2"); + t("-34.871", "-7325043345", "-34.871"); + t("78691958", "49006.018397", "37298.472815"); + t("-11618324684", "621.3", "-394.1"); + t("0", "69.07362125", "0"); + t("0.27474921216", "0.00000000002460017868", "2.224673016e-11"); + t("0", "59137483772", "0"); + t("-0.000000000000000000014634493", "-4.2", "-1.4634493e-20"); + t("-5.470", "-1.8989", "-1.6722"); + t("-95519.5319132", "4.1", "-1.8319132"); + t("43.257", "-4704608304", "43.257"); + t("-32128.403", "68263.11", "-32128.403"); + t("85.4005884", "-0.000000000000000010953667", "4.132633e-18"); + t("3197.909", "-10738864.39", "3197.909"); + t("1.03436722695", "2.6", "1.03436722695"); + t("-4", "-56.36464628", "-4"); + t("92.0618", "-454.866", "92.0618"); + t("-6.147123243", "-53259.9", "-6.147123243"); + t("-3", "-0.4911", "-0.0534"); + t("0", "-12.3", "0"); + t("-0.001713264153", "0.00000000000000000001843605", "-1.36779e-20"); + t("2", "-9325.1665961", "2"); + t("42016273.6500", "-122.861496017", "99.24210634"); + t("35.9", "3867744417", "35.9"); + t("0.000000000000000479760268839", "-209975.082", "4.79760268839e-16"); + t("0.0000000000000000000428713848", "3", "4.28713848e-20"); + t("0.000000000000000104698757876", "-15902.7654", "1.04698757876e-16"); + t("-4", "3124473.52104", "-4"); + t("-9.58", "1.00", "-0.58"); + t("79", "1", "0"); + t("0", "-0.0000000000013618", "0"); + t("1.55", "-31", "1.55"); + t("-2.6", "-13.58133", "-2.6"); + t("0", "90950", "0"); + t("-46.1", "61.8", "-46.1"); + t("-0.00000000000023461", "-0.00000000134", "-2.3461e-13"); + t("-9761.89778", "4645363921.75", "-9761.89778"); + t("0.000000000000000090372203", "0.00000322253", "9.0372203e-17"); + t("-23560577.226", "-0.5304109598", "-0.3270269352"); + t("-11752006.868", "0.003773", "-0.002016"); + t("0.000000036524", "-1.2", "3.6524e-8"); + t("4713.9562", "0.000000000000000000561", "2.23e-19"); + t("-351870798", "28.8", "-1.2"); + t("-4.6", "-0.00000000058", "-4.4e-10"); + t("-21863.82", "4214.9937962", "-788.851019"); + t("-30.221041721", "20401.1", "-30.221041721"); + t("-2.35", "3", "-2.35"); + t("64462", "90.840", "56.44"); + t("46", "433563.55477", "46"); + t("47852501568", "-147426331397", "47852501568"); + t("0", "3812504.1", "0"); + t("0.000000000000142963770", "1210345642.9", "1.4296377e-13"); + t("-0.0024002323743", "-0.000000000000000013220659", "-3.535752e-18"); + t("225.773", "66128.74787", "225.773"); + t("-158.4165", "12.78", "-5.0565"); + t("-21042099137", "10.935", "-4.565"); + t("32791.03", "411590460", "32791.03"); + t("-1984910.86246", "-153845.7", "-138762.46246"); + t("75010460639.6", "-0.00000000005103249", "2.835305e-11"); + t("-0.00000000000000025595509", "25.023", "-2.5595509e-16"); + t("-103052291", "-350.4", "-1.4"); + t("0.00000000000000015307870924", "-0.0000035499", "1.5307870924e-16"); + t("4402230", "122.112", "92.4"); + t("-3073677", "532.95653726", "-116.64962158"); + t("-0.026619162", "-0.00000000000000010", "0"); + t("0.000065666975666", "-6.558", "0.000065666975666"); + t("-3.3", "0.000000000033194405282", "-1.2721464422e-11"); + t("94101.0", "-810285.8180", "94101"); + t("229868", "9654.7078", "7809.7206"); + t("0.000000001926", "-0.00000000000000000005918", "2.562e-20"); + t("67", "0.00000006016496", "2.00248e-8"); + t("0.0000000000000000000832655", "-327907966408", "8.32655e-20"); + t("-1534", "-293318.339", "-1534"); + t("0.00000000000000000511522652", "-1145.46888006", "5.11522652e-18"); + t("0.00000000465574", "707.0", "4.65574e-9"); + t("0.230910067", "-1712.01", "0.230910067"); + t("-31874.7", "-2617976302", "-31874.7"); + t("22.8", "3819", "22.8"); + t("-0.0000015419", "329", "-0.0000015419"); + t("-9176.3441", "741523.991", "-9176.3441"); + t("-5.1103", "-25460.136", "-5.1103"); + t("15232730973", "-2.28", "1.32"); + t("0.081", "-1111.578", "0.081"); + t("3.1", "-42.207", "3.1"); + t("-0.000000000000000433", "0.00000000000000000254528412564", "-3.016986412e-19"); + t("-83943.1", "-4303134750", "-83943.1"); + t("19.825539", "4432543.44", "19.825539"); + t("-2416", "8097.16337", "-2416"); + t("-3.836", "0.00000823841385579", "-0.00000502522549283"); + t("2290356160", "-965232.20", "825381.6"); + t("1.12", "-35806.5278", "1.12"); + t("0", "-0.0000144726783", "0"); + t("-1571629111.33", "6.4736", "-3.8676"); + t("-0.0053778", "1.1", "-0.0053778"); + t("-0.0000013840", "-12.1", "-0.000001384"); + t("-22.9310218204", "-1.6843970", "-1.0338608204"); + t("-71.300", "-25.868806", "-19.562388"); + t("0.02847", "-63397392.02", "0.02847"); + t("-0.0000000000000331096", "0.00000183271", "-3.31096e-14"); + t("-27821115", "-34.83906", "-0.40734"); + t("0.000000000000436294954175", "-2261.01154", "4.36294954175e-13"); + t("45.86441", "-530611.936214", "45.86441"); + t("-1999679428", "0.00000000000000000002297558409", "-5.828173e-23"); + t("-105924.2800", "-426.10612", "-249.96224"); + t("754.9", "-1", "0.9"); + t("0.000000238266109662", "29355.83", "2.38266109662e-7"); + t("25.3", "-0.00000000000000086417416", "5.8408656e-16"); + t("-1261.3", "39.0", "-13.3"); + t("1.017", "-153", "1.017"); + t("27.690", "-21507592", "27.69"); + t("-2623.072516", "3.06", "-0.652516"); + t("91", "13034138.923", "91"); + t("-5212749.21", "-0.00000000000000000001986395", "-2.1827e-21"); + t("117.4212", "-29.978", "27.4872"); + t("-47179.732", "-77504621680", "-47179.732"); + t("0", "-3.7234", "0"); + t("443705716.830", "3024.9575", "1925.7725"); + t("-0.000000000000000000017191196518", "-14.725715414", "-1.7191196518e-20"); + t("30.4", "399719414108", "30.4"); + t("16145.97", "-48642", "16145.97"); + t("2765166", "-18.6825", "6.54"); + t("37.63", "-1284.342", "37.63"); + t("-0.0000000000000000000177845858", "0.0000005860954024", "-1.77845858e-20"); + t("-2.3", "2582.24565000", "-2.3"); + t("16.7", "-0.0000000017369", "1.362e-9"); + t("170180366706", "4626.181", "2388.659"); + t("-1404312.6", "-17000256053", "-1404312.6"); + t("-7603530366", "316.496322753", "-236.943012537"); + t("8", "1.59866", "0.0067"); + t("-4.963", "8.73", "-4.963"); + t("25644160.8", "-5842.06855", "3321.93405"); + t("-4.31384", "-220.2", "-4.31384"); + t("186.9", "-48200.85", "186.9"); + t("5", "57089.99", "5"); + t("-244278052979", "-2", "-1"); + t("8", "-5763.4", "8"); + t("29549", "-1", "0"); + t("-2.0", "-0.00000000000000446955628", "-3.76062704e-15"); + t("737330.9", "-746370915533", "737330.9"); + t("-0.000882183174", "-16.5", "-0.000882183174"); + t("-45", "0.000000001106035", "-7.5858e-10"); + t("-594.06", "-29.85802821", "-26.75746401"); + t("-27.648237", "-1047.5249", "-27.648237"); + t("2", "-739163.624", "2"); + t("544827.1330", "54848981.1", "544827.133"); + t("1", "0.00000000000076553", "2.9959e-13"); + t("-10.89", "0.000000000000000000047", "-5e-21"); + t("-3052.938", "9327.5819201", "-3052.938"); + t("-24.1", "127758.429", "-24.1"); + t("3.9", "12173.38", "3.9"); + t("0.0000000000000213926861909", "-77.4", "2.13926861909e-14"); + t("-90173804.260", "-5062619.06909", "-4109280.08547"); + t("637", "43943.2610", "637"); + t("14867.1", "894449", "14867.1"); + t("7.3", "-1.1", "0.7"); + t("2894844.4", "-1", "0.4"); + t("-0.00000000000196", "-2.6741", "-1.96e-12"); + t("0.00000000000000071433493", "5.9227", "7.1433493e-16"); + t("69", "-7204969", "69"); + t("-12468163", "-10022891.867", "-2445271.133"); + t("45469.1932906", "-3095367650", "45469.1932906"); + t("73072906.39", "-112013211", "73072906.39"); + t("1.4", "972.159255713", "1.4"); + t("66924.3855375", "19.93", "19.3755375"); + t("26.4256214076", "11.4775634275", "3.4704945526"); + t("23362.0174956", "-0.0000000001748", "1.536e-10"); + t("18276818006", "-5.74", "1.1"); + t("-8319.8", "3", "-0.8"); + t("-7.7413714358", "43763934316.0", "-7.7413714358"); + t("-688566579", "-1.83", "-0.3"); + t("29854", "-268509731.22", "29854"); + t("-194.15246", "-3.2255572", "-0.619028"); + t("2.0186177", "-326915", "2.0186177"); + t("-4", "1259", "-4"); + t("3.56", "-0.000000000000000000515993", "1.2338e-19"); + t("0.000001783", "-16426085", "0.000001783"); + t("-1766987819", "-87.259", "-49.72"); + t("-17.1", "0.00000000000000021840564", "-5.750892e-17"); + t("-8589.659", "0.000000000000000505", "-3.75e-16"); + t("-65891.7", "-38663.83", "-27227.87"); + t("-1.0", "0.00000000000000003836", "-1.78e-17"); + t("-33378.26", "-1226528.13", "-33378.26"); + t("2", "492342441", "2"); + t("1274", "-3092459411.0", "1274"); + t("0.2631770", "-493249535.4", "0.263177"); + t("-0.00000000000000000141", "4201192116", "-1.41e-18"); + t("-574.29154", "133427.3", "-574.29154"); + t("104617.3", "293188753.50", "104617.3"); + t("0", "38.96345", "0"); + t("-0.0000017289693288", "-5.4", "-0.0000017289693288"); + t("0", "4", "0"); + t("9.65", "1.2", "0.05"); + t("0.000000000017", "-50377365", "1.7e-11"); + t("137.3064", "0.0000001012", "7.04e-8"); + t("-9.89405", "29.2", "-9.89405"); + t("3.23", "-3048751.09", "3.23"); + t("87020568364", "-1", "0"); + t("-3658", "-0.4067222", "-0.3472554"); + t("0.0000000000483229749", "-508858", "4.83229749e-11"); + t("3", "-0.000000000000000006525172012", "6.0850742e-19"); + t("-52.63", "-373.710", "-52.63"); + t("-6.49915814", "352.2", "-6.49915814"); + t("0", "-44190.198", "0"); + t("0.00000000000000003763584929", "6", "3.763584929e-17"); + t("1.299983", "194.7", "1.299983"); + t("1", "9.52", "1"); + t("-86603.9", "446867516", "-86603.9"); + t("-1482885.420", "-0.0000000018878840", "-9.643e-10"); + t("-170.531717", "-633436587.6", "-170.531717"); + t("15.36378", "6540.267", "15.36378"); + t("-20570.61", "18.955913858", "-3.44346407"); + t("77", "0.000000000000027", "2.3e-14"); + t("0.000000001687849", "-0.0131699248663", "1.687849e-9"); + t("-0.000000000000026", "3291407.1", "-2.6e-14"); + t("-290.613", "0.00000000000000000008353794", "-6.386436e-20"); + t("200", "66.97", "66.06"); + t("2.2", "-43.41589", "2.2"); + t("98201.177964", "0.007000", "0.004964"); + t("35.453991547", "128.68861", "35.453991547"); + t("5.27", "1", "0.27"); + t("-1", "0.000119683476689", "-0.000044552263405"); + t("-34.0", "3", "-1"); + t("3378", "-44180", "3378"); + t("15", "-4", "3"); + t("0.0000004190944243", "37285824.4", "4.190944243e-7"); + t("-298.4", "506466", "-298.4"); + t("-0.00000010893", "-0.000426882829396", "-1.0893e-7"); + t("-1.9756065817", "941.5", "-1.9756065817"); + t("-1026297.2", "-205657.802", "-203665.992"); + t("2", "0.0000000005621541447", "3.513430991e-10"); + t("-7951901.67", "-0.0000000000055383", "-2.3814e-12"); + t("9", "0.000000000015125851830", "7.24233339e-12"); + t("72.245762", "-39.70217", "32.543592"); + t("6.62321", "-912632", "6.62321"); + t("617021", "-42.5970821", "2.2657815"); + t("1469815.28770", "537.217915", "524.290175"); + t("345897.6", "-0.00000000000108024", "9.7032e-13"); + t("0", "1.8688906295", "0"); + t("164", "-82114.2", "164"); + t("57.84537", "-1.4", "0.44537"); + t("114.340500", "6333334050", "114.3405"); + t("4.80", "-6077773.6", "4.8"); + t("162", "-37.75886044", "10.96455824"); + t("0.000000016367092", "1", "1.6367092e-8"); + t("148.2", "-46", "10.2"); + t("1.5768318844", "-7512089036.8", "1.5768318844"); + t("-0.0000000000000014460", "0.0011257005", "-1.446e-15"); + t("64.079", "-141", "64.079"); + t("-0.0582", "-13.35353476", "-0.0582"); + t("-1.0007", "63155.153933", "-1.0007"); + t("-623313173.6", "0.0000000081031", "-2.4548e-9"); + t("-36.9", "-1", "-0.9"); + t("2.0857", "0.000000000000000000205859744928", "1.887979864e-19"); + t("0.0000000494417", "492420240", "4.94417e-8"); + t("0.000000000000012194", "0.000000000000000013778591965", "1.372470294e-17"); + t("-16179.166", "16.4610327", "-14.4318886"); + t("3.24", "55986", "3.24"); + t("-61938", "47825328585", "-61938"); + t("4.36", "-1", "0.36"); + t("-9857364.3", "-1", "-0.3"); + t("9943.75", "3.5", "0.25"); + t("151.4907", "-1", "0.4907"); + t("0.000000000113985670", "-2286508", "1.1398567e-10"); + t("-1468", "-12915320.7", "-1468"); + t("46.543901", "0.00000014040913", "3.32077e-8"); + t("3", "190.34681", "3"); + t("-468.5022", "-0.00000000309208106131", "-1.13251725725e-9"); + t("-0.00000000000153707", "-112649.31435", "-1.53707e-12"); + t("-1.5", "0.000000067829063910", "-6.729086517e-8"); + t("42031.2", "-1.165644", "0.408648"); + t("-137623012.4", "-71.9609", "-21.9379"); + t("-278354", "8", "-2"); + t("5370.3", "71543859", "5370.3"); + t("-0.2469826911", "-0.0000000000008289323096", "-3.584481336e-13"); + t("338.68861185", "0.000000000000371927032", "2.00995384e-13"); + t("-0.00000000144", "115767.5757", "-1.44e-9"); + t("-3183918.6386", "-980.559", "-43.5656"); + t("-0.000000000004661097", "-0.051176618", "-4.661097e-12"); + t("-1", "948.171", "-1"); + t("1057394189", "62.751", "54.866"); + t("167.9", "0.00000000000009753", "8.45e-15"); + t("-12.172", "800.4476", "-12.172"); + t("-1.4", "-139187231194", "-1.4"); + t("359356.2", "-0.006806", "0.005734"); + t("4744567.6711", "-1.74", "0.0511"); + t("-0.0000000000234390", "-75.75283631", "-2.3439e-11"); + t("-6557078727.02", "-0.000000000000000015", "-5e-18"); + t("-1.33", "-5.111037", "-1.33"); + t("-431.277", "-1", "-0.277"); + t("0.0000000000000000000697336", "-8212.9015367", "6.97336e-20"); + t("3370.2674507", "445.572089", "251.2628277"); + t("-2.33567", "-0.0000000104784", "-8.888e-9"); + t("0.00000983659", "83423921", "0.00000983659"); + t("-51.2", "-0.0027394686", "-0.0020713346"); + t("0.000000000819617035421", "0.000000011", "8.19617035421e-10"); + t("0.00079279091535", "7", "0.00079279091535"); + t("-0.000000000095324834", "28091.00", "-9.5324834e-11"); + t("-0.00000000000000015", "23.52", "-1.5e-16"); + t("0.1438", "1035688.4", "0.1438"); + t("16693", "-1", "0"); + t("-781.09402123", "6.9", "-1.39402123"); + t("1", "20.70", "1"); + t("-3", "0.000006782445", "-0.00000249249"); + t("0.00000000000000000022", "-54710642.596", "2.2e-19"); + t("-590.69625205", "26.40", "-9.89625205"); + t("10", "-5.67", "4.33"); + t("-7", "-0.00000000000643634802", "-3.80362768e-12"); + t("-9680099.05", "-62.737684457", "-50.764391642"); + t("-1.5", "9914.9781", "-1.5"); + t("-1", "0.0000000507688288763", "-3.15199093625e-8"); + t("-0.000000000032713211391", "-0.000000046529", "-3.2713211391e-11"); + t("5.40", "1612427.39748", "5.4"); + t("0", "-0.0000000000000000000146", "0"); + t("-0.000000000000000000817527", "-52.0", "-8.17527e-19"); + t("1053329.8", "-120573.937", "88738.304"); + t("0.0000000000713", "-100743.840", "7.13e-11"); + t("8219", "-7505759130.86", "8219"); + t("16655.7", "243", "131.7"); + t("259.650", "278.73", "259.65"); + t("-284.091", "-1", "-0.091"); + t("0.1250", "-23713.35", "0.125"); + t("0.00000000490018764513", "-4.41", "4.90018764513e-9"); + t("-584.70403", "11076992", "-584.70403"); + t("-221.643", "-30.5", "-8.143"); + t("-9.69", "1177241", "-9.69"); + t("-4.97845868064", "-1.3178692059", "-1.02485106294"); + t("-1.04328912629", "-12.828540", "-1.04328912629"); + t("26", "-4.91596", "1.4202"); + t("94.686", "7.5851", "3.6648"); + t("0", "-0.000000000000000363", "0"); + t("-1.431", "65.06874", "-1.431"); + t("-878.898828", "-5.21", "-3.618828"); + t("-0.00000000000000014146660", "1.05112178985", "-1.414666e-16"); + t("0", "360.6112165", "0"); + t("4.464476", "0.00016302503", "0.00003555345"); + t("1145096", "-217.15", "64.05"); + t("29.46", "104.40", "29.46"); + t("841.82", "-2171922.59229", "841.82"); + t("46", "1", "0"); + t("22829.8889", "-1578709411", "22829.8889"); + t("-0.00374341104", "1.2", "-0.00374341104"); + t("410", "7", "4"); + t("0.076125848849", "1.103", "0.076125848849"); + t("0.000001844875808", "0.000000000000020813", "2.0037e-14"); + t("6.685", "0.003905472818", "0.002736008402"); + t("41011740.6", "908.670191", "728.869597"); + t("-152.527", "-1", "-0.527"); + t("12815.035", "-1497.81264", "832.53388"); + t("-0.000000000000004048729", "0.00000000126", "-4.048729e-15"); + t("-19949.700625", "-314.64", "-127.380625"); + t("-2.4", "569419658.2", "-2.4"); + t("0.00000000000000597954708", "4", "5.97954708e-15"); + t("-17.0", "1.58", "-1.2"); + t("22811600498", "2", "0"); + t("3.1328", "-119317.4", "3.1328"); + t("2.26039694", "1567.2", "2.26039694"); + t("-0.0004559", "-1.59", "-0.0004559"); + t("-0.000000000000165", "3", "-1.65e-13"); + t("-215.9051", "14846316.4792", "-215.9051"); + t("-1", "6004363.2", "-1"); + t("173513829480", "-117.2937046", "37.6296904"); + t("2269413223", "44.831", "39.204"); + t("-1411953.506", "0.000003338150524", "-0.000001742597716"); + t("-26.596", "-7", "-5.596"); + t("-0.00000000000010245141710", "6652789979", "-1.024514171e-13"); + t("2.042", "24673", "2.042"); + t("-2.71", "68.05392544", "-2.71"); + t("-3", "220821.80", "-3"); + t("116.073", "-0.0000000000024392780", "2.029598e-12"); + t("-0.00000006283674", "0.0000000000000079", "-5.7e-15"); + t("-3", "-7", "-3"); + t("-0.0000000000000005058", "-1.5", "-5.058e-16"); + t("-683", "1013123.5", "-683"); + t("-6", "16985130.432", "-6"); + + t("2318237922853539360.167157597022570", "-9702015238687.680494235371626139504030926823802574", "9295675788919.833075194557918488338251940141560718"); + t("-3346995255.54414928936", "-19484973963827626752773520333240590885639375", "-3346995255.54414928936"); + t("-270721769", "22539228.03492196260802407744489638356810047", "-251032.58093644870371107066124339718279436"); + t("-0.00000000000000000308066481692295683548642301228852180070143433425056969292333", "206232915.762239501154732324", "-3.08066481692295683548642301228852180070143433425056969292333e-18"); + t("-0.00000000156454306292867840840689", "2635", "-1.56454306292867840840689e-9"); + t("12886035692416820.3977457533594029154555584175743", "-113496127978790341.941210015456704515", "12886035692416820.3977457533594029154555584175743"); + t("-299395547.883083669188105176893563510454667", "-3152.9580", "-115.077083669188105176893563510454667"); + t("8076327350.789696755252236317", "9", "5.789696755252236317"); + t("2241730616485747642201052100686334", "15115372376051.1433309224128", "15028644606255.6407694748928"); + t("0.000000020545442143", "910205431326260.56522101419792183224139104902865869227", "2.0545442143e-8"); + t("-299.2", "-1095069605114867345071265098807585478368438601713540771676", "-299.2"); + t("0", "-0.00000000000000000006258032721", "0"); + t("-9561792051.46130", "-0.00000037912322661422", "-3.0664875638608e-7"); + t("-4589.274150042", "5463826693798.059180748770", "-4589.274150042"); + t("-177372488891124.8209441829612234253673371", "-2184484411972.871928873110", "-429251521322.1947054610512234253673371"); + t("2840794355990579101690516447419567416103576933551526", "-225384346136689418.311568171615", "4159399848092788.810925291935"); + t("433169940324134426366793327.235", "-1918606541369710.9167801826", "369802826989779.100695574"); + t("0.00000231962990639112417450960779176176525188784519762202020426278", "11491626.8146875740651454657723913302260", "0.00000231962990639112417450960779176176525188784519762202020426278"); + t("-118317530966985340050567.3794340230", "-1290337888625470391870404816877827630953112876.297", "-1.18317530966985340050567379434023e+23"); + t("507941745866485347809651792.3258074064530387681549475622", "-78.8876", "48.5294074064530387681549475622"); + t("3280516686867.41769205935464611912132313550145186748", "-0.00000000000000125477", "5.0338132313550145186748e-16"); + t("39.99", "-196.666", "39.99"); + t("198328732837738155510399443.82996", "0.049415792708", "0.034407057628"); + t("23.9909397975464820637937485614", "0.0000000001050229258855441", "8.54924991032156614e-11"); + t("-1157214583831665284482", "1.0988344", "-0.0759048"); + t("19626.043251177620", "0.0000000034291719721621", "1.7452276531105e-9"); + t("11144329315299884830592174718286.015391668774749336449044", "-276730.619204816478", "84261.983174911066749336449044"); + t("71.3348063927327012696442274193666742024", "1.003", "0.1218063927327012696442274193666742024"); + t("2353.964728726069", "-1147885339335726766004631.4827280116227481840172642411087841", "2353.964728726069"); + t("-3.4", "99841150890712628939215423679763543630485717", "-3.4"); + t("-17423609848720294448155093008156493860946579332348817", "-407401303.1", "-39793145.5"); + t("268219889", "66408.228187594864", "63463.578491939168"); + t("-7067928231578399800943353710459167713.4021506", "-44099.172874028", "-34277.265446476"); + t("0.0000000000003143", "0.763206816948175243403280699590867", "3.143e-13"); + t("4.036744136250", "0.00971177", "0.00635958625"); + t("1793819.269108", "493646013195.8520", "1793819.269108"); + t("-15826468630.86978", "-0.000000000000000000372629410691473337097845426967193919000496413569810554360", "-3.3602620906243362074116532307435310028959396493592065148e-19"); + t("-18.7707479011363", "-0.00000000000002581603178761489486464393960475608950385662413624987", "-9.1067040799565470223405647782611453765936052898943e-15"); + t("238432236541400642177165.39210", "-5", "0.3921"); + t("-6811268416946324947973610791528879575619937612025", "0.0000000000000001069504654335424482337205845600046597647661", "-8.16882733210848477277494710610839496492589e-17"); + t("-0.0000000000000001763427790981229873712832162", "-0.00000000000000000002454861590426229238192323806393241482688272809526858064170", "-1.00710578069411919285971867734642985013640916857852506689e-20"); + t("19755770505453660565232908.50109071", "11636774869145974997.1", "6173329669666681241.40109071"); + t("-0.0000000000002209009508639970169662640887364083811", "0.000000000000000089645450775854240465099382429782771424049138745143690592", "-1.4560152292168460259210429423632311142922131965946381312e-17"); + t("563088", "-0.00000008456562014728262541201891984898", "2.11408406705846430113462806523e-8"); + t("0.000000000000014349029064561994176595511", "-185.73981699167343715247600", "1.4349029064561994176595511e-14"); + t("-0.00000000001083082172818863769543", "1190273509470734307.14840", "-1.083082172818863769543e-11"); + t("-0.0000007000816503264538441903792097551608671", "426939", "-7.000816503264538441903792097551608671e-7"); + t("-74639664.5738469080670677219615636886365697", "11681605088890876252615.81485333", "-74639664.5738469080670677219615636886365697"); + t("-17473762843659544328007830640965916", "4735599287262364762422146713625.0556784154158620151196", "-4.1370729486807194325314144030856023255308850262237956e+30"); + t("-35798372944152782907433662314743475258228956226653087.007402", "2986648933436031786673397525017144049.527376", "-2.586979851276128040119426347481949619034666e+36"); + t("594962882338997095.95600951831319665393181826", "-0.000040093460748026675395936734376802508692547860", "0.00000106629014969426833642467613848819248141182"); + t("-730572579439411951784822207340668557", "0.0000000000000028", "-4e-16"); + t("0.000000000000000001168651449131923286954932276275033439404771143330881475", "-47210255.27658777658181021168421281357", "1.168651449131923286954932276275033439404771143330881475e-18"); + t("-30769567698.202004635902421797597470637", "-2117030646075139493515312478944809325583483881105", "-30769567698.202004635902421797597470637"); + t("0.22203824107047587018951755693974277131200048220", "-136.52076", "0.2220382410704758701895175569397427713120004822"); + t("4489045408103326401151265241469016732232592556114681884438", "0.000000000000001314763381159004315842197", "6.8074495798791174068935e-16"); + t("-21348129287570112842795163717617654521736400718052510", "-1995504519697835638540568077.0196418", "-1.1402642626986948193867205135517104e+27"); + t("-14.48287435139371979106", "-278112747003022610742126629257947172194929.64536", "-14.48287435139371979106"); + t("0.0000000000000110719145581948062251355493585472867", "-7978399748.1558009430388367158631487853516499292946094", "1.10719145581948062251355493585472867e-14"); + t("119501784974", "-0.0031818401885065375156179", "0.0016290398380208417060804"); + t("-0.133707475845003705950317295850288779512882217932", "329652021145697865591302212038174941275757995054.713783674845", "-0.133707475845003705950317295850288779512882217932"); + t("-12542871568091185279.0460234294798148233", "25754.120417", "-21877.7952474294798148233"); + t("-3818054566.20841286030331762281612", "-1936.24778639274331686587963417792515204476546099", "-472.43293099041187629213445041741051174848665583"); + t("118000308055.9373727402663957624604063", "9918.67574327356", "4846.8753496034663957624604063"); + t("-11.38", "-24193758424792525116909481098205.677446", "-11.38"); + t("2.46889727437003280961289299604392122014099570", "-4644753841435365046988433379518839103541882981334804890807.8", "2.4688972743700328096128929960439212201409957"); + t("1805667164641860305883.31324", "0.00000000016618955069904640141657751519707415214669847044", "1.046133052518583849356487736801523519251586328e-11"); + t("-0.000000000000000000012169689776926610597997556555980427323944885949030949402", "-434910402113045297454505.1302573189763520", "-1.2169689776926610597997556555980427323944885949030949402e-20"); + t("-1739.4", "0.155584511367509963502532516739270411", "-0.120747422606118005188995371696075431"); + t("-569589695561180399227800563933576000706960457.3656765081522", "3483.46493456384339944984809629410413910476502", "-3467.25917700145185407850776398960809939327178"); + t("27827944878804.043096443231553973596298120", "327784539432851688676.574297", "27827944878804.04309644323155397359629812"); + t("-0.0000000000000000000273570270893076789122004877379023084477997941182649713787", "55071786762378989.632689594", "-2.73570270893076789122004877379023084477997941182649713787e-20"); + t("-1", "30698458.1545228514266", "-1"); + t("-77.6796737181065072239544734403386720988476876081692968190", "-48043379.33911367817680827247020826", "-77.679673718106507223954473440338672098847687608169296819"); + t("-0.00000000002231552048713565363805177481170756001463248", "-7745938658044151", "-2.231552048713565363805177481170756001463248e-11"); + t("4080930738001215900471542815678.870", "-259094.384407758455239", "219215.641754292988748"); + t("-65148376658415.8821831041618603950", "176.7", "-41.982183104161860395"); + t("-20649466814.805802613083057980846632715554163812995", "-0.0000000001319860149268122557211741866249364289650956", "-9.623959984992160004489809813728963916899e-11"); + t("-8637039792424460231", "1171511157428179825785002.9414399798460302750", "-8637039792424460231"); + t("170120714324740496497515610676549361259437493939036", "0.0000001984234593401508456286993357944778724317751259644793106", "1.80272091831781979821089649811533712715612789460516662e-8"); + t("3040385342.35657760274052", "-372946621956569451.93539995558371617994622295531744", "3040385342.35657760274052"); + t("234417346052636032.106833697570476435658983423056", "405728269025466785030711845788149565209977.743", "234417346052636032.106833697570476435658983423056"); + t("3003698058950457901967364.923201608", "-0.00000000000033926708389437080558726155721138587500872389823", "2.3077148260391721408496333950768060426097166773e-13"); + t("-1", "13121297327432473503324600878404", "-1"); + t("-0.00000000000086987493647337590015438704985", "1126309963348141179998313355117347492625867522.06445459173", "-8.6987493647337590015438704985e-13"); + t("0.01175883004658442799157", "-1304796615695885174911897002429657121243.096878772927435101", "0.01175883004658442799157"); + t("-4.1", "-925940.0049", "-4.1"); + t("94413979984015715031.72143", "-44956570520496128861135438942192313346223.4679844", "94413979984015715031.72143"); + t("-2084.96276512750756221737052806049261165250425", "1.5202660037865707", "-0.67807393611913251737052806049261165250425"); + t("5530042131715182582", "0.00000076755550127601384796182326285660346554068838", "4.3620483782819522891660511451578934939479584e-7"); + t("-67042.802", "-28411888994.212820705785482909844033014", "-67042.802"); + t("-5360742.0", "327368856548045.08220112714929243516", "-5360742"); + t("47117230722.16973123915245237545229011004357913004", "-47488231.617918014245187991287717374685823103416490829", "8904957.195061107925965018036654421707060540881097632"); + t("-0.000000000000151343572349948255798487186356", "42.39640064100021994629331666", "-1.51343572349948255798487186356e-13"); + t("113840373593648670861500086", "16082411799435623101958677220820405667", "1.13840373593648670861500086e+26"); + t("-8.22", "-2867798109411674.996765068247085164513407273890902397064937", "-8.22"); + t("-3.50238614", "-6860188389136636488339219859054193101069684390", "-3.50238614"); + t("107107360259917227679425620190.388983860971684", "8800479523270977282088607107997626691064406556317263323.341", "1.07107360259917227679425620190388983860971684e+29"); + t("-175822.1223383477", "-88621983013742415713.67926832", "-175822.1223383477"); + t("-0.0000000001165498478337125015371156469966957212161218123244751", "-62550285299530518719359714148367546793907", "-1.165498478337125015371156469966957212161218123244751e-10"); + t("0.0000000000000000320110187403311537074296810233047925148", "-60407506473103.897451724471", "3.20110187403311537074296810233047925148e-17"); + t("-0.000000000000000338282064563114", "-96190376454071434357.783403611375151575341982065544942431", "-3.38282064563114e-16"); + t("-0.000000000000446753711341", "-9.4", "-4.46753711341e-13"); + t("369078971611659797359596697169091.7394557", "4390355307871218680185944", "3.2920328769890124360129157394557e+24"); + t("0.00167752355829931578551694576878658836500507142636702529088528", "3276066309050", "0.00167752355829931578551694576878658836500507142636702529088528"); + t("-40341913269616270298908054352.555424105652", "-76.6805753", "-22.343535105652"); + t("0.000000000000000234899796181467417005659941", "-0.00000000000000002455754630676905247611", "1.3881879420545944720669941e-17"); + t("-2288200091016313974155687089998490026813781889257797", "173612435224249143072698340434416969557762958", "-4.06305517399251906560023908396396030698941e+41"); + t("-119.570203264189", "0.00000000000000000270873280446606560343105459296495864", "-3.0654086667132932857371380394960016e-19"); + t("9636003428434421863325355207384758", "27189148267469.7985900247652", "763104629651.47867591268"); + t("336.422676596", "45198935114500.3922307046", "336.422676596"); + t("-14.0627943158485824648781649958871436175344604029182482603314", "514937038588634.2538384203447", "-14.0627943158485824648781649958871436175344604029182482603314"); + t("0.00000023418399644897328432613203542773200097298268", "150.05994", "2.3418399644897328432613203542773200097298268e-7"); + t("-7549019185595.78985813486261693520665842030485693423", "0.00000107047", "-3.7760261693520665842030485693423e-7"); + t("2084", "-4702062390.892", "2084"); + t("-0.000000000000004338", "23.449915", "-4.338e-15"); + t("355378988141704324089218417352212802.4373051939435896809", "-410089.6820", "397574.1193051939435896809"); + t("-0.00000001989462540690061730462809985539649615779", "-38.286442069994941913718432", "-1.989462540690061730462809985539649615779e-8"); + t("18131048627056749262739468342.355859006591", "-1199.6142723004281428", "211.04880824112304"); + t("-7485271015053088795456302791998022618551521.6832", "0.0000000000000000000469320709938399196323702081094328803321", "-2.69710660151015687863998038860418026399e-20"); + t("0.000000000951589985684289940380019704065655070039753", "-26373114201649323963859575.5038618827163", "9.51589985684289940380019704065655070039753e-10"); + t("29612852829840055823.4234313598", "-0.000000000000000000390000839472495342007727670085919905954881", "1.00427280201824924510562417012541840544546e-19"); + + t("-0.0000000000000001612847241392420250768267369", "17433478642639304.4236073577621811634134", "-1.612847241392420250768267369e-16"); + t("-1883174595828380403709352050091085026369077660279268.9", "-0.0012895", "-0.001097"); + t("-125549014214.7375819121786172926612698843039792917253281", "-101.5885766453", "-100.8153792133786172926612698843039792917253281"); + t("1065766474589037077293252213448", "104.84555", "81.7216"); + t("-0.0047533898584759553535897361825760775807323217889394835", "-18213101567414468503998329412491692494599546949.8", "-0.0047533898584759553535897361825760775807323217889394835"); + t("1270005291407.8881300436", "4138621074845956468.09769209", "1270005291407.8881300436"); + t("-260441856275307932803222450437995247080731478", "704992903069127.4325788", "-431855187882906.333326"); + t("-0.00000000000000000009754763692467059466885260432113614665268499743", "-1095452837.106034703346392429672156", "-9.754763692467059466885260432113614665268499743e-20"); + t("15.2", "-9898.141488362", "15.2"); + t("-4.642097816103323517795932640", "2320173035769155029864.2360071417144711754883993503027", "-4.64209781610332351779593264"); + t("27232043073441728507866158240.138995261078", "-215290045818292170941580969748443497", "2.7232043073441728507866158240138995261078e+28"); + t("-7820551181460133788154158506805766936661586187217825438.43", "9043807302.81268", "-8827979159.46068"); + t("40454701041551859098452066940764312196468.06490346453770", "1.43336157528769251880838", "0.053020665769834197966"); + t("0", "6893071800513.175", "0"); + t("-23294105221282442798534198559904763230604376248570", "1108006854160532581.643019501", "-634324850398077026.428796591"); + t("-70.48", "425148951767015.661297750583259821000170", "-70.48"); + t("-40097263.65021696329198038628255519578725029828361985869", "8008783649.929271", "-40097263.65021696329198038628255519578725029828361985869"); + t("-3744957147569480041094559658.8985734744", "-1.39589737574796529539305515486016767152", "-0.007414375129527604087594017204876948"); + t("1", "12243765348634238072286305372976115524601373993259986307", "1"); + t("1133226250873003731000285272922.678821486883559776563400259", "-48449121713.05851357863749277194726", "46399517902.028653911554106994622540259"); + t("-1110.00985672050392625354008504049692", "0.000000000000000144467905969585159040405525015114077352752345766119586", "-5.0667226393916955793430389451065661055080904169044368e-17"); + t("9977", "793339.568052455522323049704543732060826", "9977"); + t("3044797849984420605285366.474651143157", "25186260049851668345583291614301619318511974775753812002050.8326735955299366787084106211969141751506", "3.044797849984420605285366474651143157e+24"); + t("639737463904283952640443433078141655542321388667481890755297474427803997023609757112922145297681502347448794470168805201764741986941", "-14552442514714892538227035420.61249278214225741", "3.07716512012830819205367001585789874568359778e+27"); + t("0.0000009480666812553237528290117310639076036954221787358487462393246935364400792376", "1.0", "9.480666812553237528290117310639076036954221787358487462393246935364400792376e-7"); + t("16673429143256557896853574875292172327063389650998117777668136985538005.9156698099892691658894660539763873869793114863329930039146096813387028", "-107478408440617999633969729.9071529239187240331642550654002067338975836414285167506215860", "8.20260811545606661396908107304136068380872993912615354808000919495595106968750582594596813387028e+25"); + t("-2433298586307081.77465641473337660801763802817481653388429397435772288734383710955919905923279924807", "8945608818026652762135420517379.424606537007", "-2433298586307081.77465641473337660801763802817481653388429397435772288734383710955919905923279924807"); + t("-70843295832985633806095066724872543838444364150876355516508644344503020757888058408332911592444048015580157647", "159194370214483300881159411658565511338185028333524386712582766324718381977826309423371642975467856662959008464353958219661", "-7.0843295832985633806095066724872543838444364150876355516508644344503020757888058408332911592444048015580157647e+109"); + t("3.2263", "71756256022538928427069542438.00966178692388729446382444038774751007836179716329976575691385315023922435789196791754653262230986812059146", "3.2263"); + t("108061134.3910585273259047952072200021695505338334592792817809710438", "1260951025714501457005284501987116458944716243549637898428510181316826466436575714044748818353924236900363398289", "108061134.3910585273259047952072200021695505338334592792817809710438"); + t("43607983963968869595947769368216107706521387015680146006305613629433990860442947600228456010092", "121385730326389922895424600532542775257956396540395781939587936260842487516174244325430.384295616198856908112758", "1.1504925896106825966642741273863721105609952802207648727165046290817382897631508088378461034727326937297965944e+86"); + t("-2.6480956814", "2148671523057716670055099537649941488566244507589768590863804139800870729193528442.071130969310679730958621114", "-2.6480956814"); + t("-470479333263.84377245126007813562135983915023544360010239389244912214130585392185699431847364158901094167357758815083446794565320814454973581796", "27849448232164647723510637195798019946766053448137414448566670989993.67717797401551478004030639298176072944", "-470479333263.84377245126007813562135983915023544360010239389244912214130585392185699431847364158901094167357758815083446794565320814454973581796"); + t("0", "-6993020667326513594.01598727239030644128692238032346465300777782504759087255641592855556786881965341488969418534051814789", "0"); + t("-10372286284244779022048585", "-0.0000001930730138191035178741471788596965420386122185118633654121349245216394001018297980054707996074710125164147", "-8.47592995170001700266169749815180334434465081954780254569435821161404742961756995939834569063835498482552e-8"); + t("274897009856813.734380955979520483734957204601027214931003941720546146487845256149072527968056465339318846303131569226913408938616354923540700172412", "7", "1.734380955979520483734957204601027214931003941720546146487845256149072527968056465339318846303131569226913408938616354923540700172412"); + t("738408012842109785457164849764507323379297.79095792233769102310198027453532813226348191188862586945019214410536832", "15306177324248047715406533.5158700026", "1.506634005344982055089315836033881173769102310198027453532813226348191188862586945019214410536832e+25"); + t("0.000000001307002813605936443383593439823579112009200431906135937099617451361199016339230482184530115838223218189460633917243083200", "-156347131201.0667716470724866", "1.3070028136059364433835934398235791120092004319061359370996174513611990163392304821845301158382232181894606339172430832e-9"); + t("-4792567274869561212802263.9162146352653952716695372928501404982289832583166534206544945624150460220976057951121526613072397239125750526383369389", "-2571615359217819081745372380499521952091705406387642084116393860754896982150026573094709965566690085424189906211974018648786870967996877095142", "-4.7925672748695612128022639162146352653952716695372928501404982289832583166534206544945624150460220976057951121526613072397239125750526383369389e+24"); + t("-40.05748869168454725527441481953494139473673991070979113635160468475219376406826789262579745739976", "-41875468662578995790027634863433077814557063632577215827031.031982081918392876105825240291071725658144212578666", "-40.05748869168454725527441481953494139473673991070979113635160468475219376406826789262579745739976"); + t("-0.0000022907766811721016183225617138609000543876574860984718810338550238748128247445010491861049613", "-3279074504656188611648707.4983942082641992057679531912380705659521798322669577604617597486447068188912830230847051445600458515668443081070949175", "-0.0000022907766811721016183225617138609000543876574860984718810338550238748128247445010491861049613"); + t("-0.000000000340313277", "-0.000000001255112168870655023338247473949331250106676281883642901353991", "-3.40313277e-10"); + t("-50225365.1475566438998761801442412", "284028617245837000189928101232939099744527904229835535.835746075", "-50225365.1475566438998761801442412"); + t("63.344721423304857459331086841825237874925064097", "57155073593666.40553442288889921516416834083269742567707391607", "63.344721423304857459331086841825237874925064097"); + t("-405919933.1066287819696386581647229483641869199888974504501408794124002251348919063696581146156799005", "2647178729438306865645909642983752549443679075960964976334982663855617.77", "-405919933.1066287819696386581647229483641869199888974504501408794124002251348919063696581146156799005"); + t("-0.000000000000130754174234156809102364575558", "1512769765054847098913787446631276445464675564737758845532029029227218416561642292270741819169983956650914922547871552583245517440681359875", "-1.30754174234156809102364575558e-13"); + t("-42805325218726498366672740080295203192725414965527973209314316749.7120445518644682586008052614425260815242140724520046592053081", "0.000123298332335657505901061098051881119196170384724006568439947745355121025753230625359269654114501774394590171609541470588517", "-0.000032325304000891296915093212441483965264186154572168660357953720611674306961720593830907904561258705086770592138813164224068"); + t("-75210406056668422373802918016368260769067586508935441638493539318778550326.50528533489988415483952", "440622997.6355053630471029", "-340429684.42458949795004585483952"); + t("-1222922824327546500522220970819290434122898473371530650066004876062845284114.47721875136651190", "-1379027454245733767586", "-881180208974102493198.4772187513665119"); + t("-30656582150188875494703614722772772221409126232115063256882064964663663147033209144753246762464712.948730003091026599897432459556025696", "-2913934951186033025005819092772439514996587951119743767357433798109195725658300879072952407504422194931477368634077", "-3.0656582150188875494703614722772772221409126232115063256882064964663663147033209144753246762464712948730003091026599897432459556025696e+97"); + t("-6460522065030402275014019.2874194931729240210323452441436174892", "-84550416554285528170014238135907266547165974999578715609084038263.46129840157771271779704084743623515311185778729738812", "-6.4605220650304022750140192874194931729240210323452441436174892e+24"); + t("-0.016364386296444405533757351682555346465502820950062088651150128675773350177464733695707386307349689534592475248473689442", "-662351516465.9032743599806965674027961010966377214913163", "-0.016364386296444405533757351682555346465502820950062088651150128675773350177464733695707386307349689534592475248473689442"); + t("1103343525164099798605597537113983882179727144422100669678631936027042820706120285756898888893404677995338896062374110057717750895679", "91748792242920404655427917872546031638524.76204683127448751123961871264830271567888066463998429231705219642715054074868199195373673227635494751953719", "3.076328553647557636193208401331029365654020485144903415117912662361833098755573989373555529561896396760648323565651091850507799771898789127729144278e+40"); + t("-0.0894652716283348818337684886989151280762017763427032659791509101256464820297", "-12966.6884", "-0.0894652716283348818337684886989151280762017763427032659791509101256464820297"); + t("13114418006467273871814114136828793244459258873580991741468083458844936", "4759000553255960840361168620.3774494470837273198", "4.2761722071204063036259345611428685193209688534e+27"); + t("-28951495771059579052038784935583719855135835316878812739160571275658593082655402834569052032878823395641241968136.92574783376902191547024436698530", "-3031768663774740737176934765360849728180780437211886327623459816735182479695223019269147895285170079834032202516966937529989903070284157092473214668.7", "-2.89514957710595790520387849355837198551358353168788127391605712756585930826554028345690520328788233956412419681369257478337690219154702443669853e+112"); + t("2393723882767965821294763322394195744548891304060902", "-140981135960273230.0025778", "86668711566444988.9814302"); + t("-3224488416109581472101333552995382215707383396998952009319985210337309105631785072396803.91964338865842816515912815197781787", "102818159313377657005579111128189067224885718.140628085554012525428767372817189722551478405035418445112060974169840360487565259217", "-8.1595634025043932590241822413741540317627232887069206304733728507469999734166316619875329520357299837254473649437591096347440866e+43"); + t("0.000000000000000162614535957335504400161243268689702722565890737357214918357356590168738846464706769774484467251167640135858015634083627803179977581109102", "0.00000106803134832455205844954340150714254354766339175870844951355513521917239107042458407307482848507498559", "1.62614535957335504400161243268689702722565890737357214918357356590168738846464706769774484467251167640135858015634083627803179977581109102e-16"); + t("-3927.4031809", "-0.0000000035029583866611658486269733571456482523405154883369032001554318344330512146832289592781514675456658500756286236294841624823979375753461327906", "-2.6932691679676130460056959057199199083055272525449126446015947490329456323969370838199750438158748550553789684640297326857241719276712355958e-9"); + t("2592701578783037181466698143885146669128411307594485136303860886846006143235135122817836647040961317262173311873893155", "-2476735053659095937599211826013828027536167714634610749923083443278572078026871812469079060633677096037053974280521689349022693979242065", "2.592701578783037181466698143885146669128411307594485136303860886846006143235135122817836647040961317262173311873893155e+117"); + t("96.04335877730532081621787788158383111099350287030581038188446699532128180774027960706578", "19731419380883276630592147059117156462461951865864609673166.4479371059569659447212290002838890816175493435199181043231716596224989574671224595362826", "96.04335877730532081621787788158383111099350287030581038188446699532128180774027960706578"); + t("325023114939529014657978169628372760601480839073817238211782426113558723164836055970989007713696933704", "106223840476390782472173917090144170488887005908229635819404889799358852135763.040387492", "1.05150216674283695595324235267625323135707751092953285615150305395692443496735212656796e+77"); + t("-0.00000000000000033647992217979179179186957", "-0.00000000000000000003156150266634952697310752", "-2.74225383948473157029928e-21"); + t("67711097909563003399071203293654909244735459519561246144664768566612029202546308760389038038790661412078936611567061527752843866673871533", "0.0000000250914595238219383127319568059987481594970145735261435136883603429568", "1.1931039593784471503157310210681907892950978516052505236994695043296e-8"); + t("942307044555108835920493820461160734540503253601173239.92559776036964181595894387449189836528222244015903442453788542293705358104537", "-341315427404722210577937787468731.95", "4.792118403841194654638154768215812559776036964181595894387449189836528222244015903442453788542293705358104537e+31"); + t("-94130661760152187286400649382778774100247360104073487553172289492592909079685814047724040987.545360", "582.270609307311781203990506333968732999092917722", "-429.29359293653441023844377749905124203115916886"); + t("3313638785820621590180176562638.00992668522579291400041235393589181972606810182197653338554677836315505146", "90527335216395767852035210539.14", "5.465471803037394750690898322896992668522579291400041235393589181972606810182197653338554677836315505146e+28"); + t("-0.306955389372676043580907106603221153651127238512560719", "66.904579801977727781298", "-0.306955389372676043580907106603221153651127238512560719"); + t("141390900187450346.4446228025914244", "-255850256279441962530367023331027625163686895444551579538905939296353570502455036176395785785059148507467346341628419844281564795408561", "141390900187450346.4446228025914244"); + t("-31281694978574998092.32325767151", "-1542462855.73276869937293894166028800355184049470473", "-519767223.60416992161136296357867627633975428783569"); + t("0.00000000465065764192519767209223768411174160970559048882576195807880851927339930867660413363177803", "695983282190820825900286910552083743912340874031142607911981006600892487992712378.27501435873441215408642204715421306049", "4.65065764192519767209223768411174160970559048882576195807880851927339930867660413363177803e-9"); + t("0.000002299699", "105", "0.000002299699"); + t("-751157538.56375056723760379542086174039490718435868835658852", "-0.000000281235130627575144572363209737439923", "-2.4952865744315606513538295859410866335658852e-7"); + t("-1492151820229229.7080972636031810741838557504286290118227845200639080208767965213313891261997405771908981", "518534900915966328248424169467.8926376495890764066267652", "-1492151820229229.7080972636031810741838557504286290118227845200639080208767965213313891261997405771908981"); + t("477573736732380117689005270695410306243996300502014352674644518059825662478485969426161545468188704450446835856", "-44107433160804154887771872206618010747863690779283512394813143542934429409262133052168377457307.7801829320544", "4.26587795612760356325706643922768450442822164299827765862986444105362242670998534111196655345782505509351168e+94"); + t("-1708419546267714621908304198526.86627770247445328880", "-6561936.23828726436959004970934079513865615878124751998092886724055429258975571944079950471550813589210381712752008129366876", "-3255473.411304257056507423459569857877329230063250469248244750150261213529383645499126139366386431281819493395691345793149"); + t("0.0000000000000004527321152996104608068898547927166509996670208320178171898523653701667544358478578289218730097763063669131852", "0.000000000000011707656496202100248575019665652640050450842478555351860415163190039866", "4.527321152996104608068898547927166509996670208320178171898523653701667544358478578289218730097763063669131852e-16"); + + t("-4.785068183e+1", "4.100602340813778290214569907944153985840287e+41", "-47.85068183"); + t("2.80464647349124269012895506839600253935327310965e+18", "-9.5524432014496391100798143628e+26", "2804646473491242690.12895506839600253935327310965"); + t("-2.8475390576301982648821864330615e+1", "2.699279786373606e-17", "-2.6651296488681e-17"); + t("-2.9148775309735883444412038961e+12", "-3.7791910283459953859509024618806015827414491747e-14", "-1.2484519780688810034904273898769796515468689534e-14"); + t("4.75952e+1", "-9.2480596298788483952588449013e+15", "47.5952"); + t("-1.059098439e-6", "-2.61519835738114698145e+4", "-0.000001059098439"); + t("2.0737545782540501468649951383811505929864648e-11", "8.001141125055718003273562341771790690597363615833e+48", "2.0737545782540501468649951383811505929864648e-11"); + t("-1.22658750490728083398e+13", "1.8753238083480045539938865768259755398e+8", "-132148191.84975394758545561202438438412"); + t("3.0610455075185277682819215983121128590345078192561e+45", "-7.2132877592078603887799551646099823518259e+16", "61373855855082630.483565489609741494295639"); + t("9.0188012787220251521914339e+21", "7.34972521506799782052e+20", "199131020640427767567.4339"); + t("2.732276e+6", "-2.155e+2", "167"); + t("1.81970803337505025123814446711e+19", "1.552273391587321102352777093263e+8", "121079294.0355602541613892510099"); + t("5.29521849750516603814171596807e-3", "-1.186023062792866863315593132074754530817309278318e-16", "9.65458477943067357182194529851732179008303939488e-17"); + t("4.17590665394570316906941267960925070278431e-5", "9.049524633791428612160450019368774628e+0", "0.0000417590665394570316906941267960925070278431"); + t("-3.349078310428002e+5", "-1.6540638667696404135343644190345e+18", "-334907.8310428002"); + t("3.1992755000743044238501551275241732747e+28", "6.7694639443884902632801069e+19", "58012283694485729642.404216747"); + t("7.824216663065598374539197703051941e+7", "2.8264285749437427237554422632944775049521496e+41", "78242166.63065598374539197703051941"); + t("-1.67058990412026696591650976e+2", "4.22502522584451063700771426002353559984275436807335e+7", "-167.058990412026696591650976"); + t("-2.45635416234991644154081e+10", "1.6511720053714564535061012818217797956053950352564e+3", "-169.9750792296892367202705840388216243464507038608"); + t("-1.234302917437106938892e+6", "-4.66222869142052358935242282170391162075612576838441480514e-11", "-1.16831454856809476137891894092632703280451615639647891166e-11"); + t("1.839710778457895734645309275939324e+23", "-1.16318585777868797619955e+17", "90437897170854441.0401789324"); + t("4.31278525467628823588407602838382746643207760247774704277223e+9", "2.23171038985847514593e+20", "4312785254.67628823588407602838382746643207760247774704277223"); + t("3.0774747e+7", "-1.292178569466e+6", "1054639.902282"); + t("7.1986256721501851444121681387782246892728127232221676165644e+45", "-1.13782811077947907584409056830168328555517006340535538318684e+28", "2.4664369028970742315721904655905118416446174179007597618692e+27"); + t("-5e+0", "1.8187074446258529890089548133661805568989582581e+46", "-5"); + t("2.90713213183891582843410750914399986513758162e-3", "-2.63153627e+1", "0.00290713213183891582843410750914399986513758162"); + t("-1.1994289233986543701822561078984450080807572663172692845e+26", "1.3308098373134e+12", "-1101301973800.58984450080807572663172692845"); + t("3.80222940163e+10", "-1.86439621006147e+8", "175050952.052159"); + t("-1.0589771547255325020757865564001533466983148718e+46", "-4.66653476326811630302573645173380627372e+30", "-1.34743461530630312563356791528734704544e+30"); + t("0e+0", "-5.8555382904168e+10", "0"); + t("-3.877410561846137535676828506580217538851e+39", "1.8546585782329946703671500695022434e+25", "-8.304732800863368666145000987852196e+24"); + t("-1.163627582049e+10", "-1.190310616961783801595291761751e+7", "-6941092.77337225841399948769273"); + t("5.50922178592853292e+8", "2.7726691028626755345614e+1", "9.067016077612284334026"); + t("4.585813032273175774206281699078636679246584e+2", "-1e+0", "0.5813032273175774206281699078636679246584"); + t("2.143209743784799995437859351e+27", "7.89686033593298254046863395059167e-18", "6.81868949928986360863748711628261e-18"); + t("-2.2928677299898057914670255997347455786e+11", "1.43685706448112139571439918598028632e+6", "-306934.405632425577309870670368346"); + t("4.354911010988471845818170482045217459828e-19", "-3.4255381103210061953947764102346444839325208e+5", "4.354911010988471845818170482045217459828e-19"); + t("7.6205756951722652979726396821744395258e-11", "-2.469701682300246385132843673488255945931294e+23", "7.6205756951722652979726396821744395258e-11"); + t("-3.0414336636936289483194714509757754918625515721268383983891e+22", "4.536514951e+9", "-2390201439.714509757754918625515721268383983891"); + t("6.1950756263395220720928988581672084e+12", "5.50299097228515217025542686233486e+6", "994424.9277391452982364908047321"); + t("1.5592703628193685590607028031257876838163995140476313e+52", "4.644158636847e+12", "1438695302628"); + t("-8.321953e-20", "3.425924048971005175376011737e-6", "-8.321953e-20"); + t("2.50545873839057298343115607524742030919655663396773e-12", "-3.81e-9", "2.50545873839057298343115607524742030919655663396773e-12"); + t("-6.626563801610720283429069e+24", "-7.318668911456127669428074219e+27", "-6.626563801610720283429069e+24"); + t("6.579221387782276980734304828884120337616419799251099653496e-1", "-3.8969000319182257446208467342247396396093882352e-15", "1.9767722676183043776377919004479568382127247136e-15"); + t("3.1401513e+2", "1.237032386460703e+15", "314.01513"); + t("4.232794809535764324617667621124324483982653495945584e+6", "7.3809184815598732203484798105535965548268885342e+0", "0.4405677713499586621163276690389136391131296364"); + t("-2.54046333929067768396256156730192176704492639570003e+1", "-1.43509613727037812846035760529266475517733244287446e+5", "-25.4046333929067768396256156730192176704492639570003"); + t("-1.7784812894976825e+5", "1.348176239051319766183648668812555533668836074076e+47", "-177848.12894976825"); + t("-1.34525103103779e+8", "-2.1e+0", "-1.903779"); + t("-7.5e+0", "1.1485396369968399088809663888589e-8", "-2.897466364518558819119797833239e-9"); + t("1.02502826667e+1", "9.3481096028282686300763053917132870455928e-15", "7.7634911550320902212280587730161073680336e-15"); + t("9.56858647594739448303715711e+11", "-4.2315e+2", "168.239448303715711"); + t("-1.121662781899762e+3", "-1.153e+3", "-1121.662781899762"); + t("-1.1987521321e+0", "3.3717546189279471902193720771211135e-6", "-0.0000023276964037193028773035373618806855"); + t("-3.96409663517864928212668914312890035732488673186557035e+16", "-3.503768915124379422490579250903005526551657e+9", "-1073469883.0404370184683678233259100444904567035"); + t("-9.780642443954005196506214589e+15", "-9.0202154557465647565999764323022181914347547218716e+44", "-9780642443954005.196506214589"); + t("6.22723611860453496632948443539098691396413e-10", "-2.77824094902753769648885834726391520861911e+5", "6.22723611860453496632948443539098691396413e-10"); + t("-4.7319718694e+5", "6.8346446241247783161447574947601984306026821486383635e+33", "-473197.18694"); + t("-6.1933379823501920314298624358203814e+30", "-8.089868231074264910103113854481018685411838271163628e+0", "-8.004699925089141256941499632457605509538837084388632"); + t("1.5e-3", "7.82546748299781600669e+20", "0.0015"); + t("-6.7242596508788e-7", "1.3806352e+7", "-6.7242596508788e-7"); + t("1.9762609860647814575863656621674468865989380864741e+45", "6.51277646556899014436272323991705259786529655e-5", "0.000014790203177222374955576884258500785345510175"); + t("7.004000748022736e-8", "4.736649441368895442161035451e+22", "7.004000748022736e-8"); + t("-4.29285701374473103585848390846585847338e-20", "-1.39970996245e+6", "-4.29285701374473103585848390846585847338e-20"); + t("1.44068396723397585225000633824556784092935879966094079042e+14", "-1.85739402953385383572444765551721122270675395703645487708e-6", "2.2082902769721875195705810453565730977529281295245227248e-7"); + t("-1.90763083929612502667113570129e-17", "-2.989745679222607307608195e+24", "-1.90763083929612502667113570129e-17"); + t("-1.8008915784029129140878223332849e+15", "1.2709184544773109938594286324169565032629e-8", "-8.198978038773931537165401098330611286589e-9"); + t("2.5283393571163e+11", "1.42605397244976960657e+16", "252833935711.63"); + t("-1.07482517991266460493961480563252855043997503069929863e+53", "4.0293147259356676513464190395e+2", "-327.97566262501963085789832435"); + t("-1.791459937048480305498333255301e-17", "-3.60140444532360031210882850839206992361061e+32", "-1.791459937048480305498333255301e-17"); + t("-3.7973618905e+4", "2.076660739009108092554128277835978289058948608e+27", "-37973.618905"); + t("4.296835337235213305241997742797979761241859185e+32", "1.016128323816741556885745789299051e+30", "8.773810728563935184150511955984541241859185e+29"); + t("-3.3476803669790089330287396786213536648e-19", "-1.0485228843496121655433179024642877076320529176e-16", "-3.3476803669790089330287396786213536648e-19"); + t("-9.265001828356e-19", "5.82146621596502038608123809e+5", "-9.265001828356e-19"); + t("1.6574237778185417162412521417931606051387220789593e+6", "4.3416420707553748006564234818e+29", "1657423.7778185417162412521417931606051387220789593"); + t("-9.774062277712948833378e-13", "3.080037033054419810654271948e-15", "-1.034488293043803360395792484e-15"); + t("1.0480042083686042910696085478682293620068215e+43", "-9.1636346772043682784439956904897547881091051932e+20", "711021412902451879505.0635467550321309923369716"); + t("-3.40923816647136940940085344632137226188233200061358e+20", "1.6073165168980479523827835495337e+31", "-340923816647136940940.085344632137226188233200061358"); + t("-8.7800373379e+9", "1.589967630656932636460925283862063976207125245919e-11", "-2.20858757786189096197325170019616955392212367465e-12"); + t("-1.508492483290420652523454481016576379245159230227181384539e+43", "9.65407339051e-1", "-0.95207917271339"); + t("1.70797882e-17", "-1.221287649130143636399302725332474299568133811751e+13", "1.70797882e-17"); + t("2.25e+0", "7.2018713275608502122703864334941124435400603003965e+49", "2.25"); + t("3.66e+3", "-2.00125759501079698887197092755e+20", "3660"); + t("1.074410572430091406447031457374002693e+8", "1.14072231468921335177378921904e+16", "107441057.2430091406447031457374002693"); + t("-3.8968391781145045605e+7", "3.823518283e-1", "-0.379345773205"); + t("3.8807293359084454309373e-14", "-6.54951383e-4", "3.8807293359084454309373e-14"); + t("8.3790348726489133341557987289125627922491641304972332e+10", "1.88761931097750519978e+9", "735099043.478904551237987289125627922491641304972332"); + + /* + modulo mode. + Tests cases taken from: + Division and Modulus for Computer Scientists, DAAN LEIJEN + http://research.microsoft.com/en-us/um/people/daan/download/papers/divmodnote-letter.pdf + On the Definition of Integer Division and Modulus in Programming Languages, BOYKO B. BANTCHEV + http://www.math.bas.bg/bantchev/articles/divmod.pdf + MSDN Math.IEEERemainder Method + http://msdn.microsoft.com/en-us/library/system.math.ieeeremainder.aspx + */ + + // Truncated division (ROUND_DOWN) + bigDecimalFactory.Config.Modulo = 1; + + t(8, 3, "2"); + t(8, -3, "2"); + t(-8, 3, "-2"); + t(-8, -3, "-2"); + t(1, 2, "1"); + t(1, -2, "1"); + t(-1, 2, "-1"); + t(-1, -2, "-1"); + t(34, 5, "4"); + t(34, -5, "4"); + t(-34, 5, "-4"); + t(-34, -5, "-4"); + + // Floored division (ROUND_FLOOR). + bigDecimalFactory.Config.Modulo = 3; + + t(8, 3, "2"); + t(8, -3, "-1"); + t(-8, 3, "1"); + t(-8, -3, "-2"); + t(1, 2, "1"); + t(1, -2, "-1"); + t(-1, 2, "1"); + t(-1, -2, "-1"); + t(34, 5, "4"); + t(34, -5, "-1"); + t(-34, 5, "1"); + t(-34, -5, "-4"); + + // Euclidean division (ROUND_EUCLID). + bigDecimalFactory.Config.Modulo = 9; + + t(8, 3, "2"); + t(8, -3, "2"); + t(-8, 3, "1"); + t(-8, -3, "1"); + t(1, 2, "1"); + t(1, -2, "1"); + t(-1, 2, "1"); + t(-1, -2, "1"); + t(34, 5, "4"); + t(34, -5, "4"); + t(-34, 5, "1"); + t(-34, -5, "1"); + + // IEEE 754 Remainder division (ROUND_HALF_EVEN). + bigDecimalFactory.Config.Modulo = 6; + + t(3, 2, "-1"); + t(4, 2, "0"); + t(10, 3, "1"); + t(11, 3, "-1"); + t(27, 4, "-1"); + t(28, 5, "-2"); + t(17.8, 4, "1.8"); + t(17.8, 4.1, "1.4"); + t(-16.3, 4.1, "0.1"); + t(17.8, -4.1, "1.4"); + t(-17.8, -4.1, "-1.4"); + + var t2 = (BigDecimalArgument a, BigDecimalArgument b, string expected, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(a, config).Mod(b).ValueOf()); + }; + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + bigDecimalFactory.Config.Modulo = 1; + + t2("-8.943550875826899174004147098160947209117401e+112", "8795986955015178649130170399228023.855728306", "-8.254602310669191899712579731892356266536504e+33", 57, RoundingMode.ROUND_FLOOR); + t2("-2.736538371967866031325075682600169801042080643176906e+67", "-798.10121", "-5.1093943e+2", 15, RoundingMode.ROUND_HALF_EVEN); + t2("8.89244411964474967575e+995", "-1.22396282949406136970691396606e+143", "2.1076810292497291230174828448e+142", 37, RoundingMode.ROUND_HALF_DOWN); + t2("-4.133853260833105676637834626304395288e+331", "-4151623665.00637323381006132759572375", "-1.953e+9", 4, RoundingMode.ROUND_UP); + t2("-4.98716329433101e+63", "5.2324163e+989", "-4.98716329433101e+63", 42, RoundingMode.ROUND_FLOOR); + t2("-1.21401788871257659e+26", "7606.68304751112951636636391962372647031362684321", "-3.8282851383973410080190582059122127821019964721e+3", 47, RoundingMode.ROUND_HALF_UP); + t2("5.098420853880029521477e+9004", "7.160182680398e+769", "6.109129834846e+769", 93, RoundingMode.ROUND_HALF_UP); + t2("38972.7", "8.884699481786844829e+413", "3.89727e+4", 31, RoundingMode.ROUND_FLOOR); + t2("6114.6135258543884127880811426762677209603105075061581615", "3.0606472374614422625444168825327291936017622710500e+275", "6.1146135258543884127880811426762677209603105075061581615e+3", 98, RoundingMode.ROUND_HALF_UP); + t2("9.44899733642716929280554042413664887e+67", "3365420322.33466499588376037066560633919203780807168", "3.14018804773158888457522038228739693507536858699776e+9", 54, RoundingMode.ROUND_HALF_UP); + t2("4.649378943629298120865999754037420765850004956622433023174e+987", "-8.06433839e+21", "7.10669696e+21", 44, RoundingMode.ROUND_HALF_UP); + t2("-6.99689242488633036641737497911e+337", "-8.62087725552e+511", "-6.99689242488633036641737497911e+337", 39, RoundingMode.ROUND_HALF_EVEN); + t2("2.68888209327808354367202351104495e+405", "-8819404.2382061121909378683556", "1.1144088192608904221647532924e+6", 34, RoundingMode.ROUND_UP); + t2("95.999733394918432190664281885062439232831974613845764432", "260016173581199901254971273211250760375409527201652153.674", "9.5999733394918432190664281885062439232831974613845764432e+1", 79, RoundingMode.ROUND_CEIL); + t2("-65183.1712462898879902640839124139318475", "6.256224403276153e+18", "-6.518317124628988799026408391241393185e+4", 37, RoundingMode.ROUND_FLOOR); + t2("6.73109e+5632", "6.2e+5", "5.4e+5", 62, RoundingMode.ROUND_HALF_UP); + t2("5.02028141167363618090367152620443275143849821e+65", "-5.1423741815608532540616250447301058274773391073e+397", "5.020281411673636180903672e+65", 25, RoundingMode.ROUND_UP); + t2("-5.92043551e+148", "-4.28952447049490303828404027555378e+6513", "-5.92043551e+148", 52, RoundingMode.ROUND_FLOOR); + t2("-7.776298593803313194202564e+91", "-8.65584352736057897977696414850809690748461947332009869e+121", "-7.776298593803313194202564e+91", 58, RoundingMode.ROUND_HALF_DOWN); + t2("6.0468446816579233067128095e+47", "-9.25703241665044447133e+232", "6.0468446816579233067128095e+47", 61, RoundingMode.ROUND_HALF_EVEN); + t2("-2.8596931954822549177171791e+65", "-2842388394.3157048684464", "-2.23925487e+9", 9, RoundingMode.ROUND_HALF_DOWN); + t2("6.049098770167682103e+61", "6.62504441855149114634843111447292655983275898565177681129e+549", "6.049098770167682103e+61", 77, RoundingMode.ROUND_HALF_DOWN); + t2("-3.1766317506888756886345e+6581", "-1.02395581038358273020004954944197227e+8632", "-3e+6581", 1, RoundingMode.ROUND_HALF_DOWN); + t2("-6.494537598665515278622730e+407", "-3.693271952093896608738805402952058e+593", "-6.49453759866551527862273e+407", 55, RoundingMode.ROUND_HALF_UP); + t2("-54570662.9152087959960116", "3628345183.695935530586261340756849", "-5.4570662915209e+7", 14, RoundingMode.ROUND_HALF_DOWN); + t2("4.0937805605767803276628345776693834523568082109865317580e+7653", "4129.795194087170", "9.9197199795059e+2", 78, RoundingMode.ROUND_UP); + t2("19716777.12985866079587414603535351339087353731317", "4.15268790332934991803928616e+612", "1.971677713e+7", 10, RoundingMode.ROUND_HALF_DOWN); + t2("-653510.8843942609262130842269762944441504401", "-2.027688666442884256244726305622087828395505875189979280284e+936", "-6.535108843943e+5", 13, RoundingMode.ROUND_FLOOR); + t2("-5.1464720662639698186031461962218221108584708551990576e+426", "-3.753738703787238056897308105489740e+5947", "-5.1464720662639698186031461962218221108584708551990576e+426", 77, RoundingMode.ROUND_UP); + t2("-185083.95424764097664278043736816641562291", "6.88483981698920539e+549", "-1.8508395424764097664278043736816641562291e+5", 52, RoundingMode.ROUND_FLOOR); + t2("-8.4526212586667859362683394505144580845548023e+92", "8.56475540823390109934430835325058371670270846338329e+93", "-8.4526212586667859362683394505144580845548023e+92", 90, RoundingMode.ROUND_HALF_DOWN); + t2("-945636271.5759891", "-2.17432808397e+594", "-9.456362715759891e+8", 89, RoundingMode.ROUND_UP); + t2("3.548871234875504632967049284731417963316430094e+938", "8.58647841598924619155917147408449004293104046547183e+8404", "3.548871234875504632967049284731417963316430094e+938", 56, RoundingMode.ROUND_HALF_EVEN); + t2("-1.1430431170771599354075836985722188465803720293752e+2890", "8.77e+542", "-5.33e+542", 27, RoundingMode.ROUND_FLOOR); + t2("-9.04312894420050284873550010294637483269334834464174461210e+871", "-4.224918240e+77", "-1.03574112e+77", 25, RoundingMode.ROUND_HALF_EVEN); + t2("1.3894699e+3042", "-2.31875507700977838117805540505980140857029476462714e+91", "1.9357052749968517239204685249164188278642182342502e+91", 61, RoundingMode.ROUND_UP); + t2("79.235", "4.4827898048205433701866299445e+255", "7.9235e+1", 75, RoundingMode.ROUND_UP); + t2("4.476999920584999735690940e+2947", "431.4007436129918618300842573436992667279830088", "2.177092162465684682859259261336151290563486416e+2", 73, RoundingMode.ROUND_UP); + t2("1.951106229235660612010096898495653211543461145647637e+61", "-3.3477064e+141", "1.951106229235660612010096898495653211543461145647637e+61", 89, RoundingMode.ROUND_HALF_EVEN); + t2("-9.916630e+84", "-66.064342", "-1.3177302e+1", 37, RoundingMode.ROUND_HALF_UP); + t2("-860.1444052695", "825080074792355962132959107719531393891221", "-8.601444052695e+2", 32, RoundingMode.ROUND_FLOOR); + t2("6.1352951126363381185748747422972468541675591991781e+9278", "4.1560786995244e+1527", "2.651534168388e+1527", 34, RoundingMode.ROUND_HALF_EVEN); + t2("4.944978e+764", "5323614045.2252161212631613035133757836906706", "5.1535379640553098968737518932745870816240816e+9", 97, RoundingMode.ROUND_DOWN); + t2("9.09144e+6306", "3.50201226950969565080636878120146612e+55", "2.69469845381791678871664408741658344e+55", 96, RoundingMode.ROUND_HALF_DOWN); + t2("32172841276723723017320184344985646175887112.47790381", "5.58951e+9", "2.42307711247790381e+9", 20, RoundingMode.ROUND_DOWN); + t2("7.00620e+9706", "-8.08968082636983139609501341360433350633079179648541620232683e+9707", "7.0062e+9706", 42, RoundingMode.ROUND_DOWN); + t2("4.264042494837184947927734754557762536643709070327e+540", "9.95e+15", "3.95e+15", 45, RoundingMode.ROUND_HALF_UP); + t2("5.6105940856889306e+8254", "-7e+2", "6e+2", 93, RoundingMode.ROUND_HALF_UP); + t2("2526.4723101095362366485683598497883", "8.77812650378806065221188793462677511675764948870478079267e+94", "2.526472310109536236648569e+3", 25, RoundingMode.ROUND_CEIL); + t2("-4659.75203988732274192476946401", "6.060e+79", "-4.65975203988732274192476946401e+3", 72, RoundingMode.ROUND_HALF_DOWN); + t2("9.139217102709553745990883488575994294713541e+500", "-418253.135835407934425294007034135260164397764", "3.58109993522251265587238475937111423227918172e+5", 95, RoundingMode.ROUND_UP); + t2("-8.1086318916990298755700481699299539037472013444974422e+5755", "-1.5661587555799104561758191e+87", "-1.0074281153436182858841239e+87", 99, RoundingMode.ROUND_HALF_DOWN); + t2("-416737.42745", "-77173894789158506974126571178514075283378413478233.00755", "-4.1673742745e+5", 16, RoundingMode.ROUND_HALF_EVEN); + t2("8.333306239514058871243415468295297607303726047354266e+684", "3.502702752540721094141e+59", "1.367728644750058669789e+59", 61, RoundingMode.ROUND_HALF_UP); + t2("-6.25787639e+479", "9.9197660713292e+55", "-4.5153786834196e+55", 60, RoundingMode.ROUND_UP); + t2("3.72001563869117563677e+76", "-66669138.417849525425581002528394724049111419621217", "6.2279859967071260303160475364250607980294928950909e+7", 55, RoundingMode.ROUND_CEIL); + t2("-1.5482390020990842932e+1127", "-1.527299849113353346489254e+726", "-1.057674615874692739663148e+726", 63, RoundingMode.ROUND_HALF_DOWN); + t2("-1.81968692707021067164405981e+1010", "-8.0e+4383", "-1.819e+1010", 4, RoundingMode.ROUND_DOWN); + t2("-3053673848.9365372689017115785293", "-7.0224310e+2372", "-3.053673848936537268901711579e+9", 28, RoundingMode.ROUND_FLOOR); + t2("54183.632867779042905454844274458562747", "-83662541.555738139789607530938580336298367634", "5.41836328678e+4", 12, RoundingMode.ROUND_HALF_DOWN); + t2("-4.22473209309078364216473134517737205060872591792014964962722e+9967", "-269720069.2925602198855004698047", "-1.596172726513e+7", 14, RoundingMode.ROUND_HALF_DOWN); + t2("-5.75017431522121151911584268476607397041271245184126e+6110", "3.1316103139139653e+59", "-1.8603166122551754e+59", 33, RoundingMode.ROUND_FLOOR); + t2("-53.3032029466169433002012740687580043518816717487", "31641.6419229957", "-5.33032029466169433002012740687580043518816717487e+1", 70, RoundingMode.ROUND_FLOOR); + t2("72217.81124137174718066449515357955447849981408895", "-8.7683588909862633417120718073873e+49", "7.221781124137174718066449515357955447849981408895e+4", 53, RoundingMode.ROUND_DOWN); + t2("4692222630612536029410534310094035996228840113566296.8", "1228263.06453688667212142398916324", "5.4696289351779412826381928353116e+5", 67, RoundingMode.ROUND_UP); + t2("-7.9540186730450607380161429790e+6430", "-4639.1111967549704803866386", "-1.07e+3", 3, RoundingMode.ROUND_HALF_DOWN); + t2("5.22e+7656", "-8.500204601289537368439368068473e+64", "1.31145091818334943531353566321e+64", 34, RoundingMode.ROUND_HALF_DOWN); + t2("9.87886266656141131566931816173489290346252900698068e+66", "-9.537278383404716745059580002e+195", "9.87886266656141131566931816173489290346252900698068e+66", 98, RoundingMode.ROUND_HALF_UP); + t2("-9031367.14748312394", "9.8676925037570147928180472738580628944445e+112", "-9.03136714748312394e+6", 93, RoundingMode.ROUND_FLOOR); + t2("-3.237780151586765403233992546861473219e+103", "-4.213698590019308332103708310931502e+86", "-3.715913030258199339756353959945608e+86", 100, RoundingMode.ROUND_HALF_DOWN); + t2("-2e+624", "3.0630010e+754", "-2e+624", 24, RoundingMode.ROUND_FLOOR); + t2("-26267210542733.60053963718272912688751521576671166112045188", "8.920557499910098814348531734605286864e+7549", "-2.62672105e+13", 9, RoundingMode.ROUND_HALF_EVEN); + t2("5.884563e+86", "5.544271814073647469677715398389e+68", "1.656897857425690453539776341638e+68", 49, RoundingMode.ROUND_HALF_EVEN); + t2("-2.9501e+1031", "-5.705094676024e+32", "-3.086833450968e+32", 38, RoundingMode.ROUND_UP); + t2("2190203683.01784039790649953183427044501728975229622892", "-129341.6581527620814546235644263675042036956912", "6.1385517120072635e+4", 17, RoundingMode.ROUND_HALF_UP); + t2("374.465410986072628695747577414265711313", "5.2879747143440196018217433252932138284305606201435437e+952", "3.7446541098607e+2", 14, RoundingMode.ROUND_DOWN); + t2("8.4784750153107531506270037576e+327", "6.4828775998173475131160558410831475175e+2971", "8.4784750153107531506270037576e+327", 34, RoundingMode.ROUND_UP); + t2("9.62707270e+501", "-6.342341847592514387089599362701767676614396026825953485e+539", "9.6270727e+501", 84, RoundingMode.ROUND_DOWN); + t2("7145500474663735829770809398299303175.875800464970535410224", "90828572.5113415651186621228687335129152209", "5.6290732076087447357393897802e+7", 29, RoundingMode.ROUND_DOWN); + t2("-6.05845881219948340925618875938e+91", "6.61836246027891675911003e+7034", "-6.0584588121994e+91", 14, RoundingMode.ROUND_DOWN); + t2("-7.43e+833", "-3.1891516544348227127456801051019337878811793572460629e+1748", "-7.43e+833", 39, RoundingMode.ROUND_HALF_UP); + t2("-586487137896561.9", "-7e+720", "-5.864871378965619e+14", 32, RoundingMode.ROUND_FLOOR); + t2("-7004720099355232745.58685968254503", "464534361433180", "-6.46330431152558685968254503e+12", 83, RoundingMode.ROUND_HALF_UP); + t2("7376349279.6789964", "8.13158102169523546706061074913188868474536498e+1244", "7.3763492796789964e+9", 83, RoundingMode.ROUND_DOWN); + t2("-2.66694516312127080093289225754644e+5649", "-8.2788550315689695e+274", "-6.58461978336281e+273", 91, RoundingMode.ROUND_FLOOR); + t2("-26377480.2334276377485822339988800328191768957719819966", "97339239938767981386925617.88982454562567822091088", "-2.6377480233427637748582233e+7", 26, RoundingMode.ROUND_DOWN); + t2("2.3644616729891784263411140e+3430", "-981855.982985359583764068205579338555912870110328229714", "5.192582575653964788593134550979615774147e+5", 40, RoundingMode.ROUND_CEIL); + t2("-2567.301939196367215654841", "-4.7110984724522e+20", "-2.567301939196367215654841e+3", 48, RoundingMode.ROUND_FLOOR); + t2("-6.887177370604424697705428668658450e+36", "-7.67098e+3101", "-6.88717737060442469770542866865845e+36", 73, RoundingMode.ROUND_DOWN); + t2("2.3477568659602166267356708374e+758", "260693.9220345082421249094573691967212817853512", "2.359424256311595263045483114847279155538568672e+5", 55, RoundingMode.ROUND_HALF_EVEN); + t2("-5.033571988963017652865943270154512156255697111231944e+1306", "-1.04835155898865079e+703", "-9.344544833551976e+702", 72, RoundingMode.ROUND_DOWN); + t2("8.214139451354306802429236611686779e+5690", "-1.1263730322555479536183521284e+67", "3.74429518435572840395289768e+66", 50, RoundingMode.ROUND_HALF_DOWN); + t2("-8.1488000628720211739998282062206736158332e+75", "-2.001705e+6119", "-8.148800062872021173999828206220673615833e+75", 40, RoundingMode.ROUND_DOWN); + t2("-1080.0089303345457", "-2.70053959411289137357067400343848e+7462", "-1.0800089303345457e+3", 47, RoundingMode.ROUND_FLOOR); + t2("-951.8120833154", "-4601803.9053077601346104732884149542122", "-9.518120833154e+2", 85, RoundingMode.ROUND_DOWN); + t2("623427944.6738997303017990", "8.80254156992034229e+39", "6.23427944673899730301799e+8", 67, RoundingMode.ROUND_HALF_DOWN); + t2("2.35391833099492200539685512e+541", "6.54579350680846293549701724417257e+6501", "2.35391833099492200539685512e+541", 78, RoundingMode.ROUND_FLOOR); + t2("-5.802871745569351746236032657404971772902653184e+166", "-569601127769.9071963300149221373", "-3.942765500842812255133287266114e+11", 95, RoundingMode.ROUND_CEIL); + t2("58251.5299394592584913418694544936952", "9.922305336838175628353279413320037919974386628e+529", "5.82515299394592584913418694544936952e+4", 38, RoundingMode.ROUND_UP); + t2("178.810791", "5.9730850405607582e+127", "1.78810791e+2", 84, RoundingMode.ROUND_HALF_DOWN); + t2("-7.213282126127679116801393251769456078498115487567582164e+771", "9.6205166181505588836203473075832010219834163e+54", "-2.5117368798393502824500490159742596742822416e+54", 68, RoundingMode.ROUND_CEIL); + t2("4.4e+1415", "-1791.169782612342099849155398906941466798405915791267", "4.653087683667797453179502356881392981661075348818e+2", 49, RoundingMode.ROUND_HALF_EVEN); + t2("3.34143206113154599754e+6694", "-7.26959684903106538055444862542e+55", "3.3407965043731368445510652696e+54", 72, RoundingMode.ROUND_HALF_EVEN); + t2("7.01029485594801768569517050720798941155721968259835932500e+9422", "-7.0642669512907646431409065185107769129961433230267e+65", "2.2427484434740226146829404720536384416432051622105e+65", 95, RoundingMode.ROUND_DOWN); + t2("-4.33801305787072916172388791e+80", "5.22122485473591837565234669915e+391", "-4.33801305787072916172388791e+80", 27, RoundingMode.ROUND_CEIL); + t2("7.8492581941996654096258841e+325", "8.9130586564498055969723193446e+77", "6.957386304461095271086697014e+77", 33, RoundingMode.ROUND_HALF_EVEN); + t2("7.23792299537795282764181e+89", "84967.13729986244128821297358194722156577559385", "6.7621143544859443748328006466947263422e+4", 38, RoundingMode.ROUND_UP); + t2("5033998704.17776924377988587279152844", "8.08401900237472415884868065688485795856720872615446e+8410", "5.03399870417776924377988587279152e+9", 33, RoundingMode.ROUND_FLOOR); + t2("-5.94302899773211952133552303e+187", "2.9972e+7", "-2.9248e+7", 64, RoundingMode.ROUND_HALF_DOWN); + t2("-9.708e+685", "9.19085856796459395e+9531", "-9.708e+685", 68, RoundingMode.ROUND_UP); + t2("-1.5465036868358516166872219595", "-6.6120784612856e+68", "-1.5465036868358516166872219595e+0", 35, RoundingMode.ROUND_FLOOR); + t2("-3.3053551448370844845756700300850e+3913", "-8.3467925553134e+50", "-4.1896819159544e+50", 96, RoundingMode.ROUND_DOWN); + t2("9.09456645650818213193831463546071024679434471379e+666", "7.38724213405152e+6026", "9.09456645650818213193831463546071024679434471379e+666", 67, RoundingMode.ROUND_HALF_DOWN); + t2("4.58641736178041090644887341275999994080950314188e+1696", "42578392.4318675275571079327730844188901162369235804917550975", "1.23791564353744632853300363493236151396949910992682155531775e+7", 65, RoundingMode.ROUND_HALF_DOWN); + t2("7.9961e+998", "-1.1820804651008895509998463408241199118086e+9578", "7.9961e+998", 63, RoundingMode.ROUND_CEIL); + t2("-6.072e+5252", "-7.18009312791883624836138815068459810882308438794417e+8712", "-6.072e+5252", 47, RoundingMode.ROUND_HALF_UP); + t2("-4.5600994941281230126894362369720165703108388452e+2403", "-622038.4747064194717182782274608403027399105469860723330", "-5.4141438904500328e+5", 17, RoundingMode.ROUND_HALF_EVEN); + t2("-3.25278868174882601881e+2959", "7.8431549098046872891828825565737588458734074284671853699539e+633", "-2.3794416114981559662e+633", 20, RoundingMode.ROUND_DOWN); + t2("3.6343105960435681326882097841415419173146739156748857909293e+163", "-21", "1.5e+1", 34, RoundingMode.ROUND_UP); + t2("-8.518623612127699770931777976e+45", "2646604900335022323292722367397273217264.57291", "-1.71262916408899413908e+39", 21, RoundingMode.ROUND_FLOOR); + t2("4174055292995644.9880231577567977226789530659873674", "8.360559715199137928831459829758326270411708783897324911671e+6398", "4.174055293e+15", 12, RoundingMode.ROUND_HALF_EVEN); + t2("61974599899119.9534242842171966733601323", "-5.453e+1783", "6.197e+13", 4, RoundingMode.ROUND_FLOOR); + t2("6543503.0162949178948038773968906145153443230268592", "-7125491.922", "6.5435030162949178948038773968906145153443e+6", 41, RoundingMode.ROUND_HALF_EVEN); + t2("-29924.33147502565764364098940606", "-1592929.777384719554672688705249208524154144674784435883721", "-2.99243314750256576e+4", 18, RoundingMode.ROUND_DOWN); + t2("-4311819637633458353446934226481969087340.175", "3e+888", "-4.311819637633458353446934226481969087340175e+39", 69, RoundingMode.ROUND_HALF_EVEN); + t2("-701325358.8507151963018486", "5.02485985784225975e+2516", "-7.013253588507151963018486e+8", 69, RoundingMode.ROUND_DOWN); + t2("-6.3336349419868999600556396454550393580710353e+559", "30.032145617405641584200167823777472745177252592857", "-1.804780266424170907995664538747e+1", 31, RoundingMode.ROUND_HALF_DOWN); + t2("8208171.29438957568235282192379149634710643516674459", "5.526518296200919451845144699586071213e+56", "8.20817129438957568235282192379149634710643516674459e+6", 74, RoundingMode.ROUND_HALF_EVEN); + t2("-7026771.991488141635713537245992635089330556307", "-5.78495686345608787896765252e+87", "-7.026771991488141635713537245992635089330556307e+6", 78, RoundingMode.ROUND_FLOOR); + t2("-682825", "-9.58106140947497715953494e+7650", "-6.82825e+5", 53, RoundingMode.ROUND_DOWN); + t2("1.0432667917954743913105334020914075684681873553141e+53", "-363639573.56541900063559754", "8.8041122284741437367e+6", 20, RoundingMode.ROUND_CEIL); + t2("9.294092190225380807622716e+554", "82510153.549550000881266062462945", "5.7307479561359672028887521773435e+7", 37, RoundingMode.ROUND_UP); + t2("-8.61826021489505921628320081423912946310238785369120278845e+4535", "4413386685.26795493710228068839622996984174618", "-3.38270650710585646963860751526981526607567182e+9", 85, RoundingMode.ROUND_FLOOR); + t2("-2.672585214604e+621", "-9.578201948955624059202e+62", "-5.08879650726473396428e+61", 35, RoundingMode.ROUND_HALF_UP); + t2("6.9128357540377177371762216197787022755536508992068094e+523", "-3.2577610725568034259555913702314301e+502", "3.2025889458822105348276677851579185e+502", 94, RoundingMode.ROUND_HALF_UP); + t2("-5.441086784380795770829212", "671.1382228580292151191915154358159424235725030704", "-5.4410867843808e+0", 14, RoundingMode.ROUND_HALF_EVEN); + t2("8.151289172051252728e+49", "-288.51320484667811368085314331", "2e+2", 1, RoundingMode.ROUND_HALF_DOWN); + t2("8.075e+8", "-2.3439742423603951162113459", "1.5484257243982081068293252e+0", 98, RoundingMode.ROUND_HALF_EVEN); + t2("-5.8040872885301e+27", "-756632.178760425828115651424792498655635088327", "-6.7838751e+5", 8, RoundingMode.ROUND_HALF_DOWN); + t2("-6.30185023912358362453739e+43", "-5.8291686913947145494292529837761538164089993367780968996309e+182", "-6.301e+43", 4, RoundingMode.ROUND_CEIL); + t2("-2.3168408598819483038286410534187220e+54", "5.76821013360839181791090764e+895", "-2.316840859881948303828641053418722e+54", 64, RoundingMode.ROUND_HALF_DOWN); + t2("4.73433879920597402830e+517", "7.19935223140121316154319557870953e+83", "6.276715240828e+83", 13, RoundingMode.ROUND_HALF_UP); + t2("-2.81509e+6", "1.812e+246", "-2.81509e+6", 83, RoundingMode.ROUND_FLOOR); + t2("-3.7125440302535164287920458084935906", "9.4056833e+407", "-3.7125440302535164287920458084935906e+0", 100, RoundingMode.ROUND_UP); + t2("3.8089600875379985918666854598970946009387586848198798601e+64", "-9.842428987583196816730893684990759478255192322e+172", "3.808960087537998592e+64", 19, RoundingMode.ROUND_CEIL); + t2("-6.49308611559837353028439424226724e+681", "-6.9279627338450039699162972e+5038", "-6.49308611559837353028439424226724e+681", 52, RoundingMode.ROUND_DOWN); + t2("-3.283e+8", "1.59267743467980e+46", "-3.283e+8", 74, RoundingMode.ROUND_HALF_DOWN); + t2("8.69757929965438373165362773612974e+192", "-73.79436307426341549232457077000482745011", "5.145179803297395e+1", 16, RoundingMode.ROUND_UP); + t2("-8.2373007776535315311267037638881860091e+40", "-5.757730498009786912193794e+37", "-3.7461654995362466895783438881860091e+37", 89, RoundingMode.ROUND_DOWN); + t2("8.2753743577733496649229415e+370", "-88797.16162", "5.492178204e+4", 93, RoundingMode.ROUND_HALF_UP); + t2("1.48581817545381241776887741933992917284785358529", "5903622466634088045894004.22718934", "1.48581817545381241776887741933992917284785358529e+0", 71, RoundingMode.ROUND_HALF_EVEN); + t2("5.129086074208008222351499810040746978958761126e+293", "496793381949653476385416592315281192971751225.09020825", "4e+44", 1, RoundingMode.ROUND_DOWN); + t2("-2.80845381738689415933627794871721050391716565400744493348202e+159", "4042022.949118089592", "-5.1205e+5", 5, RoundingMode.ROUND_HALF_DOWN); + t2("-7.608461933481403715443327118274378005025e+6785", "73027440923359159570.9274647515324850715", "-4.0233559318242465845769751200091461814e+19", 100, RoundingMode.ROUND_UP); + t2("5.3656679337854155278424098140145779577342655431342620134014e+7681", "-9.34344633539969e+136", "3.2266e+135", 5, RoundingMode.ROUND_UP); + t2("-8.76e+15", "7.884013646400282186823118749015404657404866922926e+5546", "-9e+15", 1, RoundingMode.ROUND_UP); + t2("3.08613897206936240922007217437132e+9939", "5.60781020e+9", "4.424842e+9", 17, RoundingMode.ROUND_CEIL); + t2("17.347072298067804168620815", "9.6146989823337249222122068576315652901e+59", "1.7347072298067804168620815e+1", 81, RoundingMode.ROUND_CEIL); + t2("-3.3610512896674974771860856952304666e+76", "9.82609790457683994410", "-5.4089915183757222993e+0", 91, RoundingMode.ROUND_FLOOR); + t2("-5.075266107871695934621156287679557190e+225", "-8950634354.102096867", "-3.320100822028796139e+9", 64, RoundingMode.ROUND_HALF_UP); + t2("1.80906977550635553008735110130154444563675928517e+222", "-2.3641653094828594182991e+850", "1.809069775506355530087351e+222", 25, RoundingMode.ROUND_HALF_DOWN); + t2("2.10724292529592973714942968646730881946629591268819155763e+96", "8.7469186241449712430e+308", "2.1072429252959297371494297e+96", 26, RoundingMode.ROUND_HALF_DOWN); + t2("2.511951653e+3360", "-62704201442675201961255868610.62", "2.566182839527647e+28", 16, RoundingMode.ROUND_FLOOR); + t2("-243025.9013822376723836745951444", "-2.6675104229981642056765726341862e+9212", "-2.430259013822376723836745951444e+5", 91, RoundingMode.ROUND_DOWN); + t2("5.9150440852e+129", "1756386.26758530048962177340289455990042113", "1.51990747887335793925678558668139806689985e+6", 53, RoundingMode.ROUND_HALF_DOWN); + t2("-94252.40812498886857383293649", "-3.8032732751134162575094809941651e+621", "-9.425240812498886857383293649e+4", 96, RoundingMode.ROUND_HALF_UP); + t2("-6.00559063113006083268308811806162403396832594e+7303", "-526206391770735839309548148095066062264265607373.735063960260", "-2.5090125586506678664e+47", 20, RoundingMode.ROUND_HALF_EVEN); + t2("-2.2567835144492993286994200e+573", "3.86e+19", "-2.72e+19", 56, RoundingMode.ROUND_UP); + t2("45.40437334953326105840633843242", "8.165685418205048453423994094023522482e+91", "4.540437334953326105840633843242e+1", 55, RoundingMode.ROUND_HALF_EVEN); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalNegTests.cs b/DecimalSharp.Tests/BigDecimalNegTests.cs new file mode 100644 index 0000000..8903f04 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalNegTests.cs @@ -0,0 +1,242 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalNeg")] + public class BigDecimalNegTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Neg() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).Neg().ValueOf()); + }; + + t("-4", 4); + t("-2147483648", 2147483648); + t("-0.25", 0.25); + t("-0.0625", 0.0625); + t("-1", 1); + t("1", -1); + t("-0", 0); + t("0", "-0"); + t("-0", "0"); + t("0", "-0"); + t("NaN", double.NaN); + t("NaN", "NaN"); + t("-Infinity", double.PositiveInfinity); + t("Infinity", double.NegativeInfinity); + t("-Infinity", "Infinity"); + t("Infinity", "-Infinity"); + + t("-9.99e+9000000000000000", "9.99e+9000000000000000"); + t("9.99e+9000000000000000", "-9.99e+9000000000000000"); + t("-Infinity", "1e+9000000000000001"); + t("Infinity", "-1e+9000000000000001"); + t("-1e-9000000000000000", "1e-9000000000000000"); + t("1e-9000000000000000", "-1e-9000000000000000"); + t("0", "-1e-9000000000000001"); + + t("-238", "238"); + t("1.3e-11", "-0.000000000013"); + t("-33.1", "33.1"); + t("2.61", "-2.61"); + t("-4", "4.0"); + t("-5.8", "5.8"); + t("-3.52e-7", "0.000000352"); + t("190", "-190"); + t("4.47", "-4.47"); + t("6.9525e-12", "-0.0000000000069525"); + t("1.3", "-1.3"); + t("-6.21", "6.21"); + t("2", "-2"); + t("-1", "1"); + t("147.857", "-147.857"); + t("-26.517", "26.517"); + t("-3", "3"); + t("5", "-5"); + t("204", "-204"); + t("2.1e-8", "-0.000000021"); + t("3.7015e-7", "-0.00000037015"); + t("-50.1839", "50.1839"); + t("44768.1", "-44768.1"); + t("3.8e-15", "-0.0000000000000038"); + t("-7.4379", "7.4379"); + t("1.5", "-1.5"); + t("6.0399", "-6.0399"); + t("109.07", "-109.070"); + t("1582", "-1582"); + t("-772", "772"); + t("-6.7824e-14", "0.000000000000067824"); + t("-1.819e-8", "0.00000001819"); + t("-3e-15", "0.0000000000000030"); + t("-424120", "424120"); + t("-1814.54", "1814.54"); + t("-4.295e-17", "0.00000000000000004295"); + t("-5", "5"); + t("2152", "-2152"); + t("4.6", "-4.6"); + t("1.9", "-1.9"); + t("-2", "2.0"); + t("-0.00036", "0.00036"); + t("-0.000006962", "0.000006962"); + t("3.6", "-3.6"); + t("-1.1495e-14", "0.000000000000011495"); + t("-312.4", "312.4"); + t("4.3e-10", "-0.00000000043"); + t("5", "-5"); + t("-1.8911e-8", "0.000000018911"); + t("4963.53", "-4963.53"); + t("-4.3934e-10", "0.00000000043934"); + t("-1.3", "1.30"); + t("-1", "1.0"); + t("-68.32", "68.32"); + t("0.014836", "-0.014836"); + t("8", "-8"); + t("2.1351", "-2.13510"); + t("162224", "-162224"); + t("3e-19", "-0.00000000000000000030"); + t("0.00004985", "-0.00004985"); + t("28.9321", "-28.9321"); + t("-2", "2"); + t("-16688", "16688"); + t("-1", "1"); + t("5", "-5"); + t("-20", "20.0"); + t("-1.9", "1.9"); + t("3", "-3"); + t("185640", "-185640"); + t("-0.0000058", "0.0000058"); + t("9.67e-13", "-0.000000000000967"); + t("-707.98", "707.98"); + t("2.57917", "-2.57917"); + t("-1.3", "1.3"); + t("-4.2655", "4.2655"); + t("-149.6", "149.6"); + t("-1.32383", "1.32383"); + t("-26.925", "26.925"); + t("-0.00013", "0.00013"); + t("-6868", "6868"); + t("7", "-7"); + t("-5e-9", "0.0000000050"); + t("3.2555e-16", "-0.00000000000000032555"); + t("1.42768e-13", "-0.000000000000142768"); + t("11.2962", "-11.2962"); + t("3186.7", "-3186.7"); + t("-6.9", "6.9"); + t("-6.2618e-7", "0.00000062618"); + t("8", "-8"); + t("-8.04", "8.04"); + t("-22", "22"); + t("-750.6", "750.6"); + t("12.803", "-12.803"); + t("-20513.4", "20513.4"); + t("114781", "-114781"); + t("-16.9046", "16.9046"); + t("4.6e-7", "-0.00000046"); + t("-31399", "31399"); + t("1.04", "-1.04"); + t("-51.2544", "51.2544"); + t("1.023e-15", "-0.000000000000001023"); + t("281", "-281"); + t("-128315", "128315"); + t("20.2", "-20.2"); + t("9", "-9"); + t("-10", "10"); + t("-1.92262e-17", "0.0000000000000000192262"); + t("-0.0023", "0.0023"); + t("5", "-5"); + t("7", "-7"); + t("13.72", "-13.72"); + t("98068", "-98068"); + t("3.2", "-3.2"); + t("1.1", "-1.1"); + t("-3.97e-18", "0.000000000000000003970"); + t("0.00334824", "-0.00334824"); + t("-5.4892e-8", "0.000000054892"); + t("-1", "1.0"); + t("-2.8135e-8", "0.000000028135"); + t("-1.816e-13", "0.0000000000001816"); + t("199724", "-199724"); + t("-19.4", "19.40"); + t("-12.74", "12.74"); + t("-2171.8", "2171.8"); + t("-2.7", "2.7"); + t("1", "-1.0"); + t("21779", "-21779"); + t("8.9e-12", "-0.0000000000089"); + t("-4.51", "4.51"); + t("2.6", "-2.6"); + t("-0.00016", "0.000160"); + t("6", "-6"); + t("50.566", "-50.566"); + t("-16.2", "16.2"); + t("-9444", "9444"); + t("21.4", "-21.4"); + t("2.5", "-2.5"); + t("489311", "-489311"); + t("6.8", "-6.8"); + t("4.29", "-4.29"); + t("23982", "-23982.0"); + t("-0.0111781", "0.0111781"); + t("4.96e-20", "-0.0000000000000000000496"); + t("-40.5481", "40.5481"); + t("-32.52", "32.52"); + t("-7.4", "7.4"); + t("-5", "5.0"); + t("-2463.4", "2463.4"); + t("7.363", "-7.363"); + t("2.8", "-2.8"); + t("-14498", "14498"); + t("201", "-201"); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("-5.0600621890668482322956892808849303e+20", "5.0600621890668482322956892808849303e+20"); + t("7e+0", "-7e+0"); + t("-6.1095374220609e+13", "6.1095374220609e+13"); + t("9.01e+2", "-9.01e+2"); + t("-1.016984074247269470395836690098169093010136836967e+39", "1.016984074247269470395836690098169093010136836967e+39"); + t("-1.497639134680472576e+18", "1.497639134680472576e+18"); + t("-4.1717657571404248e+16", "4.1717657571404248e+16"); + t("8.983272e+1", "-8.983272e+1"); + t("-5.308416e+6", "5.308416e+6"); + t("-2.09764e+3", "2.09764e+3"); + t("-3.83432050166120236679168e+23", "3.83432050166120236679168e+23"); + t("-4.096e+3", "4.096e+3"); + t("2.679971527468745095582058350756311201706813294321409e+51", "-2.679971527468745095582058350756311201706813294321409e+51"); + t("-5.067853299870089529116832768e+2", "5.067853299870089529116832768e+2"); + t("-3.48822062687911109850066182676769e+32", "3.48822062687911109850066182676769e+32"); + t("-1e+0", "1e+0"); + t("4.2773e+0", "-4.2773e+0"); + t("5.8169306081172252508071119604378757744768e+12", "-5.8169306081172252508071119604378757744768e+12"); + t("-1e+0", "1e+0"); + t("1.51655708279450944384385164853883404204414169862685507e+46", "-1.51655708279450944384385164853883404204414169862685507e+46"); + t("-8.1e+1", "8.1e+1"); + t("-1.296e+3", "1.296e+3"); + t("-2.9e+0", "2.9e+0"); + t("-1.764e+3", "1.764e+3"); + t("9.3418332730097368870513138581415704704611459349313e+49", "-9.3418332730097368870513138581415704704611459349313e+49"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalPlusTests.cs b/DecimalSharp.Tests/BigDecimalPlusTests.cs new file mode 100644 index 0000000..17622a5 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalPlusTests.cs @@ -0,0 +1,1065 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalPlus")] + public class BigDecimalPlusTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Plus() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 200, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e9, + ToExpPos = (long)9e9, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument addendA, BigDecimalArgument addendB, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(addendA).Plus(addendB).ValueOf()); + }; + + t(1, 0, "1"); + t(1, "-0", "1"); + t(-1, 0, "-1"); + t(-1, "-0", "-1"); + t(1, "NaN", "NaN"); + t(-1, "NaN", "NaN"); + t(1, "Infinity", "Infinity"); + t(1, "-Infinity", "-Infinity"); + t(-1, "Infinity", "Infinity"); + t(-1, "-Infinity", "-Infinity"); + t(0, 1, "1"); + t(0, -1, "-1"); + t("-0", 1, "1"); + t("-0", -1, "-1"); + + /* + IEEE 754 - 2008 section 6.3 + When the sum of two operands with opposite signs is exactly zero, the sign of that sum shall + be +0 in all rounding-direction attributes except roundTowardNegative; under that attribute, + the sign of an exact zero sum shall be −0. + However, x + x = x −(−x) retains the same sign as x even when x is zero. + */ + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + + t("0", "-0", "-0"); // 0 + -0 = -0 + t("-0", "0", "-0"); // -0 + 0 = -0 + t("0", "0", "0"); // 0 + 0 = 0 + t("-0", "-0", "-0"); // -0 + -0 = -0 + t("1", "-1", "-0"); // 1 + -1 = -0 + t("-1", "1", "-0"); // -1 + 1 = -0 + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + + t("0", "-0", "0"); // 0 + -0 = 0 + t("-0", "0", "0"); // -0 + 0 = 0 + t("0", "0", "0"); // 0 + 0 = 0 + t("-0", "-0", "-0"); // -0 + -0 = -0 + t("1", "-1", "0"); // 1 + -1 = 0 + t("-1", "1", "0"); // -1 + 1 = 0 + + t(0, double.NaN, "NaN"); + t("-0", double.NaN, "NaN"); + t(0, double.PositiveInfinity, "Infinity"); + t(0, double.NegativeInfinity, "-Infinity"); + t("-0", double.PositiveInfinity, "Infinity"); + t("-0", double.NegativeInfinity, "-Infinity"); + t("NaN", 1, "NaN"); + t("NaN", -1, "NaN"); + t("NaN", 0, "NaN"); + t("NaN", "-0", "NaN"); + t("NaN", "NaN", "NaN"); + t("NaN", double.PositiveInfinity, "NaN"); + t("NaN", double.NegativeInfinity, "NaN"); + t(double.PositiveInfinity, 1, "Infinity"); + t(double.PositiveInfinity, -1, "Infinity"); + t(double.NegativeInfinity, 1, "-Infinity"); + t(double.NegativeInfinity, -1, "-Infinity"); + t(double.PositiveInfinity, 0, "Infinity"); + t(double.PositiveInfinity, "-0", "Infinity"); + t(double.NegativeInfinity, 0, "-Infinity"); + t(double.NegativeInfinity, "-0", "-Infinity"); + t(double.PositiveInfinity, "NaN", "NaN"); + t(double.NegativeInfinity, "NaN", "NaN"); + t(double.PositiveInfinity, double.PositiveInfinity, "Infinity"); + t(double.PositiveInfinity, double.NegativeInfinity, "NaN"); + t(double.NegativeInfinity, double.PositiveInfinity, "NaN"); + t(double.NegativeInfinity, double.NegativeInfinity, "-Infinity"); + + t(1, "0", "1"); + t(1, "1", "2"); + t(1, "-45", "-44"); + t(1, "22", "23"); + //t(1, 0144, "101"); //js only + t(1, "0144", "145"); + t(1, "6.1915", "7.1915"); + t(1, "-1.02", "-0.02"); + t(1, "0.09", "1.09"); + t(1, "-0.0001", "0.9999"); + t(1, "8e5", "800001"); + t(1, "9E12", "9000000000001"); + t(1, "1e-14", "1.00000000000001"); + t(1, "3.345E-9", "1.000000003345"); + t(1, "-345.43e+4", "-3454299"); + t(1, "-94.12E+0", "-93.12"); + t("0", 0, "0"); + t("0", "0", "0"); + t(3, "-0", "3"); + t(9.654, 0, "9.654"); + t(0, "0.001", "0.001"); + t(0, "111.1111111110000", "111.111111111"); + t("NaN", "0", "NaN"); + t(-1, 1, "0"); + t(-0.01, 0.01, "0"); + t(54, -54, "0"); + t(9.99, "-9.99", "0"); + t("0.00000", "-0.000001", "-0.000001"); + t("0.0000023432495704937", "-0.0000023432495704937", "0"); + t(double.NaN, double.NaN, "NaN"); + t(double.NaN, "NaN", "NaN"); + t("NaN", double.NaN, "NaN"); + t("NaN", 4, "NaN"); + t("NaN", "4534534.45435435", "NaN"); + t("NaN", 99999.999, "NaN"); + t(double.PositiveInfinity, "354.345341", "Infinity"); + t(3, double.NegativeInfinity, "-Infinity"); + t(double.NegativeInfinity, double.NegativeInfinity, "-Infinity"); + t(double.NegativeInfinity, double.NegativeInfinity, "-Infinity"); + t(double.PositiveInfinity, "-999e999", "Infinity"); + t("1.21123e43", double.NegativeInfinity, "-Infinity"); + t("-999.0", double.PositiveInfinity, "Infinity"); + t("657.342e-45", double.NegativeInfinity, "-Infinity"); + t(double.PositiveInfinity, 123, "Infinity"); + t(100, 100, "200"); + t(-999.99, "0.01", "-999.98"); + t("10", 4, "14"); + t("03.333", -4, "-0.667"); + t(-1, -0.1, "-1.1"); + t(43534.5435, "0.054645", "43534.598145"); + t("99999", "1", "100000"); + + var t2 = (BigDecimalArgument addendA, BigDecimalArgument addendB, string expected, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(addendA, config).Plus(addendB).ValueOf()); + }; + + t2("593563412042.65071284077577238642546669796903116", "7399734315.5", "600963146358.15071284077577238642546669796903116", 78, RoundingMode.ROUND_CEIL); + t2("91834314419826105636913315.2250760351217688154427716325", "3453589484.0922087", "91834314419826109090502799.317284735121768815442772", 50, RoundingMode.ROUND_CEIL); + t2("1720025.190318830518434426408143", "66109246773146613017341021115.139667467395061272917480324885924044", "66109246773147000000000000000", 14, RoundingMode.ROUND_HALF_DOWN); + t2("84956243086401045.957714583212857676046952761360420789675", "236266946455107694023566236.1067", "236266946540063937109967282.064414583212857676046952761360420789675", 76, RoundingMode.ROUND_HALF_UP); + t2("27679002965950558720382323007580555707.1129725764", "3902452514422.1829293695210524511304537682971792", "27679002965950558720382326910033070000", 34, RoundingMode.ROUND_HALF_EVEN); + t2("9182914763445141913243843569172715469835.4885696227829197845538926", "7633444625534.6271670438", "9182914763445141913243843576806160095370.115", 43, RoundingMode.ROUND_DOWN); + t2("29495676.658886008145597040990327830", "6931766589765486564126938677173.788", "6931766589765486564126968172850.44688600814559704099032783", 97, RoundingMode.ROUND_HALF_UP); + t2("379110485.1879790330578106922187736430522", "44778134175412745601990207594724261558.24483", "50000000000000000000000000000000000000", 1, RoundingMode.ROUND_UP); + t2("294375205.06", "0.4210755138711679324480015392679141", "294375205.4810755138711679324480015392679141", 80, RoundingMode.ROUND_FLOOR); + t2("97.8245", "678086929547037858952090.4586", "678086929547037858952188.2831", 47, RoundingMode.ROUND_CEIL); + t2("88488789676361292764625272698.8", "9635357185402290148967003271409315372896.608367362907029792956117646", "9635357185490778938643364564173941000000", 34, RoundingMode.ROUND_HALF_UP); + t2("6.6986623837182087397483631708665129676441", "4979636344219290763240.0069", "4979636344219290763246.705562383718208739748363170866513", 55, RoundingMode.ROUND_HALF_EVEN); + t2("70719500740711222218051791089542849911.838248343393159286401111269584528", "72611217359692246954.6315", "70719500740711222290663008449235096866.469748343393159286401111269584528", 100, RoundingMode.ROUND_CEIL); + t2("58732556421350640725226.234521198024002553600", "58121246202.94542710436381", "58732556421408700000000", 15, RoundingMode.ROUND_FLOOR); + t2("3974581800977029548324180832.13384409524742094306099637", "3614381973858572.7418758814906985", "3974581800000000000000000000", 9, RoundingMode.ROUND_HALF_EVEN); + t2("697637766264066731981534075222456637269.8150", "84841485703909.9296471188463060", "697637766264066731981534160063942341179.744", 42, RoundingMode.ROUND_FLOOR); + t2("47061.38", "1757281333528971368573.2805225778643923494834101231347769030", "1757281333528971415634.660522577864392349483410123134776903", 76, RoundingMode.ROUND_CEIL); + t2("1476403577722345877.206796162385539569704", "9942200550749890696264919346845234.2", "9942200550749892172700000000000000", 20, RoundingMode.ROUND_HALF_UP); + t2("12589380812542.2800574047701400763640862141749065", "6621312631.8566626344982182410585379", "12596002125174.136720039268", 26, RoundingMode.ROUND_HALF_EVEN); + t2("7882195982742109440258991594228896.97647548424454", "549984552171.2", "7882195982742109440259541578781068.17647548424454", 62, RoundingMode.ROUND_FLOOR); + t2("79344567.9583146261700423456539738617142116267", "76770085769491324895202178331658.82467912070", "76770085769491324895202257676226.7829937468700423456539738617142116267", 75, RoundingMode.ROUND_DOWN); + t2("9803952036104667191144020833.60300205", "9495298573633466486861.2007267111985", "9803961531403240824610507694.8037287611985", 91, RoundingMode.ROUND_HALF_EVEN); + t2("42717742030595859.2062217089376928894751002693", "4392.7633096899809016584837135701339842639427", "42717742030600251.9695313989185945479588138394339842639427", 84, RoundingMode.ROUND_UP); + t2("175862554420496917507.72", "11748733600781956.625570241067964572154062958", "175874300000000000000", 7, RoundingMode.ROUND_HALF_UP); + t2("388528785785093377176597943386.8074346502385319459876897943393772766", "780579558740664211027356329768421.54760979278144", "780968087526449304404532927711808.355044443019971", 48, RoundingMode.ROUND_FLOOR); + t2("64154311030289309886070986793918832.391977325870878", "85034840868876941709096163143445.05236", "64239345871158186827780082957000000", 29, RoundingMode.ROUND_FLOOR); + t2("558109875620.787158", "4318677092534293169485.05154202819301085696282200030", "4318677090000000000000", 9, RoundingMode.ROUND_HALF_EVEN); + t2("8.1572164344501210656681193", "141383742681203268175705548539.5903424774279108405668653", "141383742681203268175705548547.7475589118780319062349846", 87, RoundingMode.ROUND_DOWN); + t2("475020553895752975125109317246970868141.19586602169742108309356725817022171", "50527762765152355076523195636814.169841064002562503683522141227541614", "475020604423515740277460000000000000000", 23, RoundingMode.ROUND_HALF_DOWN); + t2("623051342929926112359884960895415731939.5562490236742100882954960168", "503245645050146765988526273.758561914511343318476865211", "623051342930429358004935107661404258213.3148109381855534067723612278", 74, RoundingMode.ROUND_HALF_EVEN); + t2("531029963832660460416202620349662236.9", "1698435814148807364109817.622700275250303509772194494494138982090", "531030000000000000000000000000000000", 5, RoundingMode.ROUND_HALF_UP); + t2("6222.818987", "2745.84213504008632396977994287249342", "8968.66112204008632396977994287249342", 45, RoundingMode.ROUND_HALF_DOWN); + t2("83277468481757396400448039342892.13637251061", "949622766461448278187285221580222572.50707178970245998726148766810515863", "949706043929930035000000000000000000", 18, RoundingMode.ROUND_FLOOR); + t2("50515084033799949576079332969.310908542889109621643886016029143", "9995275496554.2256723021298", "50515084033799959571354000000", 23, RoundingMode.ROUND_FLOOR); + t2("58075371184786989216823527114006.8193336921861462723001823062864617438", "831577.37480626", "58075371184786989216823527945584.1941399521861463", 48, RoundingMode.ROUND_HALF_UP); + t2("354334.661931489528109", "49318851855669319.7668000614644666331306269353669354", "49000000000000000", 2, RoundingMode.ROUND_HALF_DOWN); + t2("171792414269.20500878", "7228500834975.6421662524366409", "7400293249244.8471750324366409", 86, RoundingMode.ROUND_HALF_DOWN); + t2("3686865567196977754914570753132702.86443144944286374816106555429", "252977292743732124354509767399171006.56792658736276850447471854354498", "256664158310929102109424338152303709.43235803680563225263578409783498", 76, RoundingMode.ROUND_DOWN); + t2("7772413527479.0292045567366574215506978466", "6951039673098790484081676762223797578.48972170861559580041987995", "6951039673098790484081684534637325057.5189262", 44, RoundingMode.ROUND_DOWN); + t2("897519.488463768126475213360003650464", "243345915368302813437999412228446907.03319139912318828693096", "243345915368302813437999412229344426.521655167249663500290963650464", 69, RoundingMode.ROUND_DOWN); + t2("9944701104687189448523634989441.1145387693210320276079647", "76461573432179845156280348475771563.06533912678377627209249", "76471518133284532345728872110761004.179877896", 44, RoundingMode.ROUND_DOWN); + t2("49868358282915444463601511745776323.6756", "426.127124853", "49868358282915444463601511745776749.802724853", 62, RoundingMode.ROUND_DOWN); + t2("462611390833337670596267664076995136589.8078310066750996553090298147792146374", "86220896429616059447274947806526227.378336884633", "462697611729767286655714939024801662817.18616789130809965530902981477921", 71, RoundingMode.ROUND_HALF_DOWN); + t2("3082844058.9630699111683783220405718767649310463", "9821678552282552.46", "9821681635126611.4230699111683783220405718767649310463", 85, RoundingMode.ROUND_HALF_EVEN); + t2("968956231687314239915639.8479448896945159", "2013053560776294882507697425832898126329.553542945365269900429", "2013053560776295851463929113147138041969.401487835059786", 55, RoundingMode.ROUND_UP); + t2("18829358460454562606796373222566693.8406444934478081754024757172", "245696827314924767344.62999383040940", "18829358460454808303623688147334038.4706383238572081754024757172", 65, RoundingMode.ROUND_DOWN); + t2("87272640829480092614399030.17403303652178770296488752252", "80645627676002739119663787.1389295", "167918268505482831700000000", 19, RoundingMode.ROUND_HALF_UP); + t2("110333142216083345526934754242807378414.8112810978", "8009375616663973267889.632407900829561884426774123507672", "110333142217000000000000000000000000000", 12, RoundingMode.ROUND_CEIL); + t2("7306882124433855860885172398759699317308.33181885682904", "7340.5772269222099866925020556183", "7306882124433855860885172398759699324648.9090457790390266925020556183", 73, RoundingMode.ROUND_UP); + t2("451443519.5", "40545287685504171383686533617478.0379433921591774655032923922180", "40545287685504171383686985060997.537943392159177465503292392218", 85, RoundingMode.ROUND_DOWN); + t2("9103707265251.90817165947074590284", "7132.1726911109784489", "9103707272384.08086277044919480284", 57, RoundingMode.ROUND_DOWN); + t2("1327536619868001635732671456652796081.82503453353162015625727828", "777720909904.3138244842545463", "1327536619868001635732672234373705986.13885901778616645625727828", 94, RoundingMode.ROUND_HALF_EVEN); + t2("94785498339319783.701937", "5.5284513", "94785498339319789.2303883", 45, RoundingMode.ROUND_FLOOR); + t2("413864849197532888901858875400764791296.16643089", "1079561.227318262349", "413864849197532888901858875400000000000", 29, RoundingMode.ROUND_FLOOR); + t2("45087586598522825025991129716000.35589454049730836", "85381176658152430597133806358376750.386015723730182079339361073643", "85426264244750953422159797488092750.741910264227490439339361073643", 95, RoundingMode.ROUND_FLOOR); + t2("1.577", "5867361133548635578508631112769.512", "5867361133548635578508631112771.089", 37, RoundingMode.ROUND_HALF_EVEN); + t2("611867270001089057.5416980", "928462251839038030221601836154.34932586048493472075", "928462251839649897491602925211.89102386048493472075", 83, RoundingMode.ROUND_UP); + t2("2420842674752.5", "95330664601887717505762272.986252619687512204447", "95330664601890138348437025.486252619687512204447", 89, RoundingMode.ROUND_HALF_UP); + t2("81132109324361724111675518092.0430089148033907345892402992266", "56280915849510057765284537881333571.97531", "56280996981619382127008649556851664.018318914803390734", 53, RoundingMode.ROUND_DOWN); + t2("904671681146500577093476684800344905.4695", "94797652292709883543386718515254224988.65582754951556889876984", "95702323973856384120480195200054569894.12532754951556889876984", 82, RoundingMode.ROUND_FLOOR); + t2("7088106609362197643328448383484980.038959814107063899", "670949858005717984030520198273540550.3057", "678037964615080181673848646657025530.3446598", 43, RoundingMode.ROUND_HALF_DOWN); + t2("99.21410642", "9083.34303307666325286270", "9182.5571394966632528627", 54, RoundingMode.ROUND_HALF_UP); + t2("3283.8936708900357134342", "496435946.937228974879461", "496439230.830899864915174435", 27, RoundingMode.ROUND_CEIL); + t2("676830762646205126.3112659907032497497725497603419138", "119932542098343475889901925878.775805518069408", "119932542099020400000000000000", 16, RoundingMode.ROUND_CEIL); + t2("340784617186492559520867952988798537.2875804", "619036430511269842219006698087.3401406612", "340000000000000000000000000000000000", 2, RoundingMode.ROUND_HALF_DOWN); + t2("173.3190299633996648505", "1824690614717784789521361964710.12123119395", "1824690614717784789521361964883.4402611573496648505", 96, RoundingMode.ROUND_UP); + t2("482415314400600371304757933326735596247.502", "64121617419177033485421455407.5858664539051557486457828966476314714", "482415314464721988723934966812157051655.0878664539051557486457828966476314714", 79, RoundingMode.ROUND_HALF_DOWN); + t2("375737470927645435406243965552430202253.631955167073623", "6338230241298196815836217859672.793", "375730000000000000000000000000000000000", 5, RoundingMode.ROUND_FLOOR); + t2("29573885064956243070331189.3797092614486", "93819837825028613877.417105", "29573978884794068098945066.7968142614486", 96, RoundingMode.ROUND_HALF_EVEN); + t2("138120.700190473452", "968621311075606384.99548987853755995993", "968621311075744505.69568035198955995993", 45, RoundingMode.ROUND_UP); + t2("973.11990", "42154692435544969993439766.300521", "42154692435544969993440739.420421", 58, RoundingMode.ROUND_HALF_DOWN); + t2("554388861256.869722940300672388196938972302318081540", "1155262184508008.03323100857", "1155816573369264.90295394887067238819693897230231808154", 79, RoundingMode.ROUND_CEIL); + t2("3416418236.26400558205105933", "5.6479733", "3416418241.91197888205105933", 38, RoundingMode.ROUND_HALF_DOWN); + t2("2523992943408057896347889018.4465701438462144584", "506142712311227094740144.824697116", "2524499086120369130000000000", 18, RoundingMode.ROUND_CEIL); + t2("308403067969970653523590678072543444693.024992850150499393849129", "732241040738289252979020347.308655416021872045866556456848136589", "308403067970702894564328967325522465040.333648266172371439715685456848136589", 93, RoundingMode.ROUND_DOWN); + t2("3239064136731151.02891710688580557275640729053", "9083206824661083.5207932479503224412", "12322270961392234.54971035483612801395640729053", 80, RoundingMode.ROUND_HALF_DOWN); + t2("475331426870705.089157016478807", "9009215435143577267843833230423.14449365133718648192722331279072569", "9009215435143577743175260101128.233650667", 40, RoundingMode.ROUND_FLOOR); + t2("105248227507845582838.20680935912346655579395894726346139163", "65223604191.5805291176792", "105248227573069190000", 17, RoundingMode.ROUND_HALF_EVEN); + t2("99.215190820118104610069782046", "16578.8209964235031908525606222947444696", "16678.0361872436212954626304043407444696", 63, RoundingMode.ROUND_CEIL); + t2("510539424488693733.41537434134721968131486", "327009.1496755290899995046724660116828516732779", "510539424489020742.56504987043721918598", 38, RoundingMode.ROUND_DOWN); + t2("315204602.81489858995", "3732180545.09", "4047385147.90489858995", 86, RoundingMode.ROUND_HALF_UP); + t2("5314592166616.1", "973281963604549959893809697900212092.07971879384048258785317865", "973281963604549959893815012492378708.17971879384", 48, RoundingMode.ROUND_HALF_UP); + t2("8.7166935890371592992002394888141553196926", "958659296273258091217856839735061.3647474524043063555717437013816", "958659296273258091217856839735070.08144104144146565477198319019575532", 69, RoundingMode.ROUND_HALF_UP); + t2("8540337154693663138.922681853498773232162632659387428466959", "714421549038288078923295717348706283749.09747291", "714421549038288078931836054503399946888.020154763498773232162632659387428466959", 96, RoundingMode.ROUND_FLOOR); + t2("64218.4910654347361732", "1904584344376749176156995834410373768727.880243614504617078941694238", "1904584344376749176156995834410373832946.371309049240790279", 58, RoundingMode.ROUND_CEIL); + t2("79608939157757406640105379.1099825541008835456051880", "93.887979844359072766498", "79608900000000000000000000", 6, RoundingMode.ROUND_HALF_UP); + t2("997619509.8131634548180432", "408723341842195084378669.60436714294200657842422937736174", "408723341842196081998179.41753059776004978", 41, RoundingMode.ROUND_UP); + t2("581375185201895127979063.3148256", "14356334345.7574898", "581375185201909484313409.0723154", 33, RoundingMode.ROUND_DOWN); + t2("3527973624305181687800039808864.5573554755188", "12630611136837256867366017776380.0", "16158584761142438555166000000000", 23, RoundingMode.ROUND_FLOOR); + t2("367630489717480484892012992734563672974.0", "45054048927965278885126985834716.66", "367630534771529412857291900000000000000", 25, RoundingMode.ROUND_HALF_UP); + t2("787513869174.71308620942912467", "23093894176823.452215801790110947022416582614", "23881408045998.165302011219235617022416582614", 69, RoundingMode.ROUND_UP); + t2("57753452879494271824903590.413829378140475084396185", "50545413776472197781.9967870405", "57753503424908048297101372.410616418640475084396185", 58, RoundingMode.ROUND_CEIL); + t2("17236192031420.2163137961486", "692838850166456533709637044970916752.36688025752892121241", "692838850166456533709654281162948172.58319405367752121241", 68, RoundingMode.ROUND_UP); + t2("4171050007467938807033605772358739230.9311059803557030664429028", "0.1923799694080", "4171050007467938807033605772358739231.123485949763703066", 55, RoundingMode.ROUND_HALF_DOWN); + t2("28478160393.9806", "277120391846395984.25", "277130000000000000", 5, RoundingMode.ROUND_UP); + t2("3061847804826051245630.65596944768453555988908615722", "40580833038231825168334767272165347.842548699388", "40580833038234887016139593323410978.4985181470725356", 51, RoundingMode.ROUND_HALF_DOWN); + t2("4307943411739045.1991060215780", "2498934952289.676303798694", "4310442346691334.875409820272", 100, RoundingMode.ROUND_CEIL); + t2("447264.0", "296280025996717104124065506095605789.16501275", "296280025996717104124065506096053053.16501275", 76, RoundingMode.ROUND_FLOOR); + t2("7774084135404146930548457363682921350.47767504567574932067192218196557", "6356426099126393712.50823145833574225514684676449194435", "7774084135404146936904883462809315062.9859065040114915758", 56, RoundingMode.ROUND_FLOOR); + t2("772351722055561484188074604225369559844.02", "4826191208867.1814570305", "772351722055561484190000000000000000000", 20, RoundingMode.ROUND_HALF_UP); + t2("252673622.185680951859328", "14604.688310802671654124022197881135913861968", "252688226.87399175453098212402219789", 35, RoundingMode.ROUND_CEIL); + t2("9844584158.071870640", "7376636821819775622965030201208199.7842455984620137382448558190", "7376636821819775622965040045792357.856116238462013738244855819", 67, RoundingMode.ROUND_UP); + t2("7402851913927.841295065397846204951008", "3095919939427099869935455000158274400904.445835412", "3095919939427099869935455007561126314832.287130477397846204951008", 76, RoundingMode.ROUND_DOWN); + t2("39454068592.5426357674", "539500064406478650256867488.44171988564589", "539500064406478689710936080.98435565304589", 78, RoundingMode.ROUND_UP); + t2("711378057536130546.05030965850391817985", "3519.9006655104107", "711378057536134065.95097516891461817985", 76, RoundingMode.ROUND_UP); + t2("4961172832120828815580484602760756.2012712908", "672041039664151754962281595761407065569.95071013621060637157419754", "672046000836983875791097176246009826326.15", 41, RoundingMode.ROUND_DOWN); + t2("7101.2850399893410837385161594686012015", "7447039100693496598.27485", "7447039100693503699.559889989341083738", 37, RoundingMode.ROUND_FLOOR); + t2("4017400855744231199234363.40", "8680854252488567594955443.1697318101148721333039110519819430", "12698255108232798794189806.569731810114872133303911051981943", 91, RoundingMode.ROUND_HALF_UP); + t2("2059590390363552.40", "586325932054905969708260929.92327440514351633822636210224317619490", "586325932056965560098624482.3232744051435163382263621022", 55, RoundingMode.ROUND_HALF_DOWN); + t2("582983617.569929797014256654694471", "9981786309799768994686892934445.9295301169296065462066657484", "9981786309799768994687475918063.4994599139438632009011367484", 68, RoundingMode.ROUND_HALF_EVEN); + t2("2.6165698405910796049261368090493573329246", "1760827779548.1353871194941345580463266976978", "1760827779550.751956960085214162972463506747157333", 49, RoundingMode.ROUND_HALF_UP); + t2("42513713793037649412.20337267935799701850122725370100", "4884164426571880743457.9060113", "4926678140364918392870.109383979357997018501227253701", 88, RoundingMode.ROUND_HALF_UP); + t2("615013136392771057432168892493351121.844", "7501.90719259576291230", "615013136392771057432168892493358623.7511925957629123", 56, RoundingMode.ROUND_DOWN); + t2("439780502800870192246198170895028338.75503651737499", "54139159349728010041929589316148734373.238719628804657454831809670308", "54578939852528880234175787487043762700", 36, RoundingMode.ROUND_DOWN); + t2("2500282.56691918225466823870", "4468153172374579202195051.1192110124701356844021658", "4468153172374579204695333.6861301947248039231021658", 70, RoundingMode.ROUND_FLOOR); + t2("3947906778978419575322273.5922", "527753211579218151805229658066345458285.5885089788593758900780037", "527753211579222099712008636485920780559.1807089789", 49, RoundingMode.ROUND_HALF_UP); + t2("224244602386820798357422068121543275.9722790644", "432961.0031220586705516514763153277784", "224244602386820798357422068121976236.97540112307055165148", 56, RoundingMode.ROUND_HALF_UP); + t2("41074785256868066207935.9658329758100047703778552011774401118298", "996313038437469337782350067491224840574.3439865837306077524137342817475940790588", "996313038437469378857135324359291048510.3098195595406125227915894829250341908886", 87, RoundingMode.ROUND_FLOOR); + t2("78270192113308576879.230", "422705378961250342057111974970896025870.232502331134017349978026", "422705400000000000000000000000000000000", 7, RoundingMode.ROUND_UP); + t2("23154961663482879829897.443500", "49041587603060876.96", "23155010705070482890774.4035", 84, RoundingMode.ROUND_FLOOR); + t2("612963.737191014", "2731304753434157847102688238900689.5878194", "2731304753434157800000000000000000", 17, RoundingMode.ROUND_FLOOR); + t2("79.410900071205868462305254", "498855037827626504175503191449.252294529388770858879482", "498855037827626504175503191528.663194600594639321184736", 72, RoundingMode.ROUND_CEIL); + t2("6993101104301088.970619872035600302449779353214753901", "509465802045548078458021.19126386538627494681427019648867", "509465809038649182759110.161883737421875249264049549703423901", 90, RoundingMode.ROUND_HALF_DOWN); + t2("3173346.465280699493106096344514997257165695887", "25094425785458254607988571321.6118249859981254347581599952737191037300", "25094425785458000000000000000", 14, RoundingMode.ROUND_FLOOR); + t2("4825986092816553.7635954902708301975634371809900", "6932262398609128466540251295633274.5129783804352371207490", "6932262398609128471366237388449828.27657387070606731831243718099", 87, RoundingMode.ROUND_DOWN); + t2("926199681466567517287973.10295", "228084522784513379301529587994.866786459974", "228085448984194845869046875967.969736459974", 49, RoundingMode.ROUND_HALF_EVEN); + t2("451757469368611461226744.675918562388474905198839780224990", "152843853624419159800008131.88722", "153295611093787771261234876.56313856238847490519883978022499", 60, RoundingMode.ROUND_CEIL); + t2("6779555902177154177229771584.099785903065", "7705328232185839682426202564296087172997.525840974954568455125376057221984043", "7705328232192619238328379718473316944581.625626878019568455125376057221984043", 86, RoundingMode.ROUND_DOWN); + t2("9536.995381842", "5743683556272978375327341031353872992805.228035142323187697966003805355354634434", "5743683556272978375327341031353873002342.223416984323187697", 58, RoundingMode.ROUND_FLOOR); + t2("794180405697345273302591220141629717.0335032652959", "79253739255343474198020799617825451.0", "873434144952688747500612019759455000", 33, RoundingMode.ROUND_HALF_UP); + t2("7150644601128617400192415586930354936122.6334767464", "9109635205088641816430727590858041637.2704471583622041768929760514400617734", "7159754236333706042008846314521212977759.9039239047622041768929760514400618", 74, RoundingMode.ROUND_HALF_DOWN); + t2("73562280122283.3504585511130", "9831433225592360462.8352635", "9831506787872482746.185722051113", 98, RoundingMode.ROUND_HALF_UP); + t2("8956158610374625.509531016", "326445046650.0", "8956485055421275.509532", 22, RoundingMode.ROUND_CEIL); + t2("74356614405271046021497883758184078570.45526096329466906744072230232", "250086499545948148713695351897361487.2424378528824906540", "74606700904816994170211579110081440057.6976988161772", 51, RoundingMode.ROUND_UP); + t2("54438066500841374310337535135292.9180799710380482218974913", "93583236200855.457936825513836204", "54438066500841374403920800000000", 24, RoundingMode.ROUND_HALF_EVEN); + t2("992.10612", "1853924775.3578645099684579616948779829033812", "1853925767.4639845099684579616949", 32, RoundingMode.ROUND_CEIL); + t2("186864386191178904666377352418476.9026", "324887104993.09478140653570710242809082", "186864386191178904666700000000000", 22, RoundingMode.ROUND_HALF_DOWN); + t2("73975703304587932639.2181626587592846793346557", "385064.7711364633520856985649145914899", "73975703304588317703.9892991221113703778995702914899", 65, RoundingMode.ROUND_DOWN); + t2("444492371187821986647273.357556318861835197", "32419538466212897.7682790461375", "444492403607360452860171.125835364999335197", 90, RoundingMode.ROUND_HALF_DOWN); + t2("425.36", "4.8163620735655971354915724851187759884583", "430.1763620735655971354915724851187759884583", 58, RoundingMode.ROUND_FLOOR); + t2("47140705104264.633543653650963362791573755527599", "5038770685966504.041420875593555678620", "5085911391070768.67496452924452", 30, RoundingMode.ROUND_HALF_DOWN); + t2("7680406.950844967098906022738005995808", "7170039143571111215189.2720128", "8000000000000000000000", 1, RoundingMode.ROUND_CEIL); + t2("56766742609.4324995621156186543537021757622234796", "5600154020118.606591501", "5656920762728.039091063115618654353702176", 40, RoundingMode.ROUND_HALF_UP); + t2("570657301559247483807209644.19", "347169349198778409985.34839429745774918204191942456937431", "570657648728596682585619629.53839429745774918204191942456937431", 74, RoundingMode.ROUND_HALF_DOWN); + t2("5361772037663933234405322789036276.33156433900413166799767144681154137323", "286704590022711173.40544742389525", "5361772037663933521109912811747449.73701176289938166799767", 57, RoundingMode.ROUND_DOWN); + t2("93732046861555957196550772609968.3472471313", "1859083952987593674898181.79957615855993107", "93732048720639910184144447508150.14682328985993107", 91, RoundingMode.ROUND_FLOOR); + t2("92567721714303533.992771142280786530426395726718479", "4173646454390713911135550874061129.722450828911285695255462583174414", "4173646454390714003703272588364663.715221971192072225681858309892893", 98, RoundingMode.ROUND_HALF_DOWN); + t2("1375128263616714701.94878254650062", "46092727285436763451586.053119100", "46094102413700380166288.0019016465", 33, RoundingMode.ROUND_HALF_UP); + t2("73619022388103118.782952924468", "812143.274917215669264759", "73619022388915262.1", 18, RoundingMode.ROUND_UP); + t2("5863128081.032078098051593954", "3401644100547973363487331808740.559267563791452260218198", "3401644100547973363493194936821.591345661843046214218198", 76, RoundingMode.ROUND_CEIL); + t2("2035229845149050434432862.3913626", "324888035708707633659073773920117.1589359337264063", "324888037743937478808124208352979.5502985337264063", 82, RoundingMode.ROUND_FLOOR); + t2("3809229847420761545133.0", "4820445969156504840260574583039569681560.574245660256", "4820445969156500000000000000000000000000", 15, RoundingMode.ROUND_HALF_UP); + t2("265038662972437534963025477565907689803.0955954524873", "8689727198065.214479051254116375289593", "265038662972437534960000000000000000000", 20, RoundingMode.ROUND_HALF_DOWN); + t2("467620089714294461431888766085.933012457041824326", "8454761303295998080511054.0533223", "467628500000000000000000000000", 7, RoundingMode.ROUND_HALF_UP); + t2("87894879970166522727794755.93237106514121963", "9.21735981924330694503993149149554469907", "87894879970166522727794765.1497308843845265750399314914955447", 61, RoundingMode.ROUND_HALF_DOWN); + t2("415465265615530648920289751139098887220.642143071162972307015579919362", "784797421468789423953053292044037319012.57789662938605515623570039453017199", "1200262687084320072873343043183136206233.22003970054", 51, RoundingMode.ROUND_FLOOR); + t2("919416082026906893949479156604880336.255538841432616135466943633799", "786230185237.5400725225964740467962175280141", "919416082026906893949479942835065573.7956113", 43, RoundingMode.ROUND_FLOOR); + t2("652545610682383466438682204.42146681125712", "90000817174099471.37775277", "652545610772384283612781675.79921958125712", 83, RoundingMode.ROUND_DOWN); + t2("834893074961901.316219159", "3494462.496814", "834893078456363.813033159", 31, RoundingMode.ROUND_FLOOR); + t2("30955320958921614617178138289424354927.94679217117720836736847", "9343585893221.056", "30955320958921614617178147633010248149.00279217117720836736847", 93, RoundingMode.ROUND_DOWN); + t2("90487985719811418246283472474823.257227209130594638697376", "91288470132046108165996.51806996", "90487985811099888378329580640819.775297169130594638697376", 97, RoundingMode.ROUND_FLOOR); + t2("8399816940955101.576691696184560166134", "1425122.40715", "8399816942380223.983841696184560166134", 73, RoundingMode.ROUND_FLOOR); + t2("90835019536.019916982404274694597500578", "716647297150731356312375253472992368.5862189689245116804145741973840791708889", "716647297150731356312375344308011904.6061359513287863750120748", 61, RoundingMode.ROUND_CEIL); + t2("1.76835213775438870258717627564722245975", "7006467747024962494048481730509926588025.86559434478599359798030950728698427731", "7006467747024962494048481730509926588027.63394648254038230056748578293420673706", 81, RoundingMode.ROUND_UP); + t2("928715435770769947371.846861119120186848130047779221215181888", "54176632694146863536.023546974", "982892068464916810907.87", 23, RoundingMode.ROUND_HALF_EVEN); + t2("2592460567145.9081671605659594580786953609908858698", "7864631589857045160739640205084628.0", "7864631589857045160742232665651773.90816716056595945807869536099088587", 69, RoundingMode.ROUND_HALF_DOWN); + t2("550167718959711561547.0354625", "452302.08587611743779", "550167718959712013849.12133861743779", 53, RoundingMode.ROUND_HALF_DOWN); + t2("2012913.385532423507759516640479441", "103518982004003013118420061.943654190758892648", "103518982004003013120000000", 20, RoundingMode.ROUND_HALF_DOWN); + t2("49943050945228733544.6734986147", "368220952556842481.13025278166305776823174166647", "50311271897785576025.80375139636305776823174166647", 71, RoundingMode.ROUND_HALF_EVEN); + t2("6819435979706516062524.6356313748", "61269304801758183.91645059614218918999", "6819497249011317820708.55208197094218918999", 95, RoundingMode.ROUND_HALF_DOWN); + t2("7233786224735497889984695259.844810632657377449889809221767092", "6807990850759856236367040269664178400670.841947660632059789845", "6807990850767090022591775767554163095930.686758293289437239734809221767092", 92, RoundingMode.ROUND_UP); + t2("93353199365969854.9000648459972051740723", "9422.3888765011593114515314770219001723580808", "93353199365979277.2889413471565166256037770219001723580808", 78, RoundingMode.ROUND_CEIL); + t2("30980262.05713034537675", "778.835454408", "30981040.8925847533768", 21, RoundingMode.ROUND_HALF_UP); + t2("32615753444771455868335024685114814.9238176568928810345574", "7768512679320024.55715331942029263648769217", "32615753444771455876103537364434839.48097097631317367105", 55, RoundingMode.ROUND_CEIL); + t2("13632097595691451297658166154832.143013272134363070648360851205244642", "338823008282322586814270.072279678874150483663858", "13632097934514459579980752969102.2152929510085135543122189", 57, RoundingMode.ROUND_HALF_UP); + t2("6422084834544364179504578.997091732441389646011113", "749563746146212443758110.4060254814560251104", "7171648580690576623262689.4031172138974147564111", 47, RoundingMode.ROUND_HALF_UP); + t2("524628228909.16050485473888934", "157911548505.727158203964341656616832412311819792", "682539777414.887663058703230996616832412311819792", 95, RoundingMode.ROUND_UP); + t2("119792544.57876596369349895973", "27424886476597422405011090514661205.0", "27424886476597422405011090634453749.57876596369349895973", 95, RoundingMode.ROUND_UP); + t2("2069402156492526629947970885.71888875649933", "9983225233803399851557109.1989727", "2079385381726330029799527994.91786145649933", 81, RoundingMode.ROUND_FLOOR); + t2("469964156809.608491", "595074692464717339784472687248240220.861973", "595074692464717339784473157212397030.470464", 82, RoundingMode.ROUND_CEIL); + t2("493360767167099894326435423534395819518.19695281187005", "7766465503.425829049644163982004", "493360767167099894326435423542162285021.622781861514213982004", 99, RoundingMode.ROUND_CEIL); + t2("99936880718101922830812712583.65032262815572509426570474", "33036974375228768881250337405734899.3544983736263577509194755440416", "33037074312109486983173168218447483.00482100178208284518518", 58, RoundingMode.ROUND_DOWN); + t2("7938089.9035748249886034322", "59938235780340155825294510015684098915.6306313894846960", "59938235780340155825294510015692037005.5342062", 45, RoundingMode.ROUND_HALF_DOWN); + t2("12020912075170693462106301094099.55717548283295340940081", "7925012204520701892409967356193913171038.423047370", "7925012216541613967580660818300214265137.98022285283295340940081", 69, RoundingMode.ROUND_HALF_UP); + t2("2403534785699117112878638516815488696057.917378367470941297385927", "6382502380424160003.479677660153263338013088885", "2403534785699117112885021019195912856061.397056027624204635399015885", 85, RoundingMode.ROUND_DOWN); + t2("698965328139372391512502.0393628796146", "349.3774499346277293528646834", "698965328139372391512851.4168128142", 34, RoundingMode.ROUND_FLOOR); + t2("4557454883.68536507001647907979028423", "461212.6999283496597694751582137548", "4557916096.3852934196762485549484979848", 77, RoundingMode.ROUND_HALF_DOWN); + t2("4863433553099693015144122064473263537.90580375285849442237159037230012244", "729921864795343627150.6944153828593595441", "4863433553099693745065986859816890688.60021913571785396647159037230012244", 88, RoundingMode.ROUND_DOWN); + t2("8341821006482531885092.98411549285365", "3649787.9056678809068225979753383", "8341821006482535534880.8897833737604725979753383", 57, RoundingMode.ROUND_HALF_UP); + t2("50900271502855123535389576514508.6", "3529291535644.0", "50900271502855123538918868050152.6", 68, RoundingMode.ROUND_FLOOR); + t2("65048735011187538001618360.6190283754497263475739381", "544369607320210256967259524797.5031", "544434656055221444505261143158.12212838", 38, RoundingMode.ROUND_UP); + t2("9980542928.586", "2.109934", "9980542930.695934", 55, RoundingMode.ROUND_HALF_EVEN); + t2("4691011429542960320268638161612830.142849169", "757715397475477414366.06830046", "4691011429543718035666113639027196.211149629", 83, RoundingMode.ROUND_HALF_UP); + t2("9874.54", "3856064270543742684218503.9123367482159408", "3856064270543742684228378.4523367482159408", 87, RoundingMode.ROUND_HALF_EVEN); + t2("68154879448120209877595453.386110402115092955259472912357", "27424826983.14981", "68154879448120237302422436.535920402115092955259472912357", 65, RoundingMode.ROUND_HALF_EVEN); + t2("37249053070475232499173177378.031244401", "907464305952.1105379598699518977559941948581426", "37249053070475233406637483330.1417823608699518977559941948581426", 65, RoundingMode.ROUND_HALF_EVEN); + t2("41.155993138147253723002006646182", "780464.5000578752798", "780505.656051013427053723002006646182", 89, RoundingMode.ROUND_HALF_EVEN); + t2("96920877597978100716777218.316958009791452354794880717409", "3188642196779775872022.94066144525722263195417766", "96924066240174880492649241.257619455048674986749058377409", 71, RoundingMode.ROUND_HALF_EVEN); + t2("816671190796023.957", "756549967023185081275882729414.639883423689748974601796203858786", "756550000000000000000000000000", 6, RoundingMode.ROUND_HALF_EVEN); + t2("3076171322682840.90303474815851099552968479985931936", "2787757192.94", "3076174110440033.8430347481585109955296847998593", 47, RoundingMode.ROUND_HALF_EVEN); + t2("2848944214201036899739.56442582032264708210474810029831860", "26670925074193.56548167869110309938557", "2848944240871961973933.1299074990137501814903181002983186", 90, RoundingMode.ROUND_HALF_DOWN); + t2("948894436900441147561922778096850998.025997593986", "443727475506008.5697805641108323511255902936", "948894436900441147000000000000000000", 18, RoundingMode.ROUND_FLOOR); + t2("399834116109759859225128.86903386714268063275622585130318202065", "83243301579.66435004343194655785121635608927271", "399834116109843102526708.53338391057462719060744220739245473065", 63, RoundingMode.ROUND_DOWN); + t2("858875986652204266383404217992.291603983048765141", "6.0926465541742680273373988448676561", "858875986652204266383404217998.3842505372230331683373988448676561", 77, RoundingMode.ROUND_DOWN); + t2("776263916931670286731399.503267531195", "210175752246089961220452910504105327677.1086634983558182634326666828", "210175752246090737484369842174392059076.6119310295508182634326666828", 82, RoundingMode.ROUND_HALF_DOWN); + t2("8718333630210.37077854", "37817829567644957230084174.76767663", "37817829567653675600000000", 18, RoundingMode.ROUND_HALF_DOWN); + t2("175798484157966149637348754749.631917825059", "191069.39198", "175798484157966149637348945819.023897825059", 68, RoundingMode.ROUND_UP); + t2("71094655118453771005757530841.0396931519906710695577045349011371640774", "940850879022443685735297736247770183.1062859472086874437627996457041", "940850950117098804189068742005301024.1459790991994", 49, RoundingMode.ROUND_HALF_UP); + t2("55771.4302072966318037483204", "5074951905603164297.9", "5074951905603220069.3302072966318037483204", 43, RoundingMode.ROUND_DOWN); + t2("97573612523925803.471300446034721965973356", "884547563142872953757144.226968283178396", "884547660716485477682947.699", 27, RoundingMode.ROUND_UP); + t2("534430489256092354910779169321445983.67571072478274", "8134878658.8874328", "534430489256092354910779177456324642.563143524782", 48, RoundingMode.ROUND_FLOOR); + t2("21752977621.53545695744", "9.27129494782115597264112710202", "21752977630.80675190526115597264112710202", 87, RoundingMode.ROUND_CEIL); + t2("9932777897276065862443227653669365455342.97666674233819577", "9658865807142952156279.44105819698310", "9932777897276065872102093460812317611000", 37, RoundingMode.ROUND_DOWN); + t2("123376130230056627372753581526479.897520335045821", "210087514417423605269213204478329905.5000222444600122718", "210210890547653661896585958059856385.3975425795058332718", 65, RoundingMode.ROUND_CEIL); + t2("69.90142090849675528097876785026473472", "79834.1060979095860549730563533311594891", "79904.00751881808281025403512118142422382", 100, RoundingMode.ROUND_FLOOR); + t2("55295146117469331485301.39276631674751989526", "7152150280497482.0881738719503196277", "55295153269619611982783.48094018869783952296", 100, RoundingMode.ROUND_UP); + t2("2936.4729089310337543432927171", "592041503613529215374762022103.93452080904168592", "592041503613529215374762025040.407", 33, RoundingMode.ROUND_HALF_DOWN); + t2("3543847956755001.889", "35208784086977202.003447129500893889382686251144250", "38752632043732203.9", 18, RoundingMode.ROUND_UP); + t2("210.12201651568251832101964897378268382", "34.753746", "244.87576251568251832101964897378", 32, RoundingMode.ROUND_HALF_UP); + t2("88716032.541028216", "7257777720664327957948893098939678.91443795578792936", "7257777720664327950000000000000000", 18, RoundingMode.ROUND_FLOOR); + t2("44129675251569160650555860751984.44296857695163101", "567695.63279516908886789079257067", "44129675251569160650555861319700", 30, RoundingMode.ROUND_HALF_EVEN); + t2("83283897197333851642528226761.317486565324", "1549.2573908490966060607", "83283897197333851642528228310.5748774144206060607", 73, RoundingMode.ROUND_CEIL); + t2("6996221992337457337.85327025", "667897527431759884729458692764632.058245604034043675214", "667897527431766880951451030221969.911515854034043675214", 100, RoundingMode.ROUND_FLOOR); + t2("922619961162.2208", "47542640152456.2642306344645126128579941", "48465260113618.4850306344645126128579941", 98, RoundingMode.ROUND_HALF_DOWN); + t2("611397868296.756734797071956883451847", "196585892481617652694421837845193747022.4082193499020", "196585892481617652694421800000000000000", 25, RoundingMode.ROUND_HALF_UP); + t2("877868949660161908540.37474593654374", "9263.734978454268710907848665", "877868949660161917804.109724390812450907848665", 79, RoundingMode.ROUND_HALF_UP); + t2("668028.0", "80293619463333150.662604016585067202571976571183668062", "80293619464001178.662604016", 26, RoundingMode.ROUND_FLOOR); + t2("742255892921.08552278588490", "92947236971652934320.381863823954476980190144705805612087685", "92947237713908827241.46738660983937698019014470580561", 52, RoundingMode.ROUND_DOWN); + t2("588640312892042.5229623908713504345901589967711144", "238642085600739223534691983689116795270.9392476910711070478806933690607710023", "238642085600739223534692572329429687313.4622100819424574824708523658318854023", 84, RoundingMode.ROUND_HALF_DOWN); + t2("693483.30191418214", "142589882557.20048662638259170691", "142590576040.50240080852259170691", 57, RoundingMode.ROUND_DOWN); + t2("9117137093.74844262790935196293617898088598527612", "73795973679442547725112.33063226581350299943451760384", "73795973679500000000000", 12, RoundingMode.ROUND_HALF_EVEN); + t2("4.526207787", "494677.2546106854088", "494681.7808184724088", 48, RoundingMode.ROUND_DOWN); + t2("30748018.2039098027620849591479954965780808709", "6852918.752696887318295520093985973", "37600936.9566066900803804792419814695780808709", 45, RoundingMode.ROUND_DOWN); + t2("83757651224762459585278205.84804608223565851299630130742301927", "7.64047420843", "83757651224762459585278213.488520290665658", 41, RoundingMode.ROUND_FLOOR); + t2("975947153367486.28236437261704896554620492", "43249595796844818325786438957.99323092408", "43249595796845794272939806444.27559529669704896554620492", 68, RoundingMode.ROUND_HALF_DOWN); + t2("11.441690234434150722494554227811313", "875817973566587174821389748.1222354707915361953423889", "875817973566590000000000000", 14, RoundingMode.ROUND_UP); + t2("16958.2140542", "788926587.3973035876122169863973821", "788943545.6113577876122169863973821", 86, RoundingMode.ROUND_UP); + t2("417606670852399308849133225.281250676092118", "381.17737", "417606700000000000000000000", 7, RoundingMode.ROUND_HALF_DOWN); + t2("5801004654143445689815580111944080.0", "5042.588293662243775410837328482", "5801004654143445689815580111949122.588293662243775410837328482", 88, RoundingMode.ROUND_HALF_UP); + t2("9458108973104955501.19731713109763438574297", "25483717936.348437947448383180705503437809197004644", "9458108998588000000", 13, RoundingMode.ROUND_DOWN); + t2("599950356499300529789528173.8770713", "268880.548220513", "599950356499300529789797054.425291813", 43, RoundingMode.ROUND_HALF_EVEN); + t2("606420737207328260.923737", "2793960799108258019951495192.38660756661", "2793960800000000000000000000", 9, RoundingMode.ROUND_HALF_EVEN); + t2("537996460782034925311563841713892430891.857623392671766153564", "71846410869540749.3122050323622539301930763629", "537996460782034925311635688124761971641.1698284250340200837570763629", 95, RoundingMode.ROUND_FLOOR); + t2("80855500804550283711094768191389.4531358771", "224613017765431377571817090000565541368.774524616422152973", "224613098620932182122100801095333732758.227660493522152973", 58, RoundingMode.ROUND_HALF_UP); + t2("27241652.017420652090726110", "46876731265932806262337193330223860.2863772593893330", "46876731265932806262337193357465512.30379791148006", 49, RoundingMode.ROUND_HALF_DOWN); + t2("703120.391502363183514079067", "79671.011", "782791.402502363183514079067", 53, RoundingMode.ROUND_CEIL); + t2("2946391497.026572366841464125208813086920", "189111065852431753063091488548.6924212587703", "189111065852431753066037880045.718993625612", 42, RoundingMode.ROUND_UP); + t2("70423417262.00132385773544766159557", "73526366752549062277219085279.1389002553495680928843377706747975638548", "73526366752549062347642502541.140224114", 38, RoundingMode.ROUND_CEIL); + t2("44343536119449484.887983227307430084581470194803169", "687286972712382711.817290490656982837", "731630500000000000", 7, RoundingMode.ROUND_DOWN); + t2("70666678103509980014.16613492442285597381", "7718081682856158711304.0858624585029", "7788748360959668691300", 20, RoundingMode.ROUND_FLOOR); + t2("190892658814671027948020798562.66401", "3077914596519843221.11397426172", "190892658817748942544540641783.77798426172", 87, RoundingMode.ROUND_DOWN); + t2("857699.4648", "215172698578303.0", "215172699436002.4648", 30, RoundingMode.ROUND_HALF_DOWN); + t2("71367336317503469996089975313.78956860568717151126807150128475", "6004790033798702211031253178324995.49124913354575889902983817", "6004861401135019714501249268300309", 34, RoundingMode.ROUND_HALF_EVEN); + t2("5738.75872446155", "29858473503717618435783009538061.2367254587951510324891489061", "29858473503717618435783009500000", 27, RoundingMode.ROUND_DOWN); + t2("65523975946403470734536.20026566994471", "38814.767794272562047617", "65523975946403470773350.968059943", 32, RoundingMode.ROUND_UP); + t2("1009099102.7851258876510730342999502734", "81254320103901710.149545407089813758", "81254321200000000", 9, RoundingMode.ROUND_UP); + t2("0.80914", "45600517407671269885.9496812081291114319857829", "45600517407671269886.7588212081291114319857829", 46, RoundingMode.ROUND_UP); + t2("210699773499290371305723185122.758275542646367986145982574141331", "55837310555101717797702096605946323.1231534464473", "55837521254875217088073402329131445.881428989093667986145982574141331", 72, RoundingMode.ROUND_HALF_DOWN); + t2("46692439158758833041970355457275102904.33760089680805727178230", "5100.209160709238112205230327", "46692439158758833041970355457275108004.5467616060461694", 54, RoundingMode.ROUND_DOWN); + t2("6579188486857662760325.07263745375372", "736137.85702779", "6579188486857663496462.929665", 28, RoundingMode.ROUND_HALF_UP); + t2("6886266974462041003392255811.09", "157963384397039800487731671393.108839212437491153109722732638001", "164849651371501841491123920000", 26, RoundingMode.ROUND_DOWN); + t2("2637149.605497368130690", "337990492.8259301750025354342970385746411677689", "340627642.4314275431332254342970385746411677689", 59, RoundingMode.ROUND_HALF_EVEN); + t2("570544774319240136627673486124120453.421318090125", "627713154220186466312689860553.99818847011260119751", "570545402032394356814139798813981007.4195065602", 46, RoundingMode.ROUND_HALF_EVEN); + t2("1318.48981623281675", "53804888180681289555782776.08394916399261146860796354721", "53804888180681289555784094.57376539680936146860796354721", 65, RoundingMode.ROUND_HALF_UP); + t2("261560536522656708116178389636.96902957482448266", "43.894270959640597", "261560536522656708116178389680.86330053446507966", 58, RoundingMode.ROUND_DOWN); + t2("7389329930453.70597654613990586394144740106960", "7516027589853093719738857026838910413.94175665824167286", "7516027589853093000000000000000000000", 16, RoundingMode.ROUND_DOWN); + t2("567517025412398867248433926.8250784803633167567", "696941460339562352367494644161068447.0679405", "696941460907079377779893511409510000", 32, RoundingMode.ROUND_UP); + t2("82945697650.550467974", "1284942280086114734292766548209853298.612173192917", "1284942280086114734292766631155550949.162641166917", 65, RoundingMode.ROUND_FLOOR); + t2("93979849901023407697509.7504500665642", "11239154317612957016099.3416669443153809735814058303182922492", "105219005000000000000000", 9, RoundingMode.ROUND_CEIL); + t2("644053055639524.76460493835227869", "24146983115497166.1003169554407", "24791036171136690.86492189379297869", 51, RoundingMode.ROUND_CEIL); + t2("654967.7798430818094341734", "977795808332853542.993", "977795808333508500", 16, RoundingMode.ROUND_HALF_UP); + t2("61824635978480492.6150785106270847", "667798149318896631450324413241.62326275146964221151041435124939752", "667798149318958456080000000000", 20, RoundingMode.ROUND_FLOOR); + t2("14259971637546.243488016880492813", "47.75579735608706408", "14259971637593.999285372967556893", 38, RoundingMode.ROUND_DOWN); + t2("588735735873509776102380058677.1286952894401", "97.779232460469346660464003276", "588700000000000000000000000000", 4, RoundingMode.ROUND_DOWN); + t2("4957944374566137476540.9952771548077616024854644521329663489719", "266991814901251690329155686572698080.319489183525872908575867896", "266991814901256648273530252710174621.3", 37, RoundingMode.ROUND_HALF_UP); + t2("905145247499300612520097.253707113587775050584777734446", "2.67860616", "905145247499300612520099.93231327358777505", 41, RoundingMode.ROUND_FLOOR); + t2("187589668011557947955872515425196212.068934581576274674451435281", "3714253520965421.0362", "187589668011557948000000000000000000", 19, RoundingMode.ROUND_CEIL); + t2("632409948559671833918283328879700466.0707", "0.0", "632410000000000000000000000000000000", 6, RoundingMode.ROUND_CEIL); + t2("984658744739418870.0476", "994.96727362001617", "984658744739419865.01487362001617", 49, RoundingMode.ROUND_HALF_EVEN); + t2("29683677807887236717503907093343.06771889170251887946265749329856798", "45075776650325326298409643816.981009335987971232267", "29728753584537562043802316737160.0487282276904901117296575", 57, RoundingMode.ROUND_HALF_DOWN); + t2("7558021712013738570217625988429759952877.233977937693484040846382622449065814187", "200795399044471614083706145185994.9737509075917941414185784409908246339265", "7558021912809137614689240072135905139000", 37, RoundingMode.ROUND_HALF_EVEN); + t2("92727445890741842949222790332510627.7224808091", "7609679843743118851669318656.448072904050281496386026279208447", "92727453500421686690000000000000000", 19, RoundingMode.ROUND_DOWN); + t2("92.908806076826839332", "92015624645614561808276089841.2399", "92015624645614561808280000000", 22, RoundingMode.ROUND_HALF_UP); + t2("377398015133086006.7276532802990993135", "28.905738023202267326815256101032838442", "377398015133086035.633391303501366640315256101032838442", 78, RoundingMode.ROUND_HALF_UP); + t2("621370624941874188939244.5200921561690076892575914021", "14510649911140399825678588475466309.79501016304482572013696", "14510649911761770450620462664405554.3151023192138334093945514021", 81, RoundingMode.ROUND_HALF_DOWN); + t2("20081300.1067371967724120952932454323", "9675429293924225905505754922506072343.970353197935010801782552732426097906028", "9675429293924225905505754922526153644.0770904", 44, RoundingMode.ROUND_CEIL); + t2("54659276818717923618921400660359661.2290315794669934292061764", "8321263373.178046641719253164256231", "54659276818717923618921408981623034.4070782211862465934624074", 65, RoundingMode.ROUND_UP); + t2("7495308563429194517.4950842956952536756132", "26.98098879", "7495308563400000000", 11, RoundingMode.ROUND_DOWN); + t2("88323438972.9", "3947737028583992592909690304161920258.9068619264090315473722446642669787780455", "3947737028583992592909690392485359231.806861926409031547372", 58, RoundingMode.ROUND_DOWN); + t2("91225.90076905019990035843212878517817", "2130936640071464704116655553.147183018975", "2130936640071464704116746779.04795206917490035843212878517817", 75, RoundingMode.ROUND_HALF_DOWN); + t2("20407744.328013599621804041238", "2232167919397693742359658567.87265821764005695380797468", "2232167919397693742380066312.20067181726186099504597468", 69, RoundingMode.ROUND_HALF_EVEN); + t2("957850276076148.677550288084933", "888359678658559270946031642.373", "888359678659600000000000000", 13, RoundingMode.ROUND_CEIL); + t2("74703809599234519251556274.9985711463724", "709853892003739943883074863956445427.0505267451606981", "709853892100000000000000000000000000", 10, RoundingMode.ROUND_HALF_DOWN); + t2("709178511125702540754989933967.422236522725392985745972858235163652", "428213017390007592115871937872.386068060216", "1137391528515710132870861871839.80830458294139299", 48, RoundingMode.ROUND_HALF_DOWN); + t2("530337022465.5659118274", "301051142868.206537562799420298004577157182501384107", "831388165333.77245", 17, RoundingMode.ROUND_HALF_UP); + t2("39403557595010122186833725730.5058035394497957071790", "18724770932943354346673517548.401096149086217", "58128328527953476533507240000", 25, RoundingMode.ROUND_FLOOR); + t2("82428066.0483267045298279670012562565", "4331992005957183667051602911617712754498.899", "4300000000000000000000000000000000000000", 2, RoundingMode.ROUND_HALF_EVEN); + t2("80476913465044941102915.632723815887522711331529", "5887544380532992755.93511005801607595687540", "80000000000000000000000", 1, RoundingMode.ROUND_FLOOR); + t2("76964133350127894939591167080295347.29740816733871", "772928008263955477554638996.3016794002524482346051388435140772", "76964134123000000000000000000000000", 12, RoundingMode.ROUND_DOWN); + t2("93613415080964701839073763939463.7495190652950339", "2046269205652007290620382.1448517814887759303162856189242851406961", "93613417127233907491081054559800", 30, RoundingMode.ROUND_FLOOR); + t2("93178915455.978234064862278834", "70156785202107872073374655857728.50328804248218", "70156785202107872073467834773184.481522107344458834", 100, RoundingMode.ROUND_DOWN); + t2("5930.48411006091572345293786062592928", "89716089387944665472.79179673561851851", "89716089387944671403.27590679653424196293786062592928", 75, RoundingMode.ROUND_CEIL); + t2("9.09", "81260831717416.97800363", "81260831717426.06800363", 89, RoundingMode.ROUND_DOWN); + t2("5.86180704663201447", "502623012117081747364976254577298342892.5693576219320095015755173160", "502623012117081747400000000000000000000", 19, RoundingMode.ROUND_HALF_DOWN); + t2("472623181838332890363488612910764474071.586394798193158796943819", "8947794.638137404", "472623181838332890363488612910773421866.2245322021931", 52, RoundingMode.ROUND_FLOOR); + t2("2918131158533557596.17923195829208", "736594397048603541.13479231839973012229918592", "3654725555582161138", 19, RoundingMode.ROUND_CEIL); + t2("82175442362893730960724401268.902099552468164410386448", "539613524689316.8064962190352269180519578275596107467", "82175442362894270574249090585.7085957715033913284384058275596107467", 67, RoundingMode.ROUND_HALF_EVEN); + t2("78844330615540128067328106904.417352885735996754512588977537835", "69839051335233721003254224037166.023137852571150860272482848011573", "69917895665849261131321552144070.440490738307147614785071825549408", 93, RoundingMode.ROUND_HALF_DOWN); + t2("83665060234963974331243072338458013.41317384589891075", "36334.350471648383518695", "83665060234963974331243072338494347.763645494282429445", 57, RoundingMode.ROUND_HALF_DOWN); + t2("16281170009138261525916508238.0992", "5448415536509973562150706380848655442293.0", "5448415536526254732159844642374571950531.0992", 67, RoundingMode.ROUND_UP); + t2("1855445938689865341002697566158764326.79725393455165540", "565.09791800109811921652723361425597442", "1855445938689865341002697566158764891.89517193564977461652723361425597442", 97, RoundingMode.ROUND_DOWN); + t2("59739822482533882530.588103741051908781", "1074461088804628208978814.625", "1074520828627110742861340", 24, RoundingMode.ROUND_FLOOR); + t2("343073566004818040807197646892403723450.116757581689904546354687420", "81463061354543518130225835483953609.7480531965302510897362653301336597", "343155029066172584330000000000000000000", 20, RoundingMode.ROUND_UP); + t2("7029.86663560321963172780", "998093479032.085", "998093486061.9516356032196317278", 97, RoundingMode.ROUND_FLOOR); + t2("6575500176279641875577.1641", "7042204323.867599405615408232", "6575500176286680000000", 15, RoundingMode.ROUND_FLOOR); + t2("563573389370505100921783994.63820711261296", "6183290606357615817.2201", "563573395553795707279399811.85830711261296", 93, RoundingMode.ROUND_DOWN); + t2("0.11775276416997354994358051", "9390124793042023844.11441973650635879154582117867", "9390124793042023844.23217250067633234148940168867", 98, RoundingMode.ROUND_HALF_DOWN); + t2("34682163909803912305.58279868924", "3882592798.71", "34682163913686505104.29279868924", 32, RoundingMode.ROUND_DOWN); + t2("45556245389463100131676399335223730722.64187559429639385721653", "3139098333707395868305892593215872544698.3980421276727128", "3184654579096858968437568992551096275421.039917", 46, RoundingMode.ROUND_DOWN); + t2("42868.0", "22853181.7", "22896049.7", 15, RoundingMode.ROUND_HALF_DOWN); + t2("13324349843364165078434315416.4219558920586598551", "634910046173465606044.94350342", "13324350478274212000000000000", 17, RoundingMode.ROUND_CEIL); + t2("214681567801880599741149018665.4268904627994045437530044796095081166697", "30.24438352", "214681567801880599741149018695.671273982799404543753004", 54, RoundingMode.ROUND_DOWN); + t2("7523592953864446224655147634517806935677.8", "321960438573180275859530550631223297.2220693619034050159922710483945976", "7523914914303019404931007165068438158975.02206936190340501599227", 63, RoundingMode.ROUND_HALF_UP); + t2("8113872603185679969728486212332590783.602055287175599032912451", "6883368621751387.904574695331503", "8113872603185679969735369580954342000", 34, RoundingMode.ROUND_DOWN); + t2("4473325482.521859322286620356175998427324", "5517383386767642457749850088998162.9878404839737358471115523370", "5517383386767642457749000000000000", 22, RoundingMode.ROUND_DOWN); + t2("548897584678465172116.263299940", "72849524332345281737.582385686658613419466441920115889", "621747109010810453853.84568562665861341946644192012", 50, RoundingMode.ROUND_HALF_UP); + t2("117624754.6743723197932701087121335", "432230085746050.6326013435", "432230203370805.3069736633", 25, RoundingMode.ROUND_CEIL); + t2("211869120158.6755510559122396323632849492172", "3350176216485535906730909111199110098559.434382853205751669259307", "3350176216485535906730909111410979218718.1099339091179913016225919492172", 84, RoundingMode.ROUND_DOWN); + t2("9503417727903696377.142688585685289539282", "9877995505774365097359676968.96332983381", "9877995515277782825263373346.106018419495289539282", 73, RoundingMode.ROUND_FLOOR); + t2("57724427547745158119515495.3817737615142", "4694471183681522510434.9730842784869109298930451804195715", "57729122018928839642025930.354858040001110929893045180419571", 59, RoundingMode.ROUND_FLOOR); + t2("626926.688418991670094873504536127927874926961", "44847638554.28038", "44848265480.968798991670094874", 29, RoundingMode.ROUND_HALF_DOWN); + t2("714421546608288.75231442", "90204.1877149702887861501577366", "714421546698492.9400294", 22, RoundingMode.ROUND_CEIL); + t2("316760561115100328925527829.868748", "947550435614164286486134205461396980094.329237531119278646527505237738228861", "947550435614481047047249305790322507924.1979855311", 49, RoundingMode.ROUND_HALF_UP); + t2("4787781.830769633650", "28106931688076101944325980357112766666.4147856541674471029390", "28100000000000000000000000000000000000", 4, RoundingMode.ROUND_DOWN); + t2("57582322933702115191953750823.452324932759532448958683849760832537", "6208160069451660574.046992350532154118230361572466326413231", "57582322939910275261405411397.499317283291686567189045422227158950231", 88, RoundingMode.ROUND_HALF_EVEN); + t2("1355.2928651389134946509903601457219696", "19706467852518454.51194438", "19706467852500000", 12, RoundingMode.ROUND_FLOOR); + t2("6976348867939077662220126242.325581450", "37632000780254976.39244499406494501679005669774384375", "6976348867976709663000381218.71802644406494501679005669774384375", 78, RoundingMode.ROUND_HALF_DOWN); + t2("6570085371399.73547644347999335127", "756784655571328405212254444.6082917039022814", "756784655571334975297625844.34376814738227475127", 95, RoundingMode.ROUND_FLOOR); + t2("929638604406893166255480319.1", "2.417176", "929638604406893166255480321.517176", 38, RoundingMode.ROUND_HALF_UP); + t2("15333436830100284767892.8132821094757068516782384757893828", "6449148471872656116642573.4936072838460652424614060030402960899", "6464481910000000000000000", 9, RoundingMode.ROUND_HALF_EVEN); + t2("8533454661767.0", "9108117482.7818582174602901110", "8542562779249.781858217460290111", 98, RoundingMode.ROUND_HALF_UP); + t2("39994199552944997944674603137102.34481054478642979579556733", "48416362753816384.1186859947", "39994199552945046361037356953486.46349653948642979579556733", 58, RoundingMode.ROUND_UP); + t2("3434813658037057456771225.691575393610", "4750727681378762.621422066", "3434813662787785138149988.31299745961", 50, RoundingMode.ROUND_CEIL); + t2("5421870551709971643477646229788.9916151146275027436845830667747596930491", "1294187723.63552000599434", "5421870551709971643478940417512.6271351206218427436845830667747596930491", 84, RoundingMode.ROUND_DOWN); + t2("788800325137015309691.9869658106091643522880904508333", "21900937194317004352606581867113.74136675", "21900937195105804677743597000000", 26, RoundingMode.ROUND_HALF_UP); + t2("9617449543131441414744.740488254808748568321093692000048461", "235857647890636847089343613221.34934036368820", "235857657508086390220785027966.089828618496948568321093692000048461", 89, RoundingMode.ROUND_HALF_DOWN); + t2("66516175033671157522539424787063035.289018415345287705892", "457025403297589.48109451223206526106813370983486534540", "66516175030000000000000000000000000", 10, RoundingMode.ROUND_DOWN); + t2("1258923932952359915757977904.322911996152689501640222239052", "516664166.6315559709401451437542901201056045029", "1258923932952359916274642070.9544679670928346453945123591576045029", 95, RoundingMode.ROUND_HALF_DOWN); + t2("54150784958055693201041677324555.2911379033655054172110464032863412", "33037219866829.6261839599256770108242884962194958", "54150784958055693234078897191384.917321863291182428035334899505837", 81, RoundingMode.ROUND_HALF_EVEN); + t2("8913941949356907370902846091451.1977723298", "18118.359607978038552071087439", "8913941949356907380000000000000", 18, RoundingMode.ROUND_UP); + t2("420410527375765723.59880359173181300286368456", "51144376163959512362961732882333687.127621078003128120894", "51144376163959512783372260258099410.726", 38, RoundingMode.ROUND_DOWN); + t2("2349860389256052429839524907.98078795118546317910978141", "79456576116664247.9125601988131884602", "2349860389335509005956189155.89334814999865163930978141", 83, RoundingMode.ROUND_HALF_EVEN); + t2("17267416260184245345149414069.320310187240", "468091424192506118640825196.9226420172656985659417202247668848", "17735507684376751463790239266.2429522045056985659417202247668848", 88, RoundingMode.ROUND_HALF_DOWN); + t2("43036191260946830561733461288991373.899222463453441", "10395502788.8976", "43036191260946830561733471684494162.796822463453441", 57, RoundingMode.ROUND_UP); + t2("4909087864.1506006674710514486016876552", "99.292952416278708", "4909087963.4435530837497594486016876552", 41, RoundingMode.ROUND_CEIL); + t2("3.21003346071", "312572971640834499.5651635013104403556411852", "312572971640834502.7751969620204403556411852", 65, RoundingMode.ROUND_DOWN); + t2("35598083270443235311505086492314.01162518855759640920", "802559462829546799507.20438317038165345760210289811993", "35598083300000000000000000000000", 9, RoundingMode.ROUND_HALF_UP); + t2("4920535946382178542803785670.9541584521", "170.20", "4000000000000000000000000000", 1, RoundingMode.ROUND_FLOOR); + t2("900521977018339396017913407962.091347787805459639979561619514892821", "86767128498.266492255048676", "900521977018339396104690000000", 23, RoundingMode.ROUND_UP); + t2("75902636101686648000.6", "359043382984760880361621433096498558.8522232641204", "359043300000000000000000000000000000", 7, RoundingMode.ROUND_DOWN); + t2("7241120.33794391441049422", "1335.1641429496763007692077381282", "7242455.5020868640867949892077382", 32, RoundingMode.ROUND_UP); + t2("31660394971452812.41546802595892146417789641819", "9553266936159140830011359638454773.3381424723086951716056", "9553266936159140861671754609907585.75361049826761663578349641819", 69, RoundingMode.ROUND_UP); + t2("234366.419036191593359028721642040021", "60990608004.6502084059964088971099341864756873167255", "60990842371.0692445975897679258315762264966873167255", 63, RoundingMode.ROUND_FLOOR); + t2("595275472.57284296", "585213018909659275240537.83842", "585213018909659870516010.41126296", 77, RoundingMode.ROUND_CEIL); + t2("686195920001876075.42907969250854530243258040339799332818", "690209177.0029006268774080543176338133518164481718", "686195920692085252.431980319385953", 33, RoundingMode.ROUND_HALF_EVEN); + t2("7277582821973178066168.46693414550857472667581295031419181226", "977228.354318", "7277582821973179043396.8212521455", 33, RoundingMode.ROUND_FLOOR); + t2("16292530.1051086167480590244141", "842.22481391817784261791644440600423", "16293372.32992253492590164233054440600423", 70, RoundingMode.ROUND_UP); + t2("446843063108997245517407765134496278.709613990646498002821658685419236096", "88.30183490297", "446843063108997245517407765134496367.01144889", 44, RoundingMode.ROUND_FLOOR); + t2("971454488708956128182425493108.4703496410268788074591551814", "1500927701243584.018518512711227442104023548", "971454488708957629110126736692.4889", 34, RoundingMode.ROUND_CEIL); + t2("198396844046545593344953371792608987.3415868552607561", "918181535.23275182900", "198396844046545600000000000000000000", 17, RoundingMode.ROUND_UP); + t2("2972391991248.1400667620189362208168307", "5479621704745657230709696892535281281754.7235", "5479621704745657230709696895507673273002.863566762", 49, RoundingMode.ROUND_HALF_DOWN); + t2("167427692328032674.25414709703925071305926860225042563182", "89766918952455057053287822756397622107.3928497608193855537950881184312381", "89766918952455057053455250448725654781.64699685786", 49, RoundingMode.ROUND_UP); + t2("43769831251746560.795026217654974915196027543695", "75537438951336483269081.02941273170981073861080518572", "75537482720000000000000", 10, RoundingMode.ROUND_HALF_DOWN); + t2("3.790", "9378194.8767000998322295569523865", "9378198.66670009983222956", 24, RoundingMode.ROUND_UP); + t2("24851382261264597346888356037041.885", "1207.8573780576386389443173321131", "24851382261264597346888356038249.7423780576386389443173321131", 81, RoundingMode.ROUND_UP); + t2("857.7560861034887549930443754", "18504376084922251496220282291018.19697204676", "18504376000000000000000000000000", 8, RoundingMode.ROUND_HALF_DOWN); + t2("5603522276434.666278645458189168052", "9478916073657380583651187460768352706264.0922039031654960785", "9478916073657380583651187466371874982698.7584825487", 50, RoundingMode.ROUND_UP); + t2("272.20163189736699207276", "8009976948562717694664282.361198237345827", "8009976948562717694664554.56283013471281907276", 93, RoundingMode.ROUND_DOWN); + t2("75286597915548865172794905512308251.1787842766", "5484959.61054", "75286597915548865172794905600000000", 27, RoundingMode.ROUND_CEIL); + t2("93525713224070.09674242841815995541364018052052", "75768676.532480641692742503493", "93525788992746.6", 15, RoundingMode.ROUND_DOWN); + t2("78523021357694108868692752.91646650044759904173480959883557402997", "495.59", "78523021357700000000000000", 13, RoundingMode.ROUND_UP); + t2("3238721780678562900915193565802225587392.90", "748785061.66820334924209162463741", "3238721780678562910000000000000000000000", 18, RoundingMode.ROUND_UP); + t2("98846.81464384706741923274334684308930111", "9113.005045834", "107959.81968968106741923274335", 29, RoundingMode.ROUND_UP); + t2("9.8406692310667035312191105495866801000", "9089567678.5508097764778", "9089567688.39147900754450353121911054959", 39, RoundingMode.ROUND_UP); + t2("99065135312720.84941192157958140619229438117", "53476921863610672798515553218338324.959329170020735932026093766186541396", "53476921863610672798614618353600000", 30, RoundingMode.ROUND_FLOOR); + t2("3176881371318006310361.3543736148140570707252111", "292524070460132222826177704057904019376.40698273353941530130447408152708766116", "292524070460132226003059075375910329737.761357", 45, RoundingMode.ROUND_CEIL); + t2("6.90498764441988249128502282530851578", "43.50645242771270044511", "50.41144007213258293639502282530851578", 45, RoundingMode.ROUND_HALF_EVEN); + t2("338450.823402603747752671009120897851", "5207.0099214953", "343657.833324099047752671009120897851", 59, RoundingMode.ROUND_HALF_EVEN); + t2("2919769949581629422304417.9039495411631604778178068863", "58958088180274381782196182656778.3384598201347480560152781708323013", "58958091100044331363825604961196.2424093612979085338330850571323013", 81, RoundingMode.ROUND_CEIL); + t2("858925411393538961692691.6390687813", "429652895153162504998871559279.1146093468874157436552", "429653754078573898537833251970.7536781281874157436552", 52, RoundingMode.ROUND_HALF_DOWN); + t2("1744056.272665115358269071", "6706.43717222508571881815348574554893", "1750762.70983734044398788915348574554893", 39, RoundingMode.ROUND_DOWN); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t2("4.6011800481717419E-806104423910", "-8.6437098622551564549067098493197906561E-280114", "-8.64370986225515645490670984931979065609999999999999e-280114", 51, RoundingMode.ROUND_DOWN); + t2("3.4681913622863819250677595389410956725648165265014983E-53212647902", "-8.18410385421852186881398297236729212185E+188", "-8.18410385421852186881398297236729213e+188", 36, RoundingMode.ROUND_FLOOR); + t2("6.66144513902114901386407229147E+6153706610103500", "9.0511259314724948248692894888182029430402308963553381379066E+953113360042358", "6.66144513902114901386407229147e+6153706610103500", 74, RoundingMode.ROUND_HALF_UP); + t2("3.372650568051595258210907487596E+409215479667897", "-4.183206656034048517819669530602649203970090968725509970E+26570793338", "3.372650568051595258210907487596e+409215479667897", 74, RoundingMode.ROUND_HALF_UP); + t2("-5.7656240966847308176727533610432E+62642145507", "-1.122213E+7374576131771581", "-1.12221300001e+7374576131771581", 12, RoundingMode.ROUND_FLOOR); + t2("8.774639235678526352460104724518622822913117021566676E-1991326", "8E+45629", "8e+45629", 34, RoundingMode.ROUND_HALF_UP); + t2("4.9590402774499089404125161028829404E+1528628", "-8.110292813306920410771458213952017595580929120805599E+676055705", "-8.110292813306920410771458213952e+676055705", 32, RoundingMode.ROUND_HALF_DOWN); + t2("-9.94827679900718E+47261881238", "6.191921784108606448822612520770987741963619338418111021E+2397", "-9.94827679900718e+47261881238", 79, RoundingMode.ROUND_FLOOR); + t2("3.000279398050E+68452755140307", "-2.314E+6336521643193", "3.00027939805e+68452755140307", 25, RoundingMode.ROUND_CEIL); + t2("-6.39233174154524919846265317272190742174E+27843778404", "-4.9206748933094636318481451339835260640508733245821012047E+581960334", "-6.3923317415452491984626531727219e+27843778404", 32, RoundingMode.ROUND_CEIL); + t2("9.766364616787074202022021617942580306437E+853339", "4.75E-94400", "9.76636e+853339", 6, RoundingMode.ROUND_HALF_EVEN); + t2("-2.477879366633922436942620379465344075853263140147E-179", "5.001E+607036568", "5.001e+607036568", 10, RoundingMode.ROUND_HALF_DOWN); + t2("-9.91773038789242415841400646241871432E+509270", "8.90240027196285459406834697800823E+384", "-9.9177304e+509270", 8, RoundingMode.ROUND_FLOOR); + t2("-6.4216117911855785555196586953491283327671659034E-4267768410", "-2.71549651651035474742851384005686907E+932623751145375", "-2.71549651651035474742851384006e+932623751145375", 30, RoundingMode.ROUND_HALF_EVEN); + t2("7.505003437177338901537585712517292440418147498390807673406E-41013596", "-1.6377957063913576274E-2362545", "-1.637795706391357627399999999999999999999999999999999999999999999999999999e-2362545", 73, RoundingMode.ROUND_CEIL); + t2("6.52497142975743790E+59803", "7.70070919859302927342891E+79853350467950", "7.70070919859303e+79853350467950", 15, RoundingMode.ROUND_HALF_DOWN); + t2("-1.986586534614591954662873350021191E-8494702330585", "934883196.36", "9.3488319636e+8", 31, RoundingMode.ROUND_HALF_UP); + t2("-9.34393830187381530019933058983221630473183E+1322081", "-5.8113420569E+76250834", "-5.8113420569000000000000000000000000000000000001e+76250834", 47, RoundingMode.ROUND_FLOOR); + t2("2.8472949996959453188308291822038006419E+58488338835694", "-8.40525201109E+450", "2.8472949996959453188308291823e+58488338835694", 29, RoundingMode.ROUND_CEIL); + t2("9.648367041406758034023991036E-59498", "-4661212.7762884155284840804331492224870144396865168", "-4.6612127763e+6", 11, RoundingMode.ROUND_UP); + t2("6.590E+563652649062720", "-2.470866644580659989139348934871662E+5393", "6.59e+563652649062720", 52, RoundingMode.ROUND_HALF_UP); + t2("7.50298455E+409885709899897", "7.8195903135920240406104586171019944177061863195512E+38137135", "7.50298455e+409885709899897", 21, RoundingMode.ROUND_FLOOR); + t2("-2.085709164207E+556", "-8.65687769072345279667007546405481189141239951957731228E-445", "-2.085709164207e+556", 24, RoundingMode.ROUND_HALF_EVEN); + t2("-7.59901046473456174157176600977643736E+928", "3.1554648E+9567428", "3.1554647999999999999999999999999999999999999999999999999999999999999e+9567428", 68, RoundingMode.ROUND_DOWN); + t2("-1.764893485808065014931071720288894996414317946E+4373", "8.207697685678414861699991146707E-54431221200", "-1.764893485808065014931071720288894996414317946e+4373", 69, RoundingMode.ROUND_UP); + t2("1E+3438", "6.10225432462566325701089103E+413299377797", "6.1022543246256632570108910300000000000000000000000000000000000000000000000000001e+413299377797", 80, RoundingMode.ROUND_UP); + t2("-2.52752725708781022951571784E-699814829", "8.17875673731E+550628791", "8.17875673731e+550628791", 41, RoundingMode.ROUND_HALF_DOWN); + t2("3.4142120654239282339061777091E-137153793", "-1.920473198839259830870283143608138835313005551161E-5700", "-1.920473198839e-5700", 13, RoundingMode.ROUND_CEIL); + t2("4.916E+67267431864055", "-3.11232626041972E-22119634", "4.916e+67267431864055", 43, RoundingMode.ROUND_UP); + t2("2.7805554685841989593647311623180945E+631402138248535", "-3.5045033749573135402009952508161E+422962095", "2.7805554685841989594e+631402138248535", 20, RoundingMode.ROUND_HALF_UP); + t2("-6.7851124456156495E-283663", "-1.9748544E+991285", "-1.974854400000000000000000000000000000000000000000000000000001e+991285", 61, RoundingMode.ROUND_FLOOR); + t2("3.3999495398879477127431E+26", "6.94787088935990247137662674286E-30255690293", "3.3999495398879477127431e+26", 39, RoundingMode.ROUND_HALF_EVEN); + t2("7.38629782790796531025130356311386902379257377504731E-65498", "-9.996570772195629416377330436034192E+586560433", "-9.99657077219562941637733043603419199e+586560433", 36, RoundingMode.ROUND_DOWN); + t2("-65427.2626599177561639832012637131774577343", "-2.2602461224542757053386510475184E+45", "-2.2602461224542757053387e+45", 23, RoundingMode.ROUND_HALF_EVEN); + t2("-7603337863100331037227641358.6358488010354381615972252", "0.079095503", "-7.60333786310033103722764135855675329804e+27", 39, RoundingMode.ROUND_HALF_EVEN); + t2("-8.566805532967771E+1133407170134", "-2.62014507E+59410816402904", "-2.6e+59410816402904", 2, RoundingMode.ROUND_CEIL); + t2("-6.378824969667553954007858399705411E+6125807", "1.5498189328683385253997376566304691018861347216E+978678273514", "1.5498189328683385254e+978678273514", 21, RoundingMode.ROUND_HALF_UP); + t2("-2.7745277583174075108879767960293E+57", "-1.04898713859989870135460729303852467980207715713082811008E-52522188", "-2.7745277583174075108879767960293e+57", 43, RoundingMode.ROUND_HALF_UP); + t2("5.6416413863730610446514344935740516542544173047838529477345E+3643189785224903", "4.325844E+10237387", "5.6416413863730610446514344935740516543e+3643189785224903", 38, RoundingMode.ROUND_UP); + t2("9.5700358273E+3281436620", "-3.49529922278383002447248797548714279747957316073562965362E+231765765674926", "-3.4952992227838300244724879754872e+231765765674926", 32, RoundingMode.ROUND_UP); + t2("5.746256598050270E+270179101110", "-8.69E+9", "5.74625659805027e+270179101110", 52, RoundingMode.ROUND_UP); + t2("-3.43703754975841976988985601863218657090565779695942448E-584", "-7.04870954464451748226487792925E+6452", "-7.04870954464451748226487792925e+6452", 65, RoundingMode.ROUND_DOWN); + t2("3.669191803775848342191491816028514958908276103E+6104885", "6349200469.49622348667724526141571168", "3.669191803775848342191491816028514958908276103e+6104885", 57, RoundingMode.ROUND_HALF_UP); + t2("-6.6413415085265200380682995061672743168E+6742608268982", "-5.7854761668979413E+40390639739697", "-5.7854761668979413e+40390639739697", 74, RoundingMode.ROUND_HALF_DOWN); + t2("8.131061529004687961E+4703014322894957", "6.6631960163605E+336774893", "8.1310615290046879610000000000000000000000000000000001e+4703014322894957", 53, RoundingMode.ROUND_UP); + t2("2.61586047680708591504734E-73618452078", "-2.82E+649040159313928", "-2.81999999999999999999999999999999999999999999999999999999999999e+649040159313928", 63, RoundingMode.ROUND_CEIL); + t2("3.806193950290037447482606404806098753E-310306977712459", "6.73574380489237E-6148", "6.73574380489237e-6148", 61, RoundingMode.ROUND_HALF_UP); + t2("-2.999244594782511304449990054060750394689E+665698507", "-7.86539E+624", "-2.99924459478251e+665698507", 15, RoundingMode.ROUND_HALF_DOWN); + t2("-1.73138291075097215041056825045207084790023E+9919178", "6.901091644374740436286975650710270008065430429870778E+112688678", "6.901091644374740436286975650710270008065430429871e+112688678", 49, RoundingMode.ROUND_HALF_UP); + t2("-4.4158131733719201035971650235401451699E+8478781", "3.43659130529850845160044047E-84414725879", "-4.415813173371920103597165023540145169899999999999e+8478781", 49, RoundingMode.ROUND_CEIL); + t2("8.2490530603E+563080552827", "-7.0892036675186933319756716833232912692817124518421644588185E+503", "8.249053e+563080552827", 7, RoundingMode.ROUND_HALF_UP); + t2("4.4812397022812291341308065939147761041239042598E+173199103", "-2.55358479553032556192092676679E-406", "4.4812397e+173199103", 9, RoundingMode.ROUND_FLOOR); + t2("3.63707497063891323415475164E+19564220", "6.86E+394624254369", "6.860000000000000000001e+394624254369", 22, RoundingMode.ROUND_CEIL); + t2("-1.76521690385342100091110955772116032382348E+22342", "2.066371211836190804699093814076260613148846118E+930", "-1.76521690385342100091110955772116032382348e+22342", 46, RoundingMode.ROUND_FLOOR); + t2("-9.16540861788939936221696041264140509892899684806066624E+545382", "-6.795036513456510225425505285065601005815059E+53651315619590", "-6.795036513456510225425505285065601005815059e+53651315619590", 52, RoundingMode.ROUND_HALF_EVEN); + t2("3.8824853845483747950121911961308E-232889426110", "-9.39085569262226048802461108556961372903363E+20482563", "-9.3908556926222604880246110856e+20482563", 29, RoundingMode.ROUND_FLOOR); + t2("5.669348078931699485812E+91135", "-1.09634534582515905312199364521354019E+2398", "5.669348078931699485812e+91135", 43, RoundingMode.ROUND_HALF_EVEN); + t2("-7.108420703596696174864577599199E-17865", "-3.5821234495870040888988341424E-38476", "-7.108420703596696174864577599199e-17865", 68, RoundingMode.ROUND_CEIL); + t2("3.0587937455435385568686E+858411", "7.5633990990140136053230800443528E+6979747049", "7.563399099015e+6979747049", 13, RoundingMode.ROUND_CEIL); + t2("-9.4201452050384019635554408654254853829585833173937E-67881175400", "8.7594589610901982328939776149140582313134280", "8.759458961090198232893977614914058231313428e+0", 51, RoundingMode.ROUND_HALF_DOWN); + t2("-4.872E+9", "7.049434162615329092286249077949314195166656228776654449E+7179602312410905", "7.049434162615329092286249077949314195166656228776654449e+7179602312410905", 57, RoundingMode.ROUND_CEIL); + t2("2.498050094918515195272495E+25602819644", "1.690189280483229506407151914477E-6281659114721093", "2.498050094918515195272495e+25602819644", 37, RoundingMode.ROUND_HALF_UP); + t2("-2.872594834762158998189624857E-3872766009", "7.84730498600204522802E+1918690570", "7.8e+1918690570", 2, RoundingMode.ROUND_FLOOR); + t2("-8.5989284208919716747311350415768937298660825849E+8362030996", "7.246737029123850373402361691951291E-8667053", "-8.598928420891971674731e+8362030996", 22, RoundingMode.ROUND_CEIL); + t2("8.9119677110510714267573580010087886701724745920E+21469", "2.11712768007778858425E-2709430696", "8.911967711051071426757358001008788670172474592e+21469", 61, RoundingMode.ROUND_FLOOR); + t2("-4.6389773729060896356268643578053980E+271990", "5.4794710777462795179129364629207044179495471E+68796013", "5.479471077746279517912936462920704417949547099999999999e+68796013", 55, RoundingMode.ROUND_DOWN); + t2("-8.692108349146276787672E+502575719452551", "2.101910086621574891507701870425441356167851002049453E-36058", "-8.692108349146276787672e+502575719452551", 71, RoundingMode.ROUND_HALF_UP); + t2("-4.329643128068417315145546886117425E+47", "-5.180272153613851594615192162296169326241993204242351102905E+61", "-5.18027215361389489104647284646932078171085437849235111e+61", 54, RoundingMode.ROUND_FLOOR); + t2("-4.366295227912472100879989655235852323995260684E-3443005916835", "6.6495301021110825661911619989342504206315E+243165734316192", "6.6495301021110825661911619989342504206314999999999999999999999e+243165734316192", 62, RoundingMode.ROUND_FLOOR); + t2("-50.3340777108096062382934887949536591632954", "-2.327861974724190621584E-95290518158703", "-5.0334077711e+1", 11, RoundingMode.ROUND_HALF_DOWN); + t2("2.891402E+308984", "-4.4030600568577068902242588950310064E+3309250", "-4.4030600568577068902242588950310064e+3309250", 38, RoundingMode.ROUND_HALF_DOWN); + t2("2.9063245181838078406E-30082705149", "-5.21164603510E+700", "-5.2116460351e+700", 47, RoundingMode.ROUND_FLOOR); + t2("9.172623893884291050640178462622576979394001E+74551900", "-0.0006992318506880861375813973557823740630779243140040", "9.17262389388429105064017846262257697939400099999999999999999999999999999e+74551900", 72, RoundingMode.ROUND_DOWN); + t2("-8.45743812419841308359736070937E-7", "-3.7150162603440907497300108323452688532070E-47707102611", "-8.45743812419841308359736070937000000000000000000000000000000001e-7", 63, RoundingMode.ROUND_FLOOR); + t2("-5.64048998369545130320593838176021852293273725718E-66", "6.4546418096890813418E+8932686", "6.4546418096890813418e+8932686", 47, RoundingMode.ROUND_HALF_DOWN); + t2("0.000206", "-2.46E-16691451673", "2.06e-4", 72, RoundingMode.ROUND_HALF_UP); + t2("9523206424.817811834542598837948480678179531962407", "-9.246E+122", "-9.246e+122", 61, RoundingMode.ROUND_HALF_DOWN); + t2("-7.10637843522872405148177939345694170244998E+393578612", "-5.1686557840917978536969896875975293786383104244203680E+2623", "-7.10637843522872405148177939345694170245e+393578612", 39, RoundingMode.ROUND_UP); + t2("-9.701743299218118469518328922466346421531319820575184691E+987052143", "-2.162146263864726687779E+279733", "-9.701743299218118469518328922466346421531319820575184691e+987052143", 76, RoundingMode.ROUND_HALF_EVEN); + t2("2.425681641011836402167519E-745580", "-6.975349406316865333556880973581197441792824E+77261", "-6.9753494063e+77261", 11, RoundingMode.ROUND_HALF_UP); + t2("-9.9615667808682717784639047503416E+431098", "-5.411587171905E+752176928289", "-5.4115e+752176928289", 5, RoundingMode.ROUND_CEIL); + t2("-7.93800341064442267449278738313266140E+6661", "-4.77520007398717199039734239605332385947778750068587220E+772955635746", "-4.7752000739871719903973423960533238594777875006858722e+772955635746", 67, RoundingMode.ROUND_HALF_DOWN); + t2("-4.3950852214287588188735202190E+667593915681", "6.903412426009159788320109541849891301209580355174E+192215971290", "-4.395085221428758818873520219e+667593915681", 44, RoundingMode.ROUND_FLOOR); + t2("-8.52768540649733978324430E+689", "6.5091092511E+6976032213402", "6.5091092511e+6976032213402", 47, RoundingMode.ROUND_CEIL); + t2("-551.540567153246944", "8.86155528029344977E+1979683", "8.86155528029344977e+1979683", 40, RoundingMode.ROUND_HALF_EVEN); + t2("-2.717789E+3942366982137037", "-2.4634911223721540585053403E+461", "-2.717789e+3942366982137037", 53, RoundingMode.ROUND_HALF_DOWN); + t2("6.166E-6244253", "-9.3214367939176849033412886654725530336291E+4194", "-9.3214367939e+4194", 11, RoundingMode.ROUND_DOWN); + t2("5.20725596945602124349E-6628650332", "8.3926653673662259021000369E+619", "8.39266536736622590210003690000000000000000000001e+619", 48, RoundingMode.ROUND_CEIL); + t2("-5.47534147329743050378910264292307917745886652072040802E+4736849", "-6.36656218431E+903", "-5.47534147329743e+4736849", 16, RoundingMode.ROUND_CEIL); + t2("-9.2797481508655335153340193408747852559E-762", "2.521199983786748708733455394509E-4192408404897193", "-9.2797481508655335153340193409e-762", 29, RoundingMode.ROUND_UP); + t2("3.861229821495293537193961672144521609397610358852924709084E+69897997373384", "-4.187275007792772117094721014960E-4794184599539", "3.861229821495293537193961672144521609397610358852924709084e+69897997373384", 58, RoundingMode.ROUND_HALF_UP); + t2("2.411723E+4353339572", "-7.68531916850E+98133448828193", "-7.6853191685e+98133448828193", 63, RoundingMode.ROUND_UP); + t2("0.188933017020775851110962818646204457535104092933546166", "-3.19557555791310599673359150099731090768E+6558", "-3.1955755579131059967335915009974e+6558", 32, RoundingMode.ROUND_FLOOR); + t2("-3.77704574461102506821116718590213463452971444226E+24181884", "7.89843889931508016397563E+54501333520", "7.89e+54501333520", 3, RoundingMode.ROUND_DOWN); + t2("-1.694348343970E-19062624043964", "4.74085362358688899617185491288841032345E+1818992", "4.74085362358689e+1818992", 15, RoundingMode.ROUND_HALF_EVEN); + t2("7.827548798871167738828135403355260658546930138086182E+88209119442", "-6.873098406387768E+8107575038668", "-6.873098406387768e+8107575038668", 45, RoundingMode.ROUND_HALF_EVEN); + t2("-7.793847268035948651213204898194065634671277463640679113E-71021", "-9.25192017503693470678244673283726041560455402088E+468797185420", "-9.251920175037e+468797185420", 13, RoundingMode.ROUND_UP); + t2("1.5324356680755304707388397601754351260260E+51800671", "7.750256E+2067810458386606", "7.750256e+2067810458386606", 68, RoundingMode.ROUND_FLOOR); + t2("-4284207863.48162898771759870845159620427053872002953436", "2.678461563685438181787E+2175", "2.678461563685438181787e+2175", 41, RoundingMode.ROUND_CEIL); + t2("3.509925697559788603605165685667402961597749778E+579972621", "9.49354694944266950726785182650136718343516254583305492E+615166919", "9.49354694944266950726785182651e+615166919", 30, RoundingMode.ROUND_CEIL); + t2("4.997254278769027827125462337E+116287155053", "-8.3420550960652692014E+73857", "4.99725427877e+116287155053", 12, RoundingMode.ROUND_UP); + t2("-1.5471238E+12818502839", "-2.51624E+6670", "-1.54712380000000000000000000000000000000000000001e+12818502839", 48, RoundingMode.ROUND_FLOOR); + t2("4.03845806575613111013609373029E+6641", "2.50582882960752577743961966535833E+34733022", "2.5058289e+34733022", 8, RoundingMode.ROUND_UP); + t2("-6.27404897554E+512651292", "3.850202960342140538175124315512092E-2468457050130455", "-6.27404897554e+512651292", 37, RoundingMode.ROUND_HALF_UP); + t2("3.73543241298342843814894899458386501E+2691695896154", "-9.724815059386122233255407618425E+4203582", "3.7354324129835e+2691695896154", 14, RoundingMode.ROUND_UP); + t2("-8.8231459456021072857818669866309764613E+930262643401808", "-5.249691790665394148103E-74240164", "-8.8231459456021072857818669866309764613e+930262643401808", 73, RoundingMode.ROUND_HALF_UP); + t2("-2.15335223663222506124798820406557843215348E+4202729672452141", "8.45980008962682894307E+774202820651", "-2.1534e+4202729672452141", 5, RoundingMode.ROUND_UP); + t2("-1.7799886819301366984596688945034565698432742036E-947941197049654", "2.213372627032946638192686843830E+240141770080", "2.21337262703294663819268684383e+240141770080", 40, RoundingMode.ROUND_CEIL); + t2("-9.4144E+2477", "5.13E-1594851437729515", "-9.4144e+2477", 28, RoundingMode.ROUND_HALF_EVEN); + t2("-6.84E+94", "2.4673099077000465752320309838269659987987170400370E-6504", "-6.84e+94", 52, RoundingMode.ROUND_FLOOR); + t2("-5.071806225212E+5417270823657", "-9.624503E+2818", "-5.07180622521200000000000000000000000000001e+5417270823657", 42, RoundingMode.ROUND_UP); + t2("-1334623402060722808866044690398799614351953.37498706276", "-9.2877551960513631E-16062", "-1.334623402061e+42", 13, RoundingMode.ROUND_UP); + t2("-2.6442090E-332", "5.661168834684021053299709525328255302698212731427678781E+171776", "5.6611688346840210532997e+171776", 23, RoundingMode.ROUND_DOWN); + t2("-1.78E-383610148117221", "-8.4613992413390360803256099173E+37044824", "-8.4613992413390360803256099173e+37044824", 61, RoundingMode.ROUND_DOWN); + t2("-0.0000062017052170970729498384391456766778884529974040624", "-5.518773320738164882E+85135165", "-5.518773320738164882e+85135165", 65, RoundingMode.ROUND_HALF_EVEN); + t2("1.93714405569220407313824065271476230676E+467591435511", "-5.7783767686955108423425328373372848769672002449421056718363E-7519814813", "1.937144055692204073138240652714762306759999999e+467591435511", 46, RoundingMode.ROUND_FLOOR); + t2("4.4360034512789350E+155348", "2.25210627639241929951317896718E+9412244", "2.25210627639241929951317896718e+9412244", 76, RoundingMode.ROUND_HALF_UP); + t2("-6.481935214532330996490E-46", "-3.025123871773769737508727467472456142864922733668871E+2854517544177134", "-3.025123871773769737508727467472456142864922733668871000000000001e+2854517544177134", 64, RoundingMode.ROUND_FLOOR); + t2("1.494273480155723127276787860353929741454585651339923384424E+7030", "3.599955E+6368385830772", "3.599955e+6368385830772", 63, RoundingMode.ROUND_DOWN); + t2("-3.28608292746150680004217754E+688438", "7.3551633873882835599850217061608240606832358782E-74572376626450", "-3.28608292746150680004217754e+688438", 50, RoundingMode.ROUND_HALF_EVEN); + t2("-1.03266796446E-8278", "-4.0460202659250511215483363070320924549117537263881023827559E+8774208", "-4.04602026593e+8774208", 12, RoundingMode.ROUND_HALF_EVEN); + t2("2.48389743898982686504586E+5990118820", "7.105424023427069964143E+50201321230", "7.10542402342706996e+50201321230", 18, RoundingMode.ROUND_DOWN); + t2("-3.6762713182092660572370854E-293263731", "2E+81311851770632", "2e+81311851770632", 45, RoundingMode.ROUND_HALF_DOWN); + t2("-7.922246796162E+560934167437503", "-795.111719224266738776273297740051263152270177611848", "-7.922246796162e+560934167437503", 20, RoundingMode.ROUND_HALF_UP); + t2("-7.84986371289748940384675258290319452577143E+784559037253", "4.8553700563277E+499797945", "-7.84986371289748940384675258290319452577143e+784559037253", 62, RoundingMode.ROUND_HALF_DOWN); + t2("-5.01451226729986E+634128641536684", "5.1772935756137731440883468553701654868056893184113342E+12620", "-5.01451226729986e+634128641536684", 73, RoundingMode.ROUND_HALF_DOWN); + t2("4.8148097678679009821027564058818895196777521129850224405E+68964", "9.681157078623298477505420042500552450626592789128905E+207", "4.81480976786790098210275640588188951967775212e+68964", 45, RoundingMode.ROUND_UP); + t2("2.7266500623596292085843253101131091745735239E+7581005", "-5.1142051E+379807216817167", "-5.1142051e+379807216817167", 14, RoundingMode.ROUND_HALF_EVEN); + t2("9.345E+4050716137", "8.25864200040756587945263712166329463926916E+989168197213499", "8.2587e+989168197213499", 5, RoundingMode.ROUND_UP); + t2("-4.4958852106290149081075323202084592539E-86", "-5.01557417551668E+7208357370", "-5.01557e+7208357370", 6, RoundingMode.ROUND_DOWN); + t2("-1.942702E+87956369", "-6.0893584767832E-464800", "-1.942702e+87956369", 41, RoundingMode.ROUND_CEIL); + t2("-1.20679614544803855898645801212207601717304402844E+3013791221389", "-8.2076647453271044803940573308E+2853907916091", "-1.20679614544803855898646e+3013791221389", 24, RoundingMode.ROUND_HALF_DOWN); + t2("-2.851894798868666358828959513926E+98768599339296", "-3.990652968467072965998006858161830578E+683573721", "-2.8518947988686663588289595139261e+98768599339296", 32, RoundingMode.ROUND_FLOOR); + t2("6.25935603116583092362404788361107180421574164239073421E-9473", "-9.577742473E+686", "-9.57774247299999999999999999999999999999999999999999999999999999999999999e+686", 72, RoundingMode.ROUND_CEIL); + t2("-0.0058890488", "-2.8E-962", "-5.89e-3", 4, RoundingMode.ROUND_FLOOR); + t2("5.983877037E+772055650933", "5.97790820447058150727307175945652943256022347739E+7594931381", "5.983877037e+772055650933", 52, RoundingMode.ROUND_DOWN); + t2("-3.49906948286962159619846775300283489060141E-4413058701961", "-5.78971523E+368830178139", "-5.78971523e+368830178139", 34, RoundingMode.ROUND_HALF_DOWN); + t2("7.99749151865001217378490121516E+9002510549", "2.916E+632970249941742", "2.916e+632970249941742", 32, RoundingMode.ROUND_HALF_EVEN); + t2("6.330E+94716", "-2.547152E+802", "6.33e+94716", 11, RoundingMode.ROUND_HALF_DOWN); + t2("7.6823442662814070799812306776069858647829286E-3799184", "-7.769E+52", "-7.769e+52", 17, RoundingMode.ROUND_HALF_DOWN); + t2("-9.12907988042607711581374160076730389488382781685292E+741508832", "2.268473599477838877813920073444162787769215604E-560719592104759", "-9.12907988042607711581374160076730389488382781685292e+741508832", 67, RoundingMode.ROUND_FLOOR); + t2("7.7870558162217243698180022032041422347135479211630E+866", "-7.7020027224428659E-145491", "7.78706e+866", 6, RoundingMode.ROUND_HALF_DOWN); + t2("6.80478260690757549309246441979E+1869908145", "2.177206989317966240E+7522960", "6.80478260690757549309246442e+1869908145", 27, RoundingMode.ROUND_CEIL); + t2("5.07211949960267751398063785947343590299568602130E+720174", "-2.08432572E+83019", "5.07211949960267751398063786e+720174", 27, RoundingMode.ROUND_UP); + t2("4.89816458567686737756451385267113E+12101101", "-9.90080E+857552754863", "-9.900799999999999999999999e+857552754863", 25, RoundingMode.ROUND_DOWN); + t2("-2.48566946979385137E-538", "-7.217064208353626291334100467692468361768858565308282E+415524765", "-7.2170642083536262913341004677e+415524765", 30, RoundingMode.ROUND_UP); + t2("5.048E-551635094", "-1.439E+8813632164337913", "-1.439e+8813632164337913", 59, RoundingMode.ROUND_HALF_DOWN); + t2("-4.3E+752212513104", "53992722691780303486849512407.39246980952144", "-4.3e+752212513104", 30, RoundingMode.ROUND_UP); + t2("-7.142585472595838E+92892003796883", "4.74357300426553962404753275927780859812305367191190071314120E+4633239443606751", "4.7435730042655396240475327592778085981230536719119007131412e+4633239443606751", 67, RoundingMode.ROUND_UP); + t2("9.56250E+282", "-1.976191E+524639328111177", "-1.976191e+524639328111177", 80, RoundingMode.ROUND_HALF_UP); + t2("58097.0062256871554607945977818233891850896884623286405535", "9.82736E+3437548955564", "9.82736e+3437548955564", 20, RoundingMode.ROUND_FLOOR); + t2("7.9045762440256318425790659793143E-4965904173099", "-3.6938684611042279394235224593675E+38389", "-3.69386846110422793942352245e+38389", 27, RoundingMode.ROUND_DOWN); + t2("-7E-462234653159", "-6.6847478792421727085344807185389002E+637004169", "-6.68474787924217270853e+637004169", 21, RoundingMode.ROUND_HALF_EVEN); + t2("-561.2720091692360113067783104954803622754208325102871818", "-7.4130142024929865261318486934E+32164358643", "-7.41301420249299e+32164358643", 15, RoundingMode.ROUND_HALF_DOWN); + t2("2.9903723964619271448953261629215250845808357901962E-51544547", "-7.2845375732905385235824832397797E+2060566536801", "-7.2845375732905385235824832397797e+2060566536801", 71, RoundingMode.ROUND_HALF_UP); + t2("-8.9582345656083E+809069666", "2.046451423561257913699884388407E+1935885444277270", "2.046451423561257913699884388407e+1935885444277270", 67, RoundingMode.ROUND_HALF_DOWN); + t2("-2.856771363027963E+1198409198036", "4.605132333E+709", "-2.9e+1198409198036", 2, RoundingMode.ROUND_HALF_DOWN); + t2("9091734240572059777337372169615492503869182301.1247975", "-8.3901616123211619672445427440292E+133319243", "-8.39016161232116196724e+133319243", 21, RoundingMode.ROUND_DOWN); + t2("5.233579714171457111588E-49936", "-1.2617273074210E+6667", "-1.261727307421e+6667", 14, RoundingMode.ROUND_HALF_UP); + t2("-8.654883657758180169090304049968356295218972434990113E+14841560166", "8.33657387806916277E+597026", "-8.6548836577581801690903040499683e+14841560166", 32, RoundingMode.ROUND_CEIL); + t2("-8059331253.58719027386485290667153", "7.9565819816680714877389072141477744303559651093340424969392E+715299", "7.95659e+715299", 6, RoundingMode.ROUND_UP); + t2("-8.2287694685E+511", "-6.606E+375989867821", "-6.607e+375989867821", 4, RoundingMode.ROUND_UP); + t2("-9.32984690617E+31581741", "-9.42018175E+74364348717760", "-9.42018175e+74364348717760", 26, RoundingMode.ROUND_HALF_UP); + t2("-6.20085923820376E+8160673", "-8.795906485970620E+579650017409", "-8.7959064859706200000000000000000000000000000000000000000000000000000000000001e+579650017409", 77, RoundingMode.ROUND_FLOOR); + t2("6111077.73449423349820841419947108867573056064817", "4.8591E-2967852", "6.11107773449423349821e+6", 21, RoundingMode.ROUND_HALF_EVEN); + t2("-5.6173317869768505246856457356986780E-645911516", "-6.48234137251910937E+13672413115716", "-6.48234137251910937e+13672413115716", 75, RoundingMode.ROUND_CEIL); + t2("1.9262000404646981284372692010779E+487924", "-1.535749951E+3638", "1.9262000405e+487924", 11, RoundingMode.ROUND_UP); + t2("-4.10762806215627722794306907745530381615754854740321381196382E-791154205", "3.028775154170974E+25608327", "3.028775154170974e+25608327", 39, RoundingMode.ROUND_HALF_EVEN); + t2("-5E+1218", "2.866422112642480598913127853764805280E+99948556185675", "2.866422113e+99948556185675", 10, RoundingMode.ROUND_HALF_EVEN); + t2("1.3687497629329880657607582012353633048331464879213827E+17963259014145", "-5.490245106915E+23852306753", "1.3687497629329880657607582012353633048331464879213827e+17963259014145", 69, RoundingMode.ROUND_HALF_DOWN); + t2("3.85212724377624295090535229379E+9478758", "4.0451450081831497E+87972", "3.85212724377624295090535229379e+9478758", 48, RoundingMode.ROUND_HALF_UP); + t2("-9.08908544982E+6617337143", "-6.5142538665739447016963430365560E+7631260", "-9.08908544982e+6617337143", 44, RoundingMode.ROUND_HALF_DOWN); + t2("5.959457309231332E+41", "-5.070718567389E+561214349", "-5.0707185673889999999999999999999999999999999999e+561214349", 47, RoundingMode.ROUND_CEIL); + t2("-3.728622750545506512080484234354229671633274E+158233", "7.179319446281008245342486526801997438459E+109038903341", "7.179319446281008245342486526801997438459e+109038903341", 45, RoundingMode.ROUND_HALF_DOWN); + t2("-5.7614024596800067218526669656238695848489E+224985466854", "3.2427446481735120819953731236322538554448401584592050E+8378", "-5.7614024596800067218526669656238695848488999999999e+224985466854", 50, RoundingMode.ROUND_DOWN); + t2("-3.4835323431888473771840263159327068602635020872E+7998239783115", "6.7428100586109632952356510043358059719760985E+2038539186746204", "6.742810058610963295235651004335805971976098499999999999999999999999999999999999e+2038539186746204", 79, RoundingMode.ROUND_DOWN); + t2("-6229133496.4893924446161519601394345107", "-2.276916342205932216117805016795613418000924136833E+16242080", "-2.276916342205932216117805016795613418000924136833e+16242080", 70, RoundingMode.ROUND_CEIL); + t2("5.35984699E-72107915904", "-7.76276928415635E+61389759002525", "-7.7627692841563499999999999999999999999999999999999999999999999999999999999e+61389759002525", 74, RoundingMode.ROUND_DOWN); + t2("7.1119339064979752108567832E+929808812", "-1.67553193934111426722745645998029754581442648081654760882657E-2916957357", "7.1119339064979752108567832e+929808812", 56, RoundingMode.ROUND_HALF_EVEN); + t2("-243072788544178675499517239569256568712198846202767712.62", "-4.33480855071507017886773199908E-35324630", "-2.43072788544178675499517239569256568712198846203e+53", 48, RoundingMode.ROUND_HALF_DOWN); + t2("-7.86878210709758E+9527", "-1.7336937634386E-9343103", "-7.86878210709758e+9527", 65, RoundingMode.ROUND_CEIL); + t2("4.079210074712408981696154435299450106E+93", "2.23415225492269115022951067888975527E+47", "4.07921007471240898169615443529945010600000000023e+93", 48, RoundingMode.ROUND_UP); + t2("-3.01237791565426512047386800693447E+678081", "-2.4751113813529797739111066953E+2882403566", "-2.475111381352979773911106e+2882403566", 25, RoundingMode.ROUND_CEIL); + t2("-4.64E-187769790111", "-3.186089369230379696332522E+2132959976908", "-3.186089369230379696332522e+2132959976908", 78, RoundingMode.ROUND_HALF_DOWN); + t2("1.3727020422764194180E+4584765", "-6.3616E+78692", "1.38e+4584765", 3, RoundingMode.ROUND_CEIL); + t2("-4.8117877099593937804832068934927E-3538", "9.13916952072141473559928404471708806E+93168534173363", "9.13916952072141473559928404471708806e+93168534173363", 39, RoundingMode.ROUND_CEIL); + t2("3.9617E+17367957171734", "-2.9450450488701070872960195710709108035833204E+2040162", "3.9617e+17367957171734", 39, RoundingMode.ROUND_HALF_EVEN); + t2("-5.371658726088474609E+287219966201", "-6.20518769279687306882E+49565185", "-5e+287219966201", 1, RoundingMode.ROUND_HALF_UP); + t2("-7419029829396747927663790849547151266796", "-5.9454693938125138515717817737024996E+918166986842", "-5.9454693938125138515717817737024996e+918166986842", 73, RoundingMode.ROUND_HALF_UP); + t2("3.07E+95277", "7.57199363734149184622458305448877770753853237840990735194E+5053804512331", "7.57199363734149184622458305448877770753853237841e+5053804512331", 48, RoundingMode.ROUND_HALF_DOWN); + t2("372", "4.0265633445977342886914858196025527970624174904E+64814780518", "4.0265633445977342886914858196025527970624174904e+64814780518", 49, RoundingMode.ROUND_DOWN); + t2("8.2434115226873751346578963854690734024845578463E+7994295397592428", "3.278854063807E+9359", "8.243411522687375134657896385469073402484557846e+7994295397592428", 46, RoundingMode.ROUND_HALF_EVEN); + t2("-7.45390E-812", "7.709625209977879913214128557108751E-7981196011445", "-7.45e-812", 3, RoundingMode.ROUND_HALF_DOWN); + t2("-3.3067553560851282138678987501752281E+7837691181", "2.95450700E-324345", "-3.30675535608512821e+7837691181", 18, RoundingMode.ROUND_CEIL); + t2("-4.132725853511692382203983950527438919940659554630E-64400138", "4.360967917876345295518228613189623E-7924", "4.3609679179e-7924", 11, RoundingMode.ROUND_HALF_DOWN); + t2("-7.623450291473352063748519929E+11275984419428", "-4.025668803346594949576561567E-93708553284332", "-7.6234503e+11275984419428", 8, RoundingMode.ROUND_FLOOR); + t2("3.3495505285238580755935342866555E+716714246983274", "-4.76240159579095E+7974238", "3.34955052852385807559353428665549999999999999999999999999999999999999999999999e+716714246983274", 78, RoundingMode.ROUND_DOWN); + t2("-1.136660052521958775081132655E+780346585615836", "-1.4135244992E-646125418487", "-1.136660052521958775081132655e+780346585615836", 57, RoundingMode.ROUND_DOWN); + t2("7.7725969446340451788873889127408996E-54272576921", "-9.9100709E+53123563", "-9.9100709e+53123563", 22, RoundingMode.ROUND_HALF_UP); + t2("-2.07E+838401", "-2.172095490971831419956111597314147500878965497E+926", "-2.07e+838401", 56, RoundingMode.ROUND_CEIL); + t2("6.80671234274E+24353107821", "1E+4750938956", "6.80671234274e+24353107821", 35, RoundingMode.ROUND_DOWN); + t2("4.2085E+131473", "-5.1978121837876172298218903357871360922005E+2099146", "-5.1978121837876172298e+2099146", 20, RoundingMode.ROUND_DOWN); + t2("7.069049473296496848033268695052361630426E+9568897081", "4.386868537351368673177869E+390306297083752", "4.38686853735136867e+390306297083752", 18, RoundingMode.ROUND_HALF_EVEN); + t2("-6.16478547257945184155358047295366261455E-38", "-2.05173968079268247011459019923423420235943277500358858E+5308523078501", "-2.05173968079268247011459019923423420235943277500358858e+5308523078501", 60, RoundingMode.ROUND_HALF_DOWN); + t2("1.383306490919538688E+81879426409289", "-2.265643768191163573874470768963025734277031037574241340460E-2379", "1.383306490919538688e+81879426409289", 55, RoundingMode.ROUND_CEIL); + t2("6.65075972731238922E-930707069", "9.45703E+4509158241767", "9.4570300000001e+4509158241767", 14, RoundingMode.ROUND_CEIL); + t2("-9.67250937130732794417157057421320331204604270225E-574", "7.737619718560572622199221865663491231727577E+782142770968324", "7.737619718560572622199221865663491231727577e+782142770968324", 61, RoundingMode.ROUND_CEIL); + t2("-89022.41482369848442890908256566643503482318530572528", "-5.695027009E+39", "-5.69502700900000000000000000000000008902241482369848442890908256566644e+39", 69, RoundingMode.ROUND_HALF_UP); + t2("-1.179762010268198245134282222435204048846859133388E+68346761", "8.362818497E+8896956578994", "8.3e+8896956578994", 2, RoundingMode.ROUND_FLOOR); + t2("-3.236195523012E-83254192", "3.378251334898933005797757298070303713450750E-2142943475475", "-3.236195523012e-83254192", 47, RoundingMode.ROUND_HALF_DOWN); + t2("2.175532119419909257429360635876470707716347E+1182196405810284", "9.464118566590516974257535899157E+154099855", "2.175532119419909257429360635876470707716347e+1182196405810284", 58, RoundingMode.ROUND_HALF_UP); + t2("-1.85132291032742043751664841732E+6749817", "-5.51291831643359159273855611591861000641174141E-3605", "-1.85132291032742043751664841732e+6749817", 37, RoundingMode.ROUND_DOWN); + t2("-2.2E+623", "-9.68323984843808465603512E+183103449888", "-9.68323984843808465603512e+183103449888", 44, RoundingMode.ROUND_DOWN); + t2("-4.1828527968981705591657649860294016662956868724355853E+19307151738", "5E+544965526789", "5e+544965526789", 8, RoundingMode.ROUND_HALF_DOWN); + t2("-0.00002106140160087411819018460948258476", "5E+95325", "5e+95325", 18, RoundingMode.ROUND_HALF_UP); + t2("-9.03580108114826811062868525189870794017579791E+85492885978", "4.475647546864518189E+4051302309", "-9.0358010811482681106286852518987079401758e+85492885978", 42, RoundingMode.ROUND_FLOOR); + t2("6.2061097171903904854635354E+72", "6.9015321E+72", "1.31076418171903904854635354e+73", 58, RoundingMode.ROUND_UP); + t2("1.1271190477663817879311605112662756265493718175791E-99055996513", "4.0284287354371351719008499649E+611668504239704", "4.0284287354371351719008499649e+611668504239704", 53, RoundingMode.ROUND_HALF_DOWN); + t2("-9.070491212596496609867481793574894990535496090177868969854E+658840970078", "-8.762526950581E+1026278", "-9.070491212596496609867481793574894990535496e+658840970078", 43, RoundingMode.ROUND_HALF_EVEN); + t2("8.369641142361236162304528128393153546691876416984E+868902939086", "88804.9739647026947806803702930945515597341930611269861526294", "8.369641142361236162304528128393153546691876416984e+868902939086", 63, RoundingMode.ROUND_HALF_UP); + t2("6.25303187109832956485812114E-332", "-4.16057982689671800552E+47", "-4.16057982689671800552e+47", 71, RoundingMode.ROUND_FLOOR); + t2("-6.9097762286078E+103218989497771", "7.0148859392951759145156525969964358929113614070644E+965971647", "-6.90977622860779999999999999999999999999999999999999999999999999999999e+103218989497771", 69, RoundingMode.ROUND_CEIL); + t2("-8462160.18230790532620920473885801869", "-6.823491622045784142358976141661068180768388482486E-88", "-8.46216018230790532620920473885801869e+6", 63, RoundingMode.ROUND_DOWN); + t2("-1.38690581025619355662279638E+350", "-8.955517678E+1853909510957206", "-8.955517678e+1853909510957206", 43, RoundingMode.ROUND_HALF_EVEN); + t2("-5.662020023720939855003554858E+986417261", "-9.2325541872875317742243079569723516648762943536933E+8451619714730", "-9.232554187287531774224307956972351665e+8451619714730", 37, RoundingMode.ROUND_HALF_EVEN); + t2("6.3E+53457735417", "1.0697531572559526955214421502791847069093610417E+337274762167831", "1.069753157255952695521442150279184706909e+337274762167831", 40, RoundingMode.ROUND_HALF_EVEN); + t2("3.9639194078060371658112341512E+8634764363825", "5.6698008620633286745528866293971251897089840345693E+92903695103312", "5.6698008620633286745528866293971251897089840345693e+92903695103312", 58, RoundingMode.ROUND_HALF_UP); + t2("9.584900900395488487116295413021E+117531807633", "6.9324408293249E-1363303", "9.584900900395488487116295413021e+117531807633", 36, RoundingMode.ROUND_DOWN); + t2("-4.604250E-48595989500099", "9.4091100983915005728854438780350386722124E-37700994", "9.4091100984e-37700994", 11, RoundingMode.ROUND_HALF_EVEN); + t2("-1.2205998125948126093868793881263340265049E-998794", "3.649848500316357500547879920E+99", "3.649848500316357500547879919e+99", 28, RoundingMode.ROUND_DOWN); + t2("5.918177310439220307623448011380E-257", "-2E+6749795432", "-2e+6749795432", 66, RoundingMode.ROUND_UP); + t2("-6.5872656998444641442648407054E-767", "3.51329355E+43", "3.51329355e+43", 30, RoundingMode.ROUND_UP); + t2("-5.562719334179628563480E+318", "-39.08012730982717", "-5.56271933417962856348e+318", 63, RoundingMode.ROUND_HALF_EVEN); + t2("2.697889121257369578794302804713840199125414782E+722936866339985", "4.751392590949911333231539875346676790E+62614526", "2.697889121257369578794302804713840199125414782e+722936866339985", 80, RoundingMode.ROUND_HALF_UP); + t2("-8.4159737886565185959840386901023E+27998158934", "-0.0006910115130926718132200726", "-8.4e+27998158934", 2, RoundingMode.ROUND_HALF_UP); + t2("-3E+716433394", "3.7578484576584432474906E+2055714482908573", "3.75784845765844324e+2055714482908573", 18, RoundingMode.ROUND_FLOOR); + t2("4.1991889000120954623433E+120229080204960", "-3.3546959E+9", "4.19918890001209546234329999999999999999999999e+120229080204960", 45, RoundingMode.ROUND_FLOOR); + t2("-6.08543E+593", "-4.2796104838229607523910876902809840004902562E+34653525253701", "-4e+34653525253701", 1, RoundingMode.ROUND_HALF_UP); + t2("2.097885E+2218000078041", "4.0901314719937469579558216315076E+7927180549480", "4.0901314719937469579558216315076e+7927180549480", 59, RoundingMode.ROUND_HALF_EVEN); + t2("-6.84838207210244388737666E+751865040904331", "5.6342237604877455194367788E+3566137", "-6.848382072102444e+751865040904331", 16, RoundingMode.ROUND_UP); + t2("-6.8451100837629162348231001524006244741E-755406185", "2.81427E+40", "2.81427e+40", 22, RoundingMode.ROUND_CEIL); + t2("-8.10074412915767163954342093963E-879027289", "6.625725742052367170881318E+42326835776941", "6.6257257421e+42326835776941", 11, RoundingMode.ROUND_HALF_DOWN); + t2("-1.5468294728676E+95900", "-5.367279217862540884E+306281312532061", "-5.367279217862540884e+306281312532061", 51, RoundingMode.ROUND_HALF_UP); + t2("1.264071719E+321503958769375", "-6.1691460640507553006E+342", "1.264071719e+321503958769375", 19, RoundingMode.ROUND_HALF_UP); + t2("-2.0190695742646710403319E+66234", "3.427522354645614160599771916552730553886396746E+1672076199400898", "3.427522354645614160599771916552730553886396746e+1672076199400898", 68, RoundingMode.ROUND_UP); + t2("-1.27950222977734E+3618101661471", "-6.038794398E+18", "-1.27950222977734000000000000000000000001e+3618101661471", 39, RoundingMode.ROUND_UP); + t2("-2.89312941853532013161583001147737377090976778027249679E+941233067914692", "4.253036163217764443378E-507244721095", "-2.89312941853532013161583001147737377090976778027249679e+941233067914692", 80, RoundingMode.ROUND_HALF_DOWN); + t2("-1.3536812468636840678594E-236803", "4.36418509785519617E+73502037", "4.36418509785519617e+73502037", 32, RoundingMode.ROUND_HALF_DOWN); + t2("7.9674746447477270E+32024230", "9.378127937107139691153209079100915E+74421", "7.967474644747727e+32024230", 53, RoundingMode.ROUND_DOWN); + t2("8.6526468560473890123167324816104194119468735E-45492", "-9.09989833699618989418290584169989921293754881009537E+328", "-9.0998983369961898941829058416998992129375488100953699e+328", 53, RoundingMode.ROUND_DOWN); + t2("-2.017312910445149289870836785763240127750931575919499156E+650307495816", "-5.190143261E-8152", "-2.017312910445149289870836786e+650307495816", 28, RoundingMode.ROUND_HALF_UP); + t2("-5.6E-269576", "6.2177568119546215E+88218225511", "6.2177568119546214999999999e+88218225511", 26, RoundingMode.ROUND_FLOOR); + t2("-68.5923815861262", "-3.811396801043640697131493382343876010462109E+70269300763209", "-3.811396801043640697131493382343876010462109e+70269300763209", 69, RoundingMode.ROUND_HALF_DOWN); + t2("1.34183756713717E-74940093", "-2.175904333624324764545701179292E-7612659894530876", "1.342e-74940093", 4, RoundingMode.ROUND_HALF_DOWN); + t2("7.3823394401894199541813669526973321281009006E+342964619755", "-2.7835169984777076297255968060492117442353849489382980019E-3932414405016", "7.382339440189419954181366952697332128100900599999999999999999999999999e+342964619755", 70, RoundingMode.ROUND_DOWN); + t2("3.50120867311240338577225E+98746437806395", "4.634063E+694234208", "3.5012086731124033857722500000000000000000000000001e+98746437806395", 50, RoundingMode.ROUND_CEIL); + t2("-8.8828437E+56", "-7.25397665E+8727060744642966", "-7.25397665000001e+8727060744642966", 15, RoundingMode.ROUND_UP); + t2("9.74635382016114470156547448407257344E+49850", "-1.1076849722027014065336890857136074823222610810E-9548340671471", "9.746353820161e+49850", 13, RoundingMode.ROUND_HALF_EVEN); + t2("8.897670839087223245089442771565E-378988393824", "2.3526883180071781814641756178335866180190260975904818586E+635805332", "2.3526883180071781814641756178335866181e+635805332", 38, RoundingMode.ROUND_CEIL); + t2("608.55", "77150540721455106827873201970.2593264916906504211808899164", "7.71506e+28", 6, RoundingMode.ROUND_UP); + t2("6.4067091417754590779085450081350996049285898291514993E+694340", "-8.5034905E+494", "6.4067091417754590779085450081350996049285898291514993e+694340", 67, RoundingMode.ROUND_HALF_EVEN); + t2("4.36091111444062354E+999893190041790", "-8.558549934089025241421814657431478803E+540863327424681", "4.36091111444062354e+999893190041790", 23, RoundingMode.ROUND_HALF_UP); + t2("2.02780522531675E+136520669", "-9.0788306407510641081565940668E+8724564", "2.02780522531675e+136520669", 67, RoundingMode.ROUND_HALF_DOWN); + t2("5.93767365838216619745732348758017158E+955", "8.9721E+431904020646180", "8.9e+431904020646180", 2, RoundingMode.ROUND_DOWN); + t2("2.8711643148116200158949330849885047181E-4600476362", "9.75359230961676936389552548160010E+48898513453", "9.7535923096167693638955254816001e+48898513453", 55, RoundingMode.ROUND_HALF_UP); + t2("-6.030923423855781598475618709786333713169903670511765E+2251933072", "-6.13420556973715923255349754248653E-3225321584897", "-6e+2251933072", 2, RoundingMode.ROUND_HALF_DOWN); + t2("-5.0643343191104039786855760123159419069764106624E-98164034180568", "3.26E+831244", "3.26e+831244", 9, RoundingMode.ROUND_HALF_DOWN); + t2("7.9721847193575692498E-6862754", "9.7863576467540E-2650985287153", "7.9721847193575692498000000000000000000000000000000001e-6862754", 53, RoundingMode.ROUND_CEIL); + t2("1.573624345267447620812635567020744272980281482501E-221456", "2.8539739189E+650", "2.8539739189e+650", 12, RoundingMode.ROUND_HALF_DOWN); + t2("9.637986740398752374655875060E-3225576540261", "9.922432863495047234277553E+488324", "9.922432863495047234277553e+488324", 64, RoundingMode.ROUND_HALF_DOWN); + t2("-1.97125828493768337239967389442233708197656129981818E-7773", "-3.96013273553579497952556645107287914498537E+749953246360250", "-3.9601327355357949795255664510728791449e+749953246360250", 38, RoundingMode.ROUND_CEIL); + t2("8.82633392266893780638594971747302E+61229617", "9.79196617176522263400962907E+69216771", "9.79196617176522263400962907e+69216771", 27, RoundingMode.ROUND_HALF_EVEN); + t2("-9.302E+58430888245", "2.6636053535239380639211536504878285554494542504889E+79", "-9.302e+58430888245", 39, RoundingMode.ROUND_FLOOR); + t2("-2.535839780522381110942953914534457002360765692E+6526170967", "2.62901893438991069611578793857879593638283E+788506702", "-2.535839780522381110942954e+6526170967", 25, RoundingMode.ROUND_FLOOR); + t2("-3.9345030935445477843107831E+64762840931", "-3.1095283664E+7659727206401166", "-3.1095283664e+7659727206401166", 31, RoundingMode.ROUND_HALF_EVEN); + t2("-5.5484066781366337113E+2491043234", "-8.550643596361753733664982399991E+5499636640", "-8.55064359636e+5499636640", 12, RoundingMode.ROUND_HALF_DOWN); + t2("-3.976379752653358042097409682967108553805676770208E-40967289670", "9.1059206981657962655E-61061817374", "-3.976379752653358042097409682967108553805676770208e-40967289670", 53, RoundingMode.ROUND_HALF_EVEN); + t2("5.9462859572100716863693502905346778635821306287894865E-832187", "7.8737352420E+68285205095552", "7.8737352420000000000000000000000000000000000000000000000000000000000000001e+68285205095552", 74, RoundingMode.ROUND_CEIL); + t2("-9.11734E+18", "3.2853037519476420901581776332264959408326665988606202841463E+6304", "3.28530375194764209015817763322649594083266659886063e+6304", 51, RoundingMode.ROUND_UP); + t2("5.408E-422768", "-4.8335290132E+201375094", "-4.83352901319999999999999999999e+201375094", 30, RoundingMode.ROUND_DOWN); + t2("6.6092880346019434575388497651410286421289864004619E+4656", "3.9295689345852656614938567253540505E+508", "6.6092880346019434575388497651410286421289864004619e+4656", 80, RoundingMode.ROUND_HALF_UP); + t2("-4.91401093941520751075270E+4185533155", "-6.7381334573014505967256547E+42772145075452", "-6.73813345730145059672565470000000000000000000000000000000000000000000000001e+42772145075452", 75, RoundingMode.ROUND_FLOOR); + t2("-5.8801E+99602", "5.6576405606427550227433851380E+128", "-5.8801e+99602", 65, RoundingMode.ROUND_HALF_UP); + t2("5.0710745757516767273108615078180531823602028727499202502506E-610041", "-9.0852256033047655667019322791175377236422690704992E+9179", "-9.0852256033047655667019322791175377236422690704992e+9179", 69, RoundingMode.ROUND_FLOOR); + t2("-5255068.0825602021074390953683541500", "-4.592648796456153745297889532992250988472527208E+7065130", "-4.592648796456153745297889532992250988472527208e+7065130", 57, RoundingMode.ROUND_DOWN); + t2("-8.61396448876019522705889E-41106369062753", "-4.41483E-492481", "-4.41483e-492481", 26, RoundingMode.ROUND_HALF_EVEN); + t2("1.14016605836177006720482326997467845E+14993503", "-6.177069655310505213411310366510839650686664264E+2157211", "1.14016605836177006720482326997467845e+14993503", 44, RoundingMode.ROUND_CEIL); + t2("9.300645020005693E+3504806", "-5146273.1057618938602833714714181477791932845153454810", "9.300645020005693e+3504806", 53, RoundingMode.ROUND_HALF_UP); + t2("-5.2599E-3314798970191587", "5.4855558375519149825404452047974310885988201117831335654E+26514", "5.4855558375519149825404452047974310885988201117831335654e+26514", 67, RoundingMode.ROUND_CEIL); + t2("6.59649576007342568868449989E+538872427755185", "891005.33873644936728042736", "6.59649576e+538872427755185", 10, RoundingMode.ROUND_DOWN); + t2("2.4554170563505956971541656717107582335E+34170418740515", "5.83837E-7653573454209795", "2.455417056350595697154165671710758233501e+34170418740515", 40, RoundingMode.ROUND_UP); + t2("3.41080223464725380344854090346498493563054230776E+7037668", "3.14842150141E+41335484610639", "3.14842150141e+41335484610639", 77, RoundingMode.ROUND_DOWN); + t2("8.681311157248225923748470344192829943E+231223026", "-1.07602358980463083281256556022721406134270139605003141390391E+14272011657878", "-1.0760235898e+14272011657878", 11, RoundingMode.ROUND_CEIL); + t2("8.225279625048415710E-9666971511366", "36496651859919549044121555436.37268263369", "4e+28", 1, RoundingMode.ROUND_UP); + t2("-8.614413777937082274727372801222121623313883147740278E-61723045895580", "5.28378902145634261235395340604401595937012799E+7419410", "5.28378902145634261235395340604401595937012799e+7419410", 73, RoundingMode.ROUND_HALF_EVEN); + t2("-7.077924E-1266241", "-3.913E+834901020942", "-3.91300000000000000000000000001e+834901020942", 30, RoundingMode.ROUND_FLOOR); + t2("-3.732216167925363337458992550E+4177548766584500", "-8.7934860531224834587594863442634283E+1462688214811066", "-3.73221616792536333745899255e+4177548766584500", 52, RoundingMode.ROUND_HALF_UP); + t2("6.97755E+6", "2.2877809304854828E+4407", "2.2877e+4407", 5, RoundingMode.ROUND_DOWN); + t2("-45.4067286479389782840054", "8.91218613981377815287835E-188925528640", "-4.54067286479389782840054e+1", 62, RoundingMode.ROUND_UP); + t2("-4.800831476904E-85082047472366", "-4.379291E-93", "-4.379291e-93", 42, RoundingMode.ROUND_CEIL); + t2("-1.194105902974498122551096123E-94894098890", "1.5568136322038996483E-354014309250", "-1.194105902974498122551096122999999999999999999999999999999999999999999999999999e-94894098890", 79, RoundingMode.ROUND_DOWN); + t2("6.75696439265896E-86458437937", "-6.18815899276E-2388", "-6.189e-2388", 4, RoundingMode.ROUND_FLOOR); + t2("-3.409024632670161023496280178531339457629E+27112316", "4.46068565317202874282395165E-495827551", "-3.409024632670161023496280178531339457629e+27112316", 53, RoundingMode.ROUND_HALF_DOWN); + t2("-8.813022012056952980968848339036938602362901545401799834976E+391789", "4.731941223371247463346388871E-23952433", "-8.813022012056952980968848339036938602e+391789", 37, RoundingMode.ROUND_HALF_UP); + t2("2.923027E+7530", "-4.419058716377620251E+4887595742770", "-4.41905871637762025099999999999999999999999999999999999999999e+4887595742770", 60, RoundingMode.ROUND_CEIL); + t2("-6.664622043984176E+4712094542244", "-9.32102112282264088803042213727564362E+66", "-6.66462204398417600001e+4712094542244", 21, RoundingMode.ROUND_FLOOR); + t2("9.02650078E-467498", "4.9512729715812779516286425980E-549954546", "9.026500780000000000000000000000000000000000000000000000001e-467498", 58, RoundingMode.ROUND_CEIL); + t2("6.689E+85003676", "-6.638166578074876738622496356890159228155342785776E+60234", "6.689e+85003676", 15, RoundingMode.ROUND_HALF_UP); + t2("-2.05652510811513048748544693966238135E+818235279987367", "4.1709344738E+74574013379", "-2.05652510811513048748544693966238134999999999999999e+818235279987367", 51, RoundingMode.ROUND_CEIL); + t2("6.398711908004381554802283360719752E+4730095275933669", "-4.31188257820938081843719397433E-920870554", "6.39872e+4730095275933669", 6, RoundingMode.ROUND_CEIL); + t2("8.73156173934528358105E-953382092198", "1.340875238602177021401678575690530646009809571023927E-271", "1.3408752386021770214016786e-271", 26, RoundingMode.ROUND_HALF_UP); + t2("-5.95550E+205", "2.6250371757678874307877154206659878727065719650450089880E+41229666", "2.6250371757678875e+41229666", 17, RoundingMode.ROUND_CEIL); + t2("7E+4830388", "-9.8714354879284623160331871741477171205989649E+4186330687", "-9.871435487928462316033187174147717120598965e+4186330687", 43, RoundingMode.ROUND_HALF_EVEN); + t2("-4.3582926017193518533450323833708928536970E+625928309325", "-7.78629536748566236211756044018672869112292055163649E+3878224580", "-4.35829260171935185e+625928309325", 18, RoundingMode.ROUND_DOWN); + t2("-6.609279764226070813913560543984805556E+5187974", "3.905435051270559004992988312452E+230155836810", "3.905435051270559004992988312452e+230155836810", 68, RoundingMode.ROUND_UP); + t2("9.45887186206705E+73502", "5.96429970044883173203099491097390061980598800252174E-515181547125762", "9.4588718620671e+73502", 14, RoundingMode.ROUND_HALF_UP); + t2("8.89591337480739908E-3743", "-3.8735632122461E+397767219633", "-3.8735632122461e+397767219633", 72, RoundingMode.ROUND_HALF_EVEN); + t2("-3.153382278776414362284133112135439578116973502546065164648E+74851409249", "-3.48681230697632258727902322960960915324023093E+766", "-3.1533822787764143622841331121354395781169735025460651646480000000000000001e+74851409249", 74, RoundingMode.ROUND_FLOOR); + t2("3.9336988381067397011905489E+527055189766", "8.64378899166797231243984509974017E+117148", "3.9336988381067397011905489e+527055189766", 47, RoundingMode.ROUND_FLOOR); + t2("-6.328346210870118641610455940563281499E-7093", "4.452E+232368123", "4.452e+232368123", 6, RoundingMode.ROUND_HALF_EVEN); + t2("-5.41149301394611E+3527860638", "-5.5223448959516291E+420253319108", "-5.5223448959516291e+420253319108", 48, RoundingMode.ROUND_HALF_EVEN); + t2("2.574581610771706413056866071726985676312804627268933154E+94644971150599", "4.19564452200065037E+5871645", "2.574581610771706413056866071726985676312804627268933155e+94644971150599", 55, RoundingMode.ROUND_UP); + t2("4.338817746880378436738495919632651616263614596719991E-16853", "2E+5897995878425272", "2e+5897995878425272", 69, RoundingMode.ROUND_DOWN); + t2("9.71853832510229703370187576961518504499101205577E+9111269390", "3.2496E+50", "9.71853832510229703370187576961518504499101205577e+9111269390", 48, RoundingMode.ROUND_DOWN); + t2("-6.0218320829566386022648890733157200033176949278160808E+82557730169", "-5.361170016575593681E+143113", "-6e+82557730169", 1, RoundingMode.ROUND_HALF_EVEN); + t2("4.6490451654393844446651609606687868475756153576312E-376341", "2.0912257288342702429330869412758769521111E+78", "2.09122572883427e+78", 15, RoundingMode.ROUND_HALF_EVEN); + t2("3.66994928396252359649930732470531579201351871187E+99703133411809", "5.529480595445504035611119719527454873014652197E+812902246788", "3.669949283962523596499307324705e+99703133411809", 31, RoundingMode.ROUND_HALF_DOWN); + t2("-8.74517397956014322789450002358854144583299779882180502E-87701728", "27389405822313039778073140591625089949761116819676335.6", "2.7389405822313039778073140591626e+52", 32, RoundingMode.ROUND_CEIL); + t2("-5.021020055608114534378724810450139799833E+767625484", "-8.884576767698250355498196340E+7492833393", "-8.8845767676982503554981963400000000000000000000000000000000000001e+7492833393", 65, RoundingMode.ROUND_FLOOR); + t2("7.62247750609277312122360492978483581579463629778131427161448E+142155730", "-1.366156567618910E+846", "7.622477506092773121223604929784835815794636298e+142155730", 46, RoundingMode.ROUND_HALF_EVEN); + t2("3.80236397982391857012210459271537523992857680345840985E+66118241", "-1.884520251072700423391655E+6217874997702719", "-1.884520251072700423391655e+6217874997702719", 56, RoundingMode.ROUND_HALF_UP); + t2("-9.2321759503981412397425795826926029942098E+8733527", "-8.7062475124E+556924354520332", "-8.7062475124e+556924354520332", 72, RoundingMode.ROUND_DOWN); + t2("-1E+2739", "1.07504967942503E+72399100", "1.07504968e+72399100", 9, RoundingMode.ROUND_CEIL); + t2("-4.501139811060428663086503396605E+7512952841277", "9.74754E+612863833268", "-4.501139811060428663086503396605e+7512952841277", 61, RoundingMode.ROUND_HALF_UP); + t2("-2.791920E-6979589", "4.583273832236155230494571397462096592220280771098596264E+469", "4.583273832236155230494571397462096592220280771099e+469", 49, RoundingMode.ROUND_HALF_EVEN); + t2("7.0187499136E+7492068713516986", "3.7142E+2095489320006", "7.01875e+7492068713516986", 7, RoundingMode.ROUND_HALF_UP); + t2("1.9019789382830376195918378941236968514484E+71410", "-7.99725347286638007091478935373392E+7365295302", "-7.997253472866380070914789353733919999999999999999e+7365295302", 49, RoundingMode.ROUND_DOWN); + t2("3338.5172841353250437158190589780380385578461660", "6.77505835256019499058101854770781E+7539", "6.77505835256019499058101854770781e+7539", 59, RoundingMode.ROUND_FLOOR); + t2("-4.9444824029891309040139610391966744050392458E+8876674546259", "4.89404922143193474090165342957850665932E-6025919172081577", "-4.944482402989e+8876674546259", 13, RoundingMode.ROUND_CEIL); + t2("4.6936762453E+233633", "2.0298247403278282426503226083480322850955621952E-8131464822976878", "4.6936762453e+233633", 45, RoundingMode.ROUND_HALF_EVEN); + t2("-9.32605858974123003945425542726428573E+68805", "2.264033411227266600823672868731041126239E+6324382", "2.2640334112272666008236729e+6324382", 26, RoundingMode.ROUND_HALF_EVEN); + t2("9.1539648386573763709509451330207457217916752551140E+23040194", "1.627941876070761636770835706311844E+828318811692", "1.6279418760707e+828318811692", 14, RoundingMode.ROUND_FLOOR); + t2("-6.4390826883656826596492556633348105286077347172155E+63033524473414", "-7.956411056870579819719891052088596785E+153011", "-6.4390826883657e+63033524473414", 14, RoundingMode.ROUND_UP); + t2("2.7064812231096664184153270330230630627E+8960", "4.44890E+14", "2.7064812e+8960", 8, RoundingMode.ROUND_DOWN); + t2("-7.327642780E+587240674278", "2.07656E-985537910254605", "-7.32764278e+587240674278", 69, RoundingMode.ROUND_HALF_EVEN); + t2("-1.42E+96055746", "-8.5604850422145679122796946005700E-4653494", "-1.42e+96055746", 7, RoundingMode.ROUND_HALF_DOWN); + t2("4992508.301645767523155459894678718123351604802445323895619", "3.72990E+13842745125710", "3.7299e+13842745125710", 80, RoundingMode.ROUND_HALF_DOWN); + t2("-1.256953594E+7236118344136", "-4.09465177284425514185539130054401074055459986086339943540E-83546135946", "-1.2569535940000000000000000000000000000000000000000000000000000000000000000001e+7236118344136", 77, RoundingMode.ROUND_FLOOR); + t2("9.41029318105473329613253011839087290833275595995122371849056E-29625", "1.9307258474166719484463724285178525232866288768E+70920510546", "1.9307258474166719484463724285178525232866288768e+70920510546", 76, RoundingMode.ROUND_HALF_DOWN); + t2("9.813278809076871149704216239300830845772E+29235417875422", "7.726439068E-988962", "9.813278809076871149704216239300830845772000000000001e+29235417875422", 52, RoundingMode.ROUND_UP); + t2("-8.463639551664145703187886E-156", "279081667.59356802248980941113608257729512599", "2.7908166759356802e+8", 17, RoundingMode.ROUND_FLOOR); + t2("4.47214184653505223492E+883515139", "3.309873456105815E+64313779158", "3.309873456105815e+64313779158", 32, RoundingMode.ROUND_HALF_DOWN); + t2("3.491602376219586080929052381565390173E+7489419310036271", "8.10306339952872193677742862466525541949283E+7626", "3.4916023762195860809290524e+7489419310036271", 26, RoundingMode.ROUND_HALF_EVEN); + t2("6.46583186092292730436357802632474725780631273259822452268E+2939004825", "-6.65941847768578026064519388121523E-28546746064", "6.465831860922927304363578026324e+2939004825", 31, RoundingMode.ROUND_DOWN); + t2("1.2710796647887570986885389E+640281", "5.9877E+5313", "1.2710796647887570986885389e+640281", 70, RoundingMode.ROUND_HALF_EVEN); + t2("2.771760951631352296263177504506321685499956876587860325415E+343435941", "-6.792699861338523228756017166452E+7780345", "2.771760951631352296263177504506321685499956876587860325415e+343435941", 74, RoundingMode.ROUND_HALF_EVEN); + t2("-6.20173382474746097657595687E+1448469961988", "-1.657862720655925862E-2011442610356", "-6.201733824747460976576e+1448469961988", 22, RoundingMode.ROUND_UP); + t2("7.19E-428778666962", "9.28150017607E-3474", "9.28150017607e-3474", 79, RoundingMode.ROUND_HALF_DOWN); + t2("-747.551680232156958777701799199491737550380489867119185020", "-9.73709891915652547616933631936419903292094E+651", "-9.73709891915652547616933631936419903292094e+651", 53, RoundingMode.ROUND_HALF_EVEN); + t2("-8.078E+3315302", "2.15169943796281232304472863921988890E+2567", "-8.07799999e+3315302", 9, RoundingMode.ROUND_DOWN); + t2("5.8E+39461267787915", "2.5148686588857181692588619317395E-31", "5.8e+39461267787915", 15, RoundingMode.ROUND_DOWN); + t2("-2.22064998995261039631383890501518945859422759945176340341E-635060", "-1.39843508580856562818161E+64778849", "-1.39843508580856562818161e+64778849", 73, RoundingMode.ROUND_CEIL); + t2("5.0034947083288E+363060935274072", "-4.66561393145727043E+619806221", "5.0034947083288e+363060935274072", 73, RoundingMode.ROUND_HALF_EVEN); + t2("24.963545620543750269937636534", "1.66087688E-6943765783047602", "2.4963545620543750269937636534e+1", 63, RoundingMode.ROUND_HALF_DOWN); + t2("2.92620971559898998370677002811838966620180373404214E+765499459035", "-9.423154983933572852327650800018652947E+6448557538461", "-9.4231549839335728523277e+6448557538461", 23, RoundingMode.ROUND_HALF_EVEN); + t2("2.5036763992E+495898874868823", "-7.56061998765E+82514018", "2.503676399199999999999999e+495898874868823", 25, RoundingMode.ROUND_FLOOR); + t2("9.96718458512404477043E-1710123367716", "8.104905016458678631054282511661E+33", "8.104905e+33", 7, RoundingMode.ROUND_HALF_EVEN); + t2("-1.1900511840900E+5036591923240275", "8.8806031666267441124095697286490841782E+2241911599", "-1.19005118409e+5036591923240275", 38, RoundingMode.ROUND_HALF_EVEN); + t2("-9.7E-34", "5.7452E-54", "-1e-33", 1, RoundingMode.ROUND_FLOOR); + t2("-2.310978793269215902937528986527468629E+99530314910", "-7.923E-1175647952319965", "-2.3109787932692159029375289e+99530314910", 26, RoundingMode.ROUND_DOWN); + t2("6.9518585698785793563297313E-945937", "6.932072394145325883412710200096049709866325251010349E+68", "6.9320723941453258834127102000960497098663e+68", 41, RoundingMode.ROUND_DOWN); + t2("4.271660437098185580170228994794504852515473072113049511E+6867343324461", "-9.619475429747231385107E-874917830245325", "4.2716604370981855801702289947946e+6867343324461", 32, RoundingMode.ROUND_CEIL); + t2("2.8244742854519608761599348370226032496180257E+797560705822049", "-7.27641103678856E+159287", "2.8244742854519608761599348370226032496180257e+797560705822049", 63, RoundingMode.ROUND_CEIL); + t2("-5.079803926450090090557901718539991325403110917548785208E+6562216", "1.271E+9", "-5.0798039264500900905579018e+6562216", 26, RoundingMode.ROUND_FLOOR); + t2("-49607.52920242", "-3.0423605762260014205798310416784E+687914", "-3.042360576226001420579831041e+687914", 28, RoundingMode.ROUND_CEIL); + t2("8.319E+65", "3.450099689207871250018932572724713674993594305684395175E+1105524162723988", "3.45009968920787125001893257272471367499359430568439517e+1105524162723988", 54, RoundingMode.ROUND_DOWN); + t2("-4.155002715998248749260902E+351917", "-8.85351844209282695711327416305205905957026104336372532549E+918163", "-8.853518442092826957e+918163", 19, RoundingMode.ROUND_HALF_EVEN); + t2("6.677529483504817634992289924634252287435032024E-1398276710", "-8.02352672161419209922046679721242087229537998864E+5636072179776", "-8.02352672161419209922046679721242087229537998864e+5636072179776", 60, RoundingMode.ROUND_FLOOR); + t2("1.00324334090313821425119773E+18162716", "-9.8311587249496686218477917338573149891E+4389576", "1.00324334090313821425119773e+18162716", 66, RoundingMode.ROUND_HALF_UP); + t2("-1.80675212281025983502183816255800130855681677499017073164E+38154248585736", "3.839745515139E+163721165580865", "3.839745515139e+163721165580865", 73, RoundingMode.ROUND_HALF_UP); + t2("-6.467118897564271943317E+31710530634", "-4.331781383544615507962118E+933", "-6.467118897564271943317e+31710530634", 54, RoundingMode.ROUND_HALF_UP); + t2("-2.00021771512644929873355287776353191315467611434075665555E-1268699717413292", "4.8989E+30374843", "4.8989e+30374843", 26, RoundingMode.ROUND_HALF_EVEN); + t2("4.7593360865E+590704292", "4.39E-602", "4.7593360865e+590704292", 14, RoundingMode.ROUND_DOWN); + t2("-2.5938885083523496740704149254713151E+49220864964", "1.811700261417346237315E+73185", "-2.5938885083523496740704149254713151e+49220864964", 35, RoundingMode.ROUND_HALF_UP); + t2("-7.4285E-5714", "-6.532075721513261186334596133875081264260077128E-2890085", "-7.4285e-5714", 5, RoundingMode.ROUND_DOWN); + t2("5.57351254343543582636699210879757142834691520880008862E-253659", "1.090332810401880412785395916897131E+7634050", "1.0903328104018804e+7634050", 17, RoundingMode.ROUND_HALF_UP); + t2("1.34759310826671526469601E-8181", "-72.38464556646799", "-7.238464556646799e+1", 48, RoundingMode.ROUND_FLOOR); + t2("1.5682248146079441047586601742341487542547034070484E+945939911", "4.79066844416290593239787E+824630834216", "4.79066844416290593239787000001e+824630834216", 30, RoundingMode.ROUND_CEIL); + t2("4.2383985061254134405021602500526708871317E+4881", "4.526045039605043193476", "4.23839850612541344050216025e+4881", 27, RoundingMode.ROUND_HALF_EVEN); + t2("1.599E-969990", "1.5975593E+4022964489627609", "1.59755930000000000000000000000000000000000000000000001e+4022964489627609", 54, RoundingMode.ROUND_CEIL); + t2("-7142119.720911165874810462516269453305725667289912712701", "-1.848408768057294511758173408760522534264253031503300E+8459", "-1.8484e+8459", 5, RoundingMode.ROUND_HALF_DOWN); + t2("7.037419557287745E+313", "7.05860865497331E-10810", "7.037419557287745e+313", 26, RoundingMode.ROUND_HALF_EVEN); + t2("4.56495E-5808318263076", "-2.91194632540987269142712896E+6924", "-2.91194632540987269142712896e+6924", 32, RoundingMode.ROUND_FLOOR); + t2("-9.8244430339083147076468477082627178751690687E+4254083643929", "-38621.038110350129118309575926520846538317922338", "-9.8244430339083147076468477082627178751690687e+4254083643929", 49, RoundingMode.ROUND_CEIL); + t2("-4.584909897360563298559054720592232664161817685E+628120", "-5.1917450941716E-190914", "-4.5849098973605632985590547205922326641618176850000000000000001e+628120", 62, RoundingMode.ROUND_FLOOR); + t2("8.03243446143872757E+211483377", "5.61727436301333E-260", "8.03243446143872757000000000000000000000000000000000000000001e+211483377", 60, RoundingMode.ROUND_CEIL); + t2("-4.827225749886953538495076813742475360224238189712524E-3303158225", "-6.71729542E-978132542253", "-4.82722574988695353849507681374247536022423818971e-3303158225", 48, RoundingMode.ROUND_CEIL); + t2("-5.649122235004848E+536", "2.68181547624628851020596865E+3343", "2.68181547624628851020596865e+3343", 67, RoundingMode.ROUND_HALF_EVEN); + t2("-2.6380E-4507628", "8.99487E-73271464863", "-2.638e-4507628", 61, RoundingMode.ROUND_HALF_EVEN); + t2("-4.929E+70234249851318", "5.627635992026919817804603195821345E-5786080113", "-4.929e+70234249851318", 20, RoundingMode.ROUND_HALF_EVEN); + t2("8.64202393453221450512127541149945167949410714E+565440368128", "6.33233383642357448522006484378656939213809E-1610829306794", "8.642023934532e+565440368128", 13, RoundingMode.ROUND_FLOOR); + t2("-5.92855144169776069339856502548175905921889095165203E-8082006", "-7.316449962573146326313114898373E+7824299", "-7.316449962573146326313114898373e+7824299", 43, RoundingMode.ROUND_HALF_UP); + t2("-5.85651314448476344633017015538879112075882122776671257E+6013591480", "4.26163133590791573434721691328064198300379701792739380E+6595493", "-5.85651314448476344633017015538879112075882122776671257e+6013591480", 62, RoundingMode.ROUND_UP); + t2("-3.164150183623036654534E+51875", "1.0331715804445681688E+698957", "1.0331715804445681688e+698957", 42, RoundingMode.ROUND_HALF_DOWN); + t2("9E+48483", "-7.214794132691567671310611996E+247698569870", "-7.21479413269156767131061199e+247698569870", 27, RoundingMode.ROUND_CEIL); + t2("-2.4216039528322470122855038816218344802073120714E+7506689889966981", "-9.0251413964597101E+352784708996694", "-2.4216039528322470122855038816218344802073120714e+7506689889966981", 56, RoundingMode.ROUND_HALF_DOWN); + t2("-0.000273294", "-2.455139510312E+6923306", "-2.455139510312e+6923306", 74, RoundingMode.ROUND_HALF_UP); + t2("-8.302800118630199459723591606687249E+98774131", "-95.478225292506152790138888725617720152620824243", "-8.302800118630199459723591606687249e+98774131", 74, RoundingMode.ROUND_HALF_DOWN); + t2("8.5388207560433728E-487531241199571", "4.6189690903892583097304455452838826E+122511151", "4.6189690903892583097304455452838826e+122511151", 47, RoundingMode.ROUND_DOWN); + t2("6.56365772838268429E+80232692861310", "9.64896627700934397894E+7824211", "6.563657728382684290000000000000000000000000000000000000001e+80232692861310", 58, RoundingMode.ROUND_UP); + t2("-2E+291838639227", "-8.0532964996850802E+8656261582854", "-8.0532964996850803e+8656261582854", 17, RoundingMode.ROUND_UP); + t2("-8.90E+4686", "-1E-7", "-8.900000000000000000000000000000000000000000000000001e+4686", 52, RoundingMode.ROUND_UP); + t2("4.402131638E-6217", "6146491945.8", "6.1464919458e+9", 36, RoundingMode.ROUND_DOWN); + t2("5.12097706894147087504468951401E+256864997288296", "-1.777884422157E+77650", "5.12097706894147087504468951401e+256864997288296", 44, RoundingMode.ROUND_HALF_EVEN); + t2("2.5811533962478340838808059474995493626E+982498068", "-5.6831181893984052911450512752979067947489E+8631", "2.5812e+982498068", 5, RoundingMode.ROUND_CEIL); + t2("-2.8734291715863002559123E+147", "6.25942844695424081412114007619833760502265344E+399756305", "6.259428446954240814121140076198337605022653439999999e+399756305", 52, RoundingMode.ROUND_FLOOR); + t2("6.9289577407962086513411E+107322", "4.8537743672675427493798440456781101916796E-99502", "6.9289577407962086513411e+107322", 35, RoundingMode.ROUND_HALF_EVEN); + t2("-5.061791767042498992573E+2309319519375", "7.642114490594556355251068470707459434284820307467411805810E+884217491", "-5.061791767042498992573e+2309319519375", 68, RoundingMode.ROUND_UP); + t2("4.8182518E-2515", "-4.83640399353409456275E+697526474723855", "-4.83640399353409456275e+697526474723855", 33, RoundingMode.ROUND_UP); + t2("-1.177038E-78878", "7.137322321377794375953981899619219081E+93515792", "7.13732232137779438e+93515792", 18, RoundingMode.ROUND_HALF_DOWN); + t2("8.0072790197256363087348481654E-886", "9.659444066130731326587575E+6881660627", "9.659444066130731326587575e+6881660627", 62, RoundingMode.ROUND_HALF_UP); + t2("-7.17670797285406422768223041889654735567494905100658013956648E+638026293", "-1.7E+60214", "-7.1767079728540642276822304188965473556749490510065801395664800000000000000000001e+638026293", 80, RoundingMode.ROUND_UP); + t2("-4.03388180749058619699003510605847924E+78545958", "4.3625456613499683721958241204896001040021717005325752328E+39364297178981", "4.3625456613499683721958241204896001040021717005325752328e+39364297178981", 58, RoundingMode.ROUND_HALF_UP); + t2("-2.972372382721668939819639679916327411826264121880723457E+1781010824756504", "9.71153144441156540627678120156141000907940917403794829825976E-573", "-2.972372382721668939819639679916327411826264121880723e+1781010824756504", 52, RoundingMode.ROUND_HALF_DOWN); + t2("1.862475926914447653233418227051858E+740720742", "6.8493448181126371550788106130738344303E-645359978319030", "1.862475926914447653233418227051858e+740720742", 40, RoundingMode.ROUND_HALF_EVEN); + t2("-5.578567892243038503277319633407036215243259262150063121E+594731667695", "-6.3517297363775545121884948155101764722841E+368781436541", "-5.57856789224303850327731963340703621524325927e+594731667695", 45, RoundingMode.ROUND_FLOOR); + t2("291.124807017175824801547138875810139596516418378", "-89.92102721555465498", "2.01203779801621169821547138875810139596516418378e+2", 77, RoundingMode.ROUND_HALF_DOWN); + t2("-8.509683427852276646670570409266557284828335318865907116E-39839", "1.557861459370794009408683571127872493667E-1255779494263298", "-9e-39839", 1, RoundingMode.ROUND_FLOOR); + t2("6.422043355924505799317111081083971466157E+3349989", "0.0033184335419253", "6.422043355924505799317111081083971466157000000000000000000000000000000000000001e+3349989", 79, RoundingMode.ROUND_CEIL); + t2("-84.367077976340", "-4.16576872870125019268679945E+84305", "-4.16576872870125019268679945001e+84305", 30, RoundingMode.ROUND_FLOOR); + t2("6.419442715248065526915355491681740863421E+6495050058826785", "-5.206680E+9281303", "6.419442715248065526915355491681740863421e+6495050058826785", 61, RoundingMode.ROUND_HALF_DOWN); + t2("-8.4088228473734913640627E+327", "-2.09574304941817920598E+6913681643", "-2.0957430494182e+6913681643", 14, RoundingMode.ROUND_HALF_UP); + t2("5.99446087297375E-7932", "-5.772420691411103390267667347783985689260171E+2767252", "-5.772420691411103390267667347783985689260171e+2767252", 75, RoundingMode.ROUND_HALF_UP); + t2("-6.41203656665513688375399802402278705152875299525431086826233E+979666858266955", "-4.27219E-380100827", "-6.4120365666551368837539980240227870515287529952543108682623e+979666858266955", 59, RoundingMode.ROUND_CEIL); + t2("-6.25902119991670457733749303467418929679599586332398460842E-174878", "-8.2780689664804985927E-64480593", "-6.25902119991670457733749303467418929679599586332398460842e-174878", 59, RoundingMode.ROUND_HALF_DOWN); + t2("9.8431309607901348197595528724708873E+49050", "1.15500901869589638010747292352285E+3911847", "1.15500901869589638010747292352285e+3911847", 56, RoundingMode.ROUND_FLOOR); + t2("-2.12106081580260210255945848745137201793581158315964E+25131294640592", "-7.85165105852117376421049993408929860044848E+444126704454", "-2.1210608158026021025594584874513720179e+25131294640592", 38, RoundingMode.ROUND_HALF_EVEN); + t2("2.226189547517E+773466371451", "7.0003089470039364E+4621403733677585", "7.00030894700393640000000000000000000000000000000000000000000000000000000000001e+4621403733677585", 78, RoundingMode.ROUND_UP); + t2("6.61443100729216275764908834386016575464653E+312916490935810", "9.43649732874441825128E-676693579", "6.614431007292162757649088343e+312916490935810", 28, RoundingMode.ROUND_DOWN); + t2("2.00316367455750763441863132393624952003E+1664776295953", "8.9041429682881927604452761496890904865503241514246712651051E-41", "2.00316367e+1664776295953", 9, RoundingMode.ROUND_HALF_UP); + t2("6.16310007323656E+923827938105", "-5.237117564730560853952E+2717", "6.163100073236559999999999999e+923827938105", 28, RoundingMode.ROUND_DOWN); + t2("7.973804113785698272010640978103310705492180197703029625E+426", "-1.616596006582394668283412445265827926465E+181546784669", "-1.616596006582394668283412445265827926465e+181546784669", 48, RoundingMode.ROUND_HALF_EVEN); + t2("4.4E+57", "3.99E+6199817", "3.9900000000000000000000000000000000000001e+6199817", 41, RoundingMode.ROUND_CEIL); + t2("6.407773391879524E-624218926406576", "5.864631545659357543848307123243933897691521705569062751724E-51503787491", "5.8646e-51503787491", 5, RoundingMode.ROUND_DOWN); + t2("-2.364965462745980617994777296333455262151884322083226414E+1213629023", "-3.79453064026732668425808079905E+2673033", "-2.365e+1213629023", 4, RoundingMode.ROUND_HALF_UP); + t2("-5.62345042766371782919812370405114004564152137E-141", "-1.8069303919949469931013818326394724624E-63", "-1.8069303919949469931013818326394724624e-63", 69, RoundingMode.ROUND_HALF_EVEN); + t2("7.19796265933963494574706299811E+83107792", "5.37310896774246898951619110285502982706E+68306410255", "5.3731089677424689895161911028550298270600000000000000000000001e+68306410255", 62, RoundingMode.ROUND_CEIL); + t2("6.60297728E+9963", "9.4213714886539761623977E+394199349", "9.421371488e+394199349", 10, RoundingMode.ROUND_FLOOR); + t2("-8.47595362473254148933622419130878331368251361E+2400722106", "-9.52465269051174472096029260815165200339158227E+8041815834545", "-9.5246526905118e+8041815834545", 14, RoundingMode.ROUND_FLOOR); + t2("4.4656488642942594963839E+373796430679938", "-1.056640657382110218E+3128091", "4.4656488642942594963839e+373796430679938", 63, RoundingMode.ROUND_HALF_EVEN); + t2("6.7297112E-73453", "5.0386353730752848497832812296405428989277853279570314153E-394223256223534", "6.72971120000000000000000000000000000000000000000000001e-73453", 54, RoundingMode.ROUND_CEIL); + t2("2.84839799575E+623615817625", "5.50889327941821228297829749394910904479858259360828E+7798477", "2.84839799575e+623615817625", 30, RoundingMode.ROUND_HALF_DOWN); + t2("2.07068453940E+4906058175651", "-4.508495233170590884E+8233", "2.07e+4906058175651", 3, RoundingMode.ROUND_HALF_UP); + t2("6.76396620108847357118847693333451331E+491605", "2.791082362780758603053178517336857867402793002307167849E+3596", "6.76396620108847357118847693334e+491605", 30, RoundingMode.ROUND_CEIL); + t2("-5.0645434564003444438468E+6344", "1.984E+5910981958", "1.98399999999999999999999e+5910981958", 24, RoundingMode.ROUND_FLOOR); + t2("-1.651695591500904E+118915709719", "2.93926765163691371499680590478E+492564945217", "2.93926765163691371499680590478e+492564945217", 40, RoundingMode.ROUND_HALF_UP); + t2("7E-836803474", "4.791582739946E+366882796783", "4.791582739946e+366882796783", 60, RoundingMode.ROUND_HALF_DOWN); + t2("-4.72160666280E+23484590", "7.33136321653969173774205876750E+90080", "-4.7216066628e+23484590", 27, RoundingMode.ROUND_HALF_UP); + t2("5.57904842681446727324E-69190592808", "-17.918415343989609375257262175893344195530635918723369165", "-1.791841534398960937525726217589334419553064e+1", 43, RoundingMode.ROUND_HALF_DOWN); + t2("4.563266233542410668424258176720105070E+7046704441902", "-5.700E+82397532290", "4.56326623354241066842425817672010507e+7046704441902", 60, RoundingMode.ROUND_HALF_EVEN); + t2("7.698906499359180629654244E+34137", "1.20483887475046673151612268808663688597266E+8611324064", "1.204838874750466731516122688086636886e+8611324064", 37, RoundingMode.ROUND_HALF_EVEN); + t2("8.44580825136855356627150417912859140889386281884686612892931E+4770", "-6.744664458952416199794371843229337722429516E+4541615", "-6.7e+4541615", 2, RoundingMode.ROUND_HALF_DOWN); + t2("3.1569652506796065351705526396160648867426528048027430959087E+26547", "-4.989994E+61342", "-4.989994e+61342", 36, RoundingMode.ROUND_HALF_DOWN); + t2("9.62508871777897399988555008669904E-5128244", "-9.3321340E+2418196670", "-9.33213399999999999999999999999999999999999999999999999999999999999999999999e+2418196670", 75, RoundingMode.ROUND_CEIL); + t2("1.05049542597264733425411022852426765E+85258", "-5.0188301016972641281185242503012E+7140229282", "-5.0188301016972641281185242503012e+7140229282", 76, RoundingMode.ROUND_HALF_DOWN); + t2("-0.23155200325363154603083821560839407666", "-1.191983215485E+86367116961620", "-1.1919832154850000000000000000000000000000000000000000000000000000000000000001e+86367116961620", 77, RoundingMode.ROUND_UP); + t2("6.577296990559E-3569926217661", "1.89097325994409302057883856628223469536E+6101204", "1.890973259944093020578838566282234695360000000000000000000000000001e+6101204", 67, RoundingMode.ROUND_CEIL); + t2("7E+8031229", "4.05349021928512412448845923836308834593E+297765528415", "4.053490219285124124488e+297765528415", 22, RoundingMode.ROUND_DOWN); + t2("-6.20526072758893684201403135481280705447918196549080710989E+721750762", "6.468211363736011041528394819884E+7049631408", "6.468211363736011041528394819884e+7049631408", 70, RoundingMode.ROUND_UP); + t2("5.77864067417853822250311418757717518211106638198899844E+75405982757", "4.458E+9331399499959", "4.458e+9331399499959", 73, RoundingMode.ROUND_HALF_UP); + t2("-3.5890615418212225883486026221245704777866326281771080336057E+736", "-3.10899334878902412E-451", "-3.589061541821222588348602622124570477e+736", 37, RoundingMode.ROUND_CEIL); + t2("3.80504878191229324354011932160391143603E+2032224", "6.57240456626171385593681865143840308158898900925449E+4774791267621", "6.57240456626171385593681865143840308158898900925449e+4774791267621", 65, RoundingMode.ROUND_HALF_UP); + t2("9.6610172921069549979395883660358763791806249868652E+4869", "-4.044922249E+27423985", "-4.044922248e+27423985", 10, RoundingMode.ROUND_CEIL); + t2("-3.23441338692447615E+731667319946640", "1.6564004817431066315512571583E+8737112727", "-3.234413e+731667319946640", 7, RoundingMode.ROUND_DOWN); + t2("5.32E+687286785614", "3.84454572069275180741366546137713388314265322533246334048E+20663709", "5.32e+687286785614", 49, RoundingMode.ROUND_HALF_UP); + t2("8.8207743377180485184933796865273E+2818", "156708.35111610655960356251113", "8.8207743377180485185e+2818", 21, RoundingMode.ROUND_CEIL); + t2("8.07600E-3167114890609796", "4.49379785612193203546441944699154417651288200E-67617878473229", "4.493797856121932035464419446991544176512882e-67617878473229", 55, RoundingMode.ROUND_DOWN); + t2("-9.66660328901624012717348158441891393E-1614", "7.31E-629961403", "-9.6666032890162401271734815844189139e-1614", 35, RoundingMode.ROUND_HALF_EVEN); + t2("2.12254666498470963829759595300436242711E+966104378854970", "9.071274948263947819068114449605E+6819759", "2.122546664984709638297596e+966104378854970", 25, RoundingMode.ROUND_CEIL); + t2("8.496919048E-31325", "-2.566E+709415962476", "-2.566e+709415962476", 69, RoundingMode.ROUND_HALF_UP); + t2("8.306712361416869109630518877958672E+323737", "-7.9951255548188953895539E+783959319", "-7.9951255548188953895539e+783959319", 54, RoundingMode.ROUND_FLOOR); + t2("-6.681886785165379127381E+9275", "1.0726545292422254866258191427482759408534602693264821059E+1989743", "1.072654529242225486625819142748275940853460269326482105899999999999e+1989743", 67, RoundingMode.ROUND_FLOOR); + t2("-6.728802075E+876107948", "7.3512384720247429540931554335845784511696731313599649E+150584118891", "7.35123847202474295409315543358457845116967313136e+150584118891", 50, RoundingMode.ROUND_HALF_EVEN); + t2("-28.81037133826276750", "5.1936556447492191735350890130856026298360983970431E+2249", "5.19365564474921917353508901308560262983609839e+2249", 45, RoundingMode.ROUND_FLOOR); + t2("7.10099910618603162602913895464216183877374670763177E-664701", "2.9497134176736888244719710189373062001792229363001946E-7040302304129787", "7.10099910618603162602913895464216183877374670763177e-664701", 69, RoundingMode.ROUND_DOWN); + t2("1.64175944015415812140933751787E+444", "1.2954473668084313244420E+223426141", "1.295447366808431324442e+223426141", 62, RoundingMode.ROUND_HALF_DOWN); + t2("6.581535322866298020044368782141255E+70", "-5.62744989463671461270153048386765E+284644000508", "-5.62744989e+284644000508", 9, RoundingMode.ROUND_HALF_EVEN); + t2("6.0512562041716870055332392106040106E+2357992", "63003817715628643691298785558004.2909447940061335543016897566", "6.0512562041716870055332392106040106e+2357992", 38, RoundingMode.ROUND_FLOOR); + t2("1.06688046725342509E+2896110354804", "1.716332293516042191413285237950474221E+61590174884072", "1.716332294e+61590174884072", 10, RoundingMode.ROUND_CEIL); + t2("-1.512451018475257876277127821968523125838297056202426270213E+3144717232", "-18738205.4490511337042595567871167004228561726499011786", "-1.512451018475257876277127821968523125838297056202426270213e+3144717232", 60, RoundingMode.ROUND_CEIL); + t2("4886.4347871", "9.151247525058993769771469427723658911334614944817E+134177", "9.151247525059e+134177", 14, RoundingMode.ROUND_HALF_UP); + t2("-3.094340E+554283948", "5.0768121656851995197401968847961083039099467E+8108", "-3.09434e+554283948", 15, RoundingMode.ROUND_FLOOR); + t2("5.6313414235294575732096707798E-31287", "8.8E+79835", "8.8e+79835", 31, RoundingMode.ROUND_FLOOR); + t2("-5.3E+574998754356951", "-1.69638098336E-58755671610", "-5.3000000000000000000000000000000000000000000001e+574998754356951", 47, RoundingMode.ROUND_UP); + t2("-8.792120704243169221963458368538849883234893489905922752388E+587", "7.49572234668198069505142815588526899353E+567570708", "7.5e+567570708", 3, RoundingMode.ROUND_HALF_UP); + t2("-2.33920259118167E+50114", "6.78548455924243699957687591127497874706583278840772902107E+634851546479226", "6.7854845592424369995e+634851546479226", 20, RoundingMode.ROUND_FLOOR); + t2("-3.646645421734242504698443629037473098514801281E+650392548649896", "9.96492526364441139607916306374819748246849068534981018489926E-62440", "-3.64664542173424250469844362903747309851480128099999999999e+650392548649896", 57, RoundingMode.ROUND_CEIL); + t2("9.5102722654268157800697653108392846930298E-47263", "-9.0610824786E+91453766140531", "-9.0610824786e+91453766140531", 78, RoundingMode.ROUND_HALF_UP); + t2("-5.831689E+777404", "7.622159514755800E-3478851665170356", "-5.831689e+777404", 70, RoundingMode.ROUND_UP); + t2("-39.80065889251010300744667", "1.514895557005345609827084129E+713371460278", "1.514896e+713371460278", 7, RoundingMode.ROUND_HALF_UP); + t2("-7.149679568403758452881575701400163658449105777641515E+127502583928", "3.822698618550147519252184348622514773822087862894E+4545853236", "-7.149679568403758452881575701400163658449105777641515e+127502583928", 72, RoundingMode.ROUND_HALF_EVEN); + t2("-3.745E+24544", "3.375497742775844691015092354361010E+120", "-3.745e+24544", 49, RoundingMode.ROUND_HALF_DOWN); + t2("-3.60348795228017780049569753533186294E+499", "8.80786821E+82223318", "8.80786821e+82223318", 28, RoundingMode.ROUND_UP); + t2("-9.8967145096522848735804634E+98677519", "-8.39861E+5784323495519916", "-8.39e+5784323495519916", 3, RoundingMode.ROUND_DOWN); + t2("-5.54480709948277E-718373854", "-7.119627881088288640389987E-896127305535", "-5.54480709948277e-718373854", 56, RoundingMode.ROUND_HALF_EVEN); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalPowSqrtTests.cs b/DecimalSharp.Tests/BigDecimalPowSqrtTests.cs new file mode 100644 index 0000000..f18a758 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalPowSqrtTests.cs @@ -0,0 +1,62 @@ +using DecimalSharp.Core; +using DecimalSharp.Tests.Extensions; +using NUnit.Framework; +using System; +using System.Globalization; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalPowSqrt")] + public class BigDecimalPowSqrtTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void PowSqrt() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + Random random = new Random(); + + string n; + for (var i = 0; i < 1000; i++) + { + + // Get a random value in the range [0,1) with a random number of significant digits + // in the range [1, 40], as a string in exponential format. + var e = bigDecimalFactory.Random((long)(random.NextDouble() * 40 + 1) | 0).ToExponential(); + + // Change exponent to a non-zero value of random length in the range (-9e15, 9e15). + var r = bigDecimalFactory.BigDecimal(e.Slice(0, e.IndexOf('e') + 1) + (random.NextDouble() < 0.5 ? '-' : "") + + (n = Math.Floor(random.NextDouble() * 9e15).ToString(CultureInfo.InvariantCulture)).Substring((int)(random.NextDouble() * n.Length) | 0)); + //console.log(' r: ' + r); + + // Random rounding mode. + bigDecimalFactory.Config.Rounding = (RoundingMode)((int)(random.NextDouble() * 9) | 0); + + // Random precision in the range [1, 40]. + bigDecimalFactory.Config.Precision = (long)(random.NextDouble() * 40 + 1) | 0; + + var p = r.Pow(0.5); + //console.log(' r.pow(0.5): ' + p); + + // sqrt is much faster than pow(0.5) + var s = r.Sqrt(); + //console.log(' r.sqrt(): ' + s); + + BigDecimalTests.assertEqual(p.ValueOf(), s.ValueOf()); + } + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalPowTests.cs b/DecimalSharp.Tests/BigDecimalPowTests.cs new file mode 100644 index 0000000..32b1d9e --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalPowTests.cs @@ -0,0 +1,160 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalPow")] + public class BigDecimalPowTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Pow() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument @base, BigDecimalArgument exp, string expected, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(@base, config).Pow(exp).ValueOf()); + }; + + t("9", "0.5", "3", 7, RoundingMode.ROUND_HALF_UP); + t("9", "0.5", "3", 26, RoundingMode.ROUND_HALF_UP); + t("0.9999999999", "6", "0.999999999400000000149999999980000000001", 39, RoundingMode.ROUND_HALF_UP); + t("2.56", "6.5", "450.3599627370496", 16, RoundingMode.ROUND_DOWN); + t("1.96", "1.5", "2.744", 15, RoundingMode.ROUND_DOWN); + t("2.25", "9.5", "2216.8378200531005859375", 23, RoundingMode.ROUND_DOWN); + t("11.05", "2.00000000000000007", "122.103", 6, RoundingMode.ROUND_HALF_UP); + t("10.5", "3.000000000000000002", "1157.63", 6, RoundingMode.ROUND_HALF_UP); + t("1.00000000000000000003", "4.00000005", "1.000000000000000000120000002", 28, RoundingMode.ROUND_HALF_UP); + t("6.0000005", "1.00000000000000006", "6.000001", 7, RoundingMode.ROUND_HALF_UP); + t("1.0000000000000000000005", "49.0000000000000000000002", "1.000000000000000000025", 22, RoundingMode.ROUND_HALF_UP); + t("15.333333333333333333", "28.33333333333333", "3917746643938779840069598486694964.98308568625045", 49, RoundingMode.ROUND_HALF_UP); + t("7.537714", "7.9", "8515169.08260507715975", 21, RoundingMode.ROUND_HALF_UP); + t("6.951", "9.225", "58598464.57", 10, RoundingMode.ROUND_HALF_UP); + t("6.01093", "9.8911", "50651225.3819968681522216250662534915", 36, RoundingMode.ROUND_HALF_UP); + t("8.7587", "4.23", "9694.37298592397372", 18, RoundingMode.ROUND_HALF_UP); + t("5.1749", "7.7267995", "328229.2815443039852", 19, RoundingMode.ROUND_HALF_UP); + t("0.16", "-0.9999999999999", "6.2", 2, RoundingMode.ROUND_HALF_UP); + t("0.4", "-20", "90949470.1772928237915039063", 27, RoundingMode.ROUND_HALF_UP); + t("0.5", "22", "0.000000238418579101563", 15, RoundingMode.ROUND_HALF_UP); + t("32", "0.4", "4", 1, RoundingMode.ROUND_HALF_UP); + t("4", "2.5", "32", 11, RoundingMode.ROUND_HALF_UP); + t("4", "5.5", "2048", 27, RoundingMode.ROUND_HALF_UP); + t("16", "23.5", "19807040628566084398385987584", 29, RoundingMode.ROUND_HALF_UP); + t("16", "26.5", "81129638414606681695789005144064", 35, RoundingMode.ROUND_HALF_UP); + t("25", "13.5", "7450580596923828125", 39, RoundingMode.ROUND_HALF_UP); + t("32", "28.2", "2787593149816327892691964784081045188247552", 43, RoundingMode.ROUND_HALF_UP); + t("32", "3.6", "262144", 35, RoundingMode.ROUND_HALF_UP); + t("25", "21.5", "1136868377216160297393798828125", 31, RoundingMode.ROUND_HALF_UP); + t("9", "8.5", "129140163", 19, RoundingMode.ROUND_HALF_UP); + t("4", "7.5", "32768", 13, RoundingMode.ROUND_HALF_UP); + t("4", "6.5", "8192", 10, RoundingMode.ROUND_HALF_UP); + t("6.034", "0.25964", "2", 1, RoundingMode.ROUND_HALF_UP); + t("9", "4.5", "19683", 16, RoundingMode.ROUND_HALF_UP); + t("9", "1.5", "27", 5, RoundingMode.ROUND_HALF_UP); + t("9.61", "3.5", "2751.2614111", 12, RoundingMode.ROUND_HALF_UP); + t("4", "6.5", "8192", 8, RoundingMode.ROUND_HALF_UP); + t("4", "7.5", "32768", 11, RoundingMode.ROUND_HALF_UP); + t("9", "4.5", "19683", 5, RoundingMode.ROUND_HALF_UP); + + t("48.9262695992662373981", "1.0", "48.926269599266237", 17, RoundingMode.ROUND_DOWN); + t("1.21", "0.5", "1.1", 2, RoundingMode.ROUND_DOWN); + t("12.96", "0.5", "3.6", 2, RoundingMode.ROUND_FLOOR); + t("3.24", "0.5", "1.8", 2, RoundingMode.ROUND_DOWN); + t("70.56", "0.5", "8.4", 2, RoundingMode.ROUND_FLOOR); + t("4.41", "6.5", "15447.2377739119461", 32, RoundingMode.ROUND_FLOOR); + t("11.05", "2.00000000000000007", "122.103", 6, RoundingMode.ROUND_HALF_UP); + t("10.5", "3.000000000000000002", "1157.63", 6, RoundingMode.ROUND_HALF_UP); + t("1.00000000000000000003", "4.00000005", "1.000000000000000000120000002", 28, RoundingMode.ROUND_HALF_UP); + t("6.0000005", "1.00000000000000006", "6.000001", 7, RoundingMode.ROUND_HALF_UP); + t("1.0000000000000000000005", "49.0000000000000000000002", "1.000000000000000000025", 22, RoundingMode.ROUND_HALF_UP); + t("5344.87762641765349023882127126550721", "1.0625", "9139.7407411741874683083843738640173291", 38, RoundingMode.ROUND_DOWN); + t("28", "6.166675020000903537297764507632802193308677149", "839756321.64088511", 17, RoundingMode.ROUND_UP); + t("91.180153837", "0.5", "9.54882997214842023704943457512609", 33, RoundingMode.ROUND_DOWN); + t("16", "26.5", "81129638414606681695789005144064", 35, RoundingMode.ROUND_HALF_UP); + t("25", "13.5", "7450580596923828125", 39, RoundingMode.ROUND_HALF_UP); + t("4.3985903", "20.9956530307", "32120869378609.033520730996715368034448124619", 44, RoundingMode.ROUND_CEIL); + t("2.858368", "48.97", "21682301291468972839895.193017121528607658932", 44, RoundingMode.ROUND_HALF_DOWN); + t("91.145", "23.8479557348417627", "54402923894673605836306983589686900000000000000", 33, RoundingMode.ROUND_DOWN); + + t("5.379973182", "2.65", "86.4", 3, RoundingMode.ROUND_HALF_EVEN); + t("625", "4.5", "3814697265625", 13, RoundingMode.ROUND_UP); + t("65536", "1.25", "1048576", 7, RoundingMode.ROUND_HALF_DOWN); + t("9", "1.5", "27", 2, RoundingMode.ROUND_HALF_FLOOR); + t("256", "1.625", "8192", 4, RoundingMode.ROUND_HALF_FLOOR); + t("65536", "1.875", "1073741824", 10, RoundingMode.ROUND_HALF_EVEN); + t("65536", "2.5", "1099511627776", 13, RoundingMode.ROUND_DOWN); + t("625", "5.25", "476837158203125", 15, RoundingMode.ROUND_HALF_UP); + + t("0.16", "-0.9999999999999", "6.2", 2, RoundingMode.ROUND_HALF_UP); + t("3.6361", "-0.06", "0.92547", 5, RoundingMode.ROUND_HALF_UP); + t("8.7881541", "-0.00000006", "0.999999869595727123998", 22, RoundingMode.ROUND_HALF_UP); + t("5.812", "-0.99999", "0.17206083953928505581714758136682954", 35, RoundingMode.ROUND_HALF_UP); + t("6.06737421654397", "-0.000000000001", "0.99999999999819707407228698", 26, RoundingMode.ROUND_HALF_UP); + t("5.57197470953405387", "-0.9", "0.213", 3, RoundingMode.ROUND_HALF_UP); + t("8.4297580531324", "-0.000000000000002", "0.99999999999999573646385819", 26, RoundingMode.ROUND_HALF_UP); + t("1.746122696164", "-0.9", "0.605526", 6, RoundingMode.ROUND_HALF_UP); + t("5.74274073282643192871", "-0.000000000000004", "0.999999999999993008253696156596264156", 36, RoundingMode.ROUND_HALF_UP); + t("9.66306878602393217324", "-0.999", "0.1037217997755957147", 19, RoundingMode.ROUND_HALF_UP); + t("5", "-0.9999999", "0.200000032188760838972540436", 28, RoundingMode.ROUND_HALF_UP); + + t("21.8005326254960840089", "14.99999999999999999999", "119400615273418803650.1362563340821916898208389", 46, RoundingMode.ROUND_HALF_UP); + t("46.80102307015", "4.000001", "4797589.19437982876031", 21, RoundingMode.ROUND_HALF_UP); + t("29.255206217375", "9.9999999999999999999999999", "459231465846284.22207", 20, RoundingMode.ROUND_HALF_UP); + t("0.72591761772", "6.999999999999999999999", "0.106221237503302998", 18, RoundingMode.ROUND_HALF_UP); + t("0.3928066161887", "32.0002", "0.00000000000010319062643292561810866879769121849802", 38, RoundingMode.ROUND_HALF_UP); + t("24.798046085018648753453", "5.9999999999999999", "232543806.207", 12, RoundingMode.ROUND_HALF_UP); + t("20.485568584242", "18.99999999999999999999999", "8270131718672851271097903.87621818958353436851582", 48, RoundingMode.ROUND_HALF_UP); + t("969.0", "-1", "0.0010319917440660474716202", 23, RoundingMode.ROUND_HALF_UP); + t("8.97", "-1", "0.111482720178", 12, RoundingMode.ROUND_FLOOR); + t("61766796871807246.3278075", "-1", "0.00000000000000001618993", 7, RoundingMode.ROUND_UP); + + t("-1", "101", "-1", 100, RoundingMode.ROUND_DOWN); + t("-1", "9999999999999999999999999999999999999999999999999999999999999999999999999", "-1", 100, RoundingMode.ROUND_DOWN); + t("-1", "1e307", "1", 100, RoundingMode.ROUND_DOWN); + t("-1", "1e309", "1", 100, RoundingMode.ROUND_DOWN); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("9.9999999999999", "2220.75", "5.623413251778e+2220", 13, RoundingMode.ROUND_DOWN); + t("0.9999999999999999991999999999019999949909999999", "2220.75", "9.999999999999982233999997e-1", 25, RoundingMode.ROUND_DOWN); + t("987504387560932846509387650789.49807365", "981459.4903857", "9.876e+29438424", 4, RoundingMode.ROUND_HALF_UP); + + t("-2", "1001", "-2.1430172143725346418e+301", 20, RoundingMode.ROUND_DOWN); + t("-2", 1e6, "9.9006562292958982506979236164e+301029", 29, RoundingMode.ROUND_UP); + + t("5.0771598579583468811E-101844", "7064449.87442997380369702938801116641723585825702571602", "3.907934864857193219594361275098983e-719466848189", 34, RoundingMode.ROUND_DOWN); + t("5.80246472674775E+21125581", "0.00077726506294426495082193497633668602085", "1.5018938138904125617523547e+16420", 26, RoundingMode.ROUND_FLOOR); + t("1.66630944E+74", "6980757669.9081156729942256", "3.74152e+518124090060", 6, RoundingMode.ROUND_HALF_DOWN); + t("5.9E+6", "3456.7700", "1.8971788927235700943477592799711063194e+23405", 38, RoundingMode.ROUND_UP); + t("93720986.7819907489497420190553708041564963922285117", "39.580", "3.3e+315", 2, RoundingMode.ROUND_DOWN); + t("908948247.896330216349750387912923575076135766138", "11.38907521122213262858256836", "1.0702278292293091784680297675223031e+102", 35, RoundingMode.ROUND_FLOOR); + t("4.485925762349120387154391E+47", "1677945.16766265206929939", "8.53959030215133943e+79957194", 18, RoundingMode.ROUND_HALF_DOWN); + t("2.8448989811706207675566E+89", "2.368592228588521845032068137267440272102614", "7.58940197453762187722508511706932e+211", 33, RoundingMode.ROUND_HALF_DOWN); + + /*t("0.9999999999999999", "-1e+30", "1.530863912e+43429448190325", 10, RoundingMode.ROUND_DOWN); + t("0.9999999999999999999999999999999999999999999999999", "-1e+32", "1.00000000000000001000000000000000005e+0", 36, RoundingMode.ROUND_DOWN); + t("0.9999999999999999", "-1e+50", "Infinity", 40, RoundingMode.ROUND_DOWN); + t("0.9999999999999999999999999999999899999999999999994403269002375809806554775739676251993670310626872684", "-1.49181945463118148622657269735650603014891811120124843379694396257337810020127409048127397077199569e+271", "Infinity", 100, RoundingMode.ROUND_DOWN); + */ + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalRandomTests.cs b/DecimalSharp.Tests/BigDecimalRandomTests.cs new file mode 100644 index 0000000..c5961c7 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalRandomTests.cs @@ -0,0 +1,44 @@ +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalRandom")] + public class BigDecimalRandomTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Random() + { + var bigDecimalFactory = new BigDecimalFactory(); + + Random random = new Random(); + + var maxDigits = 100; + + for (var i = 0; i < 996; i++) + { + var sd = (long)(random.NextDouble() * maxDigits + 1) | 0; + + BigDecimal r; + if (random.NextDouble() > 0.5) + { + bigDecimalFactory.Config.Precision = sd; + r = bigDecimalFactory.Random(); + } + else + { + r = bigDecimalFactory.Random(sd); + } + + BigDecimalTests.assert(r.Sd() <= sd && r.Gte(0) && r.Lt(1) && r.Eq(r) && r.Eq(r.ValueOf())); + } + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalRoundTests.cs b/DecimalSharp.Tests/BigDecimalRoundTests.cs new file mode 100644 index 0000000..ba1dad8 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalRoundTests.cs @@ -0,0 +1,543 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalRound")] + public class BigDecimalRoundTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Round() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Round().ValueOf()); + }; + + t("Infinity", "Infinity", RoundingMode.ROUND_HALF_UP); + t("-Infinity", "-Infinity", RoundingMode.ROUND_HALF_UP); + t("NaN", "NaN", RoundingMode.ROUND_HALF_UP); + + t("0", "0", RoundingMode.ROUND_HALF_UP); + t("-0", "-0", RoundingMode.ROUND_HALF_UP); + t("1", "1", RoundingMode.ROUND_HALF_UP); + t("-1", "-1", RoundingMode.ROUND_HALF_UP); + t("0", "0.1", RoundingMode.ROUND_HALF_UP); + t("-0", "-0.1", RoundingMode.ROUND_HALF_UP); + t("0", "1e-9000000000000000", RoundingMode.ROUND_HALF_UP); + t("-0", "-1e-9000000000000000", RoundingMode.ROUND_HALF_UP); + t("9.999e+9000000000000000", "9.999e+9000000000000000", RoundingMode.ROUND_HALF_UP); + t("-9.999e+9000000000000000", "-9.999e+9000000000000000", RoundingMode.ROUND_HALF_UP); + + t("6.88054606464877886407425549768282761571350053022023236e+53", "6.880546064648778864074255497682827615713500530220232351811172615965890936e+53", RoundingMode.ROUND_UP); + t("9.51833733815343753238388e+23", "9.51833733815343753238387581003146664685764843969081033323613e+23", RoundingMode.ROUND_HALF_DOWN); + t("4.434086046379498022164479619323e+30", "4.4340860463794980221644796193222113345e+30", RoundingMode.ROUND_UP); + t("913844451463", "913844451463.2968716291911429329", RoundingMode.ROUND_HALF_UP); + t("4.124227112152123941928547272459545727985864897598835e+51", "4.1242271121521239419285472724595457279858648975988352729535839522490471492602734474826e+51", RoundingMode.ROUND_FLOOR); + t("4.63429955102358262449651440722058050134341793502231565647729228272e+65", "4.634299551023582624496514407220580501343417935022315656477292282722482758912005500689831e+65", RoundingMode.ROUND_FLOOR); + t("28923471241", "28923471241.98034587766743552", RoundingMode.ROUND_DOWN); + t("4521981137129745", "4521981137129744.67989385131579785422314397", RoundingMode.ROUND_UP); + t("1.757029854153590067583921300868154608080526623790036985862257948987889309489e+76", "1.7570298541535900675839213008681546080805266237900369858622579489878893094889309687763293350816e+76", RoundingMode.ROUND_CEIL); + t("7.92779841419157112811950427049997777808175311282606971649180221573863785195e+74", "7.92779841419157112811950427049997777808175311282606971649180221573863785194619091321130332110043278383964781191e+74", RoundingMode.ROUND_HALF_EVEN); + t("4.8046702619549660118837319476958242e+34", "4.80467026195496601188373194769582420063536104857816444372396235915e+34", RoundingMode.ROUND_HALF_EVEN); + t("16604074202686788", "16604074202686787.6", RoundingMode.ROUND_UP); + t("2.03054429543856309099719183163085279314546339909457784263114937593e+67", "2.0305442954385630909971918316308527931454633990945778426311493759300288903340472095271466713787146011e+67", RoundingMode.ROUND_DOWN); + t("30559986845", "30559986844.828104310332245126047", RoundingMode.ROUND_HALF_DOWN); + t("3.169159034649715925059423431889057069973085990306134577512910339e+63", "3.16915903464971592505942343188905706997308599030613457751291033998309334924157348709083e+63", RoundingMode.ROUND_DOWN); + t("2.74536925513947196644678859506681278043361770523611795129e+56", "2.74536925513947196644678859506681278043361770523611795129033731273249555974944131605156319693351e+56", RoundingMode.ROUND_DOWN); + t("3.836711661609490207325966566e+27", "3.83671166160949020732596656539593198724761580767321062612029068e+27", RoundingMode.ROUND_CEIL); + t("9.5917250469401862241299735910188523300291350099849e+49", "9.591725046940186224129973591018852330029135009984930929359628823555090675843e+49", RoundingMode.ROUND_FLOOR); + t("21333682", "21333681.9", RoundingMode.ROUND_UP); + t("8.62022856983460008434772295e+26", "8.62022856983460008434772295e+26", RoundingMode.ROUND_FLOOR); + t("68042277", "68042276.936331", RoundingMode.ROUND_HALF_UP); + t("4.8750036651483452171308023e+25", "4.875003665148345217130802304e+25", RoundingMode.ROUND_HALF_DOWN); + t("1.3591935058296677548790388717577585193715249e+43", "1.35919350582966775487903887175775851937152497849507394160868e+43", RoundingMode.ROUND_DOWN); + t("4129", "4128.8573915082798234283182739502433923", RoundingMode.ROUND_CEIL); + t("6.25825257883805843076111330243671881564726599e+44", "6.2582525788380584307611133024367188156472659814623144865497e+44", RoundingMode.ROUND_UP); + t("2.073939185723766359554288e+24", "2.0739391857237663595542878001922882482361918639e+24", RoundingMode.ROUND_HALF_EVEN); + t("5.145015399473362034445178801296467411193767021458e+48", "5.1450153994733620344451788012964674111937670214584134294502818008587093553744e+48", RoundingMode.ROUND_HALF_UP); + t("3.7741249292961331651914274171432415480188820147e+46", "3.7741249292961331651914274171432415480188820147914167e+46", RoundingMode.ROUND_FLOOR); + t("2.5907197709663090692786288643e+28", "2.59071977096630906927862886428517500364162734e+28", RoundingMode.ROUND_HALF_UP); + t("6.5019848918413133548151232394242295281947013425358575908400718513465e+67", "6.5019848918413133548151232394242295281947013425358575908400718513464661016174107270809281124152327737993e+67", RoundingMode.ROUND_HALF_UP); + t("6.5654656243131424283006345840695185206252e+40", "6.56546562431314242830063458406951852062516491733e+40", RoundingMode.ROUND_HALF_UP); + t("7.14296188550926336386536585191594379995651640918449914847192e+59", "7.1429618855092633638653658519159437999565164091844991484719191390713140556399248288684716160792764e+59", RoundingMode.ROUND_UP); + t("1.65831307344278205652667503e+26", "1.6583130734427820565266750303412035297508422789795074468453e+26", RoundingMode.ROUND_FLOOR); + t("1.03868076642005814047021881e+26", "1.038680766420058140470218801950252025537802241e+26", RoundingMode.ROUND_CEIL); + t("346", "346.452605374950482582868219", RoundingMode.ROUND_HALF_UP); + t("181439315463425985534", "181439315463425985534.25865844894077275430318757", RoundingMode.ROUND_FLOOR); + t("8113502102248864193", "8113502102248864193.4", RoundingMode.ROUND_HALF_EVEN); + t("2.0396642160540139112491673463348213536632845904136202928864236188830882179e+73", "2.0396642160540139112491673463348213536632845904136202928864236188830882178287498700128363702734e+73", RoundingMode.ROUND_UP); + t("57217688166662318", "57217688166662318.14978073061366795927750180227408203205", RoundingMode.ROUND_DOWN); + t("1.3263967367823644477766479033175434612e+37", "1.32639673678236444777664790331754346122524765959079128749150122574912710232e+37", RoundingMode.ROUND_HALF_EVEN); + t("4.097858435839183181158056560760949599139954068194535406240460058272877614656e+75", "4.0978584358391831811580565607609495991399540681945354062404600582728776146564387e+75", RoundingMode.ROUND_DOWN); + t("9.53862376611854437580813e+23", "9.5386237661185443758081265964082575366510636210576058e+23", RoundingMode.ROUND_CEIL); + t("9.49667001930609829678887507025575441813606832788e+47", "9.49667001930609829678887507025575441813606832787403591376232279326592e+47", RoundingMode.ROUND_UP); + t("6.10292467565130496104458878537476362133917639257694305498260179044673420925478e+77", "6.102924675651304961044588785374763621339176392576943054982601790446734209254780222e+77", RoundingMode.ROUND_HALF_EVEN); + t("1.3569526432875110743338e+22", "1.3569526432875110743338802291960156552161e+22", RoundingMode.ROUND_DOWN); + t("37621189552", "37621189552.4548804003545304449", RoundingMode.ROUND_HALF_UP); + t("3.7760257582328104673720218606494623716708788e+43", "3.776025758232810467372021860649462371670878868908226307307668506118232e+43", RoundingMode.ROUND_DOWN); + t("7.74525800334839542704379514512194550565400271258796650103830226e+62", "7.745258003348395427043795145121945505654002712587966501038302267977111236789268316426418098716e+62", RoundingMode.ROUND_DOWN); + t("6.2644488671934926960298323609173878562204e+40", "6.264448867193492696029832360917387856220314258629579154805116236617047705e+40", RoundingMode.ROUND_CEIL); + t("1.1212610202715126696808411919523222015979206841671840577694468e+61", "1.12126102027151266968084119195232220159792068416718405776944683512488141027069261455294944060583439e+61", RoundingMode.ROUND_HALF_UP); + t("14768", "14768.1842134501472446153274412575133", RoundingMode.ROUND_DOWN); + t("66", "65.84595269", RoundingMode.ROUND_HALF_UP); + t("5.04358552116975225426776135857493312e+36", "5.0435855211697522542677613585749331194437753499183689199959863339211e+36", RoundingMode.ROUND_CEIL); + t("72916866821", "72916866820.54423629685259893346337712794", RoundingMode.ROUND_HALF_DOWN); + t("2.25398641434088868230960319957704440329914057033993092762174e+59", "2.253986414340888682309603199577044403299140570339930927621742643835298453365292983113173554605e+59", RoundingMode.ROUND_HALF_EVEN); + t("9.50878709595470892500629632386714322909202072012758393749698817348e+65", "9.508787095954708925006296323867143229092020720127583937496988173481432728097661248708213e+65", RoundingMode.ROUND_HALF_DOWN); + t("5.2607910472629613651015532597249206745434137969950236424916019135420122e+70", "5.260791047262961365101553259724920674543413796995023642491601913542012227611433312032956077032041978908e+70", RoundingMode.ROUND_DOWN); + t("410", "410.762791093715303350001444121070121", RoundingMode.ROUND_DOWN); + t("1.3320871624020377318642711553436113e+34", "1.33208716240203773186427115534361135519309237757872381699115467e+34", RoundingMode.ROUND_DOWN); + t("6230378575909", "6230378575908.126534764593955", RoundingMode.ROUND_CEIL); + t("8.79324953269900537785265055241483017965551931338157086204822343837345e+68", "8.793249532699005377852650552414830179655519313381570862048223438373446168669586851714244432e+68", RoundingMode.ROUND_UP); + t("7.808570916258060849165e+21", "7.8085709162580608491646e+21", RoundingMode.ROUND_HALF_DOWN); + t("88", "87.426", RoundingMode.ROUND_CEIL); + t("5036", "5035.551403129954", RoundingMode.ROUND_CEIL); + t("4.666777096688297335109779706846177431928559905049197884212958955e+63", "4.6667770966882973351097797068461774319285599050491978842129589550252836742465454224095908e+63", RoundingMode.ROUND_HALF_EVEN); + t("1.3082493338072034134280214605195699691716814374132145e+52", "1.30824933380720341342802146051956996917168143741321444089754461241e+52", RoundingMode.ROUND_UP); + t("82896368014641073413", "82896368014641073413.127", RoundingMode.ROUND_FLOOR); + t("3.6759908238598981366541946858543288181344210687261e+49", "3.6759908238598981366541946858543288181344210687260953004e+49", RoundingMode.ROUND_CEIL); + t("2554853", "2554853.448817348736141", RoundingMode.ROUND_HALF_DOWN); + t("7.432653329376812932864567362402827202784593426455497e+51", "7.43265332937681293286456736240282720278459342645549756393442032908961e+51", RoundingMode.ROUND_DOWN); + t("4.1376083180004347798256857059806342e+34", "4.13760831800043477982568570598063412322243503351025693e+34", RoundingMode.ROUND_UP); + t("2.81639743586035847441737607898e+29", "2.816397435860358474417376078971272140333871184e+29", RoundingMode.ROUND_CEIL); + t("3.33308755377081894459518719001618476646619e+41", "3.33308755377081894459518719001618476646619345374865441860199004e+41", RoundingMode.ROUND_HALF_UP); + t("861198584370", "861198584370.487", RoundingMode.ROUND_DOWN); + t("58138545", "58138545.527841812778081669334", RoundingMode.ROUND_FLOOR); + t("9.1299443667780696881942861253757909197956397717814491253e+55", "9.12994436677806968819428612537579091979563977178144912531e+55", RoundingMode.ROUND_DOWN); + t("4.39311758031073540977322723016501396453173282821704760525204945353983876096252e+77", "4.39311758031073540977322723016501396453173282821704760525204945353983876096251821769058876287518283551757703348408464e+77", RoundingMode.ROUND_CEIL); + t("3.2974115909070248542274425313413005934211172865969028889e+55", "3.297411590907024854227442531341300593421117286596902888853804228063794921468e+55", RoundingMode.ROUND_CEIL); + t("54", "53.34398845927930853307662313597656146", RoundingMode.ROUND_UP); + t("15636384601748303", "15636384601748302.9811", RoundingMode.ROUND_CEIL); + t("2.3043720261427013162485e+22", "2.3043720261427013162485531143187502464942974003324599e+22", RoundingMode.ROUND_DOWN); + t("581057837085", "581057837085.65123531004522490062077436676334724089", RoundingMode.ROUND_FLOOR); + t("797366496337", "797366496337.6718190234426526346293683404803880987062", RoundingMode.ROUND_DOWN); + t("4.285881357494659223685e+21", "4.285881357494659223685e+21", RoundingMode.ROUND_HALF_EVEN); + t("9.132045135982774098345e+21", "9.13204513598277409834525940084399290647033372055570535606505e+21", RoundingMode.ROUND_HALF_UP); + t("1.11669335324060757880756755605946384713132737403413e+50", "1.1166933532406075788075675560594638471313273740341292905922955935106577859270853666e+50", RoundingMode.ROUND_HALF_DOWN); + t("3.23832893865411943993037855346860219715891545114e+47", "3.238328938654119439930378553468602197158915451147002264725e+47", RoundingMode.ROUND_FLOOR); + t("7.40310708864509274393878672061390994720684311147946750446044572e+62", "7.4031070886450927439387867206139099472068431114794675044604457234765307070001457084110726e+62", RoundingMode.ROUND_DOWN); + t("3.68965336119015432161651754041004e+32", "3.68965336119015432161651754041003908937708794285e+32", RoundingMode.ROUND_CEIL); + t("90783322754206050", "90783322754206049.35035", RoundingMode.ROUND_CEIL); + t("4.783897483734883940914066109558172639368953766427218188058842e+60", "4.783897483734883940914066109558172639368953766427218188058842519826992028703726005242207628819478632e+60", RoundingMode.ROUND_FLOOR); + t("8.74642362004856279856821278562300234968553e+41", "8.7464236200485627985682127856230023496855266153880604628901734609882681e+41", RoundingMode.ROUND_HALF_UP); + t("2.787528073145134085377480268092975211744788266156563860706325e+60", "2.787528073145134085377480268092975211744788266156563860706324907236200247422339482e+60", RoundingMode.ROUND_UP); + t("9.044749264159923044896e+21", "9.0447492641599230448952113830135543025323624505592e+21", RoundingMode.ROUND_UP); + t("3.38724858450634217020878619249322e+32", "3.3872485845063421702087861924932165998628685152854e+32", RoundingMode.ROUND_HALF_DOWN); + t("7.33035174941232251216660134923e+32", "7.33035174941232251216660134923000387370975884e+32", RoundingMode.ROUND_FLOOR); + t("3.31861301560113994278653457913815811504895843883387949739855080482136508e+71", "3.318613015601139942786534579138158115048958438833879497398550804821365076078023599771341067964e+71", RoundingMode.ROUND_CEIL); + t("4.892538135085055040561465460077728050505789433e+45", "4.892538135085055040561465460077728050505789433039013e+45", RoundingMode.ROUND_FLOOR); + t("3.480927423683982545690946611905582393906288848845e+48", "3.4809274236839825456909466119055823939062888488451700237682978275240792e+48", RoundingMode.ROUND_HALF_EVEN); + t("8.5585370645750825066579e+22", "8.5585370645750825066579059239556661179388558223611585366682692e+22", RoundingMode.ROUND_HALF_DOWN); + t("2.8106502332881758642573040950398356187983397721051055759182e+58", "2.810650233288175864257304095039835618798339772105105575918210150772785811e+58", RoundingMode.ROUND_HALF_UP); + t("7.953951085584591494904819e+25", "7.9539510855845914949048190132594822824626976317642169018875166767e+25", RoundingMode.ROUND_HALF_DOWN); + t("5012920663454824", "5012920663454823.94", RoundingMode.ROUND_HALF_UP); + t("9.059308645970286362603799e+24", "9.059308645970286362603799e+24", RoundingMode.ROUND_HALF_UP); + t("2.930381009176059877391197659254717127145084478e+45", "2.93038100917605987739119765925471712714508447815186763294045321221268221587573e+45", RoundingMode.ROUND_DOWN); + t("3.93979729202599788234456028398138395381138418403803935560263301961568e+68", "3.939797292025997882344560283981383953811384184038039355602633019615681383938905911925353290603787e+68", RoundingMode.ROUND_HALF_DOWN); + t("3.347294783804407389536880406224847102831717725051604392715997e+60", "3.3472947838044073895368804062248471028317177250516043927159970180531e+60", RoundingMode.ROUND_DOWN); + t("4.152557275792933219421015403627280983623385245443758047431e+57", "4.1525572757929332194210154036272809836233852454437580474305470338495945e+57", RoundingMode.ROUND_HALF_UP); + t("2.568943282775480373543498502026413633372529080072386778478497168e+63", "2.56894328277548037354349850202641363337252908007238677847849716763891609585410420915975309606355e+63", RoundingMode.ROUND_CEIL); + t("8.684093992464956330645701447343516418e+36", "8.684093992464956330645701447343516417923741184554719792596139808816571956653e+36", RoundingMode.ROUND_HALF_DOWN); + t("5.83803824336815109774392e+23", "5.838038243368151097743916928821585630595573416851e+23", RoundingMode.ROUND_UP); + t("4.99449017842808893066894421324882543343399403548140337811028587e+62", "4.994490178428088930668944213248825433433994035481403378110285871375e+62", RoundingMode.ROUND_DOWN); + t("4.3792711449156782662938969897476619220638522535235560693017440318235650762880312e+79", "4.379271144915678266293896989747661922063852253523556069301744031823565076288031203e+79", RoundingMode.ROUND_HALF_EVEN); + t("1.64836570856055370302116821082684227150215611327936660631e+57", "1.6483657085605537030211682108268422715021561132793666063097975046239608762642599531985480246e+57", RoundingMode.ROUND_HALF_UP); + t("3.6880029140410668344606480164489384e+34", "3.68800291404106683446064801644893833152881384958720719932324749064e+34", RoundingMode.ROUND_CEIL); + t("5.37691884604259144480804415625800887790938772497524135e+53", "5.376918846042591444808044156258008877909387724975241352981212067476945435681674020225105e+53", RoundingMode.ROUND_FLOOR); + t("7.1995513358058164351942e+22", "7.199551335805816435194169107730917957459e+22", RoundingMode.ROUND_HALF_DOWN); + t("55248039093404", "55248039093404.6273291498305797535238516736182191", RoundingMode.ROUND_FLOOR); + t("6.419830543451423871631416632166320919709e+39", "6.41983054345142387163141663216632091970977470919817409169e+39", RoundingMode.ROUND_FLOOR); + t("47", "46.679687957019966", RoundingMode.ROUND_HALF_DOWN); + t("8.846171889181456596809377139e+27", "8.8461718891814565968093771394637497527855234030610736533458882022e+27", RoundingMode.ROUND_HALF_DOWN); + t("9494812039339485", "9494812039339484.66504814190507971", RoundingMode.ROUND_CEIL); + t("9.568743436371491059070139104936123822e+36", "9.568743436371491059070139104936123822153171585452165317540885e+36", RoundingMode.ROUND_HALF_UP); + t("6.218950733005184405477309653091850341440038341422433362937950160976e+66", "6.218950733005184405477309653091850341440038341422433362937950160975956092596313331825e+66", RoundingMode.ROUND_CEIL); + t("8.3184242277151497735548563861150757508026e+40", "8.318424227715149773554856386115075750802554724068866714143812e+40", RoundingMode.ROUND_HALF_DOWN); + t("44238479", "44238479.45577788940469598821356176", RoundingMode.ROUND_HALF_DOWN); + t("2037", "2037.823568704255455386618400409335477", RoundingMode.ROUND_FLOOR); + t("5.436649951976429287545774447705520810310093287073075e+51", "5.436649951976429287545774447705520810310093287073074686050425310198538528694387158388e+51", RoundingMode.ROUND_HALF_EVEN); + t("37738994177", "37738994177", RoundingMode.ROUND_HALF_DOWN); + t("9.117326071348610688176527980615463581736346164592577593e+54", "9.11732607134861068817652798061546358173634616459257759341133852768832521419919626360171e+54", RoundingMode.ROUND_HALF_DOWN); + t("6.084920955300075178735187946364763863e+36", "6.08492095530007517873518794636476386223409771383197420966e+36", RoundingMode.ROUND_CEIL); + t("8.522483763341817511064e+21", "8.5224837633418175110636e+21", RoundingMode.ROUND_CEIL); + t("8089235072415301", "8089235072415301.5407182501479888352094914490764", RoundingMode.ROUND_FLOOR); + t("6588524", "6588524.3302879765427617637496749722", RoundingMode.ROUND_HALF_UP); + t("6.48949404289677464226944079045203282327984360168518221116940520131007087e+71", "6.48949404289677464226944079045203282327984360168518221116940520131007086776011881e+71", RoundingMode.ROUND_HALF_DOWN); + t("4.66758032658209403400328094282546162268665050304684900737759e+59", "4.6675803265820940340032809428254616226866505030468490073775840892679e+59", RoundingMode.ROUND_UP); + t("3.8228501778813845182718352582392492990500025013409025197209162241766597698593466e+79", "3.82285017788138451827183525823924929905000250134090251972091622417665976985934664e+79", RoundingMode.ROUND_FLOOR); + t("1.48107423197776804105574657092158563e+36", "1.48107423197776804105574657092158563064846301871291470178376174e+36", RoundingMode.ROUND_FLOOR); + t("687436488212973", "687436488212972.3776181461101284022701451638", RoundingMode.ROUND_UP); + t("1.3723738401752233053350007148932102e+34", "1.37237384017522330533500071489321018e+34", RoundingMode.ROUND_HALF_UP); + t("7.62478294482680439921089600929940725974552200617448002491e+56", "7.6247829448268043992108960092994072597455220061744800249106939240528761312396549902e+56", RoundingMode.ROUND_HALF_UP); + t("85960397435", "85960397434.6658395", RoundingMode.ROUND_HALF_UP); + t("2.763384545224304050146832313739655508577774027132280259541365597279123017482e+75", "2.763384545224304050146832313739655508577774027132280259541365597279123017482371912033266310613516271663e+75", RoundingMode.ROUND_HALF_DOWN); + t("3807642124967812864", "3807642124967812863.11134193333490873646020100055", RoundingMode.ROUND_CEIL); + t("6.70427065774694862425851113103666872565875637413102437053e+57", "6.704270657746948624258511131036668725658756374131024370529849179417160857194136e+57", RoundingMode.ROUND_CEIL); + t("5.847413670589089981708716357368937643792827522e+45", "5.8474136705890899817087163573689376437928275218768e+45", RoundingMode.ROUND_UP); + t("8.05036521767882485190836e+23", "8.0503652176788248519083693278838868065648e+23", RoundingMode.ROUND_DOWN); + t("2.388213850732309089626300468433832206510001e+42", "2.38821385073230908962630046843383220651000054e+42", RoundingMode.ROUND_HALF_DOWN); + t("8.650286818819557970446473110946463648974025293138e+48", "8.65028681881955797044647311094646364897402529313791495118107976573745115e+48", RoundingMode.ROUND_HALF_UP); + t("1.06125356153442428148614416928268031052670523838e+47", "1.06125356153442428148614416928268031052670523837841483302500724891691386968e+47", RoundingMode.ROUND_HALF_DOWN); + t("6.051458835569184364025914e+24", "6.0514588355691843640259134539571989823409365353609022460399600829e+24", RoundingMode.ROUND_CEIL); + t("5255333", "5255332.88023478522156979504635801765441542", RoundingMode.ROUND_HALF_DOWN); + t("6.6440556280518454677778e+23", "6.64405562805184546777779589612592222e+23", RoundingMode.ROUND_HALF_UP); + t("933398330878877265", "933398330878877264.71837776272423433960446407792842", RoundingMode.ROUND_HALF_DOWN); + t("1.646563999089466617840308582e+27", "1.6465639990894666178403085828775007164048968602872689633441291356e+27", RoundingMode.ROUND_FLOOR); + t("2.04071424062649763402922072340235937591717327451273251540381e+59", "2.04071424062649763402922072340235937591717327451273251540381641481881855e+59", RoundingMode.ROUND_DOWN); + t("6.207910504118590442964e+21", "6.20791050411859044296423935427955051266259547322838791883672e+21", RoundingMode.ROUND_HALF_DOWN); + t("8.43012542075846388096939598702013e+32", "8.43012542075846388096939598702013178561e+32", RoundingMode.ROUND_HALF_EVEN); + t("32973411322", "32973411322.0055", RoundingMode.ROUND_DOWN); + t("7.41694510786524937341518027227253887932818592426915463600522309825048431e+71", "7.416945107865249373415180272272538879328185924269154636005223098250484307079446594739006612417e+71", RoundingMode.ROUND_CEIL); + t("6", "5.9619856716250354871335057", RoundingMode.ROUND_CEIL); + t("87527", "87526.63684823518483851567239869752", RoundingMode.ROUND_HALF_UP); + t("9.763022525200483641130669988156219e+34", "9.763022525200483641130669988156219073728900962111054931e+34", RoundingMode.ROUND_FLOOR); + t("8.6185312763805220809689217680237306487385577826341538e+52", "8.61853127638052208096892176802373064873855778263415380693587684e+52", RoundingMode.ROUND_HALF_EVEN); + t("8.45360239012103000688834251686727e+33", "8.45360239012103000688834251686726987255777523693637285554668319e+33", RoundingMode.ROUND_UP); + t("2518723195860416961", "2518723195860416961.1285010663484912294197393809044612", RoundingMode.ROUND_DOWN); + t("2.685500253120233156790885090189119970660485355223415640469844965503956949e+72", "2.6855002531202331567908850901891199706604853552234156404698449655039569485280575699687713e+72", RoundingMode.ROUND_CEIL); + t("220453411", "220453411.8828467378639975405350886112158605", RoundingMode.ROUND_DOWN); + t("4.85547756175076698605434224480862417426276770270709846574910398927491662348382e+77", "4.85547756175076698605434224480862417426276770270709846574910398927491662348381810254102042363e+77", RoundingMode.ROUND_CEIL); + t("706", "705.772547316850746", RoundingMode.ROUND_HALF_EVEN); + t("7.922244228553676441225996043345713795845944777e+45", "7.92224422855367644122599604334571379584594477725845245459550132153e+45", RoundingMode.ROUND_DOWN); + t("5.2423675401973461629044e+22", "5.242367540197346162904370934159243342332619e+22", RoundingMode.ROUND_HALF_DOWN); + t("18030585831906130", "18030585831906130.962417491553869302", RoundingMode.ROUND_DOWN); + t("9.1579489825538072699342096635557184539890411086285024230055732e+61", "9.1579489825538072699342096635557184539890411086285024230055732145647118262972725923e+61", RoundingMode.ROUND_DOWN); + t("85226070565187", "85226070565186.749650937595330322325285761974396", RoundingMode.ROUND_UP); + t("5.8026252767502790532863416020671786591156722564880455114e+55", "5.80262527675027905328634160206717865911567225648804551136391722488e+55", RoundingMode.ROUND_HALF_DOWN); + t("2.4218610164284422911400259009366691043836e+40", "2.4218610164284422911400259009366691043835892289395393055927142431986156068766091e+40", RoundingMode.ROUND_CEIL); + t("9.06687520914843144090853802874797707391234306e+44", "9.066875209148431440908538028747977073912343061e+44", RoundingMode.ROUND_HALF_UP); + t("9.277380564234452159463923699924423033503589164006560028593034039059e+66", "9.2773805642344521594639236999244230335035891640065600285930340390595049193598441e+66", RoundingMode.ROUND_FLOOR); + t("8.128082895667773893079564235647181e+33", "8.128082895667773893079564235647180709738816611273e+33", RoundingMode.ROUND_UP); + t("36", "36.956949377301", RoundingMode.ROUND_DOWN); + t("1.87389296164121983463708427608894171918413437553511848334553945494023535764718e+77", "1.873892961641219834637084276088941719184134375535118483345539454940235357647177900767e+77", RoundingMode.ROUND_HALF_EVEN); + t("17310978329", "17310978328.5287351707255015885210716726522112", RoundingMode.ROUND_HALF_EVEN); + t("9.2600219512947966032033927978963555790720436638836388e+52", "9.260021951294796603203392797896355579072043663883638828801926062258412645086313910012864e+52", RoundingMode.ROUND_HALF_UP); + t("14575632844", "14575632843.9255237386639144", RoundingMode.ROUND_HALF_UP); + t("6.6321582910691070759469809878367695902421451930245389e+52", "6.6321582910691070759469809878367695902421451930245388163039e+52", RoundingMode.ROUND_UP); + t("7.25572991620854492306001e+23", "7.25572991620854492306000246e+23", RoundingMode.ROUND_CEIL); + t("2.29944904912666115204337635383054709834656882596225337344e+56", "2.299449049126661152043376353830547098346568825962253373445377477443437271765291716e+56", RoundingMode.ROUND_DOWN); + t("5.20558341173907182519017950869849925033417917e+44", "5.205583411739071825190179508698499250334179162775097e+44", RoundingMode.ROUND_UP); + t("6111649076", "6111649076.222604966937070801102488363059341", RoundingMode.ROUND_HALF_EVEN); + t("9.11024271273341770350822200927358669721049157581569029e+53", "9.11024271273341770350822200927358669721049157581569028990662687474e+53", RoundingMode.ROUND_UP); + t("4.43687659677981757715075653509475056586153598815659143662113577e+62", "4.43687659677981757715075653509475056586153598815659143662113577090918204e+62", RoundingMode.ROUND_FLOOR); + t("248", "247.654291674654270796798279", RoundingMode.ROUND_HALF_UP); + t("4.3600875972057143805604498896639034411838346245016392883967078243062789210025219e+79", "4.3600875972057143805604498896639034411838346245016392883967078243062789210025219430426344800669971036134643124803e+79", RoundingMode.ROUND_FLOOR); + t("1.03007021065884639208787111225352947659134e+41", "1.03007021065884639208787111225352947659134e+41", RoundingMode.ROUND_HALF_DOWN); + t("6.6928769403416121328026875807e+28", "6.69287694034161213280268758078544463630255731257270872775864425e+28", RoundingMode.ROUND_FLOOR); + t("32434285307875262", "32434285307875262.2207922459899301806", RoundingMode.ROUND_HALF_EVEN); + t("62748749332151342301", "62748749332151342301.19244", RoundingMode.ROUND_HALF_DOWN); + t("4.0678262988827413231899e+22", "4.06782629888274132318985446914450533e+22", RoundingMode.ROUND_CEIL); + t("9082662703546", "9082662703546.324370805591057", RoundingMode.ROUND_HALF_EVEN); + t("8.94871836341303529473698033715697e+32", "8.9487183634130352947369803371569600373840782e+32", RoundingMode.ROUND_UP); + t("2.1670379409405843366171258653978628564316145348035311924089e+58", "2.1670379409405843366171258653978628564316145348035311924089239541816857773897563368575797031936041e+58", RoundingMode.ROUND_HALF_EVEN); + t("2935893", "2935892.87182124", RoundingMode.ROUND_CEIL); + t("4.37578044122813627924254711867936993527178454e+44", "4.375780441228136279242547118679369935271784531302743e+44", RoundingMode.ROUND_UP); + t("6.39286534756971472039e+21", "6.39286534756971472038980039416071834909341307858e+21", RoundingMode.ROUND_HALF_EVEN); + t("4.18258479181585354438902084125374066e+35", "4.182584791815853544389020841253740662e+35", RoundingMode.ROUND_FLOOR); + t("2.9635549088358495388694647078277775625649e+40", "2.96355490883584953886946470782777756256487239375833003125e+40", RoundingMode.ROUND_UP); + t("9.199438690858434123332123544047e+30", "9.19943869085843412333212354404671487370041239840183084655999684e+30", RoundingMode.ROUND_HALF_UP); + t("3.29539383367054908280466428e+26", "3.2953938336705490828046642886489630335793970083516425663e+26", RoundingMode.ROUND_DOWN); + t("5.4864050382187254727117788923745e+31", "5.48640503821872547271177889237442590120046642432614e+31", RoundingMode.ROUND_CEIL); + t("6.72291657980520450527702159742964874909944380115207127826868e+59", "6.7229165798052045052770215974296487490994438011520712782686756677317729908042785747274547904999e+59", RoundingMode.ROUND_HALF_DOWN); + t("6.4199675010715062595232405405532880703928738044906019996020105471838488933611956e+79", "6.41996750107150625952324054055328807039287380449060199960201054718384889336119552687e+79", RoundingMode.ROUND_UP); + t("8.49573393504083151850167234209249202511578741027519908816390028552e+65", "8.495733935040831518501672342092492025115787410275199088163900285521533395797589e+65", RoundingMode.ROUND_HALF_DOWN); + t("1.5955208479300521845981764334575800052437447146562787571491109848403080783e+73", "1.59552084793005218459817643345758000524374471465627875714911098484030807828997023018004378599828e+73", RoundingMode.ROUND_UP); + t("6.036649336201741152293032410301018575e+36", "6.036649336201741152293032410301018575309192634222268026610553981547335341134e+36", RoundingMode.ROUND_FLOOR); + t("8.2206171209610808188838e+22", "8.220617120961080818883809546397772352053067497822e+22", RoundingMode.ROUND_DOWN); + t("357067001617476243862", "357067001617476243862.137169321", RoundingMode.ROUND_HALF_UP); + t("3648", "3648.935966276480770486703829", RoundingMode.ROUND_FLOOR); + t("3667256", "3667256.14321901053142272931937401084036", RoundingMode.ROUND_FLOOR); + t("3.06817804911202488565210058368288435840855617967301618918521966618918e+68", "3.06817804911202488565210058368288435840855617967301618918521966618918898694871236138832751471925640291008e+68", RoundingMode.ROUND_DOWN); + t("6.397956949401398212866287356127033102182339663673964891147500216e+63", "6.3979569494013982128662873561270331021823396636739648911475002160201253259767111914786e+63", RoundingMode.ROUND_HALF_EVEN); + t("4.035852629664930971748714986884026499248056376602e+49", "4.03585262966493097174871498688402649924805637660190057197207752443783928e+49", RoundingMode.ROUND_UP); + t("690938", "690937.205492020637017366344964341683031", RoundingMode.ROUND_CEIL); + t("4572785807971", "4572785807970.2685726", RoundingMode.ROUND_UP); + t("9.12591556752170002546686195712080775076927539494357342e+53", "9.12591556752170002546686195712080775076927539494357342095192221318809927523394869766948859999e+53", RoundingMode.ROUND_HALF_EVEN); + t("3.175166710121609964935909273257064925241534e+43", "3.175166710121609964935909273257064925241533921325823763693547e+43", RoundingMode.ROUND_CEIL); + t("8.6981262273677133498099001368854630216532260172495845284342e+59", "8.6981262273677133498099001368854630216532260172495845284341969645697018865379917639005276e+59", RoundingMode.ROUND_HALF_DOWN); + t("5.43909171309351447662743501782820255783778421662946112946990882360329e+68", "5.4390917130935144766274350178282025578377842166294611294699088236032838010825005751271e+68", RoundingMode.ROUND_UP); + t("9.784135122662915564368384002663201291592977201175859415877628841e+63", "9.784135122662915564368384002663201291592977201175859415877628841445610051468229986e+63", RoundingMode.ROUND_FLOOR); + t("1.075926913120789044066114677747282911808323013538262852302400311648e+66", "1.0759269131207890440661146777472829118083230135382628523024003116470855e+66", RoundingMode.ROUND_UP); + t("24", "24.009013648289204609707762701", RoundingMode.ROUND_HALF_UP); + t("8.75619449783486902827580978677238339353807302997843705455206849896e+65", "8.7561944978348690282758097867723833935380730299784370545520684989674681468898373241422734005491e+65", RoundingMode.ROUND_FLOOR); + t("49185", "49185.42432350042440262481433144719", RoundingMode.ROUND_FLOOR); + t("475313129", "475313128.81802828668961", RoundingMode.ROUND_UP); + t("5.966160504823907616078866600887399441996553619375546697015e+57", "5.96616050482390761607886660088739944199655361937554669701500365941215e+57", RoundingMode.ROUND_FLOOR); + t("8.67093818828233413993699849118457718482116385647241974416e+56", "8.6709381882823341399369984911845771848211638564724197441644559865e+56", RoundingMode.ROUND_FLOOR); + t("4.018307218209746175224522445986860839987164456492973969349e+58", "4.0183072182097461752245224459868608399871644564929739693489418729882986617019584512013283e+58", RoundingMode.ROUND_UP); + + t("4965078", "4965077.956955313373056935621", RoundingMode.ROUND_CEIL); + t("6.32074464844040699391589694212584145237969644385445479e+53", "6.320744648440406993915896942125841452379696443854454787303226e+53", RoundingMode.ROUND_HALF_UP); + t("2.630018093200468445909344327503187558812e+39", "2.63001809320046844590934432750318755881276774e+39", RoundingMode.ROUND_DOWN); + t("5.9845994166628691963626788515044007024791069617050073781932631068e+64", "5.98459941666286919636267885150440070247910696170500737819326310684179e+64", RoundingMode.ROUND_FLOOR); + t("5.38788728618099476057660664795230746327516453731e+47", "5.38788728618099476057660664795230746327516453730723672718211491484463437612544615e+47", RoundingMode.ROUND_HALF_DOWN); + t("5.816680772652537833886113306215842146722035445468511689872171309392e+66", "5.816680772652537833886113306215842146722035445468511689872171309391615108203036895388894202315e+66", RoundingMode.ROUND_HALF_UP); + t("5.14951895405085032556822954571292087413665571538603148148092264951e+66", "5.1495189540508503255682295457129208741366557153860314814809226495101085411721086436447394e+66", RoundingMode.ROUND_HALF_EVEN); + t("9.38071154248816610903159656235010365e+35", "9.38071154248816610903159656235010365457924684058e+35", RoundingMode.ROUND_HALF_EVEN); + t("4.6192344120951390457511809260028977897911933273960342542075621554585705e+70", "4.619234412095139045751180926002897789791193327396034254207562155458570425292193318612e+70", RoundingMode.ROUND_UP); + t("895", "895.42468256229", RoundingMode.ROUND_HALF_UP); + t("4.49593629458007552251945193855124924788525290643178e+50", "4.4959362945800755225194519385512492478852529064317781769525204246314622e+50", RoundingMode.ROUND_HALF_DOWN); + t("1.57561665415364001696709e+23", "1.575616654153640016967093563564651371666e+23", RoundingMode.ROUND_HALF_UP); + t("9.5119206433900111282160111340222123761771472865509429834e+55", "9.51192064339001112821601113402221237617714728655094298342579e+55", RoundingMode.ROUND_DOWN); + t("2.8705511287442274153174451865706904160604287523337828148634483123671245935117e+77", "2.87055112874422741531744518657069041606042875233378281486344831236712459351170440769052264237721532651856136663e+77", RoundingMode.ROUND_HALF_UP); + t("7.34188971833045579480780836481104523190936e+41", "7.3418897183304557948078083648110452319093625282376588007189862745851161e+41", RoundingMode.ROUND_HALF_EVEN); + t("7.8608372491686434746950705553718082749885371792704000800225593187312714063278e+76", "7.860837249168643474695070555371808274988537179270400080022559318731271406327753488333027e+76", RoundingMode.ROUND_HALF_UP); + t("6.469775389199626982124099675993476e+34", "6.46977538919962698212409967599347606034988957766173192337753531700792e+34", RoundingMode.ROUND_FLOOR); + t("5.8545430675082317385046601147591350320748593523353867726685748e+61", "5.8545430675082317385046601147591350320748593523353867726685748416216417718e+61", RoundingMode.ROUND_HALF_EVEN); + t("6253581", "6253581.49602122273536242131464028542", RoundingMode.ROUND_HALF_UP); + t("8.7344751925490789359100991e+25", "8.7344751925490789359100990700674856026086725e+25", RoundingMode.ROUND_UP); + t("3.9904601157326518550436849417943739334793e+40", "3.990460115732651855043684941794373933479342900084994082134338812305943386e+40", RoundingMode.ROUND_FLOOR); + t("7.117509805619442000811625308308028306e+36", "7.11750980561944200081162530830802830605763083615357319229708510119793e+36", RoundingMode.ROUND_HALF_UP); + t("239", "239.6", RoundingMode.ROUND_DOWN); + t("6.583584600606673632872593433278933533220316054467200967095949640912736824225e+75", "6.5835846006066736328725934332789335332203160544672009670959496409127368242248629713e+75", RoundingMode.ROUND_HALF_DOWN); + t("3.695920981918849753532424768925832178720483413e+45", "3.69592098191884975353242476892583217872048341388978498358e+45", RoundingMode.ROUND_FLOOR); + t("2", "1.3037831777620558701769453039973469", RoundingMode.ROUND_UP); + t("8.209369008504729502003611908929598068593e+40", "8.209369008504729502003611908929598068593e+40", RoundingMode.ROUND_HALF_EVEN); + t("1.7943552590764773563109836e+26", "1.79435525907647735631098360862158965291e+26", RoundingMode.ROUND_DOWN); + t("8.27389970382499192225882435e+26", "8.273899703824991922258824345580491438304434418276176349396745658e+26", RoundingMode.ROUND_HALF_DOWN); + t("462561608456627", "462561608456627.001777", RoundingMode.ROUND_FLOOR); + t("8.1839600623408782869984730140049576888373907446562596320788904262169763785362e+77", "8.183960062340878286998473014004957688837390744656259632078890426216976378536205007147403782e+77", RoundingMode.ROUND_FLOOR); + t("6.703769389175962220793e+21", "6.703769389175962220792067880359735732888123800491e+21", RoundingMode.ROUND_UP); + t("2.5585369539549659010966714135825828801369980436910644884291291e+61", "2.5585369539549659010966714135825828801369980436910644884291291234042228005022238e+61", RoundingMode.ROUND_HALF_DOWN); + t("4.71355729812843325551825190733754692238411906900564645150190008e+62", "4.71355729812843325551825190733754692238411906900564645150190007430239409925817447e+62", RoundingMode.ROUND_CEIL); + t("8.743778229459959593062156414403742568639029e+42", "8.74377822945995959306215641440374256863902836579411682005851e+42", RoundingMode.ROUND_CEIL); + t("9.4610942886126267215813230206813878133108628300770338213090890302608873805945795e+79", "9.4610942886126267215813230206813878133108628300770338213090890302608873805945795171504245711910393542869912e+79", RoundingMode.ROUND_HALF_EVEN); + t("9.637007602803820224674484773388404422058784394922216256468207851098e+66", "9.637007602803820224674484773388404422058784394922216256468207851097102844188166040233086965888060242247e+66", RoundingMode.ROUND_UP); + t("9.8929084923535343669756305730610829040131245900415500369e+55", "9.89290849235353436697563057306108290401312459004155003684864835083512265034512297039071425988079e+55", RoundingMode.ROUND_CEIL); + t("227029338743263", "227029338743263.93013322884665944911687839", RoundingMode.ROUND_DOWN); + t("9556", "9555.702815788750539915212443558755764", RoundingMode.ROUND_UP); + t("7.5777656953887385271106133131169037438362239623169e+49", "7.57776569538873852711061331311690374383622396231687000596e+49", RoundingMode.ROUND_HALF_EVEN); + t("6.682104529462952632410838e+24", "6.682104529462952632410837641372635268045881966538e+24", RoundingMode.ROUND_CEIL); + t("3.40490212059506016256377925738958571721640636153e+47", "3.404902120595060162563779257389585717216406361520888558246387332e+47", RoundingMode.ROUND_CEIL); + t("6.02441364429381327260741367276985467068046371110897032865165337e+62", "6.0244136442938132726074136727698546706804637111089703286516533653471194692722610656609e+62", RoundingMode.ROUND_HALF_UP); + t("2.5313651653786498793153255734290103587e+37", "2.53136516537864987931532557342901035878757668609321327884376561077398262963e+37", RoundingMode.ROUND_DOWN); + t("7.85665005570333663657093714469705934e+35", "7.856650055703336636570937144697059336863289133308185e+35", RoundingMode.ROUND_UP); + t("177640526141789", "177640526141788.343225172293525", RoundingMode.ROUND_CEIL); + t("3.720337371189052622074943e+25", "3.720337371189052622074942921963398883266421248541e+25", RoundingMode.ROUND_CEIL); + t("8.6313749672631505000804724190451538529154319985775036960071751534597975400579e+76", "8.631374967263150500080472419045153852915431998577503696007175153459797540057885204939257359487066282718539447e+76", RoundingMode.ROUND_HALF_DOWN); + t("6.0093917332950477604948831161021364170792508830154947009e+55", "6.0093917332950477604948831161021364170792508830154947009e+55", RoundingMode.ROUND_UP); + t("8.039856561515957202207593997063010720427567987067604601e+54", "8.03985656151595720220759399706301072042756798706760460081115e+54", RoundingMode.ROUND_HALF_DOWN); + t("9.04126850298381168011568888913120103322736027748100982152669106905664e+68", "9.04126850298381168011568888913120103322736027748100982152669106905663196e+68", RoundingMode.ROUND_UP); + t("32970", "32969.86013043774999017900493233800251808807", RoundingMode.ROUND_HALF_UP); + t("4.062501613145928449827898996803197068849565543663154887810367223956097172358e+75", "4.06250161314592844982789899680319706884956554366315488781036722395609717235882712303074126e+75", RoundingMode.ROUND_DOWN); + t("1.2585221051341615760113300656136097763123689416096518235274048137047508960225e+76", "1.2585221051341615760113300656136097763123689416096518235274048137047508960224444402424065809722365e+76", RoundingMode.ROUND_UP); + t("76428498", "76428498.00834040050622904", RoundingMode.ROUND_FLOOR); + t("2969542081490470842", "2969542081490470842.2873874609960997776387424601", RoundingMode.ROUND_DOWN); + t("1.83915362194670915529649750389183e+32", "1.83915362194670915529649750389183e+32", RoundingMode.ROUND_FLOOR); + t("9.051934488304764732260681809870433413368e+39", "9.05193448830476473226068180987043341336894274162300324775666234e+39", RoundingMode.ROUND_DOWN); + t("5.5055581168379212453472842196419487578340912520119781134168481302943305e+70", "5.5055581168379212453472842196419487578340912520119781134168481302943304427006511738950093684489283497e+70", RoundingMode.ROUND_CEIL); + t("7.8212509096600498185673448363795561801e+38", "7.82125090966004981856734483637955618009925616349415607657138464833290636076e+38", RoundingMode.ROUND_HALF_UP); + t("3.0546982208479323109313411268e+28", "3.05469822084793231093134112688982335665368647631e+28", RoundingMode.ROUND_DOWN); + t("48401191701190454916", "48401191701190454915.87020458175288248919360841887713552", RoundingMode.ROUND_UP); + t("2.112204187292732553586397374536644222038661332931779202378403e+60", "2.1122041872927325535863973745366442220386613329317792023784031e+60", RoundingMode.ROUND_HALF_UP); + t("2.32345597459570075584924011046569282105626864293765776e+53", "2.3234559745957007558492401104656928210562686429376577553656111494e+53", RoundingMode.ROUND_HALF_EVEN); + t("6.83768634613093432910405748169502361694478922e+45", "6.8376863461309343291040574816950236169447892199728904351925720243118213615618093e+45", RoundingMode.ROUND_HALF_DOWN); + t("9.750147130105570610532123362958045378e+36", "9.750147130105570610532123362958045378979179715926704377695369e+36", RoundingMode.ROUND_FLOOR); + t("2.100861289861071804337e+22", "2.10086128986107180433695930143316811637333008279165590263448e+22", RoundingMode.ROUND_HALF_UP); + t("6.86043620730137169613692822530112725634606192506087063665162541409521357214042e+77", "6.8604362073013716961369282253011272563460619250608706366516254140952135721404168108626834814070528e+77", RoundingMode.ROUND_HALF_UP); + t("1.5626034555461789267637613119509784678795467574624046084113e+59", "1.562603455546178926763761311950978467879546757462404608411306911462258050600025152315054266e+59", RoundingMode.ROUND_DOWN); + t("8.1657953379518384767073891983969032e+34", "8.1657953379518384767073891983969032197860059203770678016940796429163e+34", RoundingMode.ROUND_HALF_DOWN); + t("8.76242761957079783283256884156570096310765263e+44", "8.762427619570797832832568841565700963107652628626208374880873465683235356e+44", RoundingMode.ROUND_HALF_UP); + t("5.738034559825558584827988487e+27", "5.738034559825558584827988486842333820461031439008871488489056012e+27", RoundingMode.ROUND_UP); + t("50057554472467", "50057554472467.164635378107751829995761049170916", RoundingMode.ROUND_DOWN); + t("2.217574620839810044488132284149156661898910087838684414107246055650497e+69", "2.217574620839810044488132284149156661898910087838684414107246055650497247127025575756749e+69", RoundingMode.ROUND_HALF_UP); + t("2.5599585974649223224327226161115338826053171794370023977e+55", "2.559958597464922322432722616111533882605317179437002397792613551347e+55", RoundingMode.ROUND_FLOOR); + t("1.43014821461134396323079197376e+29", "1.43014821461134396323079197376075503936831895045225252422372849704547e+29", RoundingMode.ROUND_FLOOR); + t("9.70966118807833422956644722296756129766012276425821843096979556875e+65", "9.70966118807833422956644722296756129766012276425821843096979556875029e+65", RoundingMode.ROUND_HALF_EVEN); + t("4.916533296743126969789915322e+27", "4.916533296743126969789915322e+27", RoundingMode.ROUND_UP); + t("4.833542905767501913532472382036762424309928346865656598315910513985992546e+72", "4.83354290576750191353247238203676242430992834686565659831591051398599254568346115e+72", RoundingMode.ROUND_UP); + t("1.3278316562805597179325e+22", "1.32783165628055971793246463003781572653917e+22", RoundingMode.ROUND_HALF_DOWN); + t("5.02347253856796475647466e+23", "5.02347253856796475647466193e+23", RoundingMode.ROUND_HALF_DOWN); + t("13871", "13871", RoundingMode.ROUND_HALF_UP); + t("2.25474388246375890069616800777e+29", "2.254743882463758900696168007764489438567545789666275279171902946e+29", RoundingMode.ROUND_UP); + t("1.02187732311006848174021155848981225371768135e+44", "1.0218773231100684817402115584898122537176813528139488791683036875150612463985e+44", RoundingMode.ROUND_DOWN); + t("2909342", "2909342.4238780677375", RoundingMode.ROUND_HALF_UP); + t("5.63252321267098810926174933800717e+32", "5.6325232126709881092617493380071648e+32", RoundingMode.ROUND_CEIL); + t("5.23553453532019073853926210509049935358952607844215638892068535879e+65", "5.2355345353201907385392621050904993535895260784421563889206853587945892297422658429e+65", RoundingMode.ROUND_HALF_UP); + t("5.0110191100309032508871028312215600979e+37", "5.0110191100309032508871028312215600979641138288229618389443889e+37", RoundingMode.ROUND_FLOOR); + t("4.7961858399681660804352167135837851113655618745113e+50", "4.796185839968166080435216713583785111365561874511295798100202049598678690552e+50", RoundingMode.ROUND_UP); + t("3.6413072083209667611577984e+25", "3.64130720832096676115779843247079245446941280671681175325417221e+25", RoundingMode.ROUND_FLOOR); + t("2.83439430931506652088137802242984878152446095843660682602522650389e+65", "2.83439430931506652088137802242984878152446095843660682602522650388696313157109743775816855708e+65", RoundingMode.ROUND_HALF_UP); + t("6", "5.41744405", RoundingMode.ROUND_UP); + t("58970028613730800", "58970028613730800.2199658574092832368454", RoundingMode.ROUND_DOWN); + t("8.20762797459327051824581448969093981355593722774039e+50", "8.20762797459327051824581448969093981355593722774038945867906329529223994172067097145347e+50", RoundingMode.ROUND_UP); + t("8.54193986164574247811915221884901109509511490395756e+50", "8.54193986164574247811915221884901109509511490395756892065295262422447820275645e+50", RoundingMode.ROUND_DOWN); + t("3.3671952204343650523723248544011797199532387566275400356721261e+61", "3.36719522043436505237232485440117971995323875662754003567212611293933424352567164847630936905281e+61", RoundingMode.ROUND_HALF_EVEN); + t("7.895956448206507301924101293638155629123626e+42", "7.89595644820650730192410129363815562912362670531791013157843487e+42", RoundingMode.ROUND_DOWN); + t("235550616880409704600", "235550616880409704599.127968573", RoundingMode.ROUND_UP); + t("8.8364345580061269808644472129329280653955e+40", "8.836434558006126980864447212932928065395496132878436651857e+40", RoundingMode.ROUND_CEIL); + t("3996478976343", "3996478976342.3856997029833631225762369936431", RoundingMode.ROUND_UP); + t("296155900738434400", "296155900738434400.6386716", RoundingMode.ROUND_DOWN); + t("1.1830481689411792598668e+22", "1.18304816894117925986685219229261257e+22", RoundingMode.ROUND_DOWN); + t("8326900056386534199", "8326900056386534198.6860278942553748883", RoundingMode.ROUND_HALF_UP); + t("3.83365199013301205515355243939508806561289907596528931968567685526298673e+71", "3.8336519901330120551535524393950880656128990759652893196856768552629867273321092962870965667105e+71", RoundingMode.ROUND_HALF_DOWN); + t("9.3791314705961013288090054954372609296202314274173493146043e+58", "9.37913147059610132880900549543726092962023142741734931460434755787852055214175662842408203865372e+58", RoundingMode.ROUND_FLOOR); + t("7.53156457775671837805805213210009899583881e+41", "7.53156457775671837805805213210009899583881451963e+41", RoundingMode.ROUND_DOWN); + t("6222125", "6222125.947399497889116625442366736", RoundingMode.ROUND_FLOOR); + t("27246516013451", "27246516013450.7612200898046", RoundingMode.ROUND_HALF_DOWN); + t("2.1129209994249240465962150114302405500377695274770604922397881331e+65", "2.1129209994249240465962150114302405500377695274770604922397881331046343270898071712446295912642e+65", RoundingMode.ROUND_HALF_EVEN); + t("1.646532833140068856832411079427771744265723063103019194344170396855795846e+72", "1.646532833140068856832411079427771744265723063103019194344170396855795846472772100605573093746166121081e+72", RoundingMode.ROUND_HALF_EVEN); + t("8.425479546282021948869850897780983270136048547e+45", "8.425479546282021948869850897780983270136048546926147755138e+45", RoundingMode.ROUND_HALF_EVEN); + t("2.233872046078596369134793158082187513760673304511868920359e+57", "2.23387204607859636913479315808218751376067330451186892035944859933718652677e+57", RoundingMode.ROUND_DOWN); + t("3.116405743404107847814732269205375396135221718527468694425449065691242e+69", "3.116405743404107847814732269205375396135221718527468694425449065691241869806095568074204631019012404933659e+69", RoundingMode.ROUND_HALF_DOWN); + t("2.062365631214868258839472996400163124440742356524760343620038100366519e+69", "2.062365631214868258839472996400163124440742356524760343620038100366518635685404679919e+69", RoundingMode.ROUND_HALF_DOWN); + t("7.50745541728415428434029959e+26", "7.5074554172841542843402995893059819526420896996212780022697e+26", RoundingMode.ROUND_HALF_UP); + t("7.24849752468097696916398838713364051520307862650612728265666514561056e+68", "7.2484975246809769691639883871336405152030786265061272826566651456105618100701083e+68", RoundingMode.ROUND_HALF_UP); + t("1.35176383329614606610756531319295678018782464936214748745e+56", "1.3517638332961460661075653131929567801878246493621474874550800287300195566470029016e+56", RoundingMode.ROUND_FLOOR); + t("4.7152341392034704538023e+22", "4.71523413920347045380226220796263110674520711227447379291824e+22", RoundingMode.ROUND_HALF_EVEN); + t("3.11927423685004836840577039188891100297737718473721047017231325136894944596e+74", "3.11927423685004836840577039188891100297737718473721047017231325136894944595400105170201920293344231e+74", RoundingMode.ROUND_CEIL); + t("2.933400342567756418849544349581259968391617744e+45", "2.93340034256775641884954434958125996839161774380675440442887971748700867e+45", RoundingMode.ROUND_HALF_EVEN); + t("978080378597", "978080378597.2017", RoundingMode.ROUND_HALF_EVEN); + t("4.372210642064489328448661007253100863929888104582288453e+54", "4.372210642064489328448661007253100863929888104582288452571259872839821582026e+54", RoundingMode.ROUND_HALF_UP); + t("1.857581283508729657743503973029242776985316586148834e+51", "1.8575812835087296577435039730292427769853165861488346530185e+51", RoundingMode.ROUND_FLOOR); + t("7.421813035238230409761595532233089939079148043727378221365519874e+63", "7.421813035238230409761595532233089939079148043727378221365519873463075894088208132266204031e+63", RoundingMode.ROUND_CEIL); + t("51860977367633", "51860977367632.92841245248", RoundingMode.ROUND_HALF_EVEN); + t("1.95284973709573510813936820783019996132821775350531973163592085e+62", "1.9528497370957351081393682078301999613282177535053197316359208517808968343594003206246753959887549e+62", RoundingMode.ROUND_FLOOR); + t("6.9464859606048993902832501774806312749761412476825724988127422436981545662e+73", "6.94648596060489939028325017748063127497614124768257249881274224369815456613e+73", RoundingMode.ROUND_CEIL); + t("21129", "21128.947551940996938322", RoundingMode.ROUND_HALF_DOWN); + t("868214861041", "868214861040.7427436259995316", RoundingMode.ROUND_HALF_EVEN); + t("7.74918309357334474806682151708655686896e+38", "7.749183093573344748066821517086556868950832e+38", RoundingMode.ROUND_CEIL); + t("2.230431257587000243746564167163186447940405426320077e+51", "2.230431257587000243746564167163186447940405426320076383541377505288703330654e+51", RoundingMode.ROUND_CEIL); + t("6494555134286333798", "6494555134286333798.4", RoundingMode.ROUND_DOWN); + t("462", "461.59410222325557994522667", RoundingMode.ROUND_HALF_UP); + t("5.39024618638372653122483710077093421975991216013901874390338817595e+65", "5.390246186383726531224837100770934219759912160139018743903388175945025e+65", RoundingMode.ROUND_UP); + t("1.12532182738546905376329237437102170669599779470511645090705e+59", "1.125321827385469053763292374371021706695997794705116450907054172134550142e+59", RoundingMode.ROUND_HALF_DOWN); + t("3.601323497164902344681087151677942539149573539415387031319081234142241e+69", "3.60132349716490234468108715167794253914957353941538703131908123414224106980338319e+69", RoundingMode.ROUND_FLOOR); + t("8.3500141350805991379256449644186334968168974724806389539568927554e+64", "8.350014135080599137925644964418633496816897472480638953956892755422515632060455336286e+64", RoundingMode.ROUND_FLOOR); + t("5.401131445300570554896434535066508128e+36", "5.4011314453005705548964345350665081270950342624714457010875100354387132625661e+36", RoundingMode.ROUND_CEIL); + t("9.6338971507843956503609197751788e+31", "9.633897150784395650360919775178841334361839784e+31", RoundingMode.ROUND_FLOOR); + t("3055045603560147538", "3055045603560147538.3515", RoundingMode.ROUND_HALF_DOWN); + t("1.0337875723141065649275067510790681222557486415834002e+52", "1.03378757231410656492750675107906812225574864158340024144131893262996852354157450707845e+52", RoundingMode.ROUND_FLOOR); + t("6628586154", "6628586154.6", RoundingMode.ROUND_FLOOR); + t("33", "32.373155518538415", RoundingMode.ROUND_UP); + t("360573130404", "360573130404.1772", RoundingMode.ROUND_HALF_UP); + t("2.600098587066400190213419659095053181377974125e+45", "2.6000985870664001902134196590950531813779741255420320463e+45", RoundingMode.ROUND_DOWN); + t("75065387", "75065386.98302833398157725347298017479752418", RoundingMode.ROUND_UP); + t("6.8963281585506360266597808464229207581611594829703695196321237700812792e+70", "6.89632815855063602665978084642292075816115948297036951963212377008127918992506071226e+70", RoundingMode.ROUND_CEIL); + t("9.28197726936724954894573282211104735760787482097421156e+55", "9.281977269367249548945732822111047357607874820974211559982916467270345710190773e+55", RoundingMode.ROUND_HALF_DOWN); + t("3.907918344492889760185116925702963410054303636244477844047e+57", "3.907918344492889760185116925702963410054303636244477844046640552136476663480363798160760359609745e+57", RoundingMode.ROUND_HALF_DOWN); + t("20390", "20389.50608970538326", RoundingMode.ROUND_HALF_EVEN); + t("169686499443647", "169686499443646.100053454", RoundingMode.ROUND_UP); + t("1.14751034435884033701335834374150193187852871899067496879575846043627e+68", "1.14751034435884033701335834374150193187852871899067496879575846043626932134782274903719229367322867524e+68", RoundingMode.ROUND_HALF_DOWN); + t("3", "3.371802754012374149032621660036326692709", RoundingMode.ROUND_DOWN); + t("6571532413631720476", "6571532413631720476.8387885238245530034497383", RoundingMode.ROUND_DOWN); + t("711645553194682", "711645553194682", RoundingMode.ROUND_HALF_EVEN); + t("4022796", "4022795.687", RoundingMode.ROUND_HALF_EVEN); + t("7.4520872837909058911068647601019387382029518098e+46", "7.45208728379090589110686476010193873820295180975587424115061e+46", RoundingMode.ROUND_CEIL); + t("8.03496111125697330071171956759554080088783440345e+47", "8.034961111256973300711719567595540800887834403452118760463608845e+47", RoundingMode.ROUND_HALF_EVEN); + t("8.55511850491578616176163093563708160895365268972005384027430492224050471255e+74", "8.5551185049157861617616309356370816089536526897200538402743049222405047125441939022661980752136356946774e+74", RoundingMode.ROUND_UP); + t("9.410089814611218259774585235e+27", "9.410089814611218259774585235484822e+27", RoundingMode.ROUND_DOWN); + + t("7.7606205390697079697957946444343391883700844095450185e+52", "7.7606205390697079697957946444343391883700844095450185e+52", RoundingMode.ROUND_HALF_UP); + t("4.58994818214423764644807412616998882808679714838440424403030461797814893812e+74", "4.58994818214423764644807412616998882808679714838440424403030461797814893812342208878013e+74", RoundingMode.ROUND_HALF_EVEN); + t("2.352923246599896770944553256e+27", "2.352923246599896770944553255908913239e+27", RoundingMode.ROUND_UP); + t("6.57437044461257145907456386880266741220483546270538944188089263831541580968217e+77", "6.5743704446125714590745638688026674122048354627053894418808926383154158096821662727e+77", RoundingMode.ROUND_CEIL); + t("5.144471216454355074735516002140628838593038720756482e+51", "5.144471216454355074735516002140628838593038720756481881662e+51", RoundingMode.ROUND_HALF_EVEN); + t("7.55341561758734508030157277452437863273441605731555574e+54", "7.553415617587345080301572774524378632734416057315555740173241606524174749783e+54", RoundingMode.ROUND_HALF_DOWN); + t("4.354982111603472427964762e+25", "4.3549821116034724279647619493655447118997607358552409709e+25", RoundingMode.ROUND_CEIL); + t("6509325589913679", "6509325589913678.913617766383998659496023511512858", RoundingMode.ROUND_CEIL); + t("666281", "666280.13924571686833198933637667668112364", RoundingMode.ROUND_CEIL); + t("9.60199236890422200332350658058079087150429925358407963e+53", "9.6019923689042220033235065805807908715042992535840796342235866415544833610757e+53", RoundingMode.ROUND_HALF_UP); + t("1.62306671385880562700401146583371770207236387224456185716632e+59", "1.62306671385880562700401146583371770207236387224456185716632051105062492e+59", RoundingMode.ROUND_HALF_DOWN); + t("3.90349821730036455964772370048656246021974386995415e+51", "3.90349821730036455964772370048656246021974386995415033871223679e+51", RoundingMode.ROUND_HALF_UP); + t("3.895161261341522686895752632514847521825863076204798881839954312741e+66", "3.8951612613415226868957526325148475218258630762047988818399543127409e+66", RoundingMode.ROUND_HALF_UP); + t("6.25312627484320038802792129687993e+32", "6.25312627484320038802792129687992603074108932199032287019e+32", RoundingMode.ROUND_CEIL); + t("7.5312441243891577030062206881031743279845658681657662674e+55", "7.5312441243891577030062206881031743279845658681657662674103562801e+55", RoundingMode.ROUND_HALF_EVEN); + t("318581309743", "318581309742.186842979710587", RoundingMode.ROUND_UP); + t("7.50855745791198760171353157088272348952587600306034994135951635926213e+68", "7.508557457911987601713531570882723489525876003060349941359516359262129e+68", RoundingMode.ROUND_CEIL); + t("6.23597982856234075088091595070521511023354363e+44", "6.2359798285623407508809159507052151102335436295014681064614367149e+44", RoundingMode.ROUND_UP); + t("84322488230978019136", "84322488230978019135.2227356965742193995386131512728", RoundingMode.ROUND_CEIL); + t("16764", "16764.8665898588107088341937975401", RoundingMode.ROUND_DOWN); + t("8.18935827058262157249579209e+26", "8.18935827058262157249579208026965e+26", RoundingMode.ROUND_UP); + t("491791160034568602461", "491791160034568602460.83489923404591775163573", RoundingMode.ROUND_CEIL); + t("6.229504129470767563312789386745388612037820576806e+48", "6.2295041294707675633127893867453886120378205768067974267924876508095964334825746814e+48", RoundingMode.ROUND_DOWN); + t("1.208874896653745206039245186466009495535378043650030890890869246166106563569228e+78", "1.2088748966537452060392451864660094955353780436500308908908692461661065635692279595e+78", RoundingMode.ROUND_HALF_DOWN); + t("9.80626682576630111702042213110361224617656870277610076975453108e+63", "9.80626682576630111702042213110361224617656870277610076975453108044184252370387593526284191295431542542e+63", RoundingMode.ROUND_HALF_UP); + t("9.1613888774072527927195114711544852205567780437825695734193073459254248e+70", "9.1613888774072527927195114711544852205567780437825695734193073459254248529627314400484204661430178990453637e+70", RoundingMode.ROUND_DOWN); + t("673517021208", "673517021208.9520590811346224620465", RoundingMode.ROUND_DOWN); + t("488983444", "488983443.827", RoundingMode.ROUND_UP); + t("4.6337190267670232287172031071723722378294103664e+46", "4.6337190267670232287172031071723722378294103663127179388e+46", RoundingMode.ROUND_UP); + t("6.3139597581687527606169340957866e+31", "6.313959758168752760616934095786555041536228188648917605288037039409e+31", RoundingMode.ROUND_CEIL); + t("1.54184940885928055170683378871489428906271821461859385037189717e+62", "1.54184940885928055170683378871489428906271821461859385037189717286319190992985766786581164023647478686e+62", RoundingMode.ROUND_HALF_EVEN); + t("1.63191916991957661548524946828787075953112885078e+48", "1.6319191699195766154852494682878707595311288507800818816847603111640452525132673e+48", RoundingMode.ROUND_HALF_EVEN); + t("2", "1.173623567", RoundingMode.ROUND_UP); + t("52181901174680", "52181901174680.411663178526728847034927", RoundingMode.ROUND_DOWN); + t("1.4428724102781618642158162144368851918104e+40", "1.442872410278161864215816214436885191810322778115208449994477462682497831e+40", RoundingMode.ROUND_UP); + t("2.11079443220477721164615243276424047214227366133785871797501665832663e+68", "2.110794432204777211646152432764240472142273661337858717975016658326637343733212934e+68", RoundingMode.ROUND_FLOOR); + t("7.01873743153639142702763253786592257300036204279037943e+53", "7.0187374315363914270276325378659225730003620427903794263281588858684437869318245e+53", RoundingMode.ROUND_HALF_UP); + t("297335892209058", "297335892209058.681131934803840285606124", RoundingMode.ROUND_FLOOR); + t("8.248773121583558644485e+21", "8.24877312158355864448508e+21", RoundingMode.ROUND_DOWN); + t("4.28146436685796776936219858146868127921870561782487170316457881813318743106081e+77", "4.28146436685796776936219858146868127921870561782487170316457881813318743106081369565342945403698537616397552596e+77", RoundingMode.ROUND_HALF_UP); + t("9.9820005984048321058530905694335215253469647160852278493082995163703534074e+73", "9.982000598404832105853090569433521525346964716085227849308299516370353407378913408895725481e+73", RoundingMode.ROUND_CEIL); + t("9.148522784578220274278e+21", "9.14852278457822027427775281695859151371500029e+21", RoundingMode.ROUND_CEIL); + t("9.939519663839419097084309722114337860929618038e+45", "9.93951966383941909708430972211433786092961803758074876538411188673348e+45", RoundingMode.ROUND_UP); + t("632030633305048023685", "632030633305048023685", RoundingMode.ROUND_HALF_DOWN); + t("4076", "4076.17183659158963369847898", RoundingMode.ROUND_HALF_UP); + t("5.0915870680446042240788973434264033797234724711318458318825931704e+64", "5.09158706804460422407889734342640337972347247113184583188259317035179494921e+64", RoundingMode.ROUND_HALF_DOWN); + t("2.764391420260965121209440896051695682676356191890177e+51", "2.7643914202609651212094408960516956826763561918901765856732207162244848e+51", RoundingMode.ROUND_HALF_UP); + t("3.9447030166935777285149689808260893983776285e+43", "3.9447030166935777285149689808260893983776284915557532e+43", RoundingMode.ROUND_CEIL); + t("8.010340555613665231927395659663971527793424333051426839523457029297415808148e+75", "8.01034055561366523192739565966397152779342433305142683952345702929741580814831598882542203e+75", RoundingMode.ROUND_DOWN); + t("4.5925662338700879558086060238867215491730251801245149826509116719e+64", "4.59256623387008795580860602388672154917302518012451498265091167181660209345699020845019573551693665e+64", RoundingMode.ROUND_UP); + t("36504551", "36504550.50166831479470939986155470151861004", RoundingMode.ROUND_HALF_DOWN); + t("2.12540209018988712945893945069101074121688475e+44", "2.12540209018988712945893945069101074121688475323726090278554628156391087371545506904e+44", RoundingMode.ROUND_HALF_DOWN); + t("181125152", "181125151.99491757248404575757536635094871583", RoundingMode.ROUND_UP); + t("5.779523432816833924616772030412948003386911576895800096115162704042415963289556e+78", "5.7795234328168339246167720304129480033869115768958000961151627040424159632895565935151683005e+78", RoundingMode.ROUND_DOWN); + t("9.17826096990960792013134687632848447684591816754268192955e+56", "9.17826096990960792013134687632848447684591816754268192954583e+56", RoundingMode.ROUND_HALF_UP); + t("7.37421367532529067061667742667390536373826923290956e+50", "7.37421367532529067061667742667390536373826923290955104174785628111147170055463656e+50", RoundingMode.ROUND_CEIL); + t("4", "4.3686309345715094939913360017624432429", RoundingMode.ROUND_HALF_DOWN); + t("8.3594110965962381130596855916957925566323732058003739681143185743e+64", "8.35941109659623811305968559169579255663237320580037396811431857425404163e+64", RoundingMode.ROUND_HALF_UP); + t("5.8017462781868947979669035963150371455e+37", "5.80174627818689479796690359631503714551627518481e+37", RoundingMode.ROUND_DOWN); + t("1.90669137860811651611491585358014142495464234863436909519124432366465306869e+74", "1.9066913786081165161149158535801414249546423486343690951912443236646530686990503828136061620899505412969685328e+74", RoundingMode.ROUND_DOWN); + t("65827281", "65827281.952680368668829078", RoundingMode.ROUND_DOWN); + t("3.796975029309190153935073574227749285722909213685e+48", "3.79697502930919015393507357422774928572290921368440305490055258561431112182290578246e+48", RoundingMode.ROUND_UP); + t("7891207466205997", "7891207466205997.584874499696221437", RoundingMode.ROUND_DOWN); + t("2.94745525109421961698647322282990083780723298975940062387186332e+63", "2.94745525109421961698647322282990083780723298975940062387186331961089494759e+63", RoundingMode.ROUND_HALF_EVEN); + t("4.34282947014265862495e+21", "4.34282947014265862495e+21", RoundingMode.ROUND_HALF_UP); + t("9.1641692214618337763737436252361499553979881311255799266612e+58", "9.1641692214618337763737436252361499553979881311255799266611244928024975394877156e+58", RoundingMode.ROUND_CEIL); + t("5.864333650394800685281265896322e+30", "5.864333650394800685281265896322331612364407086e+30", RoundingMode.ROUND_HALF_DOWN); + t("7.48583556770321193530048004930689224512462576e+44", "7.485835567703211935300480049306892245124625769726886498025816e+44", RoundingMode.ROUND_DOWN); + t("537697", "537697.02142073166750345433592", RoundingMode.ROUND_HALF_DOWN); + t("6.746416112722632847560558595748474646323241803499729e+51", "6.7464161127226328475605585957484746463232418034997282515230110158271943e+51", RoundingMode.ROUND_CEIL); + t("348870466676427057", "348870466676427056.540210736720958044510813849897553858", RoundingMode.ROUND_UP); + t("12657090", "12657089.364186117157400260898", RoundingMode.ROUND_UP); + t("1.031300029476346901189374675983105405944047815464946132481100505e+63", "1.03130002947634690118937467598310540594404781546494613248110050480689644637863861125e+63", RoundingMode.ROUND_HALF_DOWN); + t("2.615472057019087907913471735667812386452505134772501355517041236227187e+69", "2.6154720570190879079134717356678123864525051347725013555170412362271865410294e+69", RoundingMode.ROUND_UP); + t("7.04165504077691457763479440814442249894246758944393488056686043599000962e+71", "7.0416550407769145776347944081444224989424675894439348805668604359900096153767456881719096558635e+71", RoundingMode.ROUND_HALF_DOWN); + t("7354818904551179123", "7354818904551179122.7014798901745046823977703675030620318379", RoundingMode.ROUND_UP); + t("854817485148361", "854817485148360.5714740113462989051407045497052073830764", RoundingMode.ROUND_HALF_EVEN); + t("47000805088498599710", "47000805088498599709.708437024062675608904338047", RoundingMode.ROUND_UP); + t("2.1766018980782941709650115665537351498889478677e+47", "2.1766018980782941709650115665537351498889478677028004204702111607312292840436359777e+47", RoundingMode.ROUND_HALF_DOWN); + t("7.8367301959920444880797359773949243636413420565977635106208263575374910713015704e+79", "7.83673019599204448807973597739492436364134205659776351062082635753749107130157048971635283591024e+79", RoundingMode.ROUND_DOWN); + t("3.08903346956401542864799535261274279172597713664198203701807794e+62", "3.0890334695640154286479953526127427917259771366419820370180779377521270933350292462773167787142e+62", RoundingMode.ROUND_HALF_DOWN); + t("576562571", "576562571.844608138306992462909059062174553", RoundingMode.ROUND_FLOOR); + t("4.88885922847235829453662441295981179020690065850389e+50", "4.8888592284723582945366244129598117902069006585038897785761278e+50", RoundingMode.ROUND_UP); + t("805030", "805030.3196150823480264115976649255009294", RoundingMode.ROUND_FLOOR); + t("3.75867227262935844604124624219765052177179e+41", "3.758672272629358446041246242197650521771793e+41", RoundingMode.ROUND_HALF_EVEN); + t("8.75150119113270892435492538833147019932204241197862490821051048044419e+68", "8.751501191132708924354925388331470199322042411978624908210510480444188669757061961455531943e+68", RoundingMode.ROUND_UP); + t("42601873172232953", "42601873172232953.30659313764825104206642999", RoundingMode.ROUND_FLOOR); + t("1.8171003585956362231021760046143097114054128693433487680606690918875530579038e+76", "1.81710035859563622310217600461430971140541286934334876806066909188755305790370439773413227239119191673971090333e+76", RoundingMode.ROUND_CEIL); + t("3.71331955392433687189949e+23", "3.7133195539243368718994912855e+23", RoundingMode.ROUND_HALF_EVEN); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalSignTests.cs b/DecimalSharp.Tests/BigDecimalSignTests.cs new file mode 100644 index 0000000..c3397e1 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalSignTests.cs @@ -0,0 +1,46 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalSign")] + public class BigDecimalSignTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Sign() + { + var bigDecimalFactory = new BigDecimalFactory(); + + var t = (BigDecimalArgument n, int? expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.Sign(n)); + }; + + t(double.NaN, null); + t("NaN", null); + t(double.PositiveInfinity, 1); + t(double.NegativeInfinity, -1); + t("Infinity", 1); + t("-Infinity", -1); + + BigDecimalTests.assert((double)1 / bigDecimalFactory.Sign("0") == double.PositiveInfinity); + BigDecimalTests.assert((double)1 / bigDecimalFactory.Sign(bigDecimalFactory.BigDecimal("0")) == double.PositiveInfinity); + //BigDecimalTests.assert((double)1 / bigDecimalFactory.sign("-0") == double.NegativeInfinity); + //BigDecimalTests.assert((double)1 / bigDecimalFactory.sign(bigDecimalFactory.BigDecimal("-0")) == double.NegativeInfinity); + + t("0", 0); + //t("-0", -0); + t("1", 1); + t("-1", -1); + t("9.99", 1); + t("-9.99", -1); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalSinTests.cs b/DecimalSharp.Tests/BigDecimalSinTests.cs new file mode 100644 index 0000000..64ed861 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalSinTests.cs @@ -0,0 +1,142 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalSin")] + public class BigDecimalSinTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Sin() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Sin().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", 20, RoundingMode.ROUND_HALF_UP, "0"); + t("-0", 20, RoundingMode.ROUND_HALF_UP, "-0"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + + t("93332358216", 48, RoundingMode.ROUND_HALF_DOWN, "0.000816283943127306029649893248669685836695194145277"); + t("766737078569022420173292205068953186848344673451240027655054631094318050", 18, RoundingMode.ROUND_HALF_EVEN, "0.00111135055272494455"); + + t("0.359136383962093189473162700700590970518456985109181875257764726415814563424613193774806585890478208084275468196568294033", 38, RoundingMode.ROUND_DOWN, "0.35146584650000000000000000000000000006"); + t("3202222222227222222222222222222224222222222222222222222222.222222222222222222222222222", 7, RoundingMode.ROUND_UP, "0.5499568"); + t("8", 5, RoundingMode.ROUND_HALF_EVEN, "0.98936"); + t("0.15865555", 6, RoundingMode.ROUND_UP, "0.157991"); + t("4.752", 5, RoundingMode.ROUND_HALF_DOWN, "-0.99922"); + t("82315980453524767298085693995239044972", 5, RoundingMode.ROUND_HALF_EVEN, "0.18971"); + t("9975666666", 10, RoundingMode.ROUND_HALF_UP, "-0.1932244457"); + t("8111111111111111222222222222222.1118", 8, RoundingMode.ROUND_HALF_UP, "0.93383768"); + t("1582389099446045988.444444444164077777777777777777", 3, RoundingMode.ROUND_HALF_DOWN, "0.145"); + t("42.29499991999999919999999919", 2, RoundingMode.ROUND_HALF_DOWN, "-0.99"); + t("2", 3, RoundingMode.ROUND_DOWN, "0.909"); + t("225204831071708162873414430801935442203", 3, RoundingMode.ROUND_HALF_UP, "-0.367"); + t("70387777777777777777", 6, RoundingMode.ROUND_HALF_EVEN, "-0.903662"); + t("0.000009960105486531367489163480390414384530151948706557615588133070855712559603", 5, RoundingMode.ROUND_FLOOR, "0.0000099601"); + t("2.3", 1, RoundingMode.ROUND_HALF_DOWN, "0.7"); + t("0.0369897655941305860082440964", 1, RoundingMode.ROUND_UP, "0.04"); + t("93333333333.1111111113333335607254506018497853948241554833333333", 1, RoundingMode.ROUND_HALF_UP, "1"); + t("0.81475726", 10, RoundingMode.ROUND_CEIL, "0.7275590895"); + t("0.0020719", 5, RoundingMode.ROUND_CEIL, "0.0020719"); + t("0.822309454290117043180146453820530722", 3, RoundingMode.ROUND_CEIL, "0.733"); + t("811801481366184919659088.161679696898591", 8, RoundingMode.ROUND_UP, "-0.33739172"); + t("82222222239", 6, RoundingMode.ROUND_DOWN, "0.85357"); + t("0.671515352458", 4, RoundingMode.ROUND_DOWN, "0.6221"); + t("0.1", 10, RoundingMode.ROUND_CEIL, "0.09983341665"); + t("30.4507", 5, RoundingMode.ROUND_UP, "-0.82218"); + t("82539", 1, RoundingMode.ROUND_HALF_EVEN, "0.06"); + t("7904297312438003184", 8, RoundingMode.ROUND_DOWN, "0.88548151"); + t("1555591677261255189013625216076301609467761280", 4, RoundingMode.ROUND_HALF_UP, "0.6012"); + t("0.206", 5, RoundingMode.ROUND_UP, "0.20455"); + t("47.85", 4, RoundingMode.ROUND_FLOOR, "-0.664"); + t("354522", 6, RoundingMode.ROUND_UP, "-0.432959"); + t("57111.555555555551111", 9, RoundingMode.ROUND_DOWN, "-0.51645502"); + t("5084117035723528870966332457.91693481159599044107", 10, RoundingMode.ROUND_UP, "0.5456651665"); + t("66", 3, RoundingMode.ROUND_CEIL, "-0.0265"); + t("4415133931290705273393593393689.69701970681754754956578240920056", 3, RoundingMode.ROUND_HALF_UP, "0.651"); + t("4641", 4, RoundingMode.ROUND_DOWN, "-0.7628"); + t("60782.222222", 3, RoundingMode.ROUND_UP, "-0.967"); + t("9295.7", 4, RoundingMode.ROUND_DOWN, "0.2692"); + t("660060.8", 5, RoundingMode.ROUND_HALF_EVEN, "-0.3736"); + t("86", 7, RoundingMode.ROUND_UP, "-0.9234585"); + t("0.867224365334893476015547423881141062327495194226274166759019810427983958472019", 7, RoundingMode.ROUND_UP, "0.7625362"); + t("35", 9, RoundingMode.ROUND_HALF_UP, "-0.428182669"); + t("6.4522", 4, RoundingMode.ROUND_CEIL, "0.1683"); + t("74298341154961724283464838063126436742467617925325544", 6, RoundingMode.ROUND_HALF_DOWN, "0.381838"); + t("98.9", 1, RoundingMode.ROUND_FLOOR, "-1"); + t("8719985534823285.8450271997", 5, RoundingMode.ROUND_HALF_UP, "-0.43915"); + t("0.9528405", 9, RoundingMode.ROUND_UP, "0.815064492"); + t("3007.440843", 1, RoundingMode.ROUND_FLOOR, "-0.9"); + t("8821000", 9, RoundingMode.ROUND_FLOOR, "-0.999820738"); + t("0.7244", 2, RoundingMode.ROUND_HALF_DOWN, "0.66"); + t("223798525254185007541841321707204622.59819179923", 16, RoundingMode.ROUND_DOWN, "0.7304638404669184"); + t("29832077939805655500490926756388", 31, RoundingMode.ROUND_HALF_DOWN, "0.9999881003434971787558628446047"); + t("13555555555555.00000000000000000472565", 49, RoundingMode.ROUND_DOWN, "0.6767787926553990715415556952412713237217924208783"); + t("899998709983400169781485597598985275361858454653904477166", 80, RoundingMode.ROUND_UP, "-0.9619682988852763093696947825524296540074948329137260856105387448568258894882118"); + t("39826881720735191122621609200399853", 63, RoundingMode.ROUND_HALF_EVEN, "0.808868299975611790138921415253062939870563699821120858587818528"); + t("0.005341982048471623278003226810889859381173803701969742990587783072822", 70, RoundingMode.ROUND_HALF_UP, "0.005341956641353734027312587021500975661701907307617983686735841700502311"); + t("277.9997777777777716692059399741498679999", 30, RoundingMode.ROUND_HALF_EVEN, "0.999514190524582708045097875864"); + t("61429536536284373.1373681766492167", 72, RoundingMode.ROUND_UP, "-0.987289391477952440400357263926723647295916567423922849613191038848150249"); + t("7499999999909999997.909999999999", 71, RoundingMode.ROUND_HALF_UP, "0.34301339416705489181513042461845425762147177499632116466434976820897798"); + t("349999995999999999939992999.92", 78, RoundingMode.ROUND_HALF_UP, "0.470719374558628137654141208065693026899676258865423797523069796274766223234845"); + t("44510000000002060000000000000000.0200000008", 20, RoundingMode.ROUND_HALF_DOWN, "0.94842545081726504808"); + t("62222222222293973777.555555555555577777777777", 20, RoundingMode.ROUND_DOWN, "0.97474440584787996681"); + t("0.00000075952439582097539633", 49, RoundingMode.ROUND_HALF_EVEN, "0.0000007595243958209023709318824206298992320090760083707"); + t("6466917226846635097989717000204.490981137498768", 23, RoundingMode.ROUND_HALF_EVEN, "-0.5067890798594245927272"); + t("90000000000000007122", 12, RoundingMode.ROUND_UP, "-0.953061948465"); + t("0.422029137363394323", 22, RoundingMode.ROUND_HALF_DOWN, "0.4096123952171808560627"); + t("818.843", 70, RoundingMode.ROUND_DOWN, "0.8968883045810930941510638401062405075664719019866066309176929107557629"); + t("30000000000000000200000000000003000000000000005.0000009", 50, RoundingMode.ROUND_CEIL, "-0.12313481713171373142907951990491671356466363502241"); + t("975675853314022371079225", 48, RoundingMode.ROUND_HALF_DOWN, "0.880137190184686438889125592539968640170534430859"); + t("0.00000066558889026", 77, RoundingMode.ROUND_HALF_EVEN, "0.00000066558889025995085640282676346670712623242127613563915036627009080674622220984"); + t("69299999.9999999999999", 46, RoundingMode.ROUND_HALF_DOWN, "-0.3462252058608000475638742067375334366431550575"); + t("8111111111267488711.9286432453434826269588597", 62, RoundingMode.ROUND_HALF_UP, "-0.99113853372157352283292183868051054140090305817866106070973511"); + t("82", 71, RoundingMode.ROUND_UP, "0.31322878243308515263353199729481870255069002611658346075413062493460387"); + t("488826170909042284127242210428971", 76, RoundingMode.ROUND_HALF_EVEN, "0.8995289099301142050732477297866877720021805553317366849920338096104233105207"); + t("9092229227242222522222222222.66", 18, RoundingMode.ROUND_UP, "-0.935465793019682237"); + t("5805959970379373082098495883210891370.0067111", 46, RoundingMode.ROUND_HALF_EVEN, "0.2201197700332631564419599177639647998475543596"); + t("926600000000000000590", 41, RoundingMode.ROUND_CEIL, "0.81228550764810620054247659502626219692234"); + t("619490746366110587736593084360", 65, RoundingMode.ROUND_DOWN, "0.21194121003724604936564767272815880572843184525364715905320674006"); + t("5473424", 25, RoundingMode.ROUND_UP, "0.09262060997310434002923837"); + t("5666666666666666666666666666666666666666666666616666626.6666", 87, RoundingMode.ROUND_HALF_UP, "-0.977239495645491722400759456250446932597508047794151805593705662875402907345001472700784"); + t("499999.99999899999999999999999999999999999", 78, RoundingMode.ROUND_HALF_DOWN, "0.177832185579176104658571003320627225266903968719990210539163985433843099469721"); + t("900000", 117, RoundingMode.ROUND_FLOOR, "0.316282026370992050734738815532587276379228020456998295610327862506624971973233544404550831654146703508761520381016242"); + t("83027766684462236825322.62114650623171519639122521318", 12, RoundingMode.ROUND_HALF_UP, "-0.476316326483"); + t("925910897623", 129, RoundingMode.ROUND_HALF_DOWN, "0.792868652237225000804927754028414838623611710010734993138551247754919869022556217868513568705036768423332287103460206126685907362"); + t("2918961308828646648994639730677467564302490828837720043486456401538236854705425586479512418277497121841759061091363", 23, RoundingMode.ROUND_UP, "-0.80586906475943044297492"); + t("800000000000000", 13, RoundingMode.ROUND_CEIL, "0.9931677199759"); + t("18400003.16100000000000032", 8, RoundingMode.ROUND_HALF_EVEN, "0.27307495"); + t("99.999999999999999999999999999999999999999999999993", 63, RoundingMode.ROUND_HALF_UP, "-0.506365641109758793656557610459785432065032721296693555549406261"); + t("20694757397464803355324887435556580472151471", 24, RoundingMode.ROUND_HALF_EVEN, "-0.0958707304545699270391254"); + t("333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333335", 171, RoundingMode.ROUND_FLOOR, "0.999861104212610844432827649084650490692662683912806434297051730891484017620891490814751729807506108594451118885277110368312661669230716203945478379798471281336247356157603"); + t("22011131111011111.111111611113111111111151111111", 143, RoundingMode.ROUND_CEIL, "0.82582504036277799386306063085803210583251158969990606609364360685569588545519071481543672724620118406694191888115120286393881609546697317692404"); + t("996270725099515169352424536636186062915113219400094989.8763797268889422850038402633796294758036260533902551191769915343780424028900449342752548782035", 46, RoundingMode.ROUND_CEIL, "0.6613706114081017074779805460666900787572253475"); + t("0.780360750628373", 37, RoundingMode.ROUND_HALF_DOWN, "0.7035358359376557390803090830882458906"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalSinhTests.cs b/DecimalSharp.Tests/BigDecimalSinhTests.cs new file mode 100644 index 0000000..349c8f8 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalSinhTests.cs @@ -0,0 +1,141 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalSinh")] + public class BigDecimalSinhTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Sinh() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Sinh().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", 20, RoundingMode.ROUND_HALF_UP, "0"); + t("-0", 20, RoundingMode.ROUND_HALF_UP, "-0"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "Infinity"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "-Infinity"); + + t("-0.01117212161", 7, RoundingMode.ROUND_FLOOR, "-0.01117236"); + t("-0.01", 3, RoundingMode.ROUND_HALF_EVEN, "-0.01"); + t("0.4855939", 4, RoundingMode.ROUND_UP, "0.505"); + t("-0.35", 4, RoundingMode.ROUND_HALF_EVEN, "-0.3572"); + t("0.595", 3, RoundingMode.ROUND_UP, "0.631"); + t("-0.7", 10, RoundingMode.ROUND_DOWN, "-0.7585837018"); + t("0.477765550220420530146451989244265", 1, RoundingMode.ROUND_HALF_DOWN, "0.5"); + t("-0.6", 4, RoundingMode.ROUND_HALF_EVEN, "-0.6367"); + t("-0.7298937853748771062243", 8, RoundingMode.ROUND_DOWN, "-0.79645001"); + t("0.6654323353551357716363059061801908595169", 9, RoundingMode.ROUND_CEIL, "0.715640069"); + t("-0.822057582744136479779814788208915217619870720324021379213318423992919063068", 2, RoundingMode.ROUND_HALF_EVEN, "-0.92"); + t("0.930187069407449026594918410064", 8, RoundingMode.ROUND_HALF_EVEN, "1.0702517"); + t("-0.71551536", 7, RoundingMode.ROUND_DOWN, "-0.7781501"); + t("-0.02477", 9, RoundingMode.ROUND_CEIL, "-0.024772533"); + t("-0.5092804474897748330778251373356860713", 5, RoundingMode.ROUND_FLOOR, "-0.53159"); + t("-0.88527349524064252", 7, RoundingMode.ROUND_FLOOR, "-1.005523"); + t("0.92", 1, RoundingMode.ROUND_HALF_DOWN, "1"); + t("0.9", 9, RoundingMode.ROUND_HALF_DOWN, "1.02651673"); + t("0.01952", 4, RoundingMode.ROUND_HALF_EVEN, "0.01952"); + t("-0.7", 6, RoundingMode.ROUND_HALF_DOWN, "-0.758584"); + t("-0.9367", 1, RoundingMode.ROUND_HALF_UP, "-1"); + t("0.713075", 2, RoundingMode.ROUND_DOWN, "0.77"); + t("-0.80641", 4, RoundingMode.ROUND_HALF_DOWN, "-0.8967"); + t("0.1", 7, RoundingMode.ROUND_FLOOR, "0.1001667"); + t("0.742", 4, RoundingMode.ROUND_FLOOR, "0.8119"); + t("0.19164777", 8, RoundingMode.ROUND_HALF_DOWN, "0.19282309"); + t("-0.959128669199452184605687414702700501745933588051855", 5, RoundingMode.ROUND_FLOOR, "-1.1131"); + t("-0.82", 3, RoundingMode.ROUND_HALF_DOWN, "-0.915"); + t("-0.54", 3, RoundingMode.ROUND_HALF_UP, "-0.567"); + t("0.6187", 9, RoundingMode.ROUND_FLOOR, "0.658934392"); + t("0.5", 1, RoundingMode.ROUND_DOWN, "0.5"); + t("0.1713", 1, RoundingMode.ROUND_HALF_EVEN, "0.2"); + t("-0.09", 3, RoundingMode.ROUND_CEIL, "-0.0901"); + t("-0.149", 9, RoundingMode.ROUND_HALF_UP, "-0.149551937"); + t("-0.54", 1, RoundingMode.ROUND_DOWN, "-0.5"); + t("0.5286", 2, RoundingMode.ROUND_HALF_DOWN, "0.55"); + t("-0.2218560302782240024444484", 3, RoundingMode.ROUND_DOWN, "-0.223"); + t("0.4206503074024213359239066760263937373", 4, RoundingMode.ROUND_FLOOR, "0.4331"); + t("-0.90343297229335446769185848339321460217", 7, RoundingMode.ROUND_HALF_EVEN, "-1.031443"); + t("0.29824", 3, RoundingMode.ROUND_FLOOR, "0.302"); + t("0.970160998338313076097814326701945459022", 8, RoundingMode.ROUND_CEIL, "1.1296736"); + t("0.9", 1, RoundingMode.ROUND_HALF_DOWN, "1"); + t("0.66968", 7, RoundingMode.ROUND_HALF_EVEN, "0.7208699"); + t("-0.73978789", 4, RoundingMode.ROUND_HALF_EVEN, "-0.8091"); + t("0.4", 1, RoundingMode.ROUND_HALF_DOWN, "0.4"); + t("-0.33319", 2, RoundingMode.ROUND_CEIL, "-0.33"); + t("-0.05094763", 6, RoundingMode.ROUND_HALF_EVEN, "-0.0509697"); + t("0.147", 2, RoundingMode.ROUND_HALF_UP, "0.15"); + t("-0.7521", 3, RoundingMode.ROUND_DOWN, "-0.825"); + t("0.966", 2, RoundingMode.ROUND_DOWN, "1.1"); + t("-0.2", 6, RoundingMode.ROUND_HALF_UP, "-0.201336"); + t("0.3", 5, RoundingMode.ROUND_HALF_EVEN, "0.30452"); + t("0.2297417916367587719174729947877594919", 4, RoundingMode.ROUND_CEIL, "0.2318"); + t("0.7409761", 8, RoundingMode.ROUND_HALF_UP, "0.81066696"); + t("-0.09", 9, RoundingMode.ROUND_HALF_EVEN, "-0.0901215492"); + t("-0.18", 10, RoundingMode.ROUND_HALF_UP, "-0.1809735759"); + t("-0.5", 74, RoundingMode.ROUND_UP, "-0.5210953054937473616224256264114915591059289826114805279460935764528022509"); + t("0.949452626313209516617699142908712", 60, RoundingMode.ROUND_DOWN, "1.09867096195815727081614237630458180228025051136935234032153"); + t("-0.82630505", 54, RoundingMode.ROUND_HALF_UP, "-0.923598615474838199854541207197320474034631988093767029"); + t("-0.14360721351237246987568757034881684526233784917328314", 51, RoundingMode.ROUND_HALF_EVEN, "-0.144101325429405622590434840215545338787652919410578"); + t("-0.4733", 23, RoundingMode.ROUND_DOWN, "-0.49116986771004112197472"); + t("-0.5044771449885283269", 58, RoundingMode.ROUND_FLOOR, "-0.5261490899404374562669581230733559491094381606214659786475"); + t("0.5292602", 35, RoundingMode.ROUND_HALF_UP, "0.55431766127533774367181438483674235"); + t("0.3540955931426128907807", 61, RoundingMode.ROUND_CEIL, "0.361541756843620905162708539502960691569195176490187925093063"); + t("-0.10396270844781004445623314451335288", 42, RoundingMode.ROUND_HALF_DOWN, "-0.104150085412880845209759850184027732716498"); + t("0.34005327", 75, RoundingMode.ROUND_HALF_EVEN, "0.346645013173896201527795410362292912629770127776147273389479491565524413729"); + t("-0.465", 56, RoundingMode.ROUND_FLOOR, "-0.48193954184873018412767665045542782421613788403587256476"); + t("0.6", 31, RoundingMode.ROUND_HALF_UP, "0.6366535821482412711234543754651"); + t("-0.5481208052771", 80, RoundingMode.ROUND_HALF_EVEN, "-0.57598196281877562249156649817140676025943322140952007665313949431943795521753859"); + t("0.4658", 43, RoundingMode.ROUND_CEIL, "0.4828277558817488705330396156695883903876349"); + t("0.658924", 67, RoundingMode.ROUND_UP, "0.7076519258213409489258117150888493713909348882371351431016717177769"); + t("0.84095", 76, RoundingMode.ROUND_HALF_UP, "0.9436339889105945408359964397732399439736824767663826815978864604057978720873"); + t("0.1", 42, RoundingMode.ROUND_DOWN, "0.10016675001984402582372938352190502351492"); + t("-0.546469309180216992488477103741682161392", 53, RoundingMode.ROUND_UP, "-0.57407689286989186234869758011224724765162964238150871"); + t("0.952940960228", 79, RoundingMode.ROUND_HALF_EVEN, "1.103860008709590589328393540207693314047991810042822431557364905168130459211928"); + t("0.5412557", 49, RoundingMode.ROUND_HALF_EVEN, "0.5680730254090400844499466841744626100138640781665"); + t("-0.4", 48, RoundingMode.ROUND_CEIL, "-0.410752325802815508540210013844698104353150924363"); + t("0.40959", 40, RoundingMode.ROUND_CEIL, "0.4211388569626912767627807558369832974574"); + t("-0.2071333563131394184890351", 55, RoundingMode.ROUND_HALF_DOWN, "-0.2086176863728173404729808287424406991153510048007845957"); + t("-0.006158312564838233045293421864257772700745093081", 113, RoundingMode.ROUND_HALF_DOWN, "-0.0061583514903881113191917490082260881905532636435605944044826372766861550655521768577200191192576920019205813951089"); + t("-0.94735419679918088022811807376056681040587805226146", 33, RoundingMode.ROUND_UP, "-1.09555590192578368678418405664044"); + t("0.3858706779532718096507434549", 90, RoundingMode.ROUND_HALF_UP, "0.395517999377232409663582197928235951630498131157951753386415315480929149180554295455429916"); + t("-0.54290785843486103750513205980437253195531977198208721625688182147166538076323037457917540157093128639", 47, RoundingMode.ROUND_HALF_EVEN, "-0.56997393244891117340616510127151254831177604424"); + t("-0.557397920603136432530648049076469730271228686196969657", 23, RoundingMode.ROUND_UP, "-0.58671285120863734551043"); + t("-0.116426108886043214339286002636572559104915423316062689133928015970375", 86, RoundingMode.ROUND_UP, "-0.11668931394827265385287124886310892715353176113654298509501455004648909379387424934137"); + t("0.20004668", 65, RoundingMode.ROUND_HALF_UP, "0.20138361947662140883950941306502243833641683553233187922633602303"); + t("-0.72854338143449469754924045207742119688876235959260851289818192195120823675633348027917164866022227116150939180735340401518132565983221327345338239572304554973", 57, RoundingMode.ROUND_UP, "-0.794724373946660205913430120299005955752529862100864743743"); + t("0.7075348682409645", 33, RoundingMode.ROUND_FLOOR, "0.768062858516298468179764221964258"); + t("0.9656450627407202186276140853108319189098662197785614356229", 112, RoundingMode.ROUND_HALF_EVEN, "1.122871917243193329250848114954520140832952763020717131988745064541821469254295854275194543068093878175092993757"); + t("-0.3074887163636747690696589824464611540801585", 75, RoundingMode.ROUND_HALF_DOWN, "-0.312357149174629557268287563048266380887783749410576774474545432310552964774"); + t("0.35414105198707877919833655237627933385061464419", 75, RoundingMode.ROUND_FLOOR, "0.361590095862779887666259058403870675910577905319211259160227815980416737104"); + t("-0.22861250504316830507", 15, RoundingMode.ROUND_HALF_UP, "-0.230609070338079"); + t("0.3531311134837489181774304448792305788668900001541312879645273208393370689493465894263207269785178211563373399080451907494623164005742217451839584169072958609799133150259273", 104, RoundingMode.ROUND_UP, "0.36051634575023901465038196038262241500129988486533222911437937013660152976667815350655235742420924031229"); + t("0.04434967092552732411292905", 99, RoundingMode.ROUND_CEIL, "0.0443642108672289452509083305837598955470962269229557910757510910026528522969230426477915847556546583"); + t("-0.20001290733229792426683137634566153903", 21, RoundingMode.ROUND_HALF_UP, "-0.201349168898446405328"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalSqrtTests.cs b/DecimalSharp.Tests/BigDecimalSqrtTests.cs new file mode 100644 index 0000000..c01b3aa --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalSqrtTests.cs @@ -0,0 +1,568 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; +using System.Globalization; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalSqrt")] + public class BigDecimalSqrtTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Sqrt() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Sqrt().ValueOf()); + }; + + t("NaN", double.NaN, 20, RoundingMode.ROUND_HALF_UP); + t("2", 4, 20, RoundingMode.ROUND_HALF_UP); + t("0.1", 0.01, 20, RoundingMode.ROUND_HALF_UP); + t("0", 0, 20, RoundingMode.ROUND_HALF_UP); + t("-0", "-0", 20, RoundingMode.ROUND_HALF_UP); + t("0", "0", 20, RoundingMode.ROUND_HALF_UP); + t("-0", "-0", 20, RoundingMode.ROUND_HALF_UP); + + t("Infinity", double.PositiveInfinity, 20, RoundingMode.ROUND_HALF_UP); + t("NaN", double.NegativeInfinity, 20, RoundingMode.ROUND_HALF_UP); + + t("NaN", -1, 20, RoundingMode.ROUND_HALF_UP); + t("NaN", -35.999, 20, RoundingMode.ROUND_HALF_UP); + t("NaN", "-0.00000000000001", 20, RoundingMode.ROUND_HALF_UP); + + Random random = new Random(); + // Test against Math.sqrt of squared integers. + for (var i = 0; i < 500; i++) + { + var j = Math.Floor(random.NextDouble() * Math.Pow(2, Math.Floor(random.NextDouble() * 26) + 1)); + j *= j; + t(Math.Sqrt(j).ToString(CultureInfo.InvariantCulture), j.ToString(CultureInfo.InvariantCulture), 20, RoundingMode.ROUND_HALF_UP); + } + + // Initial rounding tests. + t("11", "101", 2, RoundingMode.ROUND_UP); // 10.04... + t("11", "111", 2, RoundingMode.ROUND_UP); // 10.53... + t("1000", 999000.25, 3, RoundingMode.ROUND_UP); // 999.5 + + t("10", "101", 2, RoundingMode.ROUND_DOWN); + t("10", "111", 2, RoundingMode.ROUND_DOWN); + t("999", 999000.25, 3, RoundingMode.ROUND_DOWN); + + t("11", "101", 2, RoundingMode.ROUND_CEIL); + t("11", "111", 2, RoundingMode.ROUND_CEIL); + t("1000", 999000.25, 3, RoundingMode.ROUND_CEIL); + + t("10", "101", 2, RoundingMode.ROUND_FLOOR); + t("10", "111", 2, RoundingMode.ROUND_FLOOR); + t("999", 999000.25, 3, RoundingMode.ROUND_FLOOR); + + t("10", "101", 2, RoundingMode.ROUND_HALF_UP); + t("11", "111", 2, RoundingMode.ROUND_HALF_UP); + t("1000", 999000.25, 3, RoundingMode.ROUND_HALF_UP); + + t("10", "101", 2, RoundingMode.ROUND_HALF_DOWN); + t("11", "111", 2, RoundingMode.ROUND_HALF_DOWN); + t("999", 999000.25, 3, RoundingMode.ROUND_HALF_DOWN); + + t("10", "101", 2, RoundingMode.ROUND_HALF_EVEN); + t("11", "111", 2, RoundingMode.ROUND_HALF_EVEN); + t("1000", 999000.25, 3, RoundingMode.ROUND_HALF_EVEN); + + t("10", "101", 2, RoundingMode.ROUND_HALF_CEIL); + t("11", "111", 2, RoundingMode.ROUND_HALF_CEIL); + t("1000", 999000.25, 2, RoundingMode.ROUND_HALF_CEIL); + + t("10", "101", 2, RoundingMode.ROUND_HALF_FLOOR); + t("11", "111", 2, RoundingMode.ROUND_HALF_FLOOR); + t("999", 999000.25, 3, RoundingMode.ROUND_HALF_FLOOR); + + t("3.7", "13.69", 2, RoundingMode.ROUND_HALF_EVEN); + t("14.8", "219.04", 3, RoundingMode.ROUND_HALF_EVEN); + t("3.578708384438441", "12.80715370085", 16, RoundingMode.ROUND_HALF_EVEN); + t("49.56954417823", "2457.139710037", 13, RoundingMode.ROUND_HALF_EVEN); + t("4.9808503290100979", "24.80887", 17, RoundingMode.ROUND_HALF_EVEN); + t("54108953.7650348268963935650889893674872", "2927778877546676.5690784769302", 39, RoundingMode.ROUND_HALF_EVEN); + t("1.0000000000001", "1.000000000000000001402", 14, RoundingMode.ROUND_CEIL); + t("18.000001", "324.0000000000000000000008467", 8, RoundingMode.ROUND_CEIL); + t("11.00000000000000001", "121.000000000000000000000000001944", 19, RoundingMode.ROUND_UP); + t("2.00000000000001", "4.0000000000000000000000000000000005485", 15, RoundingMode.ROUND_UP); + t("7.1", "49.00000000000000000000007338", 2, RoundingMode.ROUND_UP); + t("19.00000000000001", "361.0000000000000000000000005645", 16, RoundingMode.ROUND_CEIL); + t("1.0000001", "1.00000000000000000000000000000006986", 8, RoundingMode.ROUND_UP); + t("30771277.0274560007853901874282412", "946871489900441.411712749999999999999999999999999999999999999999", 33, RoundingMode.ROUND_HALF_EVEN); + t("668.093253221434649746", "446348.594999999999999999999999999999", 21, RoundingMode.ROUND_HALF_DOWN); + t("0.9999999999999999999999999999999999999999", "0.9999999999999999999999999999999999999998", 40, RoundingMode.ROUND_HALF_DOWN); + t("0.9999999999999999999997187097975391240474677563824", "0.9999999999999999999994374195950782480949355918890297218761543222489261", 49, RoundingMode.ROUND_FLOOR); + t("0.0000000000000298840312673111495324166498096924391126062701", "8.9305532478563043E-28", 45, RoundingMode.ROUND_HALF_DOWN); + t("0.0000000000000000000000000000000000000000025385115498645", "6.4440408887956349899441566682289191111111111111111111E-84", 14, RoundingMode.ROUND_HALF_DOWN); + t("0.0000000000000000000000000000000000000000000000000000140471526414353053458592377645343274655348630930173397", "1.97322497331782876158645511100784258994087355048761111111111111E-106", 54, RoundingMode.ROUND_HALF_DOWN); + t("0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002598902022257132166703490111187879281161770014282895", "6.7542917212922111E-232", 52, RoundingMode.ROUND_HALF_DOWN); + t("0.00999999999999999999999999999949", "0.00009999999999999999999999999999", 30, RoundingMode.ROUND_DOWN); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("2.381905579721376621997401692376763128098896247600842643458999047531881813e+2763945", "5.673474190707827242511954659916889896808177096292E+5527890", 73, RoundingMode.ROUND_HALF_EVEN); + t("1.55701854242008e+46782286", "2.4243067414399499211289451653514095936017185263165775841595802781681024396317601E+93564572", 16, RoundingMode.ROUND_HALF_UP); + t("9.9154007211093362846141108573489066595648018e+35533561334", "9.831517146017554599160038642659577233621137326296138739740339E+71067122669", 44, RoundingMode.ROUND_UP); + t("2.233685316997e+25", "498935009536979677258304315852850344980736298107223.17", 13, RoundingMode.ROUND_HALF_UP); + t("5.6790521336e+45232", "3.2251633136582109206181686755297199980106981532535904612E+90465", 11, RoundingMode.ROUND_DOWN); + t("9.6241485526139652228166208472049625290167818011e+1987400693503696", "9.262423536278148172467483107114956962585715251496115897712401E+3974801387007393", 47, RoundingMode.ROUND_DOWN); + t("4.86348548114065869236934236337303e+2212121902", "2.365349102526598437724926901530502896022219085536E+4424243805", 33, RoundingMode.ROUND_FLOOR); + t("8.94274851486936491099499873074488855754871805417147437494613942878964986078571e+3335853085908", "7.9972751000198231728604329670070818587227114744864529357097524020E+6671706171817", 78, RoundingMode.ROUND_HALF_EVEN); + t("2.0885911135683898927279398736031752344015545504649127170644896370353379e-4", "4.36221283967684692666426416376714916311505871923000872592271965E-8", 71, RoundingMode.ROUND_HALF_EVEN); + t("8.026722039667633182260408511913520451120702453123749778e+1023704129", "6.442826670208612947748038374549405718510075898758412768822080597099708051296751984704859E+2047408259", 55, RoundingMode.ROUND_HALF_EVEN); + t("2.460787425752332228460163766079909e+3858273752019344", "6.05547475474079E+7716547504038688", 34, RoundingMode.ROUND_HALF_UP); + t("4.4571175021534285e+429190", "1.986589642800241768950253744134264443767020159900398126805300834E+858381", 17, RoundingMode.ROUND_HALF_DOWN); + t("9.4527e+117835031340212", "8.935356909E+235670062680425", 6, RoundingMode.ROUND_DOWN); + t("3e+4904361806", "9.24E+9808723612", 1, RoundingMode.ROUND_HALF_DOWN); + t("1.957204568476697755184197782894827661216187868664840919284816726085640525e+438", "3.83064972286605667223095591399211128840797098184470613547390920507003215236913837823828877362E+876", 73, RoundingMode.ROUND_UP); + t("8.3032395380167e+34528872", "6.89437868256825998885730788226521728356623423193748251E+69057745", 14, RoundingMode.ROUND_UP); + t("8.39e+1711992", "7.041883770880118425878239862595091826896816E+3423985", 3, RoundingMode.ROUND_HALF_EVEN); + t("9.790699916656927140739512410042075323596621289368295024430694756362358e+1202", "9.585780485802596005974448193E+2405", 70, RoundingMode.ROUND_CEIL); + t("9.847056990214885399626178374025660624889212963684855438227064306989910207e+269432", "9.696453136853983765292198202484493417225363497463637965E+538865", 73, RoundingMode.ROUND_CEIL); + t("1.7359099425e+2747", "3.013383328415989492093650804382794630962008467500528389245351791E+5494", 11, RoundingMode.ROUND_HALF_DOWN); + t("6.834069539249451103168749378990917542555757999511237679195e-204174793001024", "4.670450646729720489233321886824609831695025907588563949E-408349586002047", 58, RoundingMode.ROUND_HALF_UP); + t("3.138284384168760310983231869196862541278664719980474337283125219910900471e-34848021177070", "9.848828875917495153223800564466445801240606621764417514110475E-69696042354140", 73, RoundingMode.ROUND_UP); + t("4.00929156084328544059400729461e+7547814714", "1.6074418819849188E+15095629429", 30, RoundingMode.ROUND_HALF_DOWN); + t("9.385699983e+163", "8.80913641710599005691978950691155189458746110141164551755555797229303947815057725607373E+327", 10, RoundingMode.ROUND_HALF_DOWN); + t("2.064258493001581567732632230025244966622767522065920193424751662709921e+4395", "4.2611631259291605782486841695067759569661374268622981237845E+8790", 70, RoundingMode.ROUND_UP); + t("2.2215318528416409230049e+218258", "4.93520377319001414151248980920968837885642082455528005489000815E+436516", 25, RoundingMode.ROUND_FLOOR); + t("5.1330527926591638410946628719813202245977800293e+46304917529689", "2.6348230972226040854267304152051578667034961411058694242668334095640189241199450266226838E+92609835059379", 48, RoundingMode.ROUND_UP); + t("2.3253579055706672e-196", "5.407289389E-392", 18, RoundingMode.ROUND_HALF_EVEN); + t("2.503e+176755402701774", "6.2667203408185268363604194770009720671739738664656179598783769617970284596514793072E+353510805403548", 4, RoundingMode.ROUND_HALF_DOWN); + t("9.6369204975569156895116858673802898447044593766985526107265769189051484968e+360924246678463", "9.287023667623263145602226199798895429249583886386354524632320596574924425720535087689428938434E+721848493356927", 74, RoundingMode.ROUND_FLOOR); + t("4.65424913912969424744230257268e+92793524825107", "2.16620350490895E+185587049650215", 30, RoundingMode.ROUND_FLOOR); + t("6.01309285636782899752364197007684920017398969437949e-1790", "3.61572856993018165706134046141609828036662065978484170009821375392882703132369124228069E-3579", 51, RoundingMode.ROUND_DOWN); + t("9.509773153923080543680696577222501710491282865e+412437011050", "9.04357854390761345545547419189409265295580849E+824874022101", 46, RoundingMode.ROUND_UP); + t("1.257819302229712520962174337277372176639810260661e-44311330", "1.582109397061640889607372828919871087547023353618955613E-88622660", 49, RoundingMode.ROUND_DOWN); + t("5.60801706098533725826615935476591733e+4703349458", "3.144985535630261990939138487693918541845307202896600571E+9406698917", 36, RoundingMode.ROUND_HALF_EVEN); + t("4.520612769066843919448985334359993005870337091660370281988247839555503e+33279", "2.043593980785019831258664920277034009002215803890866800625E+66559", 70, RoundingMode.ROUND_HALF_DOWN); + t("3.9031901238112199422244215131891752614639270293050848390039e+24964497874732", "1.5234893142617446461800063194E+49928995749465", 59, RoundingMode.ROUND_DOWN); + t("1.67399696850587052605991771251848e+43519462757", "2.802265850566844477905639463307E+87038925514", 33, RoundingMode.ROUND_CEIL); + t("9.5408249368370749687627590642478e-80750", "9.1027340475372175567247E-161499", 32, RoundingMode.ROUND_HALF_UP); + t("2.4283599683e+171849", "5.896932135288822595493869E+343698", 11, RoundingMode.ROUND_UP); + t("2.1e+498604095779994", "4.2961949068353E+997208191559988", 2, RoundingMode.ROUND_UP); + t("2.20453501e-357801904289", "4.859974646744411255356204868440980E-715603808578", 9, RoundingMode.ROUND_DOWN); + t("5.8147365156793540374533779611537425212e+496502126799", "3.3811160746774874681847190789838042E+993004253599", 38, RoundingMode.ROUND_HALF_UP); + t("9.6614424956e+33826", "9.3343471095787978641040077990615E+67653", 12, RoundingMode.ROUND_DOWN); + t("6.840414600748481921789126213883996657219910998072878638534975744655859056193334e+365397755685166", "4.6791271910133013331845019336634770531377970763582548051313437429709245928538732275037320149E+730795511370333", 79, RoundingMode.ROUND_DOWN); + t("2.4239992207971581775833393874986290518e+2157096700", "5.8757722224252300019927334806719E+4314193400", 39, RoundingMode.ROUND_CEIL); + t("8.2220388454970543626652913918343189618675218734756075784049153881385219e+3", "67601922.776862534581068550153256371638256888653847213492979247915305924432354685660", 71, RoundingMode.ROUND_HALF_EVEN); + t("1.64244486917406282584413656933972205192398555455095912262410121870819135e+9340508786387", "2.6976251482762043514129832714354246217401306620466914174989739297066373978821E+18681017572774", 72, RoundingMode.ROUND_HALF_DOWN); + t("9.79090692715782911695847092370781210596001172136e+3115677438", "9.586185845626716371804688230667770283863635486094832181975090257E+6231354877", 48, RoundingMode.ROUND_HALF_DOWN); + t("1.944278705796582640753477900250165813717781441628885212874406345152815184e+2116000927238534", "3.78021968581403435601384837583880755915455510843E+4232001854477068", 73, RoundingMode.ROUND_HALF_DOWN); + t("4.8812606303344129781885860648384540427484823894462977105e+44750108717", "2.3826705341252710709297819787306105797004429874259653221553023657650287E+89500217435", 56, RoundingMode.ROUND_FLOOR); + t("1.93086613186193490703915304629355648384e+4", "372824401.9171471", 39, RoundingMode.ROUND_HALF_DOWN); + t("3.1595298775034276812747891834935798726890112101053025250708e+161894746", "9.982629046836824729046499174522512414789196378588531892708638648812537073974580E+323789492", 59, RoundingMode.ROUND_DOWN); + t("1.390343871134044306144904825487640471083e+45251442", "1.93305608E+90502884", 40, RoundingMode.ROUND_UP); + t("2.96906709876922593571912431731393589808133769511469663747755797342953511989756e-481589284892170", "8.8153594369939084379355385E-963178569784340", 78, RoundingMode.ROUND_HALF_UP); + t("5.06340826804083097846774064356525633462189965902266516580957088231376938e+37447664404211", "2.563810328886424765192984306061855294460082173029294221865432386446793287430868E+74895328808423", 72, RoundingMode.ROUND_HALF_EVEN); + t("5.972915579625786738e+332753", "3.567572052133644795106468790474408870787279617581832818761015389739299185393099191398142701264032348E+665507", 19, RoundingMode.ROUND_UP); + t("3.13014348207873691395112227e+295812860174", "9.7977982184E+591625720348", 27, RoundingMode.ROUND_HALF_DOWN); + t("1.612e+29382080784098", "2.59549542566482274489688514562643282E+58764161568196", 4, RoundingMode.ROUND_UP); + t("2.21e+957", "4.88485916656072684684336288223350318510382769049147063964695662933003E+1914", 3, RoundingMode.ROUND_DOWN); + t("8.62822128158912829157811086596256560701532576e-8740918", "7.44462024840675394866139306388888378538969579877716771591568819584308250214770680342900129457E-17481835", 45, RoundingMode.ROUND_UP); + t("1.608973391338221287e+497446804197772", "2.588795374034416984035765330740978157904525653087970199E+994893608395544", 19, RoundingMode.ROUND_HALF_UP); + t("8e+3075307718", "6.892258379923950714603548436010577093809697037965095264743890886686628674142064667547853365035865E+6150615437", 1, RoundingMode.ROUND_FLOOR); + t("1.7653932336326458078973623890876147360894729071996321e+26135", "3.116613269355929545695883758738082553843696E+52270", 53, RoundingMode.ROUND_HALF_EVEN); + t("9.256926799025012329e+345215572125607", "8.5690693762507461E+690431144251215", 20, RoundingMode.ROUND_FLOOR); + t("5.03544006612282891778e+46195820165472", "2.53556566595150796637413433477866041357009510845074403852348490716635E+92391640330945", 21, RoundingMode.ROUND_DOWN); + t("2e-48295616097338", "4.896457515808248945640496172912496043632630141762245831365224969393680585716718487583992616E-96591232194676", 1, RoundingMode.ROUND_HALF_DOWN); + t("2.48878965963768168184605548022681e-363573591781789", "6.19407396991944743243101974561954532539988692605208840104874752842254662E-727147183563578", 33, RoundingMode.ROUND_HALF_EVEN); + t("5.3851648071345040312507104915e+740361058", "2.9E+1480722117", 29, RoundingMode.ROUND_FLOOR); + t("8.3413437402428516353e+40", "6.95780153928886055351192302500612019875561321E+81", 20, RoundingMode.ROUND_HALF_DOWN); + t("2.79630657985938724890492968896027809909551e+913991292804", "7.81933048856490367778167731312448221121779492491922341813551588784321465352788E+1827982585608", 42, RoundingMode.ROUND_HALF_EVEN); + t("3.068981347405821994329370885223153147810167995e-134", "9.4186465107248546707630495330709378212295744168927053819144383155698062121265279905897752271E-268", 46, RoundingMode.ROUND_HALF_DOWN); + t("6.0271249500033e-10781347401", "3.6326235162953181809577645353279210E-21562694801", 14, RoundingMode.ROUND_DOWN); + t("3.199125028856e+25795", "1.023440095025536568635708921517360961793E+51591", 13, RoundingMode.ROUND_HALF_EVEN); + t("1.8666114157357738546399e+3", "3484238.1773551099774", 23, RoundingMode.ROUND_UP); + t("5.0973657635624059747024576803245965274249298527568449922667e+1692063437920", "2.598313772753815009002620426366701559965597345321262947368693172122554312019668885696226081E+3384126875841", 59, RoundingMode.ROUND_DOWN); + t("2.013328509206219057784323487222458501070404001508e-3238", "4.05349168598253649731512E-6476", 49, RoundingMode.ROUND_CEIL); + t("2.69875493659779856084765987819363578742030895189293632989705922592411229915e+4020061289691140", "7.28327820781098773E+8040122579382280", 75, RoundingMode.ROUND_FLOOR); + t("1.6e+10", "2.56E+20", 13, RoundingMode.ROUND_HALF_DOWN); + t("2.3483542723023e+2733546344672534", "5.51476778824035712778945842083575307125895176285682237794763477393558870924644509568829084003207E+5467092689345068", 14, RoundingMode.ROUND_HALF_EVEN); + t("1.69575e+13", "287553939655483170302812649.82525337373758443", 6, RoundingMode.ROUND_UP); + t("1.32333278406215884733018366812891959496232303384e+8285944289080", "1.75120965737370433697922956385416755835455646442365E+16571888578160", 48, RoundingMode.ROUND_FLOOR); + t("8.619857317385143165541404858165098391611310078189659021366304034052302190198e+423674679393446", "7.4301940172078196756317577124190795116444648589485897991299472748929474290863699960E+847349358786893", 76, RoundingMode.ROUND_HALF_EVEN); + t("1.5321135075443986e+3740", "2.3473718E+7480", 17, RoundingMode.ROUND_FLOOR); + t("1.72340673782204014190446948179592390656068185428e+1299869167652256", "2.9701307839704062069609474255783085619215767002151887992880369960243164553E+2599738335304512", 48, RoundingMode.ROUND_HALF_EVEN); + t("2.6489093408250026638898665191805392071832816e+37475657", "7.01672069590995012448612570344661497015681231635520477773E+74951314", 44, RoundingMode.ROUND_UP); + t("7.552132321848183098292052759964393e+3", "57034702.6067040290231940776601570114357688435285519762590782006101866084636618667", 34, RoundingMode.ROUND_DOWN); + t("2.501915642047260445562789772566841521129383e+346367499153", "6.2595818799207554600051E+692734998306", 43, RoundingMode.ROUND_CEIL); + t("3.46410161513775458705489268301e+23505129984", "1.20E+47010259969", 30, RoundingMode.ROUND_HALF_DOWN); + t("5.5156817867298553573934377553326519175269141671462400489745247227004977385606e+2535798792", "3.0422745572463449598911698968741967861068325178395628338533947208549426458197501E+5071597585", 77, RoundingMode.ROUND_UP); + t("7e+413483559541878", "4.9446671019E+826967119083757", 2, RoundingMode.ROUND_DOWN); + t("2.3540150674351154530407163580243074454938968196e+2160300", "5.54138693771155115387408E+4320600", 47, RoundingMode.ROUND_DOWN); + t("2.737454074105672e+2878546", "7.49365480783773944781718916811056453166482639687697E+5757092", 16, RoundingMode.ROUND_HALF_DOWN); + t("7.454070919313777677e+2341606971625", "5.556317327015934668013876961309779446079811E+4683213943251", 19, RoundingMode.ROUND_HALF_DOWN); + t("1.1573376026021382616589933753247694e+358389221", "1.33943032639686490800430635561822376604163268393006414770600700814939E+716778442", 35, RoundingMode.ROUND_DOWN); + t("1.869736722457198060474037674032156648711972906521e+32904235983", "3.49591541130498529E+65808471966", 49, RoundingMode.ROUND_FLOOR); + t("7.47395e+36118", "5.5859818323020679E+72237", 6, RoundingMode.ROUND_UP); + t("2.8316440369487011e+3", "8018207.9519871366038039483866918309675753055797380955099583126482331855373", 17, RoundingMode.ROUND_UP); + t("9.7472668692913041841429e+1309536008", "9.50092114211839024068782916975E+2619072017", 23, RoundingMode.ROUND_HALF_UP); + t("8.114992298209531e-2596906057289", "6.58531E-5193812114577", 16, RoundingMode.ROUND_HALF_UP); + t("6.703595e+401", "4.49381922866E+803", 7, RoundingMode.ROUND_HALF_EVEN); + t("9.7608119539308818711822517856627039556134970352903e+1249", "9.527345E+2499", 50, RoundingMode.ROUND_UP); + t("3.0066592756745816541757861126198711210412117e+139049925673", "9.04E+278099851346", 44, RoundingMode.ROUND_HALF_UP); + t("1.896015165815e+347585", "3.594873509E+695170", 13, RoundingMode.ROUND_HALF_DOWN); + t("2e+1005", "7.1236555794326143979309006340E+2010", 1, RoundingMode.ROUND_FLOOR); + t("4.4721359549995793928183473374625524708812367e-2934", "2E-5867", 44, RoundingMode.ROUND_HALF_EVEN); + t("9.81380264259950340885274731932875646303790396039793934033661431416500117441683e+4610414097817", "9.63107223078929964397336E+9220828195635", 78, RoundingMode.ROUND_UP); + t("8.9376309368079848924360696e+36390757", "7.98812467625871776375673355260343E+72781515", 26, RoundingMode.ROUND_CEIL); + t("5.026652112874930197997606836236916458650894248379748587283939631792571414e+2570662179", "2.526723146387E+5141324359", 73, RoundingMode.ROUND_FLOOR); + t("8.49293409e+2918903274734", "7.212992952916182126166161894531743826E+5837806549469", 9, RoundingMode.ROUND_HALF_EVEN); + t("3.7717367e+4831878", "1.4225997558149815433987209975829468787464264438709401098671706038917792294221101238217259236638882E+9663757", 8, RoundingMode.ROUND_HALF_EVEN); + t("5.65256722208745359096703556418756741838091330344004243880813554127204475354963e-196", "3.19515162002174718875005691558428708625371358895103E-391", 78, RoundingMode.ROUND_FLOOR); + t("6.63236207127e+23317", "4.39882266444868312494846698153144297198308093870920987520682921E+46635", 12, RoundingMode.ROUND_DOWN); + t("1.0299091215176223197e+255", "1.06071279858520053783126987482987178921249572000906994047388785433323881546006E+510", 20, RoundingMode.ROUND_CEIL); + t("5.040737517733564457496704009949621179767208845752392579636770019086715865e+1", "2540.90347226867370536208924268972271855242897", 73, RoundingMode.ROUND_FLOOR); + t("7.2998671170787362309999885642096413366997803441454046e-3", "0.000053288059927007419736192864488572091336455240976257828090775274140470718273556545610819", 53, RoundingMode.ROUND_DOWN); + t("5.11117005049595857693e+9", "26124059285086859749.111136068760", 21, RoundingMode.ROUND_HALF_DOWN); + t("1.89935540125106114644973371135677739395218e+49685", "3.607550940261579490044139098611195000453932161335896883380180003006836843018711910962E+99370", 42, RoundingMode.ROUND_UP); + t("6.18443052847326250790598455586e-2615403185", "3.82471809615120769875272018837130277169788007341654336023385958906492891E-5230806369", 31, RoundingMode.ROUND_FLOOR); + t("3.426242491487763270227e+18", "1.1739137610476275565237282E+37", 22, RoundingMode.ROUND_HALF_UP); + t("2.96275501530970122781213e-3678", "8.7779172807427879568E-7356", 24, RoundingMode.ROUND_HALF_DOWN); + t("2.4428719e+4859", "5.9676230838955962140555831660429425584144796031304001629260382152102420202408466740096475145421788E+9718", 9, RoundingMode.ROUND_UP); + t("1.02832795192e+442784", "1.05745837668529806545913238826109255689541898043645621468495695830204838516639758771694008345342674E+885568", 12, RoundingMode.ROUND_CEIL); + t("6.514808353931537716266282122142219803851312224850046724512e-2045", "4.2442727888456152E-4089", 58, RoundingMode.ROUND_UP); + t("2.550511488760636812199575483724868e-1447172750541", "6.5051088543E-2894345501082", 34, RoundingMode.ROUND_HALF_DOWN); + t("2.4730609367420230671388e+12", "6116030396839332618454241.9526022655923587418704940810349550246004", 23, RoundingMode.ROUND_HALF_DOWN); + t("3.036323149912413372105696029126241615660685857583888271128260449310702453141608e-1349985", "9.21925827069403988819584961758405864669074310023419843237E-2699970", 79, RoundingMode.ROUND_CEIL); + t("2.6874987079843743011487811643134819286318198642391692062301e-91", "7.222649305417681173051748752199025762E-182", 59, RoundingMode.ROUND_HALF_DOWN); + t("8.8814616618312878350673062471290132392165769044e+163440250", "7.888036125057898099450298304157513376364713379776394983E+326880501", 48, RoundingMode.ROUND_HALF_EVEN); + t("8.003905394943370898574902868328421705723747639106911357526019275287081172297e+30146897", "6.4062501571203598084182532613957872182544E+60293795", 76, RoundingMode.ROUND_UP); + t("6.6869e+3882", "4.47141713850001280335127436138703209048665710727894216146638123448970973413333877E+7765", 5, RoundingMode.ROUND_UP); + t("9.46715778767100012677112937995161815357113020444e-327073528", "8.962707657665966551992881052251375867047729017714166968495362566E-654147055", 48, RoundingMode.ROUND_HALF_EVEN); + t("6.303431321113571e+275056324656282", "3.97332464199955790588897588438551310212027677784886403329179755857444550904597263134605E+550112649312565", 18, RoundingMode.ROUND_HALF_UP); + t("6.576174355328564536662125352346e+21602351976988", "4.32460691516810613850278067385309182411399820938966096E+43204703953977", 31, RoundingMode.ROUND_CEIL); + t("2.07630346262337137491871083e-3090618529044467", "4.311036068901801732099430365860481210539754465419778810616524065681770638162008279484055169E-6181237058088934", 27, RoundingMode.ROUND_CEIL); + t("4.2148890965989444057133600997628746172165814692968051092e-8712289445", "1.7765290096628665705861617573159354925958E-17424578889", 56, RoundingMode.ROUND_HALF_EVEN); + t("2.6474912249241999225341670266712257663525163332933359876990081330726543e+162573", "7.0092097860506405451155195833366486325362949236190817489245792816903602999857931117317190E+325146", 71, RoundingMode.ROUND_UP); + t("9.12874162316595732639551387628400033604695187619e-3", "0.00008333392362252263723524459", 48, RoundingMode.ROUND_HALF_UP); + t("2.7235179981923310319738235894879139608807e+1033760346", "7.4175502864775620583462352475547105037730945778584608279E+2067520692", 41, RoundingMode.ROUND_HALF_DOWN); + t("7.099057482524069554788222715721382261331093541531504796459e-5", "5.0396617140180980112290131689304401510152E-9", 58, RoundingMode.ROUND_HALF_DOWN); + t("9.10809918720977210707253937500924e+27380", "8.295747080405131128480935E+54761", 33, RoundingMode.ROUND_HALF_EVEN); + t("1.285681486112942019135229306830687883569187630472e+3834782", "1.652976883733583122E+7669564", 49, RoundingMode.ROUND_HALF_UP); + t("9.568088e+2018", "9.15482993151972E+4037", 7, RoundingMode.ROUND_UP); + t("1.987355257754938992377160858509897774952049248e+15", "3.9495809205262E+30", 46, RoundingMode.ROUND_CEIL); + t("1.9768903173746098651102397889231284119168749816365290144722209101587590107964e+46924932068", "3.908095326929485719118550903578424879636511190787119806290E+93849864136", 77, RoundingMode.ROUND_HALF_UP); + t("6.85223487409204247121078477321652642e+13", "4695312276972318913824783267.23915150099092256", 36, RoundingMode.ROUND_CEIL); + t("1.89753938328297503876364212659e+4", "360065571.110993325", 30, RoundingMode.ROUND_CEIL); + t("1.73793786659448789397819131927279578513780780522093623215e-26159", "3.020428028143E-52318", 57, RoundingMode.ROUND_HALF_EVEN); + t("8.6448435822785381294005301901316419084244682800468991364630579854249684e+199772394975", "7.473332056206242784465850133264347507502598072E+399544789951", 71, RoundingMode.ROUND_FLOOR); + t("5.152189634588319893862857733009123865557155838508261990197856939965755e-21896842502066", "2.6545058030759325273618511956767499403152E-43793685004131", 70, RoundingMode.ROUND_HALF_UP); + t("6.363328661925045799106506614064522175879e+45790995", "4.04919516596767938142398731881702747229058975396741269844545638111172628708619095858703698307014719E+91581991", 41, RoundingMode.ROUND_HALF_DOWN); + t("2.809603385469e+3452", "7.8938711836403788689485387722739902228108362611929174E+6904", 13, RoundingMode.ROUND_HALF_EVEN); + t("8.387292474579902077507212611207840585e-13228993663", "7.03466750541446573370027044489E-26457987325", 38, RoundingMode.ROUND_HALF_UP); + t("1.8280039989118977381747692279217097e+2570948", "3.341598620037889427132828227624777069946213265099768868E+5141896", 35, RoundingMode.ROUND_HALF_DOWN); + t("4.242077070790137478716517628874194271194060827692514184105e+389854", "1.7995217874523433061846222162668474214071163108613415E+779709", 58, RoundingMode.ROUND_CEIL); + t("9.29961911573539491036147371e-27015695", "8.64829156977511683564833506322917189811629558525289718715023664251559870029893040656186008376212E-54031389", 27, RoundingMode.ROUND_HALF_DOWN); + t("2.9190392183495259081103419481759400578499514075079378347e+31", "8.52078995826261119108447319667254438902793796629435580E+62", 57, RoundingMode.ROUND_FLOOR); + t("8.937227578505540103845413636584692573241532357433996111863e+1790938", "7.987403679E+3581877", 58, RoundingMode.ROUND_DOWN); + t("3.070283187058663486241563846238e+2571", "9.426638848735104E+5142", 31, RoundingMode.ROUND_HALF_EVEN); + t("2.8538810158098743e+3473261643654553", "8.1446368524E+6946523287309106", 18, RoundingMode.ROUND_CEIL); + t("2.008039e+36729025", "4.032219417259540272204478866331908221389931400048743477485727321671916860580259161402773798107E+73458050", 7, RoundingMode.ROUND_HALF_EVEN); + t("7.51692279236539994967372050974313334001215192497833104202e-2440875511683227", "5.6504128266382441683929602449473591619319549900002408802881702717481E-4881751023366453", 57, RoundingMode.ROUND_CEIL); + t("3.0435123169140879772323396228229690669146412039176588151e+8", "92629672232077598.90063863301233712326343840597041607655456994461", 56, RoundingMode.ROUND_HALF_EVEN); + t("2.236067977499789696409173668731276235440618359611525724e+702888559122", "5E+1405777118244", 55, RoundingMode.ROUND_HALF_EVEN); + t("5.97990172243658198399814740059437396277732066046e+370", "3.575922461E+741", 49, RoundingMode.ROUND_HALF_UP); + t("2.82561653740855466419452851014456248628635025976235076e-4280625271453", "7.984108816476710E-8561250542906", 54, RoundingMode.ROUND_UP); + t("9.48683298050513799599668063329815560115867e-434737", "9E-869473", 42, RoundingMode.ROUND_HALF_DOWN); + t("8.882e-4097945006776965", "7.88869662270039764413484643614524697066192137552471897225988700736686713038E-8195890013553929", 4, RoundingMode.ROUND_HALF_DOWN); + t("3.67889e+14891", "1.35342176496813904540880394246590582429142627731764911712414478149020053276032E+29783", 6, RoundingMode.ROUND_UP); + t("8.473e+456", "7.179707176136375341401913486978796960524639825994932608331410951477613527254629E+913", 4, RoundingMode.ROUND_HALF_EVEN); + t("6.061122e+156", "3.67371987435196618057562397883355060133829216965154000472540684500E+313", 8, RoundingMode.ROUND_UP); + t("1.2162592664785351757282744e-47741523717344", "1.4792866032949044394019E-95483047434688", 27, RoundingMode.ROUND_HALF_DOWN); + t("1.0226100780319713142530417271134325435661232545102289895560582934036408017e-3070736", "1.0457313716925544603251531895365106855371052455015295127376768840262251474879407584E-6141472", 74, RoundingMode.ROUND_HALF_DOWN); + t("6.40378773473547483807376041857055923862407e-289422539068310", "4.100849735154850424998568954883333023944579871020634818881424885849663612599045128003798737145657E-578845078136619", 42, RoundingMode.ROUND_UP); + t("5.1725935520949720972771088800926908173244154e+2824962274", "2.675572405517448082E+5649924549", 44, RoundingMode.ROUND_CEIL); + t("6.864734640020072049718705304013039739459327696999280834990366263684919488693e+28", "4.712458167789150819E+57", 76, RoundingMode.ROUND_FLOOR); + t("9.4403813337678765859e+2275528598282", "8.9120799726952952463715474436836438839285693903355297048145204533165099122605783431631909389375E+4551057196565", 20, RoundingMode.ROUND_CEIL); + t("1.401091686602968166559525283171170204216e+4918493", "1.9630579142679499665419988066E+9836986", 40, RoundingMode.ROUND_DOWN); + t("5.76860337023413964786931e+2461399906291", "3.327678484307667442355379899894139310335808838737692146122103503686495579534E+4922799812583", 24, RoundingMode.ROUND_HALF_UP); + t("4.930871521981228238e+3437032097726610", "2.43134939662854741919117399694122150170471210277624540E+6874064195453221", 19, RoundingMode.ROUND_HALF_DOWN); + t("1.0245391862903256753964503966393139032236946080277416684518e-38", "1.0496805442444426583754480311188446871883996972187399715782318606844535332564E-76", 59, RoundingMode.ROUND_DOWN); + t("1.7128627267646388333852869565663674027391841238236919212997718917108311794e-4002", "2.9338987207395937897002373949538359655732613253567763605075447290049969107E-8004", 74, RoundingMode.ROUND_DOWN); + t("2.8264310169258223109845135255342978316223511737459003e-16767859699", "7.988712293440338047E-33535719398", 53, RoundingMode.ROUND_DOWN); + t("6.903495420085316148538509004607763967209023254e+44768102", "4.76582490151389356813825520590783598202999337271191949072678494086332063317360130E+89536205", 47, RoundingMode.ROUND_HALF_EVEN); + t("2.95564580436384800253055711281369395501536452408051186314e-203298238353891", "8.73584212085361806007883039348577463893244695975888298999502229344131381589611093355072253081E-406596476707782", 57, RoundingMode.ROUND_HALF_DOWN); + t("6.649283812592150138142528590709054870664998836855393073088808237856384012e+16918", "4.42129752204E+33837", 73, RoundingMode.ROUND_DOWN); + t("3.1418363802846828888954674287282088166631670326029874978921587241662126193072e-10", "9.8711358404803585142715995165965562371006E-20", 77, RoundingMode.ROUND_UP); + t("9.0168891708498077340870422538771763991860996900736805340459998564777522117427e+1646179540063", "8.1304290319388533208865555457549157885068286554112709492694227672649E+3292359080127", 77, RoundingMode.ROUND_UP); + t("8.977858829152028877e+40", "8.0601949156183038822620916355105579058051056436917994500749067325934920E+81", 19, RoundingMode.ROUND_CEIL); + t("4.2017305790590619e+646808528", "1.7654539859E+1293617057", 17, RoundingMode.ROUND_FLOOR); + t("5.5524814508191389246383339131600308902340023710576826212458e+2497373294220", "3.08300502616906098687255826013116108848672731202638827475459671548604743541183982705838E+4994746588441", 59, RoundingMode.ROUND_HALF_UP); + t("1.67271971876579712062058760927597244127329496726295947385574838534557761275087e+4084885214", "2.79799125754792741188580781151558042045245397938161747962330378605256347960E+8169770428", 78, RoundingMode.ROUND_FLOOR); + t("3.085527497069488331267423581241150396840258e+42246909", "9.520479935171901322697389268713897072458655100066709408989906359E+84493818", 43, RoundingMode.ROUND_FLOOR); + t("3e+158107000193", "9.6977619149278219422781E+316214000386", 1, RoundingMode.ROUND_FLOOR); + t("2.90723345116412399903677294614733205e+380", "8.4520063395676629612501328633225132880746874537228627270266E+760", 36, RoundingMode.ROUND_DOWN); + t("9.775891681481346189754834e-710", "9.5568058168056182185442353049791687180E-1419", 26, RoundingMode.ROUND_HALF_UP); + t("4.6646957424189037236e-233070856320311", "2.17593863693410473953572E-466141712640621", 20, RoundingMode.ROUND_HALF_DOWN); + t("8.53425633807185478645377489395742278102449403e+2105124743", "7.28335312439196245774226929758991441342086268907461367722377958885353595551884935516785591E+4210249487", 46, RoundingMode.ROUND_HALF_UP); + t("2.8161913e+30949787971256", "7.9309336869113277937283E+61899575942512", 8, RoundingMode.ROUND_HALF_DOWN); + t("6.6443937050711499376864490195641899272283176042527e+261607", "4.4147967707989123421155030572424236370263103192892052949087277363710E+523215", 50, RoundingMode.ROUND_HALF_EVEN); + t("3.887130387e+4462928527512", "1.5109782641945858394E+8925857055025", 10, RoundingMode.ROUND_HALF_UP); + t("6.9295847389150837205027607357674e-337585815724", "4.8019144653804829012013755178407300496433787057977746765392593580534900280159767925073E-675171631447", 32, RoundingMode.ROUND_UP); + t("1.67762269562204e+2724901494014124", "2.81441790886617380509520155082877145938117037134E+5449802988028248", 15, RoundingMode.ROUND_FLOOR); + t("1.378806846317145211527751556938e+3615", "1.9011083194510316937617450165824777298618984876923310846235512081728267868E+7230", 31, RoundingMode.ROUND_HALF_UP); + t("7.2282380669809344745123929711647933739752741869853493e+129", "5.2247425552952276174806603769135304185149515310446734318136860424E+259", 53, RoundingMode.ROUND_FLOOR); + t("5.112514728527103756119083043541744424478486522645230981812126003154941892e+920836812802990", "2.6137806849406565416963702733639313080984002961475E+1841673625605981", 74, RoundingMode.ROUND_HALF_DOWN); + t("3.15240118526970354837192462164291327592722e+12762", "9.93763323288983179604546E+25524", 42, RoundingMode.ROUND_HALF_UP); + t("3.49559682514708909727859773952360298460003998789958980573672291458393004e+132", "1.22191971639784089879E+265", 72, RoundingMode.ROUND_DOWN); + t("7.4813100457072356252346588698556564868296818103801416175589911024114791569995e+284130830840784", "5.597E+568261661681569", 77, RoundingMode.ROUND_UP); + t("2e-3768574628", "7.2713214641933444306829997615377506867292707248931E-7537149256", 1, RoundingMode.ROUND_FLOOR); + t("2.902077e+1588760762", "8.422051691577715414082824473132488156131471218330734604226191089990683764449E+3177521524", 7, RoundingMode.ROUND_DOWN); + t("2.18935e-192883592280", "4.79327125880129020E-385767184560", 6, RoundingMode.ROUND_DOWN); + t("4.48463019222796485951602654336860567938893190030116242172e+473496", "2.011190796104263304745319026570265454712539877236299939E+946993", 57, RoundingMode.ROUND_HALF_UP); + t("2.546525295e+29021565225819", "6.4847910760149283558212070695669048254074329962785677108576986411961086444961000E+58043130451638", 10, RoundingMode.ROUND_HALF_EVEN); + t("1.51185657328663290102911156905e+18", "2.285710298190E+36", 30, RoundingMode.ROUND_HALF_DOWN); + t("2.6598141458335522206769057345931e-1022221889", "7.074611290376269E-2044443778", 32, RoundingMode.ROUND_HALF_EVEN); + t("2.1400246921846e+473622", "4.5797056831596035941207627491245833008597417378183068825736455247163834770170E+947244", 14, RoundingMode.ROUND_UP); + t("2.3774545577213805010498159234873880660721178e+422716", "5.65229017403016496862404612990739165210984813062645469906426138589591E+845432", 44, RoundingMode.ROUND_DOWN); + t("2.203089e+335", "4.85360341581551E+670", 7, RoundingMode.ROUND_FLOOR); + t("4.910625878493595047710096578187419155296332340361665271615e+158478680481", "2.411424651853099211331932586857671419333629451402446313055708226355472325441681706664245120160E+316957360963", 58, RoundingMode.ROUND_UP); + t("2.14658304513912472592069256949618e+0", "4.607818769678757580622617058038482756337638794621523984131268073532516530956591238950305713306", 33, RoundingMode.ROUND_HALF_UP); + t("2.755609393656315990095837385538e-32204", "7.59338313040692946359911961843531565497832081882557075265876961832563840683131278114866271E-64408", 31, RoundingMode.ROUND_FLOOR); + t("6.0796177733655821078861178138872182814062298888138e+13", "3696175227022267849032414092.016773404702311234937146358672775619", 51, RoundingMode.ROUND_UP); + t("9.322011536195057384357328326782263568235613559128e-24931530574", "8.68998990809537336703600486E-49863061147", 49, RoundingMode.ROUND_UP); + t("2.71986591529447641250156426872327014101855e+430301407", "7.39767059718065993935568543488443748452082512031990E+860602814", 43, RoundingMode.ROUND_HALF_UP); + t("9.748823047418070634441154844604945179095866321330356660832934187282699223e-3702188646680283", "9.5039550809869757481802467684142816071629587849671095519782938514286705E-7404377293360565", 73, RoundingMode.ROUND_UP); + t("1.878382903912616955109258360633381976169159358491282086149580414136009e+120243", "3.52832233371119558076316851E+240486", 70, RoundingMode.ROUND_UP); + t("4.621003503308429392531555236351223553159256034625873954713601722906751e+22257918209422", "2.135367337758877761572808626061137813597705703296648884770002410767354094917580791680252657855994460E+44515836418845", 71, RoundingMode.ROUND_DOWN); + t("8.09675556793333478408703745283365e+2697370827636895", "6.55574507268594587077340408367234333953545565465682867336894127238643198993462187195128E+5394741655273791", 33, RoundingMode.ROUND_CEIL); + t("2.02207593759537562422226807353364843462858518254559656e-28012230172050", "4.08879109740221741578687735602952948096051E-56024460344100", 54, RoundingMode.ROUND_DOWN); + t("5.3731000956898735111861968797250897647473152496311640907459600751218763861e+454513139585766", "2.88702046383025278824610014957155384890357084971884613239765424667693727485508799293067464689E+909026279171533", 74, RoundingMode.ROUND_DOWN); + t("7.6531546e-3210839", "5.85707760360226795537203615034919E-6421677", 8, RoundingMode.ROUND_FLOOR); + t("5.1545158401e-849458529874", "2.6569033546401399505222840937237E-1698917059747", 11, RoundingMode.ROUND_FLOOR); + t("1.362796e+820366697", "1.8572130578086568903670432137573555816173399866229650898073903609534634685E+1640733394", 7, RoundingMode.ROUND_FLOOR); + t("1.803028018886897386311411e+392", "3.2509100368912099980074744E+784", 27, RoundingMode.ROUND_HALF_DOWN); + t("3.194063e+59854163", "1.020203979681842516145028680059578232774062730558684033505119017106807172711E+119708327", 7, RoundingMode.ROUND_HALF_UP); + t("4.261774950512222945050604e+766620941569952", "1.816272572881346033232615148233362658915452774043972856579675E+1533241883139905", 25, RoundingMode.ROUND_UP); + t("6.4982834054101674517e-6690629769341", "4.222768721702916271457625051478794776571420E-13381259538681", 21, RoundingMode.ROUND_FLOOR); + t("4.63890650784339381668800704976722120910871991068098e+3684414202057", "2.1519453588511791178106435314081634243235207843258897805541E+7368828404115", 51, RoundingMode.ROUND_CEIL); + t("2.9151839322904732383444730694225e+30759", "8.498297359084546458280003048168914699436364769023695844300652045190667728E+61518", 32, RoundingMode.ROUND_FLOOR); + t("2.766532719204307910633754595392000551442511483883250429903676087804405565590643e+455779478", "7.65370328642798200007936195028468256694001674934111932023715848409184276391931286002453021414093E+911558956", 79, RoundingMode.ROUND_CEIL); + t("7.15809196006477e+33292581643", "5.1238280508743809055025574209743282729559196766140070189951812797362009162E+66585163287", 15, RoundingMode.ROUND_UP); + t("3.86118619398318356259490388719113598185201634813542416e+406721231", "1.490875882460634284411863820052569490029137331918395153873776527023749083262931386830E+813442463", 54, RoundingMode.ROUND_HALF_UP); + t("9.689731193707917826178936968367758565636403e+40068362191", "9.389089060631627013431474273256976055318787324073601735849070341827498807062287216165E+80136724383", 44, RoundingMode.ROUND_FLOOR); + t("2.380529012851904667362202911642711024107714e+198681597152426", "5.666918381029663696953608649066197933231308460645707103242820405560172691798118435135524461103430183E+397363194304852", 45, RoundingMode.ROUND_HALF_DOWN); + t("2.54746401587652656029608220458044130513888776543718542834122918527624080395488e+32532", "6.489572912185759966860293134205566227925787911969794771866E+65064", 78, RoundingMode.ROUND_CEIL); + t("6.92698673696026591387308445e+107400231637266", "4.79831452540234321937856594164763711E+214800463274533", 27, RoundingMode.ROUND_HALF_UP); + t("2e-3687675859352948", "2.87850545774362267882888183908800107382947760934094690201972229957797333658228601684365936E-7375351718705896", 1, RoundingMode.ROUND_HALF_EVEN); + t("1.618027041879108501297810734567701e+50804486666", "2.6180115082520583359185144823153085187283124373602323397858607127478347167082796349429269911729E+101608973332", 34, RoundingMode.ROUND_CEIL); + t("1.468859842402168586360692550046800918056478722e-36", "2.15754923662172353660E-72", 46, RoundingMode.ROUND_HALF_EVEN); + t("8.49215738290834886674655744364e+3929100150329", "7.21167370160847769931713219E+7858200300659", 30, RoundingMode.ROUND_FLOOR); + t("3.080752255068078689981071323748588537107e-36384305560", "9.49103445710705218035789748393813719855362668161846E-72768611120", 40, RoundingMode.ROUND_UP); + t("1.173890248587e+32564710208321", "1.3780183157276814234744165885721310974270604540920153529405097095176115665588872141E+65129420416642", 13, RoundingMode.ROUND_HALF_UP); + t("3.3574798416124266047747707108073142426282137e-218933383480676", "1.1272670886833805240621800360101550017149869005946946591265232560766193937035542597E-437866766961351", 44, RoundingMode.ROUND_UP); + t("2.23944945243244996980913928295535257356722976e+3460351267", "5.01513385E+6920702534", 45, RoundingMode.ROUND_UP); + t("9.0144388862969379134e-45686027", "8.1260108434782378341695197333453540906E-91372053", 20, RoundingMode.ROUND_UP); + t("3.0154321001794005197296683806041624213563546270536367710423e+100086943546", "9.092830750792350171931235260936892651832323052358883721226795146110156733755114783658E+200173887092", 59, RoundingMode.ROUND_HALF_EVEN); + t("2.44369944036062486685492557249769572445990273975135928852505135432044491079041e+3973481", "5.9716669548188311704969626601027296830809246015644883490860409903708929680E+7946962", 78, RoundingMode.ROUND_FLOOR); + t("9.9766657347831312895713804962380972879872133625410810249905126198373397e+4902005181527", "9.9533859183595836960393341304494815647224E+9804010363055", 71, RoundingMode.ROUND_CEIL); + t("1.55e+26246", "2.401659339220326238148181906366427704224780832955898700E+52492", 4, RoundingMode.ROUND_HALF_EVEN); + t("2.34305570615805937922628235012415265e-7", "5.4899100421598422967909002186123690839377971716E-14", 37, RoundingMode.ROUND_UP); + t("9.486832980505137995996680633298155601159e+996590685", "9E+1993181371", 40, RoundingMode.ROUND_UP); + t("2.2472831e+47363932428322", "5.05028103859772651487706403994190016339078351595454246848636742496802495048742202447079630739E+94727864856644", 8, RoundingMode.ROUND_UP); + t("3.09835648876358033e+47479603614", "9.59981293146338228219992128891802378333E+94959207228", 18, RoundingMode.ROUND_HALF_DOWN); + t("8.55135371363729866747197e+16028", "7.3125650335738419022159017437377735662828E+32057", 24, RoundingMode.ROUND_FLOOR); + t("7.541423725038898641083750859464767137139684e+12", "56873071800579577894480029.9913916338494896187006254131382792065617290802105695797397", 43, RoundingMode.ROUND_HALF_DOWN); + t("6.8002746166354257e+11", "462437348616560861444716.469443110926995223677083942242611169677743650813236751337419207369559128520", 17, RoundingMode.ROUND_HALF_UP); + t("2.5652177e-244584256384357", "6.5803421671668747304683336293E-489168512768714", 8, RoundingMode.ROUND_FLOOR); + t("2.23793617809742898841363911292888853966977964817766258759532718005259729e+41087371", "5.00835833723732739992314400670207943302403206440405252937804763314822035527687053E+82174742", 72, RoundingMode.ROUND_FLOOR); + t("5.23407164867045527149076121386206081046e-3542587", "2.739550602341585775997338219789670446820E-7085173", 39, RoundingMode.ROUND_UP); + t("3.0742131314253906754227821858e+96706326503", "9.450786377428306361560309171177304320240134953027243301587893245054872736802088043071493639E+193412653006", 29, RoundingMode.ROUND_DOWN); + t("9.6526054e+6", "93172790036170.613444694347666418780549753491881062334620953897827553473780799108203", 8, RoundingMode.ROUND_UP); + t("2.764550263766756063892234262466594517907118311533593420860995828119465404401809e-431912159", "7.6427381608928405257681569294347818369102356176996211973E-863824318", 79, RoundingMode.ROUND_FLOOR); + t("4.726185048245726940640138085401458332003103e-2387", "2.2336825110261464289548790065115800838432265E-4773", 44, RoundingMode.ROUND_UP); + t("2.06700039e+27664", "4.2724906128719667659691356003183719988200264E+55328", 10, RoundingMode.ROUND_HALF_UP); + t("3.0394538316874649464598276081160724e+106145874", "9.23827959495961249186367387478693953484941E+212291748", 37, RoundingMode.ROUND_HALF_UP); + t("3.006875499403192963673188892347469682563777463469587792654e+20786", "9.041300268911201088838782013152679784074371858101273E+41572", 58, RoundingMode.ROUND_DOWN); + t("2.85909217357538160219868784409618103905259254542127e-30883978641744", "8.174408057E-61767957283488", 51, RoundingMode.ROUND_DOWN); + t("3.3260210094135369128622169846679339403575787017793503761274203309290260436e+3815171969334", "1.10624157550602430015244848049439711918773950918589248425841376113701453944821290918195E+7630343938669", 74, RoundingMode.ROUND_FLOOR); + t("2.2219659043755149394630379e+39005143", "4.9371324802073E+78010286", 26, RoundingMode.ROUND_HALF_DOWN); + t("9.5438933355313647910084093295703513e+363658650", "9.10859E+727317301", 35, RoundingMode.ROUND_FLOOR); + t("3.00666e+472622870", "9.04E+945245740", 7, RoundingMode.ROUND_CEIL); + t("2.837780823108084927845098354231270362354547981102e+3799336425332871", "8.053E+7598672850665742", 49, RoundingMode.ROUND_HALF_EVEN); + t("2.63098328861837901379246055794913493258563428302007e+18474", "6.922073064989180646258163061425595248339645318548644890836321470068254933488292945284735322631E+36948", 51, RoundingMode.ROUND_HALF_EVEN); + t("2.764594001353016120387309e+1656763472", "7.64297999231708049848271603772247952906531812E+3313526944", 25, RoundingMode.ROUND_UP); + t("4.99358959259322115994443893492663456542067e+21163752", "2.49359370192553324844573464720642409E+42327505", 42, RoundingMode.ROUND_FLOOR); + t("2.027895093136415935e-33", "4.11235850876675305992625132144861230486080916955691E-66", 19, RoundingMode.ROUND_FLOOR); + t("2.9545024474453888695924718967207697287659510106764672439630841479565241968e+3025138", "8.729084711960792819353415468437350816065576927664405E+6050276", 74, RoundingMode.ROUND_HALF_DOWN); + t("5.274723829579e+147", "2.782271147832686219E+295", 13, RoundingMode.ROUND_HALF_UP); + t("2.8438354740227241040111232893777368e+5046190127387", "8.08740020331005190220391258674305873512363906032235E+10092380254774", 35, RoundingMode.ROUND_HALF_UP); + t("4.7022502775686244544842e+785", "2.21111576728942057265374867434598092629448251165002373458069847941389903130518761599813923261736272E+1571", 23, RoundingMode.ROUND_UP); + t("1.9179842370578362891185422e+3826111", "3.6786635336023303507152224116804583704219412283495446611E+7652222", 26, RoundingMode.ROUND_FLOOR); + t("1.294105809149064963260379265e+33012", "1.6747098452733561507694771361540079238390082400869150000987128223006851969007181E+66024", 28, RoundingMode.ROUND_HALF_EVEN); + t("2.6259981818539021981659e+339340", "6.8958664511E+678680", 23, RoundingMode.ROUND_CEIL); + t("1.650095715573914339995571593605530228843869509809576660267100705710199e+460348481858", "2.72281587055538841173686928082096620997022877836901707243689996E+920696963716", 71, RoundingMode.ROUND_DOWN); + t("2.5961509971494339104070358328276508155305955410565531e+27506184764", "6.7400E+55012369528", 53, RoundingMode.ROUND_UP); + t("6.98318893856197088096157423785895630275546e+1", "4876.49277516542655231337713128136167574490306845440883621473529483335813066", 42, RoundingMode.ROUND_HALF_EVEN); + t("9.0231652121710693691311381001357983609378069176681239052663552490593273e+472", "8.1417510446134179304795008671281142077622655031292884E+945", 71, RoundingMode.ROUND_UP); + t("3.614556567833e+905", "1.30650191820664E+1811", 13, RoundingMode.ROUND_FLOOR); + t("9.1398161452037739597682402466114e+2", "835362.39168127574079882209155115811445457403061495355495204551760538374", 32, RoundingMode.ROUND_HALF_EVEN); + t("1.48195910345e+265", "2.1962027843207439856796146949959914521607703076789660614150E+530", 12, RoundingMode.ROUND_FLOOR); + t("1.5556e+14554", "2.419900615649606588649129133146016064773740775801480E+29108", 6, RoundingMode.ROUND_HALF_EVEN); + t("9.577563741597269956621661494375676941761541216043791043763111011243284670677e+148495594025", "9.1729727224358697241613267368499559222661984280657781520944350143634252209378072E+296991188051", 76, RoundingMode.ROUND_UP); + t("1.8506236700427283766082924116700167702e+869890601624", "3.424807968122417190265786224803414598744313823843255233059744E+1739781203248", 38, RoundingMode.ROUND_FLOOR); + t("9.826305933387008239476331241821733277265221856e+322094481799", "9.655628829651672320852209236659488021285268281974300650419875326E+644188963599", 46, RoundingMode.ROUND_HALF_EVEN); + t("2.624529228150198019388839742009995469e+207078651009687", "6.88815366941467416777000064485475542793749913477244591699232199964730E+414157302019374", 37, RoundingMode.ROUND_UP); + t("1.6072e+444880748", "2.5829424561385859658292788297683281827868597224516601440089262848450E+889761496", 5, RoundingMode.ROUND_HALF_DOWN); + t("4.14372056656893949780344576110128553784727806963084424e+35972549165834", "1.71704201338064129520393922040426764484532952194442522349724910206873998394075971283951735644E+71945098331669", 54, RoundingMode.ROUND_CEIL); + t("5.0531262501544526519574040306536300193230181695512694054594791474960429e+43540097", "2.553408490E+87080195", 71, RoundingMode.ROUND_DOWN); + t("7.82604e+4", "6124701461.30253396696741160592218892208", 6, RoundingMode.ROUND_FLOOR); + t("2.2398583586237716716486413363400318012837209715720882626185e+47", "5.0169654666967765488407729714423591421E+94", 59, RoundingMode.ROUND_HALF_EVEN); + t("9.880231068423594927351688244474459194937005e+644353", "9.7618965965442852147114138973091944182243234357713569889829E+1288707", 43, RoundingMode.ROUND_UP); + t("4.962894523835293602541700098665678245210425304527057712473799410572054423102e+99", "2.463032205471434562E+199", 76, RoundingMode.ROUND_DOWN); + t("3.079618529786431417491547e+33473302", "9.48405028900394137180787430531224638858239194922517032274376483841159408163465435135E+66946604", 25, RoundingMode.ROUND_CEIL); + t("2.55106412528206453900085028710092456169084330858943744594958242411029891729e-36", "6.507928171301145077839025428E-72", 75, RoundingMode.ROUND_FLOOR); + t("1.599636494099434519120495776736793381468862256137471e+4144316766399", "2.558836913254730207106858879274826091287738890342230033749159837590085448680594119987E+8288633532798", 52, RoundingMode.ROUND_UP); + t("2.07272418e-12884693243", "4.2961855225494E-25769386486", 9, RoundingMode.ROUND_HALF_EVEN); + t("8.69228216461714213735790110145447192421003957520348071e-1861021855949449", "7.5555769229321270082798708075E-3722043711898897", 54, RoundingMode.ROUND_CEIL); + t("8.24962547017544740347522820382134272105255583449e+2865", "6.805632039816747163674E+5731", 48, RoundingMode.ROUND_CEIL); + t("7.27483292499446870635760964657613202175753147622053e-148221990584", "5.292319408658357715078502155762867585E-296443981167", 51, RoundingMode.ROUND_HALF_DOWN); + t("4.90795797150709105376962677572069305380908614111297365553e+4086", "2.4088051450080E+8173", 57, RoundingMode.ROUND_DOWN); + t("7.34786550466656744803006128046e+2795776346528318", "5.399112747466886993138311223824932339056153376414279E+5591552693056637", 30, RoundingMode.ROUND_FLOOR); + t("9.70637064951188141912617586468613169489040932e+9263851", "9.4213631185705702766011583868449956283599883063266590478542230153211906005516607505881153E+18527703", 45, RoundingMode.ROUND_HALF_UP); + t("3.14106344730876479475193343625504e-910", "9.8662795800192214301268467968737763973E-1820", 33, RoundingMode.ROUND_CEIL); + t("6.8863641511930920159e+1434", "4.742201122283735467286752580639151338402147978758E+2869", 20, RoundingMode.ROUND_HALF_DOWN); + t("9.1536625949357836061871605822069283444244503528403697e+93673802", "8.3789538901926503620943368526446290753065226079800268864837819950868226858046E+187347605", 53, RoundingMode.ROUND_HALF_DOWN); + t("2.050219946066689694568885168e+41880885", "4.2034018272497E+83761770", 28, RoundingMode.ROUND_HALF_DOWN); + t("2.58797367988247572680336566731031833e+3461935", "6.69760776776444294842577371961987758394584550633726992061849437263890087941E+6923870", 36, RoundingMode.ROUND_UP); + t("6.0585255787e-340010557", "3.670573218788407507689514263121673716122995116133303311009468985401267408779E-680021113", 11, RoundingMode.ROUND_HALF_EVEN); + t("2.033581e+3480", "4.135448217987841390586067157756058403489565598382242753255526546540540095751E+6960", 7, RoundingMode.ROUND_CEIL); + t("2.4573907806034206508145897417338517767341675713702823338890812489722423677833e+38617943", "6.038769448594689087910861123468200183610626181299843431865263126830407743069E+77235886", 77, RoundingMode.ROUND_HALF_DOWN); + t("1.8941557084570725928674400770347757019608538011645519465e+304618795294", "3.587825847880514585709358773677324854320097535772497696497628452E+609237590588", 56, RoundingMode.ROUND_FLOOR); + t("2.32812250747228299412e+313837", "5.4201544097990303858141E+627674", 21, RoundingMode.ROUND_HALF_DOWN); + t("8.60645693084276008079123831702972740385e+154", "7.40711009024513815760164703475393233970877193508242149988958928091491914E+309", 39, RoundingMode.ROUND_HALF_UP); + t("2.2706488927283296329062209956647601583635908763632678803367026671603381e+37", "515584639404838941246901894159595954745567752911318738407100564309750626516.1791617", 71, RoundingMode.ROUND_DOWN); + t("3.39893741999727121585845223399480273146968e-1897475", "1.1552775585057706466940388889077953341599272409994467228416821444233007E-3794949", 43, RoundingMode.ROUND_HALF_UP); + t("5.5136e+166880406", "3.04E+333760813", 5, RoundingMode.ROUND_HALF_DOWN); + t("3.030059156073167836053285715808361515527841237119577e-4844973118878", "9.181258489302838079121284106371E-9689946237756", 52, RoundingMode.ROUND_FLOOR); + t("3.01621123e+412557134", "9.097530205431698341141736543467287960383290070775938518339807290620844422120352E+825114268", 9, RoundingMode.ROUND_DOWN); + t("2.7692987e+14174", "7.66901510445223617671270401903922314736658973717857677577742198978502434481269112716631157122727993E+28348", 8, RoundingMode.ROUND_CEIL); + t("8.1163781879836183909409375363404068136137574908934e+204971512154", "6.58755948903762446750976327895628343674985502155875440613151906714494399548343042750830709062E+409943024309", 50, RoundingMode.ROUND_CEIL); + t("2.2572378462909762847780411032884150727038656700793e+46981", "5.0951226947283250806636033744756427856016086366224E+93962", 50, RoundingMode.ROUND_CEIL); + t("9.0281062255204740105304768996726311145672013275416789795275497995048942097e+226702402736093", "8.150670201928153993411272129594404183375704672E+453404805472187", 74, RoundingMode.ROUND_FLOOR); + t("2.64772769892363307093059365640630051052232478304226906666646516317583776e+295003889110756", "7.0104619676474369342365609690167930592871571199219650021680E+590007778221512", 72, RoundingMode.ROUND_CEIL); + t("3.13423173774023388222090399070014419184070085892e+2", "98234.08585858166222466900865352520714306", 48, RoundingMode.ROUND_HALF_UP); + t("7.5875e-145", "5.7570159774745196978712550411544E-289", 6, RoundingMode.ROUND_HALF_UP); + t("9.019814533002418483218041677971520150196e+3587590862646067", "8.13570542097616366291558237185955227709177843801016027464366840371504045382881466535960323E+7175181725292135", 40, RoundingMode.ROUND_HALF_DOWN); + t("1.35383017303503354367849439544524371635138052709984972e-317514", "1.8328561374200688659993455967130023996868394E-635028", 54, RoundingMode.ROUND_HALF_EVEN); + t("9.37621997569568303472309542853412757889934365090285260995e+2197", "8.791350103263475495836258678650727954866E+4395", 57, RoundingMode.ROUND_FLOOR); + t("3.0504548177905637298e-12020179286", "9.30527459538166136476938267777527342524470683073510498487415309409144843033563741336552377142559E-24040358572", 20, RoundingMode.ROUND_HALF_DOWN); + t("3.086354295687660799750652512900547113767349372521616998883899383188989461278e-12", "9.5255828385096767511E-24", 76, RoundingMode.ROUND_HALF_UP); + t("6.01199e+2879412", "3.61440703564099768E+5758825", 6, RoundingMode.ROUND_DOWN); + t("6.4466262346647814710667613602892424745155045175684165271079e+3092341", "4.1558989809468218098954125905590E+6184683", 59, RoundingMode.ROUND_FLOOR); + t("2.33792157009946435002902338510510938904819610116259987000091846057423155518e+1006816", "5.46587726793634459876766095307E+2013632", 75, RoundingMode.ROUND_HALF_EVEN); + t("7.52637894342292600459229452291474918313e+41", "5.66463800E+83", 39, RoundingMode.ROUND_HALF_DOWN); + t("2.5626769096419963476340903043996166294265167882558946536e-526", "6.56731294321225271290059931898686901695490329384659866588358271112311008476E-1052", 56, RoundingMode.ROUND_HALF_DOWN); + t("1.97484176581314990174384610437230990660852618680820080988126186147286133697613e+39070", "3.90E+78140", 78, RoundingMode.ROUND_HALF_DOWN); + t("1.45440475274653711374621434742103752e+477036835198", "2.115293184811715756111035E+954073670396", 36, RoundingMode.ROUND_HALF_DOWN); + t("6.1992027227922108538280901695224715931051043157545802926356061644672662141e-4", "3.843011439827436064752567943485332632909203518838336622636143406313606434503297E-7", 74, RoundingMode.ROUND_UP); + t("1.861442505620019066170426433408338273749989194997433001e+25044421131632", "3.46496820172893471274450231665851340050925461712723830282019910966406769659794792E+50088842263264", 55, RoundingMode.ROUND_CEIL); + t("2.96906281918975236955954438611698479173299363074681248825253049431984948e+2137858258433490", "8.815334024295000171588787248553700566011567E+4275716516866980", 72, RoundingMode.ROUND_FLOOR); + t("5.175035338263985141e-19506965", "2.678099075228103912053736336553650966855863923E-39013929", 19, RoundingMode.ROUND_DOWN); + t("5.6856749819172745252775650565521e+444143632171956", "3.23269E+888287264343913", 32, RoundingMode.ROUND_HALF_UP); + t("7.8957265213531807075664078327696484000996048294363154908871e+11785538569", "6.234249730E+23571077139", 59, RoundingMode.ROUND_UP); + t("1.8283610369653862758941525973088006356e-393", "3.3429040814931426E-786", 38, RoundingMode.ROUND_CEIL); + t("6.324555320336758664e+2759", "4E+5519", 21, RoundingMode.ROUND_HALF_DOWN); + t("2.622555500020207157785460692451466974946442382680558e-42303129343", "6.8777973506862387855796638472705729011046488677364623807540946604353320E-84606258686", 52, RoundingMode.ROUND_FLOOR); + t("1.9200171460327483539026314778967671885846184667896514124254004538864392e+46889086360", "3.6864658410597401179937293588455580384542595E+93778172720", 71, RoundingMode.ROUND_HALF_DOWN); + t("1.32991783013086940115047303330105611393593893453e+2137996", "1.7686814349E+4275992", 48, RoundingMode.ROUND_HALF_DOWN); + t("8.504876072821706451854804787270754918424940970464942356230569216208409282293e+1954155074", "7.23329170140551722658511E+3908310149", 76, RoundingMode.ROUND_UP); + t("8.989429645304548256737997439398050197279956353931606298464860617251463e-2145138768798", "8.080984534788025628E-4290277537595", 70, RoundingMode.ROUND_HALF_DOWN); + t("2e+87988", "4.168731982E+175976", 2, RoundingMode.ROUND_HALF_DOWN); + t("5.2064477870639497e-28517", "2.71070985594230989175938821603202E-57033", 17, RoundingMode.ROUND_DOWN); + t("7.2266787484135478395239424677393393e+34292647220436", "5.222488573277200227050900075314803902522307294599971E+68585294440873", 35, RoundingMode.ROUND_HALF_DOWN); + t("2.65893085873818746784799462956040824680806779629363141352213215464903828502e+41", "7.06991331155019503904475228560073103E+82", 75, RoundingMode.ROUND_CEIL); + t("8.881482619e+2095399787486186", "7.888073352767506531631057273649734668539553289948510498240822582019489548040318306E+4190799574972373", 10, RoundingMode.ROUND_DOWN); + t("9.80332759539657e+1", "9610.523194266382981096232960460004238837580104560636452314738102557965139756002214949", 15, RoundingMode.ROUND_HALF_UP); + t("9.082984330509808229878255253074802885120895971e+4349613472438", "8.2500604348286709226838364974088837798915132923152211474564761463852274150514234984081825E+8699226944877", 46, RoundingMode.ROUND_UP); + t("2.3051841717555917375661e-3805332", "5.3138740657125134679225950980E-7610664", 23, RoundingMode.ROUND_HALF_DOWN); + t("1.58649846866898977e+17", "25169773910890495218058815869093616.163248025716892103133483661936354157144385347", 18, RoundingMode.ROUND_HALF_EVEN); + t("1.832487619892217619778605787594363341371e+489189", "3.35801087705824464519194153474023E+978378", 41, RoundingMode.ROUND_HALF_EVEN); + t("8.46288196383477866594835930945604975e+68975897", "7.16203711338E+137951795", 37, RoundingMode.ROUND_UP); + t("2.15903826476511767107e-426122", "4.661446228719970353170383319438925741090187385001608608366288E-852244", 21, RoundingMode.ROUND_HALF_DOWN); + t("3.25286507801e+13148279697", "1.05811312157440264046383518534621E+26296559395", 12, RoundingMode.ROUND_FLOOR); + t("3.926939618857446e+2701650423077205", "1.542085477015226E+5403300846154411", 16, RoundingMode.ROUND_HALF_UP); + t("2.300649433664730442433670197221423917e+33169", "5.292987816621844920407591519790997148291859608855681470609202096937600310235150613372875022280048179E+66338", 37, RoundingMode.ROUND_HALF_DOWN); + t("8.587979082919625568762e+0", "73.753384728665013020438300", 22, RoundingMode.ROUND_HALF_UP); + t("2.068686747170362320265134050006653074465e+34", "4.2794648579182945572703279910205170577550420354118714938358645443205E+68", 40, RoundingMode.ROUND_HALF_UP); + t("7.69e-46140374415", "5.9182163506875549546680576005992720902216355454971484890245944725555E-92280748829", 3, RoundingMode.ROUND_HALF_DOWN); + t("1.8175779968958926637429567383064725023e+489880727845850", "3.303589774800085601596674E+979761455691700", 38, RoundingMode.ROUND_CEIL); + t("8.919264136401625271884219060858252e+9", "79553272734900230263.41763128677730026531493235388640071381802652591", 34, RoundingMode.ROUND_DOWN); + t("2.684345427e+44565", "7.205710371469E+89130", 12, RoundingMode.ROUND_HALF_UP); + t("2.9534086394e+225110078", "8.722622591246883914133438987850898330671972588389730184309208739334634887878346367329202E+450220156", 11, RoundingMode.ROUND_HALF_UP); + t("2.2293525e-29", "4.970012461272812033092318803761409304947044073671573877964943E-58", 8, RoundingMode.ROUND_UP); + t("2.12326974896414051580077536570530341003518e+129130", "4.5082744268662442849713715921E+258260", 42, RoundingMode.ROUND_FLOOR); + t("2.5833750802158470838638220584e+18913396", "6.6738268050802343551355260020766554923882450343012342734378848E+37826792", 30, RoundingMode.ROUND_DOWN); + t("1.0482628915520200483e+1", "109.8855089805002144728403440947030093340246871753530", 20, RoundingMode.ROUND_HALF_DOWN); + t("1.49777148251106029879789692329117828615e-494834655520847", "2.24331941382337940650496041556953252175484515884385876892851088684239094331708000189663420216840E-989669311041694", 39, RoundingMode.ROUND_HALF_DOWN); + t("6.95456711664340560996070853420178762114841e-38627491422785", "4.8366003779897772450979302026969538397871395603455798715295598491356099722574E-77254982845569", 42, RoundingMode.ROUND_FLOOR); + t("3.10149148573625247e-4", "9.6192494360944667705321067387464882437575358E-8", 18, RoundingMode.ROUND_HALF_DOWN); + t("1.9575110120741046328968e+257921497", "3.83184936239138541387679462617387283711241414931326900113204911095477961E+515842994", 23, RoundingMode.ROUND_UP); + t("7.7671e+1441473951", "6.0327727774912176230101E+2882947903", 5, RoundingMode.ROUND_HALF_EVEN); + t("1.55009951392721507762173021041426457646284757348955667596e+4760", "2.40280850307738845039513019493014927568794808938729593338641386181207198737391954656000091310896E+9520", 57, RoundingMode.ROUND_FLOOR); + t("6.97734691743388618569498e-29", "4.8683370006224153769363821987754694567429898400322317885097538299174433336292355572118157532513893E-57", 24, RoundingMode.ROUND_HALF_UP); + t("1.4993331851193049612203995625656077760057082447306644612348e+2339610533576283", "2.2480E+4679221067152566", 59, RoundingMode.ROUND_FLOOR); + t("6.04693544698469e-220", "3.65654283E-439", 15, RoundingMode.ROUND_DOWN); + t("4.92955e+230982431475", "2.4300466966592452130220374934414E+461964862951", 7, RoundingMode.ROUND_HALF_EVEN); + t("3.0764244910060828198383307889390376085e+4181965985826", "9.46438764886203575285E+8363931971652", 38, RoundingMode.ROUND_UP); + t("7.4513572904573959e+293", "5.5522725470052584411450816E+587", 17, RoundingMode.ROUND_UP); + t("1.245345961467927340281476373719978090064081519e+42", "1.550886563744476367740974406041099100674095756961953547612335899E+84", 46, RoundingMode.ROUND_DOWN); + t("1.5499077392523e-4", "2.40221400019421603693694579636622069903401E-8", 14, RoundingMode.ROUND_HALF_DOWN); + t("3.07185786e+12919", "9.43631065159385809410362801786965384978640704874013E+25838", 9, RoundingMode.ROUND_UP); + t("2.361286043755e+281976835", "5.5756717804303509418805557E+563953670", 13, RoundingMode.ROUND_HALF_DOWN); + t("5.47722557505166113456969782800802e+405615457129", "3E+811230914259", 33, RoundingMode.ROUND_HALF_EVEN); + t("1.7178698335153e+144561611584745", "2.9510767649015787272590443004662758146251322168953340785510127474489250982992775086288323854164153E+289123223169490", 14, RoundingMode.ROUND_CEIL); + t("2.2011e+12378959348", "4.84515086803287598716648233379771635161708841282201798840424143306973602425697887937893645861532E+24757918696", 5, RoundingMode.ROUND_FLOOR); + t("3.071695622941830478526650605376658041302645824732e+28109511538117", "9.435314E+56219023076234", 49, RoundingMode.ROUND_CEIL); + t("2.307714697590689989764e+284", "5.325547125476089750844425629104815411440491176993481E+568", 22, RoundingMode.ROUND_UP); + t("2.5862546754279728496914821072086e-33773833", "6.6887132461730491917584965749675495749719281864675587283858319408183402627833958E-67547666", 32, RoundingMode.ROUND_FLOOR); + t("5.74069223118780469804395537303763292412320069e-28", "3.295554729322001530304774161762307365140729343455866587659018918667945699638475469150683153123653323E-55", 45, RoundingMode.ROUND_HALF_DOWN); + t("2.53435553329728248339409747785119424231260889160560714e+25943171346", "6.422957969154553102396E+51886342692", 54, RoundingMode.ROUND_CEIL); + t("1.4069894208184455429860946489038258613329117231491e+114452", "1.979619230295024840325033863086398472578753367030579325792446632992E+228904", 50, RoundingMode.ROUND_UP); + t("1.118294004710828525178841841394721727540545598338176097e+1", "125.058148097218257166460091", 55, RoundingMode.ROUND_HALF_UP); + t("5.888425440747775688e+2065204358486413", "3.467355417124563636358862403139990401147625419807197821070468E+4130408716972827", 19, RoundingMode.ROUND_UP); + t("3.0558360616281147776649165585589148e+202", "9.3381340355468272974654269623217477382915449047483811417E+404", 35, RoundingMode.ROUND_HALF_UP); + t("8.49192304e+1387453895", "7.2112757E+2774907791", 9, RoundingMode.ROUND_HALF_UP); + t("1.6985163959801521e+3936837", "2.88495794741340509204059372399499124467343954532861012543791870383E+7873674", 17, RoundingMode.ROUND_FLOOR); + t("4.991092064869170494e-124451984", "2.4911E-248903967", 19, RoundingMode.ROUND_UP); + t("5.9823664195735900053440901869404771842353600892916293363151e+2227900957", "3.57887079780417347338180368431509195268242653234667944437089019357950841991042084010E+4455801915", 59, RoundingMode.ROUND_UP); + t("1.90934970073455410278410575623977888122382805484e+422554664715", "3.6456162796951313121087727108063524737724086412612828706606881122179782708607529986314383405E+845109329430", 48, RoundingMode.ROUND_DOWN); + t("2.599310207388995318083e+398467", "6.75641355423662185068716628560209294936028E+796934", 22, RoundingMode.ROUND_HALF_EVEN); + t("3.7633102634136297417364966e+778600439757179", "1.416250413871436327348908304665878915237348394E+1557200879514359", 26, RoundingMode.ROUND_UP); + t("1.2047068181e+31361471610", "1.45131851760962261131924534974E+62722943220", 11, RoundingMode.ROUND_HALF_UP); + t("4.35951628054340993989341222113828625466454197009e-21152924900022", "1.90053822003230473596535984483816E-42305849800043", 48, RoundingMode.ROUND_HALF_EVEN); + t("1.576844611205999099662237540201844126209316481620105534e+335357340260426", "2.486438927889398461388938E+670714680520852", 55, RoundingMode.ROUND_DOWN); + t("3e-414034", "6.47961009652494321346331325444614339994562352820030434758628977937286889619097368135E-828068", 1, RoundingMode.ROUND_CEIL); + t("2.7450159803706115172884307982554068123557452994357916574e+29493402848956", "7.535112732490029474794930517417328483099871453263111571224994801873955541077813E+58986805697912", 56, RoundingMode.ROUND_DOWN); + t("8.450708163926728117884231904577733365414280601e-3356220959", "7.1414468471857852311230634694477427663911004991250862311231174531532437446075636178902521E-6712441917", 46, RoundingMode.ROUND_CEIL); + t("2.21717604626595076e+2233028", "4.91586962013551338731303957E+4466056", 18, RoundingMode.ROUND_CEIL); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalSumTests.cs b/DecimalSharp.Tests/BigDecimalSumTests.cs new file mode 100644 index 0000000..3cf1cde --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalSumTests.cs @@ -0,0 +1,87 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalSum")] + public class BigDecimalSumTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Sum() + { + var bigDecimalFactory = new BigDecimalFactory(); + + BigDecimal expected = null; + + var t = (BigDecimalArgument[] arr) => + { + if (expected == null) + Assert.Fail(); + + BigDecimalTests.assertEqualDecimal(expected, bigDecimalFactory.Sum(arr)); + }; + + expected = bigDecimalFactory.BigDecimal(0); + + t(new BigDecimalArgument[] {"0"}); + t(new BigDecimalArgument[] {"0", bigDecimalFactory.BigDecimal(0)}); + t(new BigDecimalArgument[] {1, 0, "-1"}); + t(new BigDecimalArgument[] {0, bigDecimalFactory.BigDecimal("-10"), 0, 0, 0, 0, 0, 10}); + t(new BigDecimalArgument[] {11, -11}); + t(new BigDecimalArgument[] {1, "2", bigDecimalFactory.BigDecimal(3), bigDecimalFactory.BigDecimal("4"), -10}); + t(new BigDecimalArgument[] {bigDecimalFactory.BigDecimal(-10), "9", bigDecimalFactory.BigDecimal(0.01), 0.99}); + + expected = bigDecimalFactory.BigDecimal(10); + + t(new BigDecimalArgument[] {"10"}); + t(new BigDecimalArgument[] {"0", bigDecimalFactory.BigDecimal("10")}); + t(new BigDecimalArgument[] {10, 0}); + t(new BigDecimalArgument[] {0, 0, 0, 0, 0, 0, 10}); + t(new BigDecimalArgument[] {11, -1}); + t(new BigDecimalArgument[] {1, "2", bigDecimalFactory.BigDecimal(3), bigDecimalFactory.BigDecimal("4")}); + t(new BigDecimalArgument[] {"9", bigDecimalFactory.BigDecimal(0.01), 0.99}); + + expected = bigDecimalFactory.BigDecimal(600); + + t(new BigDecimalArgument[] {100, 200, 300}); + t(new BigDecimalArgument[] {"100", "200", "300"}); + t(new BigDecimalArgument[] {bigDecimalFactory.BigDecimal(100), bigDecimalFactory.BigDecimal(200), bigDecimalFactory.BigDecimal(300)}); + t(new BigDecimalArgument[] {100, "200", bigDecimalFactory.BigDecimal(300)}); + t(new BigDecimalArgument[] {99.9, 200.05, 300.05}); + + expected = bigDecimalFactory.BigDecimal(double.NaN); + + t(new BigDecimalArgument[] {double.NaN}); + t(new BigDecimalArgument[] {"1", double.NaN}); + t(new BigDecimalArgument[] {100, 200, double.NaN}); + t(new BigDecimalArgument[] {double.NaN, 0, "9", bigDecimalFactory.BigDecimal(0), 11, double.PositiveInfinity}); + t(new BigDecimalArgument[] {0, bigDecimalFactory.BigDecimal("-Infinity"), "9", bigDecimalFactory.BigDecimal(double.NaN), 11}); + t(new BigDecimalArgument[] {4, "-Infinity", 0, "9", bigDecimalFactory.BigDecimal(0), double.PositiveInfinity, 2}); + + expected = bigDecimalFactory.BigDecimal(double.PositiveInfinity); + + t(new BigDecimalArgument[] {double.PositiveInfinity}); + t(new BigDecimalArgument[] {1, "1e10000000000000000000000000000000000000000", "4"}); + t(new BigDecimalArgument[] {100, 200, "Infinity"}); + t(new BigDecimalArgument[] {0, bigDecimalFactory.BigDecimal("Infinity"), "9", bigDecimalFactory.BigDecimal(0), 11}); + t(new BigDecimalArgument[] {0, "9", bigDecimalFactory.BigDecimal(0), 11, double.PositiveInfinity}); + t(new BigDecimalArgument[] {4, bigDecimalFactory.BigDecimal(double.PositiveInfinity), 0, "9", bigDecimalFactory.BigDecimal(0), double.PositiveInfinity, 2}); + + expected = bigDecimalFactory.BigDecimal(double.NegativeInfinity); + + t(new BigDecimalArgument[] {double.NegativeInfinity}); + t(new BigDecimalArgument[] {1, "-1e10000000000000000000000000000000000000000", "4"}); + t(new BigDecimalArgument[] {100, 200, "-Infinity"}); + t(new BigDecimalArgument[] {0, bigDecimalFactory.BigDecimal("-Infinity"), "9", bigDecimalFactory.BigDecimal(0), 11}); + t(new BigDecimalArgument[] {0, "9", bigDecimalFactory.BigDecimal(0), 11, double.NegativeInfinity}); + t(new BigDecimalArgument[] {4, bigDecimalFactory.BigDecimal(double.NegativeInfinity), 0, "9", bigDecimalFactory.BigDecimal(0), double.NegativeInfinity, 2}); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalTanTests.cs b/DecimalSharp.Tests/BigDecimalTanTests.cs new file mode 100644 index 0000000..bf2dea7 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalTanTests.cs @@ -0,0 +1,141 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalTan")] + public class BigDecimalTanTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Tan() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Tan().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", 20, RoundingMode.ROUND_HALF_UP, "0"); + t("-0", 20, RoundingMode.ROUND_HALF_UP, "-0"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + + t("3", 5, RoundingMode.ROUND_HALF_DOWN, "-0.14255"); + t("0.8", 7, RoundingMode.ROUND_HALF_EVEN, "1.029639"); + t("539998661123466984649191689138494900416386817996524", 7, RoundingMode.ROUND_HALF_EVEN, "32.04695"); + t("0.5172293543584894071801901902", 5, RoundingMode.ROUND_DOWN, "0.56888"); + t("5", 10, RoundingMode.ROUND_HALF_DOWN, "-3.380515006"); + t("0.5283979979897015", 1, RoundingMode.ROUND_HALF_UP, "0.6"); + t("0.032294", 4, RoundingMode.ROUND_HALF_DOWN, "0.03231"); + t("6339441327243052114957865586706124503.386166832963015135918043343179", 7, RoundingMode.ROUND_UP, "-0.06666567"); + t("0.9483926380646355642560348839879277", 4, RoundingMode.ROUND_HALF_EVEN, "1.394"); + t("0.4989999", 7, RoundingMode.ROUND_HALF_EVEN, "0.5450046"); + t("80", 8, RoundingMode.ROUND_HALF_EVEN, "9.0036549"); + t("9", 2, RoundingMode.ROUND_UP, "-0.46"); + t("710.0571640039", 2, RoundingMode.ROUND_CEIL, "0.058"); + t("2485", 2, RoundingMode.ROUND_UP, "0.00022"); + t("1", 8, RoundingMode.ROUND_DOWN, "1.5574077"); + t("1683930704126586032365374681825182443446390958574678366195884605194996193", 6, RoundingMode.ROUND_DOWN, "-0.540063"); + t("4", 7, RoundingMode.ROUND_CEIL, "1.157822"); + t("488888888888999.88888888406189896488888888888", 9, RoundingMode.ROUND_UP, "5.10971582"); + t("0.76322415", 7, RoundingMode.ROUND_UP, "0.9566071"); + t("0.005", 4, RoundingMode.ROUND_CEIL, "0.005001"); + t("0.313", 9, RoundingMode.ROUND_HALF_EVEN, "0.323638526"); + t("9798000000100000070000000000010007300", 5, RoundingMode.ROUND_UP, "1.1308"); + t("0.0000002", 2, RoundingMode.ROUND_UP, "0.00000021"); + t("7.9548", 4, RoundingMode.ROUND_DOWN, "-9.885"); + t("7", 5, RoundingMode.ROUND_DOWN, "0.87144"); + t("50080000", 10, RoundingMode.ROUND_FLOOR, "0.3252122977"); + t("1687619439340503284670339680.931590414877", 6, RoundingMode.ROUND_HALF_EVEN, "-4.69126"); + t("60970535.5", 3, RoundingMode.ROUND_DOWN, "0.804"); + t("0.17", 3, RoundingMode.ROUND_CEIL, "0.172"); + t("0.5", 5, RoundingMode.ROUND_HALF_EVEN, "0.5463"); + t("976.8", 2, RoundingMode.ROUND_UP, "-0.24"); + t("5957.69", 6, RoundingMode.ROUND_UP, "2.82277"); + t("3859393443331162786655368.87986161531415848272022672234461227844", 3, RoundingMode.ROUND_HALF_EVEN, "0.47"); + t("0.5", 1, RoundingMode.ROUND_HALF_DOWN, "0.5"); + t("468455006548968895675682202443647176252098177665257898933", 5, RoundingMode.ROUND_HALF_DOWN, "-1.4111"); + t("26588816756666", 1, RoundingMode.ROUND_CEIL, "0.07"); + t("0.239424045403994683949187909216", 5, RoundingMode.ROUND_CEIL, "0.24411"); + t("810209.109", 6, RoundingMode.ROUND_HALF_EVEN, "-4.52238"); + t("799063368.11558288974072", 1, RoundingMode.ROUND_CEIL, "-0.9"); + t("72.3640503", 7, RoundingMode.ROUND_CEIL, "0.1078344"); + t("843003462755848631687717888604", 5, RoundingMode.ROUND_HALF_DOWN, "-1.1699"); + t("90706.61", 3, RoundingMode.ROUND_CEIL, "-0.676"); + t("0.1", 7, RoundingMode.ROUND_HALF_DOWN, "0.1003347"); + t("29555.88888888888885555555", 9, RoundingMode.ROUND_HALF_DOWN, "-0.218161582"); + t("3079999999999999999999.999949999999999999999999999999999999999999999", 2, RoundingMode.ROUND_HALF_DOWN, "1.6"); + t("6", 3, RoundingMode.ROUND_HALF_UP, "-0.291"); + t("9.648589238187519", 7, RoundingMode.ROUND_UP, "0.2276248"); + t("590.89", 7, RoundingMode.ROUND_DOWN, "0.2773838"); + t("807876335", 9, RoundingMode.ROUND_CEIL, "0.965588602"); + t("32099561.989", 8, RoundingMode.ROUND_HALF_UP, "-0.24584079"); + t("7743398777777777777777733.77", 3, RoundingMode.ROUND_CEIL, "-0.526"); + t("45.52", 5, RoundingMode.ROUND_CEIL, "30.207"); + t("399999999999999999999999999999999999999999999999909999999999.99999999999999", 4, RoundingMode.ROUND_HALF_UP, "1.742"); + t("32400", 3, RoundingMode.ROUND_CEIL, "0.941"); + t("4152914444444444444444444544444444444444444444444444444.944444444440444442444494444444444", 9, RoundingMode.ROUND_UP, "-0.101470716"); + t("90000000000508319.117628510842726222", 5, RoundingMode.ROUND_UP, "5.1435"); + t("0.0074072", 8, RoundingMode.ROUND_FLOOR, "0.0074073354"); + t("0.413272", 4, RoundingMode.ROUND_HALF_DOWN, "0.4385"); + t("0.8633", 10, RoundingMode.ROUND_FLOOR, "1.169338115"); + t("33333333333333333333333333333.33333333333333333333", 8, RoundingMode.ROUND_CEIL, "0.5813679"); + t("562", 10, RoundingMode.ROUND_UP, "-0.3594685138"); + t("6433373233.39333336638333334", 5, RoundingMode.ROUND_HALF_UP, "-1.383"); + t("233333333331549444444444.09076555555555555", 10, RoundingMode.ROUND_HALF_UP, "-5.305366526"); + t("40", 9, RoundingMode.ROUND_CEIL, "-1.11721493"); + t("906287052558597992196230844623", 10, RoundingMode.ROUND_DOWN, "0.3528425701"); + t("900000", 4, RoundingMode.ROUND_HALF_EVEN, "-0.3334"); + t("57777777777.88888888887777777428970596211366", 13, RoundingMode.ROUND_DOWN, "4.620958871418"); + t("33109173612614237", 15, RoundingMode.ROUND_DOWN, "0.697054002938309"); + t("446571", 8, RoundingMode.ROUND_HALF_UP, "-0.11299979"); + t("55.33", 25, RoundingMode.ROUND_DOWN, "-2.721513818553435443556001"); + t("0.6874", 3, RoundingMode.ROUND_HALF_UP, "0.821"); + t("97415551555.55555655655655554555555855555", 38, RoundingMode.ROUND_HALF_EVEN, "0.63497857004739965579501336949790595112"); + t("3052744161971196989887333333333333333", 15, RoundingMode.ROUND_UP, "2.3893665412711"); + t("20083.4596122", 37, RoundingMode.ROUND_UP, "-0.9171727446291034528773430723329592848"); + t("9200", 30, RoundingMode.ROUND_FLOOR, "6.43843719089952501300840146253"); + t("1", 23, RoundingMode.ROUND_UP, "1.557407724654902230507"); + t("78887888588.8", 15, RoundingMode.ROUND_HALF_DOWN, "-0.0613791279629461"); + t("1147231", 8, RoundingMode.ROUND_HALF_UP, "-0.097582634"); + t("0.000553763344", 27, RoundingMode.ROUND_HALF_UP, "0.000553763400604559119913346525"); + t("68", 24, RoundingMode.ROUND_DOWN, "-2.04008159801594615389349"); + t("49999999999999999999999999999999999999999999999999999999.399999999999999999992702", 15, RoundingMode.ROUND_CEIL, "-4.12257063808152"); + t("49999999999999999999999999999999999999999999999999999.99999999999999999999999999999", 38, RoundingMode.ROUND_HALF_EVEN, "-0.41507238166911582158673379470559517419"); + t("0.00000391163258651029507727", 31, RoundingMode.ROUND_CEIL, "0.000003911632586530245537172208314767"); + t("0.17183171313", 36, RoundingMode.ROUND_HALF_UP, "0.173543103883274147884533120728007237"); + t("861646.5732966967557082", 34, RoundingMode.ROUND_CEIL, "-2.464947656728891301675656852697406"); + t("47777777777777777.410171", 105, RoundingMode.ROUND_HALF_DOWN, "-13.74058038972407219477409398839850580956304359987902889186211451339313466403485175336849944968942741891"); + t("0.390071731702448005162815294909486174474947036240529240590971978418532990165699316733956931596883519677657915509998387416505531185920438999174869181240110048120035540672577", 63, RoundingMode.ROUND_DOWN, "0.411138769556421473902517663320961167226706740351370710111315144"); + t("23174769554", 70, RoundingMode.ROUND_FLOOR, "0.2212756420749658903960662285747816321880538429001022336777294070264195"); + t("0.5592", 74, RoundingMode.ROUND_DOWN, "0.625835640923790139625307834841776614566589496394316390500913130105766275"); + t("6661489439437775791.114329793186996632507954406585491", 17, RoundingMode.ROUND_HALF_DOWN, "-1.5847845023422794"); + t("4391137181720764819571909798888888888888888888", 86, RoundingMode.ROUND_DOWN, "-0.8685635418477878118403689813703497084174127945629019783498553011616589497613259649227"); + t("300000000000000000000000000000000000000000000000000000000000000000000000000200000000400300000000000000000000000000000.0000000000000000000000000000000000000000000000000003", 122, RoundingMode.ROUND_FLOOR, "-1.5903229154055637520787252214804110216069360069379104488574199058901135519171083962076619886567087892277814852998414939069"); + t("6587685840713754402278094276205491723366077405819490595067025408026873250375623638673063957701601231", 107, RoundingMode.ROUND_FLOOR, "0.88106648906135934944047838538886082156746682725824571546159607795133625640190620741982638843180493222615294"); + t("0.524217411165998018391262237830297491516856805040463896080592290487405064611025001607311512479709354535407130581948832593516281243820812174844723190311545869854968531247730387537943969800839367585396013641826800875467649274673709974876292276089324234102809573076731030535244688816", 76, RoundingMode.ROUND_FLOOR, "0.5781754114340578960371795632804762026798421163023137415437904934165060267084"); + t("323646192595.4845", 127, RoundingMode.ROUND_HALF_EVEN, "-0.3747612268270038347175054875779625030989108207803221587812055629899198693615407534041949990189331417585285760850333254670480789"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalTanhTests.cs b/DecimalSharp.Tests/BigDecimalTanhTests.cs new file mode 100644 index 0000000..57a7aac --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalTanhTests.cs @@ -0,0 +1,141 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalTanh")] + public class BigDecimalTanhTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Tanh() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n, long pr, RoundingMode rm, string expected) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).Tanh().ValueOf()); + }; + + t("NaN", 40, RoundingMode.ROUND_HALF_UP, "NaN"); + t("0", 20, RoundingMode.ROUND_HALF_UP, "0"); + t("-0", 20, RoundingMode.ROUND_HALF_UP, "-0"); + t("Infinity", 40, RoundingMode.ROUND_HALF_UP, "1"); + t("-Infinity", 40, RoundingMode.ROUND_HALF_UP, "-1"); + + t("0.20269", 1, RoundingMode.ROUND_UP, "0.2"); + t("0.42", 6, RoundingMode.ROUND_HALF_DOWN, "0.39693"); + t("-0.35339119", 8, RoundingMode.ROUND_DOWN, "-0.33937958"); + t("0.153", 8, RoundingMode.ROUND_DOWN, "0.15181721"); + t("0.26", 1, RoundingMode.ROUND_DOWN, "0.2"); + t("-0.5", 4, RoundingMode.ROUND_HALF_UP, "-0.4621"); + t("0.5301167511", 10, RoundingMode.ROUND_UP, "0.4854703307"); + t("0.1", 6, RoundingMode.ROUND_CEIL, "0.099668"); + t("-0.1947", 8, RoundingMode.ROUND_HALF_EVEN, "-0.19227651"); + t("0.62055680437965736490569245685566214324448351639", 9, RoundingMode.ROUND_FLOOR, "0.551515589"); + t("0.8653929782497126681556355800799811365862905422680464", 2, RoundingMode.ROUND_HALF_DOWN, "0.7"); + t("-0.223453445837184", 10, RoundingMode.ROUND_HALF_EVEN, "-0.2198071371"); + t("0.6228344", 3, RoundingMode.ROUND_HALF_EVEN, "0.553"); + t("0.3860621505234646348994570686682533147396620957827359578508068456", 2, RoundingMode.ROUND_DOWN, "0.36"); + t("0.5499", 3, RoundingMode.ROUND_CEIL, "0.501"); + t("0.27", 4, RoundingMode.ROUND_UP, "0.2637"); + t("-0.20874419", 6, RoundingMode.ROUND_UP, "-0.205765"); + t("-0.9", 9, RoundingMode.ROUND_UP, "-0.716297871"); + t("-0.66", 10, RoundingMode.ROUND_UP, "-0.5783634131"); + t("0.5", 8, RoundingMode.ROUND_DOWN, "0.46211715"); + t("-0.8730255767917122199088529", 5, RoundingMode.ROUND_DOWN, "-0.7029"); + t("-0.3", 6, RoundingMode.ROUND_HALF_UP, "-0.291313"); + t("0.0772947", 5, RoundingMode.ROUND_HALF_EVEN, "0.077141"); + t("-0.1", 5, RoundingMode.ROUND_HALF_UP, "-0.099668"); + t("-0.5530719666927749554276959", 5, RoundingMode.ROUND_CEIL, "-0.50281"); + t("-0.76695591420216557012230781", 7, RoundingMode.ROUND_UP, "-0.6451559"); + t("-0.28931973768077305489831982152049", 1, RoundingMode.ROUND_FLOOR, "-0.3"); + t("-0.631664433177866683720536966087102", 3, RoundingMode.ROUND_HALF_DOWN, "-0.559"); + t("0.4647093", 9, RoundingMode.ROUND_CEIL, "0.433914635"); + t("-0.293097", 2, RoundingMode.ROUND_UP, "-0.29"); + t("0.39968", 6, RoundingMode.ROUND_CEIL, "0.379676"); + t("-0.56478323116711527", 10, RoundingMode.ROUND_HALF_DOWN, "-0.5115177648"); + t("-0.60158", 2, RoundingMode.ROUND_CEIL, "-0.53"); + t("-0.566", 5, RoundingMode.ROUND_HALF_EVEN, "-0.51242"); + t("-0.5455", 1, RoundingMode.ROUND_DOWN, "-0.4"); + t("0.181743184255049315571704802510832099", 6, RoundingMode.ROUND_HALF_DOWN, "0.179768"); + t("-0.7", 2, RoundingMode.ROUND_FLOOR, "-0.61"); + t("-0.410626", 8, RoundingMode.ROUND_HALF_EVEN, "-0.38900408"); + t("0.32", 10, RoundingMode.ROUND_DOWN, "0.3095069212"); + t("0.478", 9, RoundingMode.ROUND_UP, "0.444640449"); + t("-0.2127882653536975970432160655692", 1, RoundingMode.ROUND_UP, "-0.3"); + t("0.668", 9, RoundingMode.ROUND_CEIL, "0.583662747"); + t("0.1054319768894549379656717", 6, RoundingMode.ROUND_HALF_DOWN, "0.105043"); + t("-0.2159146041935965", 6, RoundingMode.ROUND_FLOOR, "-0.212621"); + t("-0.53", 5, RoundingMode.ROUND_HALF_EVEN, "-0.48538"); + t("0.35", 10, RoundingMode.ROUND_DOWN, "0.3363755443"); + t("0.3", 3, RoundingMode.ROUND_CEIL, "0.292"); + t("0.38276035385122733156525463", 1, RoundingMode.ROUND_DOWN, "0.3"); + t("-0.751550287803356896438162105272645", 31, RoundingMode.ROUND_UP, "-0.6360729215504306567971084126656"); + t("0.2958626290477698111067628542902641468424491987425491552317600599757584700042", 33, RoundingMode.ROUND_HALF_UP, "0.287521804057197325874867763687105"); + t("-0.1624241525", 60, RoundingMode.ROUND_HALF_DOWN, "-0.161010729348804314083016365256060397030839070169914629959771"); + t("-0.3246133", 23, RoundingMode.ROUND_UP, "-0.3136723151870226491541"); + t("0.7574510519751273", 52, RoundingMode.ROUND_CEIL, "0.6395731248592590736391239000170979980280431536354096"); + t("0.52677087", 9, RoundingMode.ROUND_HALF_DOWN, "0.482908861"); + t("0.01504298596871499648833185964254026", 19, RoundingMode.ROUND_UP, "0.01504185137182836531"); + t("-0.66543541401805503420777", 66, RoundingMode.ROUND_HALF_UP, "-0.581969286944420744706095110187298812957954793212156080645254407938"); + t("0.016497376645717697522865", 24, RoundingMode.ROUND_UP, "0.0164958801477289569077129"); + t("0.79228702880353249365", 45, RoundingMode.ROUND_UP, "0.659702681921377249169326566285194050648896939"); + t("-0.32047744", 35, RoundingMode.ROUND_FLOOR, "-0.30993856125352144923141124282332793"); + t("0.78607526651121", 28, RoundingMode.ROUND_HALF_DOWN, "0.6561799353543745431928429623"); + t("-0.130782154855323731897567604029773075178369276247566438028657144457559876456195235141546572", 80, RoundingMode.ROUND_FLOOR, "-0.13004158964612601126893011628900193563954656630020761998126577892190799298653838"); + t("0.543888568", 52, RoundingMode.ROUND_HALF_DOWN, "0.495925821522156920755419346170717806152690266078471"); + t("0.595946834719509046130665028731095130596", 61, RoundingMode.ROUND_UP, "0.5341591488247401589317435849855958281981025417248174269032896"); + t("0.8180710003422039739052425209159024776836992576782", 75, RoundingMode.ROUND_HALF_DOWN, "0.674018589934549659108491437885993668870523407722879795457767225797625110655"); + t("0.2002343534718092035", 32, RoundingMode.ROUND_CEIL, "0.19760053356302078332195382537244"); + t("0.4316", 73, RoundingMode.ROUND_CEIL, "0.4066575843743152347702788188048559212155195983052915894345749387848887185"); + t("0.0297026", 47, RoundingMode.ROUND_UP, "0.029693868096821512437865399347977108636469769826"); + t("0.53196297398345769364909690685747648864854530119854", 56, RoundingMode.ROUND_DOWN, "0.48688016788770163925717272861291678368256194265983517854"); + t("-0.86540495196", 57, RoundingMode.ROUND_HALF_UP, "-0.699031973057205236065847483268440159156292260431585544883"); + t("-0.0218982341955013979387277630591838547", 66, RoundingMode.ROUND_HALF_EVEN, "-0.021894734560604770532346703409220449766736745588134181835811694617"); + t("-0.3503134189235148094342514029278811316170849354159958798993", 78, RoundingMode.ROUND_HALF_UP, "-0.336653471066707838641123262575513511831303224617968974634023553683297404695416"); + t("-0.666924383326373492780403568920198080574", 25, RoundingMode.ROUND_HALF_DOWN, "-0.5829531066013566651422653"); + t("-0.44325150067844726483860902210607088446679462", 1, RoundingMode.ROUND_DOWN, "-0.4"); + t("0.9034751706768019789827", 60, RoundingMode.ROUND_HALF_EVEN, "0.717985782691067206453512080792613565326893708313975428005223"); + t("0.2172485076904694895179", 63, RoundingMode.ROUND_HALF_UP, "0.213894002682974109904624836689545795117673726509639521578182275"); + t("-0.348534855137810830366231027941", 31, RoundingMode.ROUND_FLOOR, "-0.3350755386644384737516713339319"); + t("-0.4255195", 45, RoundingMode.ROUND_HALF_DOWN, "-0.401570102011929569917989543792334637564089692"); + t("-0.886162172614361731", 29, RoundingMode.ROUND_CEIL, "-0.70949297599079569125232530876"); + t("-0.7", 78, RoundingMode.ROUND_HALF_DOWN, "-0.604367777117163496308687183103826475015566647416860888612419993599538639474122"); + t("0.757119675718", 66, RoundingMode.ROUND_CEIL, "0.639377257808623037769808128229970838858747391194193471609343942998"); + t("0.2642178764761", 55, RoundingMode.ROUND_HALF_EVEN, "0.2582364046844679768754362197481015404352489557723913895"); + t("0.321329", 74, RoundingMode.ROUND_HALF_EVEN, "0.31070811547650274839857700104600776395241041487409731293147237247772091748"); + t("0.1682695184810800667294209270614384694422368505868903621013683783929", 16, RoundingMode.ROUND_UP, "0.1666991388738522"); + t("-0.409858192536257152668045191854122303323410295894", 43, RoundingMode.ROUND_UP, "-0.3883522664291927890893297914389310714602415"); + t("0.2880615", 120, RoundingMode.ROUND_UP, "0.280349643265659497705660848534086455056558585660980017680059937512840019825269028854239781634733893540906928184561638591"); + t("-0.2803292668048951604355466058306354327579221441238441133669431820221412822995", 69, RoundingMode.ROUND_HALF_UP, "-0.2732097971115351269678804248529217531253775527585485646027761857336"); + t("0.209183180524407073852661413214033433796240391516313838917745903006946400344329579472178537414263299679577464721107342550013722994343049", 3, RoundingMode.ROUND_UP, "0.207"); + t("-0.21323411415637447", 100, RoundingMode.ROUND_FLOOR, "-0.2100599987497949082863636944922996664334987508835646248560687414181626030840090573861293885022227807"); + t("-0.934150529137316227495052114810154290011321681684010680698706327964978851230256", 97, RoundingMode.ROUND_DOWN, "-0.7325231466730630602965757839383259193306031234060675020081884134754348821771511575580397417734494"); + t("0.612797", 135, RoundingMode.ROUND_HALF_EVEN, "0.546092981987055113177270374342598658047265622605927205095448291249934086020550572905344645120234563581014732729130051050396440278747926"); + t("-0.18273791076980028567544728336113017263732539776346366568034574", 45, RoundingMode.ROUND_CEIL, "-0.180730653506873097396527854034699651896910694"); + t("0.5288356309407208928920467515068426806", 107, RoundingMode.ROUND_CEIL, "0.48449053794065651739672070077375035256792292259097100512145231251249909428817259447380109781326377031262135"); + t("-0.50752591", 24, RoundingMode.ROUND_HALF_DOWN, "-0.468015268006387507893896"); + t("-0.54917290836787549931392", 88, RoundingMode.ROUND_HALF_UP, "-0.49990006636857985687649939062630289074578706968740926592041362893811220431493732027711"); + t("0.91999661041886666", 17, RoundingMode.ROUND_HALF_EVEN, "0.72589581132601256"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalTests.cs b/DecimalSharp.Tests/BigDecimalTests.cs new file mode 100644 index 0000000..c9ec058 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalTests.cs @@ -0,0 +1,288 @@ +using DecimalSharp.Core; +using Newtonsoft.Json; +using NUnit.Framework; +using System; +using System.Text.RegularExpressions; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimal")] + public class BigDecimalTests + { + [SetUp] + public void Setup() + { + } + + internal static int testNumber = 0, passed = 0; + + /*internal static void write(string str) + { + Console.WriteLine(str); + }*/ + + internal static void Fail(object actual) + { + /*write( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: true" + + "\n Actual: " + actual + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: true" + + "\n Actual: " + actual + ); + } + + internal static void assert(bool actual) + { + ++testNumber; + if (actual == true) + { + ++passed; + //write('\n Expected and actual: ' + actual); + } + else + { + /*write( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: true" + + "\n Actual: " + actual + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: true" + + "\n Actual: " + actual + ); + } + } + + internal static void assertEqual(string expected, string actual) + { + ++testNumber; + // If expected and actual are both NaN, consider them equal. + if (expected == actual || expected != expected && actual != actual) + { + ++passed; + } + else + { + /*write( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: " + expected + + "\n Actual: " + actual + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: " + expected + + "\n Actual: " + actual + ); + } + } + internal static void assertEqual(int? expected, int? actual) + { + ++testNumber; + // If expected and actual are both NaN, consider them equal. + if (expected == actual || expected != expected && actual != actual) + { + ++passed; + } + else + { + /*write( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: " + expected + + "\n Actual: " + actual + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: " + expected + + "\n Actual: " + actual + ); + } + } + internal static void assertEqual(long? expected, long? actual) + { + ++testNumber; + // If expected and actual are both NaN, consider them equal. + if (expected == actual || expected != expected && actual != actual) + { + ++passed; + } + else + { + /*write( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: " + expected + + "\n Actual: " + actual + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: " + expected + + "\n Actual: " + actual + ); + } + } + internal static void assertEqual(double? expected, double? actual) + { + ++testNumber; + // If expected and actual are both NaN, consider them equal. + if (expected == actual || expected != expected && actual != actual) + { + ++passed; + } + else + { + /*write( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: " + expected + + "\n Actual: " + actual + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: " + expected + + "\n Actual: " + actual + ); + } + } + internal static void assertEqual(bool expected, bool actual) + { + ++testNumber; + // If expected and actual are both NaN, consider them equal. + if (expected == actual || expected != expected && actual != actual) + { + ++passed; + } + else + { + /*write( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: true" + + "\n Actual: " + actual + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assert" + + "\n Expected: " + expected + + "\n Actual: " + actual + ); + } + } + + internal static void assertEqualDecimal(BigDecimal x, BigDecimal y) + { + ++testNumber; + if (x.Eq(y) || x.IsNaN() && y.IsNaN()) + { + ++passed; + } + else + { + /*write( + "\n Test number " + testNumber + " failed: assertEqualDecimal" + + "\n x: " + x.valueOf() + + "\n y: " + y.valueOf() + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assertEqualDecimal" + + "\n x: " + x.ValueOf() + + "\n y: " + y.ValueOf() + ); + } + } + + internal static void assertEqualProps(int[] digits, int exponent, int sign, BigDecimal n) + { + int i = 0, len = digits.Length; + ++testNumber; + while (i < len && digits[i] == n.d[i]) ++i; + if (i == len && i == n.d.Length && exponent == n.e && sign == n.s) + { + ++passed; + } + else + { + /*write( + "\n Test number " + testNumber + " failed: assertEqualProps" + + "\n Expected digits: " + digits + + "\n Expected exponent: " + exponent + + "\n Expected sign: " + sign + + "\n Actual digits: " + n.d + + "\n Actual exponent: " + n.e + + "\n Actual sign: " + n.s + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assertEqualProps" + + "\n Expected digits: " + JsonConvert.SerializeObject(digits) + + "\n Expected exponent: " + exponent + + "\n Expected sign: " + sign + + "\n Actual digits: " + JsonConvert.SerializeObject(n.d) + + "\n Actual exponent: " + n.e + + "\n Actual sign: " + n.s + ); + } + } + internal static void assertEqualProps(int[] digits, int exponent, int sign, BigDecimalLight n) + { + int i = 0, len = digits.Length; + ++testNumber; + while (i < len && digits[i] == n.d[i]) ++i; + if (i == len && i == n.d.Length && exponent == n.e && sign == n.s) + { + ++passed; + } + else + { + /*write( + "\n Test number " + testNumber + " failed: assertEqualProps" + + "\n Expected digits: " + digits + + "\n Expected exponent: " + exponent + + "\n Expected sign: " + sign + + "\n Actual digits: " + n.d + + "\n Actual exponent: " + n.e + + "\n Actual sign: " + n.s + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assertEqualProps" + + "\n Expected digits: " + JsonConvert.SerializeObject(digits) + + "\n Expected exponent: " + exponent + + "\n Expected sign: " + sign + + "\n Actual digits: " + JsonConvert.SerializeObject(n.d) + + "\n Actual exponent: " + n.e + + "\n Actual sign: " + n.s + ); + } + } + + internal static void assertException(Action func, string msg) + { + BigDecimalException? actual = null; + ++testNumber; + try + { + func(); + } + catch (BigDecimalException e) + { + actual = e; + } + if (actual != null && Regex.IsMatch(actual.Message, @"DecimalError")) + { + ++passed; + } + else + { + /*write( + "\n Test number " + testNumber + " failed: assertException" + + "\n Expected: " + msg + " to raise a DecimalError." + + "\n Actual: " + (actual?.ToString() ?? "no exception") + );*/ + Assert.Fail( + "\n Test number " + testNumber + " failed: assertException" + + "\n Expected: " + msg + " to raise a DecimalError." + + "\n Actual: " + (actual?.ToString() ?? "no exception") + ); + } + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalTimesTests.cs b/DecimalSharp.Tests/BigDecimalTimesTests.cs new file mode 100644 index 0000000..3d36c7d --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalTimesTests.cs @@ -0,0 +1,1058 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalTimes")] + public class BigDecimalTimesTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Times() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 300, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument multiplicand, BigDecimalArgument multiplier, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(multiplicand).Times(multiplier).ValueOf()); + }; + + t(1, double.NaN, "NaN"); + t(-1, double.NaN, "NaN"); + t(1, double.PositiveInfinity, "Infinity"); + t(1, double.NegativeInfinity, "-Infinity"); + t(-1, double.PositiveInfinity, "-Infinity"); + t(-1, double.NegativeInfinity, "Infinity"); + t(0, "NaN", "NaN"); + t("-0", "NaN", "NaN"); + t(0, "Infinity", "NaN"); + t(0, "-Infinity", "NaN"); + t("-0", "Infinity", "NaN"); + t("-0", "-Infinity", "NaN"); + t("NaN", 1, "NaN"); + t("NaN", -1, "NaN"); + t("NaN", 0, "NaN"); + t("NaN", "-0", "NaN"); + t("NaN", double.NaN, "NaN"); + t("NaN", double.PositiveInfinity, "NaN"); + t("NaN", double.NegativeInfinity, "NaN"); + t("Infinity", 1, "Infinity"); + t("Infinity", -1, "-Infinity"); + t("-Infinity", 1, "-Infinity"); + t("-Infinity", -1, "Infinity"); + t("Infinity", 0, "NaN"); + t("Infinity", "-0", "NaN"); + t("-Infinity", 0, "NaN"); + t("-Infinity", "-0", "NaN"); + t("Infinity", double.NaN, "NaN"); + t("-Infinity", double.NaN, "NaN"); + t("Infinity", double.PositiveInfinity, "Infinity"); + t("Infinity", double.NegativeInfinity, "-Infinity"); + t("-Infinity", double.PositiveInfinity, "-Infinity"); + t("-Infinity", double.NegativeInfinity, "Infinity"); + + t(1, 0, "0"); + t(1, "-0", "-0"); + t(-1, 0, "-0"); + t(-1, "-0", "0"); + t(0, 1, "0"); + t(0, -1, "-0"); + t("-0", 1, "-0"); + t("-0", -1, "0"); + t(0, 0, "0"); + t(0, "-0", "-0"); + t("-0", 0, "-0"); + t("-0", "-0", "0"); + + t(1, "1", "1"); + t(1, "-45", "-45"); + t(1, "22", "22"); + //t(1, 0144, "100"); //js only + t(1, "0144", "144"); + t(1, "6.1915", "6.1915"); + t(1, "-1.02", "-1.02"); + t(1, "0.09", "0.09"); + t(1, "-0.0001", "-0.0001"); + t(1, "8e5", "800000"); + t(1, "9E12", "9000000000000"); + t(1, "1e-14", "1e-14"); + t(1, "3.345E-9", "3.345e-9"); + t(1, "-345.43e+4", "-3454300"); + t(1, "-94.12E+0", "-94.12"); + t(1, double.PositiveInfinity, "Infinity"); + t(1, double.NegativeInfinity, "-Infinity"); + t("0", 0, "0"); + t("0", "0", "0"); + t(3, "-0", "-0"); + t(9.654, 0, "0"); + t(0, "0.001", "0"); + t(0, "111.1111111110000", "0"); + t("NaN", "0", "NaN"); + t(-1, 1, "-1"); + t(-0.01, 0.01, "-0.0001"); + t(54, -54, "-2916"); + t(9.99, "-9.99", "-99.8001"); + t("0.0000023432495704937", "-0.0000023432495704937", "-5.49081854961890952566173969e-12"); + t(double.NaN, double.NaN, "NaN"); + t(double.NaN, "NaN", "NaN"); + t("NaN", double.NaN, "NaN"); + t("NaN", 4, "NaN"); + t("NaN", "4534534.45435435", "NaN"); + t("NaN", 99999.999, "NaN"); + t(double.PositiveInfinity, "354.345341", "Infinity"); + t(3, "-Infinity", "-Infinity"); + t(double.NegativeInfinity, "-Infinity", "Infinity"); + t("-Infinity", double.NegativeInfinity, "Infinity"); + t("Infinity", "-999e999", "-Infinity"); + t(1.21123e43, "-Infinity", "-Infinity"); + t("-999.0", "Infinity", "-Infinity"); + t("657.342e-45", "-Infinity", "-Infinity"); + t("Infinity", 123, "Infinity"); + t("-0", "Infinity", "NaN"); + t(100, 100, "10000"); + t(-999.99, "0.01", "-9.9999"); + t("10", 4, "40"); + t("03.333", -4, "-13.332"); + t(-1, -0.1, "0.1"); + t(43534.5435, "0.054645", "2378.9451295575"); + t("99999", "1", "99999"); + + t("-19.851", "69.11", "-1371.90261"); + t("-0.0251", "-1.09821", "0.027565071"); + t("-2.11", "-21", "44.31"); + t("-1", "7161", "-7161"); + t("-4.61", "1", "-4.61"); + t("11", "-0.0000271", "-0.0002981"); + t("-1", "0.0000224801", "-0.0000224801"); + t("-3.6", "-3336", "12009.6"); + t("0.000000219", "-110.42", "-0.00002418198"); + t("312", "22.87694", "7137.60528"); + t("0.29976", "-5", "-1.4988"); + t("0.00000000000000000010018", "-74.6", "-7.473428e-18"); + t("138.583905", "9.73380", "1348.948014489"); + t("5360260.6", "-12.12", "-64966358.472"); + t("-7.01", "-0.0000000988077", "6.92641977e-7"); + t("0.0000202", "-56583117802", "-1142978.9796004"); + t("116727.96", "0.0000000000000019308", "2.25378345168e-10"); + t("-136636.46", "6.5636554051", "-896834.639212729946"); + t("12.1712598149", "53.270389", "648.3677449597909961"); + t("76", "76019.61784", "5777490.95584"); + t("0.0000714939", "1425786", "101.9350017054"); + t("-3221.71685", "-230", "740994.8755"); + t("0.00000000237457904", "-892315", "-0.0021188724960776"); + t("6511.4", "0.0000000000000186", "1.2111204e-10"); + t("0.000000011188562", "0", "0"); + t("-25379.8", "3", "-76139.4"); + t("41.9279", "23.4198661", "981.94580385419"); + t("0.0000010", "58236.222", "0.058236222"); + t("0", "-16.39257632", "-0"); + t("0.000000004846959", "1", "4.846959e-9"); + t("0", "-30878.5", "-0"); + t("-8065.5", "-0.00000000058314173", "0.000004703329623315"); + t("-443850607", "-1", "443850607"); + t("-0.070884", "0.0000000000000000002106611401", "-1.49325042548484e-20"); + t("15510739.6998", "4.13", "64059354.960174"); + t("-1182.8", "0.00000000000006116702878", "-7.2348361640984e-11"); + t("0.000000000000000024429766", "1.492", "3.6449210872e-17"); + t("-521641.171", "0.000000044916564267", "-0.023430329181534636657"); + t("-1.4", "-50.3861389", "70.54059446"); + t("-906235823", "169450901242", "-153562476945135592166"); + t("818.5", "-0.0000000000000002572", "-2.105182e-13"); + t("0", "2", "0"); + t("0.00000000000000000723208622905", "7281.27407", "5.26588019315858457335e-14"); + t("-8.30486506", "-1110043.7", "9218763.139203122"); + t("1.8", "0", "0"); + t("-0.000000000000339156493611", "-0.000000000000000000167265", "5.6729010903843915e-32"); + t("0.00000000000000283", "4.074", "1.152942e-14"); + t("39.85", "33086328", "1318490170.8"); + t("4.1183805089", "-5.126069", "-21.1111026568765141"); + t("-464.2025675", "0.00000000000000000106831881858", "-4.9591633849340270415e-16"); + t("0", "-0.0000000000073", "-0"); + t("-0.0000002358363833", "-37968.0", "0.0089542358011344"); + t("3.4", "-32545254.52", "-110653865.368"); + t("0.000000247", "12.88", "0.00000318136"); + t("-446908", "0.000000490399599", "-0.219163503989892"); + t("-0.0000000015", "91", "-1.365e-7"); + t("794881.3", "45.2898548", "36000058.66023524"); + t("5", "3046563.8", "15232819"); + t("-95094833817", "3.101", "-294889079666.517"); + t("-12786.5", "-0.0000000684878615", "0.00087572004106975"); + t("66754192.630", "7", "467279348.41"); + t("414951476.81", "-12.875", "-5342500263.92875"); + t("-2.486307", "0.00000000000131610556936", "-3.27224248983875352e-12"); + t("-0.000000000000000477405019421", "-1.1", "5.251455213631e-16"); + t("-367046.223", "-0.0000129", "4.7348962767"); + t("0", "0.000000000000093338247", "0"); + t("0.3341376", "-8", "-2.6731008"); + t("422580779", "-10829.0", "-4576127255791"); + t("-11.6639", "-56.51836497", "659.224557173583"); + t("-1", "-36577.4", "36577.4"); + t("61.5", "-68269.0", "-4198543.5"); + t("-18.10728", "0", "-0"); + t("531751766", "41.50116", "22068315121.04856"); + t("-7.63315110", "3", "-22.8994533"); + t("1249.58475875", "38582.13", "48211641.6081111375"); + t("-2", "0.000000000000001022", "-2.044e-15"); + t("10.750", "0.000000000014145865", "1.5206804875e-10"); + t("14", "0.044276206", "0.619866884"); + t("12175855.915", "52.1893", "635449397.1047095"); + t("-1", "-0.00000000000029721", "2.9721e-13"); + t("311354.171224", "194857.1428", "60669584203.5706187872"); + t("0.0000008188", "6375.414052", "0.0052201890257776"); + t("0.00000055577528074", "3", "0.00000166732584222"); + t("526170.543", "6065.11546", "3191285094.94589478"); + t("0", "-27078031462", "-0"); + t("0.0003450371", "4044.753", "1.3955898453363"); + t("0", "-5.681398758", "-0"); + t("-2830933", "-1", "2830933"); + t("2.8", "14.36338836", "40.217487408"); + t("725.6556", "-0.000058977271", "-0.0427971869738676"); + t("0", "0", "0"); + t("591.1", "-182368.115408", "-107797793.0176688"); + t("1", "-8.44", "-8.44"); + t("-48988695", "3.99", "-195464893.05"); + t("-54145231.29", "-164.1", "8885232454.689"); + t("1.9615", "370.5", "726.73575"); + t("-2317170.34468", "-0.0000117290196265", "27.17813645069548986202"); + t("-3865301765", "9.90928729", "-38302385651.92906685"); + t("8.9648", "-3", "-26.8944"); + t("-10645.1", "-4208", "44794580.8"); + t("-390304.9", "-9.540", "3723508.746"); + t("0.00000000043946", "-0.0000000000135", "-5.93271e-21"); + t("11.167962", "907.089236", "10130.338118257032"); + t("328719912.6", "1.13", "371453501.238"); + t("8.0902", "3", "24.2706"); + t("-0.0000000000000000000103885880", "54949757", "-5.70850386173116e-13"); + t("-60096046", "147.9066", "-8888601837.3036"); + t("-1.1", "-4", "4.4"); + t("-2.3781033", "1.488", "-3.5386177104"); + t("18.64", "-13492494", "-251500088.16"); + t("0.0000000000000000078080114", "1362291", "1.06367836581174e-11"); + t("0.0000006699", "-0.0000000000000059", "-3.95241e-21"); + t("-279.40", "-4199.537182", "1173350.6886508"); + t("-346081282.623", "5715.5169", "-1978033419605.4328287"); + t("26098.51437", "-0.00004277160560", "-1.116275363379572472"); + t("-0.000000000038243914682", "6258350.6", "-0.0002393438263964435092"); + t("-0.23215784", "1.7", "-0.394668328"); + t("270.08569", "73.4", "19824.289646"); + t("0.000000000000000253826", "-1", "-2.53826e-16"); + t("1773.911", "167", "296243.137"); + t("-609057.1664", "-2", "1218114.3328"); + t("178326076.8", "-299396.226", "-53390154391306.1568"); + t("-99153591.8357", "-67230.718614", "6666167232273.3544197198"); + t("0.0000000000001596", "-0.00349909609", "-5.58455735964e-16"); + t("1.84", "0.00000000003464", "6.37376e-11"); + t("73.5", "0", "0"); + t("0.000000000000000049", "-198604", "-9.731596e-12"); + t("1052854077", "2.8", "2947991415.6"); + t("28.3", "5964", "168781.2"); + t("2085.7", "-338.192", "-705367.0544"); + t("59.12705", "-0.0000000000016294", "-9.634161527e-11"); + t("-0.0000000000000629", "-0.0000133901915", "8.4224304535e-19"); + t("0.000000000000000000010713336246", "12.8722", "1.379042068257612e-19"); + t("0.000620507896", "3.9", "0.0024199807944"); + t("3", "9.6", "28.8"); + t("-1", "7", "-7"); + t("4.07", "4", "16.28"); + t("-2473.25538", "12.3", "-30421.041174"); + t("-1310633", "-9", "11795697"); + t("-3.90", "3031.9", "-11824.41"); + t("150.0276", "0.00897", "1.345747572"); + t("2", "-8.8", "-17.6"); + t("-3030148.8", "229674", "-695946395491.2"); + t("2", "775.7549", "1551.5098"); + t("-613183.18515", "-3", "1839549.55545"); + t("-0.000000000001224", "367.376621", "-4.49668984104e-10"); + t("-0.00000000000000000737581", "1.3490", "-9.94996769e-18"); + t("0", "-1.15490644", "-0"); + t("8.437", "-12103106905", "-102113912957.485"); + t("155.8091088", "3.465", "539.878561992"); + t("179142.3", "0.0060", "1074.8538"); + t("-301.3766", "9.6052", "-2894.78251832"); + t("48.15", "518165.306", "24949659.4839"); + t("4387518.42726", "-8069", "-35402886189.56094"); + t("-28.3", "-77.67", "2198.061"); + t("9", "0.00000000000001022", "9.198e-14"); + t("-1071.62294", "0.0000010", "-0.00107162294"); + t("-4.15", "-3", "12.45"); + t("-661.167", "453", "-299508.651"); + t("-104436", "-1098478.95443", "114720748084.85148"); + t("0", "3.630588", "0"); + t("0", "-13181687.0", "-0"); + t("-1.111", "-3.78770", "4.2081347"); + t("0.000000042325027395", "2.89323850", "1.224563987727687075e-7"); + t("-21.7", "-0.00001926174637", "0.000417979896229"); + t("28151356.2", "0.00000000003236052", "0.000910992525337224"); + t("0.0120", "-862436.56", "-10349.23872"); + t("3649.71055", "-692509.6", "-2527459593.09628"); + t("-3", "-1", "3"); + t("-1135.91888551", "12.37808265", "-14060.4978485386674015"); + t("1", "2172752.822", "2172752.822"); + t("-0.00000000000001091997", "-117.1", "1.278728487e-12"); + t("-605.91910660", "2036476909", "-1233940269312.8094994"); + t("-85793626", "-403556966", "34622615410698716"); + t("387.034155496", "1.51", "584.42157479896"); + t("-212937", "7812.350", "-1663538371.95"); + t("838667.59", "-297101", "-249168979656.59"); + t("0.00382632083", "0.000316896", "0.00000121254576574368"); + t("0.000000000000002582", "-295757466.2", "-7.636457777284e-7"); + t("-0.000000000000798713", "21.52", "-1.718830376e-11"); + t("0.00000974", "-2.9", "-0.000028246"); + t("0.0000000000281", "38.82", "1.090842e-9"); + t("-3.237", "16967081.13", "-54922441.61781"); + t("9.8", "-0.0000000001333", "-1.30634e-9"); + t("5614.9", "-76.1668", "-427668.96532"); + t("-1.8", "3545.0927", "-6381.16686"); + t("0.00000249806256", "-1131.1175", "-0.0028256022777108"); + t("-0.20706", "11338.58322", "-2347.7670415332"); + t("1908.3417145", "-138.575", "-264448.4530868375"); + t("0", "0.0000669436", "0"); + t("325.22245849", "-14504.56", "-4717208.6625157144"); + t("-13.8825", "0", "-0"); + t("0.0000000000869261985", "1.1243", "9.773112497355e-11"); + t("2588680", "-2.639437", "-6832657.77316"); + t("847973030.3", "1300.4", "1102704128602.12"); + t("-669.7", "-1150.41", "770429.577"); + t("-1", "-6.761867", "6.761867"); + t("-4", "-128.68", "514.72"); + t("-0.0000000000000000148", "-389336", "5.7621728e-12"); + t("5.1", "8.1", "41.31"); + t("959895377.84", "976.5", "937337836460.76"); + t("152", "-1325188.6822", "-201428679.6944"); + t("-1013851164640", "-116895", "118514131890592800"); + t("-0.555030", "0.0025719815451", "-0.001427526916976853"); + t("-8.61456", "-0.000000000050", "4.30728e-10"); + t("-0.10822", "-42439", "4592.74858"); + t("5", "248", "1240"); + t("1.00560719", "-0.00000000000000538", "-5.4101666822e-15"); + t("-0.0000000000000000880", "20.26149480", "-1.7830115424e-15"); + t("-215.544104755", "-4060438.71", "875203626.65949706605"); + t("0", "13031.6", "0"); + t("-0.0000000000000047877659854", "-208.19", "9.96765000500426e-13"); + t("-4", "-3160383", "12641532"); + t("-0.00104402960", "-6", "0.0062641776"); + t("-6", "-221362529.2", "1328175175.2"); + t("-5658.7", "-0.000009428149284", "0.0533510683533708"); + t("-3", "-0.0000000000000000171257563600", "5.137726908e-17"); + t("1577941089.0", "-0.0000000000000054178560", "-0.000008549057596685184"); + t("-3", "-19154.88287", "57464.64861"); + t("-5.3", "-0.000000000000000094150109", "4.989955777e-16"); + t("-275.9", "-618029.6", "170514366.64"); + t("-0.00277412", "-2.0", "0.00554824"); + t("20896.13", "-2", "-41792.26"); + t("0", "144.50", "0"); + t("0", "37399", "0"); + t("0.0000000103050173", "-6.752", "-6.95794768096e-8"); + t("-1679844", "0.00008795", "-147.7422798"); + t("1731362.632", "-0.0000000010867236", "-0.0018815126323525152"); + t("-116536", "8818.8637874", "-1027715110.3284464"); + t("112359.12", "-6.3736", "-716132.087232"); + t("0.02767509", "4.002781363", "0.11077733447134767"); + t("-942581.9", "7.504907", "-7073989.4993833"); + t("6603793", "1.604", "10592483.972"); + t("91689.093", "5", "458445.465"); + t("4351694708.6", "0.0003242690", "1411119.6914630134"); + t("-2.38", "-39", "92.82"); + t("-759.5", "0.000000324", "-0.000246078"); + t("-6.1623", "-10.1485", "62.53810155"); + t("1819.975133", "-1918.4931", "-3491609.7348320823"); + t("-544", "-2373759.39656", "1291325111.72864"); + t("-2143.2", "-0.000000000000000000162130", "3.47477016e-16"); + t("0.621559060", "53.8", "33.439877428"); + t("-4624.6", "0.0000000000000190537313036", "-8.811588578662856e-11"); + t("-6", "-50.943", "305.658"); + t("-3021.479", "3", "-9064.437"); + t("-965", "-0.000415509858", "0.40096701297"); + t("0", "6465897.6979", "0"); + t("74528068.573", "-119403349", "-8898900982117850.977"); + t("64.56", "0.000000017086", "0.00000110307216"); + t("-9626.07", "-1051902.812582", "10125690107.11121274"); + t("1.4514", "-1", "-1.4514"); + t("0.00120840179209", "-492240", "-594.8236981383816"); + t("-1.163", "-3.5", "4.0705"); + t("-390918.9935", "-3.9645296", "1549809.9209329576"); + t("1130.013737", "3", "3390.041211"); + t("-5", "-6733821263", "33669106315"); + t("27774.358123", "-0.0000000000000128441670", "-3.56738494049618541e-10"); + t("0.363631323", "-3819136980.1", "-1388757832.7919876723"); + t("-0.0000000065598472", "53857.08", "-0.000353294215438176"); + t("-240695", "2", "-481390"); + t("0.000059", "0.00000000000017987993", "1.061291587e-17"); + t("37.17", "-61.7668", "-2295.871956"); + t("1.475572354", "266461086.2", "393182612.2135309148"); + t("-0.000000000003907", "-31.5", "1.230705e-10"); + t("-0.0000000000000000000894018", "0.00000000000000001599913222", "-1.430351218905996e-36"); + t("0", "-0.00005850856211", "-0"); + t("32.75", "-2.57293", "-84.2634575"); + t("0.00000131", "43", "0.00005633"); + t("-129602.62", "-0.000000000000000123490", "1.60046275438e-11"); + t("-2941.6442", "2.013048311", "-5921.6718883729462"); + t("1.01983639584", "10710047", "10922495.73175700448"); + t("0.4077750076", "-3", "-1.2233250228"); + t("0.359", "207160.173586", "74370.502317374"); + t("-26222.646879", "9.8", "-256981.9394142"); + t("-2", "-1.1360", "2.272"); + t("6717280984", "564735824499", "3.793489214890694027016e+21"); + t("-7", "0.000000000000000000179598", "-1.257186e-18"); + t("-0.000212", "754.3", "-0.1599116"); + t("-8.6", "-44061.183", "378926.1738"); + t("0.000000000000000000013", "956", "1.2428e-17"); + t("-3", "3.8968771877", "-11.6906315631"); + t("-4485.1947117", "444609963508", "-1994162257095211.5806436"); + t("0", "-3353199.6579", "-0"); + t("0.0000000000000000000293", "-4", "-1.172e-19"); + t("-225", "5.09648", "-1146.708"); + t("0.00000036757", "0", "0"); + t("-78694.836", "-43.8", "3446833.8168"); + t("0.000000000000018028989162", "495", "8.92434963519e-12"); + t("-4036233", "-0.0000000000000000000134620360255", "5.43359140533119415e-14"); + t("-2.19", "-481624.5154", "1054757.688726"); + t("-6", "-33692.483", "202154.898"); + t("-0.00000000387466078726", "137145711.9", "-0.531393112039787150394"); + t("-52.6685", "-107972.8", "5686765.4168"); + t("-7.137137210", "3.06", "-21.8396398626"); + t("-174.1619", "-2084784202", "363089977710.3038"); + t("11", "-0.15", "-1.65"); + t("177.3211", "-85578219.525", "-15174824022.2144775"); + t("2", "-1", "-2"); + t("-681.685707574", "222753546489", "-151847908952971.868407686"); + t("2225288.04", "-2945.03251212", "-6553545626.6317910448"); + t("-829419822664", "0.000750870", "-622786462.24371768"); + t("-3.887", "-0.0000000000215299", "8.36867213e-11"); + t("14780708.1", "-2000820.86", "-29573549092050.966"); + t("-65280872367", "2756.0", "-179914084243452"); + t("-1.1", "-16652196529", "18317416181.9"); + t("6153.32891899", "3.07", "18890.7197812993"); + t("1.6664", "10.5", "17.4972"); + t("-335.16960", "25.16", "-8432.867136"); + t("20.7", "834", "17263.8"); + t("8029.51", "-1", "-8029.51"); + t("3544067.44", "0.00000000000000000108040", "3.829010462176e-12"); + t("-0.00000000000000861840983", "3", "-2.585522949e-14"); + t("-1", "-5.4071", "5.4071"); + t("-0.000000000000014799305202", "-77.4875919308", "1.1467625223519416640216e-12"); + t("0", "-31045268779", "-0"); + t("-437", "640.03", "-279693.11"); + t("60", "0.000000000000000371281463", "2.227688778e-14"); + t("-1", "-0.019533338878", "0.019533338878"); + t("-1117.048", "8.967", "-10016.569416"); + t("-0.0000000000001992331", "17762516", "-0.0000035388811264796"); + t("-1.209", "-3960.47030", "4788.2085927"); + t("-994748.5", "-10809803.2", "10753035518495.2"); + t("-3.0521", "0", "-0"); + t("4553015.460", "-6", "-27318092.76"); + t("0.00000000403775332", "0", "0"); + t("10628.68130", "-1.196558", "-12717.8336389654"); + t("-0.00000000003389", "-113275.58", "0.0000038389094062"); + t("0.0000000000000000000810", "-0.000000002954", "-2.39274e-28"); + t("0", "0.00000002678", "0"); + t("12309", "25980042.9", "319788348056.1"); + t("-7.6", "0", "-0"); + t("-61.22", "-349.3", "21384.146"); + t("-1.845209", "0.000000052784913420", "-9.739919730680478e-8"); + t("395.326251", "-371872028", "-147010774681.007028"); + t("332.72", "3715", "1236054.8"); + t("-1681921.54", "76348.91498", "-128412884660.4906692"); + t("517583042", "-13.9", "-7194404283.8"); + t("-21.723616577", "-0.000013157028", "0.000285818231564853156"); + t("-116.13334149", "0.0000000006536", "-7.5904751997864e-8"); + t("-4.1", "-294.0876", "1205.75916"); + t("-22.05", "-6.7", "147.735"); + t("-22.9", "-0.00000217178", "0.000049733762"); + t("-50.5", "0.012432393", "-0.6278358465"); + t("-2", "-0.00000000000119764950", "2.395299e-12"); + t("19381.0141", "65.916071785", "1277520.3166816971685"); + t("-4.90", "-22.5701", "110.59349"); + t("0.00000000000192902409442", "289522860.5", "0.00055849657378990048841"); + t("-27006298.37", "-8164.7", "220498324301.539"); + t("-8776869", "-143972778", "1263630212072082"); + t("-79325483.3", "248065.2", "-19677891879911.16"); + t("-26.2", "28441.8", "-745175.16"); + t("18.71", "97792.4647", "1829697.014537"); + t("-150.68501", "-1.3460", "202.82202346"); + t("-43.0091494663", "-5.6724", "243.96509943264012"); + t("12.359", "-1.261", "-15.584699"); + t("0.0000000048694525", "-13", "-6.33028825e-8"); + t("-26799", "-3.0401", "81471.6399"); + t("0.000000000003271187802", "0", "0"); + t("1", "0.0000000000250081008", "2.50081008e-11"); + t("23.590033588", "0.000000000000000880594309", "2.0773249326711650692e-14"); + t("2.34", "-35556883", "-83203106.22"); + t("127410324", "48.0", "6115695552"); + t("2.4", "2.0", "4.8"); + t("17", "-0.00000000000000000467960391085", "-7.955326648445e-17"); + t("-5827035", "63.01", "-367161475.35"); + t("-452352446648", "13167459.5", "-5956332520963450756"); + t("0", "27.51619908", "0"); + t("-6.8253", "-203490405", "1388883061.2465"); + t("-663513.1", "235798", "-156455061953.8"); + t("45846991454.7", "0.000000000000011371170", "0.000521333933819940999"); + t("-6940453.30", "-0.0000000000000000000429869089", "2.9834863373180437e-13"); + t("-299.7692790", "-2.0", "599.538558"); + t("-0.000000000000781997707", "-0.00000000002498", "1.953430272086e-23"); + t("-211968.876", "-11448", "2426619692.448"); + t("-2", "224979.5", "-449959"); + t("0.0000000000007372", "3", "2.2116e-12"); + t("2.14", "-96.5220369", "-206.557158966"); + t("246.3484", "-119174406049", "-29358424251121.4716"); + t("2301100.91737", "-431951.5", "-993963992909.347555"); + t("-13819448.15", "0", "-0"); + t("0.0000000155919108142", "8.51", "1.32687161028842e-7"); + t("124616457", "513907736", "64041361285211352"); + t("-5298.3584942", "-4.1932", "22217.07683787944"); + t("158463114", "0.0000000000000000001405398", "2.22703743489372e-11"); + t("-65667302.5", "7", "-459671117.5"); + t("-1693481.437", "-27743783", "46983581502656.171"); + t("-0.0000000000000003099934391", "125", "-3.87491798875e-14"); + t("-0.000000000000004272052", "0.0000005661", "-2.4184086372e-21"); + t("12.95933", "209420271.72", "2713946409.9091476"); + t("3.1", "-1.31573054798", "-4.078764698738"); + t("0.000086866", "-103057641552", "-8952205.091056032"); + t("11.1", "660.353292988", "7329.9215521668"); + t("-92.940180", "-1", "92.94018"); + t("97808795959", "-97", "-9487453208023"); + t("0.000000000000000388699", "-399", "-1.55090901e-13"); + t("227578760.552", "-40082.64751", "-9121959239968.50902552"); + t("-4.31547", "-29.771127352", "128.47640695373544"); + t("27.8", "60.0346682", "1668.96377596"); + t("12.7", "60805396.70", "772228538.09"); + t("6.808549", "434235.18", "2956511.50055382"); + t("-0.000000000000000000764", "798867", "-6.10334388e-13"); + t("0.000000000166682635066", "21.7", "3.6170131809322e-9"); + t("-17.0856584365", "-73.70395", "1259.280515120874175"); + t("-0.000032761108", "137.87702888", "-0.00451700423385679904"); + t("6.7467", "0.000000000000000000017375144", "1.172248840248e-19"); + t("1.0", "4", "4"); + t("2791.3", "372.0576", "1038524.37888"); + t("0", "-1.1", "-0"); + t("-67196.498357", "36318.97052", "-2440507642.87511143564"); + t("0.00000000484838500152", "-0.00004296", "-2.082866196652992e-13"); + t("-1488.65084", "-2472469.6620", "3680644039.21081608"); + t("-0.000000000020", "-9.9", "1.98e-10"); + + t("59429490631462462063898399891833", "85.00891132032463441584595955", "5.05203629890205609747397099201262363916734883085091009335515e+33"); + t("-0.000000000000000042109349317791897577655162141761006017167", "-13008827246961207056988713615056579178448396076639.2633976291", "5.477932507570985534957063193452340625430871365299670940723162464475095465880668702087454656216987597e+32"); + t("8591855.554373470161526044552421978378391766637549711729320", "-4.18144454943", "-35926367.5773248178055078206847122253956635626957707604812328535202876"); + t("-2283433141014849078.33114178969776355920", "-453.97", "1.036610143026511036089988438269093722970024e+21"); + t("-834090482593334176100123.7933568971710257756", "-2311068.681", "1.9276403914416302737519348190500409072951706328939836e+30"); + t("189532.2", "2968613550973672055370920.6", "5.6264785726585220673297239734332e+29"); + t("5.5765", "206791541", "1153173028.3865"); + t("223004397.925983046564773982957421494273449", "-0.00000765764399", "-1707.68828752147254136863163630226113151989615142151"); + t("-9", "-861605.04321559065136010082968313802", "7754445.38894031586224090746714824218"); + t("0.000000000000000000028090298007095127212699390661641605", "-6917964065283873879.11378929124954598", "-0.1943276721961993069547944346297165198267413742521737520171142577284979"); + t("-12902.95204428144349964281942884855605291385221512", "936511255610118037649.1", "-1.2083759820067154006199526430520916600744894425420426553143497592274392e+25"); + t("0.000000054421393267623019090", "0.0693540337668146867938144", "3.774343146319828330922834963772562065116896e-9"); + t("-0.00000000007483922", "11963887185334360.01202905021298539073645325022668", "-895367.9851184189424994447352806605141113868134295543896"); + t("-136818356017962729836947190424992612288254", "0.000001250702751", "-1.71119094258963391622539632506259119343595682786754e+35"); + t("89886141515.402264741", "165920325588054483132342147189817", "1.4913937866089484761163201125053970911515450613342397e+43"); + t("-4910559.69867254476135299557110880352698481", "-0.000000000000001251373615473295746877725841601861845423548", "6.14494484412532005943449278569391549262463086794696425713068030612078654982181230588e-9"); + t("188388334026044880874021952902236669508901633565820006", "-1428610610603915751990.6", "-2.691335729036024155624090667679961618627273975496253699574106150646158039436e+74"); + t("2569238997875.3944611244282198384307876980880850", "-45354701.13646736794503189060", "-116527066896795434703.141029468202286044275680813636330729593599972883501"); + t("-20273871998054251005", "-0.00001018031347", "206394372190847.50529696253735"); + t("0.000000000127882266384995374972957752031634640610096", "56084430050054721499878916115459816143192971582.9", "7.1722040237117373866688717282573432808847848059761445842371981626319357370527308468409584e+36"); + t("954627502168195877866647607616261900931", "9.96209474259629834949998607", "9.51008962048762055845159388440432218351076192328571371885622003117e+39"); + t("27452502565473996463690067929.18801932606917287121704780", "-15999511778834005759916561695256821.291408", "-4.392266381547719678372690910805800180664096055687896418712826017984317410615883824886612653024e+62"); + t("24739272583405.47186561318831947000688841802596024659835438", "0", "0"); + t("-14628477765152447836551575115758391.03361640644696947989", "1896549844807094292937664785889813670098706728.8", "-2.7743637235263904499250092914009953677085505785952534916815852412079339245487773243303684333379283832e+79"); + t("-0.0000000065376926", "400694118953983940534743481756583594", "-2.6196149763489805485528325035782515637752044e+27"); + t("6159556.6345747363", "12428.3903194610108", "76553374049.32049544464848654145204"); + t("1", "-214152.677228898078143751453160882566438516677", "-214152.677228898078143751453160882566438516677"); + t("1234245458508975352.84372029387871714", "711.09788699", "877669337572736089357.1591886677375895858960086"); + t("-12435092008252.828827", "-0.000000000000000130972832307119388", "0.001628659220320498210781727802616997876"); + t("1222155005674.47827107178853812873657", "-1.9217613579329307675966802225522", "-2348690263309.514070047950271986297573047714307144600821921806873954"); + t("-9610326782.75790", "-1925856563138573766.221666413429", "1.85081109084807161320054127390660041302158391e+28"); + t("1897933.1084909834795612591951194123752666123", "-19444.86721593176768385769", "-36905057279.327795521442821058258453663270782572671411150172721603587"); + t("0.000584193054195683632690208", "-15427224.032385517626932779704097", "-9012.477125240345688831570386428613444841606254309382176"); + t("-9193123344.97483292546402603464388933977", "3", "-27579370034.92449877639207810393166801931"); + t("-208355", "18.5077", "-3856171.8335"); + t("0", "-7.9", "-0"); + t("-146.9974821", "27.85613660690160", "-4094.78194224817268246136"); + t("0.0000002221395758167297538432", "-11018022952341415341382543191308.248305367013916352", "-2.4475389449721144325377299337884145675514764946137036517351977553240064e+24"); + t("-62634425863308865890231971109828114770592016347.2857222333045", "-0.0000000000044191162667", "2.7678881018796339994185288016784587422371771822944265151385376844431015e+35"); + t("0.014785725196930589141008331862", "1405730020396633.72", "20784737782660.25819955773732132563645741958664"); + t("3060880958477929473167827.136432332645114184906595927797020", "-134990224.755007177950183445", "-4.131890085332574931410011369432785413898866996911658019131150911202211096837243339e+32"); + t("-251157.56", "-35553.75153", "8929593483.1210668"); + t("10660825.6584256928", "-54.80641419272238648411", "-584281626.672080870616452029619482941408"); + t("0.00000000000000000018196806510154644625549186906147312734531", "290466772346954491087868523893813560578350699536244189", "5.285567654026668587345538632825206167793448119823731989523008725260266169443990119026948390359e+34"); + t("801946936195133455122.3263199289", "3353455956475898285353850471499087737905097359235396953.528", "2.6892937299611674351748616442698675657013699635861635172559630870783247800626545335641592e+75"); + t("88876291341359997.22", "-242985336224765018278774996045975", "-2.15956355339905308693512776069018053139845369921895e+49"); + t("-677.8706245402", "-40041.8855", "27143217.9316521785471"); + t("3.1852520702012", "0.00000998870874036575237809441602188548308619567919990770190850", "0.0000318165551938868335179942506676244968068581347935045219680140052189902"); + t("-2897031868709978067512290.19826378134251899155435029", "-0.0000000000000313426136", "90800550447.862773034512424935249089493462002949664538517944"); + t("-286245211287.816038991926811942762853058522756387871", "-905725.51698541", "259259591978255100.08416583456412844730858064475954566698860796211"); + t("-301283745846510635986864779646783.59226306843", "164455867753899", "-4.954787986333307027587976990843711993792791415951383630857e+46"); + t("16627939773", "-24446.50", "-406494929660644.5"); + t("2835613541302657637165162939561661439198237", "-34702274210562114517526690656890036690211485", "-9.8402238665467925464317665495284869217720281504532926830801758242091305082784369151945e+85"); + t("0.000000000000167329000479220734904842317239446253923254", "-335462.843", "-5.6132662217107750155727738207852552086794690651122e-8"); + t("1606900543967463817538016297544283302866330961.38117", "-12172415089417043266077235.5931339752547820885496331722", "-1.9559860428582011548778770036179464667831089769951903599695351323242935536918541220406695361968160447474e+70"); + t("25175391597018424433550189069315474558138086224811394.9498", "2697842514071148.65", "6.791924175882585620347727294751149080055684613881481427569426305249508777e+67"); + t("33605644614556574.500804536703659893409117374", "-32.543409918351171133101366277860678601667282494", "-1093642268261945046.079483918411013199812861395190797870188216612955697572700923777661450756"); + t("-16194637333856709349021519708.8552324881761540256020238975", "-468.317375400951782165492196622874246631857734334382", "7.584230051762041449005379580598839525796458346850505580761259136785876093027076066542485326077054219893845e+30"); + t("45938105933592236851533187176.70670204189811056", "-23728.6", "-1.090046940455836751355290385241202650071383506234016e+33"); + t("0.0000019359500318287540988972385182980431073131086249", "-1.433", "-0.0000027742163956106046237197427967210957727796846594817"); + t("3.383292222691", "-0.00000000000000000008416407858503881", "-2.8475167250671594974339763771e-19"); + t("-1781216226076936151337005862078252102700230837", "-139003643961.53840777847576996", "2.4759554610811353724544585499901643072996118138112041996180785490331025652e+56"); + t("-4942215729757062263164723577.197780606517", "-15241705.579", "7.5327797060859772211128133542568249856768162658343e+34"); + t("20212448898283508798.6625218057881201405", "0.000000000000000000473337907308896740021174588136160473489005777205", "9.5673182631015315198993602152061224371243489547543953762429365302559862133611162973025"); + t("0.0000000000000000000336083585075308914988259705527435231286920", "-1042029834722073772731648833.0978", "-35020912.2608826168412442748054117197175486895048242174316983271784220776"); + t("2376653285350901814422.788590453876", "-7116898082702.215", "-1.691439920976175340680854757410757210391140053534e+34"); + t("-0.0000067077602282", "10325935005362413727223741709915.3224340753", "-6.926389614794815252662513824455946141306951378398346e+25"); + t("118620396179863704912953340.8484888231431511", "0.00002664482432944840555300828814", "3.160619618102041148915830017998160333002812044061355761312703976357954e+21"); + t("-0.0000000000152038475299141990408716170165065", "0.000000000000005856774815228245375399878344009978104812414293866282", "-8.9045511307771647940461821641351376995341987855772716940834996589432243659697783833e-26"); + t("-552929555032574543198346", "0.00000000031628803556881", "-174885002769189.22345730619750676118826"); + t("0.000000000000000045838", "3539579713.731326460", "1.6224725491801654227348e-7"); + t("1392529024903490704995506782982906.381429", "-696.803141131", "-9.70318598668840847367530799623705904459432004456199e+35"); + t("0.00000017046264046382452", "77820777096586290650583567570533323989282", "1.326553514683081867495692236827890756347852656781320879464e+34"); + t("173.2", "400230281235477723305446756183676238679630391", "6.93198847099847416765033781710127245393119837212e+46"); + t("441.339801980", "3859926956832539877913158087979570115173.37608", "1.7035393987857371577386465661853388929161435925152686384e+42"); + t("146444036588433930865962234014095372651938826216413", "-52287041949860150983876138.09252718579", "-7.65712548440629977355786783708824277254343945936126868688503521615280343003456839837127e+75"); + t("-152996991626635397079841283901340.65158799", "139164451.4055465586500905725256511816907743", "-2.1291742406419715449781823729219758981469966625530964344454535418866326578427680657e+40"); + t("-2392095943969007513831013778238", "283213.66941826693939894680290224", "-6.7747426989201568951320097088428601075588412800688116615345312e+35"); + t("-15192560288102281367737239879605.47240096086", "-81553445736510122", "1.23900564105440798918085016560369292282227123306201591582492e+48"); + t("1.7067661013360140299015089144175628", "-8518082392971818901480808577069938345874733", "-1.45383742767114563412540521449653172561766842289564535605710831784007839607324e+43"); + t("111116813960956208515375359292296052638950332201721672", "-6723639335232846900768096240894018745358463215413", "-7.47109381153635523540473499319528741906993971058857734750058361188185043050515216086975306279606530536e+101"); + t("-19017520.49675261317806237143645102654220495050", "4439261178196804.5636234243239638305", "-8.442374044679588557398641259522603028251217372386419857709859483039768004289025e+22"); + t("17312453768.05379", "1726.44336801935101862147113581125657128654142147602", "29888970991998.0896280136870221704774967797321308901016337045551158"); + t("-2", "-8.63876", "17.27752"); + t("734608.2", "0", "0"); + t("4.1351657034625927353146715451605855050687982255845069770", "29034498780299324669067501513285520", "1.2006246357352024765485891656111571028229380504313388083084112136514462841267544463307304e+35"); + t("8113870024531627718699652079910.7068190690295904975254176585", "16923534495569343509614671152502455712381.505727413", "1.373153592527270771522358333649474524182371877317191394431842566433920202044363434189424789373922626777224605e+71"); + t("-10.01", "-4864429445729841.069760518121786", "48692938751755709.10830278639907786"); + t("-2257142436339514797101935880.78", "361.115", "-8.150879908987438859554655755878697e+29"); + t("2334599.31164827194227", "-29960204503173960913.6", "-6.9945072809951386426110474550748535657872e+25"); + t("0.0000000000000042471515826788460724024393725389035009593598059706180678", "828398091382.612675070213", "0.0035183322649037987809384707757042363075619742175811901626183872501809043713944414"); + t("-0.0000000000000000000284493127383335026590175755701910596367998889566726", "-0.00000000000000000013237", "3.765835527173205746974156478226190564123201301194752062e-39"); + t("-0.025286262", "-0.10797436581647216600797099911020807463243214320798554", "0.00273026810331915910538504877190248824967123287037864285665148"); + t("-2.16564935772054852403", "123868749404533277771925133166764554.44147780538237283827", "-2.682562775895750704487504519843216927715513029094342900139628307846103986281e+35"); + t("488112856156098659519479388744402.61", "-3114334168535743226695852106494538175980162249914143.70", "-1.520146546028510353469309736526975923164123845906295275264771051373672808879616446195057e+84"); + t("13062458273.90637045335784972", "-422551949801626.741267985176602715381458097174737967000518", "-5.51956721284152853764296726669744927261362132472755924039708895768532345915860615496e+24"); + t("-1774897196938188058987.040101468413944266333770483137507", "-546064776871.3594927107191784", "9.692088418156530694143698199431520418181775404052225935078568528036161040292642488e+32"); + t("17667764535653225248288857836.95612603671740964890", "-0.0000000000000000319890032591629766", "-565174177313.13507635499469894977748029671843469133582435048491574"); + t("-281835819.9184911063", "-7175814054420814885484554.4", "2.02240143761032232334599327109026978241853272e+33"); + t("0.000000000000000001503903188910", "2473558551492927739005724.481043938460207033289961875", "3719992.59354581446800290523978683389613115250358419250482280625"); + t("224371010310.537303586", "-8046248744083810452149728.077812213", "-1.805344959919976464767416627850984855572049419079495818e+36"); + t("21241841371778633003043.69805019497112440", "3019928870075002318121482.417", "6.41488500121878843990786691028203447626143414100289387726373196748e+46"); + t("-0.000000000000000017364919937061080720023417741392471545683503908", "-0.0000000000000001101", "1.9118776850704249872745782933273111171797537802708e-33"); + t("439522909103802363083392888521183473696.816065", "-2.2", "-9.66950400028365198783464354746603642132995343e+38"); + t("0.0000000000000081177461857815960900264491259569062173810350", "0.0610415335877925918303617472579311", "4.955196764565624988836180976890473307042478930774835424434663605140744766885e-16"); + t("-186798563956757871041672400714377.094855823", "-1262567588714917541983982710.193577", "2.35845812470293091731202495176066945197325419055745256762489749711235648871e+59"); + t("202739871381.909125537", "20323942031180.7301604586345358572504650", "4.120473393374958139010105109821762644139100410749336624705e+24"); + t("-0.0000000000871057582376852096451379468926610553156501430073631916", "-0.00000000000000000204556363069958967723715901466977445824097114499093", "1.78180371075520049530019591335531323553330829840490421849868550913658281328132369671225257713629597852188e-28"); + t("43650.3286859870996376890566772833", "0.00000000000000000001310330289622533562857521522228834136757813518300419196026", "5.71963478292282611553143218521780871633322080859969244917523136988043505512171959238361658e-16"); + t("-1092205601185294", "2", "-2184411202370588"); + t("5860768904954696696.24176142662833543847", "0.0000000000000048972255", "28701.506930951217005600908223400663331828964985"); + t("-85896656824567.02163635501735158916726224558523587655", "32321.39", "-2776299344922992287.4470686942774805948582718361870079644045"); + t("0.00026", "95786603846831218908589843126114668233645", "2.49045170001761169162333592127898137407477e+37"); + t("4045878451917596479346482", "-2.2547", "-9.1222421455386047819825129654e+24"); + t("-0.00007402891873793970469482766866928008041088343139", "580", "-0.0429367728680050287230000478281824466383123902062"); + t("-294517422548703614947348777318332.649869292704089396942", "-0.000000000000018464905130542546160683866082", "5438236266653724351.349152153311431266266033202633265447500622081254643984468321244"); + t("-83.506", "-8171012757524040761112.5", "6.82328591329802547797460425e+23"); + t("0", "-0.000000000000000052054568154502662326801153388437977", "-0"); + t("-848457792560875.315304639536969249869368391843456", "2786837672040308423168750746536175069.979124227", "-2.364514139444808677729215519365182902026897625419714103499744958027008402375235640420961008512e+51"); + t("3114192", "0.00000000000000007442771895146280027117559688227552768887141498150", "2.31782206936893840902092874406007390124461849564067448e-10"); + t("0.00000000000000000004917302646400565894337036110048", "-422918872", "-2.079620088498342188194690499484768025856e-11"); + t("-497313848.92", "72015813415347226684601.47954307807272704460158688818499730", "-3.5814461352690899900766892687894799291942231391683303086680262807916e+31"); + t("4026.7272674898467547880850473160814529617052037657449361", "-21157682685", "-85196217784587.2940970833078499068622793775121577888984306494014285"); + t("161789945200634672.93574932528", "-8005803048483811151653134568908048072385822541265", "-1.2952584365012698158369216496463941318557463003471359935387477829065387076792e+66"); + t("-0.00000000000021548823070578223953868560097628121116323968225230682924", "-49653567182460198793826479862157.077878", "10699759340379041130.65114538401855139934323670216223964167385329900350710562551938222192755272"); + t("-5565648526946998.206396582068274786458395468246488801913", "0.0022945055453979742566004395333553200630524525428518539025", "-12770411408815.9541406930749916678604063671114068656466120089976699763004963995450912686342679576306781385154825"); + t("3.271826", "-23890.6474306628013", "-78166.0414204757505261738"); + t("-0.0000000008805699092114903173390188646922", "9284821552.25745813417849639083469216233186", "-8.175934471316238510307959904561765618357930068136953080998844682973153492"); + t("361333176.6552043788873570", "425816532338214481.0652246362221874080822", "1.538616403020706012031174663425818903103785031033415757451967454e+26"); + t("2805.024", "3138666568668923617772609.35105", "8.8040350531139788020189957723196752e+27"); + t("15516261613526.6610074517562", "-0.00000000000000000236624580694534592762621412652683109621677385955", "-0.00003671528898247448920639683215816512848818717755547603887938060370189964171"); + t("-0.000000003258489294057571", "-0.0000000000000000001263694100620034334234551033555508871", "4.117733697834092773082498224393477748428351275212341e-28"); + t("-21061048707054855665564434392186020553808698597863.879494", "181831629693595281071297779845", "-3.82956480945997219565546562178683388176250894166635033461551679226752688144082199843e+78"); + t("-0.0000000000000004150087739116129831368627055614", "-1518028660414097725821098740744462450073.304250189994494", "6.299952131211430047024557585815135401837971947761937657558761468690680184406091789316e+23"); + t("-329353403844205335310.931518048486742714840512646142", "0.000000000004737902605006197777999824176859382087", "-1560444350.041118731605073747643365481135986445785795088564232590700292190358983404458354"); + t("-36414599958286461846528123709871289767333710768520", "-11982666807671338.82516899790506494507", "4.363440182347893057208595495864483712233866372669435753275016489496855915098212851964e+65"); + t("119742066861.890807047", "22054829383.984629241", "2.640890854724681514607753859168565061327e+21"); + t("-484485733573777836334476960525005005848019789", "-14406177805616860655.8627771810687838", "6.9795876221485617831711438674257823866674330443283469578093046623068838325626182e+63"); + t("5988848948477.078723617", "-6.5", "-38927518165101.0117035105"); + t("-1.0", "-63379703.864490098873312332", "63379703.864490098873312332"); + t("-0.506613427677516177791327725446313117452", "-0.000000000000025064675288473359447414244747114622651598944039", "1.2698101061517425226884571964189454600296022874042153446180321519393920461477382268628e-14"); + t("-23042537.21970212804132180", "10390764065108.50823342162627716811120", "-239429567711406187063.05734442567122738046800108051885738416"); + t("9812550833139441428690193893295885866528739.860970333644852", "-6934084675959416258239634601815942.0149731256600469716450344", "-6.80410583641450037528576307977037672169914839765125030421279633360096772675136555394720496053502446210349236989229088e+76"); + t("0.0000347689", "0.000000000085057549281766287602723911010", "2.957357425222803877030347389515589e-15"); + t("17309197932605.95272164347202723030822567422328", "10372291249693770815173154703247665392420536", "1.7953604225558623153970783373103876250250653717733283278048673842023984171292886092127808e+56"); + t("-10.68586744857482180099209534824648355512284245440", "674588.26676653525901087", "-7208560.801031027382439380269948592059745431252505648164243884987079328"); + t("-158425376406388668464703992996848728.8980383980010724", "516624932849644105480296.4740763529887132394681136194056", "-8.184649944763013743333361097416811851476935800617569830052596874617614630479435342869900779234127425056544e+58"); + t("43701371988184830897740842", "7444696727806908941269732116534493096172849746185.16", "3.2534346104111212105848066810541857916878449567515264310528659180255182630472e+74"); + t("18985671206766137596695783", "-4918195942924959263752039745340080571253768938", "-9.3375251102824433332331539143355814981375199246602425748207454160988454e+70"); + t("-8164454926564686613685695436631269148628112649072225137", "3017566861500503598.7", "-2.46367886286161259704778334978048504960179943566519245177920238542851005219e+73"); + t("-167.140200050688164319586013710074703990054053511303270", "-124707.791051624249704808849761672566349962496678", "20843685.14424789642526902036712772659312890967899817539551993752122248668554302671208072486282553706"); + t("0.00013717932814418", "-236889624553106847157555062629.1419261258", "-3.2496359540522243673339058837639891572432570371217844e+25"); + t("0", "-7377966474", "-0"); + t("-1165159893843574357027338982426", "-7258741844369034621359206819796872729971572863114", "8.457594876822935516127237999861301735400382433503942145536493041682252149634564e+78"); + t("127327741", "-0.000000000000001314349415125924728376790639", "-1.67353141912655226200255348893816499e-7"); + t("-19", "674693830910632347225468600360472778098653805584.98", "-1.281918278730201459728390340684898278387442230611462e+49"); + t("1115499473064514172110108362485045185533368299248344166641563", "26727699066738.5277545215239", "2.98147342251737349166633853134205297966348378257402631237265170730493167637686598378557e+73"); + t("9531022923010697243825538443.3659", "-10497868918011538716", "-1.000554293003294813441624977396834705527412812041844e+47"); + t("36948.619152016593259861704969912416", "-109424973578674628984651491823525807602358729239", "-4.043101674477927092300739573396847025094408695070482727807518216276085630888331424e+51"); + t("-0.000224994118800115645797961334226721592496197539765940949883662", "231860.641001", "-52.167280606449958627644387092820869098935873225250256147940687697225662"); + t("-81737025015671727638688.506795636777200442300", "5419138.800783060", "-4.42944283723002262118621171335050352165263579845818347438e+29"); + t("-1466856541.9549101", "-24128674849693158122765920.4", "3.539330455197531614891444994295155372575604e+34"); + t("3719432135548", "54707696881", "2.03481565841010488825788e+23"); + t("0.0000000000000000347350240379700980370747179429442891350492370249744117", "0.0005534400198558475169798243101266211771697229801", "1.922375239326751185420171365530525629522813111237423841789162415238003577693927327244648617996830717e-20"); + t("2248441073845808666637746763786280194954645599162114623.5", "-6334923145497633015473724024497.97", "-1.4243701399993365995217919270799399913979461349413953499228708640778427689308423183064295e+85"); + t("-2833.50779749", "0.000000000000000000027787099520949762309607915049358999802", "-7.873496316224179511483613883698024416527436609698e-17"); + t("0.000000000004441882942767312311877169439858885409", "-0.9432493370398481379786084999178021934162", "-4.1898031409738770478382967231410155261701150266906290976528356507851700442258e-12"); + t("-2107306488.021444213082463895093082025238625832167567", "-0.000000016561760020640192077800", "34.9007043445492445900173806825761285679208256730753889935834487955007126"); + t("-129070822817.42205", "336811489052744821.06", "-4.3472536026398913255504341077748373e+28"); + t("0.0055725231631263368659868273181674133608110946135789308", "-152412560828753089910310350.5653132", "-8.4932252556962839520515736693985586025569561774936573592091065011026694067884882312656e+23"); + t("68902.0767970349411722981874624462811895157551795177137623704", "0.00000000000298788286086686468161985148648212755894442142", "2.05871334339993176415426311877635990320333360195205545566288301397039058040718828895421507390094595733968e-7"); + t("88153860095637039945277243438872776.064214155", "106.735", "9.409102257307819458559166578448085753213897833925e+36"); + t("3.7075516820964288985011546648796", "23633186593.70572408884166096265287527701858061993092", "87621260708.792430109916115951342109977008394099657174865349158237730095429102117232"); + t("-35505760506401161908713691885731701346896104.7570686644891", "-5457648514664450630675291184021238402035211", "1.937779610897920137400487822865364585421914753043232864073023463191678738063333894770237751635257001e+86"); + t("-120.55403235772170", "6237.155894", "-751914.2934654306175666998"); + t("-50246944566472610231911381270921126440112308695", "425722751177060307857193841626947340", "-2.13912674790799614679030549405709134417922674778586880217918152980768287325891213e+82"); + t("8119749715097219059818517125264159.064450132566482", "560418609424712067.0940695322762258473926083185", "4.550458844211485491057203230529751310726950775388516102150563306194801442473073934282587480517e+51"); + t("0.00014717424858", "-7244528491321.3877", "-1066208037.026626286030354466"); + t("-42181198581127024501.50753334291048422600", "-0.008682426489650895544", "366235155926002047.202675730675546783334970920687585688944"); + t("-57.3", "-96900776925224476370583151961084756", "5.5524145178153624960344146073701565188e+36"); + t("1083976078583942678025084625.271006", "-0.0000000000000000534905554182086699326584150063088902383604755", "-57982482503.506901999157564033733434733806444040999020955818569250676306523353"); + t("1058587.736740719", "2.2", "2328893.0208295818"); + t("-337676088587247469427246609", "2694990217595978128", "-9.10033755458704844211026116003411819226167952e+44"); + t("-180266997707357275243150935948776784257767.114595713620465125", "0.00000000000000012929550822108208448723385741716775647229370346", "-2.33077130840613978574569769854573934386258812596377482210267408630672963476159438278046789605387340218325e+25"); + t("667863393175854.7645678", "16647944315358092755156.00", "1.11185525798577381655823461635163932295615768e+37"); + t("-2607482796153.37663635999672298", "67905.1", "-177061380021074655.829689213473629198"); + t("0.02649777513989417670980608", "-3.7", "-0.098041768017608453826282496"); + t("41727029296529241379347405093482273986363238008823.7495", "-0.002796170808176706621979157103112461500671267733114714664", "-1.16675901230889282855531874612261889002345278810932959186816789276573413038428661947418401753559128959112668e+47"); + t("-11232695034932926234846674550549966790.9183", "-535612384919640506677833697180021817295233383415483", "6.0163705767354292540256743939915265501958563028272108803751138896375435530577152378000080389e+87"); + t("3.481826810306751", "0.01981896398982153971994255430994006244", "0.06900620017226469113521762438686245737379444049353244"); + t("-500336401148192185730936", "-0.0000000015351207243732", "768076778560892.7643589222652324493152"); + t("0.000000000000000010152819846152021274527085743667507483", "2034271405274844529575.93770552252121", "20653.59109593400315620700194269765880413700716562682807038424236270121443"); + t("-8", "14804.920611063196753", "-118439.364888505574024"); + t("-7644880", "32.933", "-251768833.04"); + t("0.0000000000000400490024778789822215877572796299412810612705023875", "0.00000000000023561893047293924977558189853184387736389392033215150171", "9.436303130345939646688036612188083884147595770701765354726302304762424603125782629215278913888534265332625e-27"); + t("-669622098209324787.5786201166", "-442008.19657257", "2.95978456014644004507422179531566173761662e+23"); + t("3750095561598843110.3554570", "-0.000000000921072821137", "-3454111098.455188785930556597852894609"); + t("509.01003417", "-0.0000000000695541947", "-3.5403783020913832899e-8"); + t("0.0000000000000000635110973210625767420869099697944141102671291", "-302.6", "-1.921845804935353572215549895685978970976683326566e-14"); + t("-10277403.8756777588787330367830", "3.73924958", "-38429778.12561843210264377872295730114"); + t("-566623967.574094904804042946014964033941069", "-0.00000000000001662953909014460365351667", "0.00000942269541818623958668998623752446360099484415277625603154138912023"); + t("0.0000000000000000060428627571787342505274", "18.65854757486578220960", "1.1275104224320402610478848029208041233734304e-16"); + t("6026260424.00", "18673139236042341642133200165212521277908.5537452", "1.125291999700035578262744750920904785263182229257757399648e+50"); + t("1351407130504734.056748656589882", "-16213.40426049972577134801362523633", "-21910910127395164076.55243444398575049081525274237838315413681306"); + t("-1749812757762436212668429.46101826944561361814636104616270309", "-259646", "4.5433188330198551287450703583554958847579349723006019196120650614e+29"); + t("70245313181709005413989461536786.3825442617", "-509184726219286329641748", "-3.57678405606165250356068075267063781878365698344246156333141574516e+55"); + t("-16.20", "-83495.2179048376073493099472538", "1352622.53005836923905882114551156"); + t("17522790821382422258618581410703033443568", "5481690529703238.18676804112985115150792", "9.605451649954285042649291504450317447918361312248424196122189225108309342505856e+55"); + t("3", "-0.0000000000000000000298256458973606523936524717292889013", "-8.94769376920819571809574151878667039e-20"); + t("-57135112812568.466051", "2713703246.301287433494800761485396936819", "-1.55047741117257327421574162146466373193666197915868993431769e+23"); + t("0.000000000000000018433", "224.613695971469169", "4.140304257842091192177e-15"); + t("351655210258904818533038059328", "-317039471793459879795242832647363526701869253095475", "-1.114885821139012575684668438594527497497409491712701452561241865985548506983408e+80"); + t("-1317999447639091934290806166798244489675877673.24510838", "51973652129741187036804.3069426597647651181729", "-6.8501244798785198639385417890806274968448700953804306642353363730416792643087698202422857568078902e+67"); + + t("-838472500998941781878534497598346150189438395681961909493802795126225423951505690327678802846577883568622319410118", "-2884829948773734005744162960155700874127.0681001892763437635520740604769472972181496111013", "2.4188505821049618555759179210300843443018778137981932674088381260022683344838428233063800820435344194302980110031387348601685636929132993133036482870813353080292469079495502993056630049417824321203429534e+153"); + t("796691.919974655750", "-344177691021", "-274203585471964324.87434102075"); + t("-0.000000000000000000037241136189493487515236242635317406", "-236633306915237035867656873537286323242534.531", "8.812493209800553514615822924219854143174591731693607256359134469397049100346586e+21"); + t("-36918999197803067902650019640975752121441727061986591604616945161242737830954924822209930.0610216157567", "-630816248640.220238311747288806", "2.32891045775094316018876017621573827476363455570577127733350185252461212627985116895575049148402627634872854943933909453127151295002e+100"); + t("-356285686518395271578252895087932787716516776378851836556183.490949109645090654856023328687155015449097603555460351788748359722414863145", "536192552176752561042209607723742909268910764247931780563.2", "-1.91037731558344763167084704445859558938320679866577929319697485737868113003820206731226346686676150919266490086231386325706954806002421869189844369048659180671649946432503759091893660299023264e+116"); + t("-10868240043.323", "-0.0000006987483137538548533133640114148563911523216092560534998", "7594.1644037440686677326890935142678911031312404730399664663577718354"); + t("-0.00000000000011591017649385438295796980510866337031921451760232710693439920068628049494341909991139678975519329366780780539554769715433124600", "26133984739171981586185319", "-3029194783605.121387520277919164440375428744596566999709645269433197968011145816158998774967743687046263521357854521385482216635698201872145379668177474"); + t("-1711273540905209744011506141193.37033113722759550410761924564724", "0.0000000001293732763469758906747311439702612890496046217356893762894231050676460791112722303394750148856", "-221393064712797651093.576041646381279748254325855686348423517448454794870494445248164160406818767744894597164595179089851596941716698075867505673842006555744"); + t("-63062954745.8598353024049107700099585768452939988302739544094597635", "-0.0000000000000000007066107653369429290153271704760473112899492658449746935736601687393998875372553088763481649809909245944916440347928986666226", "4.45609627173810154902373805273164378070520471666107189671611539018934456392187448488034184668558120645401564953529878995106460890572197110823797727327567501341707822274253599872751551397551e-8"); + t("-0.05396306543212365254900360568584", "0.000000135925517648212", "-7.33495760274574245053942000380666682810971808e-9"); + t("-51311181621759783527978578699650628367670018837603370537970304306.5", "-0.0000000000000171073617238152543", "8.7779894447982604608252727389859997980275463423154981803549625152925376395768264295e+50"); + t("780360810680597937530828803485426316757997822572046380524663475663587783713055764905934635773988266249773631591980851269802869685048538490187809566", "0.0000000000021114006241457087", "1.6476543027298657092509209956166007749872751971298560901265194443520620935869459922698982198083609063920515096925628739206594316734184930365483909751507976717094242e+135"); + t("-0.0000000000000001558591643933212408712480642149933587830724439341932663613727360989832586450936995132509861377299507330923270242750447693180038078839868789871", "-899234589140276920.9563731186", "140.15395165697510406375504229464266777072446771644043491265354600675571562268623460258428521212930915552512830838365872392420849552201444571287189837930690619037363617006"); + t("-192128620208427347208760897481755790502927310252099946847941391701541372730741701901004842683652084499599551669587901.095113423628696460069833", "-150027.013347965686304316841127", "2.8824483068535959518771144524961420793873335181555629802553828843970441540984506755823649963472492988719283593979140183046911245632653583841810467259116227616668386421791e+121"); + t("-0.00000000000088119558575179620805745334627526", "-2342970366196339369130467230746566743437618438527.293007742982263818470063380858096529305084867946540343494845177603781376", "2.06461514423948373213684382167619940227586580537675167441830145669955691286212463457073538034124876268856699464885544965251476720909351479389090095755776e+36"); + t("-6635456782135376051461227670659894416124826680462504047183309508524677837974389566804395212269550349799505694436932101464692080338", "-36033.774951979165187136955049120300", "2.391005563910499861359276356470099138701070047532575485529233046218042255556441673237652214828582412128576389116490428262479007258867518065861096006448051838266614e+134"); + t("1.0795693", "-0.000000000000000006209261744497244037804821960982585015091967690457481640260325487223225820327780029749670765451353356", "-6.7033283550236685978221251810425966169333249952098001341386914040137368425931872572708312434887817265895708e-18"); + t("0.0000000003205206100151839365357713821428922286825107015046701389076172910755564034571464044704259976070021361285911146439621197151315883353504731", "181280954003418224438635307210393590651533286700798186230089972712042801144671899167602413575288941132381001", "5.81042819613101098829202896183160808144566548341644020145672547798396356491584355574818346795299101366223635188614907521125965341055497357077467758341149862217405975928504053356664898994511933823140023871980627595465353142713441016064148015731e+97"); + t("60.273280", "-1948051519028114.87884169", "-117415454660806895.9645912570432"); + t("-83193336723730904831044", "-8597513002342", "7.15255794190492657393641372686305048e+35"); + t("-20357731434704594485933.435192883517106779904094737872189392050585959795325610691798979690389882855327158774541534046886050", "57101254487124.26556892385946827693467498483828207557125700861375680904187175758285473565759248405589101", "-1.1624520034335964384881547289755586531335208559562766632031511288008463494925147406785220580646246607391536758053170339436847553410796246157934498139151632371860559137134623242512914876401966834601783673486087092780486894105e+36"); + t("0.000000000000196393242447331955075189676455271786947264076645295021258862881929479958110333580", "194877.520544633956108976283205922142563827316236038257841914758325718909245819798140", "3.82726281398572106089641076236903647054748740721743415697957940132522454065934785001420361718935697399839562856732355534966588993484025198806123215220764836635412e-8"); + t("-8071576425880681257819461150", "-1591541556785189268475083517665125202173160434133152.98399538151538621882421945398094", "1.2846249310556773308688003659431424152963795381736069812397375172279784904016650744805487687134414853173170481e+79"); + t("6215707454580399344821610342", "145319540897984402903779835609411326583090144758472486922947576644983828825850438698150473186142966520100265693", "9.03263753655802873031730925036374079283112281131923966584171630907427735951790460941752213245331152538824074995769485027917034562316597006e+137"); + t("-129348079468144673220614626836759706", "-88248178940421789818564716716211678654401184759743634646878788943183256531349288163631708018145656009375447214258101552585320093130", "1.141473246250472885515118898707262713605663944616163164881785239559268827685334536245384449464192711247404249908389352393586709492073897298343118518559610042335141978e+166"); + t("-5780259200186462371596484655187034250137478170873403737601291296553629304246338.1", "20317804349924669254706871559", "-1.174421755212405947511968636545739798982946944457429152629522410545955272538056812944623926565594717327880979e+107"); + t("-774.0", "31209403299230592237921875076234864775333333322171087161573695825372946329.47956111641", "-2.415607815360447839215153130900578533610799999136042146305804056883866045901718030410134e+76"); + t("-35300012822981309972161307966314653.5746532880996436", "0.000000000000000000330318102723213448", "-11660233261792292.2796305229097940998500752778977839907195278155271328"); + t("-372377963884127526301703864441812802765174863559283045963633022003526893443086066813180.3717468998054326701855782319548515", "0.93426382293185456943254764459757361885785459231935724261799663689196168735639052920121741580138452492", "-3.4789926011396505505944781064660804224349193623867972766690000964018527357693140898258100416659583488178405935796093105315794205956790824509036660608118406568210299647359494344226952122917410385314738577518950473221664938e+86"); + t("24266165641723085835767787003697599948414575.4598063181549354935463146230534386950113305", "-114046436224578769506685348541641847469702436631296179876858707928490406027412029206934467.22255852787626", "-2.76746971227383645895497368320257172653365323571255355106207704032170926692669369847993108061766552826817226048614230592101594822309797349385303976310250855456022415694582167365528080196393e+132"); + t("3296856412996342216590213367517526056709903701721644610.791416", "-17873043539632614693589701036988.4471469786937536273599351623416309394", "-5.89248582134006296943775735259576640781981176325731275908604121314963017378308625998703430431944837580972601701118670108255361904e+85"); + t("-579102350347312720630005129054780607559620407558223441199264163920137899902249163147321939579047776302298780448678174736222915", "-219492399337234160290652558813948662413370806048542871624923.1888570368753037439767245955297245131205931820059590", "1.27108564339563247096015910701131062607103942871909341223369812880561545119021551254208157534581993545107836369462180155951136922383213991699434467561508645543330227906067804094605876984754845169252387320636979899325902200224418682350485e+185"); + + // Exponentials + t("1.153024e+0", "5.28973573008e+2", "609.919225043976192"); + t("-3.699875785122930862283231104748329088664056423999601e+15", "1.1e+0", "-4069863363635223.9485115542152231619975304620663995611"); + t("-1.2682525953252723e+14", "1.788378029508237622037088155833989378609386207655e+18", "-2.2681150773465187729527785601467557683746716925715084680772194565e+32"); + t("-3.87722166e+2", "-1.74278705869601992403691e+8", "67571717327.438998052674620914706"); + t("-3e+0", "-3.64329808384254180872888049513111969646643282968e+25", "1.092989425152762542618664148539335908939929848904e+26"); + t("6.953012278719261355e+11", "-4e+0", "-2781204911487.704542"); + t("-7.04663671550547513365402564941508037562051247993316079593e+15", "5.535517336770122093358205271769744142052184795629511766877e-18", "-0.03900677970460142822373864049115522460524845334243105937826127540936694775384656847162726619838459694385924193041061"); + t("5.08438408986e-9", "-2.606367e+4", "-0.0001325177090713613862"); + t("-1.2967e+0", "5.94990983e+8", "-771524807.6561"); + t("1.3117e+3", "-1.959557842524477358350764324331855847355274e+37", "-2.5703520220393569509486975642260953149759129058e+40"); + t("-5.3548e-11", "1.742694574037778940228462366629620551e+11", "-9.3317809050574986691353702808282921264948"); + t("4.34526424962996265825639250671e+21", "-3.754914933534859756171859142125715053796299171e+1", "-1.631609762109069348677868227008975151085048810070540943592037216417378493741e+23"); + t("4.7426914347369245430071315112274335473949505818891357635e+55", "2.099290936966289806252483785990857067e+13", "9.9562891457708756252380705318075217577762765683497811755225761339325645531279572292864156545e+68"); + t("1.2197662968047362383e+19", "-7.9257e+3", "-9.66750173858529800389431e+22"); + t("-2.18492048239986982664891448764e+26", "5.0217571e+0", "-1.0972139945426971341049955535599032244e+27"); + t("2.8477441033458111e-12", "-2.6015762266879431727233849707015975771758956198e+40", "-7.40862335895523532800693698581126602552353137494951139716821978e+28"); + t("1.17305251157767339030842411702548e-7", "3.1679877726710109082864387936446078459964397e+14", "37162160.13379088759968293791782997863641886182709969796604371507532234183556"); + t("5.516400791447843686549580838221025644959140288781e+40", "-4.534755696021348164010120097087738141133999137556364474656e+25", "-2.5015529910554782273339735168586403296046609840907360623635477256369630649686086353650780443350045195634336e+66"); + t("-1.086178703865e+6", "-5.412964e+6", "5879446221587.90586"); + t("2.193003362433320722921995078848109409779629e-11", "-1.87156484301625964803880921322257778262063404562091823011824e+56", "-4.10434799374664745958524117450745644772403340614160247100180995137281346990234693655901738534901333296e+45"); + t("5.690242268084896613323736558476149127814487192716110263e+4", "5.85123113232510962819522680703136616268672961423348513284699e+54", "3.329492270949058963099905818513145552769091859265632399465562585831994642969765945460416258196265143264172794765837e+59"); + t("-2.2964852129902920477142981e+11", "-1.01192386417445983894690800351420572044711646857422992584148e+47", "2.323868190748643763813766975749316051539457362388056941019107244885259571701270065188e+58"); + t("1.64014114524e-9", "2.33457695670849217356126573862065622e+13", "38290.357234267802543783512378452575905911293928"); + t("4.52030709268304468292307103018250587082757e-13", "2.4202633390406694150089337e+3", "1.0940333537626286438097741446790925743401036958119194290469762262109e-9"); + t("-2.531530179588420531938806173298571611356854e+42", "-3.7916295786409190517918e-6", "9.5986247081496130774858068268051041666243771242517966898979109972e+36"); + t("-1.1137e-20", "3.15532351096658148747044e+19", "-0.3514083794163481802595829028"); + t("1.26704207115899080748696654617058814620502905910804474e+17", "-1.1036640030158560360573681189153991777396167698e+36", "-1.398388724244832908797767208849960696897136903372124358147141607664782163824521550287804299792680852e+53"); + t("-1.92043925491801737087120450765880605794833102824745131e+40", "1.48390768547e+10", "-2.8497545698511264714107436784310097859137225929760606638486194657e+50"); + t("3.8135622104716384192078983238750322e+13", "-2.39302666425671400328234877933630532203640643176e-15", "-0.09125956055460405574747767900047040915488905349535492182534023415362543138557102672"); + t("-3.234931242339998871854389747974137006095446e+30", "-5.92883411067302421812958123642550690642906114730631103678724e+9", "1.917937069526724859889065751200796792104177866908520783368616010428214659504892064497475599582063490904e+40"); + t("3e+0", "1.99273095508512817553537488885e+0", "5.97819286525538452660612466655"); + t("-1.953336949e-2", "7.78542087974602115e+8", "-15207550.26792398884803047135"); + + t("-7.3082509513985065717321588249117283909294426665053038123171823802E45", "8.1139587436599483304895082011722489767478591E-41", "-592988.4670796104848902291110510024833882877779324139587779775769322761921828542989063538752670078960459222982"); + t("4.1580690407774531635854811718695276837491313289E8", "4.51151976050001428945887983E-3", "1875921.0642990819646935715021378546121515533349338737465486653798953306087"); + t("-5.94098742155317032555791061122172112467693488807700534435506921715E-24", "4.61016941217052394016E20", "-0.0027388958488934255950077406845338327546662445400484871083292926528860519832777944645744"); + t("3.7504E-12", "-7.88007879736459852E17", "-2955344.7521636190289408"); + t("-2.1186022052008407937878760699384240447915477894859451125820040738844629725E-19", "-7.216767917254229694821186934734207628E33", "1528946042391748.997410886033946108685159225196274137373381385049759221715038347354480872320019684962009305423"); + t("-5E-13", "-2.75399279758638331766833072E26", "137699639879319.165883416536"); + t("6E-5", "2.417496760754967572844203198215987E23", "14504980564529805437.065219189295922"); + t("-4.945015198370467209539041539486792258261028978257673527352148835976343131637595762491692863E23", "3.21738997057546245991016675193089492784008451753637062802134E-9", "-1591004230358037.215453223084728812766073228229224818741711464362077222232342773738670279322956619570773005741693064394880256558629265661028200068969642"); + t("8.944326872147001036632309667E-41", "1.34989853214019743744001484188796117541380712420727841534671603347856989127834147166127622e+48", "120739337.1569336009465330585026690676314127638673504378646869299090176172459431821906069831664699038568059542346321874"); + t("-1.06387569312217787644613114942E-25", "-3.49651047707433733724368394353972842316097364325909366154237667988339210449181953609691895611E35", "37198525073.064174722364904333744771229085129180022174384101305415837978911883846550330098510374779170577866567699408319562"); + + var t2 = (BigDecimalArgument multiplicand, BigDecimalArgument multiplier, string expected, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(multiplicand, config).Times(multiplier).ValueOf()); + }; + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t2("8.7640115353288983769636573243142380477", "98132771361613972783640738.8", "8.6003674020697822292e+26", 21, RoundingMode.ROUND_DOWN); + t2("9883.35324545076423007", "11534864.85576058804", "1.140031440080173692239106128721010503628e+11", 96, RoundingMode.ROUND_HALF_DOWN); + t2("783715483584289803764074.0162744727280534", "587170409.865560908036543", "4.60174541714173715664e+32", 21, RoundingMode.ROUND_FLOOR); + t2("31262.9696080945278832538654512053499", "1521666893653481239743.043288560492693823973095115099368", "4.75718258499323920319594724294097666996623614819732348e+25", 54, RoundingMode.ROUND_CEIL); + t2("166409773943488.683641092651970053074130172697160981650", "29383374581263422.64023860404731207688485848306803", "4.8896807217648976193745354023928027035617334126548609476076571e+30", 62, RoundingMode.ROUND_HALF_DOWN); + t2("99801119833708.031510783672287782392", "87030725026830312515179448.179673604958603757057054897072499933901", "8.6e+39", 2, RoundingMode.ROUND_FLOOR); + t2("69731726468060380.008754386406977183117439", "6507714968375561.33257030119935", "4.537942001068668490255113904663360975e+32", 37, RoundingMode.ROUND_UP); + t2("826.39677733802082780060", "868237729898283157855076252483.31358937218256594842233795879804", "7.175088619512201756727486736e+32", 28, RoundingMode.ROUND_UP); + t2("97217122196114863.76307918894", "364113335834514329508664304298161.52242179479054037", "3.5398050663058988634098095121967083071e+49", 38, RoundingMode.ROUND_DOWN); + t2("694287.0306858418134468623", "447593578620913867261109598650200200326.4456503480625181364964224", "3.107584166547641764350683201983126563462027750463328256303247683293325772050963164554356e+44", 88, RoundingMode.ROUND_UP); + t2("93531032436395964.711423", "6448227682408.97162274053113046870693355787761", "6.031093925206599020774031e+29", 25, RoundingMode.ROUND_CEIL); + t2("59420641950920240756465.98423943966502979950309", "463601148613543697810692411885405.567307456576230992948033603539274944", "2.75474778598007436599867793211769930534477108061706131687471730901078e+55", 70, RoundingMode.ROUND_UP); + t2("2277315731915149177050340.03547342356244316415202385200697752", "6094500.77365339", "1.3879e+31", 5, RoundingMode.ROUND_FLOOR); + t2("42499210185.324283508514337889872833", "6164109749819966303123685.0308732625627133229964813958076024", "2.61969795863005432962609968421706697692808308727433211318709180244255952739662715e+35", 81, RoundingMode.ROUND_HALF_EVEN); + t2("50420118559072004.14730128780580482018515", "291795344982121444321307800114867269.98968", "1.471235588898387943301857933580557e+52", 34, RoundingMode.ROUND_HALF_UP); + t2("539939290941744314049.4828453820231463558332989927861649996", "56.0", "3.0236600292737681586771e+22", 24, RoundingMode.ROUND_HALF_DOWN); + t2("974009303998280915261274173.014298757403849048", "477646393839119546.9057", "4.652320316205296032282599543500856192917503854138162003909582907736e+44", 88, RoundingMode.ROUND_HALF_UP); + t2("425036.71458946184", "828502.099774406", "3.5214381051858403971876e+11", 23, RoundingMode.ROUND_DOWN); + t2("3.0394775192110017953283324", "179399012406133.674", "5.45279265177098e+14", 15, RoundingMode.ROUND_FLOOR); + t2("59591887481255758486.04419478394445992184038150", "4703540070912994338607753391.51553618", "2.8029283066942488985468816630836697194164252863314946121251268601762735534825267e+47", 80, RoundingMode.ROUND_FLOOR); + t2("95721039331714561128531.5388333857551", "55776353283228975465181218023408074000.0635473992531779", "5.338970506403567357128883289406493806727217099380238503907444806e+60", 64, RoundingMode.ROUND_CEIL); + t2("526585509414392639783563978.124078638369185164439406399142823206590", "87507182704426188499191996302912.695351138484022", "4.608001438182859346468676488909777512497686963711987878e+58", 55, RoundingMode.ROUND_HALF_UP); + t2("1329389548866606584.0219028742633681448", "82512404176983746737881954764.075223596979", "1.096911277647395278024698413191e+47", 31, RoundingMode.ROUND_CEIL); + t2("9700740614644246975635351274850205744655.57062922663780504", "2272806307120089287441.2888975497068890265", "2.20479044526994561155551002188480195431e+61", 39, RoundingMode.ROUND_CEIL); + t2("29511272033245325473630.9914233118168", "3652962711970478409731.7096578440", "1.078035763202623786222162267776426022008745922576294592360500109792e+44", 85, RoundingMode.ROUND_CEIL); + t2("14296983312767601794907267485.024743090402168607", "9785251609055993162691824779826.478", "1.39899578965905859019321727491823760297927041482177805249500602271527916358976146e+59", 90, RoundingMode.ROUND_DOWN); + t2("86375361639533439579498381796.1294234762451026", "906739120390293252717325255078545106.1444764334577910073347022", "7.83199194364240290638163189680542533845422404219e+64", 48, RoundingMode.ROUND_CEIL); + t2("740414973164848.916954686179490899", "134168713446.24554435393694302876451603", "9.934052436586419877500774282012701064743967970168529777534242152461097e+25", 92, RoundingMode.ROUND_UP); + t2("23606.18678792636558", "92428538816127859383.480160037586533528917526119290144", "2.1818853518286167136498581177678567e+24", 36, RoundingMode.ROUND_CEIL); + t2("535842268080888.29369988", "5.264688269022545313985", "2.8210425028118864751215030126668946919568218e+15", 76, RoundingMode.ROUND_CEIL); + t2("14658164987181989.82049386326834040499563407226202", "865918141679263984332567963156509.5151684", "1.2692770986128681e+49", 17, RoundingMode.ROUND_HALF_EVEN); + t2("32538525661800629274238615.58854", "4221257960257328197334.99687127737124932626496743934439", "1.3735351046e+47", 11, RoundingMode.ROUND_HALF_UP); + t2("9016577257202221469913.973970893892587089845961069", "717041984762.1704", "6.4652644522657274667472322240270365e+33", 35, RoundingMode.ROUND_HALF_UP); + t2("636458802810705.0625167255453931606640198", "1025500890675450.780096456096656042394836946", "6.5268906916060913799615494531479109e+29", 35, RoundingMode.ROUND_CEIL); + t2("79110380.399139564488282", "253618226821001.00507451769506062628335690320494776", "2.006383e+22", 7, RoundingMode.ROUND_HALF_UP); + t2("376873444696269355299365.4531356", "291637790197265810665.5250538930136484438850490707423377654", "1.0991053859525146161055022709845243436052743435939690299036572244868802096241063972718824e+44", 91, RoundingMode.ROUND_DOWN); + t2("736596301647821915390749553538601616524.5755259726118", "795142.3465487", "5.8569891175134317430817399167404057094937405736308106950045e+44", 59, RoundingMode.ROUND_HALF_UP); + t2("1834131571267152475321650.70965445617470881921005618405", "968157051313385666904.75179596420634009857645265066", "1.775727413758793219327376503051947507155974684643899649e+45", 55, RoundingMode.ROUND_HALF_UP); + t2("11467445190748986299.92690201609446082017", "523498237.024622524327463960286539476473502743517", "6.00318734053358048573196294397431136916711567368667712641480116428920771869736097033789e+27", 94, RoundingMode.ROUND_CEIL); + t2("1740.0", "674329600699095.9235720144834769329772751", "1.173333505216426e+18", 16, RoundingMode.ROUND_FLOOR); + t2("2073608914815968480642598159487130353638.403507", "8202785661188.8837288359362245881395096", "1.70093694733658676908209396165038634317062656908141094441774e+52", 60, RoundingMode.ROUND_UP); + t2("9408583565372039515608744.3684350485521856091581100947114429124279", "86796159427820718186657687754456418494.479528815877464198372228379", "8.16628919130005414007709894042072728383299297277052582630118037721442350956148223604782621526e+62", 93, RoundingMode.ROUND_DOWN); + t2("9724576927702863.00514157261352484328", "4521791471398152.5408432324329596777062957089914679067692", "4.3972509014642054571320962124e+31", 29, RoundingMode.ROUND_HALF_EVEN); + t2("150097.98671404890780338257994", "6793507639662.344499876512736846104161284", "1.01969181943982833972447444409226797605134869153468537641830978304296e+18", 88, RoundingMode.ROUND_UP); + t2("65118175343527.476611386886747972", "1.60950590", "1.048080874126420004181e+14", 22, RoundingMode.ROUND_HALF_EVEN); + t2("76805406.79668422897749934", "59816821233324078222364364762.2859557060466229096389", "4.59425528810999466160015772436770505992265745907144432659598870867010439e+36", 72, RoundingMode.ROUND_CEIL); + t2("1469386976133686530916720194473533.439610543942924779731287", "9728007344019623222764920709573063.7390426", "1.429420729503528940651228166512782815270522737997255826171601930012314473272257e+67", 79, RoundingMode.ROUND_CEIL); + t2("1884577993841445785992941888727.692681772714424110428791067182984298928", "71.215134629008945058285774463766", "1.3421047555028615218949107869049097752568550421115097800823629315e+32", 65, RoundingMode.ROUND_UP); + t2("61128482.374", "60842716563.57307948576466459526793664258319", "3.7192229270426548398064662836238579088e+18", 38, RoundingMode.ROUND_FLOOR); + t2("135566228123986394372179852820663.73785657", "50104554646753293.82010", "6.792485485292499562041458065250227993920664022431740601183057e+48", 72, RoundingMode.ROUND_HALF_EVEN); + t2("90.2842162098226193", "2945079612003223.425352321291", "2.658942044452395346683129106885849346127775163e+17", 64, RoundingMode.ROUND_HALF_UP); + t2("724.3046165965260324", "9336761295608.4424681600303811056430668100247918", "6.76265931046895657939393076121022270844330653566993116239809005432e+15", 82, RoundingMode.ROUND_HALF_EVEN); + t2("833948566289742156240.447936107644380531030033433244", "52191656593247958792015529.15", "4.35251571882257036361170975172568356720234605201463e+46", 51, RoundingMode.ROUND_UP); + t2("1416602871768308518575661680760149688.0812273123382771087180501509778144371482", "8988960023614.936525007233865813885234186518687317", "1.2733786583663441439087447509752725556340548704454166581566848096781678967647462456892205237e+49", 93, RoundingMode.ROUND_UP); + t2("9569593587222898608259132413.90668285543794", "657072004.304598929942955875345494864161946378604", "6.2879120387369867498747065845987464742501e+36", 41, RoundingMode.ROUND_HALF_EVEN); + t2("804334215574564.25044091930742448256033235093982", "55688438273971108617042699218.90358138209948168910", "4.4792116315667092377278387277247989195238061393700184267551514519131272798066909360107266e+43", 90, RoundingMode.ROUND_DOWN); + t2("9822620772475417727940129541187011947.820413104363741726", "6136578440346805045758.683005231", "6.02772828600753283057e+58", 21, RoundingMode.ROUND_HALF_DOWN); + t2("44262415003768171285.79666967441127542455960075662622", "914422146623526378080312597381.446639551542695668166751149", "4.047453254248707258604102371217281613039726579222140035456583290394e+49", 67, RoundingMode.ROUND_UP); + + t2("6.5E-29531627805496", "-7.57040630422451705434881571160179759007104791141306E+4365358659", "-4.9207640977459360853267302125411684335461811424185e-29527262446836", 50, RoundingMode.ROUND_HALF_EVEN); + t2("5.3E+21786", "-9.76622618786797236903307526753201665260894875109978140359393E+9182165", "-5.17609988e+9203952", 10, RoundingMode.ROUND_HALF_DOWN); + t2("5.5297665250143884700019985961183449464816737E+936", "3.3796232965687616E+296384166834", "1.868852777252471286480617523122074247881936133470334630428992e+296384167771", 76, RoundingMode.ROUND_HALF_UP); + t2("-7.215109376109932339E+2652105", "7.24526971652521943869742892785010739038924616963926462555E+8683476633", "-5.227541346414646235922676100980921283032916687496302068942616930332667066145e+8686128739", 79, RoundingMode.ROUND_HALF_UP); + t2("-9.216143958548530311990439475093217294778682871E+582983187", "7.249053792737130562632580435185577983561593615E+942549691138547", "-6.68083233171276158556289735538540890585083e+942550274121735", 42, RoundingMode.ROUND_FLOOR); + t2("1.60E+202", "-6.407128785144E-1033137", "-1.02514060562304e-1032934", 77, RoundingMode.ROUND_FLOOR); + t2("2.205199208254798821474950998902191375631503824848921578E-31040239", "-3.3880545460122022299262396676563823061715925772E+85847945", "-7.471335202390180221185936884296420222859699405817191352101605427e+54807706", 64, RoundingMode.ROUND_DOWN); + t2("1.6311190345265678763766E-58492573080", "6.121758534229122431000830E-83814471595", "9.985316869956583505381162042624971114851992578e-142307044675", 67, RoundingMode.ROUND_HALF_DOWN); + t2("-2.84605178661532285450011432239310046E+54783459678", "4.6E+23843514", "-1.3091838218430485130700525883008262116e+54807303193", 70, RoundingMode.ROUND_HALF_EVEN); + t2("8.5973457945E+50399024742915", "0.92286611262186515446807927209452702698", "8e+50399024742915", 1, RoundingMode.ROUND_CEIL); + t2("-9.37175614356322301483264262858817450955115571074774280431816E+820", "-5.8990551313492234E+5043468", "5.52845061684402398929718264606605040162316531044852111077181139889284e+5044289", 69, RoundingMode.ROUND_FLOOR); + t2("4.9309172981597834254716114236938809737852E+622197935770", "-90388850037180804810300832311714283089697161065337.1762604", "-4.456999442091054136760545232185631743357676415045555277342448095504338e+622197935820", 70, RoundingMode.ROUND_HALF_DOWN); + t2("-4.5318175283930901279E+257711762470", "-9.526792268847312998999055E-689170", "4.31736841933220293960040853567839111019291345e+257711073301", 46, RoundingMode.ROUND_HALF_UP); + t2("-5.8485208434582231935912884487991260791234986391206618078774E+704265708232", "-3.97E+84344039281604", "2.32186277485291e+85048304989837", 15, RoundingMode.ROUND_HALF_DOWN); + t2("8.948010032343111803060117863693331060830530240250993E+9216", "-4.295014E-23086885468", "-3.8431828361054117997708449066212948612901979009e-23086876251", 47, RoundingMode.ROUND_HALF_UP); + t2("3.185756757125125107816323513488886171902174516738662E+42054157", "8.06908950729962831216038361716544465020833388684669454928E-96447250096", "2.57061564217272374136338781469713519e-96405195938", 36, RoundingMode.ROUND_UP); + t2("5.2525916740929835502942298722584732448E+345", "4.71657145142231465197216614165779608834340065610E+79402", "2.4774224e+79748", 9, RoundingMode.ROUND_CEIL); + t2("-3.89225344424E+408", "6.89051755046380019455784229458968806687E+300417053593", "-2.6819640668388894316706943776e+300417054002", 29, RoundingMode.ROUND_UP); + t2("-2.62899171772083482619619847446355938432108410955548082905E+1194534854298247", "5.4889047121379790783170218428373272345901598058E+62770973956", "-1.44302850275696100321962196928350139526413e+1194597625272204", 42, RoundingMode.ROUND_CEIL); + t2("5.147388379257214801014394E+145685", "-871451.36315899031142129000758349639107634751903849", "-4.4856986198124456473522012534585768386213060847482824297e+145691", 56, RoundingMode.ROUND_FLOOR); + t2("5.38114319975281081541720E+25890582551835", "-5.3746836395492276642812193294683520289555634332372353098E-8388", "-2.8921942317783013844648076943183991700501029553856777114332710316463890058e+25890582543448", 74, RoundingMode.ROUND_HALF_DOWN); + t2("280871964076135618401817180457296.105266734468", "-7.887061633E+4000357553507", "-2.2152e+4000357553540", 5, RoundingMode.ROUND_DOWN); + t2("-8.88835887E+968", "-4.342636646908781652776E+7024535543", "3.8598912959e+7024536512", 11, RoundingMode.ROUND_FLOOR); + t2("-8.049E-677401925027", "6.1906233944265068994375629680216267831565782872875620E-914837747587860", "-4.9828327701738954e-915515149512886", 17, RoundingMode.ROUND_HALF_UP); + t2("8.8474201258056282592641810954E-3218", "6.734889818647060851595E+350385282", "5.95863997265814241e+350382065", 18, RoundingMode.ROUND_CEIL); + t2("69.4226", "9.3E+8893414103", "6.4563018e+8893414105", 21, RoundingMode.ROUND_CEIL); + t2("5.4496200747276662620115235573674567E+73497054", "6.1324122147419595938364630799329435142211E+9270", "3.34193167119629312060831661097219240448232664069e+73506325", 48, RoundingMode.ROUND_HALF_EVEN); + t2("-6.40155938120572162197123643404406239443989352196681E-16271723479128", "-6.5302607079733794046998E+622547", "4.1803851696846104251167518538e-16271722856580", 29, RoundingMode.ROUND_HALF_EVEN); + t2("-6.885314662857499063218876897969991960E+325601", "5.612724023214075E+86455290745927", "-3.86453710156084e+86455291071529", 16, RoundingMode.ROUND_HALF_DOWN); + t2("3.0116477E+34906110890763", "-3.2736027840035761593873554881121013808939467419E+967771967043", "-9.85893829515796693219376256485518746593607864916562863e+35873882857806", 57, RoundingMode.ROUND_HALF_EVEN); + t2("2.17214889901473709634572E+85", "-9.67073449015503646158535438556730E-6375241745195", "-2.1006275275454107335252775478289115070676115032739126956e-6375241745109", 69, RoundingMode.ROUND_DOWN); + t2("3.05540807398194033E-3214459", "-261138589.704559597740507442041713439449886297801317961162239", "-7.978849554115685928e-3214451", 20, RoundingMode.ROUND_HALF_UP); + t2("-8.73781828060529448236834604892444E+1948580683", "9.478856719915468792231243799601849139374345738197715542E+816680159268", "-8.2824527526515722939252636246780210601567507e+818628739952", 44, RoundingMode.ROUND_FLOOR); + t2("7.7347070256738760192372923810083E+84912757", "-4.2406171585544227861811736221460633E+9292884376073", "-3.27999313294640829790116089024e+9292969288831", 30, RoundingMode.ROUND_DOWN); + t2("-3.0733080745642545872718080859554759E+853", "5.68364318456656220657503596215363350177814066E-2744", "-1.746758649207050956e-1890", 20, RoundingMode.ROUND_UP); + t2("2.03705113002970753490764690580603012081557995076025852E+2111662", "7.47470103253575010872293625E-75867326361147", "1.522634818496117146621996031155706488957762e-75867324249484", 43, RoundingMode.ROUND_FLOOR); + t2("6.25088801982750097072E+47381290", "6.260997127481331024451319844070682924210806197112221662E+20202191389", "3.91367919363474489475816842734494993064509e+20249572680", 43, RoundingMode.ROUND_FLOOR); + t2("1.8386551234237034678148677060345720766015066E+99289792", "-3.87113785421249924946369380501607446425E+41011861525864", "-7.1176874491272534089e+41011960815656", 20, RoundingMode.ROUND_HALF_UP); + t2("1.38458076206162843942007838321318483E+79178", "7.004377933941450094882084405E-469164", "9.69812693754430751693405317027143365258271565595283814892557615e-389986", 64, RoundingMode.ROUND_HALF_DOWN); + t2("-7.119393156946169853E-72", "1.265962432255999E-4035270019", "-9.01288427715428840897403e-4035270091", 24, RoundingMode.ROUND_HALF_EVEN); + t2("-3.437088094735134294557167180255176212E+310798354", "-6.435557845E+3482", "2.2119579252028797e+310801837", 17, RoundingMode.ROUND_UP); + t2("-3.63207504408171609E+49", "5.4E+791", "-1.961320523804126689e+841", 19, RoundingMode.ROUND_HALF_DOWN); + t2("-2.9337943909355522329992160E+5647", "-6.5698889458878729147799E+9345147230723", "1.927470333851532940029648358486997805615152e+9345147236371", 43, RoundingMode.ROUND_UP); + t2("-9.825189421836013013446677052993363359583686659522658576464E+214238", "3.1167194089935487908886238094518859573877028160573683E-1674069356", "-3.062235856807440582266669090472515057931733248188221626404165573423007123931154e-1673855117", 79, RoundingMode.ROUND_HALF_EVEN); + t2("6.701E+105916", "-2.9124960E+549610078769", "-1.9516635696e+549610184686", 42, RoundingMode.ROUND_FLOOR); + t2("-7.40176744979E+1287276", "-6.6621168863945191094436595132729850692936897900365488E+46321370603", "4.9311439916411254856540217581243655352446700713738186362268884752e+46322657880", 65, RoundingMode.ROUND_HALF_UP); + t2("-8.918808885384742806671174747057876288E+1763712", "-8.4003738391593512440070605769E+519969", "7.4921328837247966213851255141437e+2283682", 32, RoundingMode.ROUND_HALF_DOWN); + t2("-3.7686243415791453304045387688224491933692808778079206E+44709492667151", "-1.2034E-5043203242", "4.5351625326563434906088219544009353593e+44704449463909", 38, RoundingMode.ROUND_HALF_EVEN); + t2("-3.73617288560281657918403493772051287946683185728289195426E+40547204", "9.09299795858826904406959462172327565978E+5650677840859", "-3.397301242172e+5650718388064", 14, RoundingMode.ROUND_UP); + t2("6.6139595744581450285013546686588487999358280258473489135157E-487794055832976", "-7E+4", "-4.6297717021207015199509482680611941599550796181e-487794055832971", 48, RoundingMode.ROUND_FLOOR); + t2("7.122494472899604291456470028972764307537690E+86322342278", "-3E+1760346883093", "-2.1367e+1846669225372", 5, RoundingMode.ROUND_HALF_UP); + t2("9.20244792087162415396453576827457005169120E+5505945075536000", "-3.0467106491328930959906654469939666873099077467288E-2478440", "-2.8037196078610428466706859e+5505945073057561", 26, RoundingMode.ROUND_HALF_UP); + t2("-4.2210567526544976259E+4894", "3.438532765228373515E-336", "-1.45142419478909683e+4559", 18, RoundingMode.ROUND_DOWN); + t2("-6.080608056763958537E-31157141012336", "4.334297565996549", "-3e-31157141012335", 1, RoundingMode.ROUND_HALF_EVEN); + t2("7.883004787674E+8779715347958007", "-921.70034886657814134977171", "-7.26576826291603e+8779715347958010", 15, RoundingMode.ROUND_HALF_UP); + t2("5.91772672038197692527032654433656382886965570170756E-89763905502", "-9.0334397331315328187687100039496402783511598435173E-202357244", "-5.34574276858e-89966262745", 12, RoundingMode.ROUND_UP); + t2("8.900645799548909690567378674595525119476386279449E+255774", "-8.0444476449172836295159734562448874581293287939393E+66042757854", "-7.161e+66043013629", 4, RoundingMode.ROUND_UP); + t2("-8.6571251689720182468117989629379E+9159", "7.611106265318014710E+780290", "-6.5890299613205204838047936743611716e+789450", 35, RoundingMode.ROUND_HALF_UP); + t2("-1.7984545186344306693549101522157541837E-917606295901073", "-7232.0662832789693446638147979317054765022674381", "1.3006542286226774925213890694854050997935879322232583835511086817132288e-917606295901069", 71, RoundingMode.ROUND_UP); + t2("3.93376256147804658481293736906817781406191858E-65", "-6.656937808682576075290362554936275884361331520701419389E-8", "-2.6186812725883224882764369964078206661107579995874900802848345679822097e-72", 71, RoundingMode.ROUND_HALF_EVEN); + t2("-2.149465816E+138929948944", "-5.3564207E+5348703457899", "1.15134431907647912e+5487633406844", 28, RoundingMode.ROUND_FLOOR); + t2("-3.907039034448406782015263428840879901203E+9290", "1E+663831925636", "-3.90703903444840678202e+663831934926", 21, RoundingMode.ROUND_HALF_EVEN); + t2("-7.82223549399761698791698178E-919496", "5.53809624E+91915361", "-4.3320293e+90995866", 8, RoundingMode.ROUND_HALF_EVEN); + t2("-4.19099109E+4089647656", "-1.43145673878838054505158894395674407848872E+7076667342352", "5.9992224379825602598405528544652237783564861855048e+7080756990008", 66, RoundingMode.ROUND_DOWN); + t2("-5.802857724249977226294028100855E+871547605739", "5.20449511615117743E+5690760994601587", "-3.020094468557914235476625626549626251681504e+5691632542207327", 43, RoundingMode.ROUND_UP); + t2("4E-8936", "-3.22895995617131E+34234648485434", "-1.291583982468524e+34234648476499", 40, RoundingMode.ROUND_HALF_EVEN); + t2("-7.953379574720339939529752388993716753357E-5897640545407698", "-2.1435069248172166445581105664823131091862E+11821042971984", "1.704812419411285819296573417363126788538469760437851287104393447367e-5885819502435713", 67, RoundingMode.ROUND_HALF_UP); + t2("5.67782008866580006E+2921497710982648", "9.688225096E+734", "5.500799907358494929821030576e+2921497710983383", 32, RoundingMode.ROUND_CEIL); + t2("-1.728733127756E-79731512", "-7.889132849919685715481982705286213652596121410E+4699", "1e-79726812", 1, RoundingMode.ROUND_HALF_DOWN); + t2("-4.9836647991068250676308837296998E+922121312998", "-7.60834026532646E+7355690366", "3.7917417559934560408683814949787143004844796708e+929477003365", 58, RoundingMode.ROUND_CEIL); + t2("2.4982203873996828522277329301572638926631985424012E-3815", "-2.5580928311960989136422623079192392842789047480248298863087E+685426605", "-6.390679663755069739965425483586e+685422790", 31, RoundingMode.ROUND_CEIL); + t2("-9.7843293258078674946E+9239504969564", "8.5890260078605815715619211042880714715553E-7488929054", "-8.4037859048836763704212458654338820758118494765563615e+9232016040511", 53, RoundingMode.ROUND_HALF_UP); + t2("-7.829133199E+5762753132198", "8.027889595535365452740321008248481E+359616502666", "-6.285141695031261184e+6122369634865", 19, RoundingMode.ROUND_CEIL); + t2("6.27289905593802746267813935E+570495764671", "-2.42029231362653838655130568984805190880E+4260", "-1.51822493692419769258094154e+570495768932", 27, RoundingMode.ROUND_HALF_EVEN); + t2("5.363251073667271291029867925788675949578386538E+986", "-3.8752025558244767725520E+6211388097", "-2.0783684268203778862480333396069739245562284880933e+6211389084", 50, RoundingMode.ROUND_HALF_EVEN); + t2("-5.0921572620E-179495053", "-2.17281705489243865721978013228374867125793627E-18123325", "1.1064326145067984137251232130652011441e-197618377", 38, RoundingMode.ROUND_HALF_DOWN); + t2("2.640239980359011041435877846577641E-38944729", "9.1525829297073555250734671538673311020732775E+9014", "2.41650153745647680867953360872951849287048542676198601043244628359929750883775e-38935714", 80, RoundingMode.ROUND_UP); + t2("-1.93663758006380022987687898502055761E-7", "1.2996882897952E+45032", "-2.517025184386235235273221471499519318855176701472e+45025", 79, RoundingMode.ROUND_CEIL); + t2("-7.79624787528536087470E+522844", "7.86052E-36308048613", "-6.1282562348638084862796844e-36307525768", 48, RoundingMode.ROUND_UP); + t2("-8.6916130130673447148591023E-35071865871144", "-9.9238734332603261512468E+827", "8.625446747255875821946163029823367918470147374764e-35071865870316", 78, RoundingMode.ROUND_CEIL); + t2("4.00947946956450859933153631898545750457438090160657404600478E-80256665343425", "-5.432347705196059882178310037458406326102535813834E-896670", "-2.178088659551947371143060643834448e-80256666240094", 34, RoundingMode.ROUND_CEIL); + t2("8.5237189533806E+1584254", "5.559104516659139407296405310312455019209323151352988851E+4168669121525932", "4.73842445324712059856820248906971310602994071998002270539e+4168669123110187", 57, RoundingMode.ROUND_CEIL); + t2("-9.5567131066523154803423960119663705401544923465878340E+923201", "7.231731765301542236921134645986541738098510067263E+891", "-6.9111585745251135317786803544757506203200056995334205874878457e+924093", 62, RoundingMode.ROUND_UP); + t2("-1.168262681298989991628574470330473680056939158E+2839315483445591", "-8.3276E+15", "9.728824305e+2839315483445606", 10, RoundingMode.ROUND_HALF_EVEN); + t2("-6.0781541404E+3894398400574661", "-3.5551844886168367843114091243483844694E-468799752342", "2.160895931937228316971341313211647151473466710376e+3893929600822320", 70, RoundingMode.ROUND_HALF_DOWN); + t2("-9.930650769E-29", "6.8663587981084446829E-201686", "-6.81874112786655419357e-201714", 21, RoundingMode.ROUND_UP); + t2("-7.335392379743827850E-8", "-2.7319376535378854572592620827E-2770314405323726", "2.0039834645697038682119651541820671550861263195e-2770314405323733", 79, RoundingMode.ROUND_FLOOR); + t2("6.526581741082787243991555642172262538786965980061353690513E+139613898", "7.27127468783930012341873509649266453712072899934263E-36", "4.7456568612049419e+139613863", 17, RoundingMode.ROUND_FLOOR); + t2("-4.22121443693737169738781063964E+56886231777", "6.46514882556814689849853E+284324335", "-2.72907795594369551182e+57170556113", 21, RoundingMode.ROUND_HALF_UP); + t2("-4.2756487463198090289095525688E+2144035393917", "-553.0796", "2.36477409835506144978568377093087648e+2144035393920", 65, RoundingMode.ROUND_HALF_UP); + t2("7.6896692111943855791178991668625756180248214081981494E-71512989309591", "9.182346838994448110268897241888100554017096E+9110", "7.060920977432369764143121866773047198394810733518419151011992e-71512989300480", 61, RoundingMode.ROUND_HALF_EVEN); + t2("2.180820361230329375484504788788352570472611566909E+490568502", "-8.7402170748877831954755703095889597E+1636791723110", "-1.906084335848826812330467513562092591013488107727e+1637282291613", 49, RoundingMode.ROUND_HALF_EVEN); + t2("7.029746564122600884257343821598015E+1986035361995620", "5.97888721757E-11321809790574", "4.20300618749892448e+1974713552205047", 18, RoundingMode.ROUND_HALF_UP); + t2("8.9082309066978726571172660992155288568183961846110E+92966609287793", "-6.372745936836552863893242035962375E+720", "-5.676989231506066923271e+92966609288514", 23, RoundingMode.ROUND_HALF_DOWN); + t2("7.89339268979572378738067183817058284E-34354", "9.40407207779209729787E-5641331923", "7.423003379315622392352526e-5641366276", 25, RoundingMode.ROUND_FLOOR); + t2("-8.67452009658410368432993084472027446790739575E+52640", "-1.9127802223015687601128496484168401815516501946271396043E+68866409", "1.6592450478703567557084487969287833435458577809040885135e+68919050", 56, RoundingMode.ROUND_DOWN); + t2("3.78899780037211610061450014794833157E-25", "-1.781198215051115462248321974621842099810242322885821E-178", "-6.74895611886e-203", 12, RoundingMode.ROUND_HALF_DOWN); + t2("-2.155154073630209625200311251540E+1729442981108", "8.57370176906083278450588440893E+43217803528", "-1.847764829368198853875886103937513376099415878e+1772660784637", 46, RoundingMode.ROUND_HALF_UP); + t2("-7.573356931092417337447861170640744225137419531155902692733E+650708627", "-6.153212613277891964490791934374476575722515426852119022E+839147072", "4.6600475393253e+1489855700", 14, RoundingMode.ROUND_HALF_DOWN); + t2("9.9485070330656474601543085707824827201303972914296E+50365383", "-8.339564668921734296294E+51651946540", "-8.296621776147366141255e+51702311924", 22, RoundingMode.ROUND_HALF_DOWN); + t2("-9341189.1143291483367810197661330685131503844231817233", "-5.2902655709146386768479917571509005451E+361", "4.94173711629380999452122697321630573180513697514816e+368", 51, RoundingMode.ROUND_FLOOR); + t2("-3.94205311338658631286509556625817971E+16157", "-9.211465098548013710604889811533128813247447560316297E+50484508", "3.6312084670583075556389877785380186469268808582939e+50500666", 50, RoundingMode.ROUND_FLOOR); + t2("3.80682239719999E+9108569", "1.2570378527E+23171863693", "4.785319851787e+23180972262", 13, RoundingMode.ROUND_UP); + t2("-9.4785667878741097620937182099167353179206477903295E+319318083141787", "2.18914651047879948228632460987022499797894573E-77622588673349", "-2.0749971408014850575894868085e+241695494468439", 29, RoundingMode.ROUND_CEIL); + t2("8.9667725561135595682395580714154E-986", "1.1512563831473418E+8027419170", "1.032305414145614153439488817400778841194507358372e+8027418185", 60, RoundingMode.ROUND_HALF_DOWN); + t2("9.3824406374705879422603687090411415559E+28598052", "-3.50433070520586E-7746996567809884", "-3.287917481565942409009547240550780296503505331019e-7746996539211831", 49, RoundingMode.ROUND_CEIL); + t2("5.99E+13791044512809", "1.96046646889916754612071635552249438783E+248238115", "1.1743194e+13791292750925", 8, RoundingMode.ROUND_HALF_EVEN); + t2("3.064300584181522300878161202335034438E+404457", "6.0535215816314153102435315312283077826829E+77415331", "1.8549809718948598773839134903222460170305454724434488707237125796507991534e+77819789", 74, RoundingMode.ROUND_HALF_EVEN); + t2("5.81262639194966973950354535185905205219806501541037262161E+671621", "1.9031000617961150495272884354716297026994E-903289894955222", "1.106200964571714573808968647523e-903289894283600", 31, RoundingMode.ROUND_HALF_UP); + t2("9.5476838756708013471774773695351827963819089787235895E-8", "-8.408E+5139037", "-8.02769260266400977270682297230518169519790906931079e+5139030", 51, RoundingMode.ROUND_HALF_DOWN); + t2("-6.6E-7463867943633", "-1.4807684717021055514852E+387367", "9.77307191323389663980232e-7463867556266", 48, RoundingMode.ROUND_DOWN); + t2("-8.55084718716151381E+822668", "-9.9175121266567279254154973093072804774E+8063", "8.4803130671862884864960981662863480992266774404443492894e+830732", 62, RoundingMode.ROUND_CEIL); + t2("5.3373715876357243785148742308551E-56952990", "-6.5179989919672330632712640299738175964123E-41295149", "-3.478898262796420184523996e-98248138", 25, RoundingMode.ROUND_HALF_UP); + t2("6.971459479802497597082438607792354091586831018306743480E-761", "-6.033E+216403", "-4e+215643", 1, RoundingMode.ROUND_HALF_DOWN); + t2("1.777384386455398193216E+2597299297574", "-6.084886935E+523988312", "-1.08151830316154434261226e+2597823285887", 24, RoundingMode.ROUND_DOWN); + t2("-4.6521500157722287061856841778E+9887292058", "-2.83437170876054177504354221116689924238706435361497611914E-55276141643", "1.31859223896147132476824015424548234299417761151369391782106971716610693e-45388849584", 72, RoundingMode.ROUND_HALF_EVEN); + t2("7.5265257980887835089498587251138470751028760392372286407E-2808031", "-9.1E+5942", "-6.84913847626079299314437e-2802088", 24, RoundingMode.ROUND_HALF_UP); + t2("6.124447659875137256913380088076116744534502046E-3221", "-445.129416206308926513928576593405597136836057165908670", "-2.7261718114263147022892763710281790800347767629059444299404749637586549e-3218", 72, RoundingMode.ROUND_FLOOR); + t2("-2.343998818E+1337502807076880", "9.28276989128108540103161939E+41", "-2.1758801652928852685775171e+1337502807076922", 26, RoundingMode.ROUND_DOWN); + t2("6.30E-742321395", "3010721501699960.4", "1.896754546070975052e-742321379", 32, RoundingMode.ROUND_HALF_DOWN); + t2("-8.19473472459505835840696858E+57148564414539", "-3.072155949788976057941148086E+91051363", "2.517550304110703465066659165e+57148655465903", 28, RoundingMode.ROUND_DOWN); + t2("8.30776117642162743211570060628744719866432894004311519342327E-33426", "-7.32744736817205E+483785", "-6.08746827675725878961361300787124655166036655e+450360", 46, RoundingMode.ROUND_HALF_DOWN); + t2("2.7724010038502924E+11725", "-4.7556689139834608E+928358674281", "-1.318462127110737658180757284393792e+928358686007", 40, RoundingMode.ROUND_HALF_UP); + t2("5.9091700317147668794795218E+666897567", "8.3938478805437150E+1881334366773516", "4.9600674346481433119807194038219992195487e+1881335033671084", 45, RoundingMode.ROUND_FLOOR); + t2("-4.3691580894245294496446636805158600484074460956643847E-89474019484498", "-4.480405454599623134150719643985041E-85297159512", "2e-89559316644009", 2, RoundingMode.ROUND_UP); + t2("3.9841406473800271259191727447172370183389231944900E+7162819378682783", "-1.1756652068301468200152428806523472381832E+26219282019", "-4.684015538242e+7162845597964802", 13, RoundingMode.ROUND_HALF_UP); + t2("-108.838392673073428475338591374657485576815", "4.7679792205854258775825803754367415273006845283282054E-2392128538985014", "-5.189391946671311e-2392128538985012", 16, RoundingMode.ROUND_DOWN); + t2("-8.204662794316848196358517032121883095398020430371494E+4174", "-9.24067E+76425280674697", "7.581658134355986962264425758321772146315162545032095346098e+76425280678872", 77, RoundingMode.ROUND_HALF_EVEN); + t2("-1765008726556704110068716.971202764152", "-6.181972151135587E-438453547492", "1.0911234794084831168999690852448e-438453547467", 32, RoundingMode.ROUND_HALF_UP); + t2("4.2855951384E+6786330", "-8.467571964460057801596728600265E+803863", "-3.62e+7590194", 3, RoundingMode.ROUND_CEIL); + t2("5.931102910248257260028749055698492591626238811283040E+2994979930", "4.74554276498454773524121438E+4419395108969865", "2.81463025041074126217073937975121544226291777930659827735640858625099754981152e+4419398103949796", 79, RoundingMode.ROUND_HALF_DOWN); + t2("-3.252331914843376239065836709279067E+94440233387625", "-2.3623795146812686712069E+77052063", "7.6832422905700963877126387159924969901297229583598e+94440310439688", 51, RoundingMode.ROUND_HALF_DOWN); + t2("3.0492122248920255558204E+853564085", "-8.08984113814203797323E+830247744", "-2.46676e+1683811830", 6, RoundingMode.ROUND_HALF_DOWN); + t2("5.3E+3001536064", "-5.1284719857135251986348941516094288300538120647569E+8250887721405", "-2.7180901524281683552764939003e+8253889257470", 29, RoundingMode.ROUND_DOWN); + t2("-7.232364520576269255230605598E+13647", "-5.0920968774E+8733763326721", "3.68279007914449687231013903824867596852e+8733763340369", 43, RoundingMode.ROUND_HALF_UP); + t2("-4.570347590158040638E+2740239393431", "2.07889215232397404562727100828808310398753938E+677467169443", "-9.50125973857233712074162213187e+3417706562874", 30, RoundingMode.ROUND_HALF_EVEN); + t2("4.5448270760346241610118429522193090232405670818152E+841009", "-2.422423171496393324796293931481383527700912094875E-7804254834", "-1.10094944194304741888085692195231316338573093706e-7803413824", 48, RoundingMode.ROUND_HALF_DOWN); + t2("4.22383351811211262345546887870844027467352195456471978E+2536981668011", "9.68288662066799336541944E-58", "4.0898901060456795748e+2536981667954", 20, RoundingMode.ROUND_FLOOR); + t2("-7.98E-5131801232", "-6.46961274175379599674705810329589944472E+51197530481496", "5.162750967919529205404152e+51192398680265", 25, RoundingMode.ROUND_DOWN); + t2("5.406750087593579807470489668413180550069465120969E+49446063043777", "-14357.71569753219", "-7.762858060527588408725771461418996736206026436467e+49446063043781", 49, RoundingMode.ROUND_HALF_UP); + t2("8.767284916129139715662943977492089255922416046307300E+93918407846859", "7.70727619934705517543277570E+843", "6.7571886366976561345510962397291254226922e+93918407847703", 43, RoundingMode.ROUND_FLOOR); + t2("1.7215714164903441106850793864502663758372E+73233827435817", "3.40448860214041361777E+24287921", "5.861070265212103438724011835488590426212729427605887764547044e+73233851723738", 78, RoundingMode.ROUND_FLOOR); + t2("-4.5628487502792802885938754300464085807968592197376E+6353199536", "99369621.8217038874", "-4.53408554744886282e+6353199544", 18, RoundingMode.ROUND_DOWN); + t2("-7.278632E+684731572310999", "-1.70098296173502667080983368271858703080836592E-67129927", "1.23808290167393406470099213577133545572e+684731505181073", 39, RoundingMode.ROUND_FLOOR); + t2("3.62481321880718463782470515258531161626837808157570536E+135011330", "3.70907770474907003605508735070520261968241E-9929696201", "1.3444713893757440983671783972567382e-9794684870", 35, RoundingMode.ROUND_HALF_EVEN); + t2("-0.000814586801311722298757051", "-4.6011129412495143332669917195124045818036E-4163600013", "3.74800587328641232642672141632691e-4163600016", 34, RoundingMode.ROUND_HALF_UP); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToBinaryTests.cs b/DecimalSharp.Tests/BigDecimalToBinaryTests.cs new file mode 100644 index 0000000..9fbc337 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToBinaryTests.cs @@ -0,0 +1,380 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToBinary")] + public class BigDecimalToBinaryTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToBinary() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).ToBinary()); + }; + + t("NaN", double.NaN, 20, RoundingMode.ROUND_HALF_UP); + t("NaN", "NaN", 20, RoundingMode.ROUND_HALF_UP); + t("Infinity", double.PositiveInfinity, 20, RoundingMode.ROUND_HALF_UP); + t("-Infinity", double.NegativeInfinity, 20, RoundingMode.ROUND_HALF_UP); + t("Infinity", "Infinity", 20, RoundingMode.ROUND_HALF_UP); + t("-Infinity", "-Infinity", 20, RoundingMode.ROUND_HALF_UP); + + // Integers + + t("0b11111111111111111111111111111111", "4294967295", 32, RoundingMode.ROUND_HALF_UP); + t("0b100000000000000000000000000000000", "4294967296", 33, RoundingMode.ROUND_HALF_UP); + t("0b100000000000000000000000000000001", "4294967297", 33, RoundingMode.ROUND_HALF_UP); + t("-0b11111111111111111111111111111111", "-4294967295", 32, RoundingMode.ROUND_HALF_UP); + t("-0b100000000000000000000000000000000", "-4294967296", 33, RoundingMode.ROUND_HALF_UP); + t("-0b100000000000000000000000000000001", "-4294967297", 33, RoundingMode.ROUND_HALF_UP); + t("0b0", "0", 1, RoundingMode.ROUND_HALF_UP); + t("0b1101000100001000000110100100011100000101001", "7182272837673", 43, RoundingMode.ROUND_HALF_UP); + t("0b1100", "12", 4, RoundingMode.ROUND_HALF_UP); + t("0b101001110010100101010011101100111001101001100111101111111000101011011111000010011111", "12630360807685587318206623", 84, RoundingMode.ROUND_HALF_UP); + t("0b11111001010110010000011011010110111010011011110010100101011010010000111011110110011011011100001110000001110010101000001101", "5178750376444939350710857550952606221", 122, RoundingMode.ROUND_HALF_UP); + t("0b100110", "38", 6, RoundingMode.ROUND_HALF_UP); + t("0b101010011010001001110001110111110010010100011100110100001101101110100100001101001", "1602153026925525548353641", 81, RoundingMode.ROUND_HALF_UP); + t("0b100100101111011101011001111110000010001001100010101110000010010011111100100011110010001010000110100000010111011111110", "95386528077312833528510117745536766", 117, RoundingMode.ROUND_HALF_UP); + t("0b111111101111110011111000011001110101001101110000000011000", "143545575800234008", 57, RoundingMode.ROUND_HALF_UP); + t("0b111011100110001111100001101100100100", "63992372004", 36, RoundingMode.ROUND_HALF_UP); + t("0b101111111110", "3070", 12, RoundingMode.ROUND_HALF_UP); + t("0b1010001000100010110011010000100001000001111010001100001000000001011001110100101110101000001010001110101011100111111100100001010010110010000011001000110101100011100000110001", "3791391092894496185657389426598978260806574313715761", 172, RoundingMode.ROUND_HALF_UP); + t("0b11011011001101101111100101010011000101000100", "15064322355524", 44, RoundingMode.ROUND_HALF_UP); + t("0b10000010110111110100000101001001001011110100001100011111011011000110110011100000000101101", "316429297174908011263148077", 89, RoundingMode.ROUND_HALF_UP); + t("0b10010111000101010011011101101001010010011100110100111100001", "340208393737103841", 59, RoundingMode.ROUND_HALF_UP); + t("0b111111100100110000000000001000101001001001101101011000001011100001010001100110111110010111111101000100000010001001111000111011111000100101000100000100000001111100011011101011101000", "1522300117779563676992926268294212750701795813499189992", 180, RoundingMode.ROUND_HALF_UP); + t("0b111111000111011011001001111100100111", "67770294055", 36, RoundingMode.ROUND_HALF_UP); + t("0b100110111011000001111100110000100110011010001010000000100000011101101011110100000100010110011101001000010000100101010101010011111010110100011101", "13562459849657731179062132755251654390951197", 144, RoundingMode.ROUND_HALF_UP); + t("0b101100010010", "2834", 12, RoundingMode.ROUND_HALF_UP); + t("0b1111111011110011111100001011100110001010100001111100110011010001101011000001000000001100000011101000111101100011000110111111110111111111111111010101011", "2842819740151363791267849959009928040708832939", 151, RoundingMode.ROUND_HALF_UP); + t("0b100110100000100110110110010101000101011000001100010101011110100101000010101001100000001110111010100101010010", "195266285040805814110355923380562", 108, RoundingMode.ROUND_HALF_UP); + t("0b11111101111011111000010011100001100110110110000101100", "8934565388446764", 53, RoundingMode.ROUND_HALF_UP); + t("0b111101011111010111100011011101010001111100010010110111101111010111011010000", "36297363457553334775504", 75, RoundingMode.ROUND_HALF_UP); + t("0b1010111000111110100011011011100101010011110000101011000000010000010011101001010001111101111001110000010100010000111100100110001011001011110010100010111010010010100", "7958075089772384277251993017934409136873707500692", 163, RoundingMode.ROUND_HALF_UP); + t("0b11101000111010011101011001100100101001110111101110110100011001011111101111100100111011111100010011101111001010001100", "75584728662217792152893436906631820", 116, RoundingMode.ROUND_HALF_UP); + t("0b10011010111100000001000010101000111000100111", "10647241395751", 44, RoundingMode.ROUND_HALF_UP); + t("0b1101001000000100000001010101100110000010101111011111001011110100000010011011101011110011000111101001111001101110110011000101001101100111011111111111011001111010000000000", "613876598207563084074184752663166261629198587982848", 169, RoundingMode.ROUND_HALF_UP); + t("0b1000100010101010011110010010110101110000011100110", "300531517677798", 49, RoundingMode.ROUND_HALF_UP); + t("0b10100001111011110000000110100110101010010101001001111011110000101000110111000010000000100010111011", "200464110595405607835630307515", 98, RoundingMode.ROUND_HALF_UP); + t("0b101001100001010001110111111101100110001101100111011011101110000011111111011100", "196072603810916493443036", 78, RoundingMode.ROUND_HALF_UP); + t("0b111000100110111111111101111111100010111000011111110101000111011000110010110000100100010110010100101000101000111100010011110101010011101110011011100", "157803884622143105853315584471057717069995228", 147, RoundingMode.ROUND_HALF_UP); + t("0b110110010011000000100001111100110101001101010111100100111001000111000001011100011001111011010100100000010100101101110000110010", "72173098483072489213930426080106306610", 126, RoundingMode.ROUND_HALF_UP); + t("0b11010011001001100111100101011100111011011110100100", "928648793405348", 50, RoundingMode.ROUND_HALF_UP); + t("0b10110011010100010000101111100010111", "24067464983", 35, RoundingMode.ROUND_HALF_UP); + t("0b1011010001011000101010000000000110111101010000111101010101000011001110001001011101011100001101101110011011110101101010011000100110101111", "61368670450547755504412274420309228620207", 136, RoundingMode.ROUND_HALF_UP); + t("0b1000011111100010111001111100000100000000111001111111100100011100110101001010011010100111110100101001000100101000100010100000001100111001001101001110011111100000000111001010010111", "203364476148734435560803274724374642023080004086166167", 178, RoundingMode.ROUND_HALF_UP); + t("0b11011010100100111010010", "7162322", 23, RoundingMode.ROUND_HALF_UP); + t("0b10000100100110110001000101100111011100111010011011001101110010111100101111001001100001", "40077624010777577544413793", 86, RoundingMode.ROUND_HALF_UP); + t("0b111", "7", 3, RoundingMode.ROUND_HALF_UP); + t("0b100100011011111000010110101011000000011101100010001110110111", "656366019324289975", 60, RoundingMode.ROUND_HALF_UP); + t("0b1100", "12", 4, RoundingMode.ROUND_HALF_UP); + t("0b100001010110000111111010000011000100111100000100011111011011010010110110010010100101001100001101", "41279952929416973510169481997", 96, RoundingMode.ROUND_HALF_UP); + t("0b10101010101111010010000111011111110100001010110000111101100", "384469593819013612", 59, RoundingMode.ROUND_HALF_UP); + t("0b101100000001000100101100001000111011100010100111001101110011001101100111001001001011010010110010111010011111110100110100110101100001001101110100011100000100011", "502582666714640400473511879468920658557790730275", 159, RoundingMode.ROUND_HALF_UP); + t("0b1000101011", "555", 10, RoundingMode.ROUND_HALF_UP); + t("0b101011100101101001010111111110010111011010010100010100110101000001001101111111111111010111000110111010001010101100101101111001110111001101000010101110001010111011010", "31852131995136650015824448712052459356282756208090", 165, RoundingMode.ROUND_HALF_UP); + t("0b11010011110000101001111110011100100101011000110001000000110001110011011010110001010101010110100001010110111011010001100100001110001101111011", "1152932454441681553686105050801467624055675", 140, RoundingMode.ROUND_HALF_UP); + t("0b1100000001001001000111010001111010010111001011100111101110000101111110001011111", "454021537654527488097375", 79, RoundingMode.ROUND_HALF_UP); + t("0b1101001101000111001011011000010111000111110010011011101101011101011101010011001100100111000010011100111001101111100010011001011111111100001110010001001", "2355828849861155012884780223410671381544574089", 151, RoundingMode.ROUND_HALF_UP); + t("0b1010101011001011000110110010001011101011111101100", "375578620712940", 49, RoundingMode.ROUND_HALF_UP); + t("0b11101111110110011011001010101101010000001100111010010010100101", "4320760375549338789", 62, RoundingMode.ROUND_HALF_UP); + t("0b111001110101100110110110001001100011101011000110110110001110111111010110110101110010100100001101101100111011011100110000110111100000011100011", "2519183162360903506191281057447758087831779", 141, RoundingMode.ROUND_HALF_UP); + t("0b11100000111001110001000011110101010101100011", "15455189161315", 44, RoundingMode.ROUND_HALF_UP); + t("0b10111010101101", "11949", 14, RoundingMode.ROUND_HALF_UP); + t("0b10010111010010010011111011111011000101100010011010101110111000010", "21802627242312687042", 65, RoundingMode.ROUND_HALF_UP); + t("0b111100101010101010000101011000001001110000100110111000010111110010111101101000110111011111101011000001001101111111110111011100010011100011111", "2642399810851701674212632837439227993925407", 141, RoundingMode.ROUND_HALF_UP); + t("0b110101010010011100111000100001100100101101000111000001000111101010100010010111001000001100001100100100101111100", "2161630318713979730472184517642620", 111, RoundingMode.ROUND_HALF_UP); + t("0b11001101011011110101111100000111110011011001101110110010101100110101100101001111100101100110110010010001110001100000010011100110010101000011001111001001000111101000010", "150121826439470624887536282475629271619430756159298", 167, RoundingMode.ROUND_HALF_UP); + t("0b101111000010001110110001111111100110010111000100010100010111111100100011010110101011110000010000100001110011100101111010011100111000100010000000011100110111000111", "4296345185753731570217826010182320032993209601479", 162, RoundingMode.ROUND_HALF_UP); + t("0b11101000101000110001101001011101110010011110011101011011011001001010011111100101110101110011000100111001101111110101100110000000000111001001001101", "81062205635532331055236284929003822323364429", 146, RoundingMode.ROUND_HALF_UP); + t("0b11010111", "215", 8, RoundingMode.ROUND_HALF_UP); + t("0b10011000011011101000011000001101011000000110000101101000011101011110001010011100100011", "46069664430530648537081635", 86, RoundingMode.ROUND_HALF_UP); + t("0b1111101001110000110010000000001001000111100111000100101111101110001100001000100001010001010011101000111101000100000100110001010111110000001011010011011", "2792505467580338130476655688091490969863067291", 151, RoundingMode.ROUND_HALF_UP); + t("0b1111101100001101110000001101101111010010011111111101100000010111010101110110101100110010110010101000010100000010011110100100100111101010011", "683433243524982240677777243476582452055891", 139, RoundingMode.ROUND_HALF_UP); + t("0b1010101110101110001000111100111001110011001010011111001111101100", "12370864596035695596", 64, RoundingMode.ROUND_HALF_UP); + t("0b11000111110001100111001010011110011010110101010010111100011010111100101101101101101010", "60378345252763661786864490", 86, RoundingMode.ROUND_HALF_UP); + t("0b10101100111000000110001100101100001101101011010000111101100001111110100100011001000001010110001001110011111111101111111000000000000010000110110100111011100010001000100", "126329653589454952926638707222811823179996994585668", 167, RoundingMode.ROUND_HALF_UP); + t("0b111001000110000010011110111001000111011101011111100111110111111101100100110010001000011001100001000111010000010010110010110100111101000011110000111", "159155836031631574967766651303670498797193095", 147, RoundingMode.ROUND_HALF_UP); + t("0b11000110000110100101011010000011010110100101011000011101010000011010110001010100011110011100010100111111010110000101110110110110100000", "16852729444979725339524623444714796314016", 134, RoundingMode.ROUND_HALF_UP); + t("0b110100000100110000001100110011111010100011011111011101010011110100011001010101001001100111", "1007262826627701209829823079", 90, RoundingMode.ROUND_HALF_UP); + t("0b1011010110011101110010000110111110100010011000001", "399378554504385", 49, RoundingMode.ROUND_HALF_UP); + t("0b10110001001001000101010101010000101101000110100110000110001000001000010110100111000110101000010010100111010100011000100011101100111001110001010100000", "493799621713705665209661337050845053741490848", 149, RoundingMode.ROUND_HALF_UP); + t("0b10110101110101110100000111010001011000111011010000101001110101111110110001011000000", "6869753008454091059192512", 83, RoundingMode.ROUND_HALF_UP); + t("0b11101001010111011000000010011000001110011111110011111000110011110011001111011111101111000100010110001110100101", "1183302363719122225851040665789349", 110, RoundingMode.ROUND_HALF_UP); + t("0b100011010000101111111110101011111111100111011111111000011101110010100000110001111000111100010111011110000101010100000101011100", "46870857086354303302378526158318027100", 126, RoundingMode.ROUND_HALF_UP); + t("0b1001011100111010011100011010100000000100011101001101110110110010110100011001101000011110010000101110110101111110000000111100000101110100010100110100110001000000010110100011", "3536326453156193038031587123790239903142359400187299", 172, RoundingMode.ROUND_HALF_UP); + t("0b101010100101101101010110000001111101000100001110000011010001", "767218737556283601", 60, RoundingMode.ROUND_HALF_UP); + t("0b10110110001111010100100101100010111000001010000111100100011110001011101000101100111001111011100111001111", "14438492881715694934558943721935", 104, RoundingMode.ROUND_HALF_UP); + t("0b11110110001010000001011100110100101010001101010100100101000010101010001111101101110101100110100000111100101011001000010000000001101111", "20940687968317900181954981756671243649135", 134, RoundingMode.ROUND_HALF_UP); + t("0b11000001011111101100110101100110", "3246312806", 32, RoundingMode.ROUND_HALF_UP); + t("0b100000110100001011111111101000110001111011011011101111101001100001001000011010001111001111001110000100110001011000010111101001110111", "2791627903658830465325077767573756541559", 132, RoundingMode.ROUND_HALF_UP); + t("0b11011110001000000010111111000000000100001001000010010101111100110101100100011011011001010100011101000101100001110000001001010011000100101010101010011", "619196159474080554644191332764720245730596179", 149, RoundingMode.ROUND_HALF_UP); + t("0b11111111100100100000010101000110100110011111111000001001001010000111010110011011100001101011011", "39547602794153772246742451035", 95, RoundingMode.ROUND_HALF_UP); + t("0b1001001001110110001", "299953", 19, RoundingMode.ROUND_HALF_UP); + t("0b10100100101101011011010101000101001101001100101010110111110000100000101010011110010110001001001101000010001110110011110000111100010001001001101011010010", "3673151219411926241066396539539895097311402706", 152, RoundingMode.ROUND_HALF_UP); + t("0b111011100011111111000011011010110010010000111010100111001111001101110000", "4394919723391067681648", 72, RoundingMode.ROUND_HALF_UP); + t("0b1110011001100111011111001110111110", "15462167486", 34, RoundingMode.ROUND_HALF_UP); + t("0b10001001101001101101010110001101011101100100001010101100000010000100001100000010101001101100101101011100101101111000110110010010001001001101100100110110111101011000111000110100", "51501613866007552548575243188268697652335512286236212", 176, RoundingMode.ROUND_HALF_UP); + t("0b1101010000000101100111011110011110010", "113828412658", 37, RoundingMode.ROUND_HALF_UP); + t("0b11000010110111101110", "798190", 20, RoundingMode.ROUND_HALF_UP); + t("0b101001001111101100100111111000110000111010000", "22674826617296", 45, RoundingMode.ROUND_HALF_UP); + t("0b11100101111101100010000001111110011001100101111111111100000001101001011000100101000011110010111100001111", "18219421810715473011424793407247", 104, RoundingMode.ROUND_HALF_UP); + t("0b100110101000101100100110100100100100111110100000100010110001111100111100000011111001100110011111111010100100001100011000110110011111001100001011000111100001000", "441143871171700310794467845617284706136179969800", 159, RoundingMode.ROUND_HALF_UP); + t("0b111100111101101111000010110010101", "8182531477", 33, RoundingMode.ROUND_HALF_UP); + t("0b111101", "61", 6, RoundingMode.ROUND_HALF_UP); + t("0b11101010000101100100100000011100101111100011001011010011001011011100110100011100000010011111010110010000001001111011", "75965586951977951466854946826683003", 116, RoundingMode.ROUND_HALF_UP); + t("0b11111010111100001001110010100011011111111011001010000110011000010101110010100101110100110110011010000011110011101110011100011101010000011001001010000001011100100", "2865227033411954606371792440103294708104730837732", 161, RoundingMode.ROUND_HALF_UP); + t("0b1100", "12", 4, RoundingMode.ROUND_HALF_UP); + t("0b1000000110001111010010110000101010101011101111101011011101000000000101010100011100", "2447314272063451666863388", 82, RoundingMode.ROUND_HALF_UP); + t("0b1101000010010001111110110001011000000001101111000111011111000110", "15029069503449036742", 64, RoundingMode.ROUND_HALF_UP); + t("0b1000100101100110011011000000101101001110011", "4721031010931", 43, RoundingMode.ROUND_HALF_UP); + t("0b11111000100111111001100001100100010001100110001101000110101001111111011011101010110110110101000100100101001100010011010110100100000101010010011100111000011100111010000000110011", "93021064714003304999209676659750808550526701882548275", 176, RoundingMode.ROUND_HALF_UP); + t("0b111111011110010111011101011101101101000100110001011011111001", "1143454535228004089", 60, RoundingMode.ROUND_HALF_UP); + t("0b111110101010110100000011111001001010111110", "4306578150078", 42, RoundingMode.ROUND_HALF_UP); + t("0b110000100010000111110110110111100110111001001001111000110", "109286979318617030", 57, RoundingMode.ROUND_HALF_UP); + t("0b100001011110001110101100101110001101010010011110010010101101110110001000110101011101101000101101111110110111001111100101001000000001101010100000011111100011001000101000", "195679510499172126937950972652289628431931810918952", 168, RoundingMode.ROUND_HALF_UP); + t("0b110001011001101100010101001101000111101010000010111101011011011011011101100", "29161467826175673743084", 75, RoundingMode.ROUND_HALF_UP); + t("0b11111111110110000000100111111010011010000000001001", "1125213381697545", 50, RoundingMode.ROUND_HALF_UP); + t("0b111011110101010010011000011101001010111001100000000110110111101110101110111000101011101000000001000110000111010000111101100101000011000000110", "2606077838126325794622812111329148470986246", 141, RoundingMode.ROUND_HALF_UP); + t("0b1110110100000000001111001111001010000000000111000001000100000111101001001000011010100101100111", "18337058785747772841230707047", 94, RoundingMode.ROUND_HALF_UP); + t("0b1011001010011111110101100010010100111110101100001000111101111010011011101110001110000000101101010110111100001110000111111010110001000111011", "486261763761604150405408746183250518303291", 139, RoundingMode.ROUND_HALF_UP); + t("0b1110011010011010101000111100111010101111000001101010001110110001111110000100001001100011001100101100000010110110111000010000110001010", "9808812004949753301944141481962869891466", 133, RoundingMode.ROUND_HALF_UP); + t("0b101010110001010111100100111111100000100011001010110100111000011010101000100011110110111000111000010011000101101100101101101100001000", "3638586720469021421571505782203805260552", 132, RoundingMode.ROUND_HALF_UP); + t("0b1101111001100", "7116", 13, RoundingMode.ROUND_HALF_UP); + t("0b11111010111011101001100100100011100010110011000101011100", "70631085671395676", 56, RoundingMode.ROUND_HALF_UP); + t("0b1101001100111000100111000111101111110101101110011", "464480193997683", 49, RoundingMode.ROUND_HALF_UP); + t("0b11011100010001001111010010110101001000001111000100101001001010111111001100011101011010101101110001001011101011100011100010101110100101010100111110101110011011010110011000", "1287696114982305806708561003677255537140522028742040", 170, RoundingMode.ROUND_HALF_UP); + t("0b100110001011101010111011011011101100111001111011000", "1343422207521752", 51, RoundingMode.ROUND_HALF_UP); + t("0b1110101110100000101011000101111100101001110011100100001000110010001101110011101000011111101000110100011100101110000101100000010000100110001001", "5131515373500601241098729740846521305336201", 142, RoundingMode.ROUND_HALF_UP); + t("0b10011101000011001000111010000101011111110111011101101001010010011000111101100010110010100011010100001000000001100000000011000010100010100001011100", "54723606892902481536500944335964133487421532", 146, RoundingMode.ROUND_HALF_UP); + t("0b1101001110111010100010011100001", "1776108769", 31, RoundingMode.ROUND_HALF_UP); + t("0b100000001100000110111101111110000001100110101101000100111111001110011100010111101101011000101010101011111100000001010101111111", "42786787446528052699594039883348317567", 126, RoundingMode.ROUND_HALF_UP); + t("0b11000011111111011101011000111101101110010000101101000010101110101011", "225962873073433848747", 68, RoundingMode.ROUND_HALF_UP); + t("0b111111100111001101011011100101111010010110100110011000000000010110100111100011", "300402265535819852900835", 78, RoundingMode.ROUND_HALF_UP); + t("0b100011111010111011011011111", "75331295", 27, RoundingMode.ROUND_HALF_UP); + t("0b11000100111000000111011111010101000010111001", "13529272635577", 44, RoundingMode.ROUND_HALF_UP); + t("0b1001101100100010000010100000000111000110011111111000111010110101001000011101100011011101000100011110111100000110101010011010101110010011000011100011001", "1729790364338742795479957074258010329122965273", 151, RoundingMode.ROUND_HALF_UP); + t("0b110001101", "397", 9, RoundingMode.ROUND_HALF_UP); + t("0b10011100001001100111110000111", "327470983", 29, RoundingMode.ROUND_HALF_UP); + t("0b10100101011", "1323", 11, RoundingMode.ROUND_HALF_UP); + t("0b1001100110010000000111010100111101011110101111101000110100", "172896507987163700", 58, RoundingMode.ROUND_HALF_UP); + t("0b10110101100110011101011011001111000000100011011110001110101100110111011111000010010101100010100110101101101111011", "7366609054351701610086110120336251", 113, RoundingMode.ROUND_HALF_UP); + t("0b110110010111101111010001001101010001011101101010001001001101111111011", "501483179338306460667", 69, RoundingMode.ROUND_HALF_UP); + t("0b10101110110111001100101001110000100100101001011100101010111010101110010000000100001110", "52848936898297944277057806", 86, RoundingMode.ROUND_HALF_UP); + t("0b110100101110001101101000000010100010010010000010110011110111100110111001010010111000101100100101111001111000011011100100011110101100111110001101011011111100", "75247462135135296147483304900271494532907456252", 156, RoundingMode.ROUND_HALF_UP); + t("0b1000100111100011101111100111010111110011101110011001100111111000011001010010101011", "2604661372805165686559915", 82, RoundingMode.ROUND_HALF_UP); + t("0b110000000011011011111101100001100000010100011110111001010101010000111000010000101110010100000111000000010110111011111001011011110111111100111101111010000", "8573066822280330509997029656969204484303387600", 153, RoundingMode.ROUND_HALF_UP); + t("0b1111000010000101010011110111001010001110101010010110011011010110110001101100011001101001101", "2326173895977887311754310477", 91, RoundingMode.ROUND_HALF_UP); + t("0b101010110000111000011000100111111000000100110110", "188077030998326", 48, RoundingMode.ROUND_HALF_UP); + t("0b1000001000110100001000111000111110101100101010100100110111000001000011110011010001100001101010001101111111010100001100011110010100101110000100001", "22684678246378182819785716745165465876847649", 145, RoundingMode.ROUND_HALF_UP); + t("0b1101100111111101001001001100011001000011101001001100000001000111110000101001100010011011011100101100000010001000100110010111111010011111000000001000001001011010101111110101", "5097456801022432585476312678303126165684672742665205", 172, RoundingMode.ROUND_HALF_UP); + t("0b1111000101001100001000111101001001110001110000011100100101000000111001000010100010000110110100010001011010101001000011000110010101000010001111001110110000100110110000111011", "5642505228059227244247414269863757684704851232189499", 172, RoundingMode.ROUND_HALF_UP); + t("0b11100011100111110000110111101111011111110001101101110101000110101100011100", "16795487938751986166556", 74, RoundingMode.ROUND_HALF_UP); + t("0b11111001101101111001100110000101001000001111100100001011001100101100100001110100100110010110011010100111100010100111111110101000100110001011011001011000101011101000001011011", "11678786451764002081049400473764762680882990476021851", 173, RoundingMode.ROUND_HALF_UP); + t("0b11101001011010111111100100000111101100010100011100001111011010010011111011011101000101001010111001100010001100000110000011000011010001111110010001101100000100010000111", "170573148533121700284914386034471572584747624695943", 167, RoundingMode.ROUND_HALF_UP); + t("0b10001100111100111110001010", "36949898", 26, RoundingMode.ROUND_HALF_UP); + t("0b1010010100010010011110001110011111100001", "708979517409", 40, RoundingMode.ROUND_HALF_UP); + t("0b11101000001111110011000101110101110011011011110110011110000000111111111011110011101111110001110101100100101111111100010101010011110011001110001010010011011001000001000101000101001", "695150897721330668961198822938644201466146242961639977", 179, RoundingMode.ROUND_HALF_UP); + t("0b100011011001101111", "145007", 18, RoundingMode.ROUND_HALF_UP); + t("0b1100001010011011100011011010100011111100110100001111", "3423573638106383", 52, RoundingMode.ROUND_HALF_UP); + t("0b1101110000000101010111111111010", "1845669882", 31, RoundingMode.ROUND_HALF_UP); + t("0b101111100111001010111111110111111000111100111111110001110011", "857702623840828531", 60, RoundingMode.ROUND_HALF_UP); + t("0b10100100001000010111000101101101000100001", "1409871436321", 41, RoundingMode.ROUND_HALF_UP); + t("0b1000101011", "555", 10, RoundingMode.ROUND_HALF_UP); + t("0b10010011010001101011011101011000110001101001001001000000111111101101010000001110000111011001101110100011001010001000100001010101000100010000110100010010", "3284369793875476139142406227062347521500187922", 152, RoundingMode.ROUND_HALF_UP); + t("0b111010010000011101100011000010100001011001011101111110001001100000101101100111111110110101111100011111000010101110101001010001011010", "4955975645658396849750021048094688973914", 132, RoundingMode.ROUND_HALF_UP); + t("0b1100100010101100010011010111010011011110001010011", "441284718869587", 49, RoundingMode.ROUND_HALF_UP); + t("0b1010110010000010", "44162", 16, RoundingMode.ROUND_HALF_UP); + t("0b101110100110000101110000101000000100100110110100000101100000011001111010111100011101011100101010001001010011001101001010001", "7741948260639498696423377430502808145", 123, RoundingMode.ROUND_HALF_UP); + t("0b101100000110111000111001010110010000110011", "3031053984819", 42, RoundingMode.ROUND_HALF_UP); + t("0b10110011010101011100010110100101111101111101110001011111101011011001101100100010000001010011011110010010010011101010001010011100101000001000000001010100111011111110001011", "1048393860009702438276451118840918885709561673793419", 170, RoundingMode.ROUND_HALF_UP); + t("0b11011000100011101011010010001001101010111010000100000110100010011010100100101000110011001000000101100101", "17157448231253463055811180527973", 104, RoundingMode.ROUND_HALF_UP); + t("0b1001111101111001100110000011001", "1337773081", 31, RoundingMode.ROUND_HALF_UP); + t("0b1010000101", "645", 10, RoundingMode.ROUND_HALF_UP); + t("0b111110000001000011100000110010111011001011100110111110011110111011010101010111101100101111101000000000101100011111110111100101001110000011111000010011011", "11064110199645779468713657128408705698455744667", 153, RoundingMode.ROUND_HALF_UP); + t("0b11110010010110011110011011000110111010", "260222595514", 38, RoundingMode.ROUND_HALF_UP); + t("0b101000100111110011111100111001011100001000101101110011000100111111011001111", "23979030927343490334415", 75, RoundingMode.ROUND_HALF_UP); + t("0b101000000010010101101101001010", "671701834", 30, RoundingMode.ROUND_HALF_UP); + t("0b10011100000110011001110110011111011101110001101011110111110011000001100001000101110111001110000010011101101001010111010010010101110111110110110000010111110111011010", "14258780956329408244620868751517156468304535191002", 164, RoundingMode.ROUND_HALF_UP); + t("0b10011010111001101001111000001000011000111000010111000100011101110000111010000010101010", "46815908925437602817089706", 86, RoundingMode.ROUND_HALF_UP); + t("0b1100010000000010001100111000011111100010101000010101100001010100011101111001101000001101111111101101000100", "62117604478929274751724622969668", 106, RoundingMode.ROUND_HALF_UP); + t("0b11100010001001100001", "926305", 20, RoundingMode.ROUND_HALF_UP); + t("0b1110101110110010110010101010010011001111111011011000", "4146450184077016", 52, RoundingMode.ROUND_HALF_UP); + t("0b11100011100000111011000000111111001001011000011011110001011110010111101001001001000011111101000000011111101001111000010101001011100000010100000000001000000101001100101110110", "10640405756706933069932552513853268918056402456582518", 173, RoundingMode.ROUND_HALF_UP); + t("0b100000010101", "2069", 12, RoundingMode.ROUND_HALF_UP); + t("0b101000101100101111110110100100001110100101001010010100101010001100001101100011110110001001111110010010110100001011101101111010100110000000110100110101000", "7260976836577029672818019365254002054979938728", 153, RoundingMode.ROUND_HALF_UP); + t("0b1010010010100000101011111111110100000011101101000100100000111001100000010101011011000011111010111001000111011110101111010000110", "109413864136821966738078269201594670726", 127, RoundingMode.ROUND_HALF_UP); + t("0b11101001010010010000001010101001000010111010011111010011101101000010110", "2151676161178286545430", 71, RoundingMode.ROUND_HALF_UP); + t("0b1", "1", 1, RoundingMode.ROUND_HALF_UP); + t("0b11110110100000100001101001110011101100010110000110011101110010101110101010111001001000101011101101100000010000100101", "79996489761592791530139097880724517", 116, RoundingMode.ROUND_HALF_UP); + t("0b1101000110", "838", 10, RoundingMode.ROUND_HALF_UP); + t("0b11010000111111110000100100100110100000110001000101010100111110", "3764941434990646590", 62, RoundingMode.ROUND_HALF_UP); + t("0b1100110001010110001011110100101011101000110000011100010000110010010111010010001101111000000111110101100010111000101101001101", "16975625492382937650444877242569558861", 124, RoundingMode.ROUND_HALF_UP); + t("0b1110110111110101110000001100101101010101101101111111011001101011101101000010010010111101010011101111011011011110001111000001100001010010011001111010010110001001111111001", "695557780484633047451419090913265350682286538560505", 169, RoundingMode.ROUND_HALF_UP); + t("0b10010011101100000110011111100100000000101001100101000101111110001101010110000010011010000001000110010001001011011001110011000010111001011110110", "6432766911463399701129205956556722425393910", 143, RoundingMode.ROUND_HALF_UP); + t("0b10000010011101010000001110000110011101010111100000111010010011100001100100", "9626033841394783172708", 74, RoundingMode.ROUND_HALF_UP); + t("0b1101101000011111101101001000111", "1829755463", 31, RoundingMode.ROUND_HALF_UP); + t("0b111010100011110110011011011111000100011011011111000010110000110001101011001100010110100011110000", "72493971032499161046675712240", 96, RoundingMode.ROUND_HALF_UP); + t("0b10101010100001111110010100000111110011000010111011011111", "48000163788893919", 56, RoundingMode.ROUND_HALF_UP); + t("0b111001110111101101111011001110001110011111000010110101101", "130312977572136365", 57, RoundingMode.ROUND_HALF_UP); + t("0b1001110011011111011001111000011011000100000001110111000110110010001101010010011000100100001100111001101001100110011110001111111111110111101111010", "27331074366810509421853388280769875793670010", 145, RoundingMode.ROUND_HALF_UP); + t("0b1000001110110010010010110000001010001001011100000010100100100100000001011101001101100100001111000010", "652129268908332354914162721730", 100, RoundingMode.ROUND_HALF_UP); + t("0b1100000101101000011101100101011100010111010011001000100000101101100111000010011000001110011111111111001000101110001", "31382251255391898419590799476887921", 115, RoundingMode.ROUND_HALF_UP); + t("0b1101111011001011000101110110110111011010111100010110001110100111000010001101101001100011101001101101101110001101110010001110000000001111", "75812640390549515698067392896804260995087", 136, RoundingMode.ROUND_HALF_UP); + t("0b1101010000010110111100110000100010111001101110110100011101001010100111100101111011100110000111000011011000101011110010111011101110001011001001101000101", "2364878576296174981737730111388996744591545157", 151, RoundingMode.ROUND_HALF_UP); + t("0b1101111111100100101111001111011100000100000011110011111111010101100100011011", "66081699980324911274267", 76, RoundingMode.ROUND_HALF_UP); + t("0b1110000110010101101101001100110011010000100001011100100111001010010101111000000101101111101011101100000001000110000110101111111100100000101111", "4912801682953604186696386732310079951849519", 142, RoundingMode.ROUND_HALF_UP); + t("0b11000101100000111011101101001000010010000011100010010110011000111110110101110110100001100110100100000100000000010111010", "512777157413030085980733281858093242", 119, RoundingMode.ROUND_HALF_UP); + t("0b110010000000100010010100110100001011001001100010001111011010100000", "57655736925864654496", 66, RoundingMode.ROUND_HALF_UP); + t("0b1001000100111010111111000011101100000010001110101111111011000110010001010001111001110011001", "1404582351453280869403915161", 91, RoundingMode.ROUND_HALF_UP); + t("0b100110101110100011110010101100010111011111101000111100001110000101011100010100111101100000011010001100111000011110", "12567788490336688088992466604707358", 114, RoundingMode.ROUND_HALF_UP); + t("0b110111110010011110110111001011100010001010100001110011111111111101110001000101111100110011100110000100010110010011", "18104495725933236784651084181816723", 114, RoundingMode.ROUND_HALF_UP); + t("0b1111000110100000011101011000111010010101011101010010110110111000010101110110110100010000110000001101101011011001101101101100100110110110111100011001100110010010000100010111011", "45201658205192969951078809960368998187352382503454907", 175, RoundingMode.ROUND_HALF_UP); + t("0b11110111101000011110000010001", "519322641", 29, RoundingMode.ROUND_HALF_UP); + t("0b10100000110110110111011011110111110110111001000001001000100101000001110101001101000011111000100011011110110100111101111", "417609385350091179779636810113575407", 119, RoundingMode.ROUND_HALF_UP); + t("0b100001010110111010111000000100010101101100010111", "146710581041943", 48, RoundingMode.ROUND_HALF_UP); + t("0b10001111010011100001101011101100110111010100100", "78782810975908", 47, RoundingMode.ROUND_HALF_UP); + t("0b10001110110110100000011010101", "299581653", 29, RoundingMode.ROUND_HALF_UP); + t("0b1110001011001100001001100110001010000110", "974087676550", 40, RoundingMode.ROUND_HALF_UP); + t("0b11100011001001011111010000101001001011001001010110110101001110000000111010110100001000011100010011010011100011000010000101101001110100011101110011110111", "5065575398273300616873996741388922355920788727", 152, RoundingMode.ROUND_HALF_UP); + t("0b1111111000001101100100011000", "266393880", 28, RoundingMode.ROUND_HALF_UP); + t("0b10110101100100101010001010111001000000011100000110110001011100011111111100000110001001010101111111010011000011100011010001110110011101101100101111101101111110", "259149353365748547676531551540644422107339619198", 158, RoundingMode.ROUND_HALF_UP); + t("0b1101011110100010001011001011000010000011001011110000111100001100101100100010001111101111001110100011011000010000", "4373566857843294445861437353637392", 112, RoundingMode.ROUND_HALF_UP); + t("0b100011101001110010110011110100110011010000101000100111010100101001000111110100101011010101000001111110100000100110111001001001101010011010000101001000111000110111010", "26053480661633533853821712739093750512044053131706", 165, RoundingMode.ROUND_HALF_UP); + t("0b1110010101111000001010010001101011101010001111011001101000000111111111010000000001011000011001101111010101100001101011001100011100010011010100111000100011100110001111110010", "5365917928263298552573558618072276593881915061068786", 172, RoundingMode.ROUND_HALF_UP); + t("0b0", "0", 1, RoundingMode.ROUND_HALF_UP); + t("0b101101010011001101010001010001010000110000011111", "199232011439135", 48, RoundingMode.ROUND_HALF_UP); + t("0b100101010000010110110111111000101111000110000101010010001001101001101000", "2748976914400602004072", 72, RoundingMode.ROUND_HALF_UP); + t("0b1100010100011100010100101000101110001101001001010111100010", "221926845064713698", 58, RoundingMode.ROUND_HALF_UP); + t("0b111010011101110111001010101110100000001011000", "32142349779032", 45, RoundingMode.ROUND_HALF_UP); + t("0b1011000111100001011000110110010011101101", "763990598893", 40, RoundingMode.ROUND_HALF_UP); + t("0b111110001111011010110111001010100111111101111001001011010101110110110011010001110010101101000011", "77050543164333814857060526915", 96, RoundingMode.ROUND_HALF_UP); + t("0b110111110010111101111000100111010010001110001111111100001101100010001101000100100100011100100011011011010111010111001001001110100001100", "37973033900975016780110288277302266862860", 135, RoundingMode.ROUND_HALF_UP); + t("0b101000111010110010000111111000011000001001011001111000001100001001110001101100001111001000000000010111111101110011100011011001111111110100100010001110000000101101001110100", "1913677948341929506841492066019813618520908835609204", 171, RoundingMode.ROUND_HALF_UP); + t("0b1111101001100110010101010000001000100000101001101110110100011", "2255400303091572131", 61, RoundingMode.ROUND_HALF_UP); + t("0b110100010100001101111110100010100001100101110001100011111001010001101001100010011011001110110011000010100001001011101100001011101001011010000011001010001100", "74667765260706149423652281266282011954894090892", 156, RoundingMode.ROUND_HALF_UP); + t("0b1000000010111101", "32957", 16, RoundingMode.ROUND_HALF_UP); + t("0b1111110100011101111101100011", "265412451", 28, RoundingMode.ROUND_HALF_UP); + t("0b11110010", "242", 8, RoundingMode.ROUND_HALF_UP); + t("0b1001111110110111001001000000111011110010101101011001000011110110000001000000001101110010100000110111011000101111000100101111111001100001001100011111010100101100100", "7294509680489473516157489095568130945736908974436", 163, RoundingMode.ROUND_HALF_UP); + t("0b111101001100101010011001111111100101100011110011110", "2153208033232798", 51, RoundingMode.ROUND_HALF_UP); + t("0b101111100110101010011111110100000001110001010101110001000001101101101011111010100110011011011", "7366381587271251372942380251", 93, RoundingMode.ROUND_HALF_UP); + t("0b11100", "28", 5, RoundingMode.ROUND_HALF_UP); + t("0b10011100111001101100", "642668", 20, RoundingMode.ROUND_HALF_UP); + t("0b10100010111000011011100101000111000010110010000101111001111001111011101110110110100101001110100100111010101010111100100001001110110100100100100", "7094500064780213519639611108740313788148004", 143, RoundingMode.ROUND_HALF_UP); + t("0b111110111101010100110000011010010100100111110001111001101110110001011110001111011000011001000100110101101100001010000011000001000111010100", "342777004104073921541803082899350493073876", 138, RoundingMode.ROUND_HALF_UP); + t("0b11100011110111111101111100110111111000010011000000101100001100000100000011111110011001110100000111001011111111010110100111111011010101110011011011101000", "5081771157073840975382845753680003415619876584", 152, RoundingMode.ROUND_HALF_UP); + t("0b1110101100001100111010010101011010001101111001100101110110011101111101110111000011101001010011110110000100011010011001001100100010111", "9997939815383461009512050917690963695895", 133, RoundingMode.ROUND_HALF_UP); + t("0b10001010010011111111100001110010110100110011101", "76038037662109", 47, RoundingMode.ROUND_HALF_UP); + t("0b1101000011101001000100110101000110011011110000001000010010000011111000010000111011101001000010011111010011111111011111101101101110110110001011010111000000100001001000", "76330741559420840213970134181579220885370404866120", 166, RoundingMode.ROUND_HALF_UP); + t("0b101110101011111101011000011101001100011100000100001000110011101011011101110001101110110011010110010111100", "29591313602933764036329127652540", 105, RoundingMode.ROUND_HALF_UP); + t("0b110011101001000110010011100", "108301468", 27, RoundingMode.ROUND_HALF_UP); + t("0b10111010011000101111000011000000111000011100011010000010011000011101011011111000001100000001110001", "230735293932368005478672810097", 98, RoundingMode.ROUND_HALF_UP); + t("0b101110001011101011001000111000101100110110001010110111110010110111000101000010110100000010010011101000111001010010011011010", "7673368527850305306860702856736711898", 123, RoundingMode.ROUND_HALF_UP); + t("0b11000010011011000010100001001011111110000001111000101100100011011100000", "1793230956491923932896", 71, RoundingMode.ROUND_HALF_UP); + t("0b10101110101001011001101100000100111110111010000110100110110", "393269849358142774", 59, RoundingMode.ROUND_HALF_UP); + t("0b11100010011101010", "115946", 17, RoundingMode.ROUND_HALF_UP); + t("0b11110001000100001110011001100100", "4044416612", 32, RoundingMode.ROUND_HALF_UP); + t("0b11101111111000111000010010011101000110101000100101100010", "67522678144797026", 56, RoundingMode.ROUND_HALF_UP); + t("0b11100000110000100010000100100100000010001111011000011001101101101101001000010011101010011110110010101111010000001100000100100100000", "2390040390567048642966647388057001920800", 131, RoundingMode.ROUND_HALF_UP); + t("0b1010000110010110100110111100111101001001101101011001111001110010000110100010000000000101100011101100010011011000000010111111000110000001", "54985654283950555052147243853162465718657", 136, RoundingMode.ROUND_HALF_UP); + t("0b11000011100011000100111110110111001010010101000011001010010011101111010011110001101100110110001111011110100110010011", "63458983779334095341636694071699859", 116, RoundingMode.ROUND_HALF_UP); + t("0b101111100010001011001011101011100010010111010000111100101000010011100010100001001111001100010000111111", "3766029900593721359372665013311", 102, RoundingMode.ROUND_HALF_UP); + t("0b101111011000101011011011001000010010011111001001111010000111011111010010010100111011110010011100010011000111110011110110001010101100010110010110001111011100", "67630990462245519904689419770374213484683027420", 156, RoundingMode.ROUND_HALF_UP); + t("0b1000101000001110001001001111100000001100000100", "37948338602756", 46, RoundingMode.ROUND_HALF_UP); + t("0b1110100101100011001000000000001010011000110001010101101010010", "2102165078632082258", 61, RoundingMode.ROUND_HALF_UP); + t("0b11", "3", 2, RoundingMode.ROUND_HALF_UP); + t("0b11000000101111101111010110110101001110011010001011001011", "54253158045164235", 56, RoundingMode.ROUND_HALF_UP); + t("0b1011101000010110000100000100111001010100101101011011101001001011001111001100101110010100100011101011", "921454163161847327849553938667", 100, RoundingMode.ROUND_HALF_UP); + t("0b11011110010110101000111111000110101111000110111001001011111", "500696147126612575", 59, RoundingMode.ROUND_HALF_UP); + t("0b1010101001110010100011100110011111001011001010011010000110001101", "12282035710234042765", 64, RoundingMode.ROUND_HALF_UP); + t("0b1001101010011101000101110010011010001010101111001000000101010010100001100000110010100001000001111011011110001100110111101011111011000011001011000100000000011110001011111011", "3615489279593509708772217418002107077942788107657979", 172, RoundingMode.ROUND_HALF_UP); + t("0b1010010111011001111100100000011001101110111101110011101010110000011011001110010010111000000110101001101000001110", "3363864999018073552305148875414030", 112, RoundingMode.ROUND_HALF_UP); + t("0b10110111000011100000100001000111101011000010011100010111111001001110011000000111100110101111111111111011110110111010111011010000101010100111011000100110010111001", "2090116485561415533220743961894899901833660878009", 161, RoundingMode.ROUND_HALF_UP); + t("0b101001101001001011010001100010111111010000001111110100110010110011101000000011010111111110011100001011100011111101100100010110000001100111000010001111110", "7429426803493479456828449389493437652073153662", 153, RoundingMode.ROUND_HALF_UP); + t("0b10101101101111010111001110101001101001100", "1492415632204", 41, RoundingMode.ROUND_HALF_UP); + t("0b100011011100100000101110001000011111111010011010011001101001010010000011110000111011010001101011000010010000110110001", "92021749248802288107686447118623153", 117, RoundingMode.ROUND_HALF_UP); + t("0b10110001100100001110111010111001010011000110010100011010110010010100110100111111101111010110100110100", "1758529900728895870358045306164", 101, RoundingMode.ROUND_HALF_UP); + t("0b1001111000000", "5056", 13, RoundingMode.ROUND_HALF_UP); + t("0b110000111100010100101000011111110101000011110011111100111010010010001111001101100000001000111111100010010101100", "1985345177021823592895244450907308", 111, RoundingMode.ROUND_HALF_UP); + t("0b1001110000100000000000110110100010010101111110010100011100010101101010", "719999719481543869802", 70, RoundingMode.ROUND_HALF_UP); + t("0b111100100100001100100101001110001101011010010100011010011100101000000101011011", "286012825709225924788571", 78, RoundingMode.ROUND_HALF_UP); + t("0b11010111100100111111110100111001010000011101110110100000001100001100001011011000110100010110110001110101100111100111000110010100011", "2292419381743847793952323533642807872675", 131, RoundingMode.ROUND_HALF_UP); + t("0b100110100001101001001110101010000101110100000100000010100110001010101111110100110101001001001011011101000111001101100001101100010011000010011010", "13424243929007150060864059623182269932449946", 144, RoundingMode.ROUND_HALF_UP); + t("0b111011000010100011011110010000000000010110111001001100010010101101000001000010111010110001110010010101", "4677623609407056260314308484245", 102, RoundingMode.ROUND_HALF_UP); + t("0b1010001000000011111000000101001100001011100000011111111001101000100001001011010110000010011011111111000011110101010001110011", "13459691377936385656205820498694591603", 124, RoundingMode.ROUND_HALF_UP); + t("0b101111100101010010010101000010100111111101111011110111100110", "857171914848189926", 60, RoundingMode.ROUND_HALF_UP); + t("0b110110001001110001101001101001011100110000000100111101101000111101100100110101001110010001", "1047466460252578697656357777", 90, RoundingMode.ROUND_HALF_UP); + t("0b10000101011010001000100001111111001110010010110100011000111101001010000001001011001000111010010000011010101111001111101101010001", "177330090800059334179372876785623300945", 128, RoundingMode.ROUND_HALF_UP); + t("0b1010", "10", 4, RoundingMode.ROUND_HALF_UP); + t("0b1110000101111000100101111000000001000100111010100110100101100011001010000101101001100000000100101011101001110000001110011101000001110", "9590478319392434269891419865097211165198", 133, RoundingMode.ROUND_HALF_UP); + t("0b1101010001110100011011010010011010100010111111101000101011111111111011011100001000010100011100010000111011001011000101100010010001111011101111010100100011000010001", "9703219505953893074023234217532878016916428047889", 163, RoundingMode.ROUND_HALF_UP); + t("0b1101000001100011011001110000010011000100110001000011010110000100", "15015958852762088836", 64, RoundingMode.ROUND_HALF_UP); + t("0b11110011111110100111011111001010001010010100010010110", "8584226467555478", 53, RoundingMode.ROUND_HALF_UP); + t("0b11111001001000111101010101111010100110110100011001001110111101011011100101010101001111001011", "4819067998434611218882057163", 92, RoundingMode.ROUND_HALF_UP); + t("0b1000", "8", 4, RoundingMode.ROUND_HALF_UP); + t("0b101110001000011100101111000001100011100000100010101011101011110", "6648324064296392542", 63, RoundingMode.ROUND_HALF_UP); + t("0b100000001011010111010101110111110011000100", "2211226025156", 42, RoundingMode.ROUND_HALF_UP); + t("0b111000010011100011011111000001110100100", "483660891044", 39, RoundingMode.ROUND_HALF_UP); + t("0b1100110100110100011011000", "26896600", 25, RoundingMode.ROUND_HALF_UP); + t("0b1110110001001101110110101111110100001000011011100111000000100111110010011011000010011001111011101010010010111111101000001011011", "157051027737987715731727950696316653659", 127, RoundingMode.ROUND_HALF_UP); + t("0b10101101101110101011101100011100010010011011011011000110111000010000001001110111010100111", "420051957077295313153486503", 89, RoundingMode.ROUND_HALF_UP); + + // Floats + + t("0b111010110111100110100010101.1110000001100101001000101100010001111011", "123456789.87654321", 67, RoundingMode.ROUND_HALF_UP); + t("-0b0.000000000000000000000010000100100011111", "-0.000000123456789", 17, RoundingMode.ROUND_HALF_UP); + t("0b1111100111.11111111101111100111011011001000101101", "999.999", 48, RoundingMode.ROUND_HALF_UP); + t("-0b11111100001000110000100000101.010000000010101111110001111101011011111", "-528769285.2506705498654986754987694357629487612132293856", 68, RoundingMode.ROUND_HALF_UP); + t("0b111011.001010010001", "59.160508253119229720226315984803348705", 18, RoundingMode.ROUND_HALF_UP); + t("0b1000001001001100110111.101011101111000111000101011111000010001111111011100010001100111111100100011010100001010111111", "2134839.683376639182809009377393376566052153774412236905434", 115, RoundingMode.ROUND_HALF_UP); + t("0b110100110001101011110111011000010000110100000011111011110000111111110101000111000110001111011110111110111000010111001110000001101.1101111001111010101101110101011001000011000000101011010000001111011001101010010101", "561214248546542162784739085096665717773.86906", 211, RoundingMode.ROUND_HALF_UP); + t("0b10110111000101011010101011100011110110000011100101000100101000111000001101110001010010110011101100101000001100011111010111011100.000110111100110011011100001111010100110111000100110000100000010010100101100011001101", "243361227524012342673912659288240813532.10859467026399996528383947490", 212, RoundingMode.ROUND_HALF_UP); + t("0b110001011001101010010100100001011011001101010101111001010011100010110001001010010110100000111000000000001101000000110000100011100001101001100011010100110101111010110001.1011100011010100100011101101101100101011000110000110111110001100000110011000111100001", "288798319290142875873517012221913212736305288666801.721993378169914151", 253, RoundingMode.ROUND_HALF_UP); + t("0b101111111100000110101111100000101000111011101010001100001110", "863594881689232141.62881568577668460977625904", 60, RoundingMode.ROUND_HALF_UP); + t("0b101110011110011", "23794.501525", 15, RoundingMode.ROUND_HALF_UP); + t("0b1000", "7.792303494645702446763290630498884400068339335428470929289382355", 4, RoundingMode.ROUND_HALF_UP); + t("0b10110001101000000001011000001011111010111100011101101011011001001001011011010111110000111101001001110101110101011011011100010", "29513071238598351326634077220532565729.753116233815194468461197227952", 125, RoundingMode.ROUND_HALF_UP); + t("0b110010", "50.3", 6, RoundingMode.ROUND_HALF_UP); + + // Include binary exponent. + + t = (string expected, BigDecimalArgument n, long sd, RoundingMode rm) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToBinary(sd, rm)); + }; + + t("0b0p+0", "0", 40, RoundingMode.ROUND_HALF_UP); + t("0b1p+53", "9007199254740992", 40, RoundingMode.ROUND_HALF_UP); + t("0b1.1p+8", "384", 40, RoundingMode.ROUND_HALF_UP); + t("0b1p+1", "2", 40, RoundingMode.ROUND_HALF_UP); + t("0b1p+8", "256", 40, RoundingMode.ROUND_HALF_UP); + t("0b1p-6", "0.015625", 40, RoundingMode.ROUND_HALF_UP); + t("0b1.10110111p-1", "0.857421875", 40, RoundingMode.ROUND_HALF_UP); + t("0b1.10110111p-1", "0.857421875", 9, RoundingMode.ROUND_HALF_UP); + + t("0b1.001010101110101p-4", "0b1.001010101110101p-4", 16, RoundingMode.ROUND_DOWN); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToDPTests.cs b/DecimalSharp.Tests/BigDecimalToDPTests.cs new file mode 100644 index 0000000..1db79b4 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToDPTests.cs @@ -0,0 +1,503 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToDP")] + public class BigDecimalToDPTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToDP() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_CEIL, + ToExpNeg = (long)-9e15, + ToExpPos = 300, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, long? dp, RoundingMode? rm) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToDP(dp, rm).ValueOf()); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("0", 0, null, null); + t("-1", -1, null, null); + t("9.999e+9000000000000000", "9.999e+9000000000000000", null, null); + t("-9.999e+9000000000000000", "-9.999e+9000000000000000", null, null); + t("1e-9000000000000000", "1e-9000000000000000", null, null); + t("-1e-9000000000000000", "-1e-9000000000000000", null, null); + t("Infinity", double.PositiveInfinity, null, null); + t("-Infinity", double.NegativeInfinity, null, null); + t("NaN", double.NaN, null, null); + t("Infinity", "Infinity", 0, null); + t("-Infinity", "-Infinity", 0, null); + + t("1", 0.5, 0, null); + t("1", 0.7, 0, null); + t("1", 1, 0, null); + t("1", 1.1, 0, null); + t("1", 1.49999, 0, null); + t("-0", -0.5, 0, null); + t("-1", -0.500001, 0, null); + t("-1", -0.7, 0, null); + t("-1", -1, 0, null); + t("-1", -1.1, 0, null); + t("-1", -1.49999, 0, null); + t("-1", -1.5, 0, null); + + t("0", 0.4, 0, null); + t("-0", -0.4, 0, null); + t("-0", -0.5, 0, null); + t("1", 0.6, 0, null); + t("-1", -0.6, 0, null); + t("2", 1.5, 0, null); + t("2", 1.6, 0, null); + t("-2", -1.6, 0, null); + + t("0", "0", 0, null); + t("-0", "-0", 1, null); + t("-0", "-0", 1, RoundingMode.ROUND_UP); + t("-0", "-0", 1, RoundingMode.ROUND_FLOOR); + t("-0", "-0", 1, RoundingMode.ROUND_HALF_EVEN); + t("0", "0", 10, null); + t("-0", "-0", 20, null); + + t("0.000000000001", "0.0000000000005", 12, null); + t("0.00000000001", "0.000000000005", 11, null); + t("0.0000000001", "0.00000000005", 10, null); + t("0.000000001", "0.0000000005", 9, null); + t("0.00000001", "0.000000005", 8, null); + t("0.0000001", "0.00000005", 7, null); + t("0.000001", "0.0000005", 6, null); + t("0.00001", "0.000005", 5, null); + t("0.0001", "0.00005", 4, null); + t("0.001", "0.0005", 3, null); + t("0.01", "0.005", 2, null); + t("0.1", "0.05", 1, null); + t("1", "0.5", 0, null); + + t("0.01", "0.00001000", 2, RoundingMode.ROUND_UP); + t("0.0039", "0.0039", 4, RoundingMode.ROUND_FLOOR); + t("-41620.65299", "-41620.65299", 6, RoundingMode.ROUND_HALF_DOWN); + t("0.0011117", "0.0011117", 7, RoundingMode.ROUND_UP); + t("938116", "938116", 6, RoundingMode.ROUND_HALF_DOWN); + t("-7187", "-7187", 4, RoundingMode.ROUND_HALF_UP); + t("-2.4263", "-2.426346", 4, RoundingMode.ROUND_HALF_EVEN); + t("-0.537", "-0.5374743", 3, RoundingMode.ROUND_HALF_DOWN); + t("652506", "652506", 3, RoundingMode.ROUND_HALF_EVEN); + t("-178587", "-178587", 3, RoundingMode.ROUND_CEIL); + t("4093", "4093", 3, RoundingMode.ROUND_UP); + t("44", "44", 1, RoundingMode.ROUND_CEIL); + t("-0.0496", "-0.049635", 4, RoundingMode.ROUND_HALF_UP); + t("-1", "-0.05", 0, RoundingMode.ROUND_UP); + t("520216039", "520216039", 7, RoundingMode.ROUND_DOWN); + t("-2932289", "-2932289", 8, RoundingMode.ROUND_FLOOR); + t("53937.3", "53937.399", 1, RoundingMode.ROUND_DOWN); + t("63101619", "63101619", 5, RoundingMode.ROUND_UP); + t("-0.00207", "-0.00207", 6, RoundingMode.ROUND_UP); + t("-0.032", "-0.03169086", 3, RoundingMode.ROUND_UP); + t("-755", "-755", 5, RoundingMode.ROUND_FLOOR); + t("-3583", "-3583", 5, RoundingMode.ROUND_DOWN); + t("-6.616", "-6.615375", 3, RoundingMode.ROUND_UP); + t("7528739", "7528739", 8, RoundingMode.ROUND_UP); + t("-0.9028", "-0.9028782", 4, RoundingMode.ROUND_CEIL); + t("-8.78762908", "-8.78762908", 8, RoundingMode.ROUND_CEIL); + t("-0.000262", "-0.0002613", 6, RoundingMode.ROUND_UP); + t("-888980.3", "-888980.3", 1, RoundingMode.ROUND_HALF_EVEN); + t("0.00009075", "0.00009075", 8, RoundingMode.ROUND_UP); + t("-4.42", "-4.4195", 2, RoundingMode.ROUND_UP); + t("-0.336889", "-0.336888682", 6, RoundingMode.ROUND_HALF_EVEN); + t("43759", "43759", 6, RoundingMode.ROUND_HALF_UP); + t("0.0000804", "0.0000804", 8, RoundingMode.ROUND_HALF_EVEN); + t("-4", "-4", 0, RoundingMode.ROUND_CEIL); + t("-3", "-3.614204", 0, RoundingMode.ROUND_CEIL); + t("336379823", "336379823", 4, RoundingMode.ROUND_DOWN); + t("310614", "310614", 7, RoundingMode.ROUND_UP); + t("-375811635", "-375811635", 8, RoundingMode.ROUND_FLOOR); + t("-5446775", "-5446775", 7, RoundingMode.ROUND_HALF_UP); + t("59.7954405", "59.7954405", 7, RoundingMode.ROUND_UP); + t("47086", "47085.84", 0, RoundingMode.ROUND_HALF_UP); + t("-2564", "-2564", 3, RoundingMode.ROUND_HALF_UP); + t("1.4069997", "1.40699967", 7, RoundingMode.ROUND_CEIL); + t("-0.4", "-0.42528874", 1, RoundingMode.ROUND_HALF_EVEN); + t("-0.00005573", "-0.000055732", 8, RoundingMode.ROUND_DOWN); + t("-0.00003014", "-0.000030137", 8, RoundingMode.ROUND_HALF_EVEN); + t("57", "57", 3, RoundingMode.ROUND_HALF_EVEN); + t("365474.9164", "365474.9164", 4, RoundingMode.ROUND_HALF_DOWN); + t("-7", "-7", 0, RoundingMode.ROUND_HALF_UP); + t("0.843206", "0.84320562", 6, RoundingMode.ROUND_HALF_DOWN); + t("-62734", "-62734", 5, RoundingMode.ROUND_FLOOR); + t("-51246", "-51246", 7, RoundingMode.ROUND_CEIL); + t("0.0003", "0.000332", 4, RoundingMode.ROUND_HALF_DOWN); + t("-609", "-609", 2, RoundingMode.ROUND_UP); + t("-0.00004595", "-0.00004595", 8, RoundingMode.ROUND_DOWN); + t("-22243", "-22243", 0, RoundingMode.ROUND_DOWN); + t("54693", "54693", 5, RoundingMode.ROUND_UP); + t("5", "5", 1, RoundingMode.ROUND_HALF_EVEN); + t("2", "2", 2, RoundingMode.ROUND_HALF_EVEN); + t("3808", "3808", 0, RoundingMode.ROUND_HALF_UP); + t("2616", "2616", 0, RoundingMode.ROUND_HALF_DOWN); + t("-2477", "-2477", 3, RoundingMode.ROUND_CEIL); + t("0.00009", "0.00008892", 5, RoundingMode.ROUND_HALF_UP); + t("8.8953", "8.8953", 5, RoundingMode.ROUND_HALF_DOWN); + t("0.07", "0.06922", 2, RoundingMode.ROUND_HALF_UP); + t("0.08", "0.08", 3, RoundingMode.ROUND_CEIL); + t("-773.0965536", "-773.0965536", 8, RoundingMode.ROUND_CEIL); + t("-326", "-326", 2, RoundingMode.ROUND_DOWN); + t("-0.356", "-0.3564473", 3, RoundingMode.ROUND_HALF_EVEN); + t("-312283993", "-312283992.7", 0, RoundingMode.ROUND_FLOOR); + t("-2.3995861", "-2.39958606", 7, RoundingMode.ROUND_FLOOR); + t("-0.0449", "-0.0449", 4, RoundingMode.ROUND_FLOOR); + t("-0", "-0.003", 0, RoundingMode.ROUND_HALF_UP); + t("85942", "85942", 2, RoundingMode.ROUND_HALF_DOWN); + t("6738", "6738.1977", 0, RoundingMode.ROUND_FLOOR); + t("-0.003", "-0.002995", 5, RoundingMode.ROUND_FLOOR); + t("-572936", "-572936", 3, RoundingMode.ROUND_HALF_EVEN); + t("684.2426407", "684.2426407", 8, RoundingMode.ROUND_HALF_EVEN); + t("-0", "-0.0007851", 1, RoundingMode.ROUND_HALF_EVEN); + t("-0", "-0.002", 0, RoundingMode.ROUND_HALF_DOWN); + t("85.05", "85.05", 3, RoundingMode.ROUND_FLOOR); + t("1.66", "1.66", 3, RoundingMode.ROUND_FLOOR); + t("-17.14", "-17.14", 2, RoundingMode.ROUND_UP); + t("80182", "80182", 6, RoundingMode.ROUND_HALF_DOWN); + t("-0.00064", "-0.00063953", 6, RoundingMode.ROUND_HALF_EVEN); + t("-3.76703298", "-3.767032983", 8, RoundingMode.ROUND_HALF_UP); + t("-0.000378", "-0.00037877", 6, RoundingMode.ROUND_CEIL); + t("675", "675.76294", 0, RoundingMode.ROUND_FLOOR); + t("0.0003", "0.00023235", 4, RoundingMode.ROUND_UP); + t("-0.0155175", "-0.0155175", 7, RoundingMode.ROUND_UP); + t("-645406477.5", "-645406477.5", 2, RoundingMode.ROUND_DOWN); + t("-0.89603", "-0.8960278", 5, RoundingMode.ROUND_HALF_EVEN); + t("866034", "866034", 7, RoundingMode.ROUND_FLOOR); + t("484.002", "484.002", 4, RoundingMode.ROUND_HALF_EVEN); + t("420", "419.83", 0, RoundingMode.ROUND_HALF_EVEN); + t("4611867124", "4611867124", 4, RoundingMode.ROUND_HALF_UP); + t("0.0080252", "0.0080252", 8, RoundingMode.ROUND_UP); + t("-0", "-0.02829833", 1, RoundingMode.ROUND_HALF_UP); + t("-8", "-8", 0, RoundingMode.ROUND_HALF_UP); + t("-0.0073554", "-0.00735541", 7, RoundingMode.ROUND_HALF_UP); + t("28", "28", 3, RoundingMode.ROUND_HALF_DOWN); + t("-3903", "-3903", 6, RoundingMode.ROUND_UP); + t("228", "228", 3, RoundingMode.ROUND_HALF_UP); + t("0.88", "0.883", 2, RoundingMode.ROUND_HALF_DOWN); + t("-0.01", "-0.009", 2, RoundingMode.ROUND_FLOOR); + t("7796.6", "7796.6", 2, RoundingMode.ROUND_CEIL); + t("0", "0.005", 0, RoundingMode.ROUND_HALF_EVEN); + t("805.25", "805.2467", 2, RoundingMode.ROUND_UP); + t("-85023", "-85023", 4, RoundingMode.ROUND_FLOOR); + t("-0", "-0.008097491", 0, RoundingMode.ROUND_CEIL); + t("-0.026", "-0.0259", 3, RoundingMode.ROUND_HALF_UP); + t("-0.00801", "-0.008007359", 5, RoundingMode.ROUND_HALF_UP); + t("30745", "30745", 6, RoundingMode.ROUND_HALF_DOWN); + t("-81", "-81", 4, RoundingMode.ROUND_HALF_EVEN); + t("-386", "-386", 4, RoundingMode.ROUND_CEIL); + t("-2876", "-2876", 5, RoundingMode.ROUND_HALF_EVEN); + t("0", "0.00002329", 4, RoundingMode.ROUND_HALF_DOWN); + t("-62453828", "-62453828", 7, RoundingMode.ROUND_HALF_EVEN); + t("0.317", "0.317", 3, RoundingMode.ROUND_FLOOR); + t("-706", "-706", 0, RoundingMode.ROUND_DOWN); + t("36.911", "36.9109527", 4, RoundingMode.ROUND_HALF_UP); + t("5040908", "5040908", 1, RoundingMode.ROUND_UP); + t("-0.08", "-0.08", 2, RoundingMode.ROUND_HALF_UP); + t("-0.352847", "-0.352847085", 6, RoundingMode.ROUND_HALF_EVEN); + t("0.001", "0.00006", 3, RoundingMode.ROUND_CEIL); + t("-0.4389", "-0.438905", 4, RoundingMode.ROUND_DOWN); + t("0.00390964", "0.00390964", 8, RoundingMode.ROUND_CEIL); + t("-35105.1", "-35105.1788", 1, RoundingMode.ROUND_CEIL); + t("-8858843.829", "-8858843.829", 3, RoundingMode.ROUND_DOWN); + t("-5946.90816", "-5946.90816", 5, RoundingMode.ROUND_FLOOR); + t("608475", "608475", 6, RoundingMode.ROUND_HALF_EVEN); + + t("-249815496353142605063083339706423770452529255711064841247978.1649", "-249815496353142605063083339706423770452529255711064841247978.16482575714251625720191747855256", 4, RoundingMode.ROUND_FLOOR); + t("-8757939868931375459275247990933877309", "-8757939868931375459275247990933877309", 37, RoundingMode.ROUND_HALF_DOWN); + t("556228688742576287254121716253667920283844645854057755303259369", "556228688742576287254121716253667920283844645854057755303259369", 25, RoundingMode.ROUND_FLOOR); + t("0", "0.00000000000000000000000000000000000000000000000029171651270270187897342247995644546232788426", 35, RoundingMode.ROUND_FLOOR); + t("-0.0000058979376152458865088785307705", "-0.000005897937615245886508878530770431196412050562641578155968", 34, RoundingMode.ROUND_UP); + t("-0.00000000000000847145658", "-0.00000000000000847145657888758222743159237", 23, RoundingMode.ROUND_FLOOR); + t("-6049825281564367887763596943301191584240212075976455", "-6049825281564367887763596943301191584240212075976455", 53, RoundingMode.ROUND_UP); + t("-64680661822322715719008107701612.741312367131318202976964422", "-64680661822322715719008107701612.74131236713131820297696442216284615573809", 27, RoundingMode.ROUND_HALF_UP); + t("-0", "-0.0000000000000000000000000000000000048810387700772580768508931440796984745771392", 29, RoundingMode.ROUND_CEIL); + t("232730083859746141163.7653402888578932348762190816502", "232730083859746141163.76534028885789323487621908165018267559238917447610653431235463768839108", 31, RoundingMode.ROUND_HALF_DOWN); + t("-499311204526771278437755030091270601.471802335", "-499311204526771278437755030091270601.47180233568698638607829334564", 9, RoundingMode.ROUND_CEIL); + t("-4793558721695298336734196955569628362250.1", "-4793558721695298336734196955569628362250.107513868618556605590137359591047843592593", 1, RoundingMode.ROUND_HALF_EVEN); + t("0.0000000000000000000000000000000000000622", "0.000000000000000000000000000000000000062176566496", 40, RoundingMode.ROUND_HALF_DOWN); + t("-393323198834362857317921391989917230.1575124832953752419421908305674188204", "-393323198834362857317921391989917230.15751248329537524194219083056741882044261538788798", 37, RoundingMode.ROUND_HALF_DOWN); + t("-0", "-0.000000000000000169092170076859363", 3, RoundingMode.ROUND_HALF_DOWN); + t("0.00085774283834918184933525579624189945402764", "0.0008577428383491818493352557962418994540276420616048890965876345513", 44, RoundingMode.ROUND_HALF_UP); + t("-127706837731025454069338274697755478243.226555768723254468591", "-127706837731025454069338274697755478243.226555768723254468591", 21, RoundingMode.ROUND_HALF_UP); + t("0.0000000000000000000000000000002", "0.00000000000000000000000000000024", 31, RoundingMode.ROUND_HALF_EVEN); + t("0", "0.0000000000000000006", 0, RoundingMode.ROUND_HALF_UP); + t("0.000000000000000000000007810237984104", "0.00000000000000000000000781023798410401506609033130277607174", 36, RoundingMode.ROUND_HALF_EVEN); + t("-0.0000000000000000000000000000000000000000000003", "-0.00000000000000000000000000000000000000000000030032464295099044566372323", 46, RoundingMode.ROUND_DOWN); + t("-685966223751248103958158215191994961086468451812432", "-685966223751248103958158215191994961086468451812432", 15, RoundingMode.ROUND_HALF_EVEN); + t("-342139733926317660019.326340161146875487297", "-342139733926317660019.326340161146875487297346019153178", 21, RoundingMode.ROUND_HALF_EVEN); + t("0", "0.000000000000000000000000000000000000000000901836202", 15, RoundingMode.ROUND_HALF_UP); + t("54703159147681578.1514852895273075959730711237955491690133829927977209580124", "54703159147681578.1514852895273075959730711237955491690133829927977209580124", 59, RoundingMode.ROUND_UP); + t("-460718430436988680547605508933197195738591668941440213118174196", "-460718430436988680547605508933197195738591668941440213118174196", 16, RoundingMode.ROUND_HALF_EVEN); + t("70597943458486911871858911963104830835210711517857117431432573585719054629372", "70597943458486911871858911963104830835210711517857117431432573585719054629372", 17, RoundingMode.ROUND_FLOOR); + t("0", "0.0000000000000000000000005", 17, RoundingMode.ROUND_DOWN); + t("612277653819449429818059108521923195679275819340316389136081740197236376194", "612277653819449429818059108521923195679275819340316389136081740197236376194", 24, RoundingMode.ROUND_HALF_EVEN); + t("0", "0.000004077002116450599035175933786605407147118579202271612670066923117668943811493201471493894", 0, RoundingMode.ROUND_FLOOR); + t("0", "0.0000000000000000454362126792715044166595091", 4, RoundingMode.ROUND_HALF_DOWN); + t("-0.00000000000000000000000247815", "-0.00000000000000000000000247815", 29, RoundingMode.ROUND_CEIL); + t("-0.000000000000000000000000000000039578053693", "-0.000000000000000000000000000000039578053693375996216932325600263217353654", 42, RoundingMode.ROUND_HALF_UP); + t("-232816283401672701377791127757043050155711815150567236808118951", "-232816283401672701377791127757043050155711815150567236808118951", 5, RoundingMode.ROUND_CEIL); + t("-29071348593675752783607764808066026", "-29071348593675752783607764808066026", 0, RoundingMode.ROUND_FLOOR); + t("-0", "-0.0000000000000000000000000000001261801374206123908708248209346534624420321535319795165638569", 3, RoundingMode.ROUND_HALF_DOWN); + t("-400979013779505784551704647545324555644743917317817725", "-400979013779505784551704647545324555644743917317817725", 51, RoundingMode.ROUND_UP); + t("-707984518604562445981560648691697348187535181109991331112833004096934116229906958", "-707984518604562445981560648691697348187535181109991331112833004096934116229906958", 33, RoundingMode.ROUND_FLOOR); + t("-0.00000000000000000000054943542078511748325889425", "-0.00000000000000000000054943542078511748325889425029425118", 48, RoundingMode.ROUND_CEIL); + t("0.000000000000000000000000000001", "0.0000000000000000000000000000000004", 30, RoundingMode.ROUND_CEIL); + t("8361324754302.257", "8361324754302.25608823898722021345099998761427662952277448263515002938433228636937277798222125", 3, RoundingMode.ROUND_CEIL); + t("47845474280015515238795364952786480611238289992139357357828.2393536", "47845474280015515238795364952786480611238289992139357357828.23935359", 7, RoundingMode.ROUND_CEIL); + t("2549907485257905040787802731022172814.032473410309278713663931353982863019132463", "2549907485257905040787802731022172814.03247341030927871366393135398286301913246263649610180999011", 42, RoundingMode.ROUND_HALF_UP); + t("7245563391265598645357861460253613932139592382610560614764364520097782949512752649", "7245563391265598645357861460253613932139592382610560614764364520097782949512752649", 40, RoundingMode.ROUND_DOWN); + t("80140230840302995211398777354070268652682793260175436489292", "80140230840302995211398777354070268652682793260175436489292", 35, RoundingMode.ROUND_HALF_DOWN); + t("-6237457908203764779831412120415113057397781437576879126960196359736451276", "-6237457908203764779831412120415113057397781437576879126960196359736451276", 46, RoundingMode.ROUND_FLOOR); + t("-64022435787355811014521281511793708435812347405139910972682589", "-64022435787355811014521281511793708435812347405139910972682589", 59, RoundingMode.ROUND_HALF_UP); + t("23773726397.29160222442891928943538179152516815326677387048397317891529", "23773726397.291602224428919289435381791525168153266773870483973178915287792", 59, RoundingMode.ROUND_CEIL); + t("-0.0000000000000000009191736362201691567821986127083610325635", "-0.00000000000000000091917363622016915678219861270836103256344707473557037101545788367584278310776658", 58, RoundingMode.ROUND_FLOOR); + t("576493832674677623548573635478304255.82263895978273", "576493832674677623548573635478304255.82263895978273", 14, RoundingMode.ROUND_HALF_DOWN); + t("0.00000000001", "0.00000000000000000000000000000000000000000000000007822968340296738406", 11, RoundingMode.ROUND_CEIL); + t("-0", "-0.00000000000000000000000000000000000000000000000803017739", 16, RoundingMode.ROUND_CEIL); + t("-76782672919180281245123823777032511965124724736456274885479622075418722", "-76782672919180281245123823777032511965124724736456274885479622075418722", 48, RoundingMode.ROUND_HALF_UP); + t("4455851923984827076883518360355220330356", "4455851923984827076883518360355220330356", 36, RoundingMode.ROUND_HALF_EVEN); + t("6861599706553109843427643365400432566541688718985576240352998201999416183743", "6861599706553109843427643365400432566541688718985576240352998201999416183743", 2, RoundingMode.ROUND_CEIL); + t("0", "0.0000083135366316053183734543904737952651532784316140061929170739473518406297062533554026617147464", 0, RoundingMode.ROUND_DOWN); + t("72361127388902796012114362477322144735533135802605580980837229637633107.0925818254603", "72361127388902796012114362477322144735533135802605580980837229637633107.09258182546029609579105130429", 13, RoundingMode.ROUND_HALF_DOWN); + t("-273219046129778472266.058485499109338596573075", "-273219046129778472266.0584854991093385965730749815531346353045049027336176088162559", 24, RoundingMode.ROUND_HALF_UP); + t("-0.00000000000007280978660680040221854732703892674800762227646", "-0.00000000000007280978660680040221854732703892674800762227646226836240552990665555", 59, RoundingMode.ROUND_HALF_DOWN); + t("6276464097096605785329824864148.527049815380996985914", "6276464097096605785329824864148.52704981538099698591393138250952524233217779", 21, RoundingMode.ROUND_UP); + t("-597198", "-597197.628834953506966767991553710700934413500204012426446876175175114500037146677042239668", 0, RoundingMode.ROUND_UP); + t("-433359038877962603713455049783", "-433359038877962603713455049783", 30, RoundingMode.ROUND_UP); + t("0.0000000000000000000000000000000006381735336173415547900207", "0.0000000000000000000000000000000006381735336173415547900206847223271181528556195", 58, RoundingMode.ROUND_UP); + t("807050820.676699481791051456", "807050820.676699481791051455096629111775329549493444751897213743866128850061622892", 18, RoundingMode.ROUND_CEIL); + t("0.0000000000000000000000000000489752745584111598026871408099", "0.000000000000000000000000000048975274558411159802687140809907", 58, RoundingMode.ROUND_FLOOR); + t("0", "0.0000000000000000000000000000000000000000000226067497099004331941912856", 36, RoundingMode.ROUND_HALF_EVEN); + t("39094507220356523575213839820749561678857032020620050894656716293.67495126324", "39094507220356523575213839820749561678857032020620050894656716293.67495126323710280607325675762434", 11, RoundingMode.ROUND_CEIL); + t("-22678769.817248435493696742588538", "-22678769.817248435493696742588538331241538369550386799148219117165563326051964281", 24, RoundingMode.ROUND_HALF_UP); + t("5767307789536064608781837241295188919", "5767307789536064608781837241295188919", 30, RoundingMode.ROUND_UP); + t("168139421336703751454723348941581.0989620502676347173183006762310303463068390391675336175", "168139421336703751454723348941581.0989620502676347173183006762310303463068390391675336175", 55, RoundingMode.ROUND_HALF_EVEN); + t("-88504154823150878334701258558002569539793415193610842759120001088201133334307983", "-88504154823150878334701258558002569539793415193610842759120001088201133334307983", 44, RoundingMode.ROUND_HALF_UP); + t("-329655464734888739743767364510089523323", "-329655464734888739743767364510089523323", 25, RoundingMode.ROUND_DOWN); + t("0.00000000000000000000084501920385200277918", "0.000000000000000000000845019203852002779189", 41, RoundingMode.ROUND_DOWN); + t("-5840123488663376216608124416421102623453621285401805153644515702191", "-5840123488663376216608124416421102623453621285401805153644515702191", 59, RoundingMode.ROUND_FLOOR); + t("-0.00000062136", "-0.00000062135994705765807424168688040116009865960794", 13, RoundingMode.ROUND_FLOOR); + t("-0.000000000000000000001", "-0.00000000000000000000000000000000000000001462340018509", 21, RoundingMode.ROUND_UP); + t("0.006", "0.0059936079684973012978514720463815026319867172", 4, RoundingMode.ROUND_CEIL); + t("526400924922583880463185416850358172941032433541198785132036360013561525242705246671523133061757", "526400924922583880463185416850358172941032433541198785132036360013561525242705246671523133061757", 38, RoundingMode.ROUND_HALF_EVEN); + t("-882873192309626516849737955750920016208815071464396145314", "-882873192309626516849737955750920016208815071464396145314", 46, RoundingMode.ROUND_HALF_EVEN); + t("-6758735221049379519.2572393", "-6758735221049379519.25723934716782621573177906", 7, RoundingMode.ROUND_CEIL); + t("-0.000000790786371520517683432954223230156393", "-0.00000079078637152051768343295422323015639290504929", 42, RoundingMode.ROUND_HALF_UP); + t("-0.00000000000000000000000000000000000091966", "-0.0000000000000000000000000000000000009196610338039484256720548095", 41, RoundingMode.ROUND_HALF_EVEN); + t("-0.00000000000541933780252974657673566396725809671507", "-0.0000000000054193378025297465767356639672580967150744942399", 50, RoundingMode.ROUND_HALF_UP); + t("-0.000000000000000000000583479626", "-0.000000000000000000000583479626800396501245049473177007318461587644875162633137088", 30, RoundingMode.ROUND_CEIL); + t("11604528953141243475", "11604528953141243475", 13, RoundingMode.ROUND_FLOOR); + t("566807769866890.02801522720838416179840190775794257854696482", "566807769866890.02801522720838416179840190775794257854696482590456963092114076898", 44, RoundingMode.ROUND_FLOOR); + t("-35620697798492911.0669248410687861643251268323797667576839159303711022", "-35620697798492911.066924841068786164325126832379766757683915930371102255700535220012496346147093317", 52, RoundingMode.ROUND_DOWN); + t("-0.0000000000000000000050597138398214172387021051", "-0.000000000000000000005059713839821417238702105087169671933387005", 46, RoundingMode.ROUND_UP); + t("-0.8174627036499993060703761337876311", "-0.81746270364999930607037613378763105641195817852303184573911882", 34, RoundingMode.ROUND_HALF_UP); + t("0.0000000000000000000016801618027332596946", "0.000000000000000000001680161802733259694523102897059933026814910108114561982575916856344241", 40, RoundingMode.ROUND_CEIL); + t("-0.0005550919624693963627417354876271038367574907", "-0.000555091962469396362741735487627103836757490736793688", 46, RoundingMode.ROUND_HALF_EVEN); + t("0.00000000000001", "0.0000000000000000005989657036", 14, RoundingMode.ROUND_CEIL); + t("26923162467831521466200388799932149017792464401239965995848900909703513553682", "26923162467831521466200388799932149017792464401239965995848900909703513553682", 59, RoundingMode.ROUND_UP); + t("0.000000000000034716604224301619113605162061332208", "0.0000000000000347166042243016191136051620613322078875442915881933", 48, RoundingMode.ROUND_HALF_DOWN); + t("4554587644116353728395891927482", "4554587644116353728395891927482", 4, RoundingMode.ROUND_HALF_UP); + t("83", "83", 1, RoundingMode.ROUND_HALF_UP); + t("-0.0000000000000000679512312597136188846870750884127001656543", "-0.0000000000000000679512312597136188846870750884127001656543162955358", 58, RoundingMode.ROUND_HALF_DOWN); + t("-0.000000000000000005843127017405787209162333", "-0.0000000000000000058431270174057872091623337743081992327769648", 42, RoundingMode.ROUND_CEIL); + t("698142412071442689875148052035405913655358215178078673989", "698142412071442689875148052035405913655358215178078673989", 31, RoundingMode.ROUND_CEIL); + t("-0.000000000000000000000000001", "-0.0000000000000000000000000000000000000009", 27, RoundingMode.ROUND_FLOOR); + t("0", "0.000000000000000000000000000000000000000000000000086322062431379058693358", 36, RoundingMode.ROUND_HALF_EVEN); + t("-7097679626212584135194693334505819500.76271239784243114877303953752095973790591", "-7097679626212584135194693334505819500.7627123978424311487730395375209597379059174819443305631091738", 41, RoundingMode.ROUND_DOWN); + t("720941616590530465684319461159925340787620861616050215112729354513077297889437424470222725372.4341", "720941616590530465684319461159925340787620861616050215112729354513077297889437424470222725372.43418", 4, RoundingMode.ROUND_DOWN); + t("-8565045.0741813", "-8565045.07418120224", 7, RoundingMode.ROUND_FLOOR); + t("7179182230007440380654240229988748528461622212340003478705", "7179182230007440380654240229988748528461622212340003478705", 16, RoundingMode.ROUND_DOWN); + t("128138852434106311723518159896099183377408757231649238006509175039", "128138852434106311723518159896099183377408757231649238006509175039", 51, RoundingMode.ROUND_UP); + t("0.0000000000000000000000000000000000071444116240971906475", "0.000000000000000000000000000000000007144411624097190647497044019271703768941206", 56, RoundingMode.ROUND_HALF_DOWN); + t("0", "0.00000000000000000000000000000000000000000000021714481944", 43, RoundingMode.ROUND_HALF_EVEN); + t("-0.0000000000000001", "-0.0000000000000000000000000034534834", 16, RoundingMode.ROUND_UP); + t("-0.0000000000000000000008286492885892336366506247591678062602", "-0.00000000000000000000082864928858923363665062475916780626021532507656936043414109352811732", 58, RoundingMode.ROUND_DOWN); + t("31161421229261423772494491055755169247634601491928", "31161421229261423772494491055755169247634601491928", 51, RoundingMode.ROUND_FLOOR); + t("1748715317929813133410156549170209422179478560908330825848622104018934659066", "1748715317929813133410156549170209422179478560908330825848622104018934659066", 57, RoundingMode.ROUND_HALF_UP); + t("-554303811557294466.269761483473739646624314242607077", "-554303811557294466.269761483473739646624314242607077815435340758612837177421989342652", 33, RoundingMode.ROUND_DOWN); + t("-0.19004485", "-0.19004485473016995992614957080209680408919713640428488619", 8, RoundingMode.ROUND_DOWN); + t("0.000252525605711892", "0.000252525605711891731866212005527221984514215823140269482997380211714402276122070798053", 18, RoundingMode.ROUND_HALF_EVEN); + t("86245969707619", "86245969707619", 14, RoundingMode.ROUND_FLOOR); + t("-31435925010862195008998682761", "-31435925010862195008998682761", 9, RoundingMode.ROUND_FLOOR); + t("-7376.12482208", "-7376.124822087908447175101", 8, RoundingMode.ROUND_CEIL); + t("0.000080221434577125714125624728141606555230430450054", "0.0000802214345771257141256247281416065552304304500535613033078792598113626175", 51, RoundingMode.ROUND_UP); + t("-6050582615205191601389958119203059837835097590785064613410822037914417495686026661", "-6050582615205191601389958119203059837835097590785064613410822037914417495686026661", 31, RoundingMode.ROUND_DOWN); + t("0.00000000000000003455493043277403696896050418463562482", "0.0000000000000000345549304327740369689605041846356248273019036250593274409786087865531980510674", 53, RoundingMode.ROUND_FLOOR); + t("-20967.65067808575", "-20967.6506780857520813447701235001803657407937", 11, RoundingMode.ROUND_HALF_EVEN); + t("568254966593770.553753276551449605949", "568254966593770.553753276551449605948238816764309803642928261672349658172008375162162314878680613", 21, RoundingMode.ROUND_UP); + t("-451.149170475956331479335", "-451.1491704759563314793340102771090380475440750267088321862964226523091325726805634622304958123379", 21, RoundingMode.ROUND_FLOOR); + t("-0.00000000000000000000000089587927281631480799", "-0.00000000000000000000000089587927281631480798176250533957436898566513857011780218162097370714526", 44, RoundingMode.ROUND_UP); + t("0.00006", "0.00005989898942742447311513559", 6, RoundingMode.ROUND_CEIL); + t("0.00000000000000000000000000000000000084666165975", "0.000000000000000000000000000000000000846661659751645", 47, RoundingMode.ROUND_HALF_EVEN); + t("-274912.8896024699", "-274912.8896024699118787839924993246206752520896053416203239133353705", 10, RoundingMode.ROUND_DOWN); + t("2884607226068313798651836226110538860137007975185098848", "2884607226068313798651836226110538860137007975185098848", 55, RoundingMode.ROUND_HALF_EVEN); + t("-0.00000000000000000002773912168", "-0.000000000000000000027739121678637743521714908420713523555500095414277237781740952561559672", 29, RoundingMode.ROUND_FLOOR); + t("-2651358523359639", "-2651358523359639", 16, RoundingMode.ROUND_HALF_UP); + t("-4813276596516131663456402092.38944176", "-4813276596516131663456402092.3894417517916213734867", 8, RoundingMode.ROUND_FLOOR); + t("-0.000000000000000000000000000000000000112895859", "-0.000000000000000000000000000000000000112895858119340820153717620708673416", 45, RoundingMode.ROUND_UP); + t("-0.0000000000000000021", "-0.0000000000000000020224974226159732231298241899365279396237510862449464734463589", 19, RoundingMode.ROUND_FLOOR); + t("-7589382547973376572325815568183010749314649708", "-7589382547973376572325815568183010749314649708", 33, RoundingMode.ROUND_HALF_DOWN); + t("842229243093860852173.05443961588175098377444082861489172139756969332835", "842229243093860852173.0544396158817509837744408286148917213975696933283408713841831638764", 50, RoundingMode.ROUND_UP); + t("-699708233495.712278374225898965891885496", "-699708233495.71227837422589896589188549642075052667001859282382939797996992686357419809583", 27, RoundingMode.ROUND_HALF_UP); + t("-0.00000000071616892037859054", "-0.000000000716168920378590537721800581109521242491374877", 26, RoundingMode.ROUND_UP); + t("3951438403.277181863849692687044689923289027507211228628773736", "3951438403.2771818638496926870446899232890275072112286287737359542096", 51, RoundingMode.ROUND_CEIL); + t("109559.01297171197941271991562118124015322", "109559.012971711979412719915621181240153223610175595763848035079898263530366", 35, RoundingMode.ROUND_FLOOR); + t("-0.00000000000000000000000000000000000000000000489005761683947", "-0.00000000000000000000000000000000000000000000489005761683946256390055271579820502403", 59, RoundingMode.ROUND_FLOOR); + t("-0.00158", "-0.00158276409341184629828973465939702170102740363504722102864514069935682480434491", 5, RoundingMode.ROUND_CEIL); + t("-2625562538887919963240549817430379735187837775384", "-2625562538887919963240549817430379735187837775384", 44, RoundingMode.ROUND_UP); + t("0", "0.00000000000000000000002", 9, RoundingMode.ROUND_DOWN); + t("6744808.28630410992583043657159413157574982400492", "6744808.28630410992583043657159413157574982400491999838773235902794700459508120619939892", 42, RoundingMode.ROUND_HALF_EVEN); + t("0.000000000000000009", "0.000000000000000009", 18, RoundingMode.ROUND_FLOOR); + t("6067881766683695479556751950119377724336039886809300136812181462", "6067881766683695479556751950119377724336039886809300136812181462", 31, RoundingMode.ROUND_DOWN); + t("0.000000000000000000000000000000000000000077241022793", "0.0000000000000000000000000000000000000000772410227935606591033087412064412570098277", 51, RoundingMode.ROUND_DOWN); + t("743268323094543466714.5656060177009296968524561226948074051004264", "743268323094543466714.565606017700929696852456122694807405100426400624651576046667459841457817767865", 43, RoundingMode.ROUND_FLOOR); + t("-596135", "-596135", 3, RoundingMode.ROUND_CEIL); + t("0.07662404229928167815820747802086592943344134084819", "0.0766240422992816781582074780208659294334413408481864862625859275536716954542357278357044523255", 50, RoundingMode.ROUND_HALF_UP); + t("-0.000000000000000000000000000885256", "-0.000000000000000000000000000885255222637729340070545710310579917592457286140653", 33, RoundingMode.ROUND_UP); + t("55893020145100569857309952693924435456669213.356281068124371401302229274073839082240544043386519", "55893020145100569857309952693924435456669213.356281068124371401302229274073839082240544043386519", 51, RoundingMode.ROUND_UP); + t("0.000000000044398802543439239843437872656117", "0.000000000044398802543439239843437872656117345711426288269229", 42, RoundingMode.ROUND_DOWN); + t("0.000000000000000000000000000026311845042475573561274888459", "0.00000000000000000000000000002631184504247557356127488845876295156781061349824020867304", 57, RoundingMode.ROUND_HALF_EVEN); + t("-127546673151161350153045221729711", "-127546673151161350153045221729711", 2, RoundingMode.ROUND_HALF_DOWN); + t("0.0000000000000000000000846081", "0.00000000000000000000008460817346743347251678412215465432867047065857", 28, RoundingMode.ROUND_FLOOR); + t("-51296363216658187515760473402291", "-51296363216658187515760473402291", 27, RoundingMode.ROUND_HALF_UP); + t("-8623967090632480689370959269411792112227821530531202541003992985", "-8623967090632480689370959269411792112227821530531202541003992985", 54, RoundingMode.ROUND_HALF_DOWN); + t("-966322003490784535731979767036707880939452169502093813823674817588484", "-966322003490784535731979767036707880939452169502093813823674817588484", 56, RoundingMode.ROUND_HALF_DOWN); + t("-272472379898107893040761485379027824396136886208", "-272472379898107893040761485379027824396136886208", 40, RoundingMode.ROUND_DOWN); + t("0.000000000000000000007578294653267877535740172858883482", "0.00000000000000000000757829465326787753574017285888348202441720573692830214583542806201", 55, RoundingMode.ROUND_HALF_EVEN); + t("25958781094763030494523126276550672249453141421083859868561356127876297714106602172585", "25958781094763030494523126276550672249453141421083859868561356127876297714106602172585", 29, RoundingMode.ROUND_HALF_DOWN); + t("0.00000000000000000000000000000000000002", "0.000000000000000000000000000000000000015806075051053843417566111132263641553843698646164", 38, RoundingMode.ROUND_HALF_DOWN); + t("-73099329416955017257739991488405608089647281115099586", "-73099329416955017257739991488405608089647281115099586", 21, RoundingMode.ROUND_HALF_EVEN); + t("-88307320.90319141093816288808957670297463", "-88307320.903191410938162888089576702974638474154077235587259266824247410860533478169707304792818", 32, RoundingMode.ROUND_CEIL); + t("-35236814557361445958969411965214520.30399877405421", "-35236814557361445958969411965214520.303998774054210302477326477", 14, RoundingMode.ROUND_CEIL); + t("-2908087206403224796868158372851057.39782067611", "-2908087206403224796868158372851057.3978206761117082535006786132666114643644421715709235528929678", 11, RoundingMode.ROUND_HALF_UP); + t("-19581413994383784948718328954653", "-19581413994383784948718328954653", 28, RoundingMode.ROUND_DOWN); + t("0.00000000000000000000000000004", "0.000000000000000000000000000040608230569366379665209245709785291404206510745612419401142658", 29, RoundingMode.ROUND_FLOOR); + t("-0.906238977426875501362745", "-0.9062389774268755013627459831223515271076867650054627805581400941104277662892230888597201", 24, RoundingMode.ROUND_CEIL); + t("0", "0.000000000000000000000025517761823978244291048210421988594612225022695964910425529", 21, RoundingMode.ROUND_DOWN); + t("663336.45734367931832199866", "663336.4573436793183219986595282312647796998714487327022132545955984591825466144183", 20, RoundingMode.ROUND_HALF_UP); + t("-461221276.52047063868261544207237644195170184", "-461221276.5204706386826154420723764419517018397461911607", 36, RoundingMode.ROUND_HALF_UP); + t("92664692270788697481952993240101", "92664692270788697481952993240101", 9, RoundingMode.ROUND_DOWN); + t("0.00000000000001", "0.0000000000000000417218487798321067688965201563233239322412080713783058725771499175637", 14, RoundingMode.ROUND_UP); + t("-0.00000000000000291161", "-0.0000000000000029116100944057582762735577555", 21, RoundingMode.ROUND_HALF_EVEN); + t("3593092835933826522602826541522473977510499517734180584911059518", "3593092835933826522602826541522473977510499517734180584911059518", 39, RoundingMode.ROUND_CEIL); + t("0.00000000000240671872382434259", "0.00000000000240671872382434258731759266816542514881094906467645247797685306920193421", 29, RoundingMode.ROUND_HALF_EVEN); + t("98445608185462908936594271820438358882244286228", "98445608185462908936594271820438358882244286228", 43, RoundingMode.ROUND_HALF_UP); + t("-38275693035627727048820160757435988950513161", "-38275693035627727048820160757435988950513161", 28, RoundingMode.ROUND_CEIL); + t("0.000000000000000007838540274247171557849126", "0.000000000000000007838540274247171557849125417291807341828802631329086161031903106930206518314803525", 42, RoundingMode.ROUND_UP); + t("0", "0.0000000000000000000000000000000000000008760161376", 38, RoundingMode.ROUND_HALF_EVEN); + t("-274462946120897177140732986024361620867165740004629583369799434.752624497847", "-274462946120897177140732986024361620867165740004629583369799434.7526244978472107528071824755321251", 12, RoundingMode.ROUND_DOWN); + t("805407519521180265118391229", "805407519521180265118391229", 27, RoundingMode.ROUND_UP); + t("4837.60752412303502514", "4837.60752412303502513085517977565448616961234363618524491896285197928079211821305450283483280681236", 17, RoundingMode.ROUND_UP); + t("19446.966116400627008657626752077217581388920002", "19446.966116400627008657626752077217581388920001650492489914443643730475", 42, RoundingMode.ROUND_HALF_EVEN); + t("259711114990641", "259711114990641", 1, RoundingMode.ROUND_FLOOR); + t("-0.0000000001", "-0.0000000000000000002", 10, RoundingMode.ROUND_UP); + t("80565580.149080509196072203611545842035798415", "80565580.1490805091960722036115458420357984148292066084650845696757793247885015079193577022206528568", 36, RoundingMode.ROUND_HALF_DOWN); + t("0.000000005126609951384222369644011060208031", "0.00000000512660995138422236964401106020803193692417523731220078957765716642", 42, RoundingMode.ROUND_FLOOR); + t("1758006742538130240388703498480688686072955030356.7524172233646685", "1758006742538130240388703498480688686072955030356.75241722336466855", 16, RoundingMode.ROUND_DOWN); + t("-128086989690.52297791537155595882257011356310571016034760745375196584546", "-128086989690.5229779153715559588225701135631057101603476074537519658454607884909539951", 59, RoundingMode.ROUND_CEIL); + t("-361166416734639117275346911473316661252428418964862.401", "-361166416734639117275346911473316661252428418964862.400974469693342990746", 4, RoundingMode.ROUND_HALF_DOWN); + t("71633752430127836728495483808.07484204148983764432608854793881189", "71633752430127836728495483808.074842041489837644326088547938811892934755621628332271860178432369", 35, RoundingMode.ROUND_HALF_UP); + t("5744453717566208360238616812981884481035389801", "5744453717566208360238616812981884481035389801", 46, RoundingMode.ROUND_DOWN); + t("2988347090930431122495200201632971168964831173901728", "2988347090930431122495200201632971168964831173901728", 31, RoundingMode.ROUND_UP); + t("2320482568655945754105081468655336561175857", "2320482568655945754105081468655336561175857", 13, RoundingMode.ROUND_HALF_EVEN); + t("0.0000000000000000000000381190632343589292", "0.0000000000000000000000381190632343589291525554226892790057468635150617798724", 40, RoundingMode.ROUND_HALF_EVEN); + t("-815303438910393610000000000000000000000000000", "-815303438910393610000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("48079804879135055337410501154945563557501499846191760613365317572636043210233866737200001", "48079804879135055337410501154945563557501499846191760613365317572636043210233866737200000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("775141321458031580151353003447938403271713528287267233801607476638641728594600000000001", "775141321458031580151353003447938403271713528287267233801607476638641728594600000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-3246099003639468003580507000000000000000000000000000000000000000000000000000000000000000000000000000", "-3246099003639468003580507000000000000000000000000000000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("616052744557652711", "616052744557652710.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-47298707260000000000000000000000000000000", "-47298707260000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("431370739475777039213491701837719630211035950221951900000000000000000001", "431370739475777039213491701837719630211035950221951900000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("54683100000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", "54683100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("672783487870821678831521822264427999625400000000000000000000000000000000000000001", "672783487870821678831521822264427999625400000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("85750000000000000000000000000000000000000001", "85750000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-357280726879877087440504485199000000000000000000000", "-357280726879877087440504485199000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-4341299477000000000000000000000", "-4341299477000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("31902000001", "31902000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("333458122140379389691720067000000000000000000000000000000000000000000001", "333458122140379389691720067000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-459839025400000000000000000000", "-459839025400000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-82390000000000", "-82390000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("76701", "76700.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("190430490057932227000000000000000000000000000000000000001", "190430490057932227000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("60159411740605592996051862591038032930184607684088677320000000000000000000000001", "60159411740605592996051862591038032930184607684088677320000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-2234900000", "-2234900000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("56189665877093832601689082910000000000000000000000000000000000000001", "56189665877093832601689082910000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("2320000000000000000000000000001", "2320000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-6305981611547961162835048322675738149574948489012480000000000000", "-6305981611547961162835048322675738149574948489012480000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("7135722984978446900000000000000000000000000000000000001", "7135722984978446900000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("7739620000000000000000000000000000000000000000000000001", "7739620000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-7310071091565097458378697755962864041334940666867342517847595229165394387202247229680000000", "-7310071091565097458378697755962864041334940666867342517847595229165394387202247229680000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("5138337172269533148524367880141880518489245800000000000001", "5138337172269533148524367880141880518489245800000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-6000", "-6000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("463879090754017750000000000000001", "463879090754017750000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-629850000000000000000", "-629850000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-205429044500000000000000000000", "-205429044500000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-5416257015618874559905147873000000000000000000000000000000000000000000000000", "-5416257015618874559905147873000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("623364421289248201317000000000000001", "623364421289248201317000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("911141136528601", "911141136528600.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-276055672501612195718314543393745315761189100000", "-276055672501612195718314543393745315761189100000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("66201703687996196493948073895661219741.79732939050299983848272445", "66201703687996196493948073895661219741.79732939050299983848272444531659415942809827190951", 26, RoundingMode.ROUND_HALF_FLOOR); + t("-432784391834045276975262545157922", "-432784391834045276975262545157922", 28, RoundingMode.ROUND_HALF_FLOOR); + t("1149345737914160007440457748332143986414.9571", "1149345737914160007440457748332143986414.957136799115537152433594986979", 4, RoundingMode.ROUND_HALF_FLOOR); + t("-8955086490844848921210649185442547", "-8955086490844848921210649185442547", 35, RoundingMode.ROUND_HALF_FLOOR); + t("425088038661656538743278817856878424164093767.85670041722429249440202331857043", "425088038661656538743278817856878424164093767.85670041722429249440202331857043013807", 33, RoundingMode.ROUND_HALF_FLOOR); + t("-309644694334054373034963302293381012433965117503313464512444644", "-309644694334054373034963302293381012433965117503313464512444644", 15, RoundingMode.ROUND_HALF_FLOOR); + t("-6113258580590430007589739873373442564851315606055053637944", "-6113258580590430007589739873373442564851315606055053637944", 20, RoundingMode.ROUND_HALF_FLOOR); + t("-79578809228411034521778967729244470830365009197702327546767865195836773388369068481948969.900741", "-79578809228411034521778967729244470830365009197702327546767865195836773388369068481948969.9007405268", 6, RoundingMode.ROUND_HALF_FLOOR); + t("-98635952437161220.96618", "-98635952437161220.9661782723695091452045447927505345126085", 5, RoundingMode.ROUND_HALF_FLOOR); + t("5306244228965561737.62447596491901907069113187489713", "5306244228965561737.62447596491901907069113187489712907837802453330192181391370636667897993", 32, RoundingMode.ROUND_HALF_FLOOR); + t("881494696226260293271264.36459456081728760273917638738994049272140009", "881494696226260293271264.36459456081728760273917638738994049272140008956721", 45, RoundingMode.ROUND_HALF_FLOOR); + t("0", "0.0000000000000000398975254", 1, RoundingMode.ROUND_HALF_FLOOR); + t("-2966907742563204474300609285105763571411556718257633358168823625207636310562902929129639632", "-2966907742563204474300609285105763571411556718257633358168823625207636310562902929129639632", 59, RoundingMode.ROUND_HALF_FLOOR); + t("4815226942078558754202763870371111530259178454324372013168459692655444158537", "4815226942078558754202763870371111530259178454324372013168459692655444158537", 58, RoundingMode.ROUND_HALF_FLOOR); + t("89735736519038061687.396102956878866121243318078603705593756032576774631567136", "89735736519038061687.396102956878866121243318078603705593756032576774631567136", 57, RoundingMode.ROUND_HALF_FLOOR); + t("-5139206863826452924558709317549576110217185", "-5139206863826452924558709317549576110217185", 10, RoundingMode.ROUND_HALF_FLOOR); + t("410799450059.233711597011245238081176283367945619000645947401973880735", "410799450059.23371159701124523808117628336794561900064594740197388073499637579092523992206", 59, RoundingMode.ROUND_HALF_FLOOR); + t("-1861173217597843873200339700375118033056165470698896905908777053211294087744", "-1861173217597843873200339700375118033056165470698896905908777053211294087744", 38, RoundingMode.ROUND_HALF_FLOOR); + t("-0", "-0.00000000000000006595", 11, RoundingMode.ROUND_HALF_FLOOR); + t("-5407783849362963393803124142731051275240080145012", "-5407783849362963393803124142731051275240080145012", 20, RoundingMode.ROUND_HALF_FLOOR); + t("-34168517091385789116719661427034183841563988149", "-34168517091385789116719661427034183841563988149", 17, RoundingMode.ROUND_HALF_FLOOR); + t("5795445846", "5795445846", 2, RoundingMode.ROUND_HALF_FLOOR); + t("8225834668202811700000", "8225834668202811700000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("-67268029621398311238261431331851556661886545942854113916050734581000000000001", "-67268029621398311238261431331851556661886545942854113916050734581000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("4100000", "4100000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("694900000000000", "694900000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("-2668752017792840000000000000000000000000000000000000000000000000000000000001", "-2668752017792840000000000000000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("5138303265393258323808903836559900000000000000000", "5138303265393258323808903836559900000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("-61599472977109463564534878506157000000000000000000000000000000001", "-61599472977109463564534878506157000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("-706579187032566119663804136174620000000000000000001", "-706579187032566119663804136174620000000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("10", "10.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("903942469098308100136613765218227935820271584538277900367517300000000000000000", "903942469098308100136613765218227935820271584538277900367517300000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("7259090494485579718152684060350290000000000000000000000000000000000000000000000000000000000", "7259090494485579718152684060350290000000000000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("50", "50.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("-336051", "-336050.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("12.345", "12.345", null, null); + t("12", "12.345", 0, null); + + tx(() => { bigDecimalFactory.BigDecimal("12.345").ToDP(-23); }, ".toDP(-23)"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToExponentialTests.cs b/DecimalSharp.Tests/BigDecimalToExponentialTests.cs new file mode 100644 index 0000000..21d2c13 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToExponentialTests.cs @@ -0,0 +1,521 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToExponential")] + public class BigDecimalToExponentialTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToExponential() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, long? dp) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToExponential(dp)); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("1e+0", 1, null); + t("1.1e+1", 11, null); + t("1.12e+2", 112, null); + + t("1e+0", 1, 0); + t("1e+1", 11, 0); + t("1e+2", 112, 0); + t("1.0e+0", 1, 1); + t("1.1e+1", 11, 1); + t("1.1e+2", 112, 1); + t("1.00e+0", 1, 2); + t("1.10e+1", 11, 2); + t("1.12e+2", 112, 2); + t("1.000e+0", 1, 3); + t("1.100e+1", 11, 3); + t("1.120e+2", 112, 3); + t("1e-1", 0.1, null); + t("1.1e-1", 0.11, null); + t("1.12e-1", 0.112, null); + t("1e-1", 0.1, 0); + t("1e-1", 0.11, 0); + t("1e-1", 0.112, 0); + t("1.0e-1", 0.1, 1); + t("1.1e-1", 0.11, 1); + t("1.1e-1", 0.112, 1); + t("1.00e-1", 0.1, 2); + t("1.10e-1", 0.11, 2); + t("1.12e-1", 0.112, 2); + t("1.000e-1", 0.1, 3); + t("1.100e-1", 0.11, 3); + t("1.120e-1", 0.112, 3); + + t("-1e+0", -1, null); + t("-1.1e+1", -11, null); + t("-1.12e+2", -112, null); + t("-1e+0", -1, 0); + t("-1e+1", -11, 0); + t("-1e+2", -112, 0); + t("-1.0e+0", -1, 1); + t("-1.1e+1", -11, 1); + t("-1.1e+2", -112, 1); + t("-1.00e+0", -1, 2); + t("-1.10e+1", -11, 2); + t("-1.12e+2", -112, 2); + t("-1.000e+0", -1, 3); + t("-1.100e+1", -11, 3); + t("-1.120e+2", -112, 3); + t("-1e-1", -0.1, null); + t("-1.1e-1", -0.11, null); + t("-1.12e-1", -0.112, null); + t("-1e-1", -0.1, 0); + t("-1e-1", -0.11, 0); + t("-1e-1", -0.112, 0); + t("-1.0e-1", -0.1, 1); + t("-1.1e-1", -0.11, 1); + t("-1.1e-1", -0.112, 1); + t("-1.00e-1", -0.1, 2); + t("-1.10e-1", -0.11, 2); + t("-1.12e-1", -0.112, 2); + t("-1.000e-1", -0.1, 3); + t("-1.100e-1", -0.11, 3); + t("-1.120e-1", -0.112, 3); + + t("NaN", double.NaN, null); + t("NaN", -double.NaN, 2); + t("Infinity", double.PositiveInfinity, null); + t("Infinity", double.PositiveInfinity, 10); + t("-Infinity", double.NegativeInfinity, 0); + t("-Infinity", double.NegativeInfinity, 1); + t("0e+0", 0, null); + t("0e+0", -0, null); + t("-5.0e-1", -0.5, 1); + t("0.00e+0", 0, 2); + t("1e+1", 11.2356, 0); + t("1.1236e+1", 11.2356, 4); + t("1.1236e-4", 0.000112356, 4); + t("-1.1236e-4", -0.000112356, 4); + t("1.12356e-4", 0.000112356, null); + t("-1.12356e-4", -0.000112356, null); + + t("1.00e+0", 0.99976, 2); + t("1.00e+2", 99.9979, 2); + t("1.00e+5", "99991.27839", 2); + t("1.000e+2", "99.999", 3); + t("1.000e+7", "9999512.8", 3); + t("1.00e+9", "999702726", 2); + t("1.000e+3", "999.964717", 3); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + + t("1e-8", "0.00000001", null); + t("1.00000000001e+3", "1000.00000001", null); + t("-5.3453435435e+8", "-53453.435435E4", null); + t("-8.8254658100092746334967191957167916942544e+17", "-882546581000927463.34967191957167916942543286", 40); + t("-4.794121828559674450610889008537305783490457e-9", "-0.00000000479412182855967445061088900853730578349045628396662493370334888944406719979291547717079", 42); + t("3.6149e+33", "3614844933096444884855774574994631.0106397808", 4); + t("5.582954000000000e-12", "0.000000000005582954", 15); + t("-3.88740271991885914774802363151163005925700000000000000000e-24", "-0.000000000000000000000003887402719918859147748023631511630059257", 56); + t("-6.87079645872437277236913190316306435274902613151676421e-20", "-0.00000000000000000006870796458724372772369131903163064352749026131516764202733298056929060151437", 53); + t("3.8181874087278104533737313621586530711155405443818235503358935045749888900678e+35", "381818740872781045337373136215865307.11155405443818235503358935045749888900677769535371296063", 76); + t("-7.11375441247784115059912118586189732891550e+20", "-711375441247784115059.91211858618973289154952986", 41); + t("6.5783e+24", "6578282366667302135641813.7249573246362582", 4); + t("6.000000000000000000000e-20", "0.00000000000000000006", 21); + t("-5.3799672107777e+13", "-53799672107777", 13); + t("-6.949e-23", "-0.00000000000000000000006948849870723", 3); + t("-8.073585184316705309757817e+25", "-80735851843167053097578169.623098209399637950843019109979317", 24); + t("-4.2956483e-12", "-0.0000000000042956482047751", 7); + t("-6.1162155721951440801240154580459651167830311633e+15", "-6116215572195144.0801240154580459651167830311633", 46); + t("-7.263265230767e-21", "-0.000000000000000000007263265230766073544739", 12); + t("-2.3013406115701776345891815e+18", "-2301340611570177634.5891814408272260224632", 25); + t("-6.0299793663e+30", "-6029979366232747481609455093247.705001183386474", 10); + t("-2.97544304967e+21", "-2975443049668038511693.75547178021412", 11); + t("-4.1471192639160032e+10", "-41471192639.1600315953295208128538183546", 16); + t("-3.61201776785294987e+27", "-3612017767852949869824542721.1595027189", 17); + t("-6.9983494044506115115e+17", "-699834940445061151.14676", 19); + t("-1.4580700323629245038287e+20", "-145807003236292450382.86958174", 22); + t("-8.54e+10", "-85390930743", 2); + t("-2.715269856970717e+19", "-27152698569707163435", 15); + t("-5.67681004e+20", "-567681003999187989540.627303416332508226276308449233", 8); + t("-2.06809e+27", "-2068085084336615438842661921.06985539576218546524301", 5); + t("-2.92273061370427012250925e+14", "-292273061370427.0122509240087955481845060858420928631", 23); + t("-4.3355e-17", "-0.0000000000000000433542", 4); + t("-3.491610942584e+21", "-3491610942583064798345", 12); + t("-8.701944635985129980360621e+16", "-87019446359851299.8036062002728328", 24); + t("-4.9e-10", "-0.000000000486409475991", 1); + t("-4.82125e+19", "-48212433366063403866", 5); + t("-7.95593941e-20", "-0.000000000000000000079559394098236", 8); + t("-2.00563e-10", "-0.0000000002005622924388", 5); + t("-6.9777057921142634382521825e+16", "-69777057921142634.3825218243275152606161149381", 25); + t("-8.42591e+14", "-842590769172062", 5); + t("-6.35123264409e+27", "-6351232644080754054285724566", 11); + t("-5.508835492577586495894259979e-28", "-0.00000000000000000000000000055088354925775864958942599785412", 27); + t("-2.667451876e+12", "-2667451875964", 9); + t("-6.6444610474323616283e+26", "-664446104743236162820999716", 19); + t("-2.419775049243e+12", "-2419775049242.726", 12); + t("-5.32e-18", "-0.000000000000000005319", 2); + t("-8.63030355223e-26", "-0.000000000000000000000000086303035522286938593814060049934", 11); + t("-2.5046920981956385048538613818080285657602718e+17", "-250469209819563850.48538613818080285657602717018", 43); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + + t("0e+0", "-0.0E-0", null); + t("-2.856376815219143184897347685012382222462687620998915470135915e+6", "-2856376.815219143184897347685012382222462687620998915470135915511363444", 60); + t("7.75700e-24", "0.000000000000000000000007757", 5); + t("7.0e-1", "0.7", 1); + t("5.2109749078977455423107465583658126e+37", "52109749078977455423107465583658126637", 34); + t("3.631093819552528994444977110063007461579154042777868294000e-29", "0.00000000000000000000000000003631093819552528994444977110063007461579154042777868294", 57); + t("-9.893937860425888e+8", "-989393786.042588804219191", 15); + t("8.7978043622607467e+42", "8797804362260746751563912625017414439944006.5804807", 16); + t("-4.6561702764394602621e-7", "-0.000000465617027643946026213823955447791862428108248596086901464075785390015", 19); + t("-2.542770482242902215596924884302407e+8", "-254277048.224290221559692488430240765024783", 33); + t("2.70000000e-8", "0.000000027", 8); + t("-8.0291821891769794408790934252924453237e+16", "-80291821891769794.408790934252924453237503615825249362166", 37); + t("-8.05295923004057358545854771e-16", "-0.0000000000000008052959230040573585458547716514262", 26); + t("-2.786758e-21", "-0.00000000000000000000278675879025858093817787290334306", 6); + t("-8.0160835624737225803853824687641777660406527e+20", "-801608356247372258038.538246876417776604065270622886204812876", 43); + t("-7.2849054887999144694619191770897589e+27", "-7284905488799914469461919177.08975892527524", 34); + t("-7.586e-17", "-0.00000000000000007586908", 3); + t("-5.9508150933636580674249602941673984254864e+20", "-595081509336365806742.496029416739842548642249", 40); + t("-3.526911897e-18", "-0.000000000000000003526911897770082481187", 9); + t("-5.774e-22", "-0.0000000000000000000005774729035676859", 3); + t("-6.4700957007714124190210074e-13", "-0.00000000000064700957007714124190210074383", 25); + t("-5.610492e+21", "-5610492566512449795573", 6); + t("-6.015e+23", "-601556443593022914280678", 3); + t("-6.0673361553344e+11", "-606733615533.448288878", 13); + t("-3.1e+26", "-315617199368461055533962323.071668327669249", 1); + t("-9.1391079512104562032343e+24", "-9139107951210456203234346", 22); + t("-2.0441e+21", "-2044198307917443182711", 4); + t("-8.21283723216249535240085606500821783973097233e+23", "-821283723216249535240085.606500821783973097233814324", 44); + t("-6.375e+14", "-637540984314799.4", 3); + t("-2.17797482005219478530856429744726e+29", "-217797482005219478530856429744.7268928676963181", 32); + t("-3.9547e+11", "-395476721391", 4); + t("-6.8927e+21", "-6892798573971046301111", 4); + t("-6.33842141402916538926e-12", "-0.000000000006338421414029165389261335065112712777", 20); + t("-4.5727e-30", "-0.000000000000000000000000000004572725511159166", 4); + t("-7.8847457779026882221249217577974e-17", "-0.000000000000000078847457779026882221249217577974", 31); + t("-2.64916231640264927e+12", "-2649162316402.649271824", 17); + t("-1.73604404e+28", "-17360440496948254515028685124.37795415803082546457797184294", 8); + t("-8.680224985623e+16", "-86802249856236148.11694273469092873", 12); + t("-4.3e-19", "-0.00000000000000000043859841576346037715462713764211635", 1); + t("-7.68867535389098159141717105e-11", "-0.000000000076886753538909815914171710501337139", 26); + t("-5.24325038611090505928389422325001606e+21", "-5243250386110905059283.894223250016067979080420266", 35); + t("-1.38e-21", "-0.0000000000000000000013874592057586367688528204069850262406", 2); + t("-7.308601949094508589445770582074109410615037e+24", "-7308601949094508589445770.5820741094106150373221910779", 42); + t("-3.2638e+13", "-32638405387645.3309565877781780222317335852159983", 4); + t("-3.55454737448094719019291183206515059962378e+22", "-35545473744809471901929.118320651505996237856336054914", 41); + t("-5.3906242252792e-11", "-0.00000000005390624225279268530907215395611", 13); + t("-8.86760873811213105078e+15", "-8867608738112131.050787", 20); + t("-4.78129254835567e-23", "-0.00000000000000000000004781292548355671480462711435866243551", 14); + t("-6.4694208834502691835879021438795583630205e-19", "-0.00000000000000000064694208834502691835879021438795583630205", 40); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_CEIL; + + t("0e+0", "0E0000000000", null); + t("0e+0", "-0E01", null); + t("0.00e+0", "-0E00000000001", 2); + t("3.0465655253692145345165166442116e-14", "0.0000000000000304656552536921453451651664421156", 31); + t("9.0573943842008592406279608542923313381394286641978907203396551e+22", "90573943842008592406279.60854292331338139428664197890720339655043720040907662489784", 61); + t("-1.17181502970008783734855040984899000e-1", "-0.117181502970008783734855040984899", 35); + t("-5.28860565e-16", "-0.00000000000000052886056528317233012115396784629214632", 8); + t("6.4114675970838738000e-18", "0.0000000000000000064114675970838738", 19); + t("8.00000000000000000000e-20", "0.00000000000000000008", 20); + t("2.74000064578288771723078597711103520450391668117802304078152085625023633681179e+24", "2740000645782887717230785.977111035204503916681178023040781520856250236336811781347278", 77); + t("8.1936742669491704846805837777816457628e-16", "0.00000000000000081936742669491704846805837777816457628", 37); + t("-7.2157448e+14", "-721574484716710.00141299844961546", 7); + t("-5.321807464703650000000e-15", "-0.00000000000000532180746470365", 21); + t("-4.449e+27", "-4449471658582621135143349142.228707647170080816912435271162", 3); + t("-4.922915821313919623758e+19", "-49229158213139196237.584", 21); + t("-6.996668225774098e-14", "-0.000000000000069966682257740984029052", 15); + t("-8.6856039174822133942616012424795168e+11", "-868560391748.2213394261601242479516861829472792", 34); + t("-8.461e+21", "-8461810373307862460504", 3); + t("-3.898716627703194625824411967e+25", "-38987166277031946258244119.67718", 27); + t("-2.821935496755e+26", "-282193549675582402670759843.23655", 12); + t("-3.49e-22", "-0.0000000000000000000003491662482987", 2); + t("-3.362111778576231615366457333e-14", "-0.0000000000000336211177857623161536645733316587527475522615", 27); + t("-5.9933e-13", "-0.00000000000059933412636903331", 4); + t("-2.77927721e+29", "-277927721100404435781172100113.4136636412460458083951", 8); + t("-1.876833722329e-10", "-0.0000000001876833722329987477942", 12); + t("-6.5e+14", "-653341175209856", 1); + t("-8.627291840173867961e+14", "-862729184017386.7961", 18); + t("-3.9137457165597668391301218029e-11", "-0.00000000003913745716559766839130121802935022889", 28); + t("-8.95e+10", "-89532775488", 2); + t("-2.1395541875015568986238e-17", "-0.000000000000000021395541875015568986238771696", 22); + t("-4.98575853353890809143399546448630559732119628e-12", "-0.00000000000498575853353890809143399546448630559732119628509", 44); + t("-8.99e+16", "-89989591559494822", 2); + t("-3.49346327e+22", "-34934632714180035424463", 8); + t("-3.5699537605753905457597e-14", "-0.00000000000003569953760575390545759785014980652333323889116", 22); + t("-2.9892536880349975618286e+12", "-2989253688034.9975618286212199904979534461637613", 22); + t("-3.04383919217904949618e+10", "-30438391921.790494961888803732171", 20); + t("-8.232411544e+17", "-823241154405701456", 9); + t("-5.809151226990464016815e-16", "-0.00000000000000058091512269904640168152354", 21); + t("-8.522042397326932431e+13", "-85220423973269.324312660179132118", 18); + t("-7.5210942e-22", "-0.000000000000000000000752109428925015", 7); + t("-5.2018321449543e+23", "-520183214495439298725191.09", 13); + t("-6.04084045453711395629268198016245611021901815e+21", "-6040840454537113956292.68198016245611021901815486929628647", 44); + t("-1.495478178996755138125934544343674798e-13", "-0.00000000000014954781789967551381259345443436747983317353423", 36); + t("-6.881484497510733524151245220630282259985306546537e+16", "-68814844975107335.241512452206302822599853065465371507616758", 48); + t("-4.7121389019956e-14", "-0.00000000000004712138901995619", 13); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + + t("-9.99999999000000009e+8", "-999999999.000000009e-0", null); + t("-3.99764422903251220452704763278376060858663250289320247532595e+24", "-3997644229032512204527047.63278376060858663250289320247532594416986984981431156065660613", 59); + t("5.534083545686157907280686578717428772e+12", "5534083545686.157907280686578717428772", 36); + t("5.00000000e-9", "0.000000005", 8); + t("-4.08363116583051e+14", "-408363116583051", 14); + t("9.278230415634296945273818e+19", "92782304156342969452.738186255580532649103987374718221928871873054827841260470670536425", 24); + t("-1.08732508998603085454662e-12", "-0.000000000001087325089986030854546619968259691229662152159029641023997866843605032534351388775075", 23); + t("3.5288804517377606688698e+32", "352888045173776066886981811418233.218955856086", 22); + t("4.32188781438877554e+16", "43218878143887755.42593887518334667202", 17); + t("-8.15e+2", "-815", 2); + t("1.515077312590223222678749527e+18", "1515077312590223222.678749527895871363186918977679783240817218232896076765321818445939718165", 27); + t("-8.0538186421664536509917032729912932814374102e+20", "-805381864216645365099.17032729912932814374101821", 43); + t("-3.4367097301002099047381e+14", "-343670973010020.990473804391071456587732173", 22); + t("-5.3421e-12", "-0.0000000000053420288504", 4); + t("-2.6320052e+23", "-263200517731973006983184.60341959097016190770542276", 7); + t("-4.5e-11", "-0.000000000044673422483", 1); + t("-7.232463101115829118145025733451801e-17", "-0.00000000000000007232463101115829118145025733451800457178", 33); + t("-1.18320100044154762448545914170978206041022039e+22", "-11832010004415476244854.5914170978206041022038489", 44); + t("-7.745237371276392645711e+21", "-7745237371276392645710.0521930569226728841707200771", 21); + t("-4.431559500053255695643e-10", "-0.000000000443155950005325569564213010993378905", 21); + t("-2.5e-24", "-0.000000000000000000000002443", 1); + t("-5.005027028439023958391203127005503621542e-11", "-0.0000000000500502702843902395839120312700550362154137", 39); + t("-6.453525377934213334367e-22", "-0.00000000000000000000064535253779342133343665123283565", 21); + t("-4.5594370326121718626850982373529e+13", "-45594370326121.71862685098237352845979966987", 31); + t("-1.709e+16", "-17088248121660259", 3); + t("-3.9047581533864713e+16", "-39047581533864712.6574405", 16); + t("-2.08804202e-17", "-0.000000000000000020880420127397564274443250271135", 8); + t("-6.801694635944774655689008216925036e+15", "-6801694635944774.65568900821692503508025", 33); + t("-8.7691286374104240967931800593734e+19", "-87691286374104240967.93180059373367907299683816381677816389", 31); + t("-2.802257731715238453e-29", "-0.000000000000000000000000000028022577317152384526775320012", 18); + t("-4.4705e+22", "-44704405768781565005877.813010169083", 4); + t("-4.17374908496486449232e-10", "-0.00000000041737490849648644923105632500267064", 20); + t("-2.2707e-10", "-0.00000000022706134122862417334386435", 4); + t("-2.85432e-24", "-0.0000000000000000000000028543100839983854161", 5); + t("-5.79188949e+12", "-5791889489461.643555240257", 8); + t("-7.46e+15", "-7459701910718662.03421293892346992893463534702", 2); + t("-1.0535086280629e+25", "-10535086280628995915087428.2423609320023833125322801559606", 13); + t("-2.9074412651647188367106e+30", "-2907441265164718836710598468491.31550321772", 22); + t("-5.010945976711327691649e+27", "-5010945976711327691648509517.2305", 21); + t("-8.8633960213386533e-20", "-0.0000000000000000000886339602133865324283362544", 16); + t("-3.1891844834898211661452730714015664837805e+19", "-31891844834898211661.45273071401566483780434051217", 40); + t("-5.083380976014365533843229882526437e+28", "-50833809760143655338432298825.264367948359", 33); + t("-6.8e-16", "-0.000000000000000678534987604148025611184", 1); + t("-7.9e+30", "-7838656097386639584904346062976.9346038436", 1); + t("-6.30535781e+20", "-630535780834495012856", 8); + t("-9.663e-30", "-0.00000000000000000000000000000966289400023904753107633012", 3); + t("-2.315198482309e+12", "-2315198482308.7361348", 12); + t("-8.158235289416e+18", "-8158235289415958939", 12); + t("-4.1618890517404316933699206360639988582832624525e+23", "-416188905174043169336992.063606399885828326245241437", 46); + t("-5.97550716981833990839441709632e+21", "-5975507169818339908394.41709631281058258352209", 29); + t("-6.3372e-18", "-0.000000000000000006337122571683959413228", 4); + t("-8.9189088e+18", "-8918908714500548003.38400978696756078013348", 7); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + + t("-5.002239116605888927178702930656e-39", "-0.00000000000000000000000000000000000000500223911660588892717870293065633642", 30); + t("-8.52292947230244775435e+29", "-852292947230244775434968241532.494643593912804433318745222587246680109833509655450267792446", 20); + t("-6.1169514510867e+10", "-61169514510.8673382", 13); + t("-8.05745763527307676170759722175169266017831695215e+48", "-8057457635273076761707597221751692660178316952146", 47); + t("-4.923572102098e+10", "-49235721020.9847017846898652687600227388412980598816", 12); + t("-7.981341661715027117746906076515945e+41", "-798134166171502711774690607651594491039629", 33); + t("-8.00e-3", "-0.008", 2); + t("8.517466793430899278197016892000000000000e-15", "0.000000000000008517466793430899278197016892", 39); + t("-3.032293512e+0", "-3.0322935124071923328711934463341802038", 9); + t("-2.60682904403489305678908771323995810138267385200000000e-20", "-0.00000000000000000002606829044034893056789087713239958101382673852", 53); + t("-3.935816927273980e+20", "-393581692727398036652.850960055902271", 15); + t("-8.5902152501051e+29", "-859021525010507210136559039003.689834129033952321238", 13); + t("-7.24491e-30", "-0.00000000000000000000000000000724490826045045451271534", 5); + t("-8.4948070285349193974989221504919380656715136165603325e+24", "-8494807028534919397498922.15049193806567151361656033246", 52); + t("-6.3295239596e-17", "-0.00000000000000006329523959626011114164", 10); + t("-3.1725692353e+30", "-3172569235260846783669130724638.711", 10); + t("-4.065727077e+11", "-406572707673.336570352310681187663765", 9); + t("-6.82883869249998075574247223155497e+18", "-6828838692499980755.7424722315549682855987375899188309581152", 32); + t("-2.56144400427045214943786338e+24", "-2561444004270452149437863.38354535663028539", 26); + t("-4.97637439956044400125498868e+23", "-497637439956044400125498.8682100590602459937304614141772", 26); + t("-4.307891929198702822746534506143e+29", "-430789192919870282274653450614.349564081", 30); + t("-8.55e-27", "-0.00000000000000000000000000855367295711812079", 2); + t("-7.906e+11", "-790612526329.410459220189562", 3); + t("-3.1841363e-22", "-0.00000000000000000000031841363", 7); + t("-6.2068049304845006e+20", "-620680493048450055389.3227069760888437941041", 16); + t("-8.4809476e+18", "-8480947614295114807.320148688", 7); + t("-2.287988570734255855e+23", "-228798857073425585542366.399034916953775", 18); + t("-8.148647139762925073276164486240320698e+21", "-8148647139762925073276.1644862403206980851079", 36); + t("-6.87643138785664756e-12", "-0.0000000000068764313878566475604352570287089535238582267443", 17); + t("-3.709587e+18", "-3709586618852569033.55141868", 6); + t("-6.8086794224e+28", "-68086794224433270564431694468.814537646575833889824621540849", 10); + t("-4.966301085179e+19", "-49663010851788946007", 12); + t("-5.34439184068052811184219234494114e+26", "-534439184068052811184219234.494113670484623394", 32); + t("-2.798732412e+16", "-27987324119455299", 9); + t("-1.554430791885961957e+15", "-1554430791885961.956863404519493346081223", 18); + t("-6.90619083822075003978e+24", "-6906190838220750039778836.289105048686876596", 20); + t("-1.108034176809770578315e+12", "-1108034176809.7705783154", 21); + t("-1.43e+22", "-14266566332440117777110.63461224926682073525873105", 2); + t("-9.15e+13", "-91477543307040.916791223", 2); + t("-1.1001e+26", "-110010856476508992391958436.9355559264588205214557001854", 4); + t("-1.2e+16", "-12148027447349021", 1); + t("-4.4e+13", "-44268551660889.40880208546489742632181832780494", 1); + t("-8.62058920338555484081691e+19", "-86205892033855548408.169086865949596390775", 23); + t("-5.2e-13", "-0.00000000000051876025261394172", 1); + t("-4.88063953404884862027221562057786242658496407473e-11", "-0.0000000000488063953404884862027221562057786242658496407473", 47); + t("-5.255e+18", "-5254530327311322805.9528217", 3); + t("-6.4630488003995117e-11", "-0.0000000000646304880039951167486", 16); + t("-8.638990742871e-16", "-0.0000000000000008638990742870608", 12); + t("-1.57817750020560815944470062e+12", "-1578177500205.60815944470062002898187", 26); + t("-3.6558384593093900422637e-27", "-0.00000000000000000000000000365583845930939004226367940618", 22); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_DOWN; + + t("4.95474614815842e+38", "495474614815842191683004449862568813538.573064401156", 14); + t("-8.9667567079038139e+16", "-89667567079038139", 16); + t("-7.0e+2", "-703", 1); + t("-2.6249e+33", "-2624861185343559570287214983819906", 4); + t("-6.510119186347371697501169416839709631422185436811698613000000000000000000000000000000e-31", "-0.0000000000000000000000000000006510119186347371697501169416839709631422185436811698613", 84); + t("7.73e+3", "7729", 2); + t("1.4393781011009257793117531801549e+4", "14393.781011009257793117531801548751", 31); + t("8.4e+6", "8404542", 1); + t("8.471284625267663009248667391059202502589207637435209861233007389000000000000000e-35", "0.00000000000000000000000000000000008471284625267663009248667391059202502589207637435209861233007389", 78); + t("-5.26079297227015e+31", "-52607929722701509263909039511536.9266822991", 14); + t("-4.63550600857003551411914120562163394e+15", "-4635506008570035.51411914120562163394396594237358863897062", 35); + t("-7.8219563406482338767189100434751303552919130625101491e+27", "-7821956340648233876718910043.4751303552919130625101491", 52); + t("-6.977184098e+17", "-697718409782854734", 9); + t("-8.1e+15", "-8092701222454628.9934935902179330839653799891168", 1); + t("-3.872944373744596915691884729973e+15", "-3872944373744596.91569188472997336351132980366520033057011287", 30); + t("-1.389676e+11", "-138967565295.146055555208419143848718279114979831585", 6); + t("-2.218316993130903882223e+19", "-22183169931309038822.22612", 21); + t("-3.370809304e-25", "-0.000000000000000000000000337080930401566", 9); + t("-6.1503e+19", "-61503417721509415792.24703", 4); + t("-3.13657134e-22", "-0.00000000000000000000031365713378439345", 8); + t("-1.9e-10", "-0.000000000187981", 1); + t("-2.596508353714425677970049724e+28", "-25965083537144256779700497237.5841327343962292316215149169", 27); + t("-4.151454545748277604112308101174917062e+11", "-415145454574.827760411230810117491706171981266892178", 36); + t("-1.3e-18", "-0.000000000000000001319061308619561567664259803361817", 1); + t("-1.5294854487046553159e+24", "-1529485448704655315921667", 19); + t("-1.9365487654708143765583400538310103350799e-13", "-0.000000000000193654876547081437655834005383101033507988", 40); + t("-3.88128259276357427027515474e+25", "-38812825927635742702751547.353", 26); + t("-5.64525474904155517374289736218e-11", "-0.00000000005645254749041555173742897362182099811344", 29); + t("-8.94963385755006409131430087734467745e+22", "-89496338575500640913143.0087734467744538", 35); + t("-3.7551731901764025e+17", "-375517319017640249", 16); + t("-7.601921e-16", "-0.00000000000000076019214974360137746140339586742455753", 6); + t("-6.93501087055e+20", "-693501087055377288564", 11); + t("-1.283656440009563e+24", "-1283656440009563292695670.575360580373829197017512", 15); + t("-4.9556506e+13", "-49556505932168.7211084603", 7); + t("-8.133584588946e+26", "-813358458894586332533196788.490201803951456991010654609646", 12); + t("-3.824207296e+22", "-38242072955850210158724", 9); + t("-4.2168087e-12", "-0.00000000000421680868317080291", 7); + t("-7.152812829e+15", "-7152812829336253.782723153403637377960530795", 9); + t("-8.0469635248612874571e+16", "-80469635248612874.5712104436", 19); + t("-2.726549954018643349550392804e+11", "-272654995401.8643349550392803783934819148125595437353472547", 27); + t("-2.477986360297097033217143e+30", "-2477986360297097033217143442370.539404", 24); + t("-2.7620555408e+15", "-2762055540757162", 10); + t("-5.044e+10", "-50436788962", 3); + t("-1.51176171306898543927009427965761639e+17", "-151176171306898543.9270094279657616389483779413616294465635", 35); + t("-1.77876313221062362e+17", "-177876313221062362.01", 17); + t("-4.28033364715744300662536e+13", "-42803336471574.430066253616", 23); + t("-6.053e-13", "-0.00000000000060527568964627046163209582", 3); + t("-3.9447068214322315685949701607748761e+16", "-39447068214322315.685949701607748760885392781169754754427622", 34); + t("-4.76203665586552028e+15", "-4762036655865520.285", 17); + t("-7.442141482296791204320219247230530359e+24", "-7442141482296791204320219.2472305303585223494415", 36); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_EVEN; + + t("-4.3502707501164e+36", "-4350270750116411997402439304498892819", 13); + t("9.5e-21", "0.0000000000000000000094520280724178734152", 1); + t("1.39631186750554172785676012693418617250072200744214625994656047727270672248243741907e+34", "13963118675055417278567601269341861.725007220074421462599465604772727067224824374190703237660781", 83); + t("5.9446570e-26", "0.00000000000000000000000005944657036540768164877637239177740419063920648", 7); + t("7.00000e-12", "0.000000000007", 5); + t("-2.87e+14", "-287060740776209.3950381715", 2); + t("3.411740542875509329e+24", "3411740542875509328514044", 18); + t("-6.20235112738687046118395830000000000000000000000e-29", "-0.000000000000000000000000000062023511273868704611839583", 47); + t("2.94349130121570276626863135396717336528655493e+19", "29434913012157027662.686313539671733652865549279174", 44); + t("4.01255076512828067130306533670644537832e-10", "0.000000000401255076512828067130306533670644537831678294548", 38); + t("-5.4277306444432e+11", "-542773064444.317654960431120452254700391693837992", 13); + t("-4.355706886680889557797360814402e+30", "-4355706886680889557797360814401.536556745674646509159280626", 30); + t("-1.29e-15", "-0.00000000000000128978312277001609181774216296380783932", 2); + t("-1.0588973816292989769e+25", "-10588973816292989768709129.1767038708798755780352204", 19); + t("-3.210569596e+10", "-32105695962.8803639621", 9); + t("-7.18504270173744681360682714959e+28", "-71850427017374468136068271495.87", 29); + t("-4.615682142828269066227773895179987062919e+20", "-461568214282826906622.7773895179987062919071922", 39); + t("-1.3864477517287155526073e+13", "-13864477517287.15552607265", 22); + t("-6.793120028e+13", "-67931200280922.72252141789646787475433427482", 9); + t("-8.075e-18", "-0.000000000000000008074975073002274636799975", 3); + t("-8.360228691054180854419062530687032074820667001e+24", "-8360228691054180854419062.530687032074820667001120752628", 45); + t("-3.0763956760417194035216e-12", "-0.000000000003076395676041719403521594", 22); + t("-2.5288383e+25", "-25288383009460922631988717.84659997837058450749", 7); + t("-4.554185192e+29", "-455418519247311560996997520087.98189", 9); + t("-9.135175372324138467397264e+11", "-913517537232.413846739726417", 24); + t("-8.257259383044471855222900534859251889332388855848e-10", "-0.0000000008257259383044471855222900534859251889332388855848", 48); + t("-7.651597268450922707e-13", "-0.000000000000765159726845092270720405167100094", 18); + t("-8.952011763950994514e+26", "-895201176395099451377549961.34870447", 18); + t("-2.7395479569618982298152060567357e-10", "-0.00000000027395479569618982298152060567357", 31); + t("-1.31151451700453378841431e+24", "-1311514517004533788414313", 23); + t("-5.915297930316863891e-10", "-0.0000000005915297930316863890707686339684395", 18); + t("-1.449e-27", "-0.0000000000000000000000000014487033279693402845128265141859", 3); + t("-3.7e+10", "-36919550406.826974442743517918128", 1); + t("-3.945347688940382499631779106638865e+13", "-39453476889403.824996317791066388653", 33); + t("-8.547704e-29", "-0.0000000000000000000000000000854770378842608635356", 6); + t("-3.76e+25", "-37618296325402619735777629.467812385256281737441412", 2); + t("-8.031066086398624e+28", "-80310660863986235667567286452", 15); + t("-4.038276256088135496e-17", "-0.000000000000000040382762560881354955896694823328777602811", 18); + t("-1.77173574740860868e+25", "-17717357474086086837250852", 17); + t("-1.421967649e+21", "-1421967648805122645888", 9); + t("-4.7e+11", "-469485715327", 1); + t("-7.372223291560455075681748682810527006883e+16", "-73722232915604550.75681748682810527006882666313809409", 39); + t("-8.9539396357e+14", "-895393963565598", 10); + t("-8.14646103854802172250414801405e+10", "-81464610385.48021722504148014045579178726", 29); + t("-1.2053415734425581e+12", "-1205341573442.5581371841633131879", 16); + t("-8.35214176861046133596101313170854966756043001e+28", "-83521417686104613359610131317.0854966756043001041619492", 44); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + + t("-2.033619450856645241153977e+0", "-2.03361945085664524115397653636144859", 24); + t("1.130e+8", "112955590.0430616", 3); + t("-2.1366468193419876852426155614364269e+10", "-21366468193.419876852426155614364269", 34); + t("5.82086615659566151529e+7", "58208661.56595661515285734890860077163", 20); + t("9.1615809372817426111208e+6", "9161580.937281742611120838868847823478250167882379624", 22); + t("3.8976506901061164197e+1", "38.97650690106116419699490320634490920742414", 19); + t("9.0994914931570087194607344641722310104e+6", "9099491.4931570087194607344641722310103895224905", 37); + t("6.06e+5", "605633", 2); + t("2.6999974790473705518992117e+1", "26.9999747904737055189921170044987", 25); + t("6.7108801361722e+6", "6710880.136172156342982663450743452", 13); + t("-8.0e+0", "-8", 1); + t("3.000e-2", "0.03", 3); + t("-4.7e+2", "-469", 1); + t("-6.3000e+0", "-6.3", 4); + t("-5.4e+2", "-542", 1); + t("-5.2000e+0", "-5.2", 4); + t("-9.00000e-2", "-0.09", 5); + t("-3.1000e-1", "-0.31", 4); + t("-4.4e+2", "-436", 1); + t("-3.00e+0", "-3", 2); + t("-5.00e-2", "-0.05", 2); + t("1.00e-2", "0.01", 2); + + t("1.23e+2", "123", null); + t("1e+2", "123", 0); + t("1e+2", "123", -0); + + tx(() => { bigDecimalFactory.BigDecimal(1.23).ToExponential(-23); }, ".toExponential(-23)"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToFixedTests.cs b/DecimalSharp.Tests/BigDecimalToFixedTests.cs new file mode 100644 index 0000000..af173e1 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToFixedTests.cs @@ -0,0 +1,532 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToFixed")] + public class BigDecimalToFixedTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToFixed() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, long? dp) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToFixed(dp)); + }; + + t("100.0", 99.9512986, 1); + t("10.0", 9.95036, 1); + t("1.0", 0.99, 1); + t("0.10", 0.09906, 2); + t("0.010", 0.0098034, 3); + + t("NaN", double.NaN, 2); + t("Infinity", double.PositiveInfinity, 2); + t("-Infinity", double.NegativeInfinity, 2); + + t("1111111111111111111111.00000000", "1111111111111111111111", 8); + t("0.1", 0.1, 1); + t("0.10", 0.1, 2); + t("0.100", 0.1, 3); + t("0.01", 0.01, 2); + t("0.010", 0.01, 3); + t("0.0100", 0.01, 4); + t("0.00", 0.001, 2); + t("0.001", 0.001, 3); + t("0.0010", 0.001, 4); + t("1.0000", 1, 4); + t("1.0", 1, 1); + t("1", 1, 0); + t("12", 12, 0); + t("1", 1.1, 0); + t("12", 12.1, 0); + t("1", 1.12, 0); + t("12", 12.12, 0); + t("0.0000006", 0.0000006, 7); + t("0.00000006", 0.00000006, 8); + t("0.000000060", 0.00000006, 9); + t("0.0000000600", 0.00000006, 10); + t("0", 0, 0); + t("0.0", 0, 1); + t("0.00", 0, 2); + + t("-1111111111111111111111.00000000", "-1111111111111111111111", 8); + t("-0.1", -0.1, 1); + t("-0.10", -0.1, 2); + t("-0.100", -0.1, 3); + t("-0.01", -0.01, 2); + t("-0.010", -0.01, 3); + t("-0.0100", -0.01, 4); + t("-0.00", -0.001, 2); + t("-0.001", -0.001, 3); + t("-0.0010", -0.001, 4); + t("-1.0000", -1, 4); + t("-1.0", -1, 1); + t("-1", -1, 0); + t("-1", -1.1, 0); + t("-12", -12.1, 0); + t("-1", -1.12, 0); + t("-12", -12.12, 0); + t("-0.00000", -0.0000006, 5); + t("-0.0000006", -0.0000006, 7); + t("-0.00000006", -0.00000006, 8); + t("-0.000000060", -0.00000006, 9); + t("-0.0000000600", -0.00000006, 10); + t("0", 0, 0); + t("0", -0, 0); + t("0.0", -0, 1); + t("0.00", -0, 2); + t("0.00", "-0.0", 2); + t("0.00", "-0.0000", 2); + t("0.0000", -0, 4); + + t("1000", 1000, null); + t("0.00001", 0.00001, null); + t("0.00001", 0.00001, 5); + t("0.00000000000000000010", "0.0000000000000000001", 20); + t("0.00001000000000000", 0.00001, 17); + t("1.00000000000000000", 1, 17); + t("1000000000000000128", "1000000000000000128", null); + t("100000000000000128.0", "100000000000000128", 1); + t("10000000000000128.00", "10000000000000128", 2); + t("10000000000000128.00000000000000000000", "10000000000000128", 20); + t("0", 0, null); + t("-42.000", -42, 3); + t("-1000000000000000128", "-1000000000000000128", null); + t("-0.00000000000000000010", "-0.0000000000000000001", 20); + t("0.12312312312312300000", "0.123123123123123", 20); + + t("1", 0.5, 0); + t("-1", -0.5, 0); + t("1.3", 1.25, 1); + t("234.2041", 234.20405, 4); + t("234.2041", "234.204050000000000000000000000000006", 4); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + + t("0.000001", "0.000001", 6); + t("6552606716539719300271040797809220.3", "6552606716539719300271040797809220.237838405", 1); + t("25605410.260045950231371", "25605410.260045950231370974066", 15); + t("-65593283.0000", "-65593283", 4); + t("-2238743875407788208860272230040067273281097722822075126.88000000000", "-2238743875407788208860272230040067273281097722822075126.88", 11); + t("-1714042659419404211.0000000", "-1714042659419404211", 7); + t("580861301.000", "580861301", 3); + t("-495746734.000", "-495746734", 3); + t("-909962202.00000", "-909962202", 5); + t("-6588.00", "-6588", 2); + t("-89235424125324.000000", "-89235424125324", 6); + t("-0.0001", "-0.0000000000177", 4); + t("-0.1", "-0.000000000000007", 1); + t("7086047552021418140460170703933026989776558656.864197000000000", "7086047552021418140460170703933026989776558656.864197", 15); + t("-0.0000000001", "-0.0000000000000000007707", 10); + t("6613833500.133407255728", "6613833500.133407255727325566781771", 12); + t("-0.60", "-0.6", 2); + t("-5800577761301861465745732694236894834.347199790459214393940", "-5800577761301861465745732694236894834.34719979045921439394", 21); + t("65495133621931312001260.90", "65495133621931312001260.89870016055223846451749943336585697", 2); + t("-0.0000001", "-0.0000000000021727264987520611266069544793244453321336", 7); + t("5138338134667513058267845351654.0073", "5138338134667513058267845351654.007282", 4); + t("-419591612781413402.1606094651083282", "-419591612781413402.16060946510832813452", 16); + t("-842984708.00000", "-842984708", 5); + t("6094679992788973717749530934167375519948195193196.00000000000", "6094679992788973717749530934167375519948195193196", 11); + t("3070926.00", "3070926", 2); + t("-0.0000000000000004274", "-0.00000000000000042733957907641417564294", 19); + t("-307434.0", "-307434", 1); + t("-7155930111672774753753.84501482871023", "-7155930111672774753753.845014828710226", 14); + t("-204638.0", "-204638", 1); + t("67354.81", "67354.801797", 2); + t("0.000042911675", "0.000042911674899533228107357062", 12); + t("-57865060735863.5903347110", "-57865060735863.590334711", 10); + t("-0.00889", "-0.0088857", 5); + t("655593535442553089245040020344044.000000000000", "655593535442553089245040020344044", 12); + t("-2077237944012133216588518213.9402", "-2077237944012133216588518213.9401561759783653376", 4); + t("3354.50", "3354.49314543", 2); + t("-0.00001", "-0.000000000000091204118667391473401958802734362777499449233", 5); + t("-2817626898661648124242602088971648489124280903.00000000000000000000000", "-2817626898661648124242602088971648489124280903", 23); + t("-0.1138", "-0.1137406345875745478881089475981775971743", 4); + t("372625.84", "372625.836933301", 2); + t("-0.0001", "-0.0000000000030295", 4); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + + t("0.3", "0.3", 1); + t("-200258348374.3", "-200258348374.3595802551014614089785610548492885372322083789", 1); + t("-8996550690041157178188143247448286757711.5580857413", "-8996550690041157178188143247448286757711.55808574133329", 10); + t("-3172413669280032477.00", "-3172413669280032477", 2); + t("6547946357820.750067107731812021675", "6547946357820.750067107731812021675351468709784004", 21); + t("24188393190716631282750407915133817062572333100239.0000000000000000000", "24188393190716631282750407915133817062572333100239", 19); + t("539982361589798324286450574560330534901309503.82000000", "539982361589798324286450574560330534901309503.82", 8); + t("829898800701640360552652.0000", "829898800701640360552652", 4); + t("-1585782773394.4", "-1585782773394.44501382110847", 1); + t("-7604844176594943774211951887242195107.399", "-7604844176594943774211951887242195107.399576743428669618164", 3); + t("-0.00", "-0.0000000000000005153003506839", 2); + t("0.000", "0.00003", 3); + t("-5454249481540317712.560293859013731302", "-5454249481540317712.56029385901373130215526009738012974642338", 18); + t("15352607654972198961429295651185206861818141054385638.00000000000000000", "15352607654972198961429295651185206861818141054385638", 17); + t("91494535411039025233040.292", "91494535411039025233040.29224903220309368507011", 3); + t("2043369316.0", "2043369316", 1); + t("-0.0000000782350618457", "-0.0000000782350618457630647420312027682238301541350414", 19); + t("2122652.0", "2122652", 1); + t("-0.00841365", "-0.00841365099301981489219310202029642", 8); + t("0.0", "0.0007035", 1); + t("-0.00000000000000374916", "-0.0000000000000037491685778894015479084539735777088", 20); + t("534883638.00", "534883638", 2); + t("-2.0", "-2", 1); + t("-5634442247266825358399629799939027370665.0000000000000000000", "-5634442247266825358399629799939027370665", 19); + t("3331187169219186569122.000000000", "3331187169219186569122", 9); + t("0.0000000000", "0.0000000000006604395609805032330367635527", 10); + t("-0.0000000000000576901", "-0.00000000000005769013292086168690493327", 19); + t("-661.8", "-661.828596629053201916486", 1); + t("-6073555395665254434249128854999349235744174928042756.1153000000000", "-6073555395665254434249128854999349235744174928042756.1153", 13); + t("-5013086846966.000", "-5013086846966", 3); + t("0.004015", "0.00401523226833", 6); + t("3140295374107374579919222510.1462722", "3140295374107374579919222510.1462722819395532", 7); + t("-0.000000", "-0.00000000000000799876460379334679831886", 6); + t("-0.00", "-0.0003", 2); + t("-0.026760766726884267", "-0.026760766726884267750393307117624838556001925491", 18); + t("-20821740502968847857923433558797.0899", "-20821740502968847857923433558797.08997487843745", 4); + t("0.00000000002", "0.000000000020346524414696573703092255317751132892", 11); + t("45492073832204366341299301624.000000000", "45492073832204366341299301624", 9); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_CEIL; + + t("7810971819938620325901899057970512790433.0000000000000000", "7810971819938620325901899057970512790433", 16); + t("-623395.0", "-623395", 1); + t("81334094079413997693749807.000000000000", "81334094079413997693749807", 12); + t("790143966.5", "790143966.406169480041929356421", 1); + t("-0.000485", "-0.0004851099615478", 6); + t("843581583868277359263.9721265", "843581583868277359263.97212648230399373761717", 7); + t("-921038771017147427324121032.000000", "-921038771017147427324121032", 6); + t("-823.0", "-823", 1); + t("505.0", "505", 1); + t("-866703339332502.8636000", "-866703339332502.8636", 7); + t("46.0", "46", 1); + t("60042202798790129685.0000000", "60042202798790129685", 7); + t("-1847392.0000", "-1847392", 4); + t("-4580251343840510165820631684073999841789879.0000000000000000000000", "-4580251343840510165820631684073999841789879", 22); + t("3501378778000.539063748827265447", "3501378778000.5390637488272654464266281832626835121535730779", 18); + t("0.000000004686", "0.000000004685387489140232", 12); + t("-0.0", "-0.0006", 1); + t("-445677508.00", "-445677508", 2); + t("0.0002", "0.00015099822561012723", 4); + t("-2992505698074499692367794831646886.0000000000000000", "-2992505698074499692367794831646886", 16); + t("5297873.59", "5297873.5869265978056497873793730268", 2); + t("72978439324039191443182.00000000000", "72978439324039191443182", 11); + t("0.66028387", "0.660283869505570207917431271006277981914716620876", 8); + t("-232008389442485.0", "-232008389442485", 1); + t("-2.371568", "-2.37156855939356279513952542004820909", 6); + t("731916154123696.1935", "731916154123696.193488323779184681349292529227446", 4); + t("-793941153937799250384382615553258074.00000", "-793941153937799250384382615553258074", 5); + t("651002.00", "651002", 2); + t("-61317874871.00", "-61317874871", 2); + t("8673.00", "8673", 2); + t("-14490519736189597435728386282.030655", "-14490519736189597435728386282.0306558561264348956674", 6); + t("0.001", "0.00000000000002", 3); + t("0.000009", "0.000008920984342", 6); + t("0.0000920957086395973679873", "0.000092095708639597367987279557138375172816422475", 25); + t("28125849913667924088615.25407023317734", "28125849913667924088615.2540702331773399078402875044891", 14); + t("87.55538597", "87.55538596435839691343147", 8); + t("939705902083425775202905619379.0000000", "939705902083425775202905619379", 7); + t("7303936681469130614.8345000", "7303936681469130614.8345", 7); + t("-5831852886782.68010000", "-5831852886782.6801", 8); + t("-0.0000000", "-0.0000000213769530812", 7); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + + t("0.0000", "0.00000000000584", 4); + t("-79055907138737329232.165677999092552368", "-79055907138737329232.1656779990925523674", 18); + t("47206303530045536472421888342339.00000000", "47206303530045536472421888342339", 8); + t("3974.0", "3974", 1); + t("1296297430771.39", "1296297430771.391670729445980444292", 2); + t("0.000016", "0.00001686928031", 6); + t("-0.00001", "-0.0000000000008", 5); + t("4883938724383.000", "4883938724383", 3); + t("-5.4115622307", "-5.411562230628539329345282639155988044655000352687981880842", 10); + t("-0.01", "-0.0000000000155280115429218804426906540524", 2); + t("-2730930776035874709906.00000", "-2730930776035874709906", 5); + t("8419336352549424092369623.00000", "8419336352549424092369623", 5); + t("52897.4", "52897.4", 1); + t("-783171007682720320053252521365465473997085.0", "-783171007682720320053252521365465473997085", 1); + t("0.8", "0.8", 1); + t("-0.00000000085280", "-0.000000000852796916216780032747621063045628213284", 14); + t("809486781065644418.9", "809486781065644418.939", 1); + t("-9.0", "-9", 1); + t("2399395.00", "2399395", 2); + t("-243707862514768528758611224374.0000000000000", "-243707862514768528758611224374", 13); + t("-87906.00", "-87906", 2); + t("-36206954271055061276640398631031143034683624940748.9970000000000000000000", "-36206954271055061276640398631031143034683624940748.997", 22); + t("0.00", "0.0000000000565885579252765288683939564608114096713", 2); + t("-8391656174313988740342135972218668561645437.0", "-8391656174313988740342135972218668561645437", 1); + t("2798706581453003.177239111", "2798706581453003.17723911167031", 9); + t("607781292230803273523112111.091726721140", "607781292230803273523112111.09172672114", 12); + t("-0.3", "-0.3", 1); + t("3008522535782692059736852844809784198247000184.0", "3008522535782692059736852844809784198247000184", 1); + t("14227.00", "14227", 2); + t("7841760307718014116576857993957.0000", "7841760307718014116576857993957", 4); + t("-0.00001", "-0.00000000000002596", 5); + t("5247199732982111073.000000000", "5247199732982111073", 9); + t("-12.0", "-12", 1); + t("0.000", "0.00005", 3); + t("-1383703062.0000", "-1383703062", 4); + t("0.0051019245305169", "0.00510192453051698060366202631871161193", 16); + t("-45565092550117861497905653558246322559799.0", "-45565092550117861497905653558246322559799", 1); + t("-0.284", "-0.284", 3); + t("-8962.00", "-8962", 2); + t("49335989571.2173023", "49335989571.217302304037", 7); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("733744593401073823825766410831877679446.0000000000000000000", "733744593401073823825766410831877679446", 19); + t("-64.6849459", "-64.6849458687691227978", 7); + t("-0.000000", "-0.00000000009", 6); + t("-62537287527837589298857228059657673223234916.95923265430000000", "-62537287527837589298857228059657673223234916.9592326543", 17); + t("3393668096256773847245721315080265089731.000000", "3393668096256773847245721315080265089731", 6); + t("0.0", "0.0000000000000056674956638008432348702401392", 1); + t("72516372734.6", "72516372734.6447", 1); + t("-418.28", "-418.2800731793741351", 2); + t("0.00", "0.001", 2); + t("8366217346845756726.00000000", "8366217346845756726", 8); + t("-0.000000", "-0.0000000000000092034548636370987112234384736726", 6); + t("0.35", "0.35474830751442135112334772517193392", 2); + t("64703289793894.5830", "64703289793894.58296866", 4); + t("-0.000000000000000036", "-0.000000000000000036461242408590182363418943891", 18); + t("5494508405056449117588.631948", "5494508405056449117588.631948458033233759999", 6); + t("-0.0", "-0.00393971618499838726739122333520030506235698", 1); + t("375581290738585826632.00000000", "375581290738585826632", 8); + t("254.96635275802300887", "254.96635275802300886544776010389418575738792480979736", 17); + t("21492347.69467571391498624445", "21492347.6946757139149862444482880595559468", 20); + t("313576441324233.0000000", "313576441324233", 7); + t("-534460490015293367127173277346694900936058.0000", "-534460490015293367127173277346694900936058", 4); + t("182707431911537249021116759327712693311898345504618668.43327000000000000000000", "182707431911537249021116759327712693311898345504618668.43327", 23); + t("210005324615278.4586839690045963321032", "210005324615278.458683969004596332103244549279", 22); + t("779837001772884165637922377221951347134695.644834", "779837001772884165637922377221951347134695.6448338", 6); + t("-0.000001", "-0.00000064188301390033596845335767993853284632527964514979079", 6); + t("13.0", "13", 1); + t("0.0000001269", "0.0000001269060795648365813491128357427111184222", 10); + t("18446632248354.00", "18446632248354", 2); + t("-1229249.79", "-1229249.7897249259", 2); + t("49082.0", "49082", 1); + t("-61.0", "-61", 1); + t("-893.0", "-893", 1); + t("5002282278.56974877690066484", "5002282278.569748776900664839184116538222902", 17); + t("41372.00", "41372", 2); + t("-4732022445962399687294885123498809.7625585825095", "-4732022445962399687294885123498809.7625585825095", 13); + t("-55484242.036895641", "-55484242.036895641", 9); + t("-41427133134.52583323427907663268339", "-41427133134.525833234279076632683393992706825", 23); + t("0.0", "0.00004300614085218825243480119971669264977421", 1); + t("-472025754597316278339412186866.7010659789", "-472025754597316278339412186866.701065978877597089729906019843", 10); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_DOWN; + + t("0.00", "0.00000000000000070362", 2); + t("682377946933004839.0000000", "682377946933004839", 7); + t("0.000000000", "0.00000000000000301722508588270616971784651380892069087869575", 9); + t("-356330174906.7", "-356330174906.737986270704", 1); + t("771875969530483104163034745359742192923504.000000000000000", "771875969530483104163034745359742192923504", 15); + t("-85.57612133364", "-85.576121333642541652128540737082", 11); + t("-796870619982006783.00000000", "-796870619982006783", 8); + t("985819.0", "985819", 1); + t("0.000000", "0.00000000000000000007093034243958", 6); + t("-0.0000", "-0.0000000006400178083107075310177579449", 4); + t("-105570971372984.0", "-105570971372984", 1); + t("4387745564661852845308.94229815083918", "4387745564661852845308.9422981508391799473309882", 14); + t("-3978043797116373.2", "-3978043797116373.159631", 1); + t("5.8961281424853232622595", "5.8961281424853232622594846548715356650909645537495738043051", 22); + t("-0.0000081539970551874384495", "-0.000008153997055187438449482684680130340977472796176926", 25); + t("-65.0", "-65", 1); + t("-24012940205869.000", "-24012940205869", 3); + t("0.000000", "0.000000000000000066985234999507396", 6); + t("2935194283452.35738951157832206907124", "2935194283452.357389511578322069071242729133894", 23); + t("542060.7771", "542060.77713479586821060591807145320317", 4); + t("890815036528241639534803534813.592588608837168425865025", "890815036528241639534803534813.59258860883716842586502472472", 24); + t("685877749980391051.17", "685877749980391051.1715", 2); + t("47820177163147405231185068730213.894293", "47820177163147405231185068730213.89429254869826585947429821", 6); + t("1536364305.00", "1536364305", 2); + t("-85825125.5810188", "-85825125.5810188298", 7); + t("-4983288214158634188.4572989", "-4983288214158634188.4572988600705359104", 7); + t("0.0000000000", "0.0000000000000000017929073", 10); + t("-1684136337600384671.00000000", "-1684136337600384671", 8); + t("567733137127609543.000000", "567733137127609543", 6); + t("607675679770387.000", "607675679770387", 3); + t("43727409067319.0", "43727409067319", 1); + t("-77274559773372606.00", "-77274559773372606", 2); + t("-28855643486070486857836.00000", "-28855643486070486857836", 5); + t("-915356570870.00", "-915356570870.00041832252262829437239", 2); + t("0.0", "0.00000000000004843552301428650828", 1); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_EVEN; + + t("-6614662975368684488885953285955838893900074215956.00", "-6614662975368684488885953285955838893900074215956", 2); + t("8642393776898.000", "8642393776898", 3); + t("3612207878528.1106344698085142865", "3612207878528.1106344698085142865438924419", 19); + t("977910386.93", "977910386.9343537", 2); + t("-8937937492688941768401276851642629965923372.0", "-8937937492688941768401276851642629965923372", 1); + t("-8327876772303865517454752161.4376112752921904774", "-8327876772303865517454752161.43761127529219047742910886", 19); + t("-27707.00", "-27707", 2); + t("-7287595765894242586375.92700435484", "-7287595765894242586375.927004354837723619581861634319", 11); + t("-0.00000", "-0.000000000000023670858459165486137218740358207859", 5); + t("574676836802209077.64156", "574676836802209077.641563875647945277493356873895", 5); + t("-3041038455237222898218053653661.87952947815", "-3041038455237222898218053653661.87952947815", 11); + t("-628244132307.000", "-628244132307", 3); + t("316566935167341670725238.000", "316566935167341670725238", 3); + t("-77953301569468294124105528.0", "-77953301569468294124105528", 1); + t("0.0046", "0.00460227833968584", 4); + t("4323265763616518980379929221104.0", "4323265763616518980379929221104", 1); + t("1674500565014237781637959673471730398.1120033", "1674500565014237781637959673471730398.1120032995511774", 7); + t("872559441430499650732600166.00000", "872559441430499650732600166", 5); + t("-87858304.0000", "-87858304", 4); + t("-4158788.000", "-4158788", 3); + t("3983930437416823631395.9093", "3983930437416823631395.90934402583657", 4); + t("-14.5531937", "-14.5531936852106573016020290135814233645752955297443336", 7); + t("0.00000000002201", "0.00000000002200503795474854372849141363413146996972", 14); + t("0.0000000000000", "0.00000000000000000894955653982033503846831364474746320232", 13); + t("61564779.00", "61564779", 2); + t("-7.0", "-7", 1); + t("-0.000000000000028455976228", "-0.00000000000002845597622815028653703372125435938812845106", 24); + t("728982423193598397582409707715766595902844.0000000", "728982423193598397582409707715766595902844", 7); + t("14538075860529.2697937480", "14538075860529.269793748", 10); + t("0.000", "0.00000000000000000007021566096", 3); + t("-5136066535080.86830591678842264063462546263", "-5136066535080.86830591678842264063462546262988980471309228558", 29); + t("-3026751112367460839746524832112404665.000000000000000", "-3026751112367460839746524832112404665", 15); + + t("0.5", "0.5", null); + t("-0", "-0.5", 0); + t("10.5", "10.5", null); + t("0.05", "0.05", null); + t("0.4", "0.4", null); + t("0.6", "0.6", null); + t("1.5", "1.5", null); + t("-1.5", "-1.5", null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + + t("-535564000.00", "-535564000", 2); + t("-80000000.000", "-80000000", 3); + t("-240.0", "-240", 1); + t("-7520000000.0", "-7520000000", 1); + t("306550.000", "306550", 3); + t("800000000.0", "800000000", 1); + t("-454000000.00000", "-454000000", 5); + t("60.0", "60", 1); + t("-4700000.000", "-4700000", 3); + t("25000.00", "25000", 2); + t("6847.0", "6847", 1); + t("780.0", "780", 1); + t("-50.0", "-50", 1); + t("700.0", "700", 1); + t("412598000.0000", "412598000", 4); + t("-84581600.0", "-84581600", 1); + t("5590000.00", "5590000", 2); + t("-66000.0", "-66000", 1); + t("600.0", "600", 1); + t("-513335000.000", "-513335000", 3); + t("-40.0", "-40", 1); + + t("-52536202527.13891931933498708496518913773517016037224", "-5.253620252713891931933498708496518913773517016037224E10", null); + t("0.0000000000000008761383898703999300297605784533730922", "8.761383898703999300297605784533730922E-16", null); + t("-0.0000000000000000000000000000000000004", "-4E-37", null); + t("2832044194940.47654015529986948208", "2.83204419494047654015529986948208E12", null); + t("0.00000000000000000000000064668155275864837", "6.4668155275864837E-25", null); + t("4.34128088694", "4.34128088694E0", null); + t("-851957.6572615611436542", "-8.519576572615611436542E5", null); + t("-89097468286.2561077879598798580253771544265682053", "-8.90974682862561077879598798580253771544265682053E10", null); + t("-0.000000000000000000000000000000000000000000000030409767", "-3.0409767E-47", null); + t("0.000000000000000000004295112484112357722747956581254", "4.295112484112357722747956581254E-21", null); + t("-839203207475651.6542808578", "-8.392032074756516542808578E14", null); + t("-0.00000000000000000078216", "-7.8216E-19", null); + t("-1782290274935701247734.21262413032385", "-1.78229027493570124773421262413032385E21", null); + t("31669451104144801337076433457.18511076", "3.166945110414480133707643345718511076E28", null); + t("0.000000000000000000000000000000000000472351852761", "4.72351852761E-37", null); + t("-50155220217523568901083623.78842580174913602672593731", "-5.015522021752356890108362378842580174913602672593731E25", null); + t("-291.37", "-2.9137E2", null); + t("-52474611936456205886027195352961212383.2279441143", "-5.24746119364562058860271953529612123832279441143E37", null); + t("-326.9376463292543", "-3.269376463292543E2", null); + t("0.00000000000044", "4.4E-13", null); + t("0.000000087792449", "8.7792449E-8", null); + t("497835793870987132484033.938845920610565887398960253648", "4.97835793870987132484033938845920610565887398960253648E23", null); + t("-33960439442302770058.74863962", "-3.396043944230277005874863962E19", null); + t("0.00000000000000000000000000000000000000020694696587293782", "2.0694696587293782E-40", null); + + t("123.45", "123.45", null); + t("123", "123.45", 0); + t("123", "123.45", -0); + + // ROUND_HALF_CEIL + // Rounds towards nearest neighbour. If equidistant, rounds towards Infinity + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_CEIL; + + t("0.1", "0.05", 1); + t("1", 0.5, 0); + t("1", 0.54, 0); + t("1", 0.55, 0); + t("1", 0.56, 0); + t("-1", -0.54, 0); + t("-0", -0.5, 0); + t("-1", -0.56, 0); + t("-0.5", -0.5, 1); + t("1.3", 1.25, 1); + t("-1.2", -1.25, 1); + t("234.2041", 234.20405, 4); + t("-234.2040", -234.20405, 4); + t("234.2041", "234.204050000000000000000000000000006", 4); + t("-234.2045", "-234.20449", 4); + t("-234.2041", "-234.204050000000000000000000000000006", 4); + t("999.0", 999, 1); + t("1000", 999.5, 0); + t("-999", -999.5, 0); + t("-999.5", -999.5, 1); + t("1.00000000000000000", "1.000000000000000000005", 17); + t("1.00000000000000000001", "1.000000000000000000005", 20); + t("-1.00000000000000000", "-1.000000000000000000005", 17); + t("-1.00000000000000000000", "-1.000000000000000000005", 20); + + // ROUND_HALF_FLOOR + // Rounds towards nearest neighbour. If equidistant, rounds towards -Infinity + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_FLOOR; + + t("0.0", "0.05", 1); + t("0", 0.5, 0); + t("1", 0.54, 0); + t("1", 0.55, 0); + t("1", 0.56, 0); + t("-1", -0.54, 0); + t("-1", -0.5, 0); + t("-1", -0.56, 0); + t("-0.5", -0.5, 1); + t("1.2", 1.25, 1); + t("-1.3", -1.25, 1); + t("234.2040", 234.20405, 4); + t("-234.2041", -234.20405, 4); + t("234.2040", "234.20404999999999999999999999999999", 4); + t("234.2041", "234.204050000000000000000000000000006", 4); + t("-234.2045", "-234.20449", 4); + t("-234.2041", "-234.204050000000000000000000000000006", 4); + t("999.0", 999, 1); + t("999", 999.5, 0); + t("-1000", -999.5, 0); + t("-999.5", -999.5, 1); + t("1.00000000000000000", "1.000000000000000000005", 17); + t("1.00000000000000000000", "1.000000000000000000005", 20); + t("-1.00000000000000000", "-1.000000000000000000005", 17); + t("-1.00000000000000000001", "-1.000000000000000000005", 20); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToFractionTests.cs b/DecimalSharp.Tests/BigDecimalToFractionTests.cs new file mode 100644 index 0000000..06c775d --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToFractionTests.cs @@ -0,0 +1,242 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; +using System.Linq; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToFraction")] + public class BigDecimalToFractionTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToFraction() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, BigDecimalArgument maxDenominator) => + { + BigDecimalTests.assertEqual(expected, string.Join(",", bigDecimalFactory.BigDecimal(n).ToFraction(maxDenominator).Select(b => b.ToString()))); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("1,10", "0.1", (string?)null); + t("-1,10", "-0.1", (string?)null); + t("1,100", "0.01", (string?)null); + t("-1,100", "-0.01", (string?)null); + t("1,1000", "0.001", (string?)null); + t("-1,1000", "-0.001", (string?)null); + t("54301793,100000", "543.017930", (string?)null); + t("-484693350148251574449,1000000000000", "-484693350.1482515744490", (string?)null); + t("-200111074540568980159529,25000000000000", "-8004442981.622759206381160", (string?)null); + t("-5965700213104829,1000000000000000", "-5.965700213104829", (string?)null); + t("-5124110209739113904928179,100000000000000", "-51241102097.39113904928179", (string?)null); + t("-1655017182533520595664837541,200000000000000", "-8275085912667.602978324187705", (string?)null); + t("-5,8", "-0.625", (string?)null); + t("-42394617,200000000", "-0.211973085", (string?)null); + t("-147453708173963291829,2500000000000000000", "-58.9814832695853167316", (string?)null); + t("-2733,100", "-27.33", (string?)null); + t("0,1", "0.0", (string?)null); + t("-2599897551866392365731491641,10000000000", "-259989755186639236.5731491641", (string?)null); + t("-9326331230765073371,5000000000000000", "-1865.2662461530146742", (string?)null); + t("-2483061,10000", "-248.3061", (string?)null); + t("-92864854181,10000000", "-9286.4854181", (string?)null); + t("-758516850228215193,100000000000000000", "-7.5851685022821519300", (string?)null); + t("-19570408085559589,20000000000", "-978520.404277979450", (string?)null); + t("-211,100", "-2.11", (string?)null); + t("-4789334439841,10000000000", "-478.9334439841", (string?)null); + t("2978320663077,10000000000000", "0.2978320663077", (string?)null); + t("-1221,25", "-48.84", (string?)null); + t("12456254053601331,5000000000000", "2491.25081072026620", (string?)null); + t("31969983,100000", "319.69983", (string?)null); + t("31852901149,400000000000", "0.0796322528725", (string?)null); + t("-456674099059,10000000000", "-45.6674099059", (string?)null); + t("-361907787,5000000", "-72.3815574", (string?)null); + t("-6521,100", "-65.21", (string?)null); + + t("5,1", "5.1582612935891", "3"); + t("14645,1797", "8.14969395596340", "4682"); + t("350921,81990", "4.28004634702", "82418"); + t("923754598113149102531799372705758450549,100000000", "9237545981131491025317993727057.58450549", (string?)null); + t("23665467152910525354658972818814752082,49447", "478602688796297558085606261629921.9787246948249979233505266225354557384", "57466"); + t("12401124714135748113774134798397,2", "6200562357067874056887067399198.66971421701", "2"); + t("5747456325233732815460960864983211610837351385715799969377,100000000000000000000000000000", "57474563252337328154609608649.83211610837351385715799969377", (string?)null); + t("4744,61", "77.7705294446793765233206385561288346447", "86"); + t("230406626515463254737498487452583023685806305331639,100000000000000000000000000", "2304066265154632547374984.87452583023685806305331639", (string?)null); + t("8452816572418429518944119647,5000", "1690563314483685903788823.9294", (string?)null); + t("48239499471878294436129777581,10000000000000000", "4823949947187.82944361297775810", (string?)null); + t("45172634468362586403517152343110493066053,74300", "607976237797612199239800166125309462.530995962577562", "89241"); + t("245629009658126699398365025147112883705717,1250000000000000000000000000000", "196503207726.5013595186920201176903069645736", (string?)null); + t("19575206081236584421562241755643406299,500000000000000000000000000000000000", "39.150412162473168843124483511286812598", (string?)null); + t("124335953351113119989680198250484096210027176457861877,20000000000000000000000", "6216797667555655999484009912524.20481050135882289309385", (string?)null); + t("62359286968916651021817694022163661098254437249041482587,100000000000000000000000000", "623592869689166510218176940221.63661098254437249041482587", (string?)null); + t("1406253392003122107350210973,50", "28125067840062442147004219.46", "90"); + t("736337826,1", "736337826.0", "1"); + t("2294354321,3019", "759971.62007285863174441704674479534091075", "5946"); + t("342555042697121035185957633789368546657896318423873,50000000000000000000000000", "6851100853942420703719152.67578737093315792636847746", (string?)null); + t("3511582655801640591,52", "67530435688493088.2885316751682999639624370547426320", "73"); + t("1190687310674838338273481559,50000", "23813746213496766765469.63118", (string?)null); + t("31747884008318370382077439489,40", "793697100207959259551935987.225181146039", "45"); + t("39451289109544785156061546711681,59993", "657598204949657212609163514.271348320970259397527780637349273932", "61325"); + t("3859539118592118171061,65", "59377524901417202631.7076617756627530296590420377861", "248"); + t("2529860848590369124121129138,36761", "68819152052184900414056.449443703377131320899467509", "59208"); + t("17331073,2", "8665536.3781112033855216846406980971689", "2"); + t("11088761069693879,25000", "443550442787.75516", (string?)null); + t("37298162459148947522489,474", "78688106453900733169.80801275320205353359142143262532", "517"); + t("12411782390212011049587005051032466579057,100000000000000000000000000000000000000", "124.11782390212011049587005051032466579057", (string?)null); + t("288377889236302421024476469650301879883847,50000000000000000000000", "5767557784726048420.48952939300603759767694", (string?)null); + t("64269805556832147,1", "64269805556832146.8921574533060466484388410550211", "2"); + t("1019428223041680221,2", "509714111520840110.44623631764611004359625363775303233110", "2"); + + t("-535739501101785482356483511,20000000000000000", "-26786975055.08927411782417555", (string?)null); + t("-2189002367733133,500000000000000", "-4.378004735466266", (string?)null); + t("-4135862533810979636019397675000,1", "-4.135862533810979636019397675E+30", (string?)null); + t("-14984699501047789,1000000000000", "-14984.699501047789", (string?)null); + t("-2644213426631746862661931503,10000", "-264421342663174686266193.1503", (string?)null); + t("-2092299259157497414090361017,5", "-418459851831499482818072203.4", (string?)null); + t("-77,100", "-0.77", (string?)null); + t("-54276151887,1000000000", "-54.276151887", (string?)null); + t("-389683579126928886377631531,2500000000000000", "-155873431650.7715545510526124", (string?)null); + t("46789726161807116524384304297700033991397937633588752307,10000000000000000000000000000000000000", "4678972616180711652.4384304297700033991397937633588752307", (string?)null); + t("-9196858034762943045297291137,10000", "-919685803476294304529729.1137", (string?)null); + t("-12757819,25000", "-510.31276", (string?)null); + t("-2751580109664699528322719473,50", "-55031602193293990566454389.46", (string?)null); + t("-1397067073903866232334961397,200000000000", "-6985335369519331.161674806985", (string?)null); + t("-10827300142961420614583582960000000000000000000000000000000000000000000,1", "-1.082730014296142061458358296E+70", (string?)null); + t("488478745829,50000000", "9769.57491658", (string?)null); + t("-2319703638146144907642415179,250000000000000000000000000", "-9.278814552584579630569660716", (string?)null); + t("8199609,1000000", "8.199609", (string?)null); + t("-1132520281920903148966859641,50000000000", "-22650405638418062.97933719282", (string?)null); + t("-9435372448691264711,10000000000", "-943537244.8691264711", (string?)null); + t("-5430432705270926972283794348000000000000000,1", "-5.430432705270926972283794348E+42", (string?)null); + t("2547106921,10000000", "254.7106921", (string?)null); + t("-2013361060932518973304030049,250000000000", "-8053444243730075.893216120196", (string?)null); + t("-299071373209294751127694543,4000", "-74767843302323687781923.63575", (string?)null); + t("161261,5000", "32.2522", (string?)null); + t("-2149015945426180798371334522,1", "-2149015945426180798371334522", (string?)null); + t("-1219052557726696173105236523,1250000000000000", "-975242046181.3569384841892184", (string?)null); + t("-6635702255618430700913831019,1000000", "-6635702255618430700913.831019", (string?)null); + t("-4229092410987972953057006873,100", "-42290924109879729530570068.73", (string?)null); + t("800876757958087347097942687332875742929708200305858327085977609,100000000000000000000000000000000000", "8008767579580873470979426873.32875742929708200305858327085977609", (string?)null); + t("-2665484396670548074136945193,50", "-53309687933410961482738903.86", (string?)null); + + t("30396,38195", "0.79581097", "74409"); + t("2125057574,3289", "646110.5424140842277760913716223149175043516912866283522989430448583852673477181054", "4314"); + t("18251,16", "1140.688086121119279582816178812726653910", "37"); + t("61348765027081784476232889631422618917241085602257,2", "30674382513540892238116444815711309458620542801128.559859020834676491532682063017825303001913079937413732204504474950978211332225018371420", "2"); + t("238354711696434965227174225040046402291933791409568617910,25981", "9174193129457486826033417691391647830796882006449660.0558100148468970808679278895365813792370050009058167954469", "61710"); + t("7355967799241738309628763754835483150582416687842544374137,8", "919495974905217288703595469354435393822802085980318046767.1338999658963927824509929378965804777221331548975659545056488845295998946309871474144010438", "9"); + t("1125354937387110207464744146511518,247481", "4547237716782743755943866989.8356560705677241346146759866583370949", "863202"); + t("58400904696,8737", "6684320.09797413893379904985072385250774250364224704531308514779353223", "14426"); + t("4765998700799,481932", "9889359.28886025414277", "551989"); + t("84446319074008288318841993796319916,1", "84446319074008288318841993796319916.4290214679797552828327089099139280188", "1"); + t("208579935771852505416338,29", "7192411578339741566080.621098672624218880520368888346887640903578755437931806539999680994582938", "38"); + t("1006862373895650813218257996159822111779222738385202718573234201031,335", "3005559325061644218561964167641260035161858920552843936039505077.70447752609278095294701366298104650604976387611568135143174113323780682", "7063"); + t("12180512204,290477", "41932.7940043445804168810482554121918927813650259", "895566"); + t("972851014381591,18170", "53541607836.080957621939096312239677792878740188648258030024875", "31555"); + t("383576424003665,59", "6501295322096.01707059843465672720153308", "88"); + t("456059695649,731697", "623290.372447884850674344473049816049238992052574671", "770999"); + t("1,2", "0.5716202415873544262986953173753852278285193332218646822626651", "2"); + t("13802410789886736953383903846755867001633124596437299605748175709981308048573814,2523", "5470634478750193005701111314607953627282253109963257869896225013864965536493.782798186996737913044082377221550214034629772236938011947896897722075720890727218714", "2580"); + t("1720546690653497270570006270472130851,1", "1720546690653497270570006270472130851.14006845543964920673232647491053082791301585407937041734157349507526701334664232654756777642845206", "1"); + t("275492732803212658371830121443811803,6273", "43917221872024973437243762385431.5005579559793624838126175850466341579997661657132448932942532299", "11453"); + t("88013352536654826423613115136850148349568967,93", "946380134802740069071108764912367186554505.02139414761736578247940104106009403877307019264568966335689948628094", "100"); + t("0,1", "0.16188799510329961", "2"); + t("31257777609885493076027897164441747647216000811363789460,63", "496155200156912588508379320070503930908190489069266499.364683462978985476107209780379101750930177884309470340386147403736530", "73"); + + t("-2991910323532143367251432461,50000000", "-59838206470642867345.02864922", (string?)null); + t("-972745200863972039012044288500000000000000000000000000000,1", "-9.727452008639720390120442885E+56", (string?)null); + t("-759,100", "-7.59", (string?)null); + t("-27827258151452494934863201,100", "-278272581514524949348632.0100", (string?)null); + t("-284626800809,50000000", "-5692.53601618", (string?)null); + t("-74421663208247269188483431,80000000000000000", "-930270790.1030908648560428875", (string?)null); + t("-1082016448333999416859837516000,1", "-1.082016448333999416859837516E+30", (string?)null); + t("-21,25", "-0.84", (string?)null); + t("-67246554173689300336047211,8000000", "-8405819271711162542.005901375", (string?)null); + t("-2196812392790282979771359770000000000000,1", "-2.196812392790282979771359770E+39", (string?)null); + t("-93367638440645772883402889310000,1", "-9.336763844064577288340288931E+31", (string?)null); + t("-35989199713272470893896397640000000000,1", "-3.598919971327247089389639764E+37", (string?)null); + t("-21641213684333939876179569040,1", "-2.164121368433393987617956904E+28", (string?)null); + t("-91309127692139566014327039220000000000000000000000000000000000000,1", "-9.130912769213956601432703922E+64", (string?)null); + t("-1991444477322661912100056959,50000000000", "-39828889546453238.24200113918", (string?)null); + t("-553515865616749148505592781,10000000000000000000000000", "-55.35158656167491485055927810", (string?)null); + t("-2736653830100392487693621031,500000", "-5473307660200784975387.242062", (string?)null); + t("-1434910778309587281399577109,5000000000", "-286982155661917456.2799154218", (string?)null); + + t("7325643,10000000", "0.7325643", (string?)null); + t("8129753468709152191211051855224273832281,100000000000000000000000", "81297534687091521.91211051855224273832281", (string?)null); + t("26846080372036394639591396,6672793", "4023214922452471497.25630571786057289667012386513324609", "72150416"); + t("151169465630612379481675652813336817561189321,200000000000000000000000000000000000000", "755847.328153061897408378264066684087805946605", (string?)null); + t("48650152878444478499756261104359,1000000", "48650152878444478499756261.104359", (string?)null); + t("310291026486294288245548,3136069", "98942665638509321.1423434879780971949357099446690852", "4194429"); + t("281148949800335203180214,28247", "9953232194581201656.11264913171363754779711915", "40003"); + t("8070991737,10", "807099173.7", (string?)null); + t("2105837647496797835243555428994974365746550495259,2500000000000000000000000", "842335058998719134097422.1715979897462986201981036", (string?)null); + t("7050549406715449007260719040610995681,100000000000000000000", "70505494067154490.07260719040610995681", (string?)null); + t("1485521639981158765714509531187624755829128849,100000000000000000000000", "14855216399811587657145.09531187624755829128849", (string?)null); + t("179195624045698698709602380291841534992963,397", "451374367873296470301265441541162556657.33752912", "654"); + t("60786881043136,81", "750455321520.1975303545477874468301224681956212", "6955"); + t("54350058946186575767248586,111", "489640170686365547452689.9639497075875189553277274425649764720088", "136"); + t("207448313353211937938706154109749,2500000000000000000000000", "82979325.34128477517548246164389960", (string?)null); + t("18637328030895697373,20000000000", "931866401.54478486865", (string?)null); + t("77127230808472816894238711,10000000000000000", "7712723080.8472816894238711", (string?)null); + t("29126173556928305215214880165709856062,7", "4160881936704043602173554309387122294.5709328", "7"); + t("43333053556734019842,614489", "70518843391393.531604308619475952242596538499476346", "675048"); + t("53377793855957,559250504", "95445.231562915140439462747444833608100863907", "1363996915"); + t("347448038601,1158528605", "299.9045833667611513140004251012084", "3206002475"); + + t("4723559025392992686163722415183139,100000000000000000000", "47235590253929.92686163722415183139", (string?)null); + t("178091379773085237300450763077988415217238,1811184275", "98328691470714782625004163686209.3533896422549273776361277", "1811232885"); + t("805514724831305204420874185699445105715750883,100000000000000", "8055147248313052044208741856994.45105715750883", (string?)null); + t("65819,6849", "9.610016056348", "8529"); + t("319168767950612554460346534967,625000000000000", "510670028720980.0871365544559472", (string?)null); + t("5710296907,88986", "64170.7336772078034895641687140263", "92775"); + t("556588363946502498333308725135986051213680185539426551525214239244852201,500000000000000000000000000000000000000", "1113176727893004996666617450271972.102427360371078853103050428478489704402", (string?)null); + t("20826873980146981695459788919411033,31250000", "666459967364703414254713245.421153056", (string?)null); + t("2499361049528080561202511540068978284974386343138634241,1000000000000000000000000000000000000", "2499361049528080561.202511540068978284974386343138634241", (string?)null); + t("418298807255269058527019236340986131039447727889611856636829077,50000000000000000000000000000000000", "8365976145105381170540384726.81972262078895455779223713273658154", (string?)null); + t("6913324275323537689724784638569909,100000000000000", "69133242753235376897.24784638569909", (string?)null); + t("13962383460375585294405129665013837633,2000", "6981191730187792647202564832506918.8165", (string?)null); + + t("2469,20", "123.45", (string?)null); + t("2469,20", "123.45", (string?)null); + t("2469,20", "123.45", "2.1e1"); + t("1111,9", "123.45", bigDecimalFactory.BigDecimal(10)); + t("2469,20", "123.45", bigDecimalFactory.BigDecimal("123e399")); + t("2469,20", "123.45", bigDecimalFactory.BigDecimal("123")); + + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction(" "); }, ".toFraction(' ')"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction("\t"); }, ".toFraction('\t')"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction(double.NaN); }, ".toFraction(NaN)"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction("NaN"); }, ".toFraction('NaN')"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction("hello"); }, ".toFraction('hello')"); + + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction(7.5); }, ".toFraction(7.5)"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction(bigDecimalFactory.BigDecimal("225.435435")); }, ".toFraction(new BigDecimal('225.435435'))"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction(0); }, ".toFraction(0)"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction("0.99"); }, ".toFraction('0.99')"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction(-1); }, ".toFraction(-1)"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction(-23); }, ".toFraction(-23)"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction(double.PositiveInfinity); }, ".toFraction(Infinity)"); + tx(() => { bigDecimalFactory.BigDecimal("123.45").ToFraction("-Infinity"); }, ".toFraction('-Infinity')"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToHexTests.cs b/DecimalSharp.Tests/BigDecimalToHexTests.cs new file mode 100644 index 0000000..d688724 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToHexTests.cs @@ -0,0 +1,363 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToHex")] + public class BigDecimalToHexTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToHex() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).ToHex()); + }; + + t("NaN", double.NaN, 20, RoundingMode.ROUND_HALF_UP); + t("NaN", "NaN", 20, RoundingMode.ROUND_HALF_UP); + t("Infinity", double.PositiveInfinity, 20, RoundingMode.ROUND_HALF_UP); + t("-Infinity", double.NegativeInfinity, 20, RoundingMode.ROUND_HALF_UP); + t("Infinity", "Infinity", 20, RoundingMode.ROUND_HALF_UP); + t("-Infinity", "-Infinity", 20, RoundingMode.ROUND_HALF_UP); + + // Integers + + t("0x0", "0", 1, RoundingMode.ROUND_HALF_UP); + t("0x9", "9", 1, RoundingMode.ROUND_HALF_UP); + t("0x5a", "90", 2, RoundingMode.ROUND_HALF_UP); + t("0x0", "0", 1, RoundingMode.ROUND_HALF_UP); + t("-0x9", "-9", 1, RoundingMode.ROUND_HALF_UP); + t("-0x5a", "-90", 2, RoundingMode.ROUND_HALF_UP); + t("0xffffffff", "4294967295", 8, RoundingMode.ROUND_HALF_UP); + t("0x0", "0", 1, RoundingMode.ROUND_HALF_UP); + t("0x8.8", "8.5", 2, RoundingMode.ROUND_HALF_UP); + t("-0x8.8", "-8.5", 2, RoundingMode.ROUND_HALF_UP); + t("0x60bf8d3f1cb70827109c", "456880688358819786854556", 20, RoundingMode.ROUND_HALF_UP); + t("0x27", "39", 2, RoundingMode.ROUND_HALF_UP); + t("0x14a3b3", "1352627", 6, RoundingMode.ROUND_HALF_UP); + t("0xc8841d8a3e0c3184a1d13f24b7c8abcbf36", "1091713357762058306584556087055815769112374", 35, RoundingMode.ROUND_HALF_UP); + t("0x2266ce3388fee3c292256", "2599310186932964178862678", 21, RoundingMode.ROUND_HALF_UP); + t("0x784afb326df4e14f44919e903da2daab2c6a8c2b7", "10988016479801545098971638340838655979698598232759", 41, RoundingMode.ROUND_HALF_UP); + t("0x47d", "1149", 3, RoundingMode.ROUND_HALF_UP); + t("0x613b8b5", "101955765", 7, RoundingMode.ROUND_HALF_UP); + t("0x6b63", "27491", 4, RoundingMode.ROUND_HALF_UP); + t("0x2d3777760a984a21c97a0d20c628c419cab2bfc67f", "66084232243819558824679961490043082487366953191039", 42, RoundingMode.ROUND_HALF_UP); + t("0x12c9942167ae93c737fc5ff39d", "1488492491002839592133151683485", 26, RoundingMode.ROUND_HALF_UP); + t("0xc2c44", "797764", 5, RoundingMode.ROUND_HALF_UP); + t("0xfe787f84cf0ae7655d44db4e793b2a98ae8f", "22167524012235587957931446373184044722073231", 36, RoundingMode.ROUND_HALF_UP); + t("0x186b6b31486165c0bc8c778fd49af12ea08f7dad332", "571028668500605890623232664155788301681845784466226", 43, RoundingMode.ROUND_HALF_UP); + t("0x2aef3ee6f864b26772c23cf6", "13287600730756091106849602806", 24, RoundingMode.ROUND_HALF_UP); + t("0x193c4c1a69add29d9a5101ced0568697d923", "2198325248780085112365807036920470754023715", 36, RoundingMode.ROUND_HALF_UP); + t("0x11a507516c68d662f15d9", "1333191524844399246644697", 21, RoundingMode.ROUND_HALF_UP); + t("0xa2669c148f4ea9e", "731388268367899294", 15, RoundingMode.ROUND_HALF_UP); + t("0xed2a498f218583395d57871", "4587441849070983049702111345", 23, RoundingMode.ROUND_HALF_UP); + t("0x1fbbac5129573", "558254565528947", 13, RoundingMode.ROUND_HALF_UP); + t("0x1b91780b06a70cf46e5fa0fa8e63407e80030f027a", "40291024919626546988689644749021723762456102109818", 42, RoundingMode.ROUND_HALF_UP); + t("0x25a90a2b75d596836e10d26ec831", "763841862190387816235893777156145", 28, RoundingMode.ROUND_HALF_UP); + t("0xfbd45cc9e2", "1081599642082", 10, RoundingMode.ROUND_HALF_UP); + t("0x621e835f12ad64e909cf7", "7413676543182627283180791", 21, RoundingMode.ROUND_HALF_UP); + t("0x17de6483675cb29063c", "7044803064789933295164", 19, RoundingMode.ROUND_HALF_UP); + t("0x2ecc612", "49071634", 7, RoundingMode.ROUND_HALF_UP); + t("0x14bb4a5d83f3d4bf43b66adada6b0e993784", "1805977369681030296729705669300424034301828", 36, RoundingMode.ROUND_HALF_UP); + t("0x8b63e2dca39c336b18", "2571294983995377543960", 18, RoundingMode.ROUND_HALF_UP); + t("0x3c1440de515e09b31f73cdd0da6e2", "19496787444412678571409607909811938", 29, RoundingMode.ROUND_HALF_UP); + t("0xd39570c80caa28598ea432085259", "4291428326751199011126676862554713", 28, RoundingMode.ROUND_HALF_UP); + t("0x1d54a95161a44ae4d216da350d20954f13992a85", "167448744619550277927636746527062265701749828229", 40, RoundingMode.ROUND_HALF_UP); + t("0xe3ffcc64277a78a8256d7e1d7c05eaa9bf", "77584111689906087598180624752236124875199", 34, RoundingMode.ROUND_HALF_UP); + t("0x22f4736", "36652854", 7, RoundingMode.ROUND_HALF_UP); + t("0x2c35e4d05c0", "3038123984320", 11, RoundingMode.ROUND_HALF_UP); + t("0x430e68bd9ad4952", "301994663360678226", 15, RoundingMode.ROUND_HALF_UP); + t("0x1d854cf1f48c4529d864b686f2d", "37421939842938093643010520149805", 27, RoundingMode.ROUND_HALF_UP); + t("0x5db3324efd09a682cd", "1728459668785308533453", 18, RoundingMode.ROUND_HALF_UP); + t("0x1b60d2a23a53bc5a", "1972808230993378394", 16, RoundingMode.ROUND_HALF_UP); + t("0x1b7b2cc91769682ad42af60ef67c77c99ac81d227197", "10281919698706053870205728976619722313496732052386199", 44, RoundingMode.ROUND_HALF_UP); + t("0x78a9c9d91cb45ec86599f1b402f6635265b69a0317", "176349517282896190364726424897935661923732528169751", 42, RoundingMode.ROUND_HALF_UP); + t("0x310f7e944db1e20ca7d4db559be74aafcd", "16694431636419175813863637436681440374733", 34, RoundingMode.ROUND_HALF_UP); + t("0x11a4ae80f151dad1752e32c310a41dae552c37b7b4", "25785693883194456949802584063055012266517133244340", 42, RoundingMode.ROUND_HALF_UP); + t("0x320abd803f00618b853f0f4ad06d76e5ead8eb20d", "4571024861681675091071130733403917525672421929485", 41, RoundingMode.ROUND_HALF_UP); + t("0x17f27d4daa32a", "421284028261162", 13, RoundingMode.ROUND_HALF_UP); + t("0x3fd14203387143ed10002039a6fed", "20709934734392064809458286974365677", 29, RoundingMode.ROUND_HALF_UP); + t("0xddf93c33cbe97520fb19a19", "4293593374816726677147720217", 23, RoundingMode.ROUND_HALF_UP); + t("0x37bc13d810602438ce47db31c0e7a87e6b7831", "1242924848237600517379561065653635852461111345", 38, RoundingMode.ROUND_HALF_UP); + t("0x15a", "346", 3, RoundingMode.ROUND_HALF_UP); + t("0x533921", "5454113", 6, RoundingMode.ROUND_HALF_UP); + t("0x770d01b680082f7c23db6444c14f885dacb63824", "679659960629478197799609320106784570818809968676", 40, RoundingMode.ROUND_HALF_UP); + t("0x1d35", "7477", 4, RoundingMode.ROUND_HALF_UP); + t("0xaa906c1dabfebe6da", "196647076124632540890", 17, RoundingMode.ROUND_HALF_UP); + t("0x655", "1621", 3, RoundingMode.ROUND_HALF_UP); + t("0x11af668734ef7a60033c5f518c530", "5739161962048683655238213338449200", 29, RoundingMode.ROUND_HALF_UP); + t("0x9035964bc6d843d71d2ef9124632b039ca9ad9d6062cd", "863281823741412484448091339719676346358410323679011533", 45, RoundingMode.ROUND_HALF_UP); + t("0xfa3d98dfd239530c9a9556", "302522339292227790310118742", 22, RoundingMode.ROUND_HALF_UP); + t("0x10fdb7f", "17816447", 7, RoundingMode.ROUND_HALF_UP); + t("0x18d260c9d8f110eea9d29", "1875481379014053338979625", 21, RoundingMode.ROUND_HALF_UP); + t("0x6dc6205912265fe68cb44ae5c", "543574178265693146271925448284", 25, RoundingMode.ROUND_HALF_UP); + t("0x19d6ad933a8e5", "454557212846309", 13, RoundingMode.ROUND_HALF_UP); + t("0x3e1ddad6b81e605", "279748388776437253", 15, RoundingMode.ROUND_HALF_UP); + t("0xe073b0188f2d6667b75f11f65a82fda", "18646734802776877837813543784990388186", 31, RoundingMode.ROUND_HALF_UP); + t("0x81f531048349c33f91627d55e1b6bdd8a78", "707557451293532648521737780488438655322744", 35, RoundingMode.ROUND_HALF_UP); + t("0x78b8be03f14", "8295928577812", 11, RoundingMode.ROUND_HALF_UP); + t("0x8", "8", 1, RoundingMode.ROUND_HALF_UP); + t("0x659874ecb742089cd0f2fc72a2e912d48334f2d", "36250497918673919606249316600592246963107483437", 39, RoundingMode.ROUND_HALF_UP); + t("0x2a03a8a82cd13dc18b5", "12400430345351117674677", 19, RoundingMode.ROUND_HALF_UP); + t("0x1e634adab5f805f52f70cac738dd261d7d6", "165447251922571882378062853693168471365590", 35, RoundingMode.ROUND_HALF_UP); + t("0x2d0b0ae2b685425d29b0ecb3b5edfa717cb1417", "16071927572096392119675195392748578598193665047", 39, RoundingMode.ROUND_HALF_UP); + t("0x7a87c66768a00656e6143d364", "606741009919509661621760021348", 25, RoundingMode.ROUND_HALF_UP); + t("0x32f102da079f77cac41", "15035262184397547023425", 19, RoundingMode.ROUND_HALF_UP); + t("0xa440f8912c06198b", "11835733123122207115", 16, RoundingMode.ROUND_HALF_UP); + t("0xc008c78c61addc8e085ca3ff6e76fa13", "255257360887256236558111057213476239891", 32, RoundingMode.ROUND_HALF_UP); + t("0x11649c762", "4668901218", 9, RoundingMode.ROUND_HALF_UP); + t("0x5572f75ca5f099eda", "98516089885791198938", 17, RoundingMode.ROUND_HALF_UP); + t("0xaf", "175", 2, RoundingMode.ROUND_HALF_UP); + t("0xc41a62e8bd1c7123c92220df", "60690961081480451125474894047", 24, RoundingMode.ROUND_HALF_UP); + t("0x765e3e05ca0c4b853679e80667d71bb51ec118c87c1", "2767923543808337676781898227256098432891809077954497", 43, RoundingMode.ROUND_HALF_UP); + t("0x643b91b0289fe98c02b3f790ed41085ba228ba4c", "572227512274253374435718937361849836268824345164", 40, RoundingMode.ROUND_HALF_UP); + t("0x12", "18", 2, RoundingMode.ROUND_HALF_UP); + t("0x28ea59cbb990457243147551fc12145", "3399121160718415003848736585359106373", 31, RoundingMode.ROUND_HALF_UP); + t("0x1c149ecb87796c6a9116eaa5", "8690508679745247747029527205", 24, RoundingMode.ROUND_HALF_UP); + t("0x3d24cfd5a3d86612", "4405874851959039506", 16, RoundingMode.ROUND_HALF_UP); + t("0x55", "85", 2, RoundingMode.ROUND_HALF_UP); + t("0x2b1dc5d2236fc61848eb80e4032e842131c7ea1edd0", "1008232683040405259975519873135905613349630326730192", 43, RoundingMode.ROUND_HALF_UP); + t("0x3591a1d0aaaa14514d8a0a8826ee", "1086505871907198290436180679337710", 28, RoundingMode.ROUND_HALF_UP); + t("0x1cba2a2f26dfe80b4c05d5f5496b9", "9322511400054499645799889634629305", 29, RoundingMode.ROUND_HALF_UP); + t("0xdd2f83", "14495619", 6, RoundingMode.ROUND_HALF_UP); + t("0x15c6f07", "22834951", 7, RoundingMode.ROUND_HALF_UP); + t("0x2f8f19d0d3ff", "52291659944959", 12, RoundingMode.ROUND_HALF_UP); + t("0x66877666510", "7045749564688", 11, RoundingMode.ROUND_HALF_UP); + t("0x153d9792e5b2bd96679de7bbee9f34cd131", "115644794069417523805676707579411471061297", 35, RoundingMode.ROUND_HALF_UP); + t("0x1f6ce9be57023fe14fa060be4c01e7a", "2610723550735662335298250928784678522", 31, RoundingMode.ROUND_HALF_UP); + t("0x9e63632c0dca5485e48bee9ad1b5a28049aa157e307", "3703754566336033126591165191492065433661004773319431", 43, RoundingMode.ROUND_HALF_UP); + t("0x8371b0d9c54b9de08c7", "38795452173112617863367", 19, RoundingMode.ROUND_HALF_UP); + t("0xd3b35e07218e7b0c20bfc", "15995649127931990167915516", 21, RoundingMode.ROUND_HALF_UP); + t("0xc6b6dfbdc40011198bd286c0", "61499113032079803212142642880", 24, RoundingMode.ROUND_HALF_UP); + t("0x7cf9a45c21858e891798ad503930df741b93f61f127", "2922422513262668930583564242609727203228735133315367", 43, RoundingMode.ROUND_HALF_UP); + t("0x678049c017727c47ff4cc7ba35a849365fd111", "2308152223994224783375970725248611287908208913", 38, RoundingMode.ROUND_HALF_UP); + t("0x72b397d", "120273277", 7, RoundingMode.ROUND_HALF_UP); + t("0xf9445c1a", "4182006810", 8, RoundingMode.ROUND_HALF_UP); + t("0x4aff51f382c09c710fc5302d96b22", "24338029676537462451324711222209314", 29, RoundingMode.ROUND_HALF_UP); + t("0x10459598a086ea0f535900e70abab1e2ce7377", "362873575854611890806983645493404163992613751", 38, RoundingMode.ROUND_HALF_UP); + t("0x13640c20a010754124", "357697310375837778212", 18, RoundingMode.ROUND_HALF_UP); + t("0x14147e01ca6501f252ca", "94825344299726024102602", 20, RoundingMode.ROUND_HALF_UP); + t("0x466", "1126", 3, RoundingMode.ROUND_HALF_UP); + t("0x74c698493dd81930c415", "551457940709438745789461", 20, RoundingMode.ROUND_HALF_UP); + t("0x2e5f2b623ba0cfee63689d427bad6eb6be5", "252471852786048400736119714699808445524965", 35, RoundingMode.ROUND_HALF_UP); + t("0x38a52cc273671b0b8b078ec7f7f17102c9bd8c", "1263230489190036409842245570352830262209527180", 38, RoundingMode.ROUND_HALF_UP); + t("0x78655d620287e6db76141a906c5701bdc47", "655497934873142286500331809443840511433799", 35, RoundingMode.ROUND_HALF_UP); + t("0x6eecb9a0d2fdd3b9a541f3", "134099742883823958727410163", 22, RoundingMode.ROUND_HALF_UP); + t("0x54bd61680d7ceb5beb37894e46599ef77", "1802215542237292717156325458542562242423", 33, RoundingMode.ROUND_HALF_UP); + t("0x3a847dfcee83cd860720c8c0d8b53c7fda25d77", "20879758636120455697847204680129815020870720887", 39, RoundingMode.ROUND_HALF_UP); + t("0x76eb310380a6f577f166b90d28c3b107a", "2529121398079147937688504401561827086458", 33, RoundingMode.ROUND_HALF_UP); + t("0xb73dda2c", "3074284076", 8, RoundingMode.ROUND_HALF_UP); + t("0x3fd278b8d795a", "1122771216988506", 13, RoundingMode.ROUND_HALF_UP); + t("0x778da0c24f47774967183e20f8b1827299f", "650909720313013143267150228395755917748639", 35, RoundingMode.ROUND_HALF_UP); + t("0x6500d", "413709", 5, RoundingMode.ROUND_HALF_UP); + t("0x5a1bf29425c38c8f22a81fc3f105169ce4907acbb7", "131694699796400245476746024523885969905255483886519", 42, RoundingMode.ROUND_HALF_UP); + t("0x1e946da5ed27825dff2", "9025563349429600509938", 19, RoundingMode.ROUND_HALF_UP); + t("0x23d288aea4", "153856028324", 10, RoundingMode.ROUND_HALF_UP); + t("0x4bdc3b2b93e8cb0967b92", "5731840537208636428417938", 21, RoundingMode.ROUND_HALF_UP); + t("0x1c57b1", "1857457", 6, RoundingMode.ROUND_HALF_UP); + t("0xb6dab6e4caceab483d2085d9d1766a088a19", "15928860703021466826033711809396661962705433", 36, RoundingMode.ROUND_HALF_UP); + t("0x3c9e2c9d", "1016999069", 8, RoundingMode.ROUND_HALF_UP); + t("0x2d047117ed235996e16cb8", "54422637554743220665150648", 22, RoundingMode.ROUND_HALF_UP); + t("0xdda0ed04ef2e2b22a78e6455b862865ce", "4713519390205494839540473117533526320590", 33, RoundingMode.ROUND_HALF_UP); + t("0xa", "10", 1, RoundingMode.ROUND_HALF_UP); + t("0x984e5039808eb14e793dd95", "2946024784801310608062668181", 23, RoundingMode.ROUND_HALF_UP); + t("0x18b", "395", 3, RoundingMode.ROUND_HALF_UP); + t("0x1e30c76d4c3babeded1eb9d54", "149496328017603561036003908948", 25, RoundingMode.ROUND_HALF_UP); + t("0x4d1fb3fde8905", "1356776945387781", 13, RoundingMode.ROUND_HALF_UP); + t("0x1c6ad164b71af7cf0a92d7c2cf97ac3539cf4a190a6", "664509895940083432745213666480332815238360970924198", 43, RoundingMode.ROUND_HALF_UP); + t("0x29d730cd9c087e9", "188433258449504233", 15, RoundingMode.ROUND_HALF_UP); + t("0x4bbffc982422401d23e107db16617c0c0", "1611023225678920504550274579287300882624", 33, RoundingMode.ROUND_HALF_UP); + t("0x34fa796a05fee3b566107aef6fea5327c9f794ce6f2", "1238848647360391370812154035309938766206217768199922", 43, RoundingMode.ROUND_HALF_UP); + t("0x2907465cdd296accc8ab4bd", "793605010131443253911401661", 23, RoundingMode.ROUND_HALF_UP); + t("0x8aa7eb5be50", "9528363302480", 11, RoundingMode.ROUND_HALF_UP); + t("0x15c14f12e032624a1206", "102735615609474072056326", 20, RoundingMode.ROUND_HALF_UP); + t("0x2d2650f939302bf9306f3db1fd19a7666712ff8", "16109941674613560268665251639244419228113121272", 39, RoundingMode.ROUND_HALF_UP); + t("0xc0b42d10550ce0f4ea97567ede6bae89e93b", "16786869625005321512335207434991310677338427", 36, RoundingMode.ROUND_HALF_UP); + t("0xbcb3750ecd418048f3c9a907a1", "14950433883660044294408311998369", 26, RoundingMode.ROUND_HALF_UP); + t("0x5dd205e2db781f491bff", "443054323304979904404479", 20, RoundingMode.ROUND_HALF_UP); + t("0x3", "3", 1, RoundingMode.ROUND_HALF_UP); + t("0x108ba7dc0b83574862fffc703b989d5b578d862", "5903642409059499044928754369694490849414010978", 39, RoundingMode.ROUND_HALF_UP); + t("0x464a1", "287905", 5, RoundingMode.ROUND_HALF_UP); + t("0x172f", "5935", 4, RoundingMode.ROUND_HALF_UP); + t("0x3da62e0cd7d5edc8b6731fc", "1192467796933113553619464700", 23, RoundingMode.ROUND_HALF_UP); + t("0x16077c0833e289da0b", "406367684695924791819", 18, RoundingMode.ROUND_HALF_UP); + t("0x784c5768a01120f03ef7a73160baaa0c5f", "40935359210071367599328032328982052080735", 34, RoundingMode.ROUND_HALF_UP); + t("0x3ba90bcf292a852be", "68783684858858197694", 17, RoundingMode.ROUND_HALF_UP); + t("0x481df814c99e917079aeb", "5449011495668093676919531", 21, RoundingMode.ROUND_HALF_UP); + t("0xd14f6c28f6b1a66f83ec00058d939e6deae057", "4667774422027164788903448529246588503172243543", 38, RoundingMode.ROUND_HALF_UP); + t("0x36818425f9ca90bbe7a5b983c074", "1105511449492687971454561936457844", 28, RoundingMode.ROUND_HALF_UP); + t("0x2c977359c619b2a50e368272a2e12faa4", "948358531678320636918207632756786264740", 33, RoundingMode.ROUND_HALF_UP); + t("0x6786f6aaa24466c66772096948176f023b4ee4267e3", "2420882788095960105392950361690122210695410931099619", 43, RoundingMode.ROUND_HALF_UP); + t("0x468dd654d147", "77575000215879", 12, RoundingMode.ROUND_HALF_UP); + t("0x466d816c1a1", "4839758545313", 11, RoundingMode.ROUND_HALF_UP); + t("0xd6bcf011b9965", "3777711518226789", 13, RoundingMode.ROUND_HALF_UP); + t("0xcbd3b0dd08123466b52d", "962545403373485503722797", 20, RoundingMode.ROUND_HALF_UP); + t("0x41ea3b163a5614966ae7957bde8126e0a93d4a4", "23519245104289372491020812621093511206089774244", 39, RoundingMode.ROUND_HALF_UP); + t("0x3d42f8df046ed6958fc5b33d9fa992b492f1e", "85386222153107555893245630091838241326575390", 37, RoundingMode.ROUND_HALF_UP); + t("0xfba75c3e2c8a777f", "18133563846735591295", 16, RoundingMode.ROUND_HALF_UP); + t("0x6a7f74151fcc6ed8ed2b3f19100", "135002082526570912993917396947200", 27, RoundingMode.ROUND_HALF_UP); + t("0x5a0d410c996ff91fce14753b986e36ed02c8038a", "514104745647653703895348991238314574953430123402", 40, RoundingMode.ROUND_HALF_UP); + t("0x98ef2d49bef8f926076d15ea07db47db", "203284532859688206391148792201594226651", 32, RoundingMode.ROUND_HALF_UP); + t("0x1ed53c612a9ce8f563380bc006af575169", "10491910079311728745430929182060466098537", 34, RoundingMode.ROUND_HALF_UP); + t("0x11c25b068603cce9f3bbdca", "343512914478456071211695562", 23, RoundingMode.ROUND_HALF_UP); + t("0x772a8e4b457995e13897900d8000ad6c1f7c9a1", "42519933036531441133313813110786358673933846945", 39, RoundingMode.ROUND_HALF_UP); + t("0x1d1cd508f519156", "131111610056020310", 15, RoundingMode.ROUND_HALF_UP); + t("0x5da9a9bf96be6918e50", "27644363394761964490320", 19, RoundingMode.ROUND_HALF_UP); + t("0x14a08119381f59538f02a2c549605", "6693834434076143282016415621879301", 29, RoundingMode.ROUND_HALF_UP); + t("0x598e03f8e19f4379c5b70b9c15f4fa9156bcdf74116", "2094150575916241308211940593568291573516182910091542", 43, RoundingMode.ROUND_HALF_UP); + t("0x355b5738c3cfe719582f351c17af6b629d4", "290502049209306091381681583617785118206420", 35, RoundingMode.ROUND_HALF_UP); + t("0x15a243c6d249", "23786665988681", 12, RoundingMode.ROUND_HALF_UP); + t("0x3a9e2ecf094bcff872507503010fcbac11", "19946638349599244406026473172687735467025", 34, RoundingMode.ROUND_HALF_UP); + t("0x2b0142e2bc8feaa4657563be6095f30f9f787e6", "15344670653497010702533663436850880847648622566", 39, RoundingMode.ROUND_HALF_UP); + t("0x249c44f17568b404f004d1fab5d14", "11880762815518784994450284839918868", 29, RoundingMode.ROUND_HALF_UP); + t("0x5496b049593863de8ab664bcf192d8aa3046b16", "30182230828157060898612488525177295598317234966", 39, RoundingMode.ROUND_HALF_UP); + t("0x3308c774d7a9d93620db30a6dc7c3afb6245cda884b8", "19094196084927690615894155917265930659289199085651128", 44, RoundingMode.ROUND_HALF_UP); + t("0xe1aebc286f28a4213d5b89774ba1b2c", "18748973437595317918722188262730505004", 31, RoundingMode.ROUND_HALF_UP); + t("0x16fceb35ec78f61b7", "26503318076778308023", 17, RoundingMode.ROUND_HALF_UP); + t("0x1e", "30", 2, RoundingMode.ROUND_HALF_UP); + t("0x802a2fb0ef85471", "577202901428491377", 15, RoundingMode.ROUND_HALF_UP); + t("0x22905c", "2265180", 6, RoundingMode.ROUND_HALF_UP); + t("0x1933e587c735a0944325aec2059cbfc7447e", "2195466647218532976318479234926892387091582", 36, RoundingMode.ROUND_HALF_UP); + t("0xdcb0", "56496", 4, RoundingMode.ROUND_HALF_UP); + t("0x86aee9b70c52fb93dea1ce85e", "666919169547294519852185479262", 25, RoundingMode.ROUND_HALF_UP); + t("0x396769e718f39e316d00bcdc49721c228ea3", "5000590150769401690668401759809188422389411", 36, RoundingMode.ROUND_HALF_UP); + t("0xad7b683e1fc7cdea2dd3fda24f96f6ce5022803f0dd", "4056709020997348015695058837718936633645982841827549", 43, RoundingMode.ROUND_HALF_UP); + t("0x325bd1", "3300305", 6, RoundingMode.ROUND_HALF_UP); + t("0x3bace918a9ac3ab0e2c9d64", "1154290724173228330560822628", 23, RoundingMode.ROUND_HALF_UP); + t("0x2a549e1fc1c63f027e4af4879d42e41d2c", "14404335589336084186051447276771435879724", 34, RoundingMode.ROUND_HALF_UP); + t("0x6f0cfb185fd93b13bfe1", "524422133844304697999329", 20, RoundingMode.ROUND_HALF_UP); + t("0x1ed471cbb25831d740fad016d1d3b092756e7", "42970555202513419911347877108629841551775463", 37, RoundingMode.ROUND_HALF_UP); + t("0xf974bd83", "4185177475", 8, RoundingMode.ROUND_HALF_UP); + t("0x7f6d06d941b729ee41ec06af76ce5284c2", "43360782010770292902695704345624074945730", 34, RoundingMode.ROUND_HALF_UP); + t("0x52b6d2313c32bd8b492b829f096003bab3ae2af0afb", "1934189728430433084118852318011260708451697369746171", 43, RoundingMode.ROUND_HALF_UP); + t("0x109589b891295cc8f907838a8ff1a1a8d085d9b5e4c", "387803793636734915816188347290438110144007551802956", 43, RoundingMode.ROUND_HALF_UP); + t("0xad9a3ee51ae483bc3c92ee9719ed", "3521077463500554185208755094231533", 28, RoundingMode.ROUND_HALF_UP); + t("0xf3f77b3b2e9b8c8ac86ff", "18433604493853855199299327", 21, RoundingMode.ROUND_HALF_UP); + t("0x26d3525", "40711461", 7, RoundingMode.ROUND_HALF_UP); + t("0x38b954141f26f2a4afe6f7a9b5e34286428e3", "79061632155013935902994702509288944969197795", 37, RoundingMode.ROUND_HALF_UP); + t("0x38240bedb839f71c66a", "16569841585813541996138", 19, RoundingMode.ROUND_HALF_UP); + t("0x7518019e9f1b02abec44d0b94eb31e2641e59f76b", "10695796466552661793442196497637299434594286303083", 41, RoundingMode.ROUND_HALF_UP); + t("0x3fa622c7ed221182e769dd30636092d163", "21658621556399738720046392793916662534499", 34, RoundingMode.ROUND_HALF_UP); + t("0x789b534735", "518002001717", 10, RoundingMode.ROUND_HALF_UP); + t("0x3a53c2755b1260d232bb8d62729689f9aeb62e35f60e", "21822791108317911324343501911275861646156768606549518", 44, RoundingMode.ROUND_HALF_UP); + t("0x5337ac5ca7b7ee1c", "5996450942817922588", 16, RoundingMode.ROUND_HALF_UP); + t("0x157b2e3d04dc2d3f2c5d24471f4ea6e", "1784586140646675991730453110223858286", 31, RoundingMode.ROUND_HALF_UP); + t("0x1efcc47a12967085ad8cf3e4bd18a9d6", "41189283705768995637851264202925713878", 32, RoundingMode.ROUND_HALF_UP); + t("0x1889b9fe35e07e831ee8", "115877401735749106343656", 20, RoundingMode.ROUND_HALF_UP); + t("0x7526131ba0fe6e6d338a003af179d", "38016936118707892590533223274977181", 29, RoundingMode.ROUND_HALF_UP); + t("0x1ea4cb38dc109662aff507", "37045991477844459182355719", 22, RoundingMode.ROUND_HALF_UP); + t("0x16166f015f2938", "6217115507829048", 14, RoundingMode.ROUND_HALF_UP); + t("0x5f550f99", "1599410073", 8, RoundingMode.ROUND_HALF_UP); + t("0x1a12b67c34d57d7b7ab7bac0", "8069232682011269556707244736", 24, RoundingMode.ROUND_HALF_UP); + t("0x23310db646fa85615a6d3a159621607b", "46777680511357499186246331786523140219", 32, RoundingMode.ROUND_HALF_UP); + t("0xdf", "223", 2, RoundingMode.ROUND_HALF_UP); + t("0x1f000932fa1ca86508eaafa96ab453c29", "659300071197325571806191735253210840105", 33, RoundingMode.ROUND_HALF_UP); + t("0x35ec5ce3922a7b1370", "994709174014332048240", 18, RoundingMode.ROUND_HALF_UP); + t("0xe77b7374944b", "254517404013643", 12, RoundingMode.ROUND_HALF_UP); + t("0x1d0f1645dc1656b1174ce08b54fe4e40d8a45a3", "10368573985886829358840965263279576467697714595", 39, RoundingMode.ROUND_HALF_UP); + t("0xef557cf221b976840f876d6fb8f40", "77668303327151794801661259781214016", 29, RoundingMode.ROUND_HALF_UP); + t("0x11d071e8c8ed7f60c4fce894fa20a754", "23679184030321848843326203235370313556", 32, RoundingMode.ROUND_HALF_UP); + t("0x7cee134a1dab3d5cff44b067e971", "2533881063347006744885016016710001", 28, RoundingMode.ROUND_HALF_UP); + t("0x2fc6363ce8caa6f2f7d7dc022c", "3785067239745545603746923020844", 26, RoundingMode.ROUND_HALF_UP); + t("0x3bf5488fde2e", "65924670414382", 12, RoundingMode.ROUND_HALF_UP); + t("0x5661a43808fca8b4914", "25495292807490092878100", 19, RoundingMode.ROUND_HALF_UP); + t("0x25ad8a6e4382e566", "2714978356557964646", 16, RoundingMode.ROUND_HALF_UP); + t("0x43906e3351853cb2ad062c9315091712290", "367854393737791193668837913203410675507856", 35, RoundingMode.ROUND_HALF_UP); + t("0xecd7559017ec", "260409597630444", 12, RoundingMode.ROUND_HALF_UP); + t("0x393b9b61ad34", "62928172723508", 12, RoundingMode.ROUND_HALF_UP); + t("0x31b7ebb7e8b136deb2b30b4593ad1a775e7", "270692937955729861614382230692061625415143", 35, RoundingMode.ROUND_HALF_UP); + t("0x31c49f4d6a14d5a60e3be92b6c7d09a28ef733", "1109864730568327689119301182815368410691467059", 38, RoundingMode.ROUND_HALF_UP); + t("0x2ce42c8496", "192806683798", 10, RoundingMode.ROUND_HALF_UP); + t("0x3abd", "15037", 4, RoundingMode.ROUND_HALF_UP); + t("0xaa954cd38c39006a0d5d65a0b2", "13514993771256587973240014872754", 26, RoundingMode.ROUND_HALF_UP); + t("0x6f8a84d", "116959309", 7, RoundingMode.ROUND_HALF_UP); + t("0x5ab9da880303", "99754281796355", 12, RoundingMode.ROUND_HALF_UP); + t("0x8273c422025895e75c", "2406418559385510209372", 18, RoundingMode.ROUND_HALF_UP); + t("0x476bd81afce52", "1256456203521618", 13, RoundingMode.ROUND_HALF_UP); + t("0x84c5f2554693b9f5500f5bb85b158fde13e1f", "185058871763639409971122557584749513555394079", 37, RoundingMode.ROUND_HALF_UP); + t("0x7705c09763f0c8", "33501846960337096", 14, RoundingMode.ROUND_HALF_UP); + t("0x514fb06b03ae4e191f9375228e62", "1649188801468585902988396540890722", 28, RoundingMode.ROUND_HALF_UP); + t("0x1fc020c94aec1d384d6939fc0b55b6275a201238e6", "46403408144166737594428754848567058468276133837030", 42, RoundingMode.ROUND_HALF_UP); + t("0xef3608f1c4e83", "4208245717356163", 13, RoundingMode.ROUND_HALF_UP); + t("0x1acb8e8c35bb51f0a97f", "126536489245502589675903", 20, RoundingMode.ROUND_HALF_UP); + t("0x117eacbdcefdf0a6a17f2fff826d4a3757e9a72", "6242361556294202529040777632205572383849749106", 39, RoundingMode.ROUND_HALF_UP); + t("0x1725ab", "1516971", 6, RoundingMode.ROUND_HALF_UP); + t("0xdee149", "14606665", 6, RoundingMode.ROUND_HALF_UP); + t("0x278cbbef4c3b7a5cd3ae71e1", "12240052494575754714578579937", 24, RoundingMode.ROUND_HALF_UP); + t("0x2570b2cd172507d801138abed2", "2966320491435734983427362569938", 26, RoundingMode.ROUND_HALF_UP); + t("0x7a61cd850ab00f4e75b8fdd", "2367212971376424991309139933", 23, RoundingMode.ROUND_HALF_UP); + t("0x1c46b1c9ef8122e5c0809", "2136485514231402911762441", 21, RoundingMode.ROUND_HALF_UP); + t("0x159a345bdf44d369a", "24905827046438811290", 17, RoundingMode.ROUND_HALF_UP); + t("0x7dd0aa8c145447eb92707ad1d07", "159489590003544512404938984070407", 27, RoundingMode.ROUND_HALF_UP); + t("0x24b44822469ba933aa9cc564a0b792345", "780612549310309792407655025164475245381", 33, RoundingMode.ROUND_HALF_UP); + t("0x3a670f32d8a0d0c5fe1d860669e0fa790a28", "5087581870263472260351886848536796076771880", 36, RoundingMode.ROUND_HALF_UP); + t("0x2413dcab4dd4acf50d555c028f9dfa7", "2997208574424073828351508066743213991", 31, RoundingMode.ROUND_HALF_UP); + t("0x339ef7a5f81e079987fa8c3ae71", "65437348931585993956193860824689", 27, RoundingMode.ROUND_HALF_UP); + t("0x15d1fe6b5dfe7e1a87573a3946b42cb4437be39c6", "1993149199833169001344544884949567309662274861510", 41, RoundingMode.ROUND_HALF_UP); + t("0x7672ff747c781c06ec82bf84418073cc9158fdb", "42264090573810039509111928267687533762028343259", 39, RoundingMode.ROUND_HALF_UP); + t("0x66d1", "26321", 4, RoundingMode.ROUND_HALF_UP); + t("0x1487132dabd4006942ea4621e5753f54520400535ef3", "7680300593500415724655977000547063327920546737512179", 44, RoundingMode.ROUND_HALF_UP); + t("0x8ca", "2250", 3, RoundingMode.ROUND_HALF_UP); + t("0xab32097dd97de47c4f76930046f32a1", "14222362164666534040463596276719497889", 31, RoundingMode.ROUND_HALF_UP); + t("0x198c811986971ccf4c7ae1d257bd14617", "543363838528230108444050115794098538007", 33, RoundingMode.ROUND_HALF_UP); + t("0x3434042fa72b6bd086b5f583063b090b", "69389940122557978795038540059404601611", 32, RoundingMode.ROUND_HALF_UP); + t("0x5180a950fe82c6376276a586c25b5c5c5b4bb8a21e0e", "30493736786942864405814520647491453938628818133720590", 44, RoundingMode.ROUND_HALF_UP); + t("0x6e1b6e52c50", "7566505880656", 11, RoundingMode.ROUND_HALF_UP); + t("0x977a3cf2b2f06c31b3d", "44708264591227581831997", 19, RoundingMode.ROUND_HALF_UP); + t("0x238d459b304a504cc07bde524ffcae", "184595724574603234807440528928406702", 30, RoundingMode.ROUND_HALF_UP); + t("0x2951804f7cc040bcabed937dfc07518ebf0c31156972", "15459035341493840021436449671050677487751991559285106", 44, RoundingMode.ROUND_HALF_UP); + t("0x2b0a983ec857ac84ef5f", "203257196630153042915167", 20, RoundingMode.ROUND_HALF_UP); + t("0x44ebf64ca6d7048632dc366985bacf6ca72f55bb89cb3", "412586872136786946015831424411703662517991501351918771", 45, RoundingMode.ROUND_HALF_UP); + + // Floats. + + t("0x75bcd15.e06522c47b19a6c5263a515f9917be8d99dc09ac", "123456789.87654321", 47, RoundingMode.ROUND_HALF_UP); + t("-0x0.000002123e2ccefcf5e755beec5961bda3d5a3b9", "-0.000000123456789", 35, RoundingMode.ROUND_HALF_UP); + t("0x3e7.ffbe76c8b4395810624dd2f1a9fbe76c8b439581", "999.999", 43, RoundingMode.ROUND_HALF_UP); + t("-0x1f846105.402bf1f5be1e92bd2fdbdca317fa561bb1faaa3c", "-528769285.2506705498654986754987694357629487612132293856", 48, RoundingMode.ROUND_HALF_UP); + t("0x4e8ba596e760723db17586b2141fce3b37f803587c2c09a7f054e80000000000000000000000", "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", 76, RoundingMode.ROUND_HALF_UP); + t("0x8781fe7e4176fc66a66ca5730090c7", "703596669768604729463688604501971142.9176994711280241981325903319", 30, RoundingMode.ROUND_HALF_UP); + + // Include binary exponent. + + t = (string expected, BigDecimalArgument n, long sd, RoundingMode rm) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToHex(sd, rm)); + }; + + t("0x0p+0", "0", 40, RoundingMode.ROUND_HALF_UP); + t("0x1p+53", "9007199254740992", 40, RoundingMode.ROUND_HALF_UP); + t("0x1.8p+8", "384", 40, RoundingMode.ROUND_HALF_UP); + t("0x1p+1", "2", 40, RoundingMode.ROUND_HALF_UP); + t("0x1p+8", "256", 40, RoundingMode.ROUND_HALF_UP); + t("0x1p-6", "0.015625", 40, RoundingMode.ROUND_HALF_UP); + t("0x1.b7p-1", "0.857421875", 40, RoundingMode.ROUND_HALF_UP); + + t("0x1.999999999999ap-4", "0x1.999999999999ap-4", 14, RoundingMode.ROUND_DOWN); + + t("0x1.921fb4d12d84ap+1", "3.1415926", 14, RoundingMode.ROUND_HALF_UP); + t("0x1.5b23a8dd37fc2p-10", "0.001324231321", 14, RoundingMode.ROUND_HALF_UP); + t("0x1.81016cc52538ap+9", "770.0111319", 14, RoundingMode.ROUND_HALF_UP); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToNearestTests.cs b/DecimalSharp.Tests/BigDecimalToNearestTests.cs new file mode 100644 index 0000000..f97997c --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToNearestTests.cs @@ -0,0 +1,250 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToNearest")] + public class BigDecimalToNearestTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToNearest() + { + var isMinusZero = (BigDecimal n) => + { + return n.IsZero() && n.IsNegative(); + }; + + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (bool actual) => + { + BigDecimalTests.assert(actual); + }; + + t(!isMinusZero(bigDecimalFactory.BigDecimal(0).ToNearest(0))); + t(isMinusZero(bigDecimalFactory.BigDecimal(-1).ToNearest(0))); + t(isMinusZero(bigDecimalFactory.BigDecimal("-0").ToNearest(0))); + t(!isMinusZero(bigDecimalFactory.BigDecimal(1).ToNearest(0))); + t(!isMinusZero(bigDecimalFactory.BigDecimal(1).ToNearest("-0"))); + t(!isMinusZero(bigDecimalFactory.BigDecimal(1).ToNearest(-3))); + t(isMinusZero(bigDecimalFactory.BigDecimal(-1).ToNearest(-3))); + + var t2 = (string expected, BigDecimalArgument n, BigDecimalArgument v, RoundingMode? rm) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToNearest(v, rm).ValueOf()); + }; + + t2("Infinity", double.PositiveInfinity, (string?)null, null); + t2("-Infinity", double.NegativeInfinity, (string?)null, null); + t2("NaN", double.NaN, (string?)null, null); + t2("NaN", double.NaN, double.NaN, null); + t2("NaN", double.NaN, double.PositiveInfinity, null); + t2("NaN", double.NaN, double.NegativeInfinity, null); + t2("NaN", double.NaN, 0, null); + t2("NaN", double.NaN, "-0", null); + + t2("Infinity", "9.999e+9000000000000000", "1e+9000000000000001", null); + t2("Infinity", "9.999e+9000000000000000", "-1e+9000000000000001", null); + t2("-Infinity", "-9.999e+9000000000000000", "1e+9000000000000001", null); + t2("-Infinity", "-9.999e+9000000000000000", "-1e+9000000000000001", null); + t2("9.999e+9000000000000000", "9.999e+9000000000000000", (string?)null, null); + t2("-9.999e+9000000000000000", "-9.999e+9000000000000000", (string?)null, null); + + t2("NaN", 123.456, double.NaN, null); + t2("Infinity", 123.456, double.PositiveInfinity, null); + t2("Infinity", 123.456, double.NegativeInfinity, null); + t2("0", 123.456, 0, null); + t2("0", 123.456, "-0", null); + + t2("NaN", -123.456, double.NaN, null); + t2("-Infinity", -123.456, double.PositiveInfinity, null); + t2("-Infinity", -123.456, double.NegativeInfinity, null); + t2("-0", -123.456, "-0", null); + + t2("0", 0, 0, null); + t2("Infinity", 0, double.PositiveInfinity, null); + t2("Infinity", 0, double.NegativeInfinity, null); + t2("-Infinity", "-0", double.PositiveInfinity, null); + t2("-Infinity", "-0", double.NegativeInfinity, null); + + t2("0", 1, -3, null); + t2("-0", -1, -3, null); + t2("3", 1.5, -3, RoundingMode.ROUND_UP); + t2("-0", -1.5, -3, RoundingMode.ROUND_DOWN); + t2("-3", -1.5, -3, RoundingMode.ROUND_CEIL); + + t2("123", 123.456, (string?)null, null); + t2("123", 123.456, 1, null); + t2("123.5", 123.456, 0.1, null); + t2("123.46", 123.456, 0.01, null); + t2("123.456", 123.456, 0.001, null); + + t2("123", 123.456, -1, null); + t2("123.5", 123.456, -0.1, null); + t2("123.46", 123.456, -0.01, null); + t2("123.456", 123.456, -0.001, null); + + t2("124", 123.456, "-2", null); + t2("123.4", 123.456, "-0.2", null); + t2("123.46", 123.456, "-0.02", null); + t2("123.456", 123.456, "-0.002", null); + + t2("83105511540", "83105511539.5", 1, RoundingMode.ROUND_HALF_UP); + t2("83105511539", "83105511539.499999999999999999999999999999", 1, RoundingMode.ROUND_HALF_UP); + t2("83105511539", "83105511539.5", "1", RoundingMode.ROUND_HALF_DOWN); + t2("83105511540", "83105511539.5000000000000000000001", 1, RoundingMode.ROUND_HALF_DOWN); + + bigDecimalFactory.Config.Precision = 3; + + t2("83105511540", "83105511539.5", bigDecimalFactory.BigDecimal(1), RoundingMode.ROUND_HALF_UP); + t2("83105511539", "83105511539.499999999999999999999999999999", 1, RoundingMode.ROUND_HALF_UP); + t2("83105511539", "83105511539.5", bigDecimalFactory.BigDecimal("1"), RoundingMode.ROUND_HALF_DOWN); + t2("83105511540", "83105511539.5000000000000000000001", 1, RoundingMode.ROUND_HALF_DOWN); + + bigDecimalFactory.Config.Precision = 20; + + t2("83105511540", "83105511539.5", -1, RoundingMode.ROUND_HALF_UP); + t2("83105511539", "83105511539.499999999999999999999999999999", -1, RoundingMode.ROUND_HALF_UP); + t2("83105511539", "83105511539.5", "-1", RoundingMode.ROUND_HALF_DOWN); + t2("83105511540", "83105511539.5000000000000000000001", -1, RoundingMode.ROUND_HALF_DOWN); + + t2("-83105511540", "-83105511539.5", bigDecimalFactory.BigDecimal(-1), RoundingMode.ROUND_HALF_UP); + t2("-83105511539", "-83105511539.499999999999999999999999999999", 1, RoundingMode.ROUND_HALF_UP); + t2("-83105511539", "-83105511539.5", bigDecimalFactory.BigDecimal("-1"), RoundingMode.ROUND_HALF_DOWN); + t2("-83105511540", "-83105511539.5000000000000000000001", -1, RoundingMode.ROUND_HALF_DOWN); + + t2("83105511540", "83105511539.5", 1, RoundingMode.ROUND_UP); + t2("83105511539", "83105511539.5", 1, RoundingMode.ROUND_DOWN); + t2("83105511540", "83105511539.5", 1, RoundingMode.ROUND_CEIL); + t2("83105511539", "83105511539.5", 1, RoundingMode.ROUND_FLOOR); + t2("83105511540", "83105511539.5", 1, RoundingMode.ROUND_HALF_UP); + t2("83105511539", "83105511539.5", 1, RoundingMode.ROUND_HALF_DOWN); + t2("83105511540", "83105511539.5", 1, RoundingMode.ROUND_HALF_EVEN); + t2("83105511540", "83105511539.5", 1, RoundingMode.ROUND_HALF_CEIL); + t2("83105511539", "83105511539.5", 1, RoundingMode.ROUND_HALF_FLOOR); + t2("83105511539", "83105511539.499999999999999999999999999999", (string?)null, RoundingMode.ROUND_UP); + t2("83105511539", "83105511539.499999999999999999999999999999", 1, RoundingMode.ROUND_DOWN); + t2("83105511539", "83105511539.499999999999999999999999999999", (string?)null, RoundingMode.ROUND_CEIL); + t2("83105511539", "83105511539.499999999999999999999999999999", 1, RoundingMode.ROUND_FLOOR); + t2("83105511539", "83105511539.499999999999999999999999999999", (string?)null, RoundingMode.ROUND_HALF_UP); + t2("83105511539", "83105511539.499999999999999999999999999999", 1, RoundingMode.ROUND_HALF_DOWN); + t2("83105511539", "83105511539.499999999999999999999999999999", (string?)null, RoundingMode.ROUND_HALF_EVEN); + t2("83105511539", "83105511539.499999999999999999999999999999", 1, RoundingMode.ROUND_HALF_CEIL); + t2("83105511539", "83105511539.499999999999999999999999999999", (string?)null, RoundingMode.ROUND_HALF_FLOOR); + t2("83105511540", "83105511539.5000000000000000000001", (string?)null, RoundingMode.ROUND_UP); + t2("83105511539", "83105511539.5000000000000000000001", 1, RoundingMode.ROUND_DOWN); + t2("83105511540", "83105511539.5000000000000000000001", (string?)null, RoundingMode.ROUND_CEIL); + t2("83105511539", "83105511539.5000000000000000000001", 1, RoundingMode.ROUND_FLOOR); + t2("83105511540", "83105511539.5000000000000000000001", (string?)null, RoundingMode.ROUND_HALF_UP); + t2("83105511540", "83105511539.5000000000000000000001", 1, RoundingMode.ROUND_HALF_DOWN); + t2("83105511540", "83105511539.5000000000000000000001", (string?)null, RoundingMode.ROUND_HALF_EVEN); + t2("83105511540", "83105511539.5000000000000000000001", 1, RoundingMode.ROUND_HALF_CEIL); + t2("83105511540", "83105511539.5000000000000000000001", (string?)null, RoundingMode.ROUND_HALF_FLOOR); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + t2("83105511540", "83105511539.5", (string?)null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + t2("83105511539", "83105511539.5", (string?)null, null); + + t2("3847570", "3847561.00000749", 10, RoundingMode.ROUND_UP); + t2("42840000000000000", "42835000000000001", "1e+13", RoundingMode.ROUND_UP); + t2("42830000000000000", "42835000000000001", "1e+13", RoundingMode.ROUND_DOWN); + t2("42840000000000000", "42835000000000000.0002", "1e+13", RoundingMode.ROUND_UP); + t2("42830000000000000", "42835000000000000.0002", "1e+13", RoundingMode.ROUND_DOWN); + + t2("500", "449.999", 100, RoundingMode.ROUND_UP); + t2("400", "449.999", 100, RoundingMode.ROUND_DOWN); + t2("500", "449.999", 100, RoundingMode.ROUND_CEIL); + t2("400", "449.999", 100, RoundingMode.ROUND_FLOOR); + t2("400", "449.999", 100, RoundingMode.ROUND_HALF_UP); + t2("400", "449.999", 100, RoundingMode.ROUND_HALF_DOWN); + t2("400", "449.999", 100, RoundingMode.ROUND_HALF_EVEN); + t2("400", "449.999", 100, RoundingMode.ROUND_HALF_CEIL); + t2("400", "449.999", 100, RoundingMode.ROUND_HALF_FLOOR); + + t2("-500", "-449.999", 100, RoundingMode.ROUND_UP); + t2("-400", "-449.999", 100, RoundingMode.ROUND_DOWN); + t2("-400", "-449.999", 100, RoundingMode.ROUND_CEIL); + t2("-500", "-449.999", 100, RoundingMode.ROUND_FLOOR); + t2("-400", "-449.999", 100, RoundingMode.ROUND_HALF_UP); + t2("-400", "-449.999", 100, RoundingMode.ROUND_HALF_DOWN); + t2("-400", "-449.999", 100, RoundingMode.ROUND_HALF_EVEN); + t2("-400", "-449.999", 100, RoundingMode.ROUND_HALF_CEIL); + t2("-400", "-449.999", 100, RoundingMode.ROUND_HALF_FLOOR); + + t2("500", "450", 100, RoundingMode.ROUND_UP); + t2("400", "450", 100, RoundingMode.ROUND_DOWN); + t2("500", "450", 100, RoundingMode.ROUND_CEIL); + t2("400", "450", 100, RoundingMode.ROUND_FLOOR); + t2("500", "450", 100, RoundingMode.ROUND_HALF_UP); + t2("400", "450", 100, RoundingMode.ROUND_HALF_DOWN); + t2("400", "450", 100, RoundingMode.ROUND_HALF_EVEN); + t2("500", "450", 100, RoundingMode.ROUND_HALF_CEIL); + t2("400", "450", 100, RoundingMode.ROUND_HALF_FLOOR); + + t2("-500", "-450", 100, RoundingMode.ROUND_UP); + t2("-400", "-450", 100, RoundingMode.ROUND_DOWN); + t2("-400", "-450", 100, RoundingMode.ROUND_CEIL); + t2("-500", "-450", 100, RoundingMode.ROUND_FLOOR); + t2("-500", "-450", 100, RoundingMode.ROUND_HALF_UP); + t2("-400", "-450", 100, RoundingMode.ROUND_HALF_DOWN); + t2("-400", "-450", 100, RoundingMode.ROUND_HALF_EVEN); + t2("-400", "-450", 100, RoundingMode.ROUND_HALF_CEIL); + t2("-500", "-450", 100, RoundingMode.ROUND_HALF_FLOOR); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + t2("500", "450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + t2("400", "450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_CEIL; + t2("500", "450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + t2("400", "450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + t2("500", "450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_DOWN; + t2("500", "450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_EVEN; + t2("500", "450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_CEIL; + t2("500", "450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_FLOOR; + t2("500", "450.001", 100, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + t2("-500", "-450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + t2("-400", "-450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_CEIL; + t2("-400", "-450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + t2("-500", "-450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + t2("-500", "-450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_DOWN; + t2("-500", "-450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_EVEN; + t2("-500", "-450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_CEIL; + t2("-500", "-450.001", 100, null); + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_FLOOR; + t2("-500", "-450.001", 100, null); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToNumberTests.cs b/DecimalSharp.Tests/BigDecimalToNumberTests.cs new file mode 100644 index 0000000..69421eb --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToNumberTests.cs @@ -0,0 +1,102 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToNumber")] + public class BigDecimalToNumberTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToNumber() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (BigDecimalArgument n) => + { + BigDecimalTests.assert((double)1 / bigDecimalFactory.BigDecimal(n).ToNumber() == double.PositiveInfinity); + }; + + t("0"); + t("0.0"); + t("0.000000000000"); + t("0e+0"); + t("0e-0"); + t("1e-9000000000000000"); + + // Negative zero + // toNumber can't return negative zero in c# + /*t = (object n0) => + { + BigDecimal? n = n0.ToBigDecimal(bigDecimalFactory.Config); + + if (n == null) + Assert.Fail(); + + BigDecimalTests.assert((double)1 / n.toNumber() == double.NegativeInfinity); + }; + + t("-0"); + t("-0.0"); + t("-0.000000000000"); + t("-0e+0"); + t("-0e-0"); + t("-1e-9000000000000000");*/ + + var t2 = (BigDecimalArgument n, double expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToNumber()); + }; + + t2(double.PositiveInfinity, double.PositiveInfinity); + t2("Infinity", double.PositiveInfinity); + t2(double.NegativeInfinity, double.NegativeInfinity); + t2("-Infinity", double.NegativeInfinity); + t2(double.NaN, double.NaN); + t2("NaN", double.NaN); + + t2(1, 1); + t2("1", 1); + t2("1.0", 1); + t2("1e+0", 1); + t2("1e-0", 1); + + t2(-1, -1); + t2("-1", -1); + t2("-1.0", -1); + t2("-1e+0", -1); + t2("-1e-0", -1); + + t2("123.456789876543", 123.456789876543); + t2("-123.456789876543", -123.456789876543); + + t2("1.1102230246251565e-16", 1.1102230246251565e-16); + t2("-1.1102230246251565e-16", -1.1102230246251565e-16); + + t2("9007199254740991", 9007199254740991); + t2("-9007199254740991", -9007199254740991); + + t2("5e-324", 5e-324); + t2("1.7976931348623157e+308", 1.7976931348623157e+308); + + t2("9.999999e+9000000000000000", double.PositiveInfinity); + t2("-9.999999e+9000000000000000", double.NegativeInfinity); + t2("1e-9000000000000000", 0); + //t2("-1e-9000000000000000", -0); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToOctalTests.cs b/DecimalSharp.Tests/BigDecimalToOctalTests.cs new file mode 100644 index 0000000..1b8e548 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToOctalTests.cs @@ -0,0 +1,346 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToOctal")] + public class BigDecimalToOctalTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToOctal() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, long sd, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimal(n, config).ToOctal()); + }; + + t("NaN", double.NaN, 20, RoundingMode.ROUND_HALF_UP); + t("NaN", "NaN", 20, RoundingMode.ROUND_HALF_UP); + t("Infinity", double.PositiveInfinity, 20, RoundingMode.ROUND_HALF_UP); + t("-Infinity", double.NegativeInfinity, 20, RoundingMode.ROUND_HALF_UP); + t("Infinity", "Infinity", 20, RoundingMode.ROUND_HALF_UP); + t("-Infinity", "-Infinity", 20, RoundingMode.ROUND_HALF_UP); + + // Integers + + t("0o0", "0", 1, RoundingMode.ROUND_HALF_UP); + t("0o171634571716400543513334300705612071133717535572246575453160", "364584667335183828987221775272570428237696628507956848", 60, RoundingMode.ROUND_HALF_UP); + t("0o17140110747560", "1043696177008", 14, RoundingMode.ROUND_HALF_UP); + t("0o1656", "942", 4, RoundingMode.ROUND_HALF_UP); + t("0o642677755550042022420042650122720673705371422153432", "9341223088519577080757976073309527669316572954", 51, RoundingMode.ROUND_HALF_UP); + t("0o1651372117475740354637456547", "4427164671782016593583463", 28, RoundingMode.ROUND_HALF_UP); + t("0o432", "282", 3, RoundingMode.ROUND_HALF_UP); + t("0o1156036607174723020034543345673164620146641", "103357460209213083948351046056291650977", 43, RoundingMode.ROUND_HALF_UP); + t("0o347175", "118397", 6, RoundingMode.ROUND_HALF_UP); + t("0o250711224523642463565466455623", "408358568053857594342267795", 30, RoundingMode.ROUND_HALF_UP); + t("0o31464741215652662410302172736", "61905218854453628692395486", 29, RoundingMode.ROUND_HALF_UP); + t("0o1151171074647051031165674252760067", "764101851531641191689328779319", 34, RoundingMode.ROUND_HALF_UP); + t("0o111627132417321114752432320745434507337525667340540534056666", "220880699124044497678574383774865426395965086166441398", 60, RoundingMode.ROUND_HALF_UP); + t("0o66607051535464671602731746325356021372265", "9099202145653789818834446363266512053", 41, RoundingMode.ROUND_HALF_UP); + t("0o472035076601272777773466260770745221025541771310455547267433", "940021031620376267748547570264155096359926520862306075", 60, RoundingMode.ROUND_HALF_UP); + t("0o35100215607256233370100157131103657413347736114726441", "332554887108209374458014391052845453182019808545", 53, RoundingMode.ROUND_HALF_UP); + t("0o722062570016143", "32030085618787", 15, RoundingMode.ROUND_HALF_UP); + t("0o74663674130162363012065031725670307006351247702", "2650448086139415170144453379569169365028802", 47, RoundingMode.ROUND_HALF_UP); + t("0o221016156567502", "9966232203074", 15, RoundingMode.ROUND_HALF_UP); + t("0o761570133215525640271", "8966391655604633785", 21, RoundingMode.ROUND_HALF_UP); + t("0o101530101442425775517477023774", "158785455373148008304355324", 30, RoundingMode.ROUND_HALF_UP); + t("0o374160464102717737077444644401061474361141636", "21456498302081433312710883059235111093150", 45, RoundingMode.ROUND_HALF_UP); + t("0o31342760667031767334646421766116726252335314714", "1108212082493888677367272229520408961194444", 47, RoundingMode.ROUND_HALF_UP); + t("0o272343723733570133550665013", "880462300728651545799179", 27, RoundingMode.ROUND_HALF_UP); + t("0o27330316426437424646561612652414263301414200342717", "522342837272716004737400194551917026620851663", 50, RoundingMode.ROUND_HALF_UP); + t("0o33", "27", 2, RoundingMode.ROUND_HALF_UP); + t("0o6410235531675374505654365627", "15755268886904815024728983", 28, RoundingMode.ROUND_HALF_UP); + t("0o462207311743", "41106117603", 12, RoundingMode.ROUND_HALF_UP); + t("0o35434021473746", "2030987278310", 14, RoundingMode.ROUND_HALF_UP); + t("0o10766710063735420744724674434722341532775011206477", "200309946175742618027595387139557376886377791", 50, RoundingMode.ROUND_HALF_UP); + t("0o264652754111247167745300734100146216146065", "30046186741840723600384513771105209397", 42, RoundingMode.ROUND_HALF_UP); + t("0o1717051362601647", "67007056380839", 16, RoundingMode.ROUND_HALF_UP); + t("0o420547635403", "36601543427", 12, RoundingMode.ROUND_HALF_UP); + t("0o113650166605747526017701737745742053073656134564465203303", "443294363845688739540957905727674168806539626088131", 57, RoundingMode.ROUND_HALF_UP); + t("0o1403535540244734200354", "13901404808061976812", 22, RoundingMode.ROUND_HALF_UP); + t("0o74712131706533505237435313", "287567912644119793384139", 26, RoundingMode.ROUND_HALF_UP); + t("0o5136777371700436", "182450142019870", 16, RoundingMode.ROUND_HALF_UP); + t("0o2035677377165", "141448576629", 13, RoundingMode.ROUND_HALF_UP); + t("0o271106223317652510470133141417013436324344447232", "8063865882119118770028661617297344888458906", 48, RoundingMode.ROUND_HALF_UP); + t("0o1021722", "271314", 7, RoundingMode.ROUND_HALF_UP); + t("0o7036036165443146", "248356246275686", 16, RoundingMode.ROUND_HALF_UP); + t("0o6470565", "1732981", 7, RoundingMode.ROUND_HALF_UP); + t("0o61216176216205012773031", "454507717401133184537", 23, RoundingMode.ROUND_HALF_UP); + t("0o3002513066606060620347136440362562046653642", "255651532540391785253392875614499461026", 43, RoundingMode.ROUND_HALF_UP); + t("0o456", "302", 3, RoundingMode.ROUND_HALF_UP); + t("0o17065041017173527170644622577111123272557633404173157515", "88295987850015910722625103099562923405439709011789", 56, RoundingMode.ROUND_HALF_UP); + t("0o16027026131232476667231251", "66325667775824613159593", 26, RoundingMode.ROUND_HALF_UP); + t("0o16625630637244103026266171376764352575040", "2457838121719672737744590760418408992", 41, RoundingMode.ROUND_HALF_UP); + t("0o1561736223610", "118371198856", 13, RoundingMode.ROUND_HALF_UP); + t("0o15056662412721204036161014", "61822867030969079620108", 26, RoundingMode.ROUND_HALF_UP); + t("0o3477263035715376447112210", "17112580757759444423816", 25, RoundingMode.ROUND_HALF_UP); + t("0o161037100117541", "7769478438753", 15, RoundingMode.ROUND_HALF_UP); + t("0o32556410147661251456104752223004", "33072622383942794561666491908", 32, RoundingMode.ROUND_HALF_UP); + t("0o1211474324420476530235671057512302", "804188130270400499435404432578", 34, RoundingMode.ROUND_HALF_UP); + t("0o36007574066667272553066076615170250031017703", "2553404178224213798051876650192088604611", 44, RoundingMode.ROUND_HALF_UP); + t("0o1237051", "343593", 7, RoundingMode.ROUND_HALF_UP); + t("0o366237621254212707310212730126632527636236606", "20953914213183846148388529652331213045126", 45, RoundingMode.ROUND_HALF_UP); + t("0o676337572246445153657", "8042293848523986863", 21, RoundingMode.ROUND_HALF_UP); + t("0o157423050242731427202356723", "526719833217016133180883", 27, RoundingMode.ROUND_HALF_UP); + t("0o7732111706233511415326631451", "19164044677656856523125545", 28, RoundingMode.ROUND_HALF_UP); + t("0o133574562456214335435", "1652705792533576477", 21, RoundingMode.ROUND_HALF_UP); + t("0o12151", "5225", 5, RoundingMode.ROUND_HALF_UP); + t("0o1372066706", "199781830", 10, RoundingMode.ROUND_HALF_UP); + t("0o37324076026320245555326737570636206", "19911177604481197795113399696518", 35, RoundingMode.ROUND_HALF_UP); + t("0o2436", "1310", 4, RoundingMode.ROUND_HALF_UP); + t("0o15576357436114241002422756773501074050", "4461159021738482150619844582864936", 38, RoundingMode.ROUND_HALF_UP); + t("0o25163361", "5564145", 8, RoundingMode.ROUND_HALF_UP); + t("0o563305225055677232242325342", "1753817655195311740136162", 27, RoundingMode.ROUND_HALF_UP); + t("0o1730611463642631260026156435013323236764317226", "83774860480485487711819613225974439714454", 46, RoundingMode.ROUND_HALF_UP); + t("0o3124144616475210442326726176753", "3917395568817125518374141419", 31, RoundingMode.ROUND_HALF_UP); + t("0o122551245377370372510600247650271544", "52420971115555265131642802500452", 36, RoundingMode.ROUND_HALF_UP); + t("0o711265667352525777055750103304054072", "289883291844318827546712512419898", 36, RoundingMode.ROUND_HALF_UP); + t("0o1424357303022501420341156201", "3723432687881212284689537", 28, RoundingMode.ROUND_HALF_UP); + t("0o51147130442424172652616112", "194568628606971297864778", 26, RoundingMode.ROUND_HALF_UP); + t("0o3427410030517411126776423004072314", "2247499600567123820908846806220", 34, RoundingMode.ROUND_HALF_UP); + t("0o16602427320624026652410144225431222411", "4788262207154170686928960302163209", 38, RoundingMode.ROUND_HALF_UP); + t("0o46144610334425521434631035561707752201423", "6346533567879985413095577825858618131", 41, RoundingMode.ROUND_HALF_UP); + t("0o1130215551", "157358953", 10, RoundingMode.ROUND_HALF_UP); + t("0o1214401", "334081", 7, RoundingMode.ROUND_HALF_UP); + t("0o222116623333265530440631564017304", "180929743300409204225159995076", 33, RoundingMode.ROUND_HALF_UP); + t("0o15567437201441347355454544146426241554605511544026607651", "80286234176563111847045853769570753921004267573161", 56, RoundingMode.ROUND_HALF_UP); + t("0o2254120142306727111645063565", "5648689955684980442294133", 28, RoundingMode.ROUND_HALF_UP); + t("0o203252000343611312345016732574324517652170570536340103164002", "393097177469022242668976094291182082270851391919286274", 60, RoundingMode.ROUND_HALF_UP); + t("0o22410502071700760126344737773405044556536263663106274741", "108249648375668138579864767958324372334698552719841", 56, RoundingMode.ROUND_HALF_UP); + t("0o702464247710160725611573536407615231642232", "74869132891027108059075932498363368602", 42, RoundingMode.ROUND_HALF_UP); + t("0o71215302120100471557063", "528279067564974726707", 23, RoundingMode.ROUND_HALF_UP); + t("0o3443452305237156410051107403", "8630515683508240645394179", 28, RoundingMode.ROUND_HALF_UP); + t("0o1750617616706657707114034617432306132573321272245040042711", "5850571219466548068012306893496891664635414265742793", 58, RoundingMode.ROUND_HALF_UP); + t("0o747373012741076272574334113131066623327", "158199639324663999178714767706236631", 39, RoundingMode.ROUND_HALF_UP); + t("0o240646541755015151746375314736543447343444475552143", "3586530035933343022858608741776409267984061539", 51, RoundingMode.ROUND_HALF_UP); + t("0o21345516652054242646357330536124", "21600249893595093431386029140", 32, RoundingMode.ROUND_HALF_UP); + t("0o3052066107", "413690951", 10, RoundingMode.ROUND_HALF_UP); + t("0o116", "78", 3, RoundingMode.ROUND_HALF_UP); + t("0o3050340627050765676451357427033162550", "999186955807785473462332939887976", 37, RoundingMode.ROUND_HALF_UP); + t("0o172013616177746634055145614015", "295033519224308286956705805", 30, RoundingMode.ROUND_HALF_UP); + t("0o161654155547445343476406063530377171044513302703466", "2538635569062190223060841428161267358214358838", 51, RoundingMode.ROUND_HALF_UP); + t("0o36173", "15483", 5, RoundingMode.ROUND_HALF_UP); + t("0o36547444550627731264507057423205012330760602245415526634143", "91896719045463903069060584567797070657705215769917539", 59, RoundingMode.ROUND_HALF_UP); + t("0o23020170177167056322724056253016211772161010110040067", "217303698775390775219268953665006962201726042167", 53, RoundingMode.ROUND_HALF_UP); + t("0o360364043226375763434734203", "1135619094464764138731651", 27, RoundingMode.ROUND_HALF_UP); + t("0o14233136655362371400640556051237407411322356356326214052664", "36825078122035846824139359498863387810994115321025972", 59, RoundingMode.ROUND_HALF_UP); + t("0o1640200513276356713203217", "8561606752326371837583", 25, RoundingMode.ROUND_HALF_UP); + t("0o6103526361624161311443517175371632412741737", "521666973443756820065064110478867547103", 43, RoundingMode.ROUND_HALF_UP); + t("0o174406316667406655013647151755454742463", "40406618960600991640852771818947891", 39, RoundingMode.ROUND_HALF_UP); + t("0o7641714202176443731750235267341521674705251706234", "174307282119711580494340594082900153247173788", 49, RoundingMode.ROUND_HALF_UP); + t("0o740202262443263067454211712735764360631542423775344744", "5483538014645444559676878691527370323481540807140", 54, RoundingMode.ROUND_HALF_UP); + t("0o352754440661731162345175142131150650044732105622163", "5239828571223832230977981455751540869256651891", 51, RoundingMode.ROUND_HALF_UP); + t("0o373127070001223103537740007213", "607292123862578721351274123", 30, RoundingMode.ROUND_HALF_UP); + t("0o37572601640375442622771540474365322704464564070", "1382461219874045756706531331920884785145912", 47, RoundingMode.ROUND_HALF_UP); + t("0o1442414261073074545327716347556337315543405616452064022", "9163205510581199876674535919032970590548216277010", 55, RoundingMode.ROUND_HALF_UP); + t("0o1637342435475173653242473", "8554147181574260344123", 25, RoundingMode.ROUND_HALF_UP); + t("0o537377662473314366627013423", "1659910424702725658515219", 27, RoundingMode.ROUND_HALF_UP); + t("0o3166512513354164277266524513220176106234611", "274925189339848199032955327991581849993", 43, RoundingMode.ROUND_HALF_UP); + t("0o64246753172171466452551711206021704632", "16980787914168592911515222526101914", 38, RoundingMode.ROUND_HALF_UP); + t("0o1325642", "371618", 7, RoundingMode.ROUND_HALF_UP); + t("0o172347572204054163707174", "1129426023321529454204", 24, RoundingMode.ROUND_HALF_UP); + t("0o1707337005035225145674", "17427769821173697468", 22, RoundingMode.ROUND_HALF_UP); + t("0o3167272", "847546", 7, RoundingMode.ROUND_HALF_UP); + t("0o2376477566636626564635", "23033650866571372957", 22, RoundingMode.ROUND_HALF_UP); + t("0o35417144376113077", "1038983257167423", 17, RoundingMode.ROUND_HALF_UP); + t("0o106327541747664237656046756411744551632275412233636062531656", "210781807562814008194311763577265460650228437440181166", 60, RoundingMode.ROUND_HALF_UP); + t("0o3763572416255254335772542046235033", "2520123204503077543365320456731", 34, RoundingMode.ROUND_HALF_UP); + t("0o75362616525327077427633563743155774", "38963888713731612415310433147900", 35, RoundingMode.ROUND_HALF_UP); + t("0o1401406016234566024656", "13862291742387612078", 22, RoundingMode.ROUND_HALF_UP); + t("0o242172304552", "21775354218", 12, RoundingMode.ROUND_HALF_UP); + t("0o10325355", "2206445", 8, RoundingMode.ROUND_HALF_UP); + t("0o5503607200750620360575714717560", "6972513910589491335440605040", 31, RoundingMode.ROUND_HALF_UP); + t("0o264701463721526107175255711722057442604571730762750705256542", "541396336231392418293871062570279037186171679825812834", 60, RoundingMode.ROUND_HALF_UP); + t("0o421625631535034357267563", "2525290811852796555123", 24, RoundingMode.ROUND_HALF_UP); + t("0o3766050301207656231423150647646364447", "1291785946520991837632125610879271", 37, RoundingMode.ROUND_HALF_UP); + t("0o1630720467054635751474753253627460422", "583694432446675939525765785084178", 37, RoundingMode.ROUND_HALF_UP); + t("0o303124303051000610137231406655066133635770174121", "8500626221290107216014710817942733884291153", 48, RoundingMode.ROUND_HALF_UP); + t("0o1113562110102132653505161654522056473771101354321312031", "6710609582342689120085581704302230873683253367833", 55, RoundingMode.ROUND_HALF_UP); + t("0o1464600512311275", "56401597141693", 16, RoundingMode.ROUND_HALF_UP); + t("0o35261605356", "3938913006", 11, RoundingMode.ROUND_HALF_UP); + t("0o120354645453413557275444611571627313424176417756144520333753", "240836899455748097083887093250256470467559683019356139", 60, RoundingMode.ROUND_HALF_UP); + t("0o6775333741557561774067363222030024220313353605226", "155993258459571709305776966445938258645813910", 49, RoundingMode.ROUND_HALF_UP); + t("0o1676422201112714661607652471073", "2317596989962208644778586683", 31, RoundingMode.ROUND_HALF_UP); + t("0o1453174752703234014531654704472633215271161761475347123730", "4742538088234854254854687216429269914428692374530008", 58, RoundingMode.ROUND_HALF_UP); + t("0o53154012227153364107323333356132334", "27388210321734783241567604356316", 35, RoundingMode.ROUND_HALF_UP); + t("0o35225503612770774201320011176174535217542332620333552", "334458377978261177426569028332297268603291547498", 53, RoundingMode.ROUND_HALF_UP); + t("0o414365504624046053220263710402064311", "170169261032326095162398418168009", 36, RoundingMode.ROUND_HALF_UP); + t("0o7456545364015236001000", "70016530198021276160", 22, RoundingMode.ROUND_HALF_UP); + t("0o13013306320776254", "387810637118636", 17, RoundingMode.ROUND_HALF_UP); + t("0o21", "17", 2, RoundingMode.ROUND_HALF_UP); + t("0o5347712744236105712406353", "25750698989482171567339", 25, RoundingMode.ROUND_HALF_UP); + t("0o4201033713624", "292199307156", 13, RoundingMode.ROUND_HALF_UP); + t("0o6147402214224431303026413646714237211640331341", "270142041873110958246056630570783242040033", 46, RoundingMode.ROUND_HALF_UP); + t("0o15240705643046435", "468452863921437", 17, RoundingMode.ROUND_HALF_UP); + t("0o3530013143266263651", "66147388776605609", 19, RoundingMode.ROUND_HALF_UP); + t("0o44672701365702351354627010564700332716441663244", "1605697031030267612185423502895189353522852", 47, RoundingMode.ROUND_HALF_UP); + t("0o3", "3", 1, RoundingMode.ROUND_HALF_UP); + t("0o6127516", "1617742", 7, RoundingMode.ROUND_HALF_UP); + t("0o66726644", "14396836", 8, RoundingMode.ROUND_HALF_UP); + t("0o5311555461504533675663441245372657173", "1750444240707415099769307901156987", 37, RoundingMode.ROUND_HALF_UP); + t("0o4054706260215077404512214064677061152506", "679180789158344428977587279718831430", 40, RoundingMode.ROUND_HALF_UP); + t("0o62246711201113702465222477417147602750116154310733", "1122306478377713902587095609358921499575161307", 50, RoundingMode.ROUND_HALF_UP); + t("0o4215475722134", "293885944924", 13, RoundingMode.ROUND_HALF_UP); + t("0o53746157770654301215760653406471005756045764305156", "980109855734296770512774083035337723940538990", 50, RoundingMode.ROUND_HALF_UP); + t("0o74411760251306275052060", "558193600905071580208", 23, RoundingMode.ROUND_HALF_UP); + t("0o577115015776462242165511716153070323513627023272", "16688555517189422187103917664151515791369914", 48, RoundingMode.ROUND_HALF_UP); + t("0o67", "55", 2, RoundingMode.ROUND_HALF_UP); + t("0o17465535030523", "1072356929875", 14, RoundingMode.ROUND_HALF_UP); + t("0o13317", "5839", 5, RoundingMode.ROUND_HALF_UP); + t("0o2734162636214", "201356688524", 13, RoundingMode.ROUND_HALF_UP); + t("0o514235610013374235501066012045440247061144570241", "14474060683475264437751372654279118864707745", 48, RoundingMode.ROUND_HALF_UP); + t("0o3534775621556047145137126527746324006765443367053164", "42036808204933511970427575795842368941701486196", 52, RoundingMode.ROUND_HALF_UP); + t("0o1371035220605170410066165577113314501175100", "126452315889789497901223436832123189824", 43, RoundingMode.ROUND_HALF_UP); + t("0o51450362621322470420", "749021597016944912", 20, RoundingMode.ROUND_HALF_UP); + t("0o4", "4", 1, RoundingMode.ROUND_HALF_UP); + t("0o41726045554731777722315562631262755462314641246551410413772", "101522180338987737728899908294640200607836241899165690", 59, RoundingMode.ROUND_HALF_UP); + t("0o3726520073102165257153311", "18508139224259054327497", 25, RoundingMode.ROUND_HALF_UP); + t("0o110233030106104754146604170637", "174817507453714537420747167", 30, RoundingMode.ROUND_HALF_UP); + t("0o34321447613754733467632640535662447106103006103436", "633549261053883686239613232774717922594031390", 50, RoundingMode.ROUND_HALF_UP); + t("0o33260652734712254347", "492610547748526311", 20, RoundingMode.ROUND_HALF_UP); + t("0o3652056541643012540022255", "18097097047518748877997", 25, RoundingMode.ROUND_HALF_UP); + t("0o2266675470606120531031640140307074715050044204", "102669173431008960637137393788268958468228", 46, RoundingMode.ROUND_HALF_UP); + t("0o1767255257", "266164911", 10, RoundingMode.ROUND_HALF_UP); + t("0o46121044606131213674", "687399603768989628", 20, RoundingMode.ROUND_HALF_UP); + t("0o44615", "18829", 5, RoundingMode.ROUND_HALF_UP); + t("0o1066551671032724130551075541344416006004545251", "48210079462363778492658888113295918811817", 46, RoundingMode.ROUND_HALF_UP); + t("0o661746213440700265725363254604246460427455151704051", "9677402829255135526689200426680775741960325161", 51, RoundingMode.ROUND_HALF_UP); + t("0o6175", "3197", 4, RoundingMode.ROUND_HALF_UP); + t("0o401151407274000477346136437000", "621886148896195273543007744", 30, RoundingMode.ROUND_HALF_UP); + t("0o3757440272647170475376331367246161235546703357147547454", "23196351263151106376071114036941254762538586787628", 55, RoundingMode.ROUND_HALF_UP); + t("0o1135", "605", 4, RoundingMode.ROUND_HALF_UP); + t("0o2175424561041415433353531757", "5428551387992052131083247", 28, RoundingMode.ROUND_HALF_UP); + t("0o52520357630643422", "1500865557120786", 17, RoundingMode.ROUND_HALF_UP); + t("0o453", "299", 3, RoundingMode.ROUND_HALF_UP); + t("0o20246731230644474456707331224171", "20210639089554274678470944889", 32, RoundingMode.ROUND_HALF_UP); + t("0o3000523151311", "206247350985", 13, RoundingMode.ROUND_HALF_UP); + t("0o113134637066412045754477071261275213637470", "12491631272411798853591088807340359480", 42, RoundingMode.ROUND_HALF_UP); + t("0o126052261312470627317166600322300777652073650715", "3749430734838772876224746985432540515357133", 48, RoundingMode.ROUND_HALF_UP); + t("0o44316700137250607462031357163634027001772445", "3096914367914270992782060024671299433765", 44, RoundingMode.ROUND_HALF_UP); + t("0o171215002356221063407", "2184703385532655367", 21, RoundingMode.ROUND_HALF_UP); + t("0o23721121", "5218897", 8, RoundingMode.ROUND_HALF_UP); + t("0o14734353322620206602545731", "61062963683852360010713", 26, RoundingMode.ROUND_HALF_UP); + t("0o475312075530063365616", "5717675808740207502", 21, RoundingMode.ROUND_HALF_UP); + t("0o77440275263665614314052136204775", "78687457933212079867651754493", 32, RoundingMode.ROUND_HALF_UP); + t("0o5261257577514510167240362153507501754265746731563", "119228114395905189012428590020540134015611763", 49, RoundingMode.ROUND_HALF_UP); + t("0o145203764627604366316134", "933938082134087015516", 24, RoundingMode.ROUND_HALF_UP); + t("0o300440712774126174401451236156067007573370014604", "8387356043080138295526316927827140067465604", 48, RoundingMode.ROUND_HALF_UP); + t("0o1332570322632", "98077615514", 13, RoundingMode.ROUND_HALF_UP); + t("0o3716217572065650441626246", "18430886692014464117926", 25, RoundingMode.ROUND_HALF_UP); + t("0o716521140", "121283168", 9, RoundingMode.ROUND_HALF_UP); + t("0o61226277150121532713772501031623101", "31243593013026976686003389408833", 35, RoundingMode.ROUND_HALF_UP); + t("0o727134513004332506", "16578205872928070", 18, RoundingMode.ROUND_HALF_UP); + t("0o1015752175345655", "36143524858797", 16, RoundingMode.ROUND_HALF_UP); + t("0o15366300702132404747410165", "63663188402072700457077", 26, RoundingMode.ROUND_HALF_UP); + t("0o2607400245312045520037132356700", "3422470520825634689242488256", 31, RoundingMode.ROUND_HALF_UP); + t("0o1", "1", 1, RoundingMode.ROUND_HALF_UP); + t("0o14232370256353054042511271041451307447", "3992139171064784961434159759593255", 38, RoundingMode.ROUND_HALF_UP); + t("0o2654", "1452", 4, RoundingMode.ROUND_HALF_UP); + t("0o43200420031713445212602476237542777011721017120532156", "402495698817091827248733349983795241261310588014", 53, RoundingMode.ROUND_HALF_UP); + t("0o1012373453302574", "35905333986684", 16, RoundingMode.ROUND_HALF_UP); + t("0o102052273401065267741403121062144257736511671", "5621698349102047273384509211278621447097", 45, RoundingMode.ROUND_HALF_UP); + t("0o2303355462020425243403060", "11247570692927310923312", 25, RoundingMode.ROUND_HALF_UP); + t("0o236571440705332620722731730", "749616319651624136717272", 27, RoundingMode.ROUND_HALF_UP); + t("0o1634023045115006652225404137572537300225444451056550315", "10550640276770088084077930237138652035960136192205", 55, RoundingMode.ROUND_HALF_UP); + t("0o226062710577641", "10314752130977", 15, RoundingMode.ROUND_HALF_UP); + t("0o104167430465731064510563526155446356705", "22143034232047918382504353520541125", 39, RoundingMode.ROUND_HALF_UP); + t("0o360474703465644142142614426374633517336173745433164557017", "1406659725135506145446652465678360390928078042488335", 57, RoundingMode.ROUND_HALF_UP); + t("0o1077226367", "150809847", 10, RoundingMode.ROUND_HALF_UP); + t("0o533412700560147364151506123351553042070455067164", "15136684942816823221295501833940390148075124", 48, RoundingMode.ROUND_HALF_UP); + t("0o47321211337", "5289349855", 11, RoundingMode.ROUND_HALF_UP); + t("0o33", "27", 2, RoundingMode.ROUND_HALF_UP); + t("0o3114060641760665307", "56720562441120455", 19, RoundingMode.ROUND_HALF_UP); + t("0o321544500711356560655140", "1934109172007933532768", 24, RoundingMode.ROUND_HALF_UP); + t("0o31553466646", "3450760614", 11, RoundingMode.ROUND_HALF_UP); + t("0o25427707303456416047670142267372377104250171470", "938489360691345858919636520999045373686584", 47, RoundingMode.ROUND_HALF_UP); + t("0o124405625444044364574470555231", "204335816074449425736587929", 30, RoundingMode.ROUND_HALF_UP); + t("0o7417670326016217030", "135666019698548248", 19, RoundingMode.ROUND_HALF_UP); + t("0o14624322306021144203510134", "60398430088699424182364", 26, RoundingMode.ROUND_HALF_UP); + t("0o1674442410", "250758408", 10, RoundingMode.ROUND_HALF_UP); + t("0o527635172", "90126970", 9, RoundingMode.ROUND_HALF_UP); + t("0o7141002130726144240353615134174321", "4556862540217805685823766591697", 34, RoundingMode.ROUND_HALF_UP); + t("0o7703554633327072657443651371706621271374", "1309663585734465506833205292089832188", 40, RoundingMode.ROUND_HALF_UP); + t("0o22777415000440655526", "342256872923028310", 20, RoundingMode.ROUND_HALF_UP); + t("0o3077216", "818830", 7, RoundingMode.ROUND_HALF_UP); + t("0o34243442230362323775450370", "133734900702608268611832", 26, RoundingMode.ROUND_HALF_UP); + t("0o770344133547754604246147776", "2382177288166020121939966", 27, RoundingMode.ROUND_HALF_UP); + t("0o523215407441303043220321763763461205763333647", "28862443771771851434414707295001265420199", 45, RoundingMode.ROUND_HALF_UP); + t("0o37102705430230406225007132550325075", "19731384956592254443851247364669", 35, RoundingMode.ROUND_HALF_UP); + t("0o26654765110654444621720", "210641979748604126160", 23, RoundingMode.ROUND_HALF_UP); + t("0o575257272", "99966650", 9, RoundingMode.ROUND_HALF_UP); + t("0o7207565613527210030", "130876365269176344", 19, RoundingMode.ROUND_HALF_UP); + t("0o60127615404142232301236257126373142705430101557417025270", "281610543490460264519467262765660796455848821664440", 56, RoundingMode.ROUND_HALF_UP); + t("0o11777165574076763721455", "92219848663426376493", 23, RoundingMode.ROUND_HALF_UP); + t("0o35576422324763736", "1046634462177246", 17, RoundingMode.ROUND_HALF_UP); + t("0o366255123122311123125", "4437634644479092309", 21, RoundingMode.ROUND_HALF_UP); + t("0o1231751346340466252606553475546101570554617315561125473", "7603872826618045742580005490971103946545668860731", 55, RoundingMode.ROUND_HALF_UP); + t("0o535563217273266762141100234605765502234", "113492301891561204235365568461833372", 39, RoundingMode.ROUND_HALF_UP); + t("0o1657330721157546300772313767037603015", "597965777884596169919754548479501", 37, RoundingMode.ROUND_HALF_UP); + t("0o701711416205015540454465462370167111721657451163343320", "5136876924230800291846439025619119075547100858064", 54, RoundingMode.ROUND_HALF_UP); + t("0o2", "2", 1, RoundingMode.ROUND_HALF_UP); + t("0o23044346313736", "1310562293726", 14, RoundingMode.ROUND_HALF_UP); + t("0o762722210536357403530500", "4601638793217664004416", 24, RoundingMode.ROUND_HALF_UP); + t("0o2243232540752434710611323210536463", "1469808842581774120550500842803", 34, RoundingMode.ROUND_HALF_UP); + t("0o6042532553115031666", "109306485388096438", 19, RoundingMode.ROUND_HALF_UP); + t("0o54750443750225316571406736430512671452166747632", "1958033248391176678532214751521115754712986", 47, RoundingMode.ROUND_HALF_UP); + t("0o42122277123352400676", "615387804455272894", 20, RoundingMode.ROUND_HALF_UP); + t("0o141671751106136325535453330430775232437321543", "8325279825157794222097655945192898667363", 45, RoundingMode.ROUND_HALF_UP); + t("0o7335121015337612327750625531460025777262", "1234844453153886969183275916721651378", 40, RoundingMode.ROUND_HALF_UP); + t("0o30", "24", 2, RoundingMode.ROUND_HALF_UP); + t("0o646633456716673131010714325300106141144242503123341513", "4827567010183340607788016828465978158946284585803", 54, RoundingMode.ROUND_HALF_UP); + t("0o34647345400115736740552300416234100512013623645", "1255594995624059221065714883120130755078053", 47, RoundingMode.ROUND_HALF_UP); + t("0o6460334362676710", "232026545028552", 16, RoundingMode.ROUND_HALF_UP); + t("0o106142331346752221011206", "647409104513791169158", 24, RoundingMode.ROUND_HALF_UP); + t("0o11262714046100646006", "168424020893715462", 20, RoundingMode.ROUND_HALF_UP); + t("0o310576032000120564437670443150", "485374511652821184626706024", 30, RoundingMode.ROUND_HALF_UP); + t("0o5", "5", 1, RoundingMode.ROUND_HALF_UP); + + // Floats + + t("0o726746425.7006244261075431515424461645053746213677", "123456789.87654321", 49, RoundingMode.ROUND_HALF_UP); + t("-0o0.0000000204437054635763657165267673054542", "-0.000000123456789", 33, RoundingMode.ROUND_HALF_UP); + t("0o1747.7773716662132071260101422335136152375747", "999.999", 44, RoundingMode.ROUND_HALF_UP); + t("-0o3741060405.2002576175337036445364576675624305775126", "-528769285.2506705498654986754987694357629487612132293856", 50, RoundingMode.ROUND_HALF_UP); + t("0o35076567745235671502.6773342626436061433365155137731076310010275236050103305437451411644055625324564421515511562", "524624822785241922.8738874407101262195488876445", 111, RoundingMode.ROUND_HALF_UP); + t("0o5605470434246053632363152113440650264426323520.33525466364076204553563061761202201336001507", "250925107172835956608925073908081234650960.4323", 90, RoundingMode.ROUND_HALF_UP); + t("0o2321136.6635426603020156550074200106655", "631390.850962999306313972719936135603917", 38, RoundingMode.ROUND_HALF_UP); + t("0o243.4465610031", "163.575626396226555033529183865411120656777021626883", 13, RoundingMode.ROUND_HALF_UP); + + // Include binary exponent. + + t = (string expected, BigDecimalArgument n, long sd, RoundingMode rm) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToOctal(sd, rm)); + }; + + t("0o0p+0", "0", 40, RoundingMode.ROUND_HALF_UP); + t("0o1p+53", "9007199254740992", 40, RoundingMode.ROUND_HALF_UP); + t("0o1.4p+8", "384", 40, RoundingMode.ROUND_HALF_UP); + t("0o1p+1", "2", 40, RoundingMode.ROUND_HALF_UP); + t("0o1p+8", "256", 40, RoundingMode.ROUND_HALF_UP); + t("0o1p-6", "0.015625", 40, RoundingMode.ROUND_HALF_UP); + t("0o1.556p-1", "0.857421875", 40, RoundingMode.ROUND_HALF_UP); + + t("0o1.777p-4", "0o1.777p-4", 4, RoundingMode.ROUND_DOWN); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToPrecisionTests.cs b/DecimalSharp.Tests/BigDecimalToPrecisionTests.cs new file mode 100644 index 0000000..ef745cb --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToPrecisionTests.cs @@ -0,0 +1,530 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToPrecision")] + public class BigDecimalToPrecisionTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToPrecision() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 40, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, long? sd, RoundingMode? rm) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToPrecision(sd, rm)); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("1e+27", "1.2345e+27", 1, null); + t("1.2e+27", "1.2345e+27", 2, null); + t("1.23e+27", "1.2345e+27", 3, null); + t("1.235e+27", "1.2345e+27", 4, null); + t("1.2345e+27", "1.2345e+27", 5, null); + t("1.23450e+27", "1.2345e+27", 6, null); + t("1.234500e+27", "1.2345e+27", 7, null); + + t("-1e+27", "-1.2345e+27", 1, null); + t("-1.2e+27", "-1.2345e+27", 2, null); + t("-1.23e+27", "-1.2345e+27", 3, null); + t("-1.235e+27", "-1.2345e+27", 4, null); + t("-1.2345e+27", "-1.2345e+27", 5, null); + t("-1.23450e+27", "-1.2345e+27", 6, null); + t("-1.234500e+27", "-1.2345e+27", 7, null); + + t("7", 7, 1, null); + t("7.0", 7, 2, null); + t("7.00", 7, 3, null); + + t("-7", -7, 1, null); + t("-7.0", -7, 2, null); + t("-7.00", -7, 3, null); + + t("9e+1", 91, 1, null); + t("91", 91, 2, null); + t("91.0", 91, 3, null); + t("91.00", 91, 4, null); + + t("-9e+1", -91, 1, null); + t("-91", -91, 2, null); + t("-91.0", -91, 3, null); + t("-91.00", -91, 4, null); + + t("9e+1", 91.1234, 1, null); + t("91", 91.1234, 2, null); + t("91.1", 91.1234, 3, null); + t("91.12", 91.1234, 4, null); + t("91.123", 91.1234, 5, null); + t("91.1234", 91.1234, 6, null); + t("91.12340", 91.1234, 7, null); + t("91.123400", 91.1234, 8, null); + t("-9e+1", -91.1234, 1, null); + t("-91", -91.1234, 2, null); + t("-91.1", -91.1234, 3, null); + t("-91.12", -91.1234, 4, null); + t("-91.123", -91.1234, 5, null); + t("-91.1234", -91.1234, 6, null); + t("-91.12340", -91.1234, 7, null); + t("-91.123400", -91.1234, 8, null); + + t("NaN", double.NaN, 1, null); + t("Infinity", double.PositiveInfinity, 2, null); + t("-Infinity", double.NegativeInfinity, 2, null); + + t("5.55000000000000e-7", 0.000000555, 15, null); + t("-5.55000000000000e-7", -0.000000555, 15, null); + t("-1.2e-9", -.0000000012345, 2, null); + t("-1.2e-8", -.000000012345, 2, null); + t("-1.2e-7", -.00000012345, 2, null); + t("1e+8", 123456789, 1, null); + t("123456789", 123456789, 9, null); + t("1.2345679e+8", 123456789, 8, null); + t("1.234568e+8", 123456789, 7, null); + t("-1.234568e+8", -123456789, 7, null); + + t("-0.0000012", -.0000012345, 2, null); + t("-0.000012", -.000012345, 2, null); + t("-0.00012", -.00012345, 2, null); + t("-0.0012", -.0012345, 2, null); + t("-0.012", -.012345, 2, null); + t("-0.12", -.12345, 2, null); + t("-1.2", -1.2345, 2, null); + t("-12", -12.345, 2, null); + t("-1.2e+2", -123.45, 2, null); + t("-1.2e+3", -1234.5, 2, null); + t("-1.2e+4", -12345, 2, null); + t("-1.235e+4", -12345.67, 4, null); + t("-1.234e+4", -12344.67, 4, null); + + t("1.3", 1.25, 2, null); + t("1.4", 1.35, 2, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + + t("1e+4", 9631.01, 1, RoundingMode.ROUND_HALF_UP); + t("1.0e+7", 9950095.87, 2, RoundingMode.ROUND_HALF_UP); + t("1e+1", "9.856839969", 1, RoundingMode.ROUND_HALF_UP); + t("1e+2", "97.504", 1, RoundingMode.ROUND_HALF_UP); + t("1e+5", 97802.6, 1, RoundingMode.ROUND_HALF_UP); + t("1e+1", 9.9617, 1, RoundingMode.ROUND_HALF_UP); + t("1e+3", 989.2, 1, RoundingMode.ROUND_HALF_UP); + t("1.0e+5", 99576, 2, RoundingMode.ROUND_HALF_UP); + t("1e+8", "96236483.87", 1, RoundingMode.ROUND_HALF_UP); + + t("-0.00001", "-0.00001", 1, null); + t("-0.000090000000", "-0.00009", 8, null); + t("-7e-7", "-0.0000007", 1, null); + t("68.9316834061848", "68.931683406184761912218250317", 15, null); + t("7.8601018089704732e+27", "7860101808970473167417935916.60087069", 17, null); + t("3.21445885399803244067719798337437062000000e-11", "0.0000000000321445885399803244067719798337437062", 42, null); + t("-8171786349835057630612358814.162756978", "-8171786349835057630612358814.162756977984", 37, null); + t("3340.9039701", "3340.903970019817086594869184429527413533291595472085", 11, null); + t("-7269097658095414435895.9161181115739745427300313060", "-7269097658095414435895.916118111573974542730031306", 50, null); + t("0.00000632207", "0.00000632206077863", 6, null); + t("6e+2", "573", 1, null); + t("7.4e-7", "0.000000738", 2, null); + t("-5.031561e-7", "-0.0000005031560306227217140253964236911907612837", 7, null); + t("-4.291e+11", "-429050053964", 4, null); + t("8.514e+7", "85131637", 4, null); + t("-3.4e-9", "-0.000000003326783057540398442677461", 2, null); + t("6.9404295962722512e-20", "0.00000000000000000006940429596272251146200868514973032594273", 17, null); + t("-828376248340605120247.15155295014", "-828376248340605120247.15155295013990774586360178257303370779", 32, null); + t("-7.9828e+6", "-7982750.6677764682946015520272838914918899297118139169410659", 5, null); + t("0.00712610393722542527880200", "0.007126103937225425278801997738", 24, null); + t("-5.7e+4", "-56242", 2, null); + t("-8928855203945443164.755136735230293537", "-8928855203945443164.755136735230293536124112124", 37, null); + t("5218572327.99", "5218572327.98424443372003772604597054153304", 12, null); + t("71707870535238750871516796339.60", "71707870535238750871516796339.59678962573869890935", 31, null); + t("88817462.7137982220652429", "88817462.71379822206524285939115943006583441400005007918", 24, null); + t("3.00000e-9", "0.000000003", 6, null); + t("-6.053", "-6.05291095813493573191", 4, null); + t("6.51630828677e+19", "65163082867698740076", 12, null); + t("2483202135696501.60187899", "2483202135696501.60187898870193199949004966876115645", 24, null); + t("1.0766e-10", "0.000000000107650515680635692286894826641576642261", 5, null); + t("642724503819056076.659397077514269963295025", "642724503819056076.659397077514269963295024012414", 42, null); + t("-7.1192e+21", "-7119169102619893823635.32141854354", 5, null); + t("-6.717481255640638829101946114674e-8", "-0.000000067174812556406388291019461146732616998258", 31, null); + t("-12.41976452", "-12.4197645179995365323309894", 10, null); + t("-6.529258780126449116249954644017839921024112900e-16", "-0.00000000000000065292587801264491162499546440178399210241129", 46, null); + t("-441838.0", "-441838", 7, null); + t("1.128285293592950e-8", "0.000000011282852935929493101783925259749957192", 16, null); + t("-8.654857e+7", "-86548567", 7, null); + t("3.8883293855303995e-7", "0.00000038883293855303994672627854769926811949", 17, null); + t("3.25870000e-13", "0.00000000000032587", 9, null); + t("3.702e+6", "3701031.59037494113", 4, null); + t("-3580077435.93682917449675702508371047", "-3580077435.93682917449675702508371046631533", 36, null); + t("-7.400", "-7.4", 4, null); + t("109519523263844229810.068", "109519523263844229810.067657779734413280795410968892638", 24, null); + t("-509247322311590671954830.86847660619", "-509247322311590671954830.8684766061855", 35, null); + t("7.5518638430980800496570562671727890e-10", "0.00000000075518638430980800496570562671727889997", 35, null); + t("-5056721600639122835615986051.468831942818200", "-5056721600639122835615986051.4688319428182", 43, null); + t("-1.796146861125551785886171829251460000000000e-16", "-0.000000000000000179614686112555178588617182925146", 43, null); + t("6.0e+2", "599", 2, null); + t("7.619930e-16", "0.00000000000000076199293", 7, null); + t("834668.2370121038159610193", "834668.237012103815961019258574789273273342", 25, null); + t("-3.92251395952329649490768e+26", "-392251395952329649490767912.240768552138247705202732", 24, null); + t("-47504099413385554632166.5098", "-47504099413385554632166.50972492550706", 27, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + + t("-1.4e+9", "-1336106841", 2, RoundingMode.ROUND_UP); + t("-2244450.2134814273335263", "-2244450.2134814273335262397290334104071203538487453309626146", 23, RoundingMode.ROUND_UP); + t("8.74e+29", "873625255363763952428129881990.679929486040461455296118489", 3, RoundingMode.ROUND_UP); + t("-1.85453549733179613185923288786", "-1.8545354973317961318592328878502252820666161607740183", 30, RoundingMode.ROUND_UP); + t("431.7150651927", "431.71506519265522010949747887049", 13, RoundingMode.ROUND_UP); + t("-8606297211156287.52520023752564", "-8606297211156287.5252002375256362382564355963505470716151", 30, RoundingMode.ROUND_UP); + t("-8.4634889709e+24", "-8463488970828351722405003.220603", 11, RoundingMode.ROUND_UP); + + t("-844789036.5239726", "-844789036.52397268892", 16, null); + t("-5056.20629012767878749185273209679064306054", "-5056.206290127678787491852732096790643060542", 42, null); + t("-0.3287519131314873763501859870298952500", "-0.32875191313148737635018598702989525", 37, null); + t("-60729764", "-60729764", 8, null); + t("-7.622e-14", "-0.00000000000007622481594531380999826456196664586", 4, null); + t("-4686402261639729535.736324492474", "-4686402261639729535.7363244924747488", 31, null); + t("-2.0", "-2", 2, null); + t("-13801188035233586637950193108.13592574381473451125649500", "-13801188035233586637950193108.135925743814734511256495", 55, null); + t("0.0000807327587149839799300000", "0.00008073275871498397993", 24, null); + t("-6.000000e-8", "-0.00000006", 7, null); + t("-3.83574993e+11", "-383574993535", 9, null); + t("7.6987000000000000e-14", "0.000000000000076987", 17, null); + t("80928866804.6112050947427973", "80928866804.6112050947427973864826014844575374353", 27, null); + t("-0.00730140", "-0.0073014067221009206110062377503733", 6, null); + t("2.72104773884160491036088486e+30", "2721047738841604910360884862459.4086993273252009015", 27, null); + t("3.008780781917733594e+25", "30087807819177335941398228.1424107931203", 19, null); + t("-1.31528920779613669158250146972297797867760000000000000000000e-19", "-0.00000000000000000013152892077961366915825014697229779786776", 60, null); + t("-8.5e+11", "-858982311008.257025719798657844609315293821", 2, null); + t("-3.6312e-12", "-0.0000000000036312827608449878", 5, null); + t("-0.0060000", "-0.006", 5, null); + t("-4.65727e+23", "-465727983501322687372765", 6, null); + t("-0.00000332331666628036603", "-0.000003323316666280366035430077076052", 18, null); + t("3.533702e-8", "0.00000003533702791135712510338001418872124", 7, null); + t("-0.04340", "-0.0434", 4, null); + t("-597340.278566069086858587852236235470", "-597340.2785660690868585878522362354706741", 36, null); + t("6.000e-8", "0.00000006", 4, null); + t("-3.624323359112776296e-19", "-0.00000000000000000036243233591127762966338166", 19, null); + t("-3731378568692042924197.154", "-3731378568692042924197.15400334142251496795634388", 25, null); + t("-68249040894032065692.62", "-68249040894032065692.62771690318493", 22, null); + t("8786096722661914.89732851", "8786096722661914.89732851188880184891692993684242690315", 24, null); + t("-1.8413321536281347264486372900000000000e-12", "-0.00000000000184133215362813472644863729", 38, null); + t("4.0e-9", "0.0000000040395827543504045", 2, null); + t("-2.9427e+16", "-29427119846374896", 5, null); + t("-917760614.4", "-917760614.45404359204911454", 10, null); + t("8e+4", "89427", 1, null); + t("0.00000920323988134356953828667260", "0.0000092032398813435695382866726", 27, null); + t("8.2e+16", "82068995955708118", 2, null); + t("3.35195944828e+26", "335195944828445911672446409.3379497158141", 12, null); + t("-3.89774891030e-9", "-0.00000000389774891030223957363124620581272897758735065471", 12, null); + t("-4", "-4", 1, null); + t("8", "8", 1, null); + t("1.41172955693912934219137966000000e-10", "0.000000000141172955693912934219137966", 33, null); + t("9.21481e+13", "92148111958857", 6, null); + t("-5.859975978432853e-18", "-0.0000000000000000058599759784328539", 16, null); + t("-72.0", "-72", 3, null); + t("3785098751297.8929911950994079707157472", "3785098751297.89299119509940797071574729867819252140059", 38, null); + t("4.38e+16", "43893416753778361.297703358127215475077814", 3, null); + t("-33110.29096", "-33110.2909623520267070846514", 10, null); + t("-74.38305251784882707720486436292121914036495", "-74.3830525178488270772048643629212191403649548392158614", 43, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_CEIL; + + t("5.80e+18", "5805164734299168659.6173113885173384955443", 3, RoundingMode.ROUND_DOWN); + t("-1.719875889271327", "-1.719875889271327133154458155573493605566221534", 16, RoundingMode.ROUND_DOWN); + t("113.672129563", "113.672129563441659725876055771857758675550104070419635029", 12, RoundingMode.ROUND_DOWN); + t("-77950052814622081084397.9", "-77950052814622081084397.91853869253589242574", 24, RoundingMode.ROUND_DOWN); + t("4.53106985e+27", "4531069852787151785292512309.2901993579425172826443679877", 9, RoundingMode.ROUND_DOWN); + t("45285.246089613169416440797840714", "45285.2460896131694164407978407142422013937", 32, RoundingMode.ROUND_DOWN); + t("307760226411464.7333268079863299", "307760226411464.73332680798632996332324381779707", 31, RoundingMode.ROUND_DOWN); + + t("-0.0300", "-0.0300921721159558", 3, null); + t("65317841202.20949859371772273480125", "65317841202.2094985937177227348012464402154", 34, null); + t("-8.9231575495202e+29", "-892315754952021994731329589682.1894180393920044085713", 14, null); + t("-2.8075679202e-8", "-0.0000000280756792028583066", 11, null); + t("9.71456e+9", "9714558552", 6, null); + t("2.9514099281e-10", "0.00000000029514099281", 11, null); + t("-1.24459e+14", "-124459985101107", 6, null); + t("0.0000734657394154607815562372000000", "0.0000734657394154607815562372", 30, null); + t("1.78719530353972e+15", "1787195303539715", 15, null); + t("-2.8e+9", "-2861102528", 2, null); + t("-8.74480375581000e-9", "-0.00000000874480375581", 15, null); + t("-1792404726015427380.248150830448457643618022", "-1792404726015427380.248150830448457643618022", 43, null); + t("-678437320202616518.2220157912209286", "-678437320202616518.22201579122092864", 34, null); + t("-1.937304915215780220809799809655893674619672771e-8", "-0.000000019373049152157802208097998096558936746196727718", 46, null); + t("824172.15863347130174103087", "824172.15863347130174103086069960571", 26, null); + t("1.90040714061724000e-9", "0.00000000190040714061724", 18, null); + t("-1634488249956745498.58311", "-1634488249956745498.58311123049258868631623840423306", 24, null); + t("0.0000019600923098540334001755857361187871270117098000", "0.0000019600923098540334001755857361187871270117098", 47, null); + t("8.383e+4", "83829", 4, null); + t("2.843306120337864064e+23", "284330612033786406376718", 19, null); + t("1.86235e+15", "1862340943682995.08270612464203237562317928642459", 6, null); + t("-2.31e+13", "-23195312138083", 3, null); + t("5.450237e+21", "5450236028274773541895.65198933808968167192289601277", 7, null); + t("-0.008976419749408075453861117865459", "-0.00897641974940807545386111786545972434475187220274239581167", 31, null); + t("-761181660548661030.25", "-761181660548661030.25539542029", 20, null); + t("-1844205.93619958", "-1844205.936199580689273072905714475263817", 15, null); + t("4842.77906784902805070438222238898372327093", "4842.77906784902805070438222238898372327092242428134814721", 42, null); + t("-4.161198953445629503503971e+26", "-416119895344562950350397179", 25, null); + t("1.084e+4", "10836", 4, null); + t("8.71081704218174598654542083000e-8", "0.0000000871081704218174598654542083", 30, null); + t("7.9139683e+36", "7913968291641940848703040206324645237.8515176490912667096", 8, null); + t("-0.000008", "-0.000008", 1, null); + t("8.3660085625e+34", "83660085624983922907621996804192921.3992927", 11, null); + t("0.000006980263008", "0.000006980263007423150706324065130475391", 10, null); + t("-31348084528321454060964445534333629317.69561497283830023", "-31348084528321454060964445534333629317.69561497283830023", 55, null); + t("-2417953792643886.3485495754363678888681996409674308643", "-2417953792643886.3485495754363678888681996409674308643", 53, null); + t("4.0e+6", "3982592", 2, null); + t("-2092315.015029722200", "-2092315.0150297222", 19, null); + t("-364992136844916.9092238", "-364992136844916.909223894931280218350055327754935", 22, null); + t("8.34e+24", "8333642861002789136219873", 3, null); + t("7.6008837179413e+14", "760088371794122.3380234188299740029832128019574765416", 14, null); + t("-6655726127.0", "-6655726127", 11, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + + t("-1.7218673528e+29", "-172186735288586033321621121024.11240623", 11, RoundingMode.ROUND_CEIL); + t("-3.31e+28", "-33197729862068219255677464974", 3, RoundingMode.ROUND_CEIL); + t("-4.835191326e+29", "-483519132605694848658321267839.23575134378118945659616358", 10, RoundingMode.ROUND_CEIL); + t("7.3", "7.24882150443803", 2, RoundingMode.ROUND_CEIL); + t("-89186640077683569.407061427673", "-89186640077683569.4070614276736450982125609", 29, RoundingMode.ROUND_CEIL); + t("-49379651041268.5", "-49379651041268.548293", 15, RoundingMode.ROUND_CEIL); + t("-7685054.17489171951660", "-7685054.17489171951660508194254495141726065698575306365447451", 21, RoundingMode.ROUND_CEIL); + + t("-39449414270333.925852213835", "-39449414270333.925852213834759031494508489474", 26, null); + t("-7.50437989976", "-7.50437989975503711836768", 12, null); + t("-0.000004303975760000000", "-0.00000430397576", 16, null); + t("-16040233916257241895.97650633973989", "-16040233916257241895.9765063397398857", 34, null); + t("-7438.9287248601393819", "-7438.9287248601393818639176907606", 20, null); + t("9.857465584298e-7", "0.000000985746558429876825600458537705318327799", 13, null); + t("532637.9095983547284850466577958315920", "532637.90959835472848504665779583159203905641996", 37, null); + t("-1.40416695292e+30", "-1404166952915258058306475434520.7856110230505157", 12, null); + t("60346876.6670832429026869255506808488", "60346876.6670832429026869255506808488", 36, null); + t("-2.52466133e+23", "-252466132238128405832984", 9, null); + t("55", "55", 2, null); + t("-63075151.962465776516325792253177939493172", "-63075151.9624657765163257922531779394931714", 41, null); + t("7.411461e+17", "741146113404361548.543142388", 7, null); + t("-58835755359067474972692072494278983.7", "-58835755359067474972692072494278983.6314961114191480012916", 36, null); + t("-333", "-333", 3, null); + t("7.24707e+13", "72470760481059", 6, null); + t("39232618.1513515442233995765535454389", "39232618.151351544223399576553545438981252", 36, null); + t("-4e+5", "-357994", 1, null); + t("-1.90e+4", "-18904.11335233460016293296574557643545512393801643609213933", 3, null); + t("-6585152111956929.924309477123328984876184272828762900", "-6585152111956929.9243094771233289848761842728287629", 52, null); + t("4.505e-7", "0.0000004505328", 4, null); + t("-2.4125965461846e+19", "-24125965461845662271", 14, null); + t("4.82673137e+33", "4826731373891127996812671510065700.871947701", 9, null); + t("-6621278.2", "-6621278.1120573461544975284970826524341806671316100080257485", 8, null); + t("-1.8015392869565386634525164264799463344376205007391000000e-7", "-0.00000018015392869565386634525164264799463344376205007391", 56, null); + t("-0.00026465463574439280006655492609887593", "-0.00026465463574439280006655492609887592672292239588307259", 35, null); + t("4.87815228988300090", "4.8781522898830009076096556452567", 18, null); + t("-5.1107117199524082779077801201617e+35", "-511071171995240827790778012016163902", 32, null); + t("1.4734242515706890557e+20", "147342425157068905574.390834406", 20, null); + t("-4019325091848890817268596991.815200", "-4019325091848890817268596991.8152", 34, null); + t("3.8e+14", "384715413967421", 2, null); + t("7483444.49", "7483444.498791364040133403947480439118040376737700653", 9, null); + t("-594538312.6255", "-594538312.625485172379", 13, null); + t("0.00753000", "0.00753", 6, null); + t("8.1440148247e+13", "81440148247675.27449603492606125135884", 11, null); + t("8.444003009300e+21", "8444003009300239495556", 13, null); + t("2308.1529840912558574923966042774800185916972327325289", "2308.1529840912558574923966042774800185916972327325289261", 53, null); + t("2.67e+3", "2674.698673623", 3, null); + t("-2.82819136180287470854625537e+30", "-2828191361802874708546255368471.80800005766", 27, null); + t("518250411", "518250411", 9, null); + t("3.2e+4", "32661.9135347256259375001777960775509", 2, null); + t("29.15347602216416991973", "29.153476022164169919735054013077734177", 22, null); + t("-4.611285536613066108e+30", "-4611285536613066107912600830385", 19, null); + t("-51774110.0705144989023975360207167071143094356321", "-51774110.070514498902397536020716707114309435632036586", 48, null); + t("-11969053.91", "-11969053.9052", 10, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + + t("687378946204028.408158998985701", "687378946204028.408158998985701430935094", 30, RoundingMode.ROUND_FLOOR); + t("42.452", "42.4523909443358871476552683504968536100051", 5, RoundingMode.ROUND_FLOOR); + t("-22771061110217019663705702.44170142085172", "-22771061110217019663705702.44170142085171219649140996", 40, RoundingMode.ROUND_FLOOR); + t("-1470.640309974016167512235698629586", "-1470.6403099740161675122356986295857257144815364", 34, RoundingMode.ROUND_FLOOR); + t("-1.110228e+27", "-1110227398804733429555663947.06619", 7, RoundingMode.ROUND_FLOOR); + t("-6.4898237111e+26", "-648982371105405071851661301", 11, RoundingMode.ROUND_FLOOR); + t("-4641197449469148.658850361201903", "-4641197449469148.658850361201902222", 31, RoundingMode.ROUND_FLOOR); + + t("7.905300379788e+16", "79053003797878062.6454954", 13, null); + t("-6.83490000000e-13", "-0.00000000000068349", 12, null); + t("-62760641815.69084973661201201", "-62760641815.690849736612012010742308663", 28, null); + t("0.000704", "0.000704496313", 3, null); + t("82926865286287.8852357368342860830310721063079299643", "82926865286287.88523573683428608303107210630792996432", 51, null); + t("-0.00032388272393900301214220090249", "-0.00032388272393900301214220090248744799603424908", 29, null); + t("8.6e+12", "8621641486938.4837308885005093571508566552428700982454", 2, null); + t("2", "2", 1, null); + t("1.4641440117052559075e+20", "146414401170525590746.047955203899370771105088", 20, null); + t("3511.925583", "3511.925583", 10, null); + t("2861824.253079699095728", "2861824.253079699095727765750377038689", 22, null); + t("-3.940097756e+10", "-39400977564.548924098664431671700066962", 10, null); + t("-888", "-888", 3, null); + t("-0.000302106125213724988141721256104", "-0.00030210612521372498814172125610432438685", 30, null); + t("6943.4804552555315615809650428503", "6943.480455255531561580965042850266831249032130818358478956", 32, null); + t("3365678", "3365678.3397481381125085749", 7, null); + t("-5.3943374314e+19", "-53943374313769567458.386865325", 11, null); + t("-6.67880509225510150542252852147049489938254298497979", "-6.6788050922551015054225285214704948993825429849797925563674", 51, null); + t("1.36424e+18", "1364240644139816224.60228356028", 6, null); + t("1.410236477950416725e+23", "141023647795041672538410.84935693266374259666015274447", 19, null); + t("-802.817765", "-802.81776500697712984253334522", 9, null); + t("-5.276210722424690668896260075355037218851", "-5.27621072242469066889626007535503721885096", 40, null); + t("-0.000874209568970788", "-0.0008742095689707877849902027926289294748756775668387", 15, null); + t("0.092053833162002", "0.09205383316200189249855864903410820435666385119723209239", 14, null); + t("7.0656298318128209e-14", "0.0000000000000706562983181282092835675843980510112", 17, null); + t("-8.66511516852116659e+18", "-8665115168521166587", 18, null); + t("3.3490648464e+22", "33490648463534229842937.79268276945692333064632966129475", 11, null); + t("-39041587174692569176.82740706154183894", "-39041587174692569176.827407061541838942655371389185", 37, null); + t("-3834.0", "-3834", 5, null); + t("-0.008912382644814418776268630", "-0.00891238264481441877626863", 25, null); + t("-2.1e+5", "-206119", 2, null); + t("4.83340000000e-8", "0.000000048334", 12, null); + t("3.185196533675230520000000000000e-19", "0.000000000000000000318519653367523052", 31, null); + t("6.0431217298488095562718496137220939447806000000000000000e-17", "0.000000000000000060431217298488095562718496137220939447806", 56, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_DOWN; + + t("-8e+26", "-786589693451258754942279859.3834", 1, RoundingMode.ROUND_HALF_UP); + t("-26.0", "-26", 3, RoundingMode.ROUND_HALF_UP); + t("-8.462226728e+11", "-846222672789.2087639320702375427266333530942524245", 10, RoundingMode.ROUND_HALF_UP); + t("-4e-7", "-0.0000004019666978288041783154210868", 1, RoundingMode.ROUND_HALF_UP); + t("-315609.775843992", "-315609.775843992", 15, RoundingMode.ROUND_HALF_UP); + t("-3.319e+9", "-3318880945", 4, RoundingMode.ROUND_HALF_UP); + t("-6", "-6.2847", 1, RoundingMode.ROUND_HALF_UP); + + t("-1408003897645960.648499616456", "-1408003897645960.648499616456", 28, null); + t("-1.0", "-1", 2, null); + t("-8.28e+14", "-827860423543649", 3, null); + t("0.00054398953021585321711560388890", "0.00054398953021585321711560388889590290139888", 29, null); + t("-4.409e-9", "-0.000000004408792", 4, null); + t("4.0000e-10", "0.0000000004", 5, null); + t("3.40e+16", "34001779327925905", 3, null); + t("-9.03e+34", "-90332622851356543193546536340366547", 3, null); + t("-4.5320e+16", "-45320100856429143.39155209710530673318222777", 5, null); + t("3.618e+30", "3618328715720583671291544414202", 4, null); + t("-1003.61140", "-1003.61139687804673322250551", 9, null); + t("-8139415035028632370.38737", "-8139415035028632370.38736602659835", 24, null); + t("8e+7", "83198058", 1, null); + t("-7.99492e+14", "-799491603856548", 6, null); + t("444", "444", 3, null); + t("0.00000613258266938", "0.0000061325826693823067791292255878336353793864046451956723", 12, null); + t("-554696279951718746537611.26040", "-554696279951718746537611.26040029508470430208572833137315", 29, null); + t("446", "446.189185820662709163412845035853873", 3, null); + t("22873128187827109553471831451.06623850867", "22873128187827109553471831451.06623850866672688842662473", 40, null); + t("9e+5", "880389", 1, null); + t("-6.7516118890844e+16", "-67516118890844443.625641", 14, null); + t("-0.36107158435820", "-0.36107158435820101656696353075596201902674001080619510849", 14, null); + t("8.958386374640407365", "8.958386374640407364828679985365339921820421370157246", 19, null); + t("3e+2", "257", 1, null); + t("-1.904659739878e+18", "-1904659739878060478.113131137688927604413210083841", 13, null); + t("-0.0000627142", "-0.00006271421732891589577305487292334", 6, null); + t("3.310541e+8", "331054103", 7, null); + t("-1.793886e+23", "-179388600781592577147651.2641684828762234473", 7, null); + t("0.0004600", "0.00046", 4, null); + t("-2.9e+21", "-2906505321975413509885", 2, null); + t("86415.94739506", "86415.9473950557683374", 13, null); + t("6.730414", "6.7304135909152", 7, null); + t("-5.032367e+14", "-503236749968584", 7, null); + t("-5.0241682013868216287718e+32", "-502416820138682162877178622610283", 23, null); + t("-0.0552606118984074172116684879479087", "-0.0552606118984074172116684879479087", 33, null); + t("91017414629852252476380368766.471", "91017414629852252476380368766.47117955844005", 32, null); + t("28586.32124747000", "28586.32124747000107561236523943", 16, null); + t("0.000001935665545322534195131", "0.0000019356655453225341951305040536808235510260170838860718", 22, null); + t("7.8", "7.803563246406851025", 2, null); + t("-4.89914223627882382434323e+26", "-489914223627882382434323457.50920109688497974624541155867073", 24, null); + t("384718796891211107", "384718796891211107", 18, null); + t("42510.74002309897971230194", "42510.7400230989797123019438399853496258", 25, null); + t("-7.388e+11", "-738804895894", 4, null); + t("-5.0000000e-7", "-0.0000005", 8, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_EVEN; + + t("42334337596496149636254", "42334337596496149636254.4926162509306406461", 23, RoundingMode.ROUND_HALF_DOWN); + t("-7e+9", "-7246374971.34279698356", 1, RoundingMode.ROUND_HALF_DOWN); + t("71516263932998764871838469072", "71516263932998764871838469072.280115355524", 29, RoundingMode.ROUND_HALF_DOWN); + t("71257489.5995227415169007618702182092", "71257489.59952274151690076187021820922744", 36, RoundingMode.ROUND_HALF_DOWN); + t("268492835", "268492834.77041", 9, RoundingMode.ROUND_HALF_DOWN); + t("50325.551277778107847798802", "50325.551277778107847798801525", 26, RoundingMode.ROUND_HALF_DOWN); + t("-5.289303987e+29", "-528930398665449048343281311623.69686", 10, RoundingMode.ROUND_HALF_DOWN); + + t("0.08000", "0.08", 4, null); + t("-4.5132e+21", "-4513243388120382069815.8508153058993058875", 5, null); + t("-73549", "-73549.2594630551663822238", 5, null); + t("1.275868004728922895890883e+29", "127586800472892289589088296800.6", 25, null); + t("-0.0003715444034899460421534099962225699000", "-0.0003715444034899460421534099962225699", 37, null); + t("-6.9625565265e+24", "-6962556526511822306135536", 11, null); + t("1.67583703641e+13", "16758370364138.915293525076269061228714877", 12, null); + t("-173594.95064085553515176707313947534918109631092170", "-173594.950640855535151767073139475349181096310921699", 50, null); + t("-6.9503965525e+19", "-69503965525000308384.151383", 11, null); + t("4.411225e+20", "441122486054080817112", 7, null); + t("2.467044064783596937642371770e+31", "24670440647835969376423717700462.39", 28, null); + t("3.9711897549481645654e+24", "3971189754948164565361634.8039734590476326224193520402091769", 20, null); + t("-1.4757613208690e+21", "-1475761320868963235919.64499841336073105746686372924161", 14, null); + t("91683083887068.6191146", "91683083887068.61911461351134520171343337804061135", 21, null); + t("-7923074181102822.578", "-7923074181102822.5778", 19, null); + t("-6.800e-8", "-0.000000068", 4, null); + t("-2.57954671081460000000e-10", "-0.00000000025795467108146", 21, null); + t("5.5352911972e-9", "0.000000005535291197169667611325365189624523452", 11, null); + t("6.0488358e+8", "604883577", 8, null); + t("-7.575535014e-9", "-0.00000000757553501363609536678641245355", 10, null); + t("7.547067960578900230644488e-10", "0.00000000075470679605789002306444877998602723", 25, null); + t("-3.64561456763e+12", "-3645614567625.4", 12, null); + t("9.0e-7", "0.0000009", 2, null); + t("7e+2", "687", 1, null); + t("517277827334839.8174848543680868", "517277827334839.8174848543680868015165926618", 31, null); + t("7e+2", "655.46270361324473194", 1, null); + t("1632131488313153.49737424823493573157", "1632131488313153.497374248234935731568", 36, null); + t("274068317992.5998880719845028748169734442", "274068317992.5998880719845028748169734442394151076", 40, null); + t("-7.060e-9", "-0.00000000706025531009734073", 4, null); + t("0.004444", "0.0044439457493", 4, null); + t("72482770689153111154104782082.023", "72482770689153111154104782082.022764082943227214833851", 32, null); + t("5.9130694036072794206e+24", "5913069403607279420613864.152", 20, null); + t("843384561300245347961437.966", "843384561300245347961437.96592523791", 27, null); + t("0.0000035198821282510000000", "0.000003519882128251", 20, null); + t("-1.00371560130267706870097e-9", "-0.00000000100371560130267706870096885251", 24, null); + t("17504218.4970302", "17504218.49703016415913667026121376499", 15, null); + t("-5e-9", "-0.000000005169058703", 1, null); + t("6.922803246e+10", "69228032455", 10, null); + t("-16", "-16", 2, null); + t("-1.355147513468192707127939151e+40", "-13551475134681927071279391508441439066206.58705380600075", 28, null); + t("81670324.1197758695", "81670324.1197758695212865075629796973196504241126", 18, null); + t("0.00005", "0.00004797485174640366805332660647", 1, null); + t("-4.864397594e-10", "-0.0000000004864397594461335282648538530108953965681345", 10, null); + t("47694105.2312532", "47694105.23125322528167211284521303", 15, null); + t("-4.962106181e+26", "-496210618135432953927871636.779236", 10, null); + t("1.2800030559497062236642e+37", "12800030559497062236641930592334626609.7332", 23, null); + t("-574830783.7", "-574830783.6689168903917696583746514637433390929", 10, null); + t("5969.431086199057470", "5969.43108619905746956015212970904111744101", 19, null); + t("-4.8e+3", "-4814.32904953003285", 2, null); + t("4.297e+16", "42973001760252134", 4, null); + t("-5.7628e+6", "-5762846.590152347665179652381407653797146356303622218259885", 5, null); + t("904864662232032.160612401810317927291657403142932", "904864662232032.16061240181031792729165740314293194205879163", 48, null); + t("7.9892e+20", "798923115068265241915.537619430376605", 5, null); + t("-8.97759349384000643", "-8.97759349384000643427096282979", 18, null); + + t("123.45", "12.345e1", null, null); + + tx(() => { bigDecimalFactory.BigDecimal(1.23).ToPrecision(-23); }, ".toPrecision(-23)"); + tx(() => { bigDecimalFactory.BigDecimal(1.23).ToPrecision((long)1e9 + 1); }, ".toPrecision(1e9 + 1)"); + tx(() => { bigDecimalFactory.BigDecimal(1.23).ToPrecision(0); }, ".toPrecision(0)"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToSDTests.cs b/DecimalSharp.Tests/BigDecimalToSDTests.cs new file mode 100644 index 0000000..29aaa95 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToSDTests.cs @@ -0,0 +1,545 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToSD")] + public class BigDecimalToSDTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToSD() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_CEIL, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n, long? sd, RoundingMode? rm) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToSD(sd, rm).ValueOf()); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("0", 0, null, null); + t("0.5", 0.5, null, null); + t("1", 1, null, null); + t("-1", -1, null, null); + t("Infinity", double.PositiveInfinity, null, null); + t("-Infinity", double.NegativeInfinity, null, null); + t("NaN", double.NaN, null, null); + + t("0", "0", 1, null); + t("-0", "-0", 1, null); + t("-0", "-0", 1, RoundingMode.ROUND_UP); + t("-0", "-0", 1, RoundingMode.ROUND_FLOOR); + t("-0", "-0", 1, RoundingMode.ROUND_HALF_EVEN); + t("0", "0", 10, null); + t("-0", "-0", 20, null); + + t("12.345", "12.345", null, null); + t("123456789.12345678912", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Precision = 5; + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + t("123460000", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + t("123450000", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_CEIL; + t("123460000", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + t("123450000", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + t("123460000", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_DOWN; + t("123450000", "123455000", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_EVEN; + t("123460000", "123455000", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_CEIL; + t("123460000", "123455000", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_FLOOR; + t("123450000", "123455000", null, null); + + t("4937809340236234102130.947044664011", "4937809340236234102130.947044664011", 35, RoundingMode.ROUND_UP); + t("337528093391.5", "337528093391.493107", 13, RoundingMode.ROUND_HALF_EVEN); + t("7725982105101004219161075340794084739.771523585576612", "7725982105101004219161075340794084739.77152358557661226998117872661100", 52, RoundingMode.ROUND_FLOOR); + t("52215017456426378512883312970.4861221", "52215017456426378512883312970.4861221", 36, RoundingMode.ROUND_CEIL); + t("4985349771216.54991391", "4985349771216.54991391072733", 21, RoundingMode.ROUND_HALF_UP); + t("1101895947.92763", "1101895947.92762954984827601473036438720818296", 15, RoundingMode.ROUND_HALF_UP); + t("20026847", "20026846.9372", 8, RoundingMode.ROUND_HALF_EVEN); + t("8204561821674316833270", "8204561821674316833266.047893028353", 21, RoundingMode.ROUND_CEIL); + t("7419720696218", "7419720696218.21961188299387526", 13, RoundingMode.ROUND_DOWN); + t("635000000", "634438520.50126453", 3, RoundingMode.ROUND_UP); + t("28392130715407969", "28392130715407968.96", 18, RoundingMode.ROUND_HALF_DOWN); + t("36765276128959576253780217524271972128", "36765276128959576253780217524271972127.99", 38, RoundingMode.ROUND_CEIL); + t("88429990502356839.49260500060049004694585659", "88429990502356839.49260500060049004694585658780656", 43, RoundingMode.ROUND_HALF_UP); + t("2768479", "2768479.2081810557738981722324989595", 7, RoundingMode.ROUND_DOWN); + t("85601900000000000000000000", "85601959550632180897338814.9", 6, RoundingMode.ROUND_FLOOR); + t("3911951424308151086107907934806060", "3911951424308151086107907934806062.45495666964", 33, RoundingMode.ROUND_HALF_DOWN); + t("892162270787217755968010370478903185093", "892162270787217755968010370478903185093.0", 42, RoundingMode.ROUND_HALF_EVEN); + t("8018330257774248398702693271920270", "8018330257774248398702693271920270.09311146148062547723636185680287073", 33, RoundingMode.ROUND_DOWN); + t("88092477731945.1182807043", "88092477731945.118280704259340858", 24, RoundingMode.ROUND_HALF_UP); + t("9252541030951.9012531009707842372724161089075754576", "9252541030951.90125310097078423727241610890757545760", 53, RoundingMode.ROUND_FLOOR); + t("90993285126.547129568419776", "90993285126.5471295684197756642787492493375", 26, RoundingMode.ROUND_HALF_EVEN); + t("315137924718839945152625512241078.591350724696151650603", "315137924718839945152625512241078.59135072469615165060341097372", 54, RoundingMode.ROUND_DOWN); + t("822866202506325637.7", "822866202506325637.740891965300", 19, RoundingMode.ROUND_FLOOR); + t("78407276142689114300000000", "78407276142689114391801017.43776", 18, RoundingMode.ROUND_DOWN); + t("13199803085352251536787921", "13199803085352251536787920.6016623911545535514918245", 26, RoundingMode.ROUND_CEIL); + t("708.66442", "708.66442", 11, RoundingMode.ROUND_UP); + t("96426394035800000000000000000", "96426394035875521556520436906.967758064780068220269263413347", 12, RoundingMode.ROUND_DOWN); + t("297.1386227802795046531729004026", "297.1386227802795046531729004026975", 31, RoundingMode.ROUND_FLOOR); + t("98291.739", "98291.739", 9, RoundingMode.ROUND_CEIL); + t("93", "93.078130", 2, RoundingMode.ROUND_HALF_DOWN); + t("0.001", "0.00099999999999", 3, RoundingMode.ROUND_UP); + t("0.000999", "0.00099999999999", 3, RoundingMode.ROUND_DOWN); + t("56300000000", "56281970459.86927925182", 3, RoundingMode.ROUND_HALF_EVEN); + t("565000000000", "565914070913.993334452356", 3, RoundingMode.ROUND_DOWN); + t("3979389667144941000000000", "3979389667144941900427982.77071", 16, RoundingMode.ROUND_FLOOR); + t("52352220229587840556187937111046743.4583563", "52352220229587840556187937111046743.458356312735390953445935426160537204", 42, RoundingMode.ROUND_HALF_UP); + t("36271.3981207141751333261", "36271.39812071417513332613", 24, RoundingMode.ROUND_DOWN); + t("4739543704210300000000000000", "4739543704210297904547136327.7628335972128075226361512", 15, RoundingMode.ROUND_HALF_EVEN); + t("37661669615568080247052723032589226.8", "37661669615568080247052723032589226.77024153", 36, RoundingMode.ROUND_HALF_DOWN); + t("9645371928851642074344527881477634000", "9645371928851642074344527881477634345.4914341", 34, RoundingMode.ROUND_HALF_UP); + t("698149777646326000000000000", "698149777646325814282220973.088797026232", 15, RoundingMode.ROUND_CEIL); + t("18498919087448435591833490000000", "18498919087448435591833489904295.729717528", 26, RoundingMode.ROUND_HALF_DOWN); + t("325969900850571568339999253781743124500", "325969900850571568339999253781743124504.0", 38, RoundingMode.ROUND_HALF_DOWN); + t("40693000000", "40693051631.1251783538001747467807789871", 5, RoundingMode.ROUND_HALF_UP); + t("810710395413475993", "810710395413475993.394678", 18, RoundingMode.ROUND_FLOOR); + t("86568781977428682.3822270220321", "86568781977428682.38222702203211", 30, RoundingMode.ROUND_HALF_DOWN); + t("427897046936740724.911837668090826906087", "427897046936740724.911837668090826906087", 41, RoundingMode.ROUND_FLOOR); + t("8248561437515605126456247769501697.764", "8248561437515605126456247769501697.764296656999", 37, RoundingMode.ROUND_HALF_UP); + t("5727898467119496952445688320883475.404402704196931184674675825", "5727898467119496952445688320883475.404402704196931184674675825", 64, RoundingMode.ROUND_HALF_UP); + t("8752958499919994791000000000000000", "8752958499919994791191031106105979.47729", 19, RoundingMode.ROUND_HALF_DOWN); + t("362154165751.582202112646276", "362154165751.58220211264627597398064", 28, RoundingMode.ROUND_HALF_DOWN); + t("11000000000000000000000000000000", "11914671819298396166152780469749.700178398572262303378530442966993", 2, RoundingMode.ROUND_DOWN); + t("84694.019523885", "84694.019523885", 16, RoundingMode.ROUND_DOWN); + t("46198004778598591438177002960.8079419769", "46198004778598591438177002960.807941976894036", 39, RoundingMode.ROUND_CEIL); + t("944540023268478392955679.235197603187056475911", "944540023268478392955679.235197603187056475911190458898708904", 45, RoundingMode.ROUND_HALF_DOWN); + t("6384.0533", "6384.0532734075270642890", 8, RoundingMode.ROUND_UP); + t("86.52585963444630269524402336034067", "86.5258596344463026952440233603406633365294", 34, RoundingMode.ROUND_UP); + t("211698906765339555009000000000000", "211698906765339555008927202275920.017666588018743809326", 21, RoundingMode.ROUND_HALF_EVEN); + t("93695.521776", "93695.521776317122397800801736652801", 11, RoundingMode.ROUND_FLOOR); + t("21", "20.73571174", 2, RoundingMode.ROUND_UP); + t("44651390355733081311803973.631", "44651390355733081311803973.6306343", 29, RoundingMode.ROUND_CEIL); + t("19628275338135891273639233000", "19628275338135891273639233078.3194337412", 26, RoundingMode.ROUND_DOWN); + t("715174732399634482855366624736839961.178974112796", "715174732399634482855366624736839961.1789741127950654699759400963516", 48, RoundingMode.ROUND_UP); + t("4010185.194165679", "4010185.1941656790873904791", 16, RoundingMode.ROUND_DOWN); + t("199763544.3", "199763544.2746", 10, RoundingMode.ROUND_HALF_DOWN); + t("792604593150000000000000000", "792604593148129965009152274.7", 11, RoundingMode.ROUND_HALF_DOWN); + t("95649091688620000000000", "95649091688615551968376.399825", 13, RoundingMode.ROUND_HALF_EVEN); + t("910000000000000000000000", "913366499416274482076806.54925361292970753237933", 2, RoundingMode.ROUND_HALF_UP); + t("5713.74819", "5713.7481900", 13, RoundingMode.ROUND_HALF_EVEN); + t("167100", "167006.16906099738293329453555919087", 4, RoundingMode.ROUND_CEIL); + t("91.8149489203336825896217615649", "91.814948920333682589621761564879978", 30, RoundingMode.ROUND_HALF_EVEN); + t("385450160421689186188707104582074317519.6", "385450160421689186188707104582074317519.5011", 40, RoundingMode.ROUND_UP); + t("980700000000000000000000000000", "980624231078939283428476194025.3425674466530668543518761186154209", 4, RoundingMode.ROUND_UP); + t("338479692666105014616000000000", "338479692666105014616253331245.01389376828879865108105798429640384", 21, RoundingMode.ROUND_DOWN); + t("174223066779502216000000000", "174223066779502215997051823.30021471115775", 19, RoundingMode.ROUND_HALF_DOWN); + t("321274436690589321065314360761529600", "321274436690589321065314360761529598.3926958740287183203559360243861156", 35, RoundingMode.ROUND_UP); + t("965260000000000000000000000000000000", "965258557685921663672915807775689926.372616852406174796393011112241", 5, RoundingMode.ROUND_HALF_DOWN); + t("20495856361024494227552150059704.128252538", "20495856361024494227552150059704.12825253784", 41, RoundingMode.ROUND_UP); + t("347539608767858771651414903881.81676443931828298", "347539608767858771651414903881.816764439318282980413", 47, RoundingMode.ROUND_HALF_EVEN); + t("319471356791473500000000000000000", "319471356791473556138054433838044.90552027814", 16, RoundingMode.ROUND_DOWN); + t("3758410000", "3758411337.659079355464558774017310777636076246", 6, RoundingMode.ROUND_DOWN); + t("986791401418080896.725674945574053721614668858858", "986791401418080896.725674945574053721614668858858", 51, RoundingMode.ROUND_HALF_UP); + t("172860000000000", "172864222463390.0005522631729828976762398559", 5, RoundingMode.ROUND_HALF_DOWN); + t("56.049", "56.049", 6, RoundingMode.ROUND_HALF_EVEN); + t("8343815925404573683080000", "8343815925404573683077429.4758959133829073879054267509464514", 21, RoundingMode.ROUND_HALF_UP); + t("5454663865.0064130258909884643960591289", "5454663865.006413025890988464396059128886823", 38, RoundingMode.ROUND_HALF_EVEN); + t("9581036221000167548404063617040830845674.8563402624162914896", "9581036221000167548404063617040830845674.8563402624162914896694713537", 59, RoundingMode.ROUND_DOWN); + t("500000000000", "410956568424.9910595380985324", 1, RoundingMode.ROUND_UP); + t("32006369380000000000000000000000000", "32006369376256480193142996925472582.0", 10, RoundingMode.ROUND_UP); + t("5222032172895746.90277", "5222032172895746.902766092011", 21, RoundingMode.ROUND_HALF_UP); + t("8439793217442.92", "8439793217442.92137711335321", 15, RoundingMode.ROUND_HALF_UP); + t("9.866065033617488770826998", "9.8660650336174887708269980", 28, RoundingMode.ROUND_HALF_UP); + t("44049352.2266915297896690888554259285496418688", "44049352.22669152978966908885542592854964186877", 45, RoundingMode.ROUND_UP); + t("26847260395161412327091304326000", "26847260395161412327091304326394.7663271691497120655790427", 29, RoundingMode.ROUND_FLOOR); + t("1000000000000", "1085137384726.66574913879922622187703130425247", 2, RoundingMode.ROUND_FLOOR); + t("9.946", "9.9456", 4, RoundingMode.ROUND_HALF_EVEN); + t("428952193056.953", "428952193056.953", 15, RoundingMode.ROUND_HALF_EVEN); + t("1941911780790529313259513.70860258", "1941911780790529313259513.70860257943008396576247829795083", 33, RoundingMode.ROUND_HALF_DOWN); + t("23968438750336.405474280759814", "23968438750336.405474280759813318106", 29, RoundingMode.ROUND_UP); + t("315154230499048000000000000000", "315154230499048332963529384927.93303628365695160150210696280635993802", 15, RoundingMode.ROUND_HALF_DOWN); + t("6500000000", "6480935501.55496974285182162603356273156890", 2, RoundingMode.ROUND_HALF_UP); + t("42302765724017563090210326618736869271", "42302765724017563090210326618736869270.98392129213256644255722", 39, RoundingMode.ROUND_CEIL); + t("608747404736337255085100901273291565", "608747404736337255085100901273291565.318094268584914528314761117", 36, RoundingMode.ROUND_FLOOR); + t("3154176290801000000000000000", "3154176290800715548619630621.0355772810773559541", 13, RoundingMode.ROUND_HALF_UP); + t("38865242750002932570887590800000000000", "38865242750002932570887590890877550733.5505553313425194996432914268372269", 27, RoundingMode.ROUND_DOWN); + t("59457914554626139.52", "59457914554626139.52065942543632055255656", 19, RoundingMode.ROUND_HALF_DOWN); + t("8728384988174071448.69", "8728384988174071448.69274", 21, RoundingMode.ROUND_HALF_UP); + t("8209486790494710645762862448749.80842396605900775935", "8209486790494710645762862448749.80842396605900775935", 54, RoundingMode.ROUND_DOWN); + t("963188883728.74069481457014205", "963188883728.740694814570142059", 29, RoundingMode.ROUND_FLOOR); + t("93249710101545870000000000", "93249710101545874917863173.03705388925", 16, RoundingMode.ROUND_FLOOR); + t("88179259072684818766023076456.5889523232", "88179259072684818766023076456.58895232320350", 39, RoundingMode.ROUND_HALF_UP); + t("776981797289252251.093401546863758214465", "776981797289252251.093401546863758214465286704664334", 39, RoundingMode.ROUND_HALF_UP); + t("188670879464255056850261739500000000000", "188670879464255056850261739507365918265.9293874736873279", 28, RoundingMode.ROUND_DOWN); + t("790372524561301386433116300000000000", "790372524561301386433116293301042112.0", 25, RoundingMode.ROUND_CEIL); + t("117626300000000000", "117626347290152284.584779", 7, RoundingMode.ROUND_FLOOR); + t("353396834933281759072773.805789609148", "353396834933281759072773.805789609148", 37, RoundingMode.ROUND_HALF_UP); + t("4274522263032700000", "4274522263032712850.0041729873", 14, RoundingMode.ROUND_HALF_UP); + t("8350000000000", "8345606845226.45566624", 3, RoundingMode.ROUND_HALF_EVEN); + t("7139338928.10029575", "7139338928.10029575", 19, RoundingMode.ROUND_CEIL); + t("1.28993795996", "1.289937959964596899900", 12, RoundingMode.ROUND_FLOOR); + t("581091710823050000000000000", "581091710823047241756858512.713357759428", 14, RoundingMode.ROUND_UP); + t("4952915437691054280969583000000", "4952915437691054280969583218972.8616946954635715417980", 25, RoundingMode.ROUND_DOWN); + t("9705894787100000000000000000000000", "9705894787058704299917761166078683.9910480951422", 11, RoundingMode.ROUND_HALF_DOWN); + t("3709152457254657158536681.732705728776998763593525103", "3709152457254657158536681.732705728776998763593525103159733", 52, RoundingMode.ROUND_FLOOR); + t("186530566473536251263.858877958", "186530566473536251263.858877958474287539", 30, RoundingMode.ROUND_HALF_UP); + t("18185426229191232807040619835808.46825483359797368754", "18185426229191232807040619835808.46825483359797368754", 52, RoundingMode.ROUND_FLOOR); + t("41.5133038761731262218686", "41.51330387617312622186860688055631484", 24, RoundingMode.ROUND_HALF_UP); + t("892734300000000000000000000000000000000", "892734285316609348922285835347841194677.279150490649933902110687168010", 7, RoundingMode.ROUND_HALF_UP); + t("8867741117000000000000000000", "8867741117136144692773028671.48789537068725372709865944763", 10, RoundingMode.ROUND_HALF_UP); + t("58066.6119296613521", "58066.611929661352058113440", 18, RoundingMode.ROUND_UP); + t("610095820904.3119523193", "610095820904.311952319394878656597629841829693065", 22, RoundingMode.ROUND_FLOOR); + t("45147764430505826.0397992803707428783769210234", "45147764430505826.03979928037074287837692102337", 45, RoundingMode.ROUND_CEIL); + t("2365934669507425116.685560049269016191", "2365934669507425116.685560049269016191181112056065", 37, RoundingMode.ROUND_HALF_UP); + t("76328567052192004276.32866340568679575775108106109", "76328567052192004276.3286634056867957577510810610864", 49, RoundingMode.ROUND_HALF_DOWN); + t("9341865065715748.71038922653450359770952", "9341865065715748.7103892265345035977095284", 39, RoundingMode.ROUND_FLOOR); + t("1893828187345809.95025475161610431769040580234726", "1893828187345809.95025475161610431769040580234726", 51, RoundingMode.ROUND_HALF_DOWN); + t("675418012725769678669671724576651465", "675418012725769678669671724576651465.457619554107058395110952042747864102", 36, RoundingMode.ROUND_HALF_DOWN); + t("722723049408340056285000637093.2", "722723049408340056285000637093.1564846486282233386998", 31, RoundingMode.ROUND_CEIL); + t("8039307818523262169309113965.237955673046573", "8039307818523262169309113965.2379556730465735379", 43, RoundingMode.ROUND_DOWN); + t("620699795.768772003", "620699795.7687720027642576108299448", 18, RoundingMode.ROUND_HALF_EVEN); + t("677976409911497700000000000000000", "677976409911497719121490267737187.9281869113", 16, RoundingMode.ROUND_DOWN); + t("9913200270263800000000000000000000000", "9913200270263779985846761891158202865.88", 14, RoundingMode.ROUND_CEIL); + t("95447550983654000", "95447550983654256.94", 14, RoundingMode.ROUND_HALF_DOWN); + t("9727301256933984906097986874000", "9727301256933984906097986873657.0", 28, RoundingMode.ROUND_UP); + t("83100000000000000000000000000000000", "83144797009396341772640576982431626.06487716198510170943250663066", 3, RoundingMode.ROUND_HALF_DOWN); + t("76723773.04423217932", "76723773.0442321793176553237", 19, RoundingMode.ROUND_HALF_EVEN); + t("8400000000000000", "8442290748483192.541766601132013892502484734171240", 2, RoundingMode.ROUND_HALF_DOWN); + t("80224755820119141339232053676610000", "80224755820119141339232053676618497.04561623225397344999", 31, RoundingMode.ROUND_FLOOR); + t("655778655223372.97", "655778655223372.965", 17, RoundingMode.ROUND_UP); + t("20184630477822715391390984001199.1866444533896426202887666335307182015", "20184630477822715391390984001199.1866444533896426202887666335307182015", 71, RoundingMode.ROUND_HALF_EVEN); + t("41930826996134220", "41930826996134221.1974945198118251722677898312235505", 16, RoundingMode.ROUND_HALF_EVEN); + t("9401169208627113200000", "9401169208627113178099.432092017583166044", 17, RoundingMode.ROUND_HALF_EVEN); + t("46844285000000", "46844285165612.4277871838", 8, RoundingMode.ROUND_HALF_DOWN); + t("732653734623947749013990.255", "732653734623947749013990.2554245257179", 27, RoundingMode.ROUND_FLOOR); + t("817615530000000000000", "817615525922580553380.874869911815006035161427956123678666", 8, RoundingMode.ROUND_HALF_DOWN); + t("648900000000000000", "648881720909905928.428439970149048878644930752628", 4, RoundingMode.ROUND_CEIL); + t("85228991367.461452", "85228991367.46145277847248857183769451804173", 17, RoundingMode.ROUND_DOWN); + t("239393776.69622644151182", "239393776.69622644151181623925655", 23, RoundingMode.ROUND_HALF_UP); + t("33546748243104239469877559937.363355786582993", "33546748243104239469877559937.363355786582993", 44, RoundingMode.ROUND_UP); + t("4000000000000000000000", "3823084385271016278125.11", 1, RoundingMode.ROUND_HALF_DOWN); + t("77046259820455751626.6026808001342537", "77046259820455751626.602680800134253741613198881", 36, RoundingMode.ROUND_HALF_EVEN); + t("26687373854107297015683.744", "26687373854107297015683.74432725585956728677271691574", 26, RoundingMode.ROUND_FLOOR); + t("976672549609984585227222778700000000000", "976672549609984585227222778792212901570.55874088", 28, RoundingMode.ROUND_DOWN); + t("2.5616142669200936365611", "2.561614266920093636561053", 23, RoundingMode.ROUND_CEIL); + t("94492716203969.2225869573684291964191137943094515", "94492716203969.2225869573684291964191137943094514534843", 48, RoundingMode.ROUND_UP); + t("990770621178724769771370000", "990770621178724769771371129.99176486560800414", 23, RoundingMode.ROUND_FLOOR); + t("691412410360950760000000", "691412410360950750128020.48447221650237091009047", 17, RoundingMode.ROUND_UP); + t("29040659564825201725590.2424704967395", "29040659564825201725590.2424704967395", 38, RoundingMode.ROUND_CEIL); + t("89559092584017288521728982.5", "89559092584017288521728982.5833198608864", 27, RoundingMode.ROUND_DOWN); + t("1811614362251924.40512130616", "1811614362251924.405121306157849629", 27, RoundingMode.ROUND_HALF_EVEN); + t("4633501475000", "4633501474602.054640995909183", 10, RoundingMode.ROUND_UP); + t("678705341261.75297583718425453684090101", "678705341261.7529758371842545368409010097945103677", 39, RoundingMode.ROUND_HALF_EVEN); + t("564078844253167778.8161248928271829563591373580664298", "564078844253167778.8161248928271829563591373580664298", 52, RoundingMode.ROUND_UP); + t("88322850583909.7416016241", "88322850583909.74160162410286643", 25, RoundingMode.ROUND_DOWN); + t("3846366946174062127758449605.7022758096", "3846366946174062127758449605.702275809555523634154040950898280612811", 38, RoundingMode.ROUND_HALF_EVEN); + t("89658733400000000000000000000", "89658733356696254546423515335.28349", 9, RoundingMode.ROUND_CEIL); + t("4761467.862", "4761467.861150141326149685649922793395", 10, RoundingMode.ROUND_CEIL); + t("179.92617", "179.9261669", 8, RoundingMode.ROUND_HALF_UP); + t("75069004857851352687270011001106689339.08735", "75069004857851352687270011001106689339.08735", 46, RoundingMode.ROUND_HALF_DOWN); + t("3361644609630676688091028947986494293.045392455143082675351", "3361644609630676688091028947986494293.04539245514308267535094798418063548394", 58, RoundingMode.ROUND_CEIL); + t("6.7942421735585618046", "6.794242173558561804595", 20, RoundingMode.ROUND_HALF_UP); + t("51657502980255968504333490637.09662892780318174480380404", "51657502980255968504333490637.0966289278031817448038040396600018487", 55, RoundingMode.ROUND_HALF_DOWN); + t("11855.226308528", "11855.226308528", 16, RoundingMode.ROUND_HALF_EVEN); + t("61277000000000", "61276347667662.405824737", 5, RoundingMode.ROUND_UP); + t("4174609640", "4174609636.0", 9, RoundingMode.ROUND_HALF_EVEN); + t("687936219719625022378.9502", "687936219719625022378.9502057605855", 25, RoundingMode.ROUND_FLOOR); + t("193757131563910000", "193757131563911904.52682306122527060962641882465", 14, RoundingMode.ROUND_HALF_EVEN); + t("387.455087", "387.45508661743", 9, RoundingMode.ROUND_HALF_EVEN); + t("557618201766183005000000000", "557618201766183005041293682.3722668213410766424816487716234273", 19, RoundingMode.ROUND_HALF_EVEN); + t("21128122508600497.05489", "21128122508600497.05488760", 22, RoundingMode.ROUND_HALF_EVEN); + t("630252144005109.53366072283861382", "630252144005109.53366072283861381792", 32, RoundingMode.ROUND_HALF_UP); + t("963826907622.364662995276", "963826907622.364662995275692188", 24, RoundingMode.ROUND_CEIL); + t("4212653046051913081783119467271.37647511439591502128556", "4212653046051913081783119467271.3764751143959150212855631", 54, RoundingMode.ROUND_FLOOR); + t("2014467765.30542656127", "2014467765.30542656127", 22, RoundingMode.ROUND_HALF_UP); + t("1479320000000000000000000000000000", "1479326666751842221164864465643932.73817033951340680", 6, RoundingMode.ROUND_DOWN); + t("6944862581642049969018412438205282752.728862", "6944862581642049969018412438205282752.72886131507563067413320187385623099", 43, RoundingMode.ROUND_CEIL); + t("9838375.64", "9838375.645", 9, RoundingMode.ROUND_DOWN); + t("73392897409456861290131541129654.9256075066904", "73392897409456861290131541129654.925607506690362687103367844755771", 45, RoundingMode.ROUND_HALF_UP); + t("89764270000000000000000000000000000000", "89764275311096607184088076035578686331.70483764463153360153147271493", 7, RoundingMode.ROUND_DOWN); + t("615391331037547517357702.9541121335087", "615391331037547517357702.9541121335086812", 37, RoundingMode.ROUND_HALF_DOWN); + t("2617216902482291199973663.484710966125", "2617216902482291199973663.484710966125", 37, RoundingMode.ROUND_HALF_UP); + t("17129271618518517092155339580000", "17129271618518517092155339589985.34795326188", 28, RoundingMode.ROUND_FLOOR); + t("606535160521504794000000000000000000000", "606535160521504794060646691380816193844.7", 18, RoundingMode.ROUND_HALF_DOWN); + t("34177380606532061226000", "34177380606532061225426.5490340", 20, RoundingMode.ROUND_CEIL); + t("537578.927123", "537578.9271229227", 12, RoundingMode.ROUND_UP); + t("5008643590729908333990610000", "5008643590729908333990609905.47558686510363696", 25, RoundingMode.ROUND_HALF_DOWN); + t("4895936188848030000000000000000000000", "4895936188848031794116383643496168477.0801543", 15, RoundingMode.ROUND_DOWN); + t("5683079691081606113599129167429526013511.48652875855", "5683079691081606113599129167429526013511.486528758557663781739723321875379906235", 51, RoundingMode.ROUND_FLOOR); + t("8629922951113.7511448487597458660248521234", "8629922951113.7511448487597458660248521234380600977", 41, RoundingMode.ROUND_HALF_UP); + t("90278102650946226014809000000000000", "90278102650946226014809046003862793.7835979911", 24, RoundingMode.ROUND_FLOOR); + t("4821625627675322025353636064.57176", "4821625627675322025353636064.57175523338580806993894351876", 33, RoundingMode.ROUND_HALF_UP); + t("201458719700489100373654957.825506491000336059519682", "201458719700489100373654957.8255064910003360595196823588160", 51, RoundingMode.ROUND_FLOOR); + t("53212790802213594493332", "53212790802213594493332.8650736614584969129110", 23, RoundingMode.ROUND_FLOOR); + t("8177197143472082210310164500000000", "8177197143472082210310164503390974.89434", 26, RoundingMode.ROUND_FLOOR); + t("6977664457930000", "6977664457920874.47627073206781", 12, RoundingMode.ROUND_CEIL); + t("48200644415566530.498484", "48200644415566530.4984835390397628883909840", 23, RoundingMode.ROUND_UP); + t("4000000000000000000000000000000000", "4192746732983495210446560254097740.47028995", 1, RoundingMode.ROUND_DOWN); + t("755.023209", "755.02320914910644", 9, RoundingMode.ROUND_HALF_EVEN); + t("66963000000000000000000000000", "66963023876901420169077780295.01885877196", 6, RoundingMode.ROUND_FLOOR); + t("505291668854707.70906269", "505291668854707.709062685721555135520850266111469308027", 23, RoundingMode.ROUND_HALF_UP); + t("664850.618013", "664850.61801224118433274591608772154387", 12, RoundingMode.ROUND_UP); + t("785103038952630143044641569204316756.63797054791874616052822183467149", "785103038952630143044641569204316756.637970547918746160528221834671492", 68, RoundingMode.ROUND_HALF_EVEN); + t("4146164592920910235341149.587", "4146164592920910235341149.58704019746296185479", 29, RoundingMode.ROUND_FLOOR); + t("579742066579367045736.917004843230287530285579", "579742066579367045736.9170048432302875302855793", 45, RoundingMode.ROUND_HALF_UP); + t("92817.84445", "92817.84445", 13, RoundingMode.ROUND_HALF_UP); + t("772179455775.22422834897", "772179455775.22422834897889", 23, RoundingMode.ROUND_DOWN); + t("4670558124138300", "4670558124138345.3777942422216231", 14, RoundingMode.ROUND_FLOOR); + t("11653701002.1779016933207", "11653701002.177901693320687576204027037389422679", 24, RoundingMode.ROUND_HALF_EVEN); + t("661971346000462043332006500000000000", "661971346000462043332006546474696174.7167702709539", 25, RoundingMode.ROUND_HALF_UP); + t("7951.2507068", "7951.2507067915133", 12, RoundingMode.ROUND_UP); + t("83825.91569730694896932060436944", "83825.915697306948969320604369447056", 31, RoundingMode.ROUND_DOWN); + t("179989.23863077943963", "179989.23863077943963", 21, RoundingMode.ROUND_CEIL); + t("333610464960022048972485697598948476.3274927278", "333610464960022048972485697598948476.32749272770013219331", 46, RoundingMode.ROUND_CEIL); + t("567620976076010000000000000000", "567620976076010425435148100001.0364396667132672575976", 14, RoundingMode.ROUND_HALF_DOWN); + t("25166561739090000000000000000", "25166561739091850523119786031.356417774102", 13, RoundingMode.ROUND_DOWN); + t("35769804358466980414449956124427509", "35769804358466980414449956124427509.31366843647801642057", 35, RoundingMode.ROUND_HALF_DOWN); + t("5624000000000000000000000000000000", "5623994624926506484134510384338582.7213130433076592758171270720102084", 4, RoundingMode.ROUND_CEIL); + t("52471579263868610000000000000000", "52471579263868615271801405152771.014318284628313", 16, RoundingMode.ROUND_FLOOR); + t("800000000000", "754585116996.9768", 1, RoundingMode.ROUND_UP); + t("6845902810000000000000000000000000000000", "6845902808062306446526711601148487105964.760230279341124548333865130108451155441", 9, RoundingMode.ROUND_CEIL); + t("25329930000000000000000000000000", "25329931835642796295008712007359.774", 7, RoundingMode.ROUND_HALF_EVEN); + t("838205133360935.04", "838205133360935.0450208", 17, RoundingMode.ROUND_DOWN); + t("960000", "964483.4958501605537391", 2, RoundingMode.ROUND_HALF_UP); + t("6985940160812637750037427078390489093.5972419", "6985940160812637750037427078390489093.59724194766104006296648646911097283", 44, RoundingMode.ROUND_HALF_UP); + t("85912832521353633900000", "85912832521353633962171.622844738617471351787937", 18, RoundingMode.ROUND_DOWN); + t("22537.04", "22537.044131504334747686356", 7, RoundingMode.ROUND_HALF_UP); + t("64820082671929139423989159247959991.27439244549390817", "64820082671929139423989159247959991.2743924454939081683", 52, RoundingMode.ROUND_CEIL); + t("81309794072838871318854500310152.093", "81309794072838871318854500310152.09295684998521", 35, RoundingMode.ROUND_HALF_UP); + t("2983.146", "2983.146", 8, RoundingMode.ROUND_UP); + t("7649851971073922220000000000", "7649851971073922227632383137.12367829277753284010508541882606785617", 18, RoundingMode.ROUND_DOWN); + t("4413319948694474085791.6528747", "4413319948694474085791.65287472187114939173359969", 29, RoundingMode.ROUND_DOWN); + t("9169434008670526360155.858673", "9169434008670526360155.858673447171266307242005", 28, RoundingMode.ROUND_HALF_UP); + t("87281481541792866.31680021820096", "87281481541792866.31680021820096251746992578412", 31, RoundingMode.ROUND_FLOOR); + t("1262882505899773546530000000000000000", "1262882505899773546530078940105109255.1340263465677131821878853130", 21, RoundingMode.ROUND_DOWN); + t("90957735119480552000.1275792566121", "90957735119480552000.12757925661213812317307", 33, RoundingMode.ROUND_FLOOR); + t("95094204140327.386800069607", "95094204140327.3868000696069952245821304362528", 26, RoundingMode.ROUND_HALF_EVEN); + t("782.8315804028037", "782.8315804028036627332091761646906", 16, RoundingMode.ROUND_HALF_UP); + t("4070074897815719013854405000000", "4070074897815719013854404930086.0517196", 25, RoundingMode.ROUND_CEIL); + t("7535527006575666259327800", "7535527006575666259327801.3118771661605538067531702602254", 24, RoundingMode.ROUND_HALF_DOWN); + t("993000000000000", "992026987647463.516668", 3, RoundingMode.ROUND_UP); + t("4698757980923794411324653119136506649753.9058533965214", "4698757980923794411324653119136506649753.90585339652148316962906302356153227", 53, RoundingMode.ROUND_DOWN); + t("338765415.622999075063635041304250288156393", "338765415.62299907506363504130425028815639273842", 42, RoundingMode.ROUND_HALF_EVEN); + t("444000", "443272.8", 3, RoundingMode.ROUND_UP); + t("92863547832.26", "92863547832.25594", 13, RoundingMode.ROUND_UP); + t("227484121340486.542512", "227484121340486.54251108296", 21, RoundingMode.ROUND_UP); + t("7034", "7034.0", 7, RoundingMode.ROUND_CEIL); + t("84677601800000000", "84677601708231089.8035199547", 9, RoundingMode.ROUND_CEIL); + t("903992663388421800000000000", "903992663388421818078667246.7494838726767325648", 16, RoundingMode.ROUND_FLOOR); + t("9440650000000000000000000000000000", "9440656634642185509393801198086015.4", 6, RoundingMode.ROUND_DOWN); + t("916417601649800000000000000", "916417601649865583796921805.163932264102471440203390988", 13, RoundingMode.ROUND_DOWN); + t("3546786323316815500000", "3546786323316815404869.163629407284618604", 17, RoundingMode.ROUND_CEIL); + t("747408692550834866360911935.8990445275165282197802717382548", "747408692550834866360911935.89904452751652821978027173825483", 58, RoundingMode.ROUND_FLOOR); + t("29804424518.256135774", "29804424518.256135774", 23, RoundingMode.ROUND_CEIL); + t("15732791881955773293163440652450", "15732791881955773293163440652451.44291076191144", 31, RoundingMode.ROUND_DOWN); + t("82293484047103499038.6975422642147137771867866208", "82293484047103499038.697542264214713777186786620705401", 48, RoundingMode.ROUND_UP); + t("5288356.17", "5288356.17", 11, RoundingMode.ROUND_CEIL); + t("75977708959803656203251104.81675609237952293524970939", "75977708959803656203251104.81675609237952293524970938678", 52, RoundingMode.ROUND_HALF_UP); + t("1958555193503000000000000000000", "1958555193502587409635649733733.584", 13, RoundingMode.ROUND_CEIL); + t("61097901998.6487577", "61097901998.6487577", 21, RoundingMode.ROUND_FLOOR); + t("4966635612645365.09586650722463", "4966635612645365.095866507224630866586307217888782761159", 30, RoundingMode.ROUND_HALF_EVEN); + t("449349314276161751863885318023458.255606199257691366208268573", "449349314276161751863885318023458.255606199257691366208268573", 61, RoundingMode.ROUND_HALF_EVEN); + t("3313802055037244406355.1441269459053985", "3313802055037244406355.14412694590539847622267", 38, RoundingMode.ROUND_HALF_DOWN); + t("77476038634229841225203.057294319605", "77476038634229841225203.05729431960467859218", 35, RoundingMode.ROUND_HALF_EVEN); + t("532731523000", "532731523075.4101466861580822959", 10, RoundingMode.ROUND_DOWN); + t("279000000000000000000000000", "279332110982355758954949172.19150963", 3, RoundingMode.ROUND_HALF_DOWN); + t("76199428363070721667903.826669566", "76199428363070721667903.826669566165506057243720918746", 32, RoundingMode.ROUND_HALF_EVEN); + t("297600", "297631.47066887", 4, RoundingMode.ROUND_FLOOR); + t("8248110729241783273113.562111307100337407", "8248110729241783273113.562111307100337407", 40, RoundingMode.ROUND_CEIL); + t("1000000000000000000000", "1236453638891742153022.8348728811", 1, RoundingMode.ROUND_HALF_UP); + t("535330000", "535327351.8008", 5, RoundingMode.ROUND_CEIL); + t("4308.58715419601937041522", "4308.58715419601937041522", 24, RoundingMode.ROUND_HALF_DOWN); + t("13500654611668894713386183570622548.34241", "13500654611668894713386183570622548.34240861579", 40, RoundingMode.ROUND_HALF_DOWN); + t("995.7155821993173011608323", "995.71558219931730116083231270171862650", 25, RoundingMode.ROUND_FLOOR); + t("239147599253876718.9504433491173273", "239147599253876718.95044334911732723218139304606724752", 34, RoundingMode.ROUND_CEIL); + t("765497722616.8961003646", "765497722616.896100364573390975890478644136740197458", 22, RoundingMode.ROUND_HALF_EVEN); + t("101979298537.68788178219", "101979298537.6878817821900758850756870223612522530", 23, RoundingMode.ROUND_FLOOR); + t("54564000000000000000000000000000000000", "54563203006377285590954695127259934956.72304700", 5, RoundingMode.ROUND_CEIL); + t("937851991874226678.2", "937851991874226678.191965007088457", 19, RoundingMode.ROUND_UP); + t("9141378468539383564638997660000", "9141378468539383564638997666387.513564869223", 27, RoundingMode.ROUND_DOWN); + t("20497199023806.45608949", "20497199023806.45608949227987004920339939", 22, RoundingMode.ROUND_HALF_DOWN); + t("81603182.7", "81603182.616632542195753770061305729184", 9, RoundingMode.ROUND_CEIL); + t("1288222268118280000000000000000000000000", "1288222268118271079758562419926059399472.4003871704903395624929468673346838726", 15, RoundingMode.ROUND_CEIL); + t("484726059819530000000000000000000000", "484726059819531746596562275263672330.122283607", 14, RoundingMode.ROUND_FLOOR); + t("680000000000", "675623616750.993125132354", 2, RoundingMode.ROUND_HALF_UP); + t("87687220439051000000000000000000000000", "87687220439051554697153502010194056104.42861", 14, RoundingMode.ROUND_DOWN); + t("2844992735024778164396876428400000", "2844992735024778164396876428386392.397101880541673725", 29, RoundingMode.ROUND_HALF_EVEN); + t("4910468313236974384325553954.559", "4910468313236974384325553954.558968559307060603568610", 32, RoundingMode.ROUND_HALF_UP); + t("7677382468596942606325100814949164462.335409794", "7677382468596942606325100814949164462.335409794", 49, RoundingMode.ROUND_DOWN); + t("6958724457786172481654532020985.043", "6958724457786172481654532020985.043", 34, RoundingMode.ROUND_CEIL); + t("460800", "460705.8028929240198868371532360965971117977776", 4, RoundingMode.ROUND_CEIL); + t("81763325373301098575053681.009551104718485", "81763325373301098575053681.0095511047184850495148390898", 41, RoundingMode.ROUND_HALF_DOWN); + t("77290000000000000000000000000", "77298476544997406115741457621.48100777755241170668034650809", 4, RoundingMode.ROUND_DOWN); + t("2862358127844547877974880690522730000", "2862358127844547877974880690522726982.49409754", 33, RoundingMode.ROUND_CEIL); + t("901843956540041489372610610000", "901843956540041489372610614345.487929674", 26, RoundingMode.ROUND_HALF_DOWN); + t("45031671217607058672836306.48351134", "45031671217607058672836306.4835113355599", 34, RoundingMode.ROUND_HALF_UP); + t("92083948494159391284091144794664446.380059732506918919702", "92083948494159391284091144794664446.380059732506918919702007475113945", 58, RoundingMode.ROUND_FLOOR); + t("177322371367658020851649000000", "177322371367658020851649147602.975655295218030854293908400956", 24, RoundingMode.ROUND_FLOOR); + t("4239542600712473433498612753.21060144321763992555366", "4239542600712473433498612753.2106014432176399255536577373285045425339", 51, RoundingMode.ROUND_HALF_UP); + t("989142489.56454046202042259", "989142489.56454046202042259", 29, RoundingMode.ROUND_HALF_EVEN); + t("39188324760962.64171", "39188324760962.641710", 19, RoundingMode.ROUND_UP); + t("1784374158800", "1784374158866.4741261545314002975498", 11, RoundingMode.ROUND_DOWN); + t("4889335896817404.6714320041572203", "4889335896817404.6714320041572203348794", 32, RoundingMode.ROUND_FLOOR); + t("3179414685590000000000000000000000", "3179414685592371949442250485606819.26696750990296429734141944", 12, RoundingMode.ROUND_HALF_EVEN); + t("2903.26350044", "2903.263500440", 13, RoundingMode.ROUND_FLOOR); + t("1491343.789445631775761446419118151", "1491343.7894456317757614464191181515356911640598", 34, RoundingMode.ROUND_FLOOR); + t("5500628286601049.843663626181949", "5500628286601049.8436636261819485793447808823573910", 31, RoundingMode.ROUND_HALF_UP); + t("3974711265332457200000000000000", "3974711265332457176491911497563.9361", 17, RoundingMode.ROUND_HALF_UP); + t("93.28105427667321036", "93.281054276673210359", 19, RoundingMode.ROUND_CEIL); + t("79910228655846918061600000", "79910228655846918061589185.101353368484158631096929283677512827019", 21, RoundingMode.ROUND_UP); + t("4389523222041915395738636382677027050000", "4389523222041915395738636382677027049670.297472800121808897652436", 36, RoundingMode.ROUND_UP); + t("2894245566479613750113978122489420.5686284128195803188", "2894245566479613750113978122489420.56862841281958031877868147223357225", 53, RoundingMode.ROUND_HALF_UP); + + t("494724446222447272134436118293973049042208245586819785140130787553487687286873291327585520984443687211379965781311260864429223913901690400000000000", "494724446222447272134436118293973049042208245586819785140130787553487687286873291327585520984443687211379965781311260864429223913901690493449434874.049", 136, RoundingMode.ROUND_DOWN); + t("3720280055397389210963282787773692958098570405431190000", "3720280055397389210963282787773692958098570405431182098.1847115996658646089352534779938945383741184042776917885782743812931817237846474528789801", 51, RoundingMode.ROUND_UP); + t("759188909745876678229347606524330959678969850255912440680257260789800000000000000000000000000000000000000000000", "759188909745876678229347606524330959678969850255912440680257260789793508531411911105662225225721357883400623102.881476662045026352517268398904498921045685377855106763679514746737986172605517588709155551610890784878010336772838372711497238975980355571170655725075915881399899070771273619112223837705596667049149981193", 67, RoundingMode.ROUND_UP); + t("4534304542844843415257043214798844424046834211704366877715023555011150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "4534304542844843415257043214798844424046834211704366877715023555011146990876705027962738522155031711274213446497330677820779740785545273317321438460934917531081249158109061429290323393161606391411793.277725444395", 69, RoundingMode.ROUND_HALF_DOWN); + t("527244430907269587850000000000", "527244430907269587847819161754.09994360681344184942353237241149292559482211118493881252182204930127002210488011149670127752911923929048735411637853031498542495512941893603181502188788354208091361643795263910287", 20, RoundingMode.ROUND_HALF_DOWN); + t("500274199038784701912854356303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "500274199038784701912854356303168604036329678593776947367198603066622399541094534586945152898619439257327038632128821666524202122658068057432922418958129519085677022999535035083.95723140131476417422632523022711778228314707489949388264508533995136005795122359991", 30, RoundingMode.ROUND_HALF_DOWN); + t("5333760730338237.358128061070265324699616103754480796605292719724271045", "5333760730338237.35812806107026532469961610375448079660529271972427104505398437046671245161686878493124070786536064182194621929641261600482019485630475569955198761522647338125822382150219203146448476750498789080703982026782691017063636782481300", 70, RoundingMode.ROUND_HALF_DOWN); + t("9387762026.7326734940421184446066226146106694714282947260976784456146415402", "9387762026.73267349404211844460662261461066947142829472609767844561464154020", 75, RoundingMode.ROUND_HALF_UP); + t("67323858.24741072854262989306161704601101", "67323858.2474107285426298930616170460110072782018778697292704532242132189290371593478382802207909998627911041939764517795222755210476244995305187831767572511625381158475111177037691940475964756887806055996078204829400918467078858084732712280713071351617031612115767601030103857883944259837811618215851568286334400246721991754374286168046011298802236522", 40, RoundingMode.ROUND_CEIL); + t("618280971398998509245590744944289036083345801467550000000000000000000000000000000000000000000000000000000000000000000000000000000", "618280971398998509245590744944289036083345801467546352624671931393813580337957902732550378613100649571499058004021009366633559571.2699009128705660239887951528338903748244427453200035937983818076678373616991455573", 50, RoundingMode.ROUND_HALF_DOWN); + t("3625212716653626154269212443601969756896707.1563164088370829935116368726319072553580520490616568", "3625212716653626154269212443601969756896707.15631640883708299351163687263190725535805204906165678662625271", 95, RoundingMode.ROUND_CEIL); + t("279794024756694785000215326702581040764281424692.94416985247012017560069970214089414772133468917746186164351199574782564560451796356697926186392269112385101341672332415427389576261072927099738586782426824776935594024948", "279794024756694785000215326702581040764281424692.94416985247012017560069970214089414772133468917746186164351199574782564560451796356697926186392269112385101341672332415427389576261072927099738586782426824776935594024947823170180686", 218, RoundingMode.ROUND_HALF_EVEN); + t("35828450460504270469704936980280835584645741698641855543514563095433541570683138929790029105719699910360000000000000000000000000000000000000000000000", "35828450460504270469704936980280835584645741698641855543514563095433541570683138929790029105719699910361577052023426681751310480362480069300311248293.15348414532497112250157766681332507724698060759080257429160605105296732683871024", 103, RoundingMode.ROUND_HALF_EVEN); + t("43761815435821313568192740041070231887308670966477475362204961804611459661458966510873830168.716748692490194916680548288518654884099098683415405589451450981728769866802762326739", "43761815435821313568192740041070231887308670966477475362204961804611459661458966510873830168.716748692490194916680548288518654884099098683415405589451450981728769866802762326738670533948709724357936162347635031179866244", 176, RoundingMode.ROUND_CEIL); + t("9940289055903627512125768245502992585069900170400000000000000000", "9940289055903627512125768245502992585069900170399503819515972524.13568735283721983801757702683853241247769318405229726113276035561474837566466532875876277432576610830142188269641845050335097656359864498101396326004092685742327518181101473104745549408201476216574093693733574369506676184899821529267868141813088352688031339966846243166921375083445250920", 47, RoundingMode.ROUND_HALF_UP); + t("47308500490651000672647597245353550222048575.807214284239202", "47308500490651000672647597245353550222048575.8072142842392016063606507543350997595316613513575837073421103918284314912676250088610064455343463233565051257974791197641171878251624763412467738389496245200149213715671349161", 59, RoundingMode.ROUND_HALF_UP); + t("7242493899945961184657078755114354.8275694408198985015345976108000512015550224515265362601958484547530262", "7242493899945961184657078755114354.827569440819898501534597610800051201555022451526536260195848454753026282935514547388140", 104, RoundingMode.ROUND_DOWN); + t("4984463523458535754905264911455285850008993268231053980.767410232956686367696506915282296297", "4984463523458535754905264911455285850008993268231053980.767410232956686367696506915282296296709367816894555456665962274719887159413483764425930136761749360042065357118267648394706165913383308575864809558314678492797545419", 91, RoundingMode.ROUND_UP); + t("468731093093191466545712621915352193328466285392879958862956252122614534959310655639000000000000000000000000000", "468731093093191466545712621915352193328466285392879958862956252122614534959310655638837578478177944653136138911.41840552882713558913968005741142943", 84, RoundingMode.ROUND_HALF_DOWN); + t("8722796170843759397737441130128801601794238071659409548210220188790585826046201831648630668253198051544084586185006178347748234700", "8722796170843759397737441130128801601794238071659409548210220188790585826046201831648630668253198051544084586185006178347748234759.9434511722086056368943", 128, RoundingMode.ROUND_FLOOR); + t("67926499505419960439966855715456849140496804252323842323150939357112.592612688760262", "67926499505419960439966855715456849140496804252323842323150939357112.5926126887602628389494013461282357363300181486827630507100652279617012866942377850016203733098433364051", 83, RoundingMode.ROUND_FLOOR); + t("1402457858069260843701831542961702005330000000000000000000000000000000000000000000", "1402457858069260843701831542961702005338943536372264316099532808299709640182133143.009979906034715196177295226439746913418590464152810027317068521003207924233662128607269663291833", 39, RoundingMode.ROUND_DOWN); + t("1106350604097326705139313335803761878947015866282894852274609129769275668488439922176607333011405146481732245401758539986540.94882628447605933696571359709430425378075223612860671428379", "1106350604097326705139313335803761878947015866282894852274609129769275668488439922176607333011405146481732245401758539986540.94882628447605933696571359709430425378075223612860671428378614749989787085552416655512628791179233", 183, RoundingMode.ROUND_CEIL); + t("9735483775685609464322320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "9735483775685609464322320520902637418698700323093604913106065125437383414521799911105265912341567164193794949895999422938985317071738708834029942382911270457249378913787.1103832980594904520955978916205703025866141635300875243", 24, RoundingMode.ROUND_DOWN); + t("489529.68306403435338777825958322163255657451479551721256707088073420494749504360454448131356633", "489529.683064034353387778259583221632556574514795517212567070880734204947495043604544481313566331313388535912869238239769635054162766247017293340447968973686886334804349955536713950306242814646600928789897172058572510482913298938731094634890755913526004290737129748224090241001770940", 95, RoundingMode.ROUND_DOWN); + t("5916066038388477.282777699215057097344308799257479415453402583912978373402137006855767835024785902898403750237821320238828483034980698804153055853499", "5916066038388477.282777699215057097344308799257479415453402583912978373402137006855767835024785902898403750237821320238828483034980698804153055853498816858707539873771777970182477242160360615721826161461903035810812584828", 148, RoundingMode.ROUND_HALF_DOWN); + t("1492565201039912150941642914851.0188694977647271424918935209921129749064571021507470715331012037266466375367808113130910695243443128008252945554605720303655", "1492565201039912150941642914851.01886949776472714249189352099211297490645710215074707153310120372664663753678081131309106952434431280082529455546057203036546314199747521356134765285561227686693949347029078827406886675694947", 155, RoundingMode.ROUND_HALF_EVEN); + t("9640.823515736412358055650895513069103270437767616274081289588691585664302621579615021666966091360826575410661596403164479300452152684973160363097309608067", "9640.823515736412358055650895513069103270437767616274081289588691585664302621579615021666966091360826575410661596403164479300452152684973160363097309608066484458989787971253015176864265186897585966764740584557961889884222991340777882611717168551975010970695517417044829720982931484654856360759782530622", 154, RoundingMode.ROUND_UP); + t("2192917244999869343205916374337677.13670389941440829125766924482174747890075138055235242239241690214", "2192917244999869343205916374337677.13670389941440829125766924482174747890075138055235242239241690213762402416630046739017177822", 99, RoundingMode.ROUND_HALF_EVEN); + t("63537288045407814614632100373927391371818274269554962.476", "63537288045407814614632100373927391371818274269554962.47539574376947926528280013008702010901972495291817972524796755262276716657735757278", 56, RoundingMode.ROUND_CEIL); + t("2811000000000000000000", "2810271650889132939296.56710151819671988902086681773799853021233325407901168571657754153770180269049570864269302522698770485556146", 4, RoundingMode.ROUND_UP); + t("315495111097618519547112164879699292983604105741729996616794447864850000000", "315495111097618519547112164879699292983604105741729996616794447864849595569.4732429578938004170666887599581675624557787373713415172397346993864722937610311872942069612761272487587892003117667431497194318776589121114621644677670506783812384346194108237410689252765415071112547238246125156991556184611980318715999133743922164645414546327450499594633872455804056396617969187240487543621620", 69, RoundingMode.ROUND_HALF_EVEN); + t("204.054713812637763806802452", "204.054713812637763806802452", 28, RoundingMode.ROUND_DOWN); + t("283401218864063400000000000000000000000000000000000000000000000", "283401218864063396558389343623404646465639303535411612743365055.0226824948376888", 17, RoundingMode.ROUND_HALF_EVEN); + t("92229.61758321528485812953091790666786058628679345291222636317052305267319561885415781143567404759366953", "92229.6175832152848581295309179066678605862867934529122263631705230526731956188541578114356740475936695278089617909281727991815396972738914904573285717078598330120780900701772340175710598595012522421761264348230172003217", 103, RoundingMode.ROUND_HALF_DOWN); + t("272730132423593904649945011230989.07441427998296751796431596590750797141803801848817960594928685477662435073578350760298700878428378237445274", "272730132423593904649945011230989.0744142799829675179643159659075079714180380184881796059492868547766243507357835076029870087842837823744527376015781771828747087898039912031366854731319283802355925346531872038489621488183273173863", 140, RoundingMode.ROUND_CEIL); + t("834882716459088686085166110241864368.2585566209634844197272577905771502073368091374111995246662548601100626717411222217154101996014", "834882716459088686085166110241864368.258556620963484419727257790577150207336809137411199524666254860110062671741122221715410199601367804869545194", 130, RoundingMode.ROUND_CEIL); + t("17069318170447559670824010313506648026528166586129880725091542343600550422997254786851016215940786230013064180480826097444101000000000000000000000000000000", "17069318170447559670824010313506648026528166586129880725091542343600550422997254786851016215940786230013064180480826097444101017117212949291335428804169206.4789414896747948034966909141270082719485508246318636726728954481", 125, RoundingMode.ROUND_HALF_UP); + t("459159626088903852606631649784227594935229835299060973799218279323000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "459159626088903852606631649784227594935229835299060973799218279323713336570937633103595944583645177507124617629953771475688119656568329467957028808451626080.2157052326772496024245144704394972923671967963191881122863487049025806804492486980444650765391761189341478929086845849828893436948962388818123422", 66, RoundingMode.ROUND_DOWN); + t("8964893258158025627760261546686868902639753180000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "8964893258158025627760261546686868902639753182992598513279568321959004014846384717934802529654264364024872333833301734962238301019.830652683", 45, RoundingMode.ROUND_HALF_DOWN); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("-1.11070563555955986e+949884", "-1.1107056355595598537391E+949884", 18, RoundingMode.ROUND_UP); + t("6.31095e+4614231246519714", "6.310954382701729758393260889166675474531891695090516238E+4614231246519714", 6, RoundingMode.ROUND_HALF_UP); + t("6.46090322e+6677217159189", "6.460903219125211021E+6677217159189", 9, RoundingMode.ROUND_HALF_EVEN); + t("-3.95798433263891068927612875275729538e+483397", "-3.95798433263891068927612875275729538E+483397", 36, RoundingMode.ROUND_FLOOR); + t("-5.15e+51785", "-5.1495592729221424586275386661E+51785", 3, RoundingMode.ROUND_UP); + t("-8.341297854e+7759443961", "-8.34129785438621486E+7759443961", 10, RoundingMode.ROUND_CEIL); + t("-7.039038e+648540530527", "-7.03903881158613994150693699720210776203561398962036350248E+648540530527", 7, RoundingMode.ROUND_DOWN); + t("8.86067409668395196e+553520229219693", "8.860674096683951963219272593791310E+553520229219693", 18, RoundingMode.ROUND_DOWN); + t("9.864987930516936534e-490626048", "9.8649879305169365348113E-490626048", 19, RoundingMode.ROUND_DOWN); + t("5.8917903635419393e+46492775", "5.8917903635419392365831E+46492775", 17, RoundingMode.ROUND_CEIL); + t("3.471651888e-7", "3.4716518879894538148508E-7", 10, RoundingMode.ROUND_HALF_EVEN); + t("3e+350468916", "3E+350468916", 1, RoundingMode.ROUND_HALF_DOWN); + t("2.6e+187364576122710", "2.6468730222404974166287111790752920305E+187364576122710", 2, RoundingMode.ROUND_HALF_UP); + t("-8.08170387551427578983625022e-7525724769", "-8.0817038755142757898362502198224521935080928E-7525724769", 27, RoundingMode.ROUND_FLOOR); + t("-5.820926e+137772541213403", "-5.820926E+137772541213403", 7, RoundingMode.ROUND_DOWN); + t("5.82502531276069650637998468163265673623114802117e+8930012634273", "5.82502531276069650637998468163265673623114802117E+8930012634273", 49, RoundingMode.ROUND_UP); + t("4.844065381013725986837e+6248", "4.84406538101372598683728877E+6248", 22, RoundingMode.ROUND_HALF_UP); + t("-6.724e+7494242238106", "-6.7242657973487816694742594494155083518497133669292619495E+7494242238106", 4, RoundingMode.ROUND_DOWN); + t("-9.4498161648797e+8817051", "-9.44981616487963708105775536177061040387686718038130154486986E+8817051", 14, RoundingMode.ROUND_FLOOR); + t("-7e+7786945", "-7.7313723453361061E+7786945", 1, RoundingMode.ROUND_DOWN); + t("6.891752e+46766112525827", "6.8917529279486620283885E+46766112525827", 7, RoundingMode.ROUND_FLOOR); + t("-4e-93725726753990", "-4.145441268822437756131965510163E-93725726753990", 1, RoundingMode.ROUND_CEIL); + t("-1.12e+306023331171748", "-1.118165921482066102466296293946894050652555175E+306023331171748", 3, RoundingMode.ROUND_HALF_UP); + t("-7.97933637481027805811243e+5501", "-7.97933637481027805811243624604489711E+5501", 24, RoundingMode.ROUND_CEIL); + t("7.21004626e+398740640897153", "7.2100462602152007419973593468751658532E+398740640897153", 9, RoundingMode.ROUND_HALF_UP); + t("-7.936e-43130", "-7.93600951E-43130", 4, RoundingMode.ROUND_HALF_UP); + t("-1.80564432714468488631383756914281144946839362e+1359", "-1.80564432714468488631383756914281144946839361818525E+1359", 45, RoundingMode.ROUND_HALF_EVEN); + t("-4.628554324020425e+5815991268494", "-4.6285543240204252524099493990932424634348E+5815991268494", 16, RoundingMode.ROUND_HALF_DOWN); + t("-3e+15499", "-3.0E+15499", 5, RoundingMode.ROUND_DOWN); + t("1.77529e+5442970395990", "1.77529E+5442970395990", 6, RoundingMode.ROUND_CEIL); + t("-3.393352377819527802023568109492373e+725647954123", "-3.393352377819527802023568109492373656E+725647954123", 34, RoundingMode.ROUND_DOWN); + t("-9.51113913923830633451150121829e-868", "-9.5111391392383063345115012182879189612993491E-868", 30, RoundingMode.ROUND_HALF_DOWN); + t("-7.92283e+78175", "-7.92283E+78175", 7, RoundingMode.ROUND_HALF_DOWN); + t("4.841677133170436816434246233e+30639158262", "4.8416771331704368164342462331056980108405981E+30639158262", 28, RoundingMode.ROUND_DOWN); + t("4.5e+9325666044026", "4.45420164905655927661142848292149E+9325666044026", 2, RoundingMode.ROUND_HALF_UP); + t("1.3e+971860873519992", "1.3393718841216445941247869301225022E+971860873519992", 2, RoundingMode.ROUND_HALF_UP); + t("9.876242886531e+52605", "9.876242886531446435944603618104763457E+52605", 13, RoundingMode.ROUND_DOWN); + t("6.330647937407025476697e+1768", "6.330647937407025476696971741E+1768", 22, RoundingMode.ROUND_CEIL); + t("5.2068922505677208e-3336", "5.20689225056772082748E-3336", 17, RoundingMode.ROUND_HALF_DOWN); + t("5.92809e+23046663", "5.928089832984E+23046663", 7, RoundingMode.ROUND_HALF_DOWN); + t("-8.5013637538e+888365717321295", "-8.50136375387653962573285296809772512970778623629235925E+888365717321295", 11, RoundingMode.ROUND_DOWN); + t("4.26475618712602071344874281e-62604", "4.26475618712602071344874281748487391782E-62604", 27, RoundingMode.ROUND_FLOOR); + t("9.020713898414363807382134e-1", "0.9020713898414363807382133864186995", 25, RoundingMode.ROUND_HALF_EVEN); + t("7.09e+2242265227092", "7.0838E+2242265227092", 3, RoundingMode.ROUND_UP); + t("-2.6239193037e-459", "-2.6239193037415483309716069E-459", 11, RoundingMode.ROUND_CEIL); + t("2.08714059942275969e+28", "20871405994227596829475710887.232303900189115941377511040", 18, RoundingMode.ROUND_CEIL); + t("-3.21984e+66642478", "-3.219846203541755078720574281120717190883E+66642478", 6, RoundingMode.ROUND_CEIL); + t("8.08261507044993075472382557081796361683467812687673683e-4976", "8.08261507044993075472382557081796361683467812687673683E-4976", 57, RoundingMode.ROUND_UP); + t("5.5100964862850252990176e+0", "5.51009648628502529901761683407913552", 23, RoundingMode.ROUND_HALF_UP); + t("1.71255625197e+623", "1.712556251979341826880397489279E+623", 12, RoundingMode.ROUND_FLOOR); + t("3.481615e+9752693", "3.4816153525988774411598020196959004888E+9752693", 7, RoundingMode.ROUND_FLOOR); + t("3.509821e+91098992", "3.5098208203E+91098992", 7, RoundingMode.ROUND_HALF_DOWN); + t("9.8641537792703101567472056e-72452394265", "9.8641537792703101567472055694976920744483687020935E-72452394265", 26, RoundingMode.ROUND_CEIL); + t("1.027989e+401293443271", "1.0279887207E+401293443271", 7, RoundingMode.ROUND_HALF_UP); + t("4.76e+44979245", "4.7639E+44979245", 3, RoundingMode.ROUND_HALF_UP); + t("-1.7306e+1059755325", "-1.7306315078051716446467E+1059755325", 5, RoundingMode.ROUND_HALF_UP); + t("3.9456282632322e+203687", "3.9456282632321519002673617475779957462749297912E+203687", 14, RoundingMode.ROUND_HALF_UP); + t("-8.5376063018414796e-534432343020843", "-8.53760630184147960E-534432343020843", 21, RoundingMode.ROUND_CEIL); + t("8.65224414419867239120564571373e+8606642533", "8.652244144198672391205645713722739150532482412E+8606642533", 30, RoundingMode.ROUND_CEIL); + t("-6.174e+9", "-6173578265.071", 4, RoundingMode.ROUND_HALF_UP); + t("6.793079624623340928072e+7", "67930796.2462334092807242196421600", 22, RoundingMode.ROUND_HALF_DOWN); + t("-2.36373930494803297524865796700721024e+838379", "-2.36373930494803297524865796700721024881625741597833295816323E+838379", 36, RoundingMode.ROUND_DOWN); + t("-9e+5483611650120", "-9E+5483611650120", 4, RoundingMode.ROUND_FLOOR); + t("1.5e+7", "14349628.01922235388049374147", 2, RoundingMode.ROUND_UP); + t("6.8614e+74393698866798", "6.8614E+74393698866798", 8, RoundingMode.ROUND_DOWN); + t("-1.831113233533270669228699622e+8406934", "-1.8311132335332706692286996219681430E+8406934", 29, RoundingMode.ROUND_HALF_EVEN); + t("7.714520184016993933542818837124793408006e+2", "771.45201840169939335428188371247934080056704899", 40, RoundingMode.ROUND_CEIL); + t("-1.07e+6795813709", "-1.0732125537673403265457667040389769358981173800952578892E+6795813709", 3, RoundingMode.ROUND_HALF_DOWN); + t("4.91402e+7112074044", "4.91401973E+7112074044", 7, RoundingMode.ROUND_UP); + t("8.84e+76239602607", "8.841940724E+76239602607", 3, RoundingMode.ROUND_HALF_EVEN); + t("4.794257702528707921549614769559147705541286916e+8949077983", "4.794257702528707921549614769559147705541286916517125838578E+8949077983", 46, RoundingMode.ROUND_DOWN); + t("-3.14815e+153331637489", "-3.14814925E+153331637489", 6, RoundingMode.ROUND_HALF_DOWN); + t("6.04477481096739e-222583722", "6.04477481096739E-222583722", 18, RoundingMode.ROUND_HALF_UP); + t("9.205025903021276187181944366817198e+96711", "9.205025903021276187181944366817198E+96711", 36, RoundingMode.ROUND_DOWN); + t("9.48094821522133194405126162122334e+351074489623", "9.4809482152213319440512616212233329955405089941555240223386E+351074489623", 33, RoundingMode.ROUND_UP); + t("3.9748340091494161936502395814742749549562853206914631e+3139", "3.97483400914941619365023958147427495495628532069146310E+3139", 55, RoundingMode.ROUND_HALF_UP); + + tx(() => { bigDecimalFactory.BigDecimal("12.345").ToSD(-23); }, ".toSD(-23)"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").ToSD((long)1e9 + 1); }, ".toSD(1e9 + 1)"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalToStringTests.cs b/DecimalSharp.Tests/BigDecimalToStringTests.cs new file mode 100644 index 0000000..3684487 --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalToStringTests.cs @@ -0,0 +1,381 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalToString")] + public class BigDecimalToStringTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public new void ToString() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToString()); + }; + + t("0", 0); + t("0", "0"); + t("NaN", double.NaN); + t("NaN", "NaN"); + t("Infinity", double.PositiveInfinity); + t("Infinity", "Infinity"); + t("1", 1); + t("9", 9); + t("90", 90); + t("90.12", 90.12); + t("0.1", 0.1); + t("0.01", 0.01); + t("0.0123", 0.0123); + t("111111111111111111111", "111111111111111111111"); + t("1111111111111111111111", "1111111111111111111111"); + t("11111111111111111111111", "11111111111111111111111"); + t("0.00001", 0.00001); + t("0.000001", 0.000001); + + t("0", -0); + t("0", "-0"); + t("-Infinity", double.NegativeInfinity); + t("-Infinity", "-Infinity"); + t("-1", -1); + t("-9", -9); + t("-90", -90); + t("-90.12", -90.12); + t("-0.1", -0.1); + t("-0.01", -0.01); + t("-0.0123", -0.0123); + t("-111111111111111111111", "-111111111111111111111"); + t("-1111111111111111111111", "-1111111111111111111111"); + t("-11111111111111111111111", "-11111111111111111111111"); + t("-0.00001", -0.00001); + t("-0.000001", -0.000001); + + // Exponential format + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("1e-7", 0.0000001); + t("1.2e-7", 0.00000012); + t("1.23e-7", 0.000000123); + t("1e-8", 0.00000001); + t("1.2e-8", 0.000000012); + t("1.23e-8", 0.0000000123); + t("-1e-7", -0.0000001); + t("-1.2e-7", -0.00000012); + t("-1.23e-7", -0.000000123); + t("-1e-8", -0.00000001); + t("-1.2e-8", -0.000000012); + t("-1.23e-8", -0.0000000123); + + t("5.73447902457635174479825134e+14", "573447902457635.174479825134"); + t("1.07688e+1", "10.7688"); + t("3.171194102379077141557759899307946350455841e+27", "3171194102379077141557759899.307946350455841"); + t("4.924353466898191177698653319742594890634579e+37", "49243534668981911776986533197425948906.34579"); + t("6.85558243926569397328633907445409866949445343654692955e+18", "6855582439265693973.28633907445409866949445343654692955"); + t("1e+0", "1"); + t("2.1320000803e+7", "21320000.803"); + t("5.0878741e+4", "50878.741"); + t("5.1932898288391e+8", "519328982.88391"); + t("5.690616778176956027307884725933410349604387915634524e+49", "56906167781769560273078847259334103496043879156345.24"); + t("3.25099780528575457273246693147645e+15", "3250997805285754.572732466931476450"); + t("3e+0", "3"); + t("2.5811494197573291905990947355226e+13", "25811494197573.291905990947355226"); + t("5.60372259169833930471746454125e+13", "56037225916983.3930471746454125"); + t("1.2615810663732236602461593613783e+7", "12615810.663732236602461593613783"); + t("1.4654366449266911507705477499035407722184965108377032e+11", "146543664492.66911507705477499035407722184965108377032"); + t("6.4986735507448912857131832908423940757e+38", "649867355074489128571318329084239407570.0"); + t("3.6146989180120676857245474944e+3", "3614.6989180120676857245474944"); + t("9.928654762302286149994896625074e+4", "99286.54762302286149994896625074"); + t("3.46424170787806074650506079e+3", "3464.24170787806074650506079"); + t("1.25934313355319666474752550204680303068865719647e+33", "1259343133553196664747525502046803.03068865719647"); + t("1.23014105337660651106978059198916100450966081493207e+27", "1230141053376606511069780591.98916100450966081493207"); + t("1.386164712267169624993434287237e+23", "138616471226716962499343.4287237"); + t("2.66076369930322488334961932e+3", "2660.76369930322488334961932"); + t("9.37582568e+4", "93758.2568"); + t("1.39853642894726883996875746770529e+28", "13985364289472688399687574677.0529"); + t("3.19099e+5", "319099.0"); + t("3.04557106798789396303998723e+19", "30455710679878939630.3998723"); + t("1.3024612569115368830867934222004329653604418e+9", "1302461256.9115368830867934222004329653604418"); + t("2.358787483447172786e+5", "235878.7483447172786"); + t("5.10614446965318674547416709785208086304398889160563e+28", "51061444696531867454741670978.5208086304398889160563"); + t("1.46685947134456101512731611558e+23", "146685947134456101512731.6115580"); + t("3.69960105771344554151928256518906564810300119e+25", "36996010577134455415192825.6518906564810300119"); + t("2.68683153074628e+10", "26868315307.4628"); + t("2.35656504568492312232737219553793859212e+15", "2356565045684923.12232737219553793859212"); + t("7.753292442361215e+14", "775329244236121.5"); + t("1.56e+0", "1.56"); + t("1.272818730367215461852227991200704e+21", "1272818730367215461852.227991200704"); + t("1.13900700292988027871648046839423153789e+7", "11390070.0292988027871648046839423153789"); + t("3.3431e+0", "3.3431"); + t("1.4546654966819402705e+14", "145466549668194.02705"); + t("3.05345735395805567424714891401667575466462830113819e+48", "3053457353958055674247148914016675754664628301138.19"); + t("5.1218945854639324441304933666460587e+2", "512.18945854639324441304933666460587"); + t("9.95299900896e+5", "995299.9008960"); + t("1.21564537151562431991786620635e+0", "1.21564537151562431991786620635"); + t("4.016e+1", "40.16"); + t("1.86570326e+7", "18657032.6"); + t("1.3381001727e+5", "133810.01727"); + t("2.639841700687441886800225725227e+12", "2639841700687.441886800225725227"); + t("2.45e+0", "2.45"); + t("2.8945e+2", "289.45"); + t("1.23e+0", "1.23"); + t("1.559806666149836070330006415033e+24", "1559806666149836070330006.415033"); + t("3.14984566145310751826289711761375061645611777700983e+3", "3149.84566145310751826289711761375061645611777700983"); + t("3.0940691333892283249774116223987e+5", "309406.91333892283249774116223987"); + t("6.572766274013360381079275191108732606370177179594282e+5", "657276.6274013360381079275191108732606370177179594282"); + t("1.470126973337024e+6", "1470126.973337024"); + t("5.6499e+2", "564.99"); + t("2.8416297367859233303497847667971781197616950846e+28", "28416297367859233303497847667.971781197616950846"); + t("2.1364951568189836563102481625533538320051163977e+41", "213649515681898365631024816255335383200511.63977"); + t("8.76108618687537137080904679797e+19", "87610861868753713708.0904679797"); + t("6.27683573474251182408654509953633505286e+6", "6276835.73474251182408654509953633505286"); + t("8.91411e+0", "8.91411"); + t("9.034542832410912578330021146413119399e+28", "90345428324109125783300211464.13119399"); + t("7.026094393430852002585511641212897686956090955e+39", "7026094393430852002585511641212897686956.090955"); + t("1.8812221093491505758565988678062e+11", "188122210934.91505758565988678062"); + t("9.435538492497050138580201734902181057468044875e+43", "94355384924970501385802017349021810574680448.75"); + t("5.36793419620790391866461e+20", "536793419620790391866.461"); + t("2.315089265590404012562599592854156357726817712e+26", "231508926559040401256259959.2854156357726817712"); + t("7.499170741828885273030006066196546588710962e+17", "749917074182888527.3030006066196546588710962"); + t("3.3962128305986e+5", "339621.28305986"); + t("8.17980456510031304e+9", "8179804565.10031304"); + t("4.394575876858124185382e+13", "43945758768581.24185382"); + t("7.881617323629751701107428e+9", "7881617323.629751701107428"); + t("4.89e+0", "4.89"); + t("9.85209894663520857685703881781194082356123765e+39", "9852098946635208576857038817811940823561.23765"); + t("6.849329685e+5", "684932.9685"); + t("2.8262252277815736355279617243060700437627773361e+7", "28262252.277815736355279617243060700437627773361"); + t("1.503736721902e+9", "1503736721.902"); + t("2.65213505469049775997232325076980590625670234690917845e+41", "265213505469049775997232325076980590625670.234690917845"); + t("4.23752645959719196604760963802412828187442060555521e+2", "423.752645959719196604760963802412828187442060555521"); + t("9.023159535576504097005203913521871601640521009e+36", "9023159535576504097005203913521871601.640521009"); + t("4.69339457186380276410136272120035011198438772754725e+14", "469339457186380.276410136272120035011198438772754725"); + t("1.2819429130391792511503973184804508867728894e+6", "1281942.9130391792511503973184804508867728894"); + t("1.9778e+3", "1977.8"); + t("2.456680359828937628024631306792185367572610021e+43", "24566803598289376280246313067921853675726100.21"); + t("5.25389225018085571689046925802871155628e+1", "52.5389225018085571689046925802871155628"); + t("1.733700532107e+8", "173370053.2107"); + t("1.9561099921e+5", "195610.99921"); + t("3.3409e+2", "334.09"); + t("6.09858715556186e+0", "6.09858715556186"); + t("3.20634106832106387482375790792609337383007782520694e+24", "3206341068321063874823757.90792609337383007782520694"); + t("1.46347126003930100207988814e+20", "146347126003930100207.98881400"); + t("2.717780449744210117995586561524987067807146882e+43", "27177804497442101179955865615249870678071468.82"); + t("2.86757572635270377540170639151e+22", "28675757263527037754017.0639151"); + t("1.3488325541508602487577920722101277063863557818e+14", "134883255415086.02487577920722101277063863557818"); + t("1.96013732736436392e+13", "19601373273643.6392"); + t("4.798185890466e+2", "479.8185890466"); + t("1.696622337138949329874242519485119916519994150606e+39", "1696622337138949329874242519485119916519.994150606"); + t("5.50000572984970761183142593570950897913860587074643e+13", "55000057298497.0761183142593570950897913860587074643"); + t("4.9e+1", "49"); + t("2.353405108244768666141e+9", "2353405108.2447686661410"); + t("1.237978927714857736527530290155529e+0", "1.237978927714857736527530290155529"); + t("5.54113012e+1", "55.411301200"); + t("1.639709023131e+11", "163970902313.1"); + t("2.15324060127001207725970506357881e+19", "21532406012700120772.5970506357881"); + t("2.373532121822929762731612214095513784533409e+29", "237353212182292976273161221409.5513784533409"); + t("4.5883026736677354807679611737881799804e+16", "45883026736677354.807679611737881799804"); + t("2.5996714820346689325468319633061e+21", "2599671482034668932546.8319633061"); + t("8.22641928e+6", "8226419.280"); + t("2.56006014528479284199702229871263269e+20", "256006014528479284199.702229871263269"); + t("4.301260132991159779386275268219519443685e+24", "4301260132991159779386275.268219519443685"); + t("1.052721790360165649330888881e+22", "10527217903601656493308.88881"); + t("6.85257703973809064426443728e+0", "6.85257703973809064426443728"); + t("1.341206836e+5", "134120.6836"); + t("1.293696083809745995580141432072678134217648017629e+25", "12936960838097459955801414.32072678134217648017629"); + t("9.81886611183e+9", "9818866111.83"); + t("1.3e+1", "13"); + t("2.185212134168411755342025405260683400574952243371e+1", "21.8521213416841175534202540526068340057495224337100"); + t("5.09812942277266e+1", "50.9812942277266"); + t("1.15841228150473459450904593187073359993e+37", "11584122815047345945090459318707335999.3"); + t("2.946408e+1", "29.46408"); + t("7.8843253757257e+6", "7884325.3757257"); + t("4.149829532631829e+7", "41498295.32631829"); + t("9.76844406944663415436782518894675931581135161845733e+46", "97684440694466341543678251889467593158113516184.5733"); + t("1.320634109357604978481e+7", "13206341.09357604978481"); + t("1.2300117044692162331376535732386421937e+8", "123001170.44692162331376535732386421937"); + t("1.79343822239530391558796001578394154846951511735e+42", "1793438222395303915587960015783941548469515.11735"); + t("3.46227335968923941657647562338569e+7", "34622733.5968923941657647562338569"); + t("3.6081901133629252234652167e+18", "3608190113362925223.4652167"); + t("3.41769614577210353834283168068494e+24", "3417696145772103538342831.68068494"); + t("1.036693895e+8", "103669389.5"); + t("9.840862048026534392868878603161623504069221701e+27", "9840862048026534392868878603.161623504069221701"); + t("2.56437211238605e+10", "25643721123.86050"); + t("2.645333616435501e+6", "2645333.616435501"); + t("3.75834254646606787747061360998e+1", "37.5834254646606787747061360998"); + t("1.21582101247e+6", "1215821.01247"); + t("5.43e+1", "54.3"); + t("3.1461380403028457753654142032015e+27", "3146138040302845775365414203.2015"); + t("2.73039e+4", "27303.9"); + t("3.349112077000398203735762417e+25", "33491120770003982037357624.170"); + t("2.293912475527946909960963698602754526495697363e+31", "22939124755279469099609636986027.54526495697363"); + t("7.800578368e+8", "780057836.8"); + t("3.503304265046835170500513083432983735273e+28", "35033042650468351705005130834.32983735273"); + t("6.521027589563589728e+9", "6521027589.563589728"); + t("1.26604818273232e+3", "1266.04818273232"); + t("4.5844253800756959854340115e+7", "45844253.800756959854340115"); + t("2.5103887704609158215979351198183e+20", "251038877046091582159.79351198183"); + t("6.5170765018089001398157674630438543e+17", "651707650180890013.98157674630438543"); + t("7.85679659655762637941070216699747e+18", "7856796596557626379.41070216699747"); + t("6.55113755834849587145e+18", "6551137558348495871.45"); + t("1.37856413555592382324487860882977704999616e+32", "137856413555592382324487860882977.704999616"); + t("7.51530486314140193e+5", "751530.486314140193"); + t("1.3712642461229590011e+7", "13712642.4612295900110"); + t("8.945222111405724e+2", "894.5222111405724"); + t("1.74501389497524149414213254563953197394499747444317e+44", "174501389497524149414213254563953197394499747.444317"); + t("7.1583294041845987824307132e+11", "715832940418.45987824307132"); + t("1.282007923703783860923747442697572540049e+13", "12820079237037.83860923747442697572540049"); + t("5.660625174793381639446229222e+11", "566062517479.3381639446229222"); + t("2.094745267e+4", "20947.45267"); + t("8.4497877437844686621097450218313191175e+13", "84497877437844.6866210974502183131911750"); + t("1.707217105197425488000493702652714920318758323999364e+23", "170721710519742548800049.3702652714920318758323999364"); + t("2.5487434814078948112667918801256335353406914111636153e+36", "2548743481407894811266791880125633535.3406914111636153"); + t("7.975944255792483246376368330364e+8", "797594425.5792483246376368330364"); + t("1.1038710051127692465453332862048e+20", "110387100511276924654.53332862048"); + t("2.0214122542287381656860062564183697682e+13", "20214122542287.381656860062564183697682"); + t("7.853012025112e+4", "78530.12025112"); + t("7.97061651146928e+3", "7970.61651146928"); + t("1.5712956919727392305361179349388e+10", "15712956919.727392305361179349388"); + t("8.2480059e+3", "8248.0059"); + t("2.71929146422591231877279340940781443961397491e+19", "27192914642259123187.7279340940781443961397491"); + t("2.131e+2", "213.10"); + t("5.53443299017925367e+6", "5534432.99017925367"); + t("9.0599636453e+8", "905996364.53"); + t("2.86841011915001378943e+0", "2.86841011915001378943"); + t("3.50691916034642635201767965866239485795145676493e+28", "35069191603464263520176796586.6239485795145676493"); + t("1.20268235416561427028396813141142129291e+18", "1202682354165614270.283968131411421292910"); + t("4.8878729e+4", "48878.7290"); + t("9.04344910891e+4", "90434.4910891"); + t("3.87232843764031e+2", "387.232843764031"); + t("2.246212201353343e+11", "224621220135.33430"); + t("4.92916234816086643529027167741689023e+4", "49291.6234816086643529027167741689023"); + t("2.1773818234639052045922630496e+22", "21773818234639052045922.630496"); + t("4.78705362683815125848e+0", "4.787053626838151258480"); + t("2.700762078698436846755198719005e+28", "27007620786984368467551987190.05"); + t("3.04897901998664513240359358574664525651334171e+36", "3048979019986645132403593585746645256.51334171"); + t("3.807300704307638993582e+18", "3807300704307638993.582"); + t("7.9846840795076707340124614425632613353204e+3", "7984.6840795076707340124614425632613353204"); + t("6.69918558928e+4", "66991.8558928"); + t("5.11e+1", "51.1"); + t("1.8e+1", "18"); + t("2.629676971e+2", "262.9676971"); + t("6.8402048967767212280354493672372347369800788279670097e+39", "6840204896776721228035449367237234736980.0788279670097"); + t("4.684145127602661593941009299096573092581e+21", "4684145127602661593941.009299096573092581"); + t("1.3010133600355313564757759338788842e+18", "1301013360035531356.4757759338788842"); + t("1.58527974113934732993372979240170059e+30", "1585279741139347329933729792401.70059"); + t("1.8249338722142728063286e+2", "182.49338722142728063286"); + t("1.5941e+0", "1.59410"); + t("2.0337546838170082473539926326926478252219475e+29", "203375468381700824735399263269.26478252219475"); + t("4.626173e+3", "4626.173"); + t("6.04857e+0", "6.04857"); + t("9.55039030589038069713466331e+0", "9.55039030589038069713466331"); + t("3.13977842e+6", "3139778.42"); + t("4.4046554138751e+10", "44046554138.751"); + t("2.27133088062335544441002965096e+25", "22713308806233554444100296.5096"); + t("1.72895143e+4", "17289.5143"); + t("2.59665963383099309886519729836757e+20", "259665963383099309886.5197298367570"); + t("5.42804375404301025317704270939778493719619031067122726e+24", "5428043754043010253177042.70939778493719619031067122726"); + t("4.0526054186532354119711729303068171063825508e+2", "405.26054186532354119711729303068171063825508"); + t("1.26960267394273418410687782475849e+9", "1269602673.94273418410687782475849"); + t("5.657206212494798707700546288522044895183104747814298e+7", "56572062.12494798707700546288522044895183104747814298"); + t("4.80834664047405196104320584899449259286e+21", "4808346640474051961043.20584899449259286"); + t("5.6639294733687553228095e+12", "5663929473368.7553228095"); + t("3.08469899797006019074738182718775120203832280411e+44", "308469899797006019074738182718775120203832280.4110"); + t("6.7324018330891115163882850963905830707247414517739e+20", "673240183308911151638.82850963905830707247414517739"); + t("7.8e+1", "78"); + t("3.7511576e+4", "37511.576"); + t("4.9744737445922007872559411117007e+20", "497447374459220078725.59411117007"); + t("1.4264855114407053894401398660016825255242638071603e+2", "142.64855114407053894401398660016825255242638071603"); + t("1.7972e+1", "17.972"); + t("1.08223075909551421423442320791403363148864e+12", "1082230759095.51421423442320791403363148864"); + t("1.27992032328728568e+16", "12799203232872856.8"); + t("3.23410998756876789482263723951851692122375679e+9", "3234109987.56876789482263723951851692122375679"); + t("8.309058187826413886051933894555524364e+5", "830905.8187826413886051933894555524364"); + t("5.9126904485324084868266487306831291316268437628598e+40", "59126904485324084868266487306831291316268.437628598"); + t("3.579918283412251816470339246643e+16", "35799182834122518.16470339246643"); + t("8.292403288e+1", "82.92403288"); + t("7.39431e+2", "739.431"); + t("3.880259e+2", "388.0259"); + t("8.356612898392420429137009991722851e+18", "8356612898392420429.137009991722851"); + t("5.395903069e+4", "53959.03069"); + t("2.084656696443025813e+12", "2084656696443.025813"); + t("7.54671420639507228408101673007042651462774881888e+46", "75467142063950722840810167300704265146277488188.8"); + t("6.9e+1", "69"); + t("8.921e+2", "892.10"); + t("2.51196408e+4", "25119.6408"); + t("4.2502325992166027236666111862782e+15", "4250232599216602.7236666111862782"); + t("1.48181688637265610577148846528720697801886e+17", "148181688637265610.577148846528720697801886"); + t("6.578849006577789439801702e+0", "6.578849006577789439801702"); + t("4.346905625146927213132990652e+22", "43469056251469272131329.90652"); + t("5.5037893e+0", "5.5037893"); + t("2.47731675267438120023934691987e+15", "2477316752674381.20023934691987"); + t("3.37487366652276710575333974697197457e+9", "3374873666.52276710575333974697197457"); + t("1.0385387059229329627650733271e+0", "1.0385387059229329627650733271"); + t("9.83004944893186643985967600066862369294062e+17", "983004944893186643.985967600066862369294062"); + t("4.24581658127100743607231740518633563667839856744e+26", "424581658127100743607231740.518633563667839856744"); + t("3.14222253457223322124561584676953981561133e+2", "314.222253457223322124561584676953981561133"); + t("1.1553833141891499623566322265502695096447390786748e+48", "1155383314189149962356632226550269509644739078674.8"); + t("5.2811e+1", "52.811"); + t("9.925202445922857021945001443270353221818473047344e+2", "992.5202445922857021945001443270353221818473047344"); + t("1.5758941e+4", "15758.9410"); + t("6.6630010328564980059488916358767e+30", "6663001032856498005948891635876.7"); + t("1.49898377473153728100588907982263779724221092732531e+44", "149898377473153728100588907982263779724221092.732531"); + t("4.175238908185616536855e+20", "417523890818561653685.5"); + t("1.192838736272799853174021036238e+21", "1192838736272799853174.021036238"); + t("1.145038e+3", "1145.038"); + t("4.0973786626728889384598402998014750474268e+9", "4097378662.6728889384598402998014750474268"); + t("5.5038104e+4", "55038.104"); + t("6.83895535917805849194871290958068199407518e+2", "683.895535917805849194871290958068199407518"); + t("2.9716066182e+0", "2.9716066182"); + t("1e+0", "1"); + t("1.78063428481384259205331358231117935e+0", "1.780634284813842592053313582311179350"); + t("6.277714976103425712837719e+22", "62777149761034257128377.1900"); + t("1.37376909692642287134486582232200547809845780076e+26", "137376909692642287134486582.232200547809845780076"); + t("7.0255659498942180908195e+16", "70255659498942180.908195"); + t("1.36758412477e+6", "1367584.12477"); + t("2.8993016541323392639291954727329719281958174e+23", "289930165413233926392919.54727329719281958174"); + t("2.44e+0", "2.44"); + t("5.39870374073212675286058196342904027304008232e+40", "53987037407321267528605819634290402730400.8232"); + t("6.4507160654825e+9", "6450716065.4825"); + t("1.21664e+3", "1216.64"); + t("3.13108416362400780440861428855476299376486503e+0", "3.13108416362400780440861428855476299376486503"); + t("7.2960499529336221198242592384915903149558006256202995e+17", "729604995293362211.98242592384915903149558006256202995"); + t("5.67239328846178836850536139916737284448973e+0", "5.67239328846178836850536139916737284448973"); + t("7.20020305957519743064e+3", "7200.203059575197430640"); + t("1.85115423780064073715032545790701546649748120114e+27", "1851154237800640737150325457.90701546649748120114"); + t("1.25021250836778893386687012660759710902e+21", "1250212508367788933866.87012660759710902"); + t("2.3323707491301665555664068537483355865980611e+25", "23323707491301665555664068.5374833558659806110"); + t("2.5088131581298507401113299236e+4", "25088.131581298507401113299236"); + t("9.612326850563943155774866e+17", "961232685056394315.5774866"); + t("1.54114517176248297154289225338049499367447824e+22", "15411451717624829715428.9225338049499367447824"); + t("5.22e+0", "5.22"); + t("4.04698305476309533783897e+21", "4046983054763095337838.97"); + t("2.620876536774240989563272117908814902188002596311e+24", "2620876536774240989563272.117908814902188002596311"); + t("1.7290754650750439926458970782158e+10", "17290754650.750439926458970782158"); + t("8.570789332248e+6", "8570789.332248"); + t("1.21e+1", "12.1"); + t("9.749134061639126502181192178140679940393318673720443e+45", "9749134061639126502181192178140679940393318673.720443"); + t("1.26878e+5", "126878.0"); + t("1.2391599841950849289559651456348e+9", "1239159984.1950849289559651456348"); + t("1.72220118427662724614289256133342842086e+22", "17222011842766272461428.9256133342842086"); + t("1.512063585971680294584184272035496e+15", "1512063585971680.294584184272035496"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalTrancTests.cs b/DecimalSharp.Tests/BigDecimalTrancTests.cs new file mode 100644 index 0000000..f1956fe --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalTrancTests.cs @@ -0,0 +1,143 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalTranc")] + public class BigDecimalTrancTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Tranc() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-1e3, + ToExpPos = (long)1e3, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).Trunc().ValueOf()); + }; + + t("0", 0); + t("-0", "-0"); + t("0", "0.000"); + t("Infinity", double.PositiveInfinity); + t("-Infinity", double.NegativeInfinity); + t("NaN", double.NaN); + + t("0", 0.1); + t("0", "0.49999999999999994"); + t("0", 0.5); + t("0", 0.7); + t("-0", -0.1); + t("-0", "-0.49999999999999994"); + t("-0", -0.5); + t("-0", -0.7); + t("1", 1); + t("1", 1.1); + t("1", 1.5); + t("1", 1.7); + t("-1", -1); + t("-1", -1.1); + t("-1", -1.5); + t("-1", -1.7); + + t("1", "1.9999999999"); + t("-1", "-1.9999999999"); + + t("-2075364", "-2075364.364286541923"); + t("60593539780450631", "60593539780450631"); + t("65937898671515", "65937898671515"); + t("-39719494751819198566798", "-39719494751819198566798.578"); + t("92627382695288166556", "92627382695288166556.8683774524284866028260448205069"); + t("-881574", "-881574"); + t("-3633239209", "-3633239209.654526163275621746013315304191073405508491056"); + t("-23970335459820625362", "-23970335459820625362"); + t("131869457416154038", "131869457416154038"); + t("-4542227860", "-4542227860.9511298545226"); + t("2416872281", "2416872281.963955669484225137349193306323379254936827"); + t("-757684868752087594264588207655", "-757684868752087594264588207655.27838048392835556"); + t("-438798503526", "-438798503526.2317623894721299587561697"); + t("801625782231888715214665", "801625782231888715214665"); + t("327765350218284325239839632046", "327765350218284325239839632046.91682741746683081459605386"); + t("-7469045007691432294", "-7469045007691432294.362757245"); + t("8365540212937142194319515218789", "8365540212937142194319515218789.4106658678537421977827"); + t("-14108", "-14108.495051214515"); + t("49104501", "49104501.10055989379655329194309526150310568683504206945625"); + t("131370406", "131370406.330005158136313262837556068534122953"); + t("-689", "-689.6944252229740521128820354989299283"); + t("73441822178", "73441822178.572653"); + t("-2329", "-2329.42655772223486531483602927572548264457"); + t("-834103872107533086", "-834103872107533086"); + t("-1501493189970435", "-1501493189970435.74866616700317"); + t("70591", "70591.2244675522123484658978887"); + t("4446128540401735117", "4446128540401735117.435836700611264749985822486641350492901"); + t("-597273", "-597273"); + t("729117", "729117"); + t("-6581532150677269472829", "-6581532150677269472829.38194951340848938896000325718062365494"); + t("-131279182164804751", "-131279182164804751.430589952021038264"); + t("2949426983040959", "2949426983040959.8911208825380208568451907"); + t("25166", "25166.125888418871654557352055849116604612621573251770362"); + t("4560569286495", "4560569286495.98300685103599898554605198"); + t("13", "13.763105480576616251068323541559825687"); + t("9050999219306", "9050999219306.7846946346757664893036971777"); + t("20962819101135667464733349383", "20962819101135667464733349383.8959025798517496777183"); + t("4125789711001606948191", "4125789711001606948191.4707575965791242737346836"); + t("-6935501", "-6935501.294727166142750626019282"); + t("-1", "-1.518418076611593764852321765899"); + t("6912783515683955988122411164548", "6912783515683955988122411164548.393"); + t("657", "657.0353902852"); + t("0", "0.00000000000000000000000017921822306362413915"); + t("1483059355427939255846407887", "1483059355427939255846407887.011361095342689876"); + t("8551283060956479352", "8551283060956479352.5707396"); + t("0", "0.000000000000000000000000019904267"); + t("321978830777554620127500539", "321978830777554620127500539.339278568133088682532238002577"); + t("2073", "2073.532654804291079327244387978249477171032485250998396"); + t("677676305591", "677676305591.2"); + t("0", "0.0000000000006"); + t("39181479479778357", "39181479479778357"); + t("0", "0.00000000000000000087964700066672916651"); + t("896", "896"); + t("115083055948552475", "115083055948552475"); + t("9105942082143427451223", "9105942082143427451223"); + t("0", "0.0000000000000009"); + t("0", "0.00000000000000000000004"); + t("0", "0.000250427721966583680168028884692015623739"); + t("0", "0.000000000001585613219016120158734661293405081934"); + t("0", "0.000000090358252973411013592234"); + t("276312604693909858427", "276312604693909858427.21965306055697011390137926559"); + t("0", "0.0000252"); + + bigDecimalFactory.Config.ToExpNeg = -100; + bigDecimalFactory.Config.ToExpPos = 100; + + t("-0", -1e-308); + t("-1e+308", -1e308); + t("2.1e+308", "2.1e308"); + t("-0", "-1e-999"); + t("0", "1e-999"); + t("0", "1e-9000000000000000"); + t("-0", "-1e-9000000000000000"); + t("-0", "-9.9e-9000000000000001"); // underflow to zero + t("9.999999e+9000000000000000", "9.999999e+9000000000000000"); + t("-9.999999e+9000000000000000", "-9.999999e+9000000000000000"); + t("Infinity", "1E9000000000000001"); + t("-Infinity", "-1e+9000000000000001"); + t("5.5879983320336874473209567979e+287894365", "5.5879983320336874473209567979e+287894365"); + t("-5.5879983320336874473209567979e+287894365", "-5.5879983320336874473209567979e+287894365"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/BigDecimalValueOfTests.cs b/DecimalSharp.Tests/BigDecimalValueOfTests.cs new file mode 100644 index 0000000..fa8181c --- /dev/null +++ b/DecimalSharp.Tests/BigDecimalValueOfTests.cs @@ -0,0 +1,82 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests +{ + [TestFixture, Category("BigDecimalValueOf")] + public class BigDecimalValueOfTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ValueOf() + { + var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15, + MaxE = (long)9e15, + MinE = (long)-9e15 + }); + + var t = (string expected, BigDecimalArgument n) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ValueOf()); + }; + + t("0", 0); + t("0", "0"); + t("NaN", double.NaN); + t("NaN", "NaN"); + t("Infinity", double.PositiveInfinity); + t("Infinity", "Infinity"); + t("1", 1); + t("9", 9); + t("90", 90); + t("90.12", 90.12); + t("0.1", 0.1); + t("0.01", 0.01); + t("0.0123", 0.0123); + t("111111111111111111111", "111111111111111111111"); + t("0.00001", 0.00001); + + t("-0", "-0"); + t("-Infinity", double.NegativeInfinity); + t("-Infinity", "-Infinity"); + t("-1", -1); + t("-9", -9); + t("-90", -90); + t("-90.12", -90.12); + t("-0.1", -0.1); + t("-0.01", -0.01); + t("-0.0123", -0.0123); + t("-111111111111111111111", "-111111111111111111111"); + t("-0.00001", -0.00001); + + // Exponential format + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("1e-7", 0.0000001); + t("1.23e-7", 0.000000123); + t("1.2e-8", 0.000000012); + t("-1e-7", -0.0000001); + t("-1.23e-7", -0.000000123); + t("-1.2e-8", -0.000000012); + + t("5.73447902457635174479825134e+14", "573447902457635.174479825134"); + t("1.07688e+1", "10.7688"); + t("3.171194102379077141557759899307946350455841e+27", "3171194102379077141557759899.307946350455841"); + t("4.924353466898191177698653319742594890634579e+37", "49243534668981911776986533197425948906.34579"); + t("6.85558243926569397328633907445409866949445343654692955e+18", "6855582439265693973.28633907445409866949445343654692955"); + t("1e+0", "1"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/DecimalSharp.Tests.csproj b/DecimalSharp.Tests/DecimalSharp.Tests.csproj new file mode 100644 index 0000000..00d08d8 --- /dev/null +++ b/DecimalSharp.Tests/DecimalSharp.Tests.csproj @@ -0,0 +1,22 @@ + + + + net6.0 + enable + + false + + + + + + + + + + + + + + + diff --git a/DecimalSharp.Tests/Extensions/NumberExtensions.cs b/DecimalSharp.Tests/Extensions/NumberExtensions.cs new file mode 100644 index 0000000..8dcd30d --- /dev/null +++ b/DecimalSharp.Tests/Extensions/NumberExtensions.cs @@ -0,0 +1,73 @@ +using System; +using System.Globalization; + +namespace DecimalSharp.Tests.Extensions +{ + internal static class NumberExtensions + { + public static string ToExponential(this double? value, int? fractionDigits = null) + { + if (!value.HasValue) return ""; + + return value.Value.ToExponential(fractionDigits); + } + + public static string ToExponential(this double value, int? fractionDigits = null) + { + if (!fractionDigits.HasValue) + { + return value.ToString("0.####################e+0", CultureInfo.InvariantCulture); + } + + return value.ToString("0." + string.Empty.PadRight(fractionDigits.Value, '0') + "e+0", CultureInfo.InvariantCulture); + } + + public static string ToString(this int num, int @base) + { + return DecimalToArbitrarySystem(num, @base); + } + + public static string ToString(this long num, int @base) + { + return DecimalToArbitrarySystem(num, @base); + } + + /// + /// Converts the given decimal number to the numeral system with the + /// specified radix (in the range [2, 36]). + /// + /// The number to convert. + /// The radix of the destination numeral system (in the range [2, 36]). + /// + private static string DecimalToArbitrarySystem(long decimalNumber, int radix) + { + const int BitsInLong = 64; + const string Digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + if (radix < 2 || radix > Digits.Length) + throw new ArgumentException("The radix must be >= 2 and <= " + Digits.Length.ToString()); + + if (decimalNumber == 0) + return "0"; + + int index = BitsInLong - 1; + long currentNumber = Math.Abs(decimalNumber); + char[] charArray = new char[BitsInLong]; + + while (currentNumber != 0) + { + int remainder = (int)(currentNumber % radix); + charArray[index--] = Digits[remainder]; + currentNumber = currentNumber / radix; + } + + string result = new string(charArray, index + 1, BitsInLong - index - 1); + if (decimalNumber < 0) + { + result = "-" + result; + } + + return result.ToLowerInvariant(); + } + } +} diff --git a/DecimalSharp.Tests/Extensions/StringExtensions.cs b/DecimalSharp.Tests/Extensions/StringExtensions.cs new file mode 100644 index 0000000..51e041d --- /dev/null +++ b/DecimalSharp.Tests/Extensions/StringExtensions.cs @@ -0,0 +1,15 @@ +namespace DecimalSharp.Tests.Extensions +{ + internal static class StringExtensions + { + internal static string Slice(this string str, int start = 0, int end = 0) + { + if (start >= str.Length) return ""; + + if (end == 0) end = str.Length; + if (end > str.Length) end = str.Length; + + return str.Substring(start, end - start); + } + } +} diff --git a/DecimalSharp.Tests/Light/BigDecimalLightAbsTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightAbsTests.cs new file mode 100644 index 0000000..a7f8298 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightAbsTests.cs @@ -0,0 +1,130 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightAbs")] + public class BigDecimalLightAbsTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Abs() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21 + }); + + var t = (string expected, BigDecimalArgument value) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(value).Abs().ValueOf()); + }; + + t("0", 0); + t("0", "0"); + t("0", -0); + t("0", "-0"); + t("1", 1); + t("1", -1); + t("1", "-1"); + t("0.5", "0.5"); + t("0.5", "-0.5"); + t("0.1", 0.1); + t("0.1", -0.1); + t("1.1", 1.1); + t("1.1", -1.1); + t("1.5", "1.5"); + t("1.5", "-1.5"); + + t("0.00001", "-1e-5"); + t("9000000000", "-9e9"); + t("123456.7891011", "123456.7891011"); + t("123456.7891011", -123456.7891011); + t("99", "99"); + t("99", -99); + t("999.999", 999.999); + t("999.999", "-999.999"); + t("1", bigDecimalFactory.BigDecimal(-1)); + t("1", bigDecimalFactory.BigDecimal("-1")); + t("0.001", bigDecimalFactory.BigDecimal(0.001)); + t("0.001", bigDecimalFactory.BigDecimal("-0.001")); + + t("11.121", "11.121"); + t("0.023842", "-0.023842"); + t("1.19", "-1.19"); + t("9.622e-11", "-0.00000000009622"); + t("5.09e-10", "-0.000000000509"); + t("3838.2", "3838.2"); + t("127", "127.0"); + t("4.23073", "4.23073"); + t("2.5469", "-2.5469"); + t("29949", "-29949"); + t("277.1", "-277.10"); + t("4.97898e-15", "-0.00000000000000497898"); + t("53.456", "53.456"); + t("100564", "-100564"); + t("12431.9", "-12431.9"); + t("97633.7", "-97633.7"); + t("220", "220"); + t("18.72", "18.720"); + t("2817", "-2817"); + t("44535", "-44535"); + + bigDecimalFactory.Config.ToExpPos = 0; + bigDecimalFactory.Config.ToExpNeg = 0; + + t("5.2452468128e+1", "-5.2452468128e+1"); + t("1.41525905257189365008396e+16", "1.41525905257189365008396e+16"); + t("2.743068083928e+11", "2.743068083928e+11"); + t("1.52993064722314247378724599e+26", "-1.52993064722314247378724599e+26"); + t("3.7205576746e+10", "3.7205576746e+10"); + t("2.663e-10", "-2.663e-10"); + t("1.26574209965030360615518e+17", "-1.26574209965030360615518e+17"); + t("1.052e+3", "1.052e+3"); + t("4.452945872502e+6", "-4.452945872502e+6"); + t("2.95732460816619226e+13", "2.95732460816619226e+13"); + t("1.1923100194288654481424e+18", "-1.1923100194288654481424e+18"); + t("8.99315449050893705e+6", "8.99315449050893705e+6"); + t("5.200726538434486963e+8", "5.200726538434486963e+8"); + t("1.182618278949368566264898065e+18", "1.182618278949368566264898065e+18"); + t("3.815873266712e-20", "-3.815873266712e-20"); + t("1.316675370382742615e+6", "-1.316675370382742615e+6"); + t("2.1032502e+6", "-2.1032502e+6"); + t("1.8e+1", "1.8e+1"); + t("1.033525906631680944018544811261e-13", "1.033525906631680944018544811261e-13"); + t("1.102361746443461856816e+14", "-1.102361746443461856816e+14"); + t("8.595358491143959e+1", "8.595358491143959e+1"); + t("1.226806049797304683867e-18", "1.226806049797304683867e-18"); + t("5e+0", "-5e+0"); + t("1.091168788407093537887970016e+15", "-1.091168788407093537887970016e+15"); + t("3.87166413612272027e+12", "3.87166413612272027e+12"); + t("1.411514e+5", "1.411514e+5"); + t("1.0053454672509859631996e+22", "1.0053454672509859631996e+22"); + t("6.9265714e+0", "6.9265714e+0"); + t("1.04627709e+4", "1.04627709e+4"); + t("2.285650225267766689304972e+5", "2.285650225267766689304972e+5"); + t("4.5790517211306242e+7", "4.5790517211306242e+7"); + t("3.0033340092338313923473428e+16", "-3.0033340092338313923473428e+16"); + t("2.83879929283797623e+1", "-2.83879929283797623e+1"); + t("4.5266377717178121183759377414e-5", "4.5266377717178121183759377414e-5"); + t("5.3781e+4", "-5.3781e+4"); + t("6.722035208213298413522819127e-18", "-6.722035208213298413522819127e-18"); + t("3.02865707828281230987116e+23", "-3.02865707828281230987116e+23"); + + t("1e-9000000000000000", "1e-9000000000000000"); + t("1e-9000000000000000", "-1e-9000000000000000"); + t("9.999999e+9000000000000000", "9.999999e+9000000000000000"); + t("9.999999e+9000000000000000", "-9.999999e+9000000000000000"); + t("5.5879983320336874473209567979e+287894365", "-5.5879983320336874473209567979e+287894365"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightCmpTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightCmpTests.cs new file mode 100644 index 0000000..ab72517 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightCmpTests.cs @@ -0,0 +1,996 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightCmp")] + public class BigDecimalLightCmpTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Cmp() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (BigDecimalArgument a, BigDecimalArgument b, int? expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(a).Cmp(b)); + }; + + t(1, 0, 1); + t(1, "-0", 1); + t(-1, 0, -1); + t(-1, "-0", -1); + t(0, 1, -1); + t(0, -1, 1); + t("-0", 1, -1); + t("-0", -1, 1); + t(0, 0, 0); + t(0, "-0", 0); + t("-0", 0, 0); + t(-0, "-0", 0); + t(0, "0.1", -1); + t(0, "-0.1", 1); + t("-0", "0.1", -1); + t("-0", "-0.1", 1); + t("0.1", 0, 1); + t("0.1", "-0", 1); + t("-0.1", 0, -1); + t("-0.1", "-0", -1); + + t(0, "0.000000009", -1); + t(0, "-0.000000009", 1); + t("-0", "0.000000009", -1); + t("-0", "-0.000000009", 1); + t("0.000000009", 0, 1); + t("0.000000009", "-0", 1); + t("-0.000000009", 0, -1); + t("-0.000000009", "-0", -1); + t(0, "5.5", -1); + t(0, "-5.5", 1); + t("-0", "5.5", -1); + t("-0", "-5.5", 1); + t("5.5", 0, 1); + t("5.5", "-0", 1); + t("-5.5", 0, -1); + t("-5.5", "-0", -1); + t(1, "0", 1); + t(1, "1", 0); + t(1, "-45", 1); + t(1, "22", -1); + t(1, 0144, -1); + t(1, "0144", -1); + t(1, "6.1915", -1); + t(1, "-1.02", 1); + t(1, "0.09", 1); + t(1, "-0.0001", 1); + t(1, "8e5", -1); + t(1, "9E12", -1); + t(1, "1e-14", 1); + t(1, "3.345E-9", 1); + t(1, "-345.43e+4", 1); + t(1, "-94.12E+0", 1); + t("0", "0", 0); + t(3, "-0", 1); + t(9.654, 0, 1); + t(0, "111.1111111110000", -1); + t(-1, 1, -1); + t(-0.01, 0.01, -1); + t(54, -54, 1); + t(9.99, "-9.99", 1); + t("0.0000023432495704937", "-0.0000023432495704937", 1); + t(100, 100, 0); + t(-999.99, "0.01", -1); + t("03.333", -4, 1); + t(-1, -0.1, -1); + t(43534.5435, "0.054645", 1); + t("99999", "1", 1); + t(0.04, 0.079393068, -1); + t(0.023, 0.04840192819, -1); + t(0.021879, 0.02, 1); + + t("0", "-7502", 1); + t("-1", "-0.000000000000000000295176", -1); + t("2.9", "3.23360", -1); + t("1.14", "4289", -1); + t("-3", "0", -1); + t("0.00000000000000551", "-3958.43", 1); + t("-13", "0", -1); + t("-23.382", "-16.1", -1); + t("-176.85", "0", -1); + t("1.38497", "-0.0000000561", 1); + t("3.90", "18.124", -1); + t("-239.52", "-0.00000000000066862", -1); + t("5.7", "2248.28", -1); + t("-0.00000000012", "0", -1); + t("29", "-5", 1); + t("0", "-54", 1); + t("3", "-1.1", 1); + t("-461.9", "-13803", 1); + t("-1", "0.00054428", -1); + t("-0.000000000000000683", "7", -1); + t("2", "1", 1); + t("118.608", "-4.8", 1); + t("3", "0", 1); + t("83.5", "44.9", 1); + t("-3", "-2.86", -1); + t("1138.06", "47.08", 1); + t("-2.3", "3", -1); + t("-848", "0", -1); + t("5", "2", 1); + t("11.3", "-176.3", 1); + t("-302142", "3.8", -1); + t("-9", "-38", 1); + t("0", "-1", 1); + t("6161", "-3", 1); + t("8", "0", 1); + t("-1334", "-14", -1); + t("3.593", "0.000000000000059975", 1); + t("0.0000000000000000847", "-1186.11", 1); + t("4.62", "14.47", -1); + t("0", "-319", 1); + t("23168", "8.3485", 1); + t("-16", "-1.6", -1); + t("64.3", "2108.4", -1); + t("4", "-1", 1); + t("-0.50346", "-319.6", 1); + t("10910.0", "-0.00000000000000000314208", 1); + t("1", "0", 1); + t("-0.0000000000000552", "0.00000000015", -1); + t("0", "16", -1); + t("38.4", "35.83", 1); + t("-1.1", "-0.000002850", -1); + t("0.000000000000011", "1.2", -1); + t("-50.66", "2.2", -1); + t("-1187", "5", -1); + t("174", "-1.8175", 1); + t("651.1", "-11.332", 1); + t("-1", "-0.000000000000000011", -1); + t("7156", "4.84", 1); + t("1", "3", -1); + t("0", "77487", -1); + t("51.7181", "17", 1); + t("13.132", "0.000000000000029446", 1); + t("5.4", "0.000000000000000006325", 1); + t("4.1", "-2.42", 1); + t("-5.2", "-44.1", 1); + t("-6", "15.018", -1); + t("-27.949", "-1170.9", 1); + t("0", "0.0000000000000000120", -1); + t("-3.7", "-52.1", 1); + t("-17.43", "0", -1); + t("-1.4", "-11737", 1); + t("-7.17", "615.40", -1); + t("-1", "-0.000000000000000389", -1); + t("0", "-11.7", 1); + t("0", "-0.0000039894", 1); + t("-14.15", "-0.0000011139", -1); + t("-16260", "-3.97", -1); + t("-0.00000066", "-1.3", 1); + t("-818", "0", -1); + t("-3", "-30020.5", 1); + t("-3.328", "-28.16", 1); + t("-74", "2", -1); + t("-30332", "-1.61", -1); + t("-0.00000000000000494", "0", -1); + t("-2.1", "11.6037", -1); + t("-0.0000000000000013762", "-5273", 1); + t("-0.00000000000000000002353", "1188", -1); + t("-0.00000000000000033619", "-4", 1); + t("3.2", "-597.81", 1); + t("14265", "0", 1); + t("-18.8703", "1", -1); + t("-4.5", "-146.5", 1); + t("-259.7", "0", -1); + t("-72.57", "4.3", -1); + t("0.0000015", "9.06", -1); + t("490815", "0.0000000000000000000385", 1); + t("0.614", "-0.000000000000000001154", 1); + t("1.2", "0", 1); + t("-1.8", "-436269", 1); + t("0", "-7", 1); + t("-3.18290", "-453.85", 1); + t("5.645", "1", 1); + t("8.426", "1.0", 1); + t("-6702", "-0.000003053", -1); + t("0", "-0.0000000472", 1); + t("-13.789", "0.12167", -1); + t("0", "-22472", 1); + t("769.0", "0.00000019970", 1); + t("0", "-145.1", 1); + t("-307", "-1", -1); + t("1", "-0.000015", 1); + t("3", "-4", 1); + t("7", "3.791", 1); + t("-0.0000000000000021", "0.00000414", -1); + t("-2", "0.0486", -1); + t("-4", "-0.00268", -1); + t("0.0000000000791", "-4.97", 1); + t("-13795", "3", -1); + t("-13.197", "0", -1); + t("0", "-4.7", 1); + t("3.7", "0", 1); + t("10.3925", "7.312", 1); + t("2.263", "7.388", -1); + t("-6.0", "-2", -1); + t("1", "-1", 1); + t("1.987", "32454", -1); + t("-0.361", "-200.6", 1); + t("5.0", "-7", 1); + t("-6.2", "-0.0056", -1); + t("-3.8", "1", -1); + t("-9.3", "-7.64", -1); + t("38364", "-127.311", 1); + t("-1.6", "-3.06", 1); + t("1", "-2", 1); + t("3.952", "5", -1); + t("566", "125.359", 1); + t("1078.97", "496", 1); + t("0.000000000097586", "-0.000000000000000000027457", 1); + t("-37.5", "-28572", 1); + t("412", "-0.0000000000000001572", 1); + t("0.00000024221", "-35.8881", 1); + t("25.8", "0.0000000000000000000242", 1); + t("0.30", "0", 1); + t("-26.440", "-3.64", -1); + t("1.15", "-3229", 1); + t("-137.1", "2", -1); + t("0.00000000077", "53558", -1); + t("0", "2.6", -1); + t("-3", "-6", 1); + t("-0.0000000000000000139", "-0.0005289", 1); + t("-0.00000000000000000697", "-1.309", 1); + t("-0.0000045", "-8.3", 1); + t("-2", "-1.3", -1); + t("-1.42209", "-1.74", 1); + t("-608.88", "25.3", -1); + t("0", "-1", 1); + t("5.6", "-4", 1); + t("7.17", "-4", 1); + t("56.6", "8218.4", -1); + t("68.33", "0", 1); + t("5.0", "1", 1); + t("32.734", "-9", 1); + t("0", "20837.0", -1); + t("-0.0000000000000000013950", "-3364.72", 1); + t("3.66", "-0.0000000000000000536", 1); + t("-1471.14", "6", -1); + t("0", "-0.0000013", 1); + t("1", "-5", 1); + t("-10449.8", "-58.424", -1); + t("0", "0.0000000000000000017122", -1); + t("0.000000000000026585", "4.1", -1); + t("-7", "0.00000000000000000920", -1); + t("0.00000000489", "0.00000000000000000036325", 1); + t("0", "104674", -1); + t("-1.30063", "0.000000004051", -1); + t("0", "2", -1); + t("-3", "0.00150", -1); + t("-407.95", "495.290", -1); + t("24533.8", "-2539", 1); + t("1", "0", 1); + t("-43.4", "0", -1); + t("-1399", "16.89", -1); + t("-232480", "0", -1); + t("3", "-1", 1); + t("6.2", "12.2", -1); + t("-23.38", "0.0853", -1); + t("-18.2", "1", -1); + t("0.002118", "-16.9821", 1); + t("8819.2", "28.744", 1); + t("-2", "-5", 1); + t("-2.10", "9.2620", -1); + t("0", "-5", 1); + t("23963.9", "0", 1); + t("-0.00000045", "0", -1); + t("2", "2", 0); + t("-3.444", "3", -1); + t("0.0000016140", "1.5132", -1); + t("0", "-1", 1); + t("-1", "-7", 1); + t("1", "-869.7", 1); + t("0.000000000000016", "-1609.8", 1); + t("651.3", "2.923", 1); + t("270.901", "5.2", 1); + t("0", "-2.6", 1); + t("0.000000000020617", "0.0000000096018", -1); + t("4.32", "-7", 1); + t("-1.5", "-23.7", 1); + t("1.2497", "-58.42", 1); + t("-6.4", "2.24", -1); + t("0", "1002.3", -1); + t("265.64", "26.7", 1); + t("387.4", "757.85", -1); + t("0", "6.525", -1); + t("1120.24", "-0.000000000000000000232098", 1); + t("67.22", "0", 1); + t("67", "-3.1", 1); + t("-1.01", "0.00059917", -1); + t("-0.000000000000091884", "2.7", -1); + t("171", "4", 1); + t("0", "-367347", 1); + t("95.1", "-0.000000114267", 1); + t("62.4", "-5", 1); + t("11627.8", "9.844", 1); + t("-1", "2.33", -1); + t("-14", "0", -1); + t("-55", "7", -1); + t("-22.460", "872.15", -1); + t("-0.00000000027029", "2.05", -1); + t("-0.0000000000000004846", "17.73", -1); + t("3.6", "0", 1); + t("-3.233", "0", -1); + t("-3.878", "-383", 1); + t("-0.0000000000174", "20.7", -1); + t("0.0000000000000000000126", "-2.229", 1); + t("-2.307", "14.8000", -1); + t("-563.79", "0.000000000000000069934", -1); + t("-315.71", "-0.00832", -1); + t("7", "0", 1); + t("188.9", "-2.883", 1); + t("0", "14.5720", -1); + t("2", "5389.3", -1); + t("-2413.1", "-28", -1); + t("0", "-98.587", 1); + t("3", "0", 1); + t("17930.7", "1880.31", 1); + t("-1", "-0.00000000000000000272", -1); + t("0.00000000000000000002288", "51.0841", -1); + t("-1.004", "-14799", 1); + t("-0.0024973", "-6", 1); + t("-0.00000000000054", "6", -1); + t("0.0009288", "-5.2", 1); + t("-45.4", "-0.000042102", -1); + t("-56.1", "1793.86", -1); + t("-68.425", "0.0000000000000068415", -1); + t("-2.20", "0", -1); + t("136.51", "0", 1); + t("-5.9773", "45", -1); + t("-6996", "60.60", -1); + t("0.00000000773", "-2.6", 1); + t("-3827", "-42.150", -1); + t("-4", "3277", -1); + t("0.0000000000000201", "-0.00000000000000094", 1); + t("7497.2", "-45738", 1); + t("5.20", "2", 1); + t("139673", "0.000013", 1); + t("258285", "0.00000000000338", 1); + t("20.6", "0", 1); + t("5", "45.3", -1); + t("0", "0.00000000000000000010937", -1); + t("2", "-392.465", 1); + + t("-0.00000000000004475220262613", "390046.9220288808", -1); + t("-52", "-7", -1); + t("-7137400653786386", "-1220454", -1); + t("19.76074721670306", "39433637.5", -1); + t("495810.901671347", "-201199464.42718987", 1); + t("2180987378927.828", "28150984.022786039", 1); + t("364.263", "1334", -1); + t("-4.541827796913", "0.000000000720283699415669", -1); + t("0.000000000000533031300116917190", "-733584.206", 1); + t("-0.0000000000000019761199", "-6724.9979821490", 1); + t("0.00000000012335234299864", "56.021423640836509", -1); + t("17752.992435030", "513735.52129558557", -1); + t("-341665592090.67519", "895755.23903", -1); + t("-0.01174948256069749", "38841.427732372", -1); + t("2067269955.10633", "-215483633", 1); + t("58373", "-0.000000000000000208432238083784077", 1); + t("2821.0921360930698", "-0.0019370832810573843", 1); + t("-1", "-6987341307332550", 1); + t("-0.000000000000000135940520450", "-7", 1); + t("368879186519841.03", "3.86407044811851", 1); + t("54.8552188726690", "-17618.8325331", 1); + t("0.00000000719285162", "3.0", -1); + t("-24541949382.5", "12000388993272705.7", -1); + t("-0.00000000000000016019271145", "-5010014644.83398", 1); + t("0.00000342615147619", "38.8937553143", -1); + t("0.000000000000030", "698637", -1); + t("-940562183996", "-9538.76857523965", -1); + t("0.7992283723", "-301.642", 1); + t("-943394092028892", "0.00000000000249028944", -1); + t("0.0000000065", "19.8", -1); + t("-0.00000024892", "1.081095088", -1); + t("4693767.27", "0", 1); + t("241.51552", "-0.000000000029998424146", 1); + t("4.70", "-3889836.808618", 1); + t("-31", "22.1677904", -1); + t("-8", "0.0000000000000018564862859", -1); + t("-2.82", "-0.1308117625", -1); + t("-0.000000000000000490813322", "9628302045.4", -1); + t("14", "-1", 1); + t("-21665490839.0", "-308.104922674", -1); + t("-5", "-6.6", 1); + t("20.356245251", "-2629.4181", 1); + t("-1.39", "24102492360.03791", -1); + t("26.56", "-81.84491435616642", 1); + t("12733804882", "3.16734", 1); + t("0.0000000000001331522614064615", "-62.298429591", 1); + t("4.5417", "-0.0000000000000000000906964635852953", 1); + t("5.0", "3.99206", 1); + t("28282932454425", "20112043684.32", 1); + t("-119.144720881", "-129.74436439545", 1); + t("740279.3975", "18685368847070828", -1); + t("-194303.7", "0.000000000000006199756267389375", -1); + t("0.000000000000000002405090", "-0.00000000979604845", 1); + t("-0.0001603124275271", "0.000000006060544102736781", -1); + t("-179.52", "-76.6", -1); + t("9736.4996007851800", "99.6", 1); + t("-0.0000000000000000000126060214789203821", "6748323899.81", -1); + t("-0.0000076569074016550", "0.000000000525779058", -1); + t("0.0000000000000000047090003506832525", "0.00000000000000011759", -1); + t("-286334697213252", "8557782748357", -1); + t("-0.000000025274118612780187", "-127000540", 1); + t("0.00000000610055019436568", "-87.3", 1); + t("-1560822.78", "360857.435", -1); + t("243209397988565176", "-2171.0", 1); + t("1089364.8", "-7", 1); + t("5", "-195.43311519499808", 1); + t("0", "-12.6", 1); + t("-8917436.7369", "-2412090", -1); + t("0.0000000000258", "-0.000000000000000001137187844109", 1); + t("65611", "-0.00000000000527362056737", 1); + t("0.0000000000000000000113412508151534071", "-4.9964", 1); + t("20156417.0", "0.0000000000000253800552009", 1); + t("32.967316", "-176195213.7000883", 1); + t("-542212737079077800", "-593.88569405080", -1); + t("-0.000000000000000004199278271388794", "57186245414.80793", -1); + t("0.00000004507194567013278", "1.0", -1); + t("43551631176247", "-2195", 1); + t("-4.6", "0.00008016", -1); + t("-0.000013384535", "3437784.58", -1); + t("0.00000000000000002007911523", "-1.34", 1); + t("2.5", "-39.06", 1); + t("0.0000000000000000051", "2", -1); + t("0.00012813936789257785", "1021.0303931", -1); + t("0.00000000000000000132229", "47.1", -1); + t("-0.00002120044", "0.0000000000000000064902789323", -1); + t("9", "379472788024622.729", -1); + t("20.510820935587124", "0.0000000000028179781", 1); + t("-0.0000000000000000000336381763977", "1.17539", -1); + t("0", "-335.0", 1); + t("2.4", "-0.00000000000023", 1); + t("379.690496326", "-0.000000000000000003740124432080006", 1); + t("9612.15057327", "7", 1); + t("64.55819568", "103", -1); + t("306554.22", "-21168.82471", 1); + t("0", "0.00000000000000378671778", -1); + t("-4869994212.02", "-82.3249644", -1); + t("-28281314", "0.00023", -1); + t("-272266413010184382", "-21443895.1", -1); + t("0", "256.5", -1); + t("-0.0000000000000000059504", "-393", 1); + t("-85483356.741520", "-0.135106007572", -1); + t("1256398743581", "-0.00000000000000113", 1); + t("9265.8054085790753", "1101.60", 1); + t("21755297.7418484298", "-1961304", 1); + t("-4.24", "-20364.5241763", 1); + t("-0.00000163743621", "-15716423.93", 1); + t("0.0000000020933557160", "-8448055.64162653", 1); + t("193", "1919.381696195", -1); + t("-39007.0872890", "58659197064.3566", -1); + t("1.224", "-82293358.63", 1); + t("0.0000000000000001573421585953", "0.00000000159648", -1); + t("0", "-91.479627934421", 1); + t("-186.247902631", "-0.00000000000000008879", -1); + t("34342532998345", "0.000000000000000001681734691290559", 1); + t("-4020.8878086173", "1.08", -1); + t("-0.1630447778870097", "8176.334", -1); + t("-0.0000000000000000582491728505043", "0.00000000000000808314", -1); + t("-0.00000031", "3137213.71057", -1); + t("-28.21073575152", "8530334210.39291", -1); + t("-0.00000041292", "-66921.7723433", 1); + t("-261247.289569419", "-0.0000022547224", -1); + t("-4.07", "-6.1", 1); + t("688.144527235", "45986414948", -1); + t("-1", "-0.0231932902995", -1); + t("0.0000000000000016241364087636498", "3", -1); + t("64634.877977", "-39803483", 1); + t("93.85", "-27.012", 1); + t("-1804.8479", "-2720034", 1); + t("-31207.70845", "-0.05392720639355", -1); + t("-7479301046098815", "37.3", -1); + t("50515.653686861597", "-0.00000000000000204399360", 1); + t("-0.0000000000000000055012280316826870", "149.91618262", -1); + t("2216863.9954067", "0.000000000000000775121457372458", 1); + t("-3.1", "2", -1); + t("-4.67", "0.000000018732162086", -1); + t("-0.00002189591", "-0.000000000255830068339", -1); + t("410611332258005.0", "-2840.2819", 1); + t("-7397921366979", "-0.00000000000053", -1); + t("-0.12413104038561", "-0.00000000000255343979", -1); + t("10521370.1", "-55871447.8", 1); + t("129500.264553199", "-3811409369958.95", 1); + t("0.00000240712277094094", "1354108422.5", -1); + t("-0.000000000000000005719028368733990", "540474.19019760", -1); + t("977162.7422", "-0.000000000001402550", 1); + t("1.54339295432", "-0.000001596789", 1); + t("53798507.25", "-0.00129745384800", 1); + t("-0.00418268966509248", "0.0000324984627", -1); + t("118092.9308827", "-0.0000000000091", 1); + t("0", "-93.6", 1); + t("0", "152.55335", -1); + t("-3405109.0892217", "0", -1); + t("445424.679402140", "85.3554", 1); + t("5036.98", "22371.6657", -1); + t("-1.9", "0.000000102345283335839", -1); + t("-42.2659", "3.721", -1); + t("0.0000016709189598", "6.170585", -1); + t("-3", "0", -1); + t("-0.0000000061", "5497334338493.62", -1); + t("-124932073873228", "0.000000000370", -1); + t("-0.007149648796120", "-0.00000001269559959", -1); + t("1675530.7719", "-1065461.6469931248", 1); + t("1053.3", "10097922.4048112434", -1); + t("-92523142643508", "-4", -1); + t("200.8", "-36.675816237421759", 1); + t("2.0", "34282969.24101", -1); + t("-0.120192312259366", "-99423384.4155", 1); + t("0.00000000000000000746964", "-4.50907217", 1); + t("2521.848164", "-16771705.710", 1); + t("0.00002756245400", "0.0032449553261", -1); + t("-0.00000001332527923", "574.55219962424", -1); + t("-0.000000000000000179221403668", "57235.797", -1); + t("0.000000057866988749115", "0.00000000014", 1); + t("3", "1.2", 1); + t("56.30058910190568", "-1680170716816089", 1); + t("-2", "-24381767.5", 1); + t("11799.81119", "-0.0000092161582", 1); + t("1.13", "-1", 1); + t("1", "-802.5013810814", 1); + t("54624549209148.7", "-0.000002846161", 1); + t("138301402", "-0.00011", 1); + t("5", "-2.4", 1); + t("-4604424", "1.28478944", -1); + t("-146100841048.0", "92.57", -1); + t("-0.0000000000000000020786339367465", "0.0000000517784775175150122", -1); + t("94366206024220.8", "-147.3818299", 1); + t("-3.30342757", "-2.8", -1); + t("1458645603.7314952", "-0.00000000000000071", 1); + t("-22352269.3857581", "1.133", -1); + t("0.00000000000203016463277398240", "11.54042", -1); + t("119.31", "0.0000000000005419744970291", 1); + t("-479.458846", "-61007894", 1); + t("-12.748", "-42.6", 1); + t("-4", "-2102161", 1); + t("-0.0000892951", "-0.00000000700082036664", -1); + + t("-78249536473266824330849.66777355094653206196949807187125", "-0.0000000000000003657205364898565", -1); + t("-794146002335392753453.706827563775514677616", "-0.000000000000002003697772718678199294529887857336117611280517515976", -1); + t("-415", "392495171560354735.54", -1); + t("-0.00000000003641527559883410541221", "118893973463454526683808886319100407749", -1); + t("-246230199620.751986", "-60621558.218545419613692429476293547415222080017643997", -1); + t("1135.2381823", "-7025657983677893287919132587754823076851573889.74685", 1); + t("-1225393854304.583672953386", "3712805076014395323562.4542406246", -1); + t("0.0000000000002805023524281798", "-1195739.55713460927706968721363067", 1); + t("386896730804748668115534580.29201499", "737595739534741234.44386299", 1); + t("-160941276095561769012497288743700757276588036", "194.232174807028239974132449968549146279604", -1); + t("0.0000000000000009760", "-112424977227983.369213445871607530779963339", 1); + t("-120493.3535480159461699138868088193226718499846079", "-963938726344338862591656029356573.2356831292145", 1); + t("1.731842697869349182975403693663977472678249978539", "-0.0000000000018342058226450839410208095980857226", 1); + t("0.000000000000000000186044372917454007190404393463337172211654339256226", "38603.328332936580263680889352090136846643070031691", -1); + t("2.24833678840107152900324", "-0.000000000000535013632333188", 1); + t("-0.000000000001014445297159531", "-182225871.4", 1); + t("-110739", "39245367522721683497924493692756130948391370303714834", -1); + t("0.000000000000000000011109996302235", "0.00000021747567330836261997878389805423396667433455", -1); + t("913805.7272137617667300113969454560", "12015557861856523.82185", -1); + t("4.44", "17327761911331833939511.3229350", -1); + t("3343815205898708797845323710139050310101815211790183", "0.000002944097410246031171887416698431193651848888", 1); + t("32760398270494573303330410.50750229445655494486793110334706", "-9510914125.45789497493920290055", 1); + t("0.00000031352646", "2982438266661362962075700689156408.44636939397", -1); + t("77053023622996.111620117040477945", "-594", 1); + t("28.651584435", "0.0000000000000517018230", 1); + t("69454425323857571.298955", "0.00000003183", 1); + t("8.585707061691", "27579495297994019790817050261359", -1); + t("0.0000245072088767920273", "597422085664.8946200175189947965015981804000953540032149", -1); + t("6395952035600311.145296483306709937475", "-7839682836938441873082358214760503680131094656590381429", 1); + t("-878403860673101771781740794629505317750999165.91704111", "23574346417573958371843475532943.5863825875041348813273", -1); + t("0.0000767302828677966418632441811470540764577", "-1276636.42385918072718338162162974143519652320393232805716411", 1); + t("-15930445184474597597265919925606183581356435.4578944", "-0.00000000000114252044623272018125497556095987129012517542089248", -1); + t("-48665285374684448074343674590620067.7", "1", -1); + t("105930.422", "11113072169.652252071060557105162", -1); + t("26564763", "-3", 1); + t("4811244033166.822319661770849918367233504118713435759512811", "4.7", 1); + t("-56.8", "4443507757632459.195553180343008573591954189736210531834", -1); + t("612.72379387256827500110", "-452.196955446440438357", 1); + t("-494127587184494770597966464398", "0.000000000000000505582034979983270144354985077988823279257757358354", -1); + t("151593171537726736029059210", "3280207153334176964", 1); + t("-0.0000000727423791233275798", "-33.983207203823", 1); + t("-0.00000000000000000014088202399161", "967411649025173.3", -1); + t("2.4", "-0.000000000001348198764946041705529604570289570284", 1); + t("-1458694234293.393", "-0.0000000277889669157893917", -1); + t("-1", "0", -1); + t("-295498271141109248639464345535.73829013835409617653972", "-239733948637940687.4210093379196529044279897", -1); + t("-114.668973584958627612325023154590", "0.00000000000000000204", -1); + t("11086296933075691303", "61846609604939708809351700530350279982", -1); + t("-199290.9539286389610", "0", -1); + t("-0.00008470578761402", "77227954881772040530.19249809987494428807714982", -1); + t("1675393978448", "-218061932.345257837058901", 1); + t("-148234164778648.90057404374761057399794220096395194121763477", "-1807153054383052.16291022958635252906429", 1); + t("0.00000107324116068524713963632866732786846249794493141690777", "-8697413954500148992019717571067182408306067052176.48379", 1); + t("-3504475807101437909894549201613284414285", "0.00000180507680656754700593791722943439535831913116826463442277", -1); + t("137188855.912293557682373", "-84390113782876.78301756825303169680317158020741023212586877", 1); + t("-8.04", "48917396714819601257978143.0", -1); + t("19441.23908", "-3621875953293954379164.80898", 1); + t("-488683915776821.54128571136", "-2764.655", -1); + t("-497.39163093", "456272554.910083158313064", -1); + t("3888553456.187038805", "1.79351971", 1); + t("-0.09665505758418475963567867363097339048321797943170880174", "42.26560746275599", -1); + t("18902797728391145440494082949463571569467603044", "-160840513303121014911814965287069764.329850142", 1); + t("-0.00000000000363783296932", "-229510691003150718410894.798513190", 1); + t("-0.019578513996", "-0.0000068012586581839285561", -1); + t("-0.00000000000000003337257672564450192788237207780262977502390656214", "-576.230537914969490642", 1); + t("0.0002071041857705517964418488527910814283948842252102023", "4965", -1); + t("-762578569061554379901567768164.24708334695367", "-2902150555266343625933468.2", -1); + t("366547461068.82113690", "473567955790856323671.7615303868255685632986068926885", -1); + t("2212.60505074", "54.4399284220426917738", 1); + t("24229481820388119475112679.2869744056638142529094915709331146", "-39663594276.8672343304", 1); + t("204581808810007220059753337566285703.0558403249497", "0.14724245060761654341919", 1); + t("186.26481926730311740748275435747257", "3169339033932711835137078410077027045.6405", -1); + t("147438798802.4222641736117", "-30953.68649", 1); + t("0.0000000000000000036665066712498278880448755082419497041867983779348", "49969977335002848872793397", -1); + t("-15", "-1610335165763678418286838402407661955", 1); + t("2689653843679875122027095562540366.2198041476017623", "1680374149507467199865152885259.7294203852546004613867", 1); + t("-0.11", "-0.00000000000000000043896646420939540095966", -1); + t("2080671699743.511238240714127", "-0.000036842318404340179848907", 1); + t("568000304", "-90592884500253731464906623327632577358591186.946837858889", 1); + t("-0.000000000000002107518141285", "-3224876873708851754101647.818256157564", 1); + t("2265098771", "0.00303612511166914586857128974318819782", 1); + t("-5664007822465.98050400197979616740857", "4318641.351415884425470426852575673963981647030782942", -1); + t("-2548615100934958409898695557521334.971165846219072", "-554798.735556810907", -1); + t("-0.000008820826897431443", "-1685288868236928715034057139645.0670918901230", 1); + t("0.2773641914039966806939077833931526594995617517107827", "-155510002669979906258854608426737730.80732922", 1); + t("0.00000028631297293946002594331990323448420", "12.530358985140", -1); + t("65.74", "0.000000180226526307592", 1); + t("35366830254177.323", "-195533735162357391160682221146179916675364691505329.522594", 1); + t("623190599276699090316221455590041049805679995441489316.522", "6153742899048073987312064712008701512451.12942", 1); + t("0.001389654081957090114281716350682554539119289983031175", "0.0000000000000000004172245036048453978505043356031", 1); + t("-0.000000000000065125596165975329468700878377195017853327025922232", "5010.27", -1); + t("99858764586308080.815938383", "6906.98277", 1); + t("-0.0000002120213841110365850583078206489619527666932442761000523841", "1560226.624828", -1); + t("-0.00000011209616970611", "437120468783339721.8270432960", -1); + t("39633522.28696180408828", "404609951713", -1); + t("0.00000439899975727851857364404628011452819", "-295058799.554060774457769229721869795967861", 1); + t("-0.00000000000000042342244818730713908050671583102154", "549754666663906751820116493890514432554613796763091771", -1); + t("271354103.271534143867908347243952035", "-3.4348029165", 1); + t("-18391137696458176.709403414422273535748", "-135526005724.36", -1); + t("-16789648705436253610328466585451657189", "87790015500203097.67217621", -1); + t("-0.1934527980285924234435139814", "0.000000044283070912014290453388249787033315196663317475885890", -1); + t("175727618.7", "-4712524302.9633361502507795469472010873256880899968244213838", 1); + t("86148708.7", "0.000000000043067763982519792325233598208451198", 1); + t("-1676718.814", "-126027512979.7359979901775996", 1); + t("204654162545474.954541730442039127578542771572577634608702", "1278262396819307952614391540746000135708145121661", -1); + t("20599411052765018472280152629960269.784440835643761573", "382871.68", 1); + t("9.1", "-0.000009868296529724402614472149967657", 1); + t("-51.7", "-0.00004138549340599259177969843213431710067044689658507", -1); + t("-0.00000000065519676351299476540767970", "-159950069281804382298.104882147944419487737768", 1); + t("132937997125408.196564521", "0.0000000000000416671095818013123525013575750", 1); + t("-1313393782.747301", "135189314585073603701567044403904503", -1); + t("0.26345218007386345905841", "-0.0000000000000000131698402541203188119609481297941368650", 1); + t("24462716218.22576508876165308669350154", "-175901840085494768716509058673018943.44105360844073496986", 1); + t("-639051.389850068275663978184079330600736417788030565545", "-233130008509087611163354733950079542005785536290.28", 1); + t("-2.5", "0", -1); + t("-48", "-1.30483838443", -1); + t("-0.0000007957592304983915492296920988493287302223429001", "222281838853.55743543126434998666514248954378468481403010", -1); + t("-256924767625.92102529834889997062393414595239208331582", "-138645955.7309701679", -1); + t("5825.6936168480383901079880", "-15454778381.1635817748532891601", 1); + t("322234158068890727047790331925494003913674775559", "0.0000000000000001440104086097707578083604", 1); + t("-0.0000000000284163905693832757026", "735321.796040692391355698638806984647971670552494930079886", -1); + t("13.51354661049663", "60174586.03966439546", -1); + t("-0.0000000563225262474012816830760397217", "-19259915510222671.51018", 1); + t("58260242951538386451799849576838755846723438641458498.45", "81583418293233481447477355060230.5984042555029388", 1); + t("15676086441613294586793.0600578779086373855887", "553785093898805279609967970.6227004730416155843290795860965", -1); + t("-529215908", "0.000000000000001261696290245850445593226", -1); + t("0.2765770305056755810402655395163548457323921993", "2485048778003226295.0487979661044", -1); + t("3.106357", "-196188865060.96789451729283131151802962", 1); + t("-3812721623392532238628.52058836531583261604602809206126", "0.000000000129949612553432181149516674241", -1); + t("-725747.78308445614294711222169380088709733492626141", "0", -1); + t("0.00005978057030838911749503353205688236750513118711", "-2301374753039922.5", 1); + t("-21135.6", "0.0000000000000677319833766662844296", -1); + t("-18592472738146.165033667092366", "-0.245177658870876212432221320582908107465202878031116163978799", -1); + t("2.0853471559342294701189635489971894524307297590789015254659", "1820710163171110437504131672398834715.796647407", -1); + t("3017.7628349701943687591214", "-2123676032175089021.800850462329", 1); + t("2245516696370652079582811421413778879168242699149", "-0.000026865223", 1); + t("396591381033578245290535623.59522101830916124323912171677", "-399632909396.27251691705488670319", 1); + t("25071395481877740931640606160951694567581843991.91250540", "0.000000129577260075209456379795979548520957596680350786352443111", 1); + t("-10071840824462229810456841986062182478", "-0.000000000000036", -1); + t("-378.382656390921442297", "2995.111135910", -1); + t("-0.0000000000000011003920232607040692705", "0.00000000000000002355157685511431284976273511723771203290674587231328782173", -1); + t("894.8158182999506884919347710660910", "-0.00000000000000000096323615121853367670285903274497581", 1); + t("2319037.233322076813874258", "-32416.903557641", 1); + t("23396460119.155847859729080972376305599746464844501598782869", "-23349855891702694333726330.5788991", 1); + t("90907619612776583630058641475331.6", "834081.31401857878701092663973283388246447251015444", 1); + t("-0.0000000000000000081501364451042879423837094013790187022253", "-0.00000001399490096609828204621353982853023593", 1); + t("-420605.932784654921007625945921605929", "-0.001003986559391891122940439549512675", -1); + t("29941819100256.1010903984648918366033290553065670117884535", "-1399273749558314.35414647141708136502314", 1); + t("9.87428322502844153862497406397966790245714773688", "282378323960341447353633555973.60816609111820", -1); + t("0.000000011571", "56.055239680", -1); + t("57847056020509197.81010326363252948483107773", "-1.4444", 1); + t("-51735520880178.3819992386025068250767281052153771374742233700", "-0.000000000000000001995850558903648471134005565207297729809954251013177868", -1); + t("-252689605402394270719155.41734356951305987480624879", "-14.7", -1); + t("-0.00000000001151229725364301025243181548204622943024492441630358", "26395005645801030069538169698242312.433651971508113804", -1); + t("-0.00000000000091483130556462719", "2", -1); + t("208.9827699741542594700570327748394160582183088044349", "-0.00000000000052759011609237039384483268124939035873403", 1); + t("12412.9657547118", "4", 1); + t("-2", "91580728825224739577263849484410121433204621.500780779690", -1); + t("459526644.772925035397599290137226147632521530511862018", "-0.000000005846169451429981275734796656", 1); + t("671926163021026323133951152902929830282.91041796493", "548498210972677.51442460018844632588617668956139310271612", 1); + t("2422.5875291768881507425406922241585652688246", "19145241007530705409.9615104357443736565548963", -1); + t("-0.00000078875216605898054012159", "-3150.0", 1); + t("6244534680058004259589682789034535443037697", "-25351939981079.604012", 1); + t("-180.203958489450", "39025034688578315815199.297787915576434930764", -1); + t("-1361080637840651575481575485233.15286726682268248409468726", "-0.0000000000000039297884367828635174097881955958806085", -1); + t("180278536333055.7355327506162313565598247413", "0.000000000005454620478830996984164588529474180472398020083723230733100", 1); + t("-12521213.94690", "213.36136", -1); + t("-0.0000000000000076966493627693824010017610386791", "-2.378265167488246191074961795033182605013037407884326", 1); + t("-253.6948", "126006206", -1); + + t("-5.5239e+3", "-2.2807805e+1", -1); + t("8.554e+2", "0e+0", 1); + t("-2.1176736939e+5", "2.13526332e+2", -1); + t("2.528e-2", "-1.5e-1", 1); + t("-2.1536554e-2", "-3.93e-6", -1); + t("4.853430802e-5", "-4.9e-11", 1); + t("-6.9e-3", "1.9596e+1", -1); + t("-9.93182949e+1", "-7.9983535342e-20", -1); + t("1.629795e+5", "1.58117535423e+5", 1); + t("-2.934333546e-15", "-2.093237829e-14", 1); + t("2.2916931e+1", "7.88e+2", -1); + t("7.656115e+0", "5.5885422e-10", 1); + t("0e+0", "-3.3e+0", 1); + t("-2.4327703616e+3", "1.1e+1", -1); + t("1.61903621e+6", "-2.3444006423e+2", 1); + t("4.5332e+4", "3.281123867e+1", 1); + t("-7.9e-4", "0e+0", -1); + t("-2.6e-19", "-5.4489933e+6", 1); + t("5.877152e+1", "1.5125e-2", 1); + t("6.293000381e-1", "7.2e+1", -1); + t("1.072062222225e+10", "7.521052067e+0", 1); + t("-2.9744557e+7", "0e+0", -1); + t("-1.0235e-13", "-3.671886e+0", 1); + t("-2.06364e-4", "6.2113337e-3", -1); + t("-7.02e+0", "-1.1348644434e+3", 1); + t("-3.57688146e+3", "3.81547e+2", -1); + t("2.9527098536e+3", "1.32080504447e-4", 1); + t("-2.6286e+1", "3.8e+0", -1); + t("-3.45054603e+2", "-9.88229e-15", -1); + t("-2.469e+0", "-3e+0", 1); + t("-8.369800004e-4", "1.4e-17", -1); + t("-1e+0", "4e+0", -1); + t("-3.0829216081e+2", "-3.08e+1", -1); + t("-1e+0", "-5.756e+1", 1); + t("-8.511e+0", "3.126324e+6", -1); + t("2.4474011949e+4", "1.12649e+2", 1); + t("-2.57868e+4", "-1.03178e+1", -1); + t("1e+0", "9.5177e+1", -1); + t("-9.8069663157e-6", "1.4532689e+5", -1); + t("3.721e+1", "-2e+0", 1); + t("-9.7657879751e+10", "-5.67e+2", -1); + t("-4.8657905e+6", "-2.17381281e+1", -1); + t("-4.20131e+0", "-1.3179640655e-8", -1); + t("1.6e+0", "0e+0", 1); + t("5.16068325659e-4", "1.269e+1", -1); + t("9.91969e+5", "0e+0", 1); + t("2.32e+0", "3.69e+1", -1); + t("5.685149e+2", "3.694e-13", 1); + t("-9.0148e-5", "0e+0", -1); + t("-3e+0", "-8.7855e-7", -1); + t("1.3669489e+3", "1.33866e-4", 1); + t("-2.6e+1", "1.36976797894e+3", -1); + t("4.6e+0", "0e+0", 1); + t("-7.2e-8", "1.971355e+2", -1); + t("1.19755e-5", "7e+0", -1); + t("-3.46e+0", "-3.7715361e-11", -1); + t("3.25762245146e+6", "-4.02e+0", 1); + t("1.3174225699e+7", "9.6222695655e+10", -1); + t("6.6e-13", "-5.23193346205e+4", 1); + t("-3.873e+3", "-1.23681175e+3", -1); + t("-1.19869e+5", "-8e+2", -1); + t("2.027381656e+3", "1.47629351439e+11", -1); + t("-1.467418e-17", "9.0073930856e+5", -1); + t("7.1e+0", "6.116301582e+2", -1); + t("-1.7883916e+5", "3.533e-17", -1); + t("8.8e-11", "-5.9707897e-1", 1); + t("-5.337e+3", "4.6614e-13", -1); + t("1e+0", "-3.1e+0", 1); + t("-3.05920196e-6", "-4e+0", 1); + t("-1.692375e-10", "2.29981330096e+6", -1); + t("5.19341813e-1", "6.1e+0", -1); + t("5.796e+3", "-9.386773281e-8", 1); + t("9.117497e+0", "0e+0", 1); + t("6.962934e-8", "1.413982e+2", -1); + t("2e+0", "1.4e+1", -1); + t("-2.04e+0", "-1.30300025e+9", 1); + t("1.57647e+1", "3.0862783894e+0", 1); + t("-4e+0", "7.1e+1", -1); + t("1.21e-6", "-2.109584154e+10", 1); + t("6.55669245e+3", "-8.15e-8", 1); + t("-8.3307e+2", "-9.1476874e+7", 1); + t("0e+0", "-3.64676e+5", 1); + t("-1.2803e+2", "7.2908749e+3", -1); + t("3.2263e+3", "-1.43355e+1", 1); + t("4.92751482244e-18", "1.3747248256e+3", -1); + t("8.20054755e-10", "6.2348e+2", -1); + t("-1.06e+1", "-7.2569084631e+4", 1); + t("1.86e+2", "3.76613527e-5", 1); + t("3.33652e+3", "5.1e+1", 1); + t("3.665307673e+8", "3.31344e+5", 1); + t("-7.341261161e+2", "-2.98910916e+7", 1); + t("6.24638573245e+5", "4.47893448327e+2", 1); + t("1.23e-8", "-5e+0", 1); + t("4.469176e+5", "-2.09863e+3", 1); + t("-2.72624816161e+3", "0e+0", -1); + t("-6.78251e-20", "-6.837e-1", 1); + t("6.2456922e-6", "0e+0", 1); + t("6.2e-4", "4.40516e+4", -1); + t("-7.624e+2", "-3e+0", -1); + t("-5.22549619458e+0", "-4.0866914233e+9", 1); + t("-9.51999532e+7", "-2e+0", -1); + t("-1.07321e+2", "-1.3e+0", -1); + t("-5.405555671e-6", "8.0306e+1", -1); + t("2.2e+0", "6.49e-17", 1); + t("3e+0", "2.2e+0", 1); + t("-1.12e+2", "3.4165375e+1", -1); + t("-2.36978379e+4", "-4.2e+0", -1); + t("-8e+0", "-6.42e+0", -1); + t("-3.2e+1", "6.17231707e-19", -1); + t("-4.8454741051e+1", "4.3339e-10", -1); + t("4.29e+0", "3.28376306e+4", -1); + t("-6.33089e+1", "-5.7065758354e-19", -1); + t("0e+0", "-3.31e-7", 1); + t("-2.18973e+2", "1.88333703659e+4", -1); + t("-1.67e+2", "3e+0", -1); + t("0e+0", "9.7605e-12", -1); + t("1.294433816e+0", "-1.1e+1", 1); + t("-1.4246177e+3", "-1.043532436e+8", 1); + t("-1.0531e+1", "2.2268899e-6", -1); + t("-1.5611e+3", "1.59757e+0", -1); + t("3.3638160556e+11", "6.29136402e+6", 1); + t("-7.7326244542e+2", "-9.6e+0", -1); + t("-3.593606997e+8", "-4e+0", -1); + t("9.4433e+2", "-1e+0", 1); + t("-1.0131e-9", "-4.551632556e+9", 1); + t("1.61735e+5", "-6.550194286e+9", 1); + t("3e+0", "-8.14e+3", 1); + t("-3.492e+0", "8.85393125e+2", -1); + t("-9.3678169131e-19", "-1.98802069e+4", 1); + t("-4.39338019e+7", "1.07850051e-15", -1); + t("-1.1677e+0", "2.22825374e+8", -1); + t("-3.476e+0", "6e+0", -1); + t("1.453e+0", "-6.34599e-7", 1); + t("1.789e-9", "0e+0", 1); + t("-2.92933e+4", "5.802095e+4", -1); + t("9e+0", "2.63702e-7", 1); + t("-6.0696e+4", "9.46475e+5", -1); + t("-1.508052e+6", "2.45600810354e+0", -1); + t("6.83354e+1", "1.93e-12", 1); + t("-1.6e+0", "-2e+0", 1); + t("-7.4275644e+5", "-6.1587e-14", -1); + t("0e+0", "3.540869872e-9", -1); + t("-7.86e+0", "8.041734e+6", -1); + t("-8e+0", "1.569e+1", -1); + t("2.0839e-18", "1.2848955034e-14", -1); + t("6.84909e+3", "2.19e+1", 1); + t("5.556062e+3", "1.037e-12", 1); + t("-1.011918e-9", "3.52315476249e+0", -1); + t("-1.2e+2", "-5.8677085e+1", -1); + t("1.5e+0", "-8.2951e-8", 1); + t("5.254e+0", "-2.08338e+3", 1); + t("8.272e+0", "0e+0", 1); + t("-2.3496e+3", "-1.74217696625e-1", -1); + t("2.33e+0", "-6e+0", 1); + t("8.138135061e-6", "1.52e+1", -1); + t("-2.691357e+5", "1e+0", -1); + t("4.277011e-13", "2.1978e+4", -1); + t("-4.164225e+0", "3.94601989492e-6", -1); + t("-1.32e-18", "-3.94e-3", 1); + t("-2.443211e-11", "2.02e-8", -1); + t("-1.2e+0", "-3.2e+1", 1); + t("4.7652754554e+7", "-2.1e-11", 1); + t("2.02136500541e+9", "-2.77170882e+2", 1); + t("-1.65e-2", "-2.4039e+3", 1); + t("1.8172e+1", "-6.3e-5", 1); + t("1.8703827209e-10", "-1.46184e+4", 1); + t("-1.11606903e+6", "-2.8e-6", -1); + t("-7.84180535e+0", "-6.9715e+2", 1); + t("-1.6095371e-5", "-4.007e+2", 1); + t("2e+0", "2.7730114619e+0", -1); + t("1.3694403e+7", "-3.14014263471e-3", 1); + t("3e+0", "2.4553237278e+3", -1); + t("-3e+0", "-2.78756184842e+11", 1); + t("-1.2522e+2", "-7.7e+1", -1); + t("4.491e-18", "-1.196e+3", 1); + t("-3e+0", "-2.78811358e+4", 1); + t("-3.5481789e+3", "1.6004994927e+5", -1); + t("1.9963146e+6", "-6.923e-1", 1); + t("-1.37573e-12", "2.072e+2", -1); + t("6.570067306e-1", "3.73554490286e-16", 1); + t("3.0659071736e-15", "6.946525e+1", -1); + t("-5.346e+0", "1e+0", -1); + t("8.55e-9", "7.9e-11", 1); + t("-7.5096624e+2", "3.40622424e+5", -1); + t("2.219404561e-14", "5.47749e+0", -1); + t("3.000476e+2", "-1.754092582e+1", 1); + t("0e+0", "-1.69774e+3", 1); + t("2.993e+0", "-1e+0", 1); + t("2.7528038851e+1", "-3.945799123e+4", 1); + t("-6.6266e+2", "-4.5e-19", -1); + t("9.204609e-14", "1.25862e+5", -1); + t("-7.0237408e+5", "-4.56413483775e+3", -1); + t("4.8481576e+2", "-6.53713e+3", 1); + t("1e+0", "1.103e+2", -1); + t("6.57977e+2", "-3.852e-16", 1); + t("3.861e+2", "-6.2072117462e+5", 1); + t("-6e+0", "1.3494901111e+6", -1); + t("-5.870696e-1", "-3.801808e+1", 1); + t("-3.83761721e+8", "8.081107501e-5", -1); + t("6.50057174e+5", "2.0206519e-12", 1); + t("5.5207e+4", "-2.48e+2", 1); + t("0e+0", "1.05116516384e+11", -1); + t("-1.75279284e+4", "3.899762267e-1", -1); + t("-1.6197e+0", "4.3274e+4", -1); + t("1.256294e+6", "-5.58921e-15", 1); + t("3e+0", "2.0586937916e-17", 1); + t("-3.28553e-13", "-1.18e+1", 1); + t("-2.81418e+5", "1.72529458e-12", -1); + t("7.8666421e+3", "5.9153e+0", 1); + t("4.84347589e-8", "2e+0", -1); + t("3e+0", "-2.6655512e+2", 1); + t("6.2696e-10", "-2.054382974e+1", 1); + t("6.1413274e-2", "0e+0", 1); + t("-2.9095e-18", "-6.9975956783e+8", 1); + t("4.01e-20", "-7.5588e-6", 1); + t("9.490622e-18", "-2.77e+0", 1); + t("-1.0267e-14", "-8.790091e-9", 1); + t("-4.077591e-14", "-3.0259558246e+0", 1); + t("-2.8261e+2", "-4.99857e+0", -1); + t("9.899113e+1", "1e+0", 1); + t("5.5e+0", "-7.0265e+0", 1); + t("5.286e-7", "-4.3972682e+2", 1); + t("1.5520187e+6", "1.150018e+2", 1); + t("-2.04e-10", "-4.0474e+2", 1); + t("-2.32245517e+7", "-4.96976e+4", -1); + t("-3.6487688611e-10", "-1.1763503e+2", 1); + t("8.3414625e+0", "0e+0", 1); + t("9.905071e+6", "-5.9541e-4", 1); + t("1.984307e+4", "-2.4291e-7", 1); + t("-1e+0", "-1e+0", 0); + t("2.060415969e+9", "-2.03455e+2", 1); + t("3.1982e-19", "-1.993945e+3", 1); + t("3.093739e+1", "-1.99128676855e+0", 1); + t("1.881e+1", "-1.09028754e+5", 1); + t("0e+0", "-4.7092316e-14", 1); + t("-9.455374693e-10", "-9.45812534991e+6", 1); + t("-1.67881e+4", "-2.1683630866e+3", -1); + t("6.3514013642e-17", "-4.5e+0", 1); + t("1.20179765e-20", "4.9098e+3", -1); + t("0e+0", "-7.476983768e+1", 1); + t("-8.5797e+2", "2.1e+0", -1); + t("-2.75e+1", "-1.749e-18", -1); + t("-1e+0", "8.4e+1", -1); + t("7.110682e+4", "8.5646556e+2", 1); + t("-3.1875423048e+6", "7.216e+1", -1); + t("-1.41969e+0", "0e+0", -1); + t("-3.707432e+6", "1.5048071e+2", -1); + t("-2.65447780189e+11", "2e+0", -1); + t("3.808865e+6", "-7.22140745e-10", 1); + t("2.972544e+3", "0e+0", 1); + t("1.142002886e-2", "-3.063e+0", 1); + t("-3.292e-15", "-2.2e-1", 1); + t("-9.29480350675e-6", "9.4830355594e+4", -1); + t("-2.49267401e-19", "3.3296905e+4", -1); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightConstructorTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightConstructorTests.cs new file mode 100644 index 0000000..b154b69 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightConstructorTests.cs @@ -0,0 +1,244 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightConstructor")] + public class BigDecimalLightConstructorTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Constructor() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (int[] coefficient, int exponent, int sign, BigDecimalArgument n) => + { + BigDecimalTests.assertEqualProps(coefficient, exponent, sign, bigDecimalFactory.BigDecimal(n)); + }; + + t(new int[] {0}, 0, 0, 0); + t(new int[] {0}, 0, 0, -0); + t(new int[] {1}, 0, -1, -1); + t(new int[] {10}, 0, -1, -10); + + t(new int[] {1}, 0, 1, 1); + t(new int[] {10}, 0, 1, 10); + t(new int[] {100}, 0, 1, 100); + t(new int[] {1000}, 0, 1, 1000); + t(new int[] {10000}, 0, 1, 10000); + t(new int[] {100000}, 0, 1, 100000); + t(new int[] {1000000}, 0, 1, 1000000); + + t(new int[] {1}, 1, 1, 10000000); + t(new int[] {10}, 1, 1, 100000000); + t(new int[] {100}, 1, 1, 1000000000); + t(new int[] {1000}, 1, 1, 10000000000); + t(new int[] {10000}, 1, 1, 100000000000); + t(new int[] {100000}, 1, 1, 1000000000000); + t(new int[] {1000000}, 1, 1, 10000000000000); + + t(new int[] {1}, 2, -1, -100000000000000); + t(new int[] {10}, 2, -1, -1000000000000000); + t(new int[] {100}, 2, -1, -10000000000000000); + t(new int[] {1000}, 2, -1, -100000000000000000); + t(new int[] {10000}, 2, -1, -1000000000000000000); + //t(new int[] {100000}, 2, -1, -10000000000000000000); + //t(new int[] {1000000}, 2, -1, -100000000000000000000); + + t(new int[] {1000000}, -1, 1, 1e-1); + t(new int[] {100000}, -1, -1, -1e-2); + t(new int[] {10000}, -1, 1, 1e-3); + t(new int[] {1000}, -1, -1, -1e-4); + t(new int[] {100}, -1, 1, 1e-5); + t(new int[] {10}, -1, -1, -1e-6); + t(new int[] {1}, -1, 1, 1e-7); + + t(new int[] {1000000}, -2, 1, 1e-8); + t(new int[] {100000}, -2, -1, -1e-9); + t(new int[] {10000}, -2, 1, 1e-10); + t(new int[] {1000}, -2, -1, -1e-11); + t(new int[] {100}, -2, 1, 1e-12); + t(new int[] {10}, -2, -1, -1e-13); + t(new int[] {1}, -2, 1, 1e-14); + + t(new int[] {1000000}, -3, 1, 1e-15); + t(new int[] {100000}, -3, -1, -1e-16); + t(new int[] {10000}, -3, 1, 1e-17); + t(new int[] {1000}, -3, -1, -1e-18); + t(new int[] {100}, -3, 1, 1e-19); + t(new int[] {10}, -3, -1, -1e-20); + t(new int[] {1}, -3, 1, 1e-21); + + t(new int[] {9}, 0, 1, "9"); + t(new int[] {99}, 0, -1, "-99"); + t(new int[] {999}, 0, 1, "999"); + t(new int[] {9999}, 0, -1, "-9999"); + t(new int[] {99999}, 0, 1, "99999"); + t(new int[] {999999}, 0, -1, "-999999"); + t(new int[] {9999999}, 0, 1, "9999999"); + + t(new int[] {9, 9999999}, 1, -1, "-99999999"); + t(new int[] {99, 9999999}, 1, 1, "999999999"); + t(new int[] {999, 9999999}, 1, -1, "-9999999999"); + t(new int[] {9999, 9999999}, 1, 1, "99999999999"); + t(new int[] {99999, 9999999}, 1, -1, "-999999999999"); + t(new int[] {999999, 9999999}, 1, 1, "9999999999999"); + t(new int[] {9999999, 9999999}, 1, -1, "-99999999999999"); + + t(new int[] {9, 9999999, 9999999}, 2, 1, "999999999999999"); + t(new int[] {99, 9999999, 9999999}, 2, -1, "-9999999999999999"); + t(new int[] {999, 9999999, 9999999}, 2, 1, "99999999999999999"); + t(new int[] {9999, 9999999, 9999999}, 2, -1, "-999999999999999999"); + t(new int[] {99999, 9999999, 9999999}, 2, 1, "9999999999999999999"); + t(new int[] {999999, 9999999, 9999999}, 2, -1, "-99999999999999999999"); + t(new int[] {9999999, 9999999, 9999999}, 2, 1, "999999999999999999999"); + + // Test base conversion. + + var t2 = (string expected, BigDecimalArgument n) => { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ValueOf()); + }; + + var tx = (Action fn, string msg) => { + BigDecimalTests.assertException(fn, msg); + }; + + tx(() => { bigDecimalFactory.BigDecimal(double.NaN); }, "NaN"); + tx(() => { bigDecimalFactory.BigDecimal("NaN"); }, "'NaN'"); + tx(() => { bigDecimalFactory.BigDecimal("-NaN"); }, "'-NaN'"); + tx(() => { bigDecimalFactory.BigDecimal(" NaN"); }, "' NaN'"); + tx(() => { bigDecimalFactory.BigDecimal("NaN "); }, "'NaN '"); + tx(() => { bigDecimalFactory.BigDecimal(" NaN "); }, "' NaN '"); + tx(() => { bigDecimalFactory.BigDecimal("+NaN"); }, "'+NaN'"); + tx(() => { bigDecimalFactory.BigDecimal(" +NaN"); }, "' +NaN'"); + tx(() => { bigDecimalFactory.BigDecimal(".NaN"); }, "'.NaN'"); + tx(() => { bigDecimalFactory.BigDecimal("NaN."); }, "'NaN.'"); + + tx(() => { bigDecimalFactory.BigDecimal(double.PositiveInfinity); }, "Infinity"); + tx(() => { bigDecimalFactory.BigDecimal(double.NegativeInfinity); }, "-Infinity"); + tx(() => { bigDecimalFactory.BigDecimal("Infinity"); }, "'Infinity'"); + tx(() => { bigDecimalFactory.BigDecimal("-Infinity"); }, "'-Infinity'"); + tx(() => { bigDecimalFactory.BigDecimal(" Infinity"); }, "' Infinity'"); + tx(() => { bigDecimalFactory.BigDecimal("Infinity "); }, "'Infinity '"); + tx(() => { bigDecimalFactory.BigDecimal(" Infinity "); }, "' Infinity '"); + tx(() => { bigDecimalFactory.BigDecimal("+Infinity"); }, "'+Infinity'"); + tx(() => { bigDecimalFactory.BigDecimal(" +Infinity"); }, "' +Infinity'"); + tx(() => { bigDecimalFactory.BigDecimal(".Infinity"); }, "'.Infinity'"); + tx(() => { bigDecimalFactory.BigDecimal("Infinity."); }, "'Infinity.'"); + + t2("0", 0); + t2("0", "-0"); + t2("0", "0"); + t2("0", "-0"); + t2("0", "0."); + t2("0", "-0."); + t2("0", "0.0"); + t2("0", "-0.0"); + t2("0", "0.00000000"); + t2("0", "-0.0000000000000000000000"); + + tx(() => { bigDecimalFactory.BigDecimal(" 0"); }, "' 0'"); + tx(() => { bigDecimalFactory.BigDecimal("0 "); }, "'0 '"); + tx(() => { bigDecimalFactory.BigDecimal(" 0 "); }, "' 0 '"); + tx(() => { bigDecimalFactory.BigDecimal("0-"); }, "'0-'"); + tx(() => { bigDecimalFactory.BigDecimal(" -0"); }, "' -0'"); + tx(() => { bigDecimalFactory.BigDecimal("-0 "); }, "'-0 '"); + tx(() => { bigDecimalFactory.BigDecimal("+0"); }, "'+0'"); + tx(() => { bigDecimalFactory.BigDecimal(" +0"); }, "' +0'"); + tx(() => { bigDecimalFactory.BigDecimal(" .0"); }, "' .0'"); + tx(() => { bigDecimalFactory.BigDecimal("0. "); }, "'0. '"); + tx(() => { bigDecimalFactory.BigDecimal("+-0"); }, "'+-0'"); + tx(() => { bigDecimalFactory.BigDecimal("-+0"); }, "'-+0'"); + tx(() => { bigDecimalFactory.BigDecimal("--0"); }, "'--0'"); + tx(() => { bigDecimalFactory.BigDecimal("++0"); }, "'++0'"); + tx(() => { bigDecimalFactory.BigDecimal(".-0"); }, "'.-0'"); + tx(() => { bigDecimalFactory.BigDecimal(".+0"); }, "'.+0'"); + tx(() => { bigDecimalFactory.BigDecimal("0 ."); }, "'0 .'"); + tx(() => { bigDecimalFactory.BigDecimal(". 0"); }, "'. 0'"); + tx(() => { bigDecimalFactory.BigDecimal("..0"); }, "'..0'"); + tx(() => { bigDecimalFactory.BigDecimal("+.-0"); }, "'+.-0'"); + tx(() => { bigDecimalFactory.BigDecimal("-.+0"); }, "'-.+0'"); + tx(() => { bigDecimalFactory.BigDecimal("+. 0"); }, "'+. 0'"); + tx(() => { bigDecimalFactory.BigDecimal(".0."); }, "'.0.'"); + + t2("1", 1); + t2("-1", -1); + t2("1", "1"); + t2("-1", "-1"); + t2("0.1", ".1"); + t2("0.1", ".1"); + t2("-0.1", "-.1"); + t2("1", "1."); + t2("1", "1.0"); + t2("-1", "-1."); + t2("-1", "-1.0000"); + t2("1", "1.00000000"); + t2("-1", "-1.000000000000000000000000"); + + tx(() => { bigDecimalFactory.BigDecimal(" 1"); }, "' 1'"); + tx(() => { bigDecimalFactory.BigDecimal("1 "); }, "'1 '"); + tx(() => { bigDecimalFactory.BigDecimal(" 1 "); }, "' 1 '"); + tx(() => { bigDecimalFactory.BigDecimal("1-"); }, "'1-'"); + tx(() => { bigDecimalFactory.BigDecimal(" -1"); }, "' -1'"); + tx(() => { bigDecimalFactory.BigDecimal("-1 "); }, "'-1 '"); + tx(() => { bigDecimalFactory.BigDecimal("+1"); }, "'+1'"); + tx(() => { bigDecimalFactory.BigDecimal(" +1"); }, "' +1'"); + tx(() => { bigDecimalFactory.BigDecimal(".1."); }, "'.1.'"); + tx(() => { bigDecimalFactory.BigDecimal("+-1"); }, "'+-1'"); + tx(() => { bigDecimalFactory.BigDecimal("-+1"); }, "'-+1'"); + tx(() => { bigDecimalFactory.BigDecimal("--1"); }, "'--1'"); + tx(() => { bigDecimalFactory.BigDecimal("++1"); }, "'++1'"); + tx(() => { bigDecimalFactory.BigDecimal(".-1"); }, "'.-1'"); + tx(() => { bigDecimalFactory.BigDecimal(".+1"); }, "'.+1'"); + tx(() => { bigDecimalFactory.BigDecimal("1 ."); }, "'1 .'"); + tx(() => { bigDecimalFactory.BigDecimal(". 1"); }, "'. 1'"); + tx(() => { bigDecimalFactory.BigDecimal("..1"); }, "'..1'"); + tx(() => { bigDecimalFactory.BigDecimal("+.-1"); }, "'+.-1'"); + tx(() => { bigDecimalFactory.BigDecimal("-.+1"); }, "'-.+1'"); + tx(() => { bigDecimalFactory.BigDecimal("+. 1"); }, "'+. 1'"); + tx(() => { bigDecimalFactory.BigDecimal("-. 1"); }, "'-. 1'"); + tx(() => { bigDecimalFactory.BigDecimal("1.."); }, "'1..'"); + tx(() => { bigDecimalFactory.BigDecimal("+1.."); }, "'+1..'"); + tx(() => { bigDecimalFactory.BigDecimal("-1.."); }, "'-1..'"); + tx(() => { bigDecimalFactory.BigDecimal("-.1."); }, "'-.1.'"); + tx(() => { bigDecimalFactory.BigDecimal("+.1."); }, "'+.1.'"); + tx(() => { bigDecimalFactory.BigDecimal(".-10."); }, "'.-10.'"); + tx(() => { bigDecimalFactory.BigDecimal(".+10."); }, "'.+10.'"); + tx(() => { bigDecimalFactory.BigDecimal(". 10."); }, "'. 10.'"); + + t2("123.456789", 123.456789); + t2("-123.456789", -123.456789); + t2("123.456789", "123.456789"); + t2("-123.456789", "-123.456789"); + + tx(() => { bigDecimalFactory.BigDecimal((string?)null); }, "null"); + tx(() => { bigDecimalFactory.BigDecimal((BigDecimalLight?)null); }, "null"); + tx(() => { bigDecimalFactory.BigDecimal("null"); }, "'null'"); + tx(() => { bigDecimalFactory.BigDecimal(""); }, "''"); + tx(() => { bigDecimalFactory.BigDecimal(" "); }, "' '"); + tx(() => { bigDecimalFactory.BigDecimal("nan"); }, "'nan'"); + tx(() => { bigDecimalFactory.BigDecimal("23e"); }, "'23e'"); + tx(() => { bigDecimalFactory.BigDecimal("e4"); }, "'e4'"); + tx(() => { bigDecimalFactory.BigDecimal("ff"); }, "'ff'"); + tx(() => { bigDecimalFactory.BigDecimal("0xg"); }, "'oxg'"); + tx(() => { bigDecimalFactory.BigDecimal("0Xfi"); }, "'0Xfi'"); + tx(() => { bigDecimalFactory.BigDecimal("--45"); }, "'--45'"); + tx(() => { bigDecimalFactory.BigDecimal("9.99--"); }, "'9.99--'"); + tx(() => { bigDecimalFactory.BigDecimal("0 0"); }, "'0 0'"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightDivTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightDivTests.cs new file mode 100644 index 0000000..ce1687c --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightDivTests.cs @@ -0,0 +1,172 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightDiv")] + public class BigDecimalLightDivTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Div() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21 + }); + + var t = (BigDecimalArgument dividend, BigDecimalArgument divisor, string expected, long sd) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(dividend, config).Div(divisor).ValueOf()); + }; + + t("999.5", 1, "999", 3); + t("-999.5", 1, "-999", 3); + t("-6", "-1.0", "6", 1); + t("0.000033", "-1", "-0.000033", 11); + t("-1", "0.0019", "-526.315", 6); + t("-7", "3", "-2.333333333333", 13); + t("-2", "-1", "2", 4); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("-1.11303135570566757735452613975119540626335099312445395511e+909913", "-4.9428912981238120390359176251627374079558e-50436", "2.25178198057510227e+960348", 18); + t("-7.519050808224891132821326159698e-555", "0.0417050002083", "-1.80291e-553", 6); + t("0.0312143762310912553081058912", "-4.08382620086677699331679658629041009e-90", "-7.643414458839e+87", 13); + t("-8.660566651142957641766979855e-18592", "6.487325740700605731241602360168e-47415", "-1.33499796e+28823", 9); + t("-7.0140966397407758056324106e-567327", "53259.7776732322775987808330561104626988", "-1.31695942907887432785089328517373629792e-567331", 39); + t("2.867568612241923911789069819170160836469e-1906692", "-7.12441896102389693918811169596243150730e+81791", "-4.0249859362984554655443106786916039152860369641143618688585255330551064941359213504322433e-1988484", 89); + t("7.2e-59409", "5.7831139640342802478088151675935006389840e+703", "1.245003996943076834455034433890469750759315904851845063541633723247163682755452146320767e-60112", 88); + t("3.55055235944317737144206844338561241970e+384", "-0.0022624534102156295443300961", "-1.56933722630990306246023742223862701e+387", 37); + t("85.589843957916002336981173213", "0.0000578255253220352633511490632580338770863578897775", "1.4801394968962e+6", 15); + t("-351607.1187872102002591263170005488", "-9.43211176998759831430041388795767495627847463971963992990e+9816897", "3.7277666694536265675007568840266918599145597645718155579541605e-9816893", 62); + t("-7.40794403e-1867427", "1.07829970890779e-80", "-6.870023212288082e-1867347", 16); + t("1.25611e-7382", "5.22783672860544552165472229850258202818243975e+561", "2.402733798335500653391738916406216392904413019e-7944", 47); + t("-1.4929903958127657150797046e-31761", "-9.34820994328909660952679308089769623534838087e-504367", "1.597086934151e+472605", 13); + t("9.39168343132314935e+371121", "5.3947954122933792607331297865723793172399569985e-387897", "1.74087851597149903151101989151427616342421252127054094524491742593e+759018", 66); + t("-3.12646845651434317784659897194601292447905599816047557896e+83609", "-4.44821508711659247554239e+84531", "7.028591e-923", 8); + t("7.54405949614753081e+2945477", "-1.2969572371386e-39", "-5.81673726790834124060476166960328240382299131951266748135316067254764231735799071285353603929078e+2945516", 96); + t("-3.99879850022268386238702401202296926182374685e-101020", "4.941987958200394155523261928737367666185011455660081e+1521", "-8.09147762812200559345178485001850079766691e-102542", 42); + t("1.077950051217448803307899727500419929851e+67383", "9.63133018252238196604554120627877300948e-5273897", "1.119212020343321654951674321950063587369212979650466228152527216933560442214435806e+5341279", 83); + t("4e-75671", "-1.70839225333645877614084793215132655045157016180043878649e-12843", "-2.3413826609129567713111285198617587201274761608761376874e-62828", 56); + t("6.91439488419339340315975001e+5596001", "-5.16903704616137e+77", "-1.33765628345e+5595924", 12); + t("-5.7045884550662551247342877917788744897456312e-51697", "-3.44612644750133357600866e+9136468", "1.65536248944157397260819252517234149348139815239687213295268100601194e-9188165", 69); + t("-5.798080270240466658842194604602234815273651577331e-604", "0.000005507441779976069848143514575", "-1.05277195871976328938e-598", 21); + t("-5.406631153924624319629205640970181e+2086152", "3.480623868294410918927077008146482778988703493268074099466e-189433", "-1.55335116878745163354434679883585669329899340343081904982491891350342123010900374959249020654229e+2275585", 96); + t("4.73970296075144109211823587827902601864e+995", "9.0e+70025", "5.2663366230571e-69031", 14); + t("6.02391563857731888562808414061253329299057097272948390377", "-0.00000859431905432706316128773457656901972898376", "-7.0091831598274223499618905455260634629806935712003129886689780108271e+5", 68); + t("-9.682208878743727894539541638693047e-8149861", "2.68789960374616143221198636526210862719600140e-805", "-3.602146771125493149886358094423260127318575198065409723915337473739698227e-8149056", 74); + t("3.837820335697429248772856e-24", "-9.455691040938667713520206049214946596676072547630808599e+18858", "-4.0587412586573348e-18883", 17); + t("-3.6515736e-67", "4.031148294860998414946968992580399564234775910e+722", "-9.0583956056767024362785126665230736574031747156e-790", 47); + t("8.821270839203e-679", "5.07429888713154541185707012184700541507e-9249", "1.7e+8570", 2); + t("122852209.33596955", "70.15723957573339050956281378262617021489887806918", "1.7510981058e+6", 11); + t("-7.4593069795167803409689743730979615453017626076532e-14", "5.5663346748483061802960115581505188409329657206216e-7", "-1.340075186858947079885e-7", 23); + t("-6.55206394837274730440426799270292389479407549e+19106", "-2.8756448116862e+42", "2.278467744606746127818328395006356350085655193447054475691515164242056420749349939129807249261e+19064", 94); + t("8.64e+4", "960.48225415038070623990188582991488335939999902826672627897", "8.99548113738211054297392811171307844646e+1", 39); + t("4.30e+906951", "40771588.456183336193414605924790075225845780200889", "1.05465599031569513067326760432739256111800229582599411083097e+906944", 60); + t("-9.58661405316543228368760763975257686567373339e-7358831", "-2.313910171251627663e+3318", "4.1430363945286144463766335205684117955699333404499322374415e-7362149", 59); + t("-6.9559158998e+448800", "-2.83723925006274622872827466006593836684867e+631", "2.45164939814158014559493e+448169", 24); + t("-1.906282980853706848014890041641367947435380267110901137e-3574933", "1.393506253039343502489912911533790314655218002047561960911e+5053282", "-1.36797590731721379975696052094740594e-8628215", 36); + t("-8.93283097346249e+596", "-206.523149385868409472", "4.325341251102250290661334596938869666714176248e+594", 47); + t("1.706099938516851624077006505602294759546662998e-6526", "8.173763490727923844908558949e-8", "2.08728811452912854602428498444772623223702284906999212887528020533162563531780103382e-6519", 84); + t("7.940389593197326135731489e-811", "-0.00003654997953972994164737553239538850432513732114022407000", "-2.1724e-806", 5); + t("-4.3228e-1116", "8.864865600e+73676", "-4.87632886391419177296946272936162732123090506865665284310683740089641e-74793", 70); + t("-6.434512167015392179622e-5531245", "7.408522842627232539e+6763987", "-8.6852835628614546067092282202348002625881186498390751169432899715675788304629e-12295233", 77); + t("6.0902487774260370428642976805816787645545214e-6148964", "7.5854119021155769446167801709686445998651364641091e+4694042", "8.0288965925e-10843007", 11); + t("-3.2120904155341355747476839359766307e-9", "-7.8836687595691879463347598866117461e+1176", "4.07435993760557732e-1186", 18); + t("9.54840299023736708149984236017234055477610043557437948e-272", "1e+705", "9.54840299023736708149984236017234055477610043557437948e-977", 88); + t("3.602616015331472560955592560521969863314446783038758114320e-51892", "-0.000009441970853418132", "-3.81553392957919659196739917915e-51887", 30); + t("8.36327002464142378308e-5456846", "-4.1226702772597622341370819150656144937577e+170", "-2.0286051180887267413705307718807271002754666407162366416533614250649191231300041619677e-5457016", 86); + t("2.690472873319424346621055802539580796027419185779186808860e-24432", "3.268504216190878954310096433055532399962763307309182634339e-72997", "8.231511099150138356502834964202409620452717229808497e+48564", 52); + t("7.428249642380234695622316151679325106710e-62390", "2.4e-977", "3.09510401765843112317596e-61413", 24); + t("-2.22820726393277647144506439090068833253219972870532e-46", "5.56841444938689968910723598834822695961194434430534984855e+68617", "-4.00151117375630911580611713636285050732371989524994875555666134152593754919e-68664", 75); + t("5.262694813393922563321996504321750944298404865e+575", "-5.27194871272972704640595467498038359604198471206982404550e-6428575", "-9.98244690940664904824180323510480234891254747217390046867982787938145121410706590862433793592286912e+6429149", 99); + t("-9e+8", "3.2664588981099192225e+355657", "-2.755277e-355649", 7); + t("-5.603651212122744684360301186677920904987516640e+797071", "4.9958064506424300553261469051348812542e+10837", "-1.12167099896397097658540051011786267488651144897649339081833e+786234", 60); + t("-8.5517e+999376", "9.6709761353725e-467008", "-8.8426440933106609382861204631117022322680864436317976499429295071253175787715682e+1466383", 80); + t("-1.7351679399705858734112711e-7", "-7.700225783512425379281739340851003461459979259249134278e-990", "2.25339878174208077097179e+982", 24); + t("-9.25e-89", "-1.5070207e+9915", "6.137938251279494e-10004", 16); + t("-5.00908986898781781403504e+571", "9.594306468292974628815546812025040297907943190487345e-30529", "-5.22089833751061988567640162835383536040375896870047458122903418260221e+31099", 69); + t("-3.62116210365102980919563849163417520549036635149e-859891", "4e+279430", "-9.05290525912757452e-1139322", 18); + t("4.2249210117868151825850569355007155971e+4443684", "-2.296799414051960498455283054114e+6935", "-1.83948192686679028592157851487994594041898951624008242379071453644286557491435400935466725337e+4436749", 93); + t("3.778140914519654343155865295708356480390693e-4233", "-6.36608e+3186", "-5.934799616906564704112837563631554238072240688147e-7420", 49); + t("6.926278921765102227557189450", "-7.812398429709661207988000287030472469e-5915", "-8.865752283e+5914", 10); + t("5.52588573333732102332213278851769771097086764096e-8724", "2.02383031022516609043346e+50", "2.7304096126134830768336584365822907780869250235184735679058135774495742756972e-8774", 77); + t("-9.6770193467199039717825616309703958882916034534672395359137e+17688", "4.18979882378258924597780062e+496", "-2.30966205150236810986706968918539917699847241253752508255359e+17192", 60); + t("1.540945741255801235146421640530441629341e-59", "-0.28959050868264919998", "-5.321119632910562022779265944683536368088159036094e-59", 49); + t("2.33655464176415788042730153765978361685159812387632344e+966733", "0.000271032054732387189879751975458037143324874109460138147524913", "8.6209531343856555071879118346685369655541121912109514462e+966736", 56); + t("9.485789339622840784590481050e-758233", "-7e+726", "-1e-758959", 1); + t("115297180.9500040358261890643216883791745981094374599890744", "1.6156778e+59619", "7.1361493578734594128971175021213003715591134220857641959554064554207528e-59612", 71); + t("-3.1049010007243138532000993279548588709755e+1456", "-5.8689398253118613130602e+73", "5.2903950170580031454614795341541860027427127591621462e+1382", 53); + t("-1.864801574014925385704410998424068774884363551529322918439e+120", "9.92571328569748e-9", "-1.878758251764155965301353804071955e+128", 34); + t("-2.7746632190032869089126814262857001229975904e+74", "-3e-3595", "9.248877396677623029708938087619000409991968e+3668", 86); + t("-3.339303256823800935989097276894281516540e+4548", "-2.6988482496225472744646183693876133e+407", "1.2373067871788737121967452402266068399668e+4141", 43); + t("-9.143e+3159", "9.63305968857275e-8821327", "-9.4912730696000098685765139367599e+8824485", 32); + t("9.69383851251244836506017776859981387098944e-1119", "-3.82486379521501469397596288e+9198", "-2.534427114669977233684743545593026338923169057834944305720357823361e-10317", 67); + t("3.5355491459875958e+83773", "-526916578.223339198631317192353972585023365789985", "-6.70988405395932650363426244693308215766147991508e+83764", 48); + t("-1.09183e+7", "9.954814761688306975626749165618904112910970292700419135987e-84", "-1.0967858530145355305021090386646e+90", 32); + t("-5487828.385013699423427876683829029974006362", "9.70775568463159251831771571625e-3286", "-5.65303512293939798174704195640977462372739276120496777814221708332632e+3291", 70); + t("3.4e+13", "-7.7241638463e-56834", "-4.40177094589811847399159435927409788560015621324767443779903703361451052392857887634475048e+56846", 90); + t("-0.658690924922719154496897934506963532092562393", "3.178280915e-896", "-2.0724754750720930358570835596102855247222928153284399e+895", 53); + t("2.3965159581727651349084845200811431899626484394e-74696", "-8.7820838878771364433e+87", "-2.728869353526e-74784", 13); + t("0.000865430942545005171975190659906707039606", "1.6789219995971750975218048456704752992760e-67647", "5.15468224701712532995139975237591506850389520048483e+67643", 51); + t("885.79618773833589239786405248344813254970337625132353", "-8.36295e+93", "-1.059191060257846683763341945705101827165896455498745693804219802820774965e-91", 73); + t("1.081835133966826259588560869304219194277241e-2014217", "-49858578302402487496090.519165915520287193379", "-2.1698074249234998895175679433883336953413728036380998366881518478532879988065637670159030374377e-2014240", 95); + t("0.00213122587016272668", "-7.58628230959649788913899270117964644350805206960481e-767", "-2.80931526561668800323756802149661289612286702824601498737049316481e+763", 66); + t("5.177219e+3007", "7.57376706609665322147622649022190501e+994221", "6.8357251481e-991215", 11); + t("-9.981988992266175326096983489e+785844", "4.9262608738395023e-726", "-2.0262810370588970908199108167273414274913326131390490495456873672336640585632246896659299548241e+786570", 96); + t("-6.398e+53469", "7.98315991521555996711172647379199e+8622698", "-8.014370334490840848235213e-8569230", 25); + t("8128823887199812657410247368065460.20360163414228", "0.08378484866", "9.702021328685196e+34", 17); + t("-6.83e-158", "2.8175895559853748461816585e-27970", "-2.424057821158197187219767074023250518311886226126555993e+27812", 55); + t("-4.2410547403160631485383629457023185296339353385e-580201", "2.1918565642234396487048e+1925729", "-1.934914e-2505930", 7); + t("-4.7429026700504370681e+73", "-4.4919439983271391345e-49571", "1.055868610965933312279661988616829847461366643593609978489232372194518375246873e+49644", 79); + t("2.661588631416e-15850", "8.094740032625594480114127e+56588", "3.2880470783355005090592053672745e-72439", 33); + t("0.072", "5.1983683086560884587699109613617418155e-9", "1.385049995016875722967743429414378372439e+7", 40); + t("37129207042.34059433", "-3.4143681924e+36210", "-1.087440046008688747354791577515399771213e-36200", 40); + t("9.758536600372596325785494255136077167427367e+14592", "-3.585215106457210755904915e-7", "-2.7218831536207752639190418827482157555625712612874502608548806056775718717619968e+14599", 81); + t("2045768316.447", "8.667e+14375", "2.3604111185496711664935964e-14367", 28); + t("-6197516404.5727345", "4077346541.2387566306616005827481760152", "-1.5199876541987131942033977753149629852393423205812488857917610969656973883190681815e+0", 83); + t("6.077174e+13", "-9e-8468", "-6.75241555555555555555555555555555555555555555555555555555555555555555555555555e+8480", 78); + t("-2.691e-91", "1.5631861078143808079652313930129878e+9055", "-1.72148408084467219701462721427665493327930551598941271394e-9146", 57); + t("-2.8110373e-8559", "-4.437402446799e-59", "6.33487120832998204565922852639953595216609541e-8501", 46); + t("-6.9596693490802999514161313229487402867972607764597969656", "0.285226683055", "-2.440048481627601891131e+1", 22); + t("-8.2518803333e-533225", "-9.24020999585292426696466624169357039545383424430979282339e-18", "8.93040346161343297196403649076651682277186476894263236646878545305731717653e-533208", 75); + t("4.311965340061586939626215684855913788626e-8", "-9.32810863172e+10503", "-4.6225505e-10512", 8); + t("-8.82064291547559016172450119651e+79", "-5.4674580800399448262374442512877928110e-1791", "1.61329e+1870", 6); + t("6.32284303943007431017430713697567343622998485776636892e-18204", "-4.31887792782567090607946548286754406305e-12", "-1.4640013320805515334524558592826803332326816100722554340228220377e-18192", 65); + t("266981379708464635528679062258.658592890445", "4.964727712220529955255959094237e+36", "5.37756338683585589150289962166402092299189400317172648438999576e-8", 63); + t("7.9073150787460439055865282028109202712084498e-544790", "6.713853057839122093518452955731930140287889480527347558e-575", "1.177761117293657583125510758944553850835483047228170334416596532458195983379713435e-544215", 82); + t("7.46549264710535489902e-22021", "8.219797516276011666e-6526472", "9.082331568780059900776833452013563141000516755655840228779e+6504450", 58); + t("-9842810715.9", "6.60e-1698463", "-1.4913349569545454e+1698472", 17); + t("-7.22327739417772967251812419997120919619633699046547e-6186894660293", "-6.3769027162794938112644712016423387e+15531292765228", "1.1327250415374127268627640555328593529976903962e-21718187425521", 47); + t("9.68468476476931178176001218812114617858e-9042", "-4.351426837802378087e-3922", "-2.22563428635293669783342668520694795499991487062628653382642814248e-5120", 66); + t("-6.673881203135270007501032890781676e+197", "-8.6130247e+5574477675", "7.74859173e-5574477479", 9); + t("2.59540333821819953654940688e-246897272142", "-4.9195761293882986672634895403121365796657943e+725", "-5.2756645490531572282469478803463890191217367723692684945787639199827846880769858499841263419547e-246897272868", 95); + t("6.9395240e+2278489037670", "8.95379929543273201870087684015352822705e+2686557018", "7.7503680516267555657047785558173852295405088184624218108643043e+2275802480651", 62); + t("8.0096127e-8067961309810", "-2.4861943641101754193763318966517820013802487677849556e+28737902", "-3.2216357721761189414886402877242567323592454396651199043193694782512026268261382719200753e-8067990047712", 89); + t("4.5960279e+6886974", "3.384439396e-9878", "1.3579879448962660639115193658500954289210738167403131127008072e+6896852", 62); + t("-4.4261203993578076655836e+787568578554", "-1.09996983956065779587019620309266550937270720011352e+59408794921163", "4.0238561460245650861475347988199477648605072309975919369249233277670985289138655590183690383863e-58621226342609", 95); + t("0.428254", "6.08587970298546333861572751514e-437013115144", "7.036846288465372292244370006092052112772901167702223e+437013115142", 52); + t("7.690393e+80", "-7.604559818520535e-58509606603", "-1.0112870676972548059475609571154e+58509606683", 32); + t("-8.7801511725350736391998727179413695428856e-46359854365", "2.656781732693285651736344541155412284165970972485e-52097919051350", "-3.30480711474716594625752093810676249541657e+52051559196985", 42); + t("-9.7119632239e+8914261", "-7.649129054596519809384883678662352318e+253", "1.26968222847068850083141642946053701890587434551e+8914008", 48); + t("-16267894490157915816.761057622507335134", "-2.6263660e-57826799", "6.19406986313328599927087756333555000864312133e+57826817", 45); + t("-1.195589034688348019231392777232e+387700847749", "1.2e+193718376381", "-9.9632419557e+193982471367", 11); + t("-7.7e+1775502", "261635432706832846.96155773903613920484498458287709539496460", "-2.9430264549175137e+1775485", 17); + t("-6.16322132e+994316265", "-4.3969e-2987200797", "1.4017196934203643476085423e+3981517062", 26); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightDpSdTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightDpSdTests.cs new file mode 100644 index 0000000..8e4df1d --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightDpSdTests.cs @@ -0,0 +1,79 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightDpSd")] + public class BigDecimalLightDpSdTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void DpSd() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21 + }); + + var t = (BigDecimalArgument n, long? dp, long? sd, bool? zs) => + { + BigDecimalTests.assertEqual(dp, bigDecimalFactory.BigDecimal(n).Dp()); + BigDecimalTests.assertEqual(dp, bigDecimalFactory.BigDecimal(n).DecimalPlaces()); + BigDecimalTests.assertEqual(sd, bigDecimalFactory.BigDecimal(n).Sd(zs)); + BigDecimalTests.assertEqual(sd, bigDecimalFactory.BigDecimal(n).Precision(zs)); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t(0, 0, 1, null); + t(-0, 0, 1, null); + t(1, 0, 1, null); + t(-1, 0, 1, null); + + t(100, 0, 1, null); + t(100, 0, 1, false); + t(100, 0, 1, false); + t(100, 0, 3, true); + t(100, 0, 3, true); + + t("0.0012345689", 10, 8, null); + t("0.0012345689", 10, 8, false); + t("0.0012345689", 10, 8, true); + + t("987654321000000.0012345689000001", 16, 31, false); + t("987654321000000.0012345689000001", 16, 31, true); + + t("1e+123", 0, 1, null); + t("1e+123", 0, 124, true); + t("1e-123", 123, 1, null); + t("1e-123", 123, 1, true); + + t("9.9999e+9000000000000000", 0, 5, false); + t("9.9999e+9000000000000000", 0, 9000000000000001, true); + t("-9.9999e+9000000000000000", 0, 5, false); + t("-9.9999e+9000000000000000", 0, 9000000000000001, true); + + t("1e-9000000000000000", (long)9e15, 1, false); + t("1e-9000000000000000", (long)9e15, 1, true); + t("-1e-9000000000000000", (long)9e15, 1, false); + t("-1e-9000000000000000", (long)9e15, 1, true); + + t("55325252050000000000000000000000.000000004534500000001", 21, 53, null); + + tx(() => { bigDecimalFactory.BigDecimal(1).Sd(2); }, "new Decimal(1).sd(2)"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightExpTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightExpTests.cs new file mode 100644 index 0000000..f4c57ce --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightExpTests.cs @@ -0,0 +1,73 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightExp")] + public class BigDecimalLightExpTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Exp() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (BigDecimalArgument n, string expected, long pr) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = pr; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(n, config).Exp().ValueOf()); + }; + + t("0.9", "2.45960311115694966380012656360247069542177230644", 48); + t("-0.0000000000000005", "0.999999999999999500000000000000124", 33); + + // Initial exponent estimate incorrect by -1 + t("20.72326583694641116", "1000000000.0000000038", 20); + + // Initial exponent estimate incorrect by +1 + t("-27.6310211159285483", "0.000000000000999", 3); + + t("-0.9", "0.40656965974059911188345423964562", 32); + t("-0.0000000000000001", "0.9999999999999999", 26); + t("-0.9", "0.4", 2); + t("-0.00000000009", "0.99999", 5); + t("0.9", "2.45960311115694966380012656360247069542177230644", 48); + t("40.95984262795251", "614658133673303019.41715", 23); + + t("24.429", "40679902037.5", 12); + t("0.8747", "2.39815573", 9); + t("2", "7.389", 5); + t("2.13349", "8.44428600324102919", 19); + t("1", "2.7182818284590452353602874713", 29); + t("1.839758663", "6.2950188567239", 14); + t("6.23103", "508.27874", 8); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("1e-9000000000000000", "1e+0", 10); + + // Initial exponent estimate incorrect by +1 + t("2302585095.29663062096", "9.999998439e+1000000000", 10); + + // Initial exponent estimate incorrect by -1 + t("557.22559250455906", "1.0000000000000044e+242", 17); + + t("-7.2204571E-4550853476128405", "9.99999e-1", 6); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightIdivTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightIdivTests.cs new file mode 100644 index 0000000..e523d4e --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightIdivTests.cs @@ -0,0 +1,1034 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightIdiv")] + public class BigDecimalLightIdivTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void DivToInt() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 100, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = 0, + ToExpPos = 0 + }); + + var t = (BigDecimalArgument dividend, BigDecimalArgument divisor, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(dividend).Idiv(divisor).ValueOf()); + }; + + t("0", "1", "0e+0"); + t("1", "3", "0e+0"); + t("5", "2", "2e+0"); + t("5", "3", "1e+0"); + t("36895644873019582.63", "7.718100793996604914489691733070282", "4.780404643292329e+15"); + t("64651655727943229435811115735289253096959446020560124180.868366968824689", "7360719838491229774079511358613.90160374119", "8.783333307954736831172335e+24"); + t("5732393766279203252222389165296003290.63682245014985462079498107494454", "604416262214131.2554110409995038281134160791152213968353", "9.484181886966409051084e+21"); + t("54718351636204349658226278525013052787257592035681265.6551696525453015879627795539", "1733778739362714568517963678482776130.326376987489790108496", "3.1560169930516731e+16"); + t("3624502246404620098804280609381269252487775685790155421714.37", "7349043547918880804458209119523987375.3", "4.93193736405469396185e+20"); + t("687735627911862004719398564058596925.0620935155879", "661665211998060549450363044996.55374284667971784770628959", "1.039401e+6"); + t("66572157335610232175829083999736410997178640962241864841145.38440153149463694336448032", "54270243268146994464714529492351249645.652699808036888630134152758877664710", "1.226678808250038544511e+21"); + t("292732942971276303164400.91406459997909437226470385768809366689", "198192438228187.19331064172815960167534", "1.477013682e+9"); + t("59513888891694622872074991579832352747.76750953213187581", "1034906258845141436777187279.59996358842591625637494529316402", "5.7506550359e+10"); + t("1172999106594898633290312234824434379243.4801860622", "95738279960066655037917155155088.714077938577519507", "1.2252143e+7"); + t("761675922203981329104560243.9835854112143", "42099630209991.5141510026559149", "1.8092223575474e+13"); + t("5809679691291868349384510.869889159148782403055857608", "968063734.6587296392560462419982700451", "6.001340080506112e+15"); + t("6448211701617320255603371664198.5340", "3368801816950100745696.3161966526612111", "1.91409648e+9"); + t("296307971666440825302127543787554134590.8787941480", "70132070748.312321207262275", "4.224999611516123207381673265e+27"); + t("43316267360881134909526915727057444938633273740017.8743", "8449981286489717202695708883073303677909.127", "5.126196839e+9"); + t("819020770378245595322971.46148843954356073808", "2415.98170292066380708174348146592639105118", "3.39001230592159274458e+20"); + t("83927285454555017922297698666610175739865729347545202310339537.3278652647460600458", "910726592947247598215539743673389743548.91620652260659513559851122880", "9.2154205339446339839657e+22"); + t("14061020300091766687182333004064.977713896865594430775781461672", "1603155675.6098707422715529327283189", "8.770838985891179036316e+21"); + t("884417829852997942464829140829902963210303.998238049169987867", "929333994109662294460328961115.627127094639098273434", "9.51668437245e+11"); + t("36341626756628760.847811686627543419", "5675392302633600.96", "6e+0"); + t("1354393047076228971811094773.75142710111809116877400907981", "94010.663", "1.4406802418532342143051e+22"); + t("2323899790063830737512.4", "863478123123107.92481976439554835777064960348", "2.691324e+6"); + t("987618440115997794400749.66886993666234", "22675878469307144.8162244378033455161783123", "4.3553701e+7"); + t("10311755146414307104995151982206075782.656417449", "26423572369798720085998726358.52329618044", "3.90248335e+8"); + t("85825439910365248211723523342206879351067408802952823475398167070694.74877359955732", "9395294670590615962717315621184478652114.656", "9.134938596339949352358380082e+27"); + t("3887675240713332987390.06624570539414391734158464", "89243744783895207.1304749", "4.3562e+4"); + t("54189806660036935939439.080081712985235676947745502890219", "9525065684586.21811741894896243303", "5.689179314e+9"); + t("898745419120337851777961502628920754162493.8824413149687522658714849", "170677067198475739114538472.94204577", "5.265765541162077e+15"); + t("12657400526086334981940854550597105983225457.660202372124944932422", "68233473796487276154104883270147087.72180051463205586927918446190326023184", "1.85501335e+8"); + t("6345632808902376230689521063946963315827012597069.0529159662416267", "73258270548407389105574043380.7057", "8.6620019301565783647e+19"); + t("63844115443924159839.5354397381645502603251748", "52081622.69982819025995364", "1.225847278451e+12"); + t("77617359154359399979637128706216412797126694348836163.2512945227699082", "718837603415233008062911431359648059.3372340819820519509408068646262423172349", "1.07976208792633395e+17"); + t("668732048375068249003372962771883048177204902854.96487726443895268994951328539", "8871569348254537734994873755556956.3636585318947549817", "7.5379227972403e+13"); + t("7324307406251123088063945918653711585851876699.033332143835", "245602869892404795648901.144816419", "2.9821750085655759570877e+22"); + t("633680500600797246057382.84246458752199925433851961230831876420", "912114822400474893.4436760573240757178", "6.94737e+5"); + t("314980768367918935839846907821.91091077739529142726", "3947642548649479218168.675916915139048700595146576", "7.9789586e+7"); + t("766601157334780.36684250893", "2236910563.0047379551661118203782187993331185216256", "3.42705e+5"); + t("451179146035244376593938188389561517876737396268.3722082", "79787399441228066679210.54567781854364900", "5.654766907995114695463082e+24"); + t("188304063671200134806361092560975924383338052875254060764.641132643293192088709181800993803516908", "206116970278546727444881787333344078.52121483611191414235001972", "9.13578651077229552158e+20"); + t("3026382628170838932467292571682.1146045206189752690464743138046368419051", "1702246654223795785.80918175927260070027874366225531172", "1.777875503917e+12"); + t("483178392966349.6198121233391337620537347847685050911", "2747037840.81789827", "1.7589e+5"); + t("4023724691049830855319641297898623523.4200255290132117", "26383494434081.792819331307675", "1.52509164436233477471225e+23"); + t("6877796550342118800424967.1290389332492906987967", "30648658827696068.217878734991427414542918900", "2.24407749e+8"); + t("719011971274811849964719.809683493988763885568", "9.89194861037076", "7.2686585787657318957512e+22"); + t("790578656386098075660101307.104299875185979641661080042756754480274", "787268.019818325211180976689745004412384010257", "1.004205221709039886117e+21"); + t("858494198854556721817549727788176491362841015.84030009705645443659557259", "78790750228395754125645617606916509.017", "1.0895875421e+10"); + t("869646688222700738547643533332444218371582088896608051507.0", "1281647576220391717154866999785857.626735735318666", "6.78538082042263828610696e+23"); + t("66469857783722559995.211087204", "2172489924203217901.75259287934585", "3e+1"); + t("51984084611381601914008899838258105152.42433636049132506114610098605444573042", "9569816310.665266871464705", "5.432088028006026973165219661e+27"); + t("414951.2936961", "278516.75236654920204095", "1e+0"); + t("27889165636159229278421958574241971.7173321250321597407510931", "608780684433367768970.0958260198328624819790316963233", "4.58115152949e+13"); + t("31325348586591798934669006781575695118.72248093700625749849", "790477742343281400653.7740497194731301702067416467193682", "3.9628375232592083e+16"); + t("477297820763430240725102689.193874438652153546852540937610726", "50977.4033214710912988", "9.362929252271229984862e+21"); + t("13536773796609199399681306836634656854430251561095182562440.479700785161646843522660227938435", "6899697641187817329320644306067456122618.255451005721950718445", "1.961937247192005407e+18"); + t("2381373889138322049844907125209701606782407040.2330330510", "59573438790896784513124463685.01873763149827085", "3.997375235458477e+16"); + t("15009874504474088125494995090180881793574446435649285.95399729241871266079155820", "7994023476339887537558053452485.039756512235934240847094702083", "1.87763703082674093196e+21"); + t("149321894113620366433430659314130451.761009381237977752848331", "25875774828915149345499986378863322.0688818323564091828578268222349", "5e+0"); + t("493939976672086336405697.925291445190636467775112366908", "813926251653843673127.91682695105099073346580", "6.06e+2"); + t("963855060561684717831949176179796196.178851705050651576", "5674764504641093.4230471198398883271513279954", "1.69849349655549233494e+20"); + t("78579569768408197574.74415", "177668308997.891532298623383736397428619051", "4.4228242e+8"); + t("61108686571149946806212728223514943268914773.0", "5323064826026393379647255196088.928594643315913887175120559775135677258", "1.1479981658755e+13"); + t("1382828795086651444895299842.0701840449690096552", "48341628323.19524099674532", "2.8605341670362056e+16"); + t("141044777022706624397071865824451960354988292245534902.103835164801884160519466008814448546356", "625516891024850859709023021152499441.3940965259710380354179927630495354", "2.25485161226610464e+17"); + t("3383909955260533298806816503965026713181287831421002006689567.728388493726457139215233375717342848657", "489326232373007421141886950266739.662366358", "6.915447673528812565401505757e+27"); + t("92164023674341088.45012071227433289171688115770593447138", "1675199316534042.27750136403224942402891755971059965", "5.5e+1"); + t("4899344037352161457244324553904105556058425616763379.109691688138005854234064606", "562503659482979470924953274636537.3581621291285722942485", "8.70988829095859129e+18"); + t("512036851746554679379839026143992368083802967.057532394186266483130002476", "25468746832409733351.6898012461168020860537046999219826224", "2.0104516924836389935030372e+25"); + t("21178399750404.078200242066551371801579539042343659263", "806447904.4971825664", "2.6261e+4"); + t("4395521.80197383578918426307715499005", "2.19042050141541184092988028602", "2.006702e+6"); + t("1293749948117192138846929064803097702233184539371626321.3", "9894614327858326850919726257818672366.67012981899426520818538052648708", "1.30752943495193531e+17"); + t("950489904629218491182882.385", "50.055435994820274365748051876345109893948", "1.8988744893313385180963e+22"); + t("6721462722883.9311966354726787087082601741413325501", "25867.234256139566", "2.59844661e+8"); + t("9413983486163527516754421885066.479846304", "6633314177361.5759471", "1.419197588784792426e+18"); + t("7002240892739457.282399", "89015591879.3352", "7.8663e+4"); + t("17753832635768617659957602186770835847249564068657452538085.314", "5414272225835478934993841035541.91854", "3.279080159850849623699144592e+27"); + t("8553729051867653860352315550061555116210505978.8606644", "532148649404416860727903449060162092.468154664085308852337024918613284774", "1.6073946746e+10"); + t("8536876691971494129815868.6897706141137069461978", "46996438914351984548.0", "1.81649e+5"); + t("6738142388415833700.472993767579581588927912315304", "9199801.9", "7.32422552317e+11"); + t("826273980599097834993195211608140757140700093970401848613162.236180591377571758304", "8351332797745115916334876517053914.483416162382", "9.8939175411880868510041549e+25"); + t("487322874591251153754954926588608421417109463092990.1011277861883295118105474283076435", "91582945462431373829924.9", "5.321109428514263331756120898e+27"); + t("8433481464909454370642509052001964899280.2228783627688673301539647974222391298082", "30266532928398398232484872798443265706.1822461140566", "2.78e+2"); + t("65686681801982542.84396075122813", "957582365.894647770624411634929499145", "6.8596377e+7"); + t("7850604940208544890.9247585846806664911793", "1155040930918143.1609220900458103474609331025000", "6.796e+3"); + t("39392511281642750969008458658939595.80913687142", "5191932341769498710256865324795.288", "7.587e+3"); + t("9558675981301105859991877229873598.5154339956398358275171123983825685256", "231734499604794002120530879887.26727981104", "4.1248e+4"); + t("476674914347542301687791458999.66939117704198747838897927533336612", "3857790966727905.18069799747", "1.23561623337992e+14"); + t("31757061510157749074255570260815.3141745252309571619347", "5558718183494207037354935.115718972099325505519", "5.713018e+6"); + t("55815824571357071724508377429858590197270365301036620.6499621562531443269376352974542", "6344982556836106788319067366422.148316894830679515811039239944513903", "8.796844446990780720846e+21"); + t("55247716219685823858100730862446011271407657968442.2388", "2767291514389721456022328296.4650633073505614236873593850598833", "1.9964545091256768937684e+22"); + t("6761209.130763539353969547801764942251023246540", "1.590885201", "4.249966e+6"); + t("2405606665780351532451871199611687931502546956131339306340566.0", "6825669102701242156374198698389735.1059222967206052225797371246792243831433", "3.52435289432407215761911266e+26"); + t("877076167194583592693.876598666861", "6190254976506.51774", "1.41686597e+8"); + t("79069661333784501383656688613214.257990", "142518071705.177741054004263011", "5.54804456640089858664e+20"); + t("950777525591301850271871918739602342179.4975192615224", "16476852885091323001963060603651240434.4840677075888597330272", "5.7e+1"); + t("26551682789560636085042330404191471793442124027063025992124766.6037274321361454227147709963325345384", "774803664250584587578851487141713088.4957299207587035513251688453163648", "3.4268917423412408573383842e+25"); + t("46468371103211225997.1814005593644996981741", "18137114254170450.82878438255568214357155", "2.562e+3"); + t("8701396622178709820158605599474684817.7939194512400429727126808819", "5269807610180215.90684341342722968626667120953", "1.651179182589009367347e+21"); + t("522080413680928259313223.8350838672113571792330389637633", "967093098979306539029.5142749231584391", "5.39e+2"); + t("631057279219476761359550973233448182657555784618785135880254.4433511291602483132340946422059", "3739479405111145117383015003991123678215.9094479375490407161549872537597", "1.68755382997147546666e+20"); + t("9340382392708974624402664792170319874649661502.613864741909659563936687835", "94789964379299654069146.0880932655391611156772128371364143791387", "9.8537671723703469565858e+22"); + t("96144558384720050671049376570.336225113556797167876983377", "128639182834148126420949170.21703913656313462457355167212385179", "7.47e+2"); + t("44590415926988658828909817888389.1677103148", "9586443276004126152513920155.356137636194947762", "4.651e+3"); + t("9215124017686364502116144876460066.07953", "389873392412923003312746.50237370928673677566574783327261160564", "2.3636196255e+10"); + t("11561994696060972430401104454693593439978392.61858304753448649547803907017833175", "7392485698765829306705400315.1", "1.564019893605102e+15"); + t("3649070.164", "4043.453844671869616230574177458607576071808", "9.02e+2"); + t("28753538171328476925.0017010314596831751138657770", "49897.25884", "5.76254865292886e+14"); + t("59819348348776332442992247927722843864528890.75097663327918991715", "573076046726374761677061258.316253554", "1.04382915130525656e+17"); + t("47609439462721678715653967619481244095905572670134015715.65729840144", "885323310774998183628174741626809.26089705926186718635169318481577351", "5.3776331068302177444681e+22"); + t("298236340363707692048708241861991295188088551.4221467040362905598412803266728698", "463565019023489856620642648.3290607854102222131745220674", "6.43353851401361676e+17"); + t("54929430658455389942886768773694574289.0796444733881465290886813482232", "44918151271303370631927846249206.32550877632482876046", "1.222878e+6"); + t("939795570873706469603035770969517140837.0641903247563112818840087", "1543654040561654608534472.791305843048", "6.08812302613974e+14"); + t("3394118249472724410996.60867940867996614427101453", "986008213590938059946.4278174507441549093044701878559133", "3e+0"); + t("3219025755604178377990.9595258558146826339702675765494335625362", "0.0061921662377979164972614769813413", "5.19854543948571621850347e+23"); + t("622531843497701836225.44014041222798344570830", "8748034164866276.4452753664305923975621872503904739881720", "7.1162e+4"); + t("662614977396838089149840859098991636538.2", "9397894691412111466054.4947143904863027853588236090636071521", "7.0506746367603179e+16"); + t("4578829625898584634467190705373383011906064239155.1185477334628882810", "632007407091540422974017864157542424182.34755362226514919952546271946914195931", "7.244898674e+9"); + t("916832081126482424615311749127.615921221158127735810556635102616644566", "8384.837472180636635629849053055370895702252", "1.09344049204097784978620853e+26"); + t("4954.23611284032403311231075118740", "88.498212500550930", "5.5e+1"); + t("79610898256319046500444146615.6864031929205528585105087035692", "80896642883513608017325.0294514915892271454512031885360702636", "9.84106e+5"); + t("61808853465770082537520295307.248478033009783289862114", "955641982486404001.613606147559792147544273131898", "6.4677833957e+10"); + t("8110549327848459643976.8303173991466", "30737279.373498300268975735386980334643263", "2.63866857872963e+14"); + t("5810839929023546534104132044.1", "84893733939290740.4809653570525806400882710060", "6.8448396122e+10"); + t("172691117791905665518300359308210758886006820428.87539418140101206249892865907830466693", "660835601179363510263672967172874227337.06", "2.61322358e+8"); + t("3279456955978403711154968614687388316452522612700723465.149695243983336856328", "577588631529180012819465736405090.8861257433453983", "5.677841939679389639385e+21"); + t("666161807347337989311252336805857030347518.318052095204396913164161131565370664", "872761809105274731.8877136229902994508991839235", "7.63280199015885067221879e+23"); + t("8275938190286405120150409214247983637248944.941738387004126831286000172841", "12096490665151859987460112.926843", "6.84160259316209586e+17"); + t("7695708448947073283007565247678919802765643921.6229", "20676645248620766235122033771379805992.5085467726850799060647673284", "3.72193281e+8"); + t("8794449979449374744464818.38092335698594675809515993704042518861", "87246163726525037961.18644647", "1.008e+5"); + t("34236691816994475206275629492066992140.1738230523709146", "2129216496065696627150.95546985718524552965839741619272227", "1.6079478944605221e+16"); + t("4853912271361439786989095336830718.6076759482394948759", "72348458301853642853158792417807.55445527491", "6.7e+1"); + t("366715548457842547998161006130835982863471526.1874", "592192383096570032979767219778531853.99651", "6.19250701e+8"); + t("252654835644880329287257339.0192092664921880441830937674972", "114583965.7", "2.204975487638235314e+18"); + t("15914954356187834913890394667884070882296058039272228.29247061503", "89211668928209478511971223318021909.25768471588110887949696377740", "1.78395433550233614e+17"); + t("60941262.9", "86784.8541488681791123390630463904486146686497", "7.02e+2"); + t("812940878087050080928021459149088335661916.37", "59149491291803059507480051333312058007.062712657891575524497489888510", "1.3743e+4"); + t("8593971316358957359050500.50716500974128139452230", "25290964518847571007.492624342212869491225663005554920112", "3.39804e+5"); + t("775472515891.0522315643764386165675035428537", "75451710.196830619592652514326721501715662228", "1.0277e+4"); + t("268761594453672559012.57845518051", "53032431321491.356897991306736326010290480785407", "5.067872e+6"); + t("619377812175076884453708563003062095749704505261.1547623731721222869788885", "89106640169384537277237056784847388168.868903457426831166694818279050214563", "6.950972576e+9"); + t("6978479696336.407750472510412676812", "93141102668.5857961", "7.4e+1"); + t("516436650078318840329669774.078824828754", "5017214.837481322761649964308586776", "1.02932935265250407626e+20"); + t("490631762562589558.665786505312776194035633603735834", "649155.033821223610", "7.558005977e+11"); + t("947869242801417639782630473107601572138496682152399.17956931525088166548167556227", "840790471807620355694329990198.9874", "1.127354881607528220077e+21"); + t("2564692393707169.216665682542053468831487490978977829", "323563220479178.32428957186821386", "7e+0"); + t("2067552564632662838907661952976372191277000771111345175.796442275947", "3381292480845674951573463021547.80115165450475391748410248580874894107", "6.11468122425055511343146e+23"); + t("70216186412133337741582965462.52439383368643519565826224295231457", "4847013501.817153511151121174556393162", "1.4486484592173958541e+19"); + t("60223297680959656543180144197075879548136208100.5879200429893598", "6610583797054930889.55336697264241489373263078", "9.110133012426168452797858087e+27"); + t("1100714749763916836353092605748.52655085", "779697712515.67699911984429463192045202", "1.411719865398201107e+18"); + t("79626424799554585294898673037572734444630623847083.669713990919063402455473", "3128504487858810656625667140003.174840434", "2.5451913241157582834e+19"); + t("6499560612.7645915152780064074524537175219032747797", "50307.1949994616624234103", "1.29197e+5"); + t("966011316836321370187257766888009716196999338557221680156.778158238236921197664814398230256191359", "358196212874876634005370496387309158.587736035444731188320341011", "2.696877527216525217891e+21"); + t("140971373374810910985007504309.42888593963", "431202282197312494293.70224", "3.26926315e+8"); + t("675794608397379290709048966424086.68028114190127", "1240347490080565.063897869467564696954714209", "5.44842968443854376e+17"); + t("836232084565440359935123668.528958", "7271445413139990104.53416630912543262333107860536", "1.15002181e+8"); + t("850358657575460995515858566.890400808", "777933377391397802395.254509486818479707392046991771632811505", "1.093099e+6"); + t("761818224703452918328839655440734786723729570416.4198584034818320201087492939538562770", "21346360079648970861757141531.562732730023110894118984", "3.5688436897949142043e+19"); + t("519514128427497.31939346721795747746", "9491421.0538075082665", "5.4735126e+7"); + t("102986940807998690465748208569646362.946274165446616106329669", "5974890620275324316992866746565611.522984821183469702378289711906920", "1.7e+1"); + t("6707587600519349898241892091.77518934590", "594205895259507615.538773903283415731263438", "1.1288322202e+10"); + t("488150589181424309139864207010310632454374146702168720363.1847512517764753412429149", "97003800941413717490725115964913798.62744", "5.032283111011774364885e+21"); + t("6799686285593498192221915896.212905290078445310739698403963", "78132247733377074935645330.296657617326379526947267653278984790", "8.7e+1"); + t("7108556948604887166624271892.627550941216360716459572502", "42805403698.0650970130373336924750741731549185397", "1.66066812469431525e+17"); + t("912137671512451054186447604601690.5574512047932493751657398", "1263902716779730.336", "7.21683448736043839e+17"); + t("704346766625443412065178734792137256.31026366", "72396278074342368559021.9", "9.729046649361e+12"); + t("25627773207438202279.636045104992624487718634", "756649304601923860.46033906136178", "3.3e+1"); + t("1880709.9929396954456209927640755693275", "52.21986114320", "3.6015e+4"); + t("1041659292054230145523905801406135905.767574486006304", "1077256602740300721008754.2018892591164", "9.66955588301e+11"); + t("618444195.362352747", "982633.647761051003411599741028168777054568126", "6.29e+2"); + t("8149897727387665433811.65013493798188347071989440808507136850", "597.9009250302148183861539562679711032074904", "1.3630849838500938565e+19"); + t("77968836131557152730.6066503205214825633736137387446983", "26.623386260991337602910092388126481759", "2.928584492116140631e+18"); + t("58448947986859579208055033.3456389015102041572478", "2153905666033468518224.3437080580833650080075946108", "2.7136e+4"); + t("6993476184005449151432283167418719409242730550.1744014504259312", "504344745739771251341596348502601429.875559823", "1.3866459883e+10"); + t("9156021789624387244321355068223756591822.5416168", "929009690841898347514853467259.26937447940747702070366316654", "9.855679526e+9"); + t("54330185842672278.4555577425007916412274148109731", "1577.7918977414848348786821735039896", "3.443431666777e+13"); + t("95914671847110222364375303076989923584529.321328513604213290549860344185884058", "2312554910790387236242675768763668.633528273398", "4.147563e+7"); + t("9536271622989657941117893870005898725035.3960398586472072666106052", "107536934433621117261934491721512386591.0", "8.8e+1"); + t("718176021859626777576712.9692740745420691564825232525573", "609238197799407984.53913836735676967982363463448876432", "1.178809e+6"); + t("44147152562206392320344564636849995094742739797.0", "22991031307190888201.0855628802911798788502", "1.920190180785779688164390762e+27"); + t("660415483245802503290291333.923018585223", "292424134822327709.238637726447021751", "2.258416473e+9"); + t("20545531617482656229157718922767746778787657.207138153658", "61225931256372223626.90739984159221368036456893", "3.35569115828586678799015e+23"); + t("3077763588319523000185225537563626.44185631365877", "757408543454069.33478", "4.063544852932021776e+18"); + t("74210773509491015321971288853188186456501.62032549124720896856800", "9752831883987.0206", "7.609151310332355723859683074e+27"); + t("481521621431311221533120267738316547022210533280414092045.4966374181245341881928472226", "2388901580093030146538832183486060171435.86476411367808", "2.01566119527016887e+17"); + t("72192973602112762236525695725845138549950913.81954382461791921273690806972190", "96776330870187794023873578780566785636.058678146", "7.45977e+5"); + t("119742591046966404722195948781966721.01695296051172651603", "93983136488596469171.4752185", "1.274085921376921e+15"); + t("444082753643723744248929533277488477679501792598151270869562.76763265462818198600263743750205090", "6228439537840261298334866243936411059.67481135791895089583192454967", "7.1299199574105745428311e+22"); + t("110828482274142230779699188.529887251", "65.1586610488934782951339558171920581322976", "1.700901775605536564540131e+24"); + t("921304159208172291.2529216431120383371594612299467928045", "917514.9982922883265577583593400254752840711", "1.004129808148e+12"); + t("21372434357889783069576532404722246146517354041407290499765647.669218667449701212888", "24768136761466020720232473820284452179.17480045254367", "8.62900369281744600990052e+23"); + t("31633231595423543509401836426.27562360735", "39889291950325418827287.1439022707953", "7.93025e+5"); + t("31313038000190427467108862.953277601714227296394211746230459", "3310916247527933729395.4129976255128526", "9.457e+3"); + t("798828627572603.727971269738387662892849210789563", "756287390377309.8390763877257066774437887466165861796", "1e+0"); + t("9968141807136584404505388614528597002153666330600.32971832610670788226214273532224490", "97522181053577338999726881380804207134.5123753140759376519585414845", "1.02214098366e+11"); + t("409813948864900137311883423.38693292822924359250", "17428515002538920.0", "2.3513991226e+10"); + t("5087528663920644703276124295927173535751.4813142", "52830793960867582981156894718.060279975065", "9.6298546406e+10"); + t("33665958929797992460635570950732102086743.3833606153246096", "5132636402232017.45586123490333075481", "6.559194201864319963457884e+24"); + t("6761486086216997010.410185811259", "292.0", "2.3155774267866428e+16"); + t("27787087572938204426418141471262654835343.60473034315690449", "77635481413450955794455666.6760410840988434", "3.57917373178339e+14"); + t("2510639329969261502036105561.339791319063145213211372777606691685493", "46415415.49834833", "5.4090635686727858383e+19"); + t("90878252791773403803339322705716421483.63796461", "6737299372021.40332539299479421129588297700252", "1.3488825087567252917794333e+25"); + t("3043219466230196057545184137448.20174300", "179929605.27300054493937405646", "1.6913389331415647543365e+22"); + t("91235011323473120445158535647706675461799661544627662400.005721378402", "202734257522659312725891424885778.6194767584722957599226218253027670", "4.50022667300201674564366e+23"); + t("8484774342019449621624889342469393014750556168432472799.614503685556194991919663231407157", "26275635180415559306948656874732365.405171488523027822183897956371676", "3.22914147793600917325e+20"); + t("6242565779763524175877055161662911.88242895611525", "57244009222715052251.63296787522676108", "1.09051861749865e+14"); + t("9047285283920262654132188752851469760735.87672786068296691868390646", "172909606762078054346389651501946337483.36843656846586227537959", "5.2e+1"); + t("68651866334998005083777146996360950316005966076.35", "3199273631047355849734912810241.0626361122212", "2.1458579118949333e+16"); + t("90633833673440118887041300078024994593666353748975238.069036497377133717563318251", "698618159080301184414663689781005767130.332211682464", "1.29733005784956e+14"); + t("30988956441582629111918442206834.60645499990734957844500845606315281", "2217558000.667213998887496318434508958688383847610", "1.3974361181199652819142e+22"); + t("92411429921158629387441350086627665.16980803470607768851", "36656291337236255254028.58254986", "2.521025083279e+12"); + t("119410032331444575139.618912597435460007", "7816086.64930284781397775", "1.5277470387575e+13"); + t("6380616366644073709925285687254469007039153713114039505254.1418958672720", "71824778398422273933520161172698392.21614486127072549439", "8.8835865684818212691548e+22"); + t("11515434813901993618828527975116915272455948577608.0547126112132063424010", "6951623736036943717945331.61", "1.656510083278304172235235e+24"); + t("663553565463598017529814434530178210.43517205528967697167627411158858611780", "53946805542957.4891878403867888656831266035760", "1.2300145648757916607581e+22"); + t("1581657405986931669572670757908528745076166.25350485892", "4606973503493929803773540062612781.045030980261409248581231481", "3.43318103e+8"); + t("330805341115.415670001343300934342503387084729339", "148960643.23947943737425628979", "2.22e+3"); + t("482405705547678428551230144071583528261809512809463678579524.39989145135685423388999379509935", "98210098866885069227678568296796802.8213658332545965782306145369373187348432", "4.911976579939460716205322e+24"); + t("512415092983743942300235267575283292185729.0", "42913557004929820006.3800674340766", "1.1940634353029248173899e+22"); + t("2718709006709830896776883653257.965793050126809653361775289697064924621", "14941557018.9366131234", "1.81956204648832557673e+20"); + t("161319849408178477030430097879303610160.322417615481", "3936704418565912038725111146946774212.0992762597601570950353881413046808837945", "4e+1"); + t("7152365455807252.8114475144932", "21508450545649.800434851925939251", "3.32e+2"); + t("779267811590474773868960921493.5650187412978893643567710537304", "2036059179953184193229622.9950471042714096728277880668", "3.82733e+5"); + t("95267070358418654094356060.8770636288409152", "3428.4475058783244559", "2.7787233199597275914351e+22"); + t("111163702048072914414011690881589.35170454316948290135586650279", "191438999446236684122904138.909020", "5.80674e+5"); + t("9136258406578664576943286771.301299154717494825815", "26503453909182932.0", "3.44719538739e+11"); + t("3756118441930715228117924643520422937125620282010.835088520518383154810869922423000", "149968478128924180613155.136316782701504640295856933586", "2.5046052935882121680034743e+25"); + t("802662856201110019.5591", "641215895128.341535793413376913309286576", "1.251782e+6"); + t("97021890556855823302.697281829410469843325864", "39795963477131274741.655612288760", "2e+0"); + t("5659341372147094581269027793.4894973218792631215", "26.48605745427436161374536", "2.13672472089037969245119456e+26"); + t("642772579197291.2646018074748153069314", "96.1603340960838097", "6.684383797533e+12"); + t("2382436885798095836321091772155940596719817.2515282", "9618331673254347019264376508.2257465817491230496579", "2.47697518315252e+14"); + t("2634566212367964745889737226041.93413351", "70454.7698022148649745", "3.7393723941812420717963864e+25"); + t("78949225333267788753613658890057098294.9633956776049997856126989293", "74158942398944189125148354676.85457667996238842974887364261", "1.064594811e+9"); + t("80943544365286449702780512060783168840523788813127.36811828784445366271", "24164546692345354434314746697.38377176450140784020552977", "3.349681887098137756762e+21"); + t("76230861714240544361532502928340607.2", "879575540099893084959932639171525.27478310735045680646044881569425969023", "8.6e+1"); + t("22543573393132549729259835685359101139970668524531302589.385947082858850468774143474447350", "38534853334332089157818475391453264.72", "5.85017755161602444718e+20"); + t("2302099171318247978761229241856614273640938814838127.316025435470415", "6863809868240966824468333654517.477845841795365695426580878969795", "3.35396698846528786351e+20"); + t("3118733392162576122858669448825954701.5732582828812599341068", "32636435861513474722964.235490115", "9.5559864606427e+13"); + t("79787464002980766.83", "67900978906468.635", "1.175e+3"); + t("84088526972984871391117456567495346740780071311331.5672798087923110948298214293391880124", "8186166353490997806363848112580395620070.3202079646", "1.027202763e+10"); + t("79540039953293855128849508689228623.85282131097088041146552401226318075482", "7756085995721585071504594633.28437099509", "1.0255177e+7"); + t("2861497226975839919662576662161309647.590473116140437413930118502215930525540", "93972481576005234.010", "3.0450374183866285409e+19"); + t("2409441287657038852505645875108993665.867", "520646641534332968.8307946391", "4.627786094147220609e+18"); + t("289454627088798262252340538248.3802600969646187727594802120095865", "7195.9764229951559842797091162997132", "4.0224510208764633470802687e+25"); + t("1288427480779604805742409181012.715356", "87198068426597666.49450539968273104876311749", "1.477587180574e+13"); + t("7450529558798962209403045339750.12317696201063871380682", "94615223634543811568747189170.761803735124782784720306672091", "7.8e+1"); + t("6219346401711891004949077187092224172252284899312121135.1358317628566764381135660434617541423", "3536452048506796341070283035104620356160.58181165231317856207178068705476808815", "1.758640104943003e+15"); + t("82720661721559047695186558320322890551785.8020770293384802834226676", "481038277700139876760017826858.976505337207480194780", "1.71962743e+11"); + t("947820270859795201628025830751730199909329865719805.326312524950590254835", "9891634595298979464924926934927.997300487", "9.5820388604958053761e+19"); + t("2565856001004088462040.104574163550268292745107433180284", "22.08984611745283285041925479914651983", "1.16155449311928290008e+20"); + t("89395163286394733047950062858829661190369055387.916634595679755", "5324944231421784460507849019.132889909341579187", "1.6787999911602044262e+19"); + t("67020091012342182.667446584679610209992", "13165110795.696119314770017127130", "5.090735e+6"); + t("32168609543204150227989635423701256239535092652043.6367502", "25205664291332806421258770230171.4690566997139308531926021489", "1.276245258660594592e+18"); + t("9505453290790869892565597067.38868612564613879357851628785016", "253241585.949939667100150", "3.7535119894052039659e+19"); + t("8828873915187218757419862356968362143.50376096", "18756765814162.33582560951751034", "4.70703425241944364143991e+23"); + t("414114555441261.5312415247329177240739996510", "533130798.9388904086409432503419897717012645547592", "7.76759e+5"); + t("19618680000282311916500403354885184361606.642238794664", "8397012046467794680170976686258596.71", "2.336388e+6"); + t("71213360145365479249598187248.3995", "25674986587158866013809893.18695355206000676949064102778363776593", "2.773e+3"); + t("89931978982582358651624915242201220773585268.25338060326735544043391594482", "604135926699031727314326020012861963989.54356149910340529956", "1.4886e+5"); + t("663191961669969962089847255128.00118617609406688676758487058461", "74344812903947014713360584.943405225215165676594884730006300", "8.92e+3"); + t("3453684526349591493121097637486775230.4165542", "896430781880729196376411093803353621.10554993642898021538381485913", "3e+0"); + t("700904883925451647853111747240303629023037023479.817525768", "988213577749684468373499862389.615289577824174434460", "7.0926457570186471e+17"); + t("34304309480313373.9875291919106797094", "2852691.377889555940287865797", "1.2025243861e+10"); + t("72209105815015395.4974517632374", "4853684.6637480956386877685466", "1.4877172873e+10"); + t("134803423888410099739656804729708675286498528.68032655047189119852582329753796", "86270788461110954469491628365821.302519644554621448692942184662666880006", "1.56256163057e+12"); + t("9665100926318185012179790538122021712.51", "643419546740603465273801385977643189.2883366878842408163169751927709259739", "1.5e+1"); + t("74362350236173641211885717889321879221471541685530672266536.290", "374426606237330464580009496896023430.0", "1.98603274974105429076185e+23"); + t("48930446848745077381509.58122499904688859", "9176987.234127144792", "5.331863889576285e+15"); + t("724163725926717513233532951951953930.00769440745720157858", "574204318905111691405350744529483.74695328821448558184", "1.261e+3"); + t("64427345729731168842579.69353507216784468961793130610", "27886950.4553795099221482243880208144404436809", "2.310304449847181e+15"); + t("14625006587630445.1742266210212", "6493633417368531.742883363127497198728752371516115", "2e+0"); + t("45847346883375687542169754775096250885345986510920803636974822.4349140548040319500217516282224710273", "293842391428818462649351400920841266.6823", "1.56027000258340632545418441e+26"); + t("88171794730830036063587935.9173305168985052689304904019759376", "12346360484139807.2286576081064648152998290", "7.141521166e+9"); + t("58774904753494470330901679050542558512634978538039730556941.3975110861734563843", "48530977814030803461859438584459215128.2467448463158848", "1.211080167778981830451e+21"); + t("10103619775034070815534445192301102141420263090.57906948870005547034", "81251977684446480682256664971575512.87059357907", "1.24349216634e+11"); + t("682570795216008085387498777383328850764866.4275304280843133581735973060", "75700398504466.027948194334852487207", "9.016739788704534672820096766e+27"); + t("323049978347236756602.8736687071337656352021296128", "772285262389.107797", "4.18303953e+8"); + t("1670139212904113008352808556949589110633968120849209.65210", "18056863391168830887289330.7911988536322623700403670922899", "9.2493318286992033397174035e+25"); + t("41132494903721339483096065.0876", "6397828427660218120.209104552234381803145865772", "6.429133e+6"); + t("81602309462563170149276620735045588.695282362", "959432788.78361", "8.5052658629710136944422896e+25"); + t("312145183791151049094273388413398062853.4850", "4673970731553.0674601358464635907429889720798645400763", "6.6783726668188060377370818e+25"); + t("72002030363877564923312584549524073.38529927014235327939192", "115214098943258757.5635337952040245", "6.24941140227443011e+17"); + t("2537576337938613417266707796231193660.3196705577175458950373044706979707860", "7323837365536379313606246.4342373293216213777744435006821", "3.464817979e+11"); + t("89172180969323428161381535638.5475049390748970587383153170115949304", "5037398.358892835744180192166975", "1.7702030813565136415691e+22"); + t("85891691778312059856703662.0707948448590903782630269041201", "6812080080048505801543.8991272170959993208", "1.2608e+4"); + t("3204900.881455322009276880727382769875645792", "22535.0", "1.42e+2"); + t("881401812458415945276.07836418455626124690", "603260.4149646026", "1.461063564911902e+15"); + t("717601961033851598.500", "5962190022.8964479613858421", "1.20358787e+8"); + t("5665.81434153812741", "55.908142147894", "1.01e+2"); + t("555151613262784555706923026886665310223608304507.834927141", "920792528203117496860222732.700202787237775891117250770408", "6.02906296759527720524e+20"); + t("42705180.0566060960740365117503344", "3190.20224129117646987313244", "1.3386e+4"); + t("53586654973677554832036.727614103798730848361452294522577362756", "1723850381634853.49382244176351725", "3.1085444e+7"); + t("8075529207621427035938411625290288940134761326.4843276467765000599161555327752801960629", "167009832742854705129928349.888531038241700194137", "4.8353615323088980672e+19"); + t("12243920347.78019931332457206", "10662.008760937878621429771725", "1.148369e+6"); + t("46640036995527230277528065524416100039949894476399366063170906.06870634", "9874651542271593808246793378280876256.734192", "4.723208388252454663095329e+24"); + t("4006876842465714844188831.5969407920172227004831742365", "50620571340123469707.4512458295341091594261343811112", "7.9155e+4"); + t("377737226023460183796284932215619897.386107004559722515", "6631049403470.465849436547545829720910662394630", "5.6964924107753647569656e+22"); + t("94168901831971474.682921766601", "280027190802.352984098460106745060880", "3.36284e+5"); + t("8125311.3838638875892831184832347446836074799", "2706397.62499523203762104999832486849167", "3e+0"); + t("1229640029170100454145051119275323467913.08755250628433771816821520120996802", "833320318021599178.70735873", "1.475591081337619441891e+21"); + t("7337693315048668346529194627233957003612546756586.35620919922707320525396265709", "9431553067702071781247594.327397", "7.77994171519457198716547e+23"); + t("97184775385346771375916499941.689361878336539", "571501494.0", "1.70051655867319169905e+20"); + t("44224858244830574454824248881390239063.6133313897996145", "74774869906020882299909426.9392871921522884130202053799", "5.9144012287e+11"); + t("509909572685498641599903.3088790695123575709126360", "32956460.533703604907286497437726189968858704154", "1.5472218934555459e+16"); + t("506141615004556063927954912721836947545.0", "73874087425678873716325379036359388.40538007978691386098015", "6.851e+3"); + t("83526906870910217716094867719438531428990694252.6890464145636170454377614", "4615168421685768818138.7945460018", "1.8098344250760970781261434e+25"); + t("8905988891311767590658659200511373424.3967936493859651449815682188452290253048", "233305960057090435.72214224180", "3.8173002049036613856e+19"); + t("190.4039639829880345703909", "9.09195692708342896839903829973071174", "2e+1"); + t("8192358398252559153762.6003760084421357364780201173738", "0.3638925185811148730837", "2.2513126761154914301471e+22"); + t("6995524432510729335957664879027514919179245781821.93828373179206164507322583357399213", "7694679647506406867852.344619229", "9.09137839777091851952716007e+26"); + t("9667707732553.10419349", "966794924081.31798549845948989367780425646", "9e+0"); + t("16809269109290.7", "2937700.1531634090336858", "5.721914e+6"); + t("88246600933914227428679998714.022024360344558515035362983835986", "2232278447500334580999253.32744151863", "3.9532e+4"); + t("232724246935564123335739247303843798574.2", "86908236501.8069242383339661044104431703453870349", "2.677815777917959629762205118e+27"); + t("98345970681326307966292.8718651360031962708", "653171802335228283312.050253775614299894015215874962047822889", "1.5e+2"); + t("51397600091748480127.2088050853", "790.60640695479", "6.5010351092041678e+16"); + t("1798241768560345355621133025824.6984102763295559923584224085607168030", "3410020656672334915.43679411642568775188", "5.27340432686e+11"); + t("666787224655039756153910917958143384064633.78890700527098985467264094400074647", "3971614846428591185037.8071527020551782826483005888589226624965", "1.67888189171877307007e+20"); + t("45330989381349088176036500519957232026899506483903.3693057963751666194165", "19635428226308045377682221845614880482.0", "2.308632582843e+12"); + t("837932897464721.87352992669372598648319113910", "57.5192307354847545533321868737335021062", "1.4567873852801e+13"); + t("7341715434779841853967728937477.927067", "1989085313982.55425058192619566001618556450153985108", "3.691000774662717221e+18"); + t("252521402072303815947752206072867063949.6881953197", "527640044408832839908.0", "4.78586499921984575e+17"); + t("15154437827507975634.79", "4426306937054478942.8831086551423519835", "3e+0"); + t("373588908036.532213022532", "85331.576260935156", "4.378085e+6"); + t("448726769169701581880.4554411167433794366094382", "5048771777.832488929244107374177", "8.8878402295e+10"); + t("67023217149624564.0", "316166826310268.648884140875", "2.11e+2"); + t("61873040465546604543754427696088758690115.26451168879610092947219098363126097", "58155881015946579806737.84774119324", "1.063917171998146919e+18"); + t("21164038018831557445589982613341139225.95934817572123653193", "881074848284120.843058236535", "2.4020703871014117078626e+22"); + t("8535408832459569490517181424509365728977141172353903808407083739.0", "4065093747822348218936491329017064777.653", "2.099683146798754207037050758e+27"); + t("605997568940930614213036397430024135296072660.334", "64940520114726172393873694050702.5431763234711583293426774709121913633", "9.331578617946e+12"); + t("1033949280835117588546664225.495976052157564530541615768808", "104151056711.4", "9.927400772324043e+15"); + t("331281.263520042191716194360794901934975725622", "91877.8928739058075054259406", "3e+0"); + t("740017335.015847113341777580343920231", "2.0384101060100990", "3.63036531e+8"); + t("731705717200752945308243442895300383.5929840908728685572861789469818599144", "365483284760500911492.98814080", "2.002022384362216e+15"); + t("792509704762196705701313629865043733577.9714652359144623801253515417934664964158", "1998668251133300.0", "3.96518884168406564858004e+23"); + t("36170472034683461372712043735465401502730842.8", "24540827927027403747853146287597.8927564183376510547715651519420915007914", "1.473889639837e+12"); + t("141534430887319794686774773268132280030.586045742162904", "51082373606872630877984685.86186490140", "2.770709755512e+12"); + t("4264318965192230091576077097.971897", "89.28717698303952603962", "4.7759590002518002939797376e+25"); + t("1158478377824188531161302177318406854795685070.9550062040598448300018410915666082047", "103814356501289272212596382955.340898589810343804790815516", "1.1159134602060567e+16"); + t("945837294552976506396924887.0972458764014664", "6901049.5968489833042637234541648", "1.3705702028063172674e+20"); + t("82411904611172859259289852777372.080994051", "195511.4658429135", "4.21519547489802412182038977e+26"); + t("12988166325.178390270777355323613951141546773375", "6056741.16488739901468364101952", "2.144e+3"); + t("7790188862262297808696351311081431455169380810981.2939501502961939496906887843663", "9688371966647101054015381213650353.22811234186", "8.04076153256766e+14"); + t("266378599338336385563929960568675732178127.885617596130174737749796442558222867", "300570837142623382332880.809678383580955", "8.86242330994798097e+17"); + t("86674550910063542149424960021255620457265485577362030.98980221655183625573653105", "748054979535232472776520776212.16742388", "1.15866551632227022724247e+23"); + t("9481867473683193803434.37819093657035214116725658042072168", "203655287.120843941491920908666165094", "4.6558415485952e+13"); + t("805324866738363320828474614.480", "56162041772.86042", "1.4339308923193852e+16"); + t("83336980219606474398009952692713912501367.199636061482", "11028967292584166416059836.01660672243509704304971087766", "7.556190712039007e+15"); + t("1219197584212.314", "740428.311346198893835548942436837046", "1.646611e+6"); + t("60286481904069902987819067201196524141276256703545309769273822.8290996", "998434833685899026302538967695719608295.1511229", "6.0380988192801404374872e+22"); + t("51942693184307148401246.54", "210093.29233134999782920826486648079089831170", "2.47236323482357509e+17"); + t("23143496.6170754380877", "33495.1455", "6.9e+2"); + t("3219782254166081070465676620420674480730.6098428791655097397340502823", "22684372849660.8726765476922245", "1.41938341231867745474078657e+26"); + t("1489210346390353090.057706915504976", "5433229.770496111663561525526276159", "2.74093018203e+11"); + t("18886595312176134995881605303205215213314030163608932.135", "90056933448243013080703797857650593.51719467086101579937951953", "2.09718392454818896e+17"); + t("775491933997.85604801861329954", "80.01408326981", "9.691942996e+9"); + t("8314969138262557800135767152359567965100210088.79881810647114453482512806", "64881320851812180590625843229063.34216535482000987", "1.28156594673123e+14"); + t("643599228630699698138.61707155379173789887223474164204024", "901850962627.1260234925", "7.13642558e+8"); + t("107262910245411125074503825531966126300180.7334098229251453350138049173602916", "1674763691207585887054481597538809894213.160870171702394336933245669040455093", "6.4e+1"); + t("10549847583080788210210.0", "79.1140498671952593977604111238", "1.3334986138100984541e+20"); + t("51714789116197039772826251968311155828678142.0235925", "5974295247854190490012266909930.55388296616882857043630825537859054", "8.656215833117e+12"); + t("494464156424723513701626680573687038259.76983269036055", "70631921709.17", "7.000576289863683959820347046e+27"); + t("227427126175204729364406565216174.89594445722876228593249391484698233655", "408026842199709696111900549.3596993089", "5.57382e+5"); + t("51355869550418745948099893914016132848452568924392592845077111920.7527832094925304167849253842987899337", "6692588091904374595313774594134776022.5518694286746263", "7.673544052791906336781872002e+27"); + t("62562658979141095134666293620315609.514760", "39910486009197711398555305163694.859024314073340", "1.567e+3"); + t("5882598360847202450057037300708604929663365612.613267", "746909960921258658708342948678766967471.789516223744690514247094501440062", "7.875913e+6"); + t("1035899914160894694.5932195869435633503679886256384", "467429676.711783998471976711978441449372240473", "2.216162057e+9"); + t("32014756177149871404089537663.7992867927278939011716211454806", "78822116925773698220688.604565846104090577367660805604242639238", "4.06164e+5"); + t("811047709964587452166468548109808480618197091287118.810388659849653906987223807682836270125", "507799380874387879398641129728623823.5923973499133316603645406939943701", "1.597181368295548e+15"); + t("64536966331244179.16796086997039227341629854457", "1242256600268.0", "5.1951e+4"); + t("818098686921433992987866.814826105155714053393988633", "40222455151702942.5528416292814973154300490435546545317394", "2.0339352e+7"); + t("7553910276659070269012425398712783883640354541860301350.386", "5276669978521301013319441166008388021.342100525663226970109985092942668675191", "1.431567694664870431e+18"); + t("389038896164242499541198314451931079986136659431914455.45316690341083511362266562976204", "2016084668783051664723727725.0906017568", "1.92967538609910676229133227e+26"); + t("413798364691378933308195970832279005620430.783537334249902", "814455764481894163.3287631692357373086825102247", "5.0806732880650870189962e+23"); + t("495946883432974042086212520052457189266839439093.069888410216520174041679171922", "567535586959552538209354.703151101338215315485008162648175890", "8.73860414797776333669985e+23"); + t("919887450258077609131348933600446927261389293524.86268780214409854", "50564182510486180008824025560.26102044728169633594307467897978553722", "1.8192471520078626366e+19"); + t("23417242.576401", "654840.494192113794548448", "3.5e+1"); + t("961076684076787384638982528361293567.75542843473435300975640022102693", "77803179946554567675429867233716702.3985463476147399550177187863499189466", "1.2e+1"); + t("5660427029579194203790076069569696490919640382855226.0", "794447177869687614654803.061366421855736501754582104181926574754", "7.124988529454715307227747492e+27"); + t("18930273927713844627800392879508195439086821394463807043985.04914885764232103824", "5643013585711862489310655561529575242.996519321", "3.35463908427323109103e+21"); + t("228317191958555.7225476894890091701225948", "2919428056.8261594655", "7.8206e+4"); + t("3061669462783201488069005144486118745732136.15526392196914643568", "534684714327299321996694660978581073202.71400659963085643530863", "5.726e+3"); + t("92628605127976455588891125728711821.40135243", "11124782648.29543697098256292", "8.326329426505173914272545e+24"); + t("21511442998453.517762739302559255", "902746605318.327889162", "2.3e+1"); + t("2962060175673.62", "32433317513.5168529879758376889375657028", "9.1e+1"); + t("64985922853767749842545544085.2717", "223407.467744925334070488550597674002025924335", "2.9088518620140841279627e+23"); + t("973926374599015178148662.5259866315512108465148365695805882751099", "9.4091182", "1.03508783065241456755072e+23"); + t("22193665339942615554382782614650171731850824767.63804235990814293990430881", "13714781804383342431932474816.61", "1.618229561103871244e+18"); + t("8957788951943961360270476580624778700757.982153820787123027519095955687", "8338556574534.0", "1.074261339102873106583487496e+27"); + t("13124504224292047553135309370212610.412051689087164440390552435", "75867646822799373867407096829.05846377393460162880047071013254", "1.72992e+5"); + t("8802571884604783177143254551802.9749165405841112281414813663", "55506.8889755962971813985632673746", "1.58585214323123921048952801e+26"); + t("228133215837923334347376.8", "8.0942854514290085656", "2.8184478692637096567755e+22"); + t("60755294701803481203259511590584832932.9243814408215937015800820132027313373", "344145858708540370721325173327588609.76204", "1.76e+2"); + t("3737998232577326418208777257575812502506681.176309724811752734111260", "865844200246832560021235181.11617825", "4.317171878626325e+15"); + t("2482869486164457530779219919206588532.015090664378275207193", "484868618070764670571.73500697863855033528206243419771", "5.120705679083756e+15"); + t("7678179515444583767305211117920005874287.0348872752341152383326", "58948138012690721302417849534876584.8507906817743797", "1.30253e+5"); + t("253101141231994716211434301823688578.88419213", "88980764614395768934502383.13323363239965231", "2.844447812e+9"); + t("13437433580887136898079980164773375711629747617906.59782866812193", "915710531535318736826281561973122673.07455864794948945076948", "1.4674324601637e+13"); + t("83871749375325108839030467146052963497.4692700383", "255639976626247979.87938673130755769849453057652", "3.28085421076171109725e+20"); + t("9667852729932020997859594881983126939897294149718545.86", "53276667404701666452116833535295.49004839723063601006527599933777", "1.81465042783040759301e+20"); + t("350906500011846355.8273233292905629308012211261389697163002", "2111.5672435048781815240419703157", "1.66182962484962e+14"); + t("6108320931314187291333165918.3653887896219000336", "544.0012490193824689", "1.1228505343186355691116019e+25"); + t("7018134189630833771719846889372118013253966448096168667628164868.2848130598881217708", "61395642559830451588068252642627915613.81763283750750235", "1.14309972125328218829894409e+26"); + t("6792706962535547029423049967756843316427715327621023843293.99754099", "17917253246980051091656767456311122081.0", "3.79115418468534300789e+20"); + t("922994140497324355475.834956546924452670220", "719880621923.7057", "1.28214889e+9"); + t("1352679126725378326854008716.7965829738976648246087243059940", "1820598.592849207046102243871272362762", "7.42985923442057372255e+20"); + t("76503786436164400549400743007711834321461783586810.848781583682368614456752", "68033827523005350933093.8925146274036045506135661203851", "1.124496286943358711448473601e+27"); + t("45973960760251736315612.8850335657688649999644706240015429118551", "979396122754515038300.504", "4.6e+1"); + t("38965069032425085319587380019668643395599207200105433.924242400708365718491463542768", "9669834888916196306100871331690443991.89540941", "4.029548537285554e+15"); + t("75858080763736.3923195686875407070735", "37595.949812032844887175315464", "2.017719492e+9"); + t("61365224397509015787179994388507306694584460780241.28865690785494660543707", "81301293123658261669746534003.499243431263464593", "7.54787802749622544989e+20"); + t("270363854672727763934343410366562010602905.5338331818769657245861611175566644", "39512591176531504.8444253062759596836252722", "6.842473414735460784465363e+24"); + t("80400563186512577796425698999803.72015603113776727399439321261242220051", "82411715.97645606857017909", "9.75596275770813334555033e+23"); + t("5605174880.4615394225916327092168458661610045726", "111281719.154480383488", "5e+1"); + t("938351294487473024356890313366077778.055", "761831620825.17844684059889286777704256", "1.231704314755401161926259e+24"); + t("4375833205432171.6511", "57719879600764.8001308599082918364616528592967301", "7.5e+1"); + t("6120020249.1146409009261736", "83.65271168020874178151779922934209022", "7.3159854e+7"); + t("981408760407713100873.89778485781406447480283999", "1521946172699.5527156182886049003883501937477", "6.44838022e+8"); + t("38538349280587515007335145.999", "3709516008515909506489965.34400410465003826007135", "1e+1"); + t("8584786247295696635849880972737274.787572868522059149822533", "52236266518476151488948888902.03424688095139505061892391246696480", "1.64345e+5"); + t("3244545167456459130903706130422316843570078186.1799991", "631073597340634538.6142441622182109047512019794124736639", "5.141310270512159105644094899e+27"); + t("614671823727003035129151685158800.803254728851354679804436350922835482651", "25259397281814139.98842204498364783655926245803534781552", "2.4334382046777683e+16"); + t("465095032175032244364463920017883760737017674348.0615578821783815808957174932", "70985271244306592317.30060629", "6.551993449096461883345213181e+27"); + t("15818596909712603700184340663887.31342904433178633694581999257", "489906483756732030218156.941443066315836", "3.2289013e+7"); + t("82637303002.953366803342921531", "600775891.7771684357864", "1.37e+2"); + t("33105794634277840430921189.466083185231373647776236843", "27016.157374896843919656567779131468", "1.225407232230569897537e+21"); + t("1746174517321651.5425445750157907832014633309401907098", "503.368887060226046", "3.468975858876e+12"); + t("561032973847296055911806154067031533181458226.66194627890501798507283854006810645", "49401541468260263270523284.959099", "1.1356588421593103173e+19"); + t("66477202714079751609653743916550503014019582118.757220506915612", "6057213950960906134844006024147782.55730996551298", "1.097488106781e+13"); + t("24881080667363045.331135990427524077789", "43684578354627.4", "5.69e+2"); + t("8397241126576897311689233279315465.0", "301013015400271428556468.299642866777535532281", "2.7896604787e+10"); + t("6891406846562302648530697611742760781101.62358245438762588272", "6804056434035104412507907.096124036643670", "1.012837990597822e+15"); + t("644172231943697609853434007.384520571840507418154494098557", "76809376.688905217210855165179818", "8.386635326474996732e+18"); + t("197048824145495971039233393158.8184", "399477827792536414326077.404681871354", "4.93265e+5"); + t("240624714382.13074885691260207241421406557543", "280284265.786238679146521241", "8.58e+2"); + t("582666844098553.6452820", "5018357.6087833775040937646618421748624218", "1.16107079e+8"); + t("89255722401309302794554089323005507181614902010.0360164", "231436436698118788309411.0", "3.85659767643816348378973e+23"); + t("5905426535715551276673.531597223521224487887107526671", "1.181772144", "4.997094038557361085229e+21"); + t("877284142606703781733785916605.25696944404776326332", "93965143081177.27032851", "9.336272088138158e+15"); + t("641036989529903876393831578699934346785405573.3061721652106126969327", "1532264756298183858529957963388.05423116758312043450314169", "4.18359155553895e+14"); + t("1475751036714199648730114791302586077974.61293470514499506180056202617357", "3919352924891352850.48363174980500125417055753479449812740", "3.76529254954785292521e+20"); + t("576169499544913597462200498273373.53883", "84564.711959125125", "6.813356141074644445772001868e+27"); + t("246743115959012089116630129324832275.174021327273809809", "593820460022.806618664", "4.1551804387059268308482e+23"); + t("28464638018062038796734654380509529112425242649432599258325.879718519724842794883", "3744289828084468731129445277209494961.104416633705223", "7.602146021005053236087e+21"); + t("905716746746118236746727683787565617988324760298.73294999196351744", "88687614376337460418652677.39381356020119326231825989", "1.0212437814628718333835e+22"); + t("92780707147669867441791795884.2", "156984.3045780775234015", "5.91019002804350847823795e+23"); + t("1674313388937290714206797076186815940423.184", "46851850558144683564364589233499411597.445721170123830124291600043079805", "3.5e+1"); + t("249652940819093482750237128996478577370147733399078.4905553504741465517375548620325", "79880760524920405053047706187721379625.932966107325835", "3.125320029235e+12"); + t("62834486063565808589316509620013809246483.6505641618819111952502277779007", "947710974134020649525465452708562.83736468233378", "6.6301317e+7"); + t("96193220127246778885524413.185635330457", "6380508446305644746115133.07412351734010033708155669403863", "1.5e+1"); + t("7580650115744834373189331133115580074.61211244967648672", "675252898757227563291525957118638256.336561025544290749725678047219", "1.1e+1"); + t("70560594149448343111145683612953200504794319.5383", "489010139936740146734403309.1865325747097562148583380003111", "1.44292701494035028e+17"); + t("860838595129418010646370600373108183845660387189823638.575381", "51568893255892013279628825715.3137964813074812", "1.669298177212796282705545e+25"); + t("537876061632907031173.12311", "7130054624956245.954845037201414", "7.5437e+4"); + t("82517781723258535465647176042595855354729468716.4472832952760823011730702065", "66813907098853784951329174453633547.47650", "1.235039010683e+12"); + t("5929488358592320773181960868920987073927.88388798", "78381852979368124522137795.03829502863", "7.5648739257964e+13"); + t("329474717898975874349.7680975234826011699866078", "5466714505023339377.8818320716212482595455181231170899070", "6e+1"); + t("2363937356314299614865551.44358270704619557", "1751299123897.3300202916", "1.349819299317e+12"); + t("512416652245569543.3154632560", "9776695186900.48320409293674323583534", "5.2412e+4"); + t("16034242201902131727081995909786820.01552514763268990218547200626152", "492008550.19555130788786", "3.2589356822212216387853918e+25"); + t("817169387695035335471598718443872510381117711315504.0", "9101340502043511373576061821503048.976238366099726222", "8.9785607681808786e+16"); + t("23411656442010254481460585957096192134.8256228477857107700192", "87218597453850.59945343434318080138448396299555764635", "2.68425050682544048729303e+23"); + t("50186003460954759408598176130706.024", "308474741313972.60501793934227227599", "1.62690803296190478e+17"); + t("370075324733804302055668773879119811957377288.295419956275803962503", "91199554513928468372982827400.55464528364564258008494470784781", "4.057863294466909e+15"); + t("51502495983003442300.619", "296926214208034418.849861", "1.73e+2"); + t("3583528344846306480436129439929808888424.42466", "24342028840043104277506703.77883521906683", "1.47215680681116e+14"); + t("5766326460559780759068072534.58915444563708122429160116243", "377910423.4296010523787859394382202595", "1.5258447777728362723e+19"); + t("180274339760144355990114953568506117729934023255258264716.38662967422373966237767", "27921103221453533490786036075189.336171", "6.456562204233688105355529e+24"); + t("362935691993204202680684283816730463773864450949685945479.29313112422729722", "17765287007829061039732061314035614014.55560793546", "2.0429486550555614748e+19"); + t("5616635952311116330479498514997451466685212721.0", "216925723990378429575242490394987120263.98217824390476587786", "2.5891977e+7"); + t("908867457059680459503.8000922962056", "216739363927427342.99", "4.193e+3"); + t("86572.26545176746337999355140", "99.231132400837556249532965123248969", "8.72e+2"); + t("24894966097035607043093284813225.433538462048", "93110968159.061165432883446992856156705643", "2.67368781457707722081e+20"); + t("2479035965964570524519.6142406174", "6648913817051.135854296249356259674109323937599707", "3.72848262e+8"); + t("3745718869762873333877546287564370424928436334953.657083255564322065476129", "860932496131051739412786235012610254.501753045889833751056030724146", "4.350769527919e+12"); + t("76453779215626803.6", "75340521401661.1712171521533006", "1.014e+3"); + t("47648843504876298933631392474199377619997720783511108.20686193122727474672989555446808", "178711012787755038033028893838667624361.03852302141862617142951171281458813", "2.66625110347654e+14"); + t("660863380874451536224019971035.75674411388", "840389119338967306486352.57091034135117406296679818460406630219", "7.86377e+5"); + t("747008207215667353354825194912374772.3974976636688", "134970124990204800086917459949386474.5009256065771559975848878254", "5e+0"); + t("15528691276348317242573014134083070905939781624669488405.7843550153", "6914696514331753618564652431184457.44853605868855997872776284404", "2.24575167459088877637e+21"); + t("287768310550872638548086585697753456559139335958282317587.23191916903473", "997489457262817650565646280422.0", "2.88492583511137497209733338e+26"); + t("4648066385553972249793152218642202397825903584.9258", "23661329091900485591508861791521.2517555568813324781728162296842476790", "1.96441474927334e+14"); + t("524765164027660689994.15949255815917046572441114", "3066266.72426681731954108816912", "1.71141394802547e+14"); + t("190490932740982153.48172762609584794574238007904", "12109845.09842738202500874498314434", "1.5730253458e+10"); + t("6100554503860766970820861666872611.472055983", "1308567008402862419634141539629.29561052118459376089249257", "4.662e+3"); + t("9576129306900745743833.7892390491254081", "1845747222585301.424260854904699096322141518", "5.188212e+6"); + t("5774071563125913615175508321973071301289458299543842620.57338", "47042321260907973936392257714.44456189", "1.22742063069157038893316274e+26"); + t("3944977961857323296496868253757648787.49134237786", "161835971708047011.807349291091", "2.4376397411658795871e+19"); + t("8301359297555255069323390093063.118588896655951890584115498376125163", "836906658004203459551072.206798816477132034281163728820325", "9.919098e+6"); + t("425077594123576362502584289150268.240163781070536336104180233828412726528", "5484169689661701.28490401", "7.7509927332280973e+16"); + t("295495897255430088060820608010945481278241.40136144869817695904329547089", "79380394688882221954387669405793099899.0", "3.722e+3"); + t("183402619395073781201846941968210908658.624573245303286431188281087772742282905", "21000266277924029458940.886026788274656804", "8.733347328451301e+15"); + t("2853949204886190873376484052090.81779870013388679345878271", "44422311122.0718327278676189", "6.4245851528156246354e+19"); + t("2770730951663082795845216105701650.63966150841", "1270181920.360265247", "2.181365446358433943474513e+24"); + t("4075662200552324547747960218405782969927.522410610189", "3628433916561.324019129124576837808", "1.123256560344039530464604966e+27"); + t("49611192458214171234601518170885756005842106176272867.0", "811905282079787975910861362204906.1590802515", "6.1104655374490782612e+19"); + t("7395876334328287701799216059289864.1018515952466658", "5363333777680047940098.7447523", "1.378969991594e+12"); + t("700688724998592249249818831201658251801341.3950921022294637", "5658396427970257655152065376334.341554836060179606378", "1.23831678094e+11"); + t("799266016233539362803348120261274639480099702103437917131441246827.505673476016425430577781543363", "634961892753780527822427751527985471584.78575616449583782751509400717141776085", "1.258762179832847263983575865e+27"); + t("831437805238854155543255569668615851868717701786645193132.4748090031682316436105677287221295366", "2639947692694379180890824465060584665.8020242987632232245073095483704556850", "3.14944802709433017588e+20"); + t("1524116189273822437974634217738377081.56195679213239831683660128153", "2161255145746626512270.883549", "7.05199565295795e+14"); + t("2138786264689971279545458908232294612423595232476018.32156845794513493", "4650416907207762990140488131400.47045737135703125625129735667091418747", "4.59912800801800977291e+20"); + t("1722961298797463449221516.69698043", "73140624275750030.8645347", "2.355683e+7"); + t("5664040959624684800081311993807539454829817592177057.2235463150383", "6786997722350817359678152409180046969885.0126633838152003809989320406587419206", "8.34542929191e+11"); + t("989220963875496751137020289087943190582563897580.145850849988435047070", "8155059952991074472066292680253624214753.9249470792964565", "1.21301494e+8"); + t("38853137783710316283791187819075078269.946594881991260935654924", "986547548109655355003118952199289163.051227658145928663248", "3.9e+1"); + t("725957759795556950158074990355887715830644852.3692", "8065853418690133424.167043460736655444801572724412416569376", "9.0003837425730204814302503e+25"); + t("32088858102842394073608457839795886568988330440978.0161197349938871569663004", "802989027138275657047783010125743468.533418584189051750228", "3.9961764131699e+13"); + t("28965583599454043041124815060.13686814935381262023573", "999891504871430276978600010.153133904889128835101380177144547", "2.8e+1"); + t("26515257722369694797539993349.31877021826710009422632263935", "51198070.1082927717730898641", "5.17895648532949377362e+20"); + t("133703335477582803080434536613536036.0", "296171390.6000347887663418368", "4.51439064410318834057921287e+26"); + t("823265088050079195729206154986514794.44547638157831072211790540661232523112", "92317675740438405459302612.4359720491338630549753705", "8.917740632e+9"); + t("3380342497400460184193453623777.95892579897390240281297204847745", "1570891186154165257353002912783.526647337536149313027212894692810300940", "2e+0"); + t("6247972405536355678947466357438120426251243903.9305320060436472142127292544220375959", "1533421981053460089676554550560318329452.899974413627", "4.074529e+6"); + t("2716407670765519404881587.16861", "9828142719310.0596358402888719208749454961679897423", "2.7639074323e+11"); + t("426616624010935294584.8916444383149377219598202726980", "524718745.250558453111289080764372451824305", "8.13038657132e+11"); + t("34762025677296.95231615157241284876453116024906485", "6.3050313693279", "5.513378703618e+12"); + t("7883496393743948753637.0", "69093337181057413.4987943658100904865315727583299380", "1.14099e+5"); + t("2443575067989995697.875583731051458565069", "177.0", "1.380550885870054e+16"); + t("86889593677856.9039750374636772613430798", "461810400529.41380175516855390917821473227372387516", "1.88e+2"); + t("6763186575537880733509054405276164444.98019448671532", "811682419061944827259061.0", "8.332306351237e+12"); + t("7346968501763855715188418.611109374612124128409569825492948734685", "97754082528915010.899915186175", "7.5157664e+7"); + t("954706519843885360732477138861615152918.76", "531526746461346600548.766", "1.796158944399071759e+18"); + t("60123231899910551746160055808359423727268.002501558897295570690710978", "5897514273637978770737220310907.010", "1.0194673401e+10"); + t("242584369186891559081106018472673.929658691970879223", "2292878.8900960224265317394685509427451", "1.05799032925255149091154841e+26"); + t("7657436607957.23712799884773079113828232332968444", "6851920519242.6559591019837108861376191510697", "1e+0"); + t("636988182896251041400392471091836236426.02093141289343573541676746349265851330", "88261949223276393393.8588486104256638962141", "7.217019208185183193e+18"); + t("472242785915093044775057366487742701368.71350317318224989070185482591462582546", "599479773980880534572731368903.4519997357844817584", "7.87754327e+8"); + t("842714118404631781120281372089196713491514.0768765924559932542808541", "300440190753001681848635558.937825", "2.80493137849671e+15"); + t("230138933857226101108260938066607.3390595350004713124885001", "20368980005038820671695427865.029264270447", "1.1298e+4"); + t("28032974977972472111431733075161777605007837673267547100.105118489872990033273842547296", "3463769346405392686011843397687040802555.8088954447504416", "8.093199106073372e+15"); + t("542480853839190756315422597296630730854.8883529830802438030634059165038203", "420520333529427.92", "1.290022884948625358347827e+24"); + t("92958977483214424823290447211633263954519124160937696258821804.526224744796", "59067954116139628255893409230305132.3993237", "1.573763284579624037586254009e+27"); + t("886726286787705419656067390034024611.703119880413137004958377314078", "564347800918557955939394837893373.2090763928787672557192349491967876926418", "1.571e+3"); + t("26979186938350014835642270689258925099378479.293530708503798615083", "754506777745829513461.7706380655271011747", "3.5757381820946989518503e+22"); + t("552699468651491710686388924130720.3910122665", "99386979934711111.8548615445701", "5.56108525497574e+15"); + t("44120269215918698818579.38403624566187861579530268459325", "36515322943559921588664.79468605522348664943253957511773012", "1e+0"); + t("11349498953480951846718831274527747384.36484545018827755207645801399632507427", "52205519928.7492928635101332201", "2.17400362432380357513058349e+26"); + t("85005118239428643124161807372561420182076032177.246974350642495653208", "23885994497173400650388933310888.0", "3.558784971230228e+15"); + t("66305973787758204988597760181032038.8575114968058556446750", "7257645309423526653413250493.911783964261785449956429260966", "9.136017e+6"); + t("9369183717300959788345149160871976514.61107909263601396460927307314214612", "980038506515881957475708365698703492.3101805871968126291692843635910934337", "9e+0"); + t("10149354572632995038433.4537528567", "534258.34061270606461041", "1.8997091483856596e+16"); + t("671693770003566113425226170852844663796675522210732685.86", "498500917004712084299330472530.819647727840774517124959527", "1.347427350865268161905358e+24"); + t("401805678036513527257136852046672234017669611204907.99470684480162285917282975790", "966974489640042938212190034759423804626.08250793047834745733677790052947", "4.15528726291e+11"); + t("93083829244269.1772451858164016", "5175723028143.09689348544683", "1.7e+1"); + t("94979187266222991507033401382750865856832498959623683155690.60108706", "269395570664823076489579680956903206.94987277160273418472829942348672561375", "3.52564027061878895693049e+23"); + t("639420974071508796108192604584174187.040640405366823168", "48411666416047971.0675668666593001133661424524519745955676", "1.3207993473646412199e+19"); + t("64410558621083455990660666793546886.61386888888764210", "3811004319064199133.66544519689001814058235", "1.6901203259958418e+16"); + t("436614677312657570241710697053751466703168.83091107760", "78857680289281986616558627.6243797419399919847", "5.536742593885309e+15"); + t("783443689068905357592904766.69295314871493", "432397133625363102.3568190913582983152062", "1.81186143e+9"); + t("2380500732004218579406731922828711255907.0744642", "50321820032530710.4714529850959619954053", "4.7305537249354968549456e+22"); + t("9380743439743963800617491039426820151773926736.284332259240265037", "942458341132411207957.26", "9.953483385241757908315983e+24"); + t("98911449293.910674708529245186903512060", "65584339994.7082", "1e+0"); + t("38264919095682985581229713080575.268847010852024", "474231780804633958153297418.53987", "8.0688e+4"); + t("911640346805840414733884893534538784856223741803214909.623379015", "1278906484019925720444179959750065728.07278", "7.12827996571199496e+17"); + t("93227509302643255791150709513211.07429051412383871105867012632979472", "272464.32909", "3.42164090301334409408251796e+26"); + t("29453687738968750265780182320735921581434056042297.0501371448639257538906688100", "411740116444390700740758056598633855.631285262061594240201482644211", "7.1534656358768e+13"); + t("6405058589882512176040319211.780904925185197", "43255.777847894147547205473", "1.48074058739746701742242e+23"); + t("6392527538099376.6280009290630753358584493673927", "79469509.79749974881912670128419776087279216", "8.0440002e+7"); + t("194876360343334476666226442655.3420610330925113817471077925", "383.4798436", "5.08178887614771303891880597e+26"); + t("5629120163652013964663712375140136941542940988942778284009151.0790530593768", "82876432600944658019194915249810528598.03782758387", "6.7921844449514240428659e+22"); + t("967064289756767694329723138039399781474062678.898160307", "2285960011009927546768875988017379.25173260750120", "4.23045147377e+11"); + t("97644762359043110685414120821548962899798403.3", "88046768978680627477664276383.3", "1.109010171431577e+15"); + t("93823589306198662.662410960196364078796020793010778080032", "7190.729043924165593592860417964083123225800", "1.3047854916112e+13"); + t("124993822002540896039551622435869499798.31384584143778350964543", "918650894466803131175369150.5388", "1.36062374461e+11"); + t("247179597952684644056881699035151419745147787977622.333307123164", "8853637706378684566990129083320011015746.57485817013845666026370110", "2.7918422477e+10"); + t("35366670561265100727992169442792782149933048820648717.862365009", "19586161548003313192953453.5490093480793052891245070", "1.805696867892448882697911414e+27"); + t("2318553167279443271255738463.65640483655793543633756705528313578", "7570906.43975804083154456135990494", "3.06245122130123970512e+20"); + t("42034526992594230405352674285345.92283", "169384559452757841809640750967.172046888", "2.48e+2"); + t("82881473307503531109377985048321384647956.04996568339358933118721298808", "2884065169131350517942975763.064128359836264398384937198874633", "2.8737725553013e+13"); + t("22345945033634108856160307934591254868.8012599520815125267755499", "43277957256069.212094606859", "5.16335484630581987276344e+23"); + t("4953919543758944966711.50824014751491388051", "2791413813450.9616979724", "1.774699086e+9"); + t("82505924801259036707732838324439722235194659868269154088.56378531649230", "5617309801103767035671839807356663852079.57574", "1.4687800339060367e+16"); + t("46861199121420536574478617976028636417069826676089733588147.5464727", "96129937534226155207337006200370404.361234590028223442792328187529576031", "4.87477682014887919486311e+23"); + t("41209618773916217775336133440994974543936682971912.2", "648931827637529144466628112993249.66230566939525419956734353190287896", "6.3503771919990468e+16"); + t("647370515179137634951532189057150169056356.469295768248", "85546849744977418457527492323915187.36380200015", "7.567438e+6"); + t("928576607292091712859378138341.37877", "12676.497851518013092795965656044336", "7.325182539914953583432076e+25"); + t("254888.294022576507950612233", "5.0920008028563", "5.0056e+4"); + t("651070839176054169346.5724279", "63.429092657946244688788718092558681", "1.0264545997639926435e+19"); + t("592520312.747791", "6514.3", "9.0956e+4"); + t("5997700342224962859078806717279682924264667334150407795.0", "99816575074499663527170214172.43294013907586", "6.0087218357757569914037448e+25"); + t("39651101924524.3850", "8749373.6549232712", "4.531878e+6"); + t("9274856833900596452933419588584356221454651796.2452871261522293796551", "300663402588305055742848075354366.3196822925203290195", "3.0847974026957e+13"); + t("78714814236813720890732479245415302022160114.8291970", "389999753713205692513253843.232444588996781361468806110", "2.01832984475929366e+17"); + t("6940968305815375511785.2535238589855678532454435667", "61051.86510652160649369520540215728594", "1.13689701268011483e+17"); + t("731860419012318378399432352134.787371236083803", "14949479666.87478452397916602307938077319", "4.895557807500032599e+19"); + t("80784287281774387394074508131216132508362431708.815939", "2314579171467569751616572566828.362237158270383809870299180295", "3.4902365094105954e+16"); + t("18762358230636626098456730753291785222815692676.18122730", "37729433645333441073620728338386.9138", "4.97287036084551e+14"); + t("565045537.4148860673942946036700922", "96804.4728558713344872578302915665197489073924", "5.836e+3"); + t("8731689827527071716.452542980", "329.4337388484325556483032593", "2.6505147463188004e+16"); + t("8226836207818090134162860453311885877860615442781.033712927971610385824609828082286627", "7278422088684442640153126021234.0", "1.130304907791500599e+18"); + t("17975819012854816436612499618926828518.918725803062807207677", "986297878342186.47804", "1.8225547684508229737974e+22"); + t("6883836670964966860767875159005738948461277819011199374301698098.53332887940707792650452929955035379124", "6047062259907485005834302693734782626560.852842593848652129", "1.138377012686865209066817e+24"); + t("2272595358608820919830758.63922834972891213468852166345", "5174.5868675439809386", "4.39183922655349103325e+20"); + t("67920964277002612658611530553240223932457224697.996109340917875605643", "33102913577979899256921.89063739295314655284624359146819559392", "2.051812270753826502042244e+24"); + t("655442506066280472309.90519", "924893087363.8976617", "7.08668401e+8"); + t("12971389770902249880901599275.75715358347909374147", "695047489166421262508808.0", "1.8662e+4"); + t("538049.1528880985372536672787228267264685282058", "39.99558861", "1.3452e+4"); + t("62884922762097346.31", "36217072242288.1188626329088835522438182857691393063958", "1.736e+3"); + t("36982395199435414348006362712132205654293718330757846665220.112392485889020544", "5983974636708958949032875131238532961950.3780504021215865996762648003143", "6.180239296564738713e+18"); + t("71162384450576076564185797705656879.8269824210256515890429", "10133604731208315653482573531.86972343827207", "7.022415e+6"); + t("969371600339254828265118428848.8526437790752", "76836705083969387512384032150.19929325", "1.2e+1"); + t("59102267349265458280001859275.572350247469018629081171236", "17722571444612800150078037.3806337318355958412671577879677067", "3.334e+3"); + t("635856112894203035902342801.079651859844832", "324490.6216455149878657982098", "1.959551587869416775643e+21"); + t("11496626271749455819590771908494907693082726431.564858850937", "9251420015807026480730296219.70769958426081523828", "1.242687744379377191e+18"); + t("5586266522979560347614298468558995025901991389789951.992917217389218499874627587932783644279", "580753397778733804170034088806469589183.30903077611411774313315275382", "9.618999293582e+12"); + t("9540190410107198530994381942289002665943247486643155838.240291", "24804592101319623660137984057490757015.251040810616308878755565663819444299", "3.84613880008115632e+17"); + t("2386517175768350878010637481464263337.079511947488116813634823392361372557125", "427683156753694195956490415.4245", "5.580105594e+9"); + t("6645014989837633569621.13367841392582403915619031939052", "42.96752022496360507396604681372", "1.54652047757155902274e+20"); + t("5736718330338745782318444593059.828503153803087049110965035661627823497", "94690867663573124539288115.7181749407602672732650406499995", "6.0583e+4"); + t("4577582455661230307023257272719934839494402207767.7563309778548148077215742197816423245365", "83203568465772833478959694594.023188804339444050628740258", "5.5016660223464991143e+19"); + t("56207509645732333529889283846930948361144.5674", "7776759276001405586.75485276", "7.227626270905054882675e+21"); + t("1359567720.06788441106973585", "99102.491052963404895944241759224", "1.3718e+4"); + t("583805860462774216863901838980966556.15448832198901807325512978674", "3994119096474.42425703955113908532139841", "1.46166362685102404578586e+23"); + t("693777001856849522808825.4288056084047387814349038200", "492580904875945789.91078941808189673840525212734", "1.408452e+6"); + t("95179226009086304165204368746052557.0", "36898758585168784104911349884927.354802683423", "2.579e+3"); + t("55631659696227416421238.8917851599665861984659397057623309390581", "11429813874170059.8665", "4.867241e+6"); + t("3804793895340493946116355718900597847050999258518047817035.08183207", "91199883284905744770392357893051.53931256736447977290180669367312107661", "4.1719284699679165898340333e+25"); + t("27597155368962758339704541018436645975752.3910766378386381678748632672363", "61082895292364281.987684550", "4.51798416510432891130307e+23"); + t("1968485462047071312833662.8", "3570.727131472", "5.51284203348123373825e+20"); + t("51361403908246359015248.88597428", "971321.08787760420014240431423443171403680837", "5.2877884099555748e+16"); + t("792577574914755602585060567095267520717259.77513161605865452608", "96387274244185380020295289522612884.0671674", "8.222844e+6"); + t("64001983010779865329216086506172.2243582034351104715013003", "325396290496854.3", "1.96689344285559982e+17"); + t("82641014824889602802987463507539061296137081974385.345992184578384509592", "97813001794214892676238620119685576.099164255170675133907079088055395644605", "8.44887829930369e+14"); + t("51429878275477.373607218215165471642843251860479", "269514.79886734", "1.90823949e+8"); + t("409003577538383416123.446584635", "258394.2", "1.582866711166053e+15"); + t("4017794.35779095182404974497321", "1.949858145694306536849321361887", "2.060557e+6"); + t("693158766643223341675321795349696070641685236.09576768604", "5418760772171659890772560927426239352931.7770106200193159768732895950794", "1.27918e+5"); + t("36597106767812853423107340822080103649288844136.6069722231717475", "282302474803234933159.17864", "1.29637923979664252678164779e+26"); + t("644862.8722413059444331223975795916972219742469", "62.548264929075049", "1.0309e+4"); + t("341506801170536802375565999614038064447.7297855940242974264707", "53682561275.9267247070722275919833219937579957", "6.361596634989196565630781141e+27"); + t("7908985861763007965029602421651545185761364855121.268942417", "16793989045538311416956411140892211412.665454158340901947589986540260798080564", "4.70941468421e+11"); + t("31533738859974693360072770442715853673.655466988635567099598989226105413173132", "3453971840501.94532941", "9.129703517036224974201986e+24"); + t("8888497757908937230115564677144106.14", "8675987227.523277295438878048335951393", "1.024494103646384117292616e+24"); + t("3832408485883255944563126.75", "23470507232088813361.40379333248482363899", "1.63286e+5"); + t("44412568137928885568673909551103.0", "4609303923025.73374408072", "9.635417598754190502e+18"); + t("5980199495060323094622686412.36801000662261930689900697959426", "564130464.64561936605965841544636735526264816052", "1.060073842815246558e+19"); + t("42668844022510160312097768715558145019410562816214802678.286681256123301472767371805315", "5845762170575892760204767094999936.0", "7.299107075768472016233e+21"); + t("153580616596186472068747513.38940142804308393077430419129275642755", "2496443776126.2457333179815663759811866", "6.1519757851105e+13"); + t("50386864955601032867872486555643101.85213563998463737619891005063733838076", "1624371436509170901416990548021.667918309610622619078595", "3.1019e+4"); + t("12152881302772810116039892499942.008", "656950854431037026.69687990251623343210969", "1.8498920004142e+13"); + t("93760332495878064292466041.71", "233540814.5857575", "4.01473004460420527e+17"); + t("910859566602409178144.2", "876677205.717494987924045167903047408551946446", "1.038990817443e+12"); + t("4025.1487051565297843490074303315163578020", "66.16130299", "6e+1"); + t("6375404836829202.7333829751919053178915219731553", "5229479132674344.448094528210294672", "1e+0"); + t("8400233618968760824801844.3581979200830", "4130786943730816203456.058913094982907", "2.033e+3"); + t("796421.11453016934151355", "343986.56558310355987", "2e+0"); + t("6639929678119504878947.25", "96859440.4053734619746358", "6.8552220107098e+13"); + t("557629736662030.50806408951252974", "238395.20", "2.339098004e+9"); + t("792602563830327630617720071679475686474354492993017.9926091441078957", "125147857962710073161102.87606826510", "6.333329045603776992930610624e+27"); + t("4627023788931064878124628746104079817244198024917313366166138422.1570808733600", "815738692378904775832725069924927990957.397915671980498734685278430738", "5.672188694933015991094016e+24"); + t("9439333403176876890363560254484700606.86", "63082293493230549385786879556845.712215613078084576", "1.49635e+5"); + t("2733443019935446615635364481.104981558510317617330", "331510535512988.315380", "8.245418251053e+12"); + t("37902328487171282033743961194864143625182011.1662801", "110983332772099550179781835746.3640329334259423125968073885804169927149", "3.41513698863255e+14"); + t("9496321.22914701121676628", "39.3311222595505274959486106", "2.41445e+5"); + t("835638348474609789515956933.06717723489839192204", "8325443822870684996.48184175349500213896473649078400944468", "1.00371627e+8"); + t("932160263119977217772090188274.21279235201503589269039635889539291883", "2835899214843529946087133.11283853499855064716", "3.287e+5"); + t("450264866.6275081527659", "87.79963962373938236194326027135334508080", "5.128322e+6"); + t("1799024761260895898937518585982847408126649350012958291691728.553452", "7737306728355044167456810268341347.4742460461719014700987149967816", "2.32513046777372569198422497e+26"); + t("365858028137169430349738214047744690765.600147965741196260380082202776", "36297751677518885339399350.6417377299782620546077350609637930626104", "1.0079357845289e+13"); + t("422939609684291907.47807319547111869154773225694", "5.669087579160461785923021751469004817997", "7.4604529173092305e+16"); + t("336225964209286251534670898409176.7999702692719126784263708", "233633.866367", "1.43911483997414615081599198e+27"); + t("8475749899217974687795958718675121219516.181607683214193278712483174162967696", "2392113753076465.2733785800390260335562217279", "3.543205204316653804720413e+24"); + t("648064533277152731636694149741417.0", "478432733699912.0246299253982352469883971883298", "1.354557260882653312e+18"); + t("75575916009381126069705419.640880259918282", "23300005784058057158257.386529481437978642261113085121", "3.243e+3"); + t("774673439062933591391270466801445534270076.7386165104152570", "685455317640794938980.76976768652859796462690616604", "1.130158916454554947282e+21"); + t("732472474211574805287505655.9188080", "422214783125578470083787953.285088274329", "1e+0"); + t("3323950381639456571479885881658157095.140", "458742653.10763637480673", "7.24578444825697644652746652e+27"); + t("77221335.57381020778982003856627720864096553", "629762.10776099206641600699933138667050138", "1.22e+2"); + t("977287057364828231831.005384213880964476071738838783", "441245095952.1728411040920", "2.214839476e+9"); + t("4656164015778698194.7427643", "34163427.003143749419309395853876705", "1.36290894217e+11"); + t("587079066888787270602134813353500.9315836371295975970760048758012403829473", "1033927619199386247.60425201715751690347050", "5.6781447365086e+14"); + t("6504820824.6679", "244533.439467270497421", "2.66e+4"); + t("594242888128145797482002587731347748403304.38672682292524749769", "5436414927778610.7", "1.09307861158964389546037039e+26"); + t("989.656128573591134745696183496715069", "34.73477175628767959355518713810215373319", "2.8e+1"); + t("120369063196541563112456357675209274396896134191.00428225945", "79264329028251723320.1774705279", "1.518577961514556171965172451e+27"); + t("58414822992025969288274937174517262951433342166897791443604.71087680019355101373372382877339765", "54259093314317983827744671065849.739792759423736052896955777029385081393", "1.076590474036014978745015363e+27"); + t("1893572691390077779880.8798", "63917.098849", "2.9625448048941026e+16"); + t("117105915719721336986102833649470173042927.6845904617613922858074108509811", "333773878999877823.520844744800865894910471122800686263922", "3.50854045471198191330232e+23"); + t("26488378327897381716452599.82853", "75692651986696063.3213353397", "3.49946495e+8"); + t("20674501736171706714386659080.33987650601226792768649218", "37224374605608504973059.66319793943848478493689438465572", "5.55402e+5"); + t("488668888954306581773387452820386.50275367736471579901880632943792210263", "424971412.314919369846853566543", "1.149886497758548169126868e+24"); + t("9414299273169503353740070805208412425001376125309.6494529706749228", "649198730792783830398295123038.231006511305116008163545769339", "1.4501413552785319175e+19"); + t("8837663816566420476673692992828192752926654623.3820298251338", "1000505072899959919210115.68884512320089", "8.83320240541158631281e+21"); + t("62640550960750033485.161416496332923818538", "551009212582214658.0850309331075223732119860256757512611", "1.13e+2"); + t("18279447400606728962079824580221915709.20093", "44249934066501551647833671723820325.573014982949332765767790368980", "4.13e+2"); + t("776261796756651767293668987691727663279875601087615054.70838217536832729780", "618413129352061650023022110189682.959376671530710294265584778255638", "1.255247923940384376935e+21"); + t("15730379995642783522033341238016121720018756579287469.53566562634607645106952749389445433683", "68301163568490831992380058.665860", "2.30309107104284118981937299e+26"); + t("889734378202484475581878128819183811697078164443.14565084281602", "68395823891803288251380393538883565945.26547129989242737", "1.3008606777e+10"); + t("364315008770017468358113939742493787326171.7855594", "799780067786791936.647", "4.5551899008708202772452e+23"); + t("18748989359411410187093728553272118179776164624.79288559651828723940141507770090507", "950112582825403040391796097478.6930538719679703915366", "1.973343969791084e+16"); + t("1171084325875.4446225348322", "90.0172338618478200509825", "1.3009556899e+10"); + t("2065250102941880307969219804513555.095062", "1797856218617859507488766535234.4044247712288678619559217322395206786988", "1.148e+3"); + t("548766408492366309880682898409.8530984273908359606505728637337989455659", "367458008.139188513732158501695423998857", "1.493412570517446537187e+21"); + t("444677165645723563306089367825908182929191.08964559115323804585", "2370949907187948235305802.36208925477214748336986668759410", "1.87552324196140612e+17"); + t("46285062301054914436645816994588244411429108375.538183215973994207585288819216075831048", "136463860344306334886102425.40085747458", "3.39174505134729324576e+20"); + t("4885123264349473011404996618821001197721833035124.6", "64344104993632648195924141700927339579.1127718859046238322211340848505609", "7.5921846528e+10"); + t("8527098343430191438975192446424493491958946.0", "27112973650638679113124785110073327.7088253327631045907703479548900582037", "3.14502512e+8"); + t("843048576064275489790467362477723997.6951146198517759929178177", "63589299487542886020184435860209963.6059875060655921", "1.3e+1"); + t("388979443725929873035622799.131196516484091384", "55249117649795546113.294732338780674626272131484691595874994", "7.040464e+6"); + t("116736702672372229726597847132478823564405740562059.50007104141245180", "40948232623253264853612392403.64895458796549183668952040", "2.850836170303501235954e+21"); + t("2492647031287379964435460781.0000322662479887755705529336", "55050637611724888607.0", "4.5279167e+7"); + t("16992122752687446745002805212790371152631729.5813386522994341164157008", "968361709437805282602217.33760138", "1.754728898001599001e+19"); + t("334460218373859061266920082.83592158959030", "130034558556902541912194.7510446423718827904254408178", "2.572e+3"); + t("780518698732439267132572446317593359618462.56173280268", "27854048834290010065155.5046591169557067059585", "2.8021732257881797994e+19"); + t("6372593567849541999494129145.5970", "18.2439383764900306", "3.49299226753668283155161926e+26"); + t("964255508932309410212037662823733721301170254666458.2889563588631864504513496180233497", "684763819810975862069683055938450341008.0093475043424162143679799949291", "1.408157792563e+12"); + t("4945973223760108770860653167100409478716899180270137669545.8204083501846722785429534187", "54143998752657849905388022730004561.249426920186016601478396158204493069833", "9.1348502838780782906863e+22"); + t("95412058468584656926318451839723.08644800648533", "40141416271939471871836929326.10509090738420761083011", "2.376e+3"); + t("131745880157305.8413059469987124356254993429844336801247", "32721632078350.5104514632914633356280387859", "4e+0"); + t("5724677863015063.1981069184019357756477", "544272444398393.1366742806928", "1e+1"); + t("879850028955366298821171490664419601687932576187733.92426359314744420046638752451714051", "4921328677966596268308514832403356554968.63970470980141334", "1.7878302518e+11"); + t("91458700440845030747247649.09484", "380498.9084975880475582880", "2.40365211038246066886e+20"); + t("5105248384156310477483847709.27193077830735334327510", "762124353200103274312.538621396670007835495536810190956950", "6.698707e+6"); + t("70912319558160913584743566839718563110943976.9286007329910", "9121926192939404916619411198828855030.97375536513607418710635520444122127", "7.773831e+6"); + t("48260033607911589895643426429677.399378342869093", "8866717097223287064.85285269790401564636952536203808655561", "5.442829976274e+12"); + t("4241534910579192804542571508724905003322926.70406", "3735337150041905838584017370718997540631.7454018", "1.135e+3"); + t("8208823070773994924478395637634.2047014111937409226484", "974282901837711.772967933758356581452408", "8.425502546837627e+15"); + t("28366693965832816989363948708682028.265866735838052407917380", "581752801.4298", "4.8760734621500263733226331e+25"); + t("31072548776170976987968.042971306125685670133932859398262", "325478.0851041", "9.5467406864682824e+16"); + t("75548981188587472919633956.992631367600938606851842", "2540521549405937737419.0143498", "2.9737e+4"); + t("697859488464358546038375437817655711295586979071525.8503476333610581722438767283", "5731639709806250101606802527771.4121625967025155313", "1.21755644771319495558e+20"); + t("351122538216878516792386564259.049", "54106303632724959138497353.0091585141717", "6.489e+3"); + t("8809597211168905637.098652129530294915846", "8983599481818.979459720310660682972192953163", "9.80631e+5"); + t("1728708563415941940086203.794324", "1071376602720044.852562", "1.613539589e+9"); + t("22806891597004711966077.699013", "479325120881635355753.7770006339554837609918893911085676", "4.7e+1"); + t("638577089423173124033878879944099159959139409.3816935781732076301616575373525629225", "8483818736750661487041699402167.060460488588264", "7.5270006259911e+13"); + t("9004807819814488719168159771153631523999067.830302", "87591023120596495214689153.3867302495777428524082705440214", "1.02805144853902991e+17"); + t("5085912487300437681400422.9694951662826312556", "63911858290.3", "7.9576977158123e+13"); + t("9338356978160104295315532990932090424.1932761", "26156833135415571674.5726839", "3.57014051732288935e+17"); + t("44325675592262736297656618986234547463666335781851325840056.02135667526620128595", "8133263073223001480434454185962150.97214900757", "5.449925225976690217408235e+24"); + t("2624533365963783630845531.55763635971275746967672", "334239053600512.95360082641561987173", "7.852264233e+9"); + t("99212442272871592262065490646614558903179938078409227.085304129731783165851355", "62660147219089824365023379901717.84", "1.583341991297554304794e+21"); + t("316892334348803283300740.963014662126978804764731714335", "49.82523850250185751", "6.360076617252745871987e+21"); + t("30692950229334301031331672911451292920211558.80975236148397198595877", "26066207311649700327.5885959916305", "1.1774996593239240779141e+24"); + t("3777678164868474.819138632271194", "68967.86576074036902416", "5.4774468126e+10"); + t("51065608944378517112134329010831340183.2941187", "366496307677949056630789.1", "1.39334579570311e+14"); + t("45885182901134873.637095168246291402450697794227338", "35256.599914251808371074147623002262229771023", "1.301463641211e+12"); + t("359612826822443561101955855534067069807.8857144965820735", "305070573641160183759072.8979984730616749534", "1.17878569057086e+15"); + t("411829970896188741315395475047815.83068409829074481092942913141131", "76734534776378.3347704319434677008067878567", "5.366944259144253024e+18"); + t("231951931926.3774381970401", "84917559.626574267921654043428852295986", "2.731e+3"); + t("8360204881039968772919143230381.81930437859", "8967686070600437.002746464634054128", "9.32258869815701e+14"); + t("74507019.91881031337041765338828759850849179", "34.3218212574383046476961210", "2.170835e+6"); + t("258149347393794828261579665192468197748.66486445752482955367874", "435089547505456594.84815787", "5.93324635983256518267e+20"); + t("2843079409804570572108013.3", "70.9451783461957", "4.0074314788963037230276e+22"); + t("1377128112032650878841034583088679260997985.42416876080194", "21397435384848978.893113547162", "6.4359493895598485100778808e+25"); + t("218432319644457421305162.401835860986944152509049932", "407214205.1937655338", "5.36406433907482e+14"); + t("907985.6567558033094578292300927378817867", "93850.446607385442111685", "9e+0"); + t("5948611106662732283903895862826.507", "992167115515033581789318610.758370667106258628206501856092130", "5.995e+3"); + t("5308731349023318985589323817683459513.9685216237281288089437997488999877", "46629198534935.894162842457218535816350781199264", "1.13849937717584178742458e+23"); + t("979426870038381078377985421570.027996766908635541576250", "937790990997853111332269.3559926248560", "1.044397e+6"); + t("5202895046879436882836975648603160535.289156272206444", "1322515986198931643341494669903.78544330", "3.934088e+6"); + t("432734050215788.8683282", "62325116564.664654092300350081811661943", "6.943e+3"); + t("31502315244297516163490365506938780417796910.0", "1384815106987231572431.553817608002", "2.2748390803472060435691e+22"); + t("634371348736639116832295001776.65500230", "4412275558423696692053708.03689304780821978396387892", "1.43774e+5"); + t("93386857934649730106088239.304114842548213194199071181", "3618484641170703172128928.424", "2.5e+1"); + t("2918650142879345661011245097537.07", "6311171332659.6451", "4.62457757686855912e+17"); + t("524425924762470946176035890480694342268414828.775323811936309625549", "727347521521977465470337542540286018.635", "7.21011496e+8"); + t("5629534427223902812688429320.6057590567538443", "6795110015243353401.67557455", "8.28468474e+8"); + t("374152685740399489053197877871200862.877211010889052643353", "507242438266770936593853860924986.37868214297472", "7.37e+2"); + t("20569633853349023540430901730460194655391536018.315582825834", "5964675384634528421.8746674638", "3.448575576524753307873079131e+27"); + t("74122414922133904122126378667358459096.36235455752218973737795959", "4875294206278295872.8245110651979384776003117201", "1.520368039054560036e+19"); + t("5040344467746021934407447354622712.557653653723784664260912", "52478595.81171317662788340674747770487", "9.6045719017143013251272835e+25"); + t("168256655361066610448560474611231502419180046848009680959203.7", "6231517121979307187693733815433845482.8419146079106875868892148695199525764823", "2.7000913592551200132228e+22"); + t("989604660969633182585321729130944898270146.5223", "35391258916806180870606672993.0244502", "2.7961838353811e+13"); + t("497762151474232632913608675861135072185.54658079820981848050202132048389", "1858392513545639894748695.15108751606616254891895985232302924", "2.67845542772096e+14"); + t("61908209351270.16475164", "973.19441720006446301081", "6.3613403711e+10"); + t("6471635686464059575788503054149569453179426343.1840496281268409794108671", "8808614265074625092460794.5608585", "7.34693958858378159572e+20"); + t("68482047134678499374073535307346761265849781283137392497.1426771216592749255872243439847190980", "76453360579112893304983135557.601550292802095092097868537948763", "8.95736258235688833414571268e+26"); + t("943569281336244910946766867838666154.5290089569130230851", "4417550502.33344", "2.13595584439347649878052438e+26"); + t("9797177555993974057849706470.1450943513242155902867435762", "5167758209477555255.082641754247006012", "1.895827389e+9"); + t("39.3606089079664786581920", "3.69170", "1e+1"); + t("30577848496139497656061740899501094743941244.8500151877385571", "90787177408984109701540649882.8433289859919", "3.36808009333635e+14"); + t("89370053571336534679011.817884735230368562774518835", "376467.60756575521400", "2.37391084319855681e+17"); + t("1575163396854211836236965797487708259472166210952250022116758.62583877509", "26040484517242182429818575594085333217.3388246107023856153521568481", "6.0489020310326757286152e+22"); + t("696608122938281102539263073547.95314717108", "5679391023780094036.669911487", "1.22655425559e+11"); + t("5436034939939629823888268543299451017440.454250887392220959809738559154352", "2502779784018130815116190.65515950836586422899148740781515", "2.171998900843067e+15"); + t("160306956090198788059693348858808753931552942000535108918676.21897297186109016442739093072891", "927928162504937776458216727283956.323300517000169048257614", "1.72757938133325862905695084e+26"); + t("293797359376817008144668384802447572.3764386107124", "501128527366910.73199791644834685007735642783398844", "5.86271471952559015306e+20"); + t("24831324193025226341.0", "64558925.42312", "3.84630382712e+11"); + t("533485089686200350775137697402200865376695282543269147.23533326145204295", "460565610701955988893247824.9106050912860273813175768466107", "1.158325930746558620816794039e+27"); + t("58821629618378611015847259936060891032758903.6971980453491017", "428400877719881294180.6529908", "1.37305109950872558010184e+23"); + t("20931473116681535831217.0", "414842228106.08168672", "5.0456466816e+10"); + t("629230897716929482.32960452558", "8.0690242408233115348099494", "7.7981039458709916e+16"); + t("7655055639165238511317463726763855304374382237588.050610015689216089892249218479914", "92749486699664993536480.9751", "8.2534749372288312468063535e+25"); + t("31844028771920351958374345661002220574354837502580133079626.7532363953718116700821093000116510928", "136974103400501161232583400814613088101.7945120443675821", "2.32482111445628494888e+20"); + t("41839964248999070703454850042037890.239112587124232561561339543508351067127", "273196418511407991438383689.4431498102789532280", "1.53149753e+8"); + t("9200633792893293261278693120806370309.611089663058207949587461558760498686458", "348451403790040025950163944474.46371619282006921462242273336372713272", "2.6404352e+7"); + t("45451838299322091484332414760072649150758790938341.7676", "800335918595291521630791346.263509434996689116875", "5.6790951453355764021581e+22"); + t("73216481323022991342477901716008097.0525124284772470133466660736098811444468", "173864275.399067094399881265024", "4.21112854581372211457759023e+26"); + t("61835797619342818029306328618170752667444632.53794473092725974985", "8502821305914898321953677.8156065455872895240798723062156098951", "7.272385881651704826e+18"); + t("773387774539406095197372040503475159809686163.5635669715466074720894926625029663", "8054330790871718934724555870937.440717932113229", "9.602135728221e+13"); + t("83602318215136721787.5331349762534991826319306", "0.25516", "3.27646646085345358941e+20"); + t("896023331779796818654049263822.897505196222086420708451", "307.2155960716622434192", "2.916594545450052966656343157e+27"); + t("1836661677021546482706.353181215646635", "5950287956751398.73169169424737311297", "3.08667e+5"); + t("50094830147435801921021467357673.706648", "6398487.5682678664286990264190048622", "7.829167379471359287854063e+24"); + t("86245848859.82299516945749155", "972004588.3290128504990028276356531", "8.8e+1"); + t("93409301879706870795110440786716125538.475952535", "54688335233161988953263.7537315238534047949773", "1.70802971934434e+15"); + t("17450536470.967537888", "54899.8922267571045", "3.17861e+5"); + t("91257959785425622.0298785306198280471348361", "197954540027.5855929991794442334851024397384", "4.61004e+5"); + t("4202536605240358069756648239541895992276639753295.934857", "531278006638819157953.2397208386366398106034102580971908793480", "7.910240124239483639347289198e+27"); + t("18407965143845580576350416597248667206215366170.844708780301969529007119404728708", "92629597251971014171828598932052548.39166289650913864806229648401", "1.98726602403e+11"); + t("96264329543942208255742727502.3545", "34432528228141249488567451.918", "2.795e+3"); + t("754446579994069814.6522571348308", "628724229431161095.83609398509662303272933115383801268113", "1e+0"); + t("170574055055373483852079.5", "57.2143294972512360824", "2.981317032887161957198e+21"); + t("48961691322516926824017033399929409897137214.761039821711860575197515216987090091", "505516504973477773772390953529.164514275675936866296111582", "9.6854782862303e+13"); + t("92187073172881502954948670373537813.47812852532158564268343019402", "42642313665864035462857.4236383474969667618", "2.161868464625e+12"); + t("114324509096175781545191660.5076906930294633074814383842", "44293132129875875.7446847878100495", "2.581088841e+9"); + t("69817005725578817678416821739798701307975.18318091450744390761689273", "1426798825565743784094673.939", "4.8932620685257076e+16"); + t("48943208538423511113953697075456400596606226853311.0", "861168984548243515809623268132650.91745856510741750851964130", "5.6833454776704937e+16"); + t("741387728060971108963531137.0913114958122720632615583366", "2618492562414160562570833.86254242276656726923358307595", "2.83e+2"); + t("7218068503304897168145406982527870918.6303914185092452486930342230876442", "75168674387793596406974416591426.1496078649831668234746598", "9.6024e+4"); + t("271036477517035033975043752870456515584.5993738217652679853953574", "5259877412151.7785335242", "5.1529048355930396839766319e+25"); + t("2228272676082608727491.34203168554193960650", "5324210728657560.20277789418656976201819659642400528", "4.18516e+5"); + t("363830937077844409.4764440905646484992434153538", "957279656569.785987882004", "3.80067e+5"); + t("81051533892191039560015819249521712454183090611.0798349549460795452793", "3931220250450309009331206243668905152.0", "2.0617398346e+10"); + t("1952060075559595864752523843866665624395383613.6272243537047174177377211324946", "984070219762854168973311364766521387.2641157106071", "1.983659332e+9"); + t("490499388437329.21533448493772433971", "1119.1328994110799543709582930", "4.38285201601e+11"); + t("81956558749460069678928850000725724774712599125965354758.54", "76370361609074674458760711950916471.992", "1.073146139715562349967e+21"); + t("5863793442974415.80153236603595931237654864826109791470", "3984146318899987.66919425100257", "1e+0"); + t("85809301.08220025655578", "48968276.0", "1e+0"); + t("35396154886841444190999037918091202805035781232270.515818099015", "9218467546648761517485.27813851458", "3.839700547593639511962885085e+27"); + t("81873496771173427028241388412904762756.91675153501842092997101", "574161444082.2118860476463958415", "1.42596647014581299076400842e+26"); + t("2876299592495519957824718596573.11367933890816118525952626742", "3945333.501453574", "7.29038392175416528401649e+23"); + t("8465011800924324937014295668646.6097338156509015", "8734411241027015785811.30533685609560792834974319673338", "9.69156542e+8"); + t("2715808428862800072950042020375441831566006820665941759518285167542.503732228", "2427333921802245216654971196321179764345.0960557", "1.118844178985629016048576325e+27"); + t("9648464517206942465009407066172161553314248003911206718659.479959349993937016183770868536261811", "7446375787730027060043405327322.4062678285715815821817", "1.295726242168098525728935341e+27"); + t("3051022926532997299164629581742013507245.25609871536501059924061465912869311", "22560867095894060118140354.396077354652863", "1.35235180171256e+14"); + t("86597231946028939866529694.08292297341417", "52556536560235760169928464.4371111293", "1e+0"); + t("64155849083282775727106565564.09683837323626863653486184704735686", "887755006473.17981", "7.2267515942441496e+16"); + t("458238468121892050492777440806399723.51029", "20401446313054.48340548535", "2.2461077567264154508575e+22"); + t("15697792352949219.327716733457", "18643984669.488905958968185211597707771110", "8.41976e+5"); + t("49356713849410104382776046.29609499", "9600.3320897019953", "5.141146513291311593276e+21"); + t("237628674750215981635095192318367418899899327519.3417067", "99870843925964094624234622.3649438352534", "2.379359835252559207898e+21"); + t("533371823115763843951555557624614062487903.507338370987667117", "1124528302131838269150637007598757.3828654998", "4.74307158e+8"); + t("692998394350964907084.1794689035422872582254093", "106.08742097871375644", "6.532333314898980766e+18"); + t("563817454550622204720369034118279206692924648686972046.9250246162380168326834950", "94212526330251570476582155947131.99955724099948672", "5.984527498755554008774e+21"); + t("60113394247283310838484270771514878207983.766785778804191813", "73579044220522.9248281034189038321239166369841042528520", "8.16990691902957231989970303e+26"); + t("2195460317024982007027.520694010929929", "7.906626405205089525032703861357", "2.77673460779640073159e+20"); + t("63420086214693422141119967131969872.883784598507", "351245077587626195806474.41244888248299459326", "1.80557935929e+11"); + t("11430366298089988657644762834809212.056078289510945282811181517544682567", "432162711472718490846619825.082421", "2.6449219e+7"); + t("119511160387298190586363781744507297703146760717.676834782610199244791291020733453846108", "325012118935394438939814.8416046143", "3.67712935686113572600204e+23"); + t("4819163049355593489964336799.90", "712890140928620741222880104.17672760761076902033211671870619", "6e+0"); + t("5429574271548987853127824844129.59540157053276302039437", "3550063252188102650232708.2346262119937035822658588851471", "1.52943e+6"); + t("17459526968945296716557475697545.883680546567004102", "764651567.959111107995775862448235699541204", "2.2833310883734335714304e+22"); + t("486451658916108573050605230610899764528305498016322.72928533465528132043305389892991", "89977301967353766174050060632537.94765", "5.406381923883498768e+18"); + t("9812801303507913382807703084162416821734530282134921.9389935751232203", "5766199104262958232513611700618022806735.3529287", "1.701779825163e+12"); + t("268738770237064607361.26199", "386334685121563.152418284303359154345157759918872503", "6.95611e+5"); + t("8836033937577112251809.81970179529687429478", "3050412231073542478732.44142275907", "2e+0"); + t("424408.092849042", "37661.2", "1.1e+1"); + t("140332624677141933211867464082417944107641117198278.66800176095", "82870716315480526319164852766.84431933315300", "1.693392200725159300691e+21"); + t("164162963944967196002364161509895429188439760997063518.96915565722509113659735125371883836", "26081221503935511559836204140616618.1198911534840439", "6.294297371010629848e+18"); + t("35209175801549132643285834701.90066452379", "20144.22592000666906224996338800214642256446", "1.747854493956026685231981e+24"); + t("4300524770734216335082744915088556789.0", "5690996406204412719187405509.3", "7.55671672e+8"); + t("401961353249848705352564164795538451994065395934.3999784608165760770619779275568", "7302224058177448742737694008979.59300454740986360367730982838296", "5.5046428327505146e+16"); + t("86378272191344155490139082190444263045830.901712616968968672384456975", "71470631877176403770470397534526521.7034218557546741752055279481973222907", "1.208584e+6"); + t("51325968783742120977676085084258157993302721461013640409.17703", "5698175068781056014611238017.1194049", "9.007439779262816774136069756e+27"); + t("7560786.390496127", "5.5345", "1.366119e+6"); + t("138863086.9281", "74389606.521329767", "1e+0"); + t("931310492502983715448716195108143147606116526583237141420.7719854862045544791366693525170", "5055800853185777459170883871225565614.8233515616544829966", "1.84206324486879929034e+20"); + t("40573829115419050101423263510.8064493689271314", "9529051001967140863315330424.8962235735", "4e+0"); + t("2642474773370539644573.846027356885139196339313623032333412763", "6.0", "4.40412462228423274095e+20"); + t("151070187965.3707401832235214", "23.48357234618168833", "6.43301563e+9"); + t("9300538177433446547188.9280117743211754518", "4502329260313.22408330534712358734374683537379365193", "2.065717018e+9"); + t("215042801078074574976683040.0", "8266001448451.63921174", "2.6015335518523e+13"); + t("764803224894813157446505921175345980083.74546549076", "4378198618054804435977069972433487.673592659283417335278057539", "1.74684e+5"); + t("824486952023835299294807662355902426682974.083786", "35907690843579614909051.5023", "2.2961291373913442058e+19"); + t("54903489124748598323529.793968669069834977444568670", "65417.285358163468116434179564", "8.39281068056382655e+17"); + t("80944338663865565814713852408.38", "61769163293759016580625.660811509", "1.310432e+6"); + t("1926230834079012299263182518652.55627834234476512950081618", "923834854177542946228068.409501673406972130568004454914862958911", "2.085038e+6"); + t("19618101600841856694.1727651445711627002129", "17841521302801279927.83288787042208976848180388359388", "1e+0"); + t("584039865361652690686302377225386639.13854279100771071", "8154682570892629793.822030620613363177947698815281", "7.1620183898552703e+16"); + t("459533853470889732705547695280332999264443760814905.106260890", "479639882096629005830784.930033387912876507068482200988", "9.58080990809499279833140285e+26"); + t("10087317799834.03718184933635283321820511195", "92.016867317151849226040080059225677462", "1.09624660064e+11"); + t("131465139134685765648136766.340366550389254321932", "16146700648.442256378", "8.14191964024358e+15"); + t("32541564719436719559490281443785.43108810661285365036228048082658", "688405969942215.02988332810975631041282950252261", "4.7270892671323385e+16"); + t("122460857129116448887315603312538889321.548018642648817", "2268641736150702117171543104584784335.673939746559575908887159", "5.3e+1"); + t("367417332468652914812097284826107934511645.43", "91736033054162029137.6427263493947014171944448714330324", "4.005158281170992158407e+21"); + t("971760611992491925.54338202598020", "986.84442480386397178800071536640447556", "9.8471510561113e+14"); + t("340490588.50764491734941885019470906711786375", "4263241.750886902445", "7.9e+1"); + t("226183388539294343586586303110168459692954908764826547.0", "86745014870815815830297985627.0001805530675510236607842628717", "2.607451147205816873750305e+24"); + t("14057232044306402364619170284589941.23187749922579299559968580264914959", "4840969536436335462195957.592597022426007981189796", "2.903805103e+9"); + t("552189894.0", "7087707.765706071403321702171562408048111681", "7.7e+1"); + t("24276504561422192863854991.92374470004020899881390669869015", "8751757082211452020.0897771876810067", "2.7739e+6"); + t("1512721932254306233889.273637582", "17556541.11552312423127636", "8.6162867862211e+13"); + t("557096761753924832177147529824169573242356689080347232345.79678", "3736514959036238790014270880270700467035.3962774693798803", "1.4909528474030707e+17"); + t("3323405336377158232197294287.82086456781421866728554", "8356533063151.4694342568938725440957210113170722575814", "3.97701452415939e+14"); + t("220640196995143567374001122016.110907295267401095453348683", "37.174992158248244086099029277142338739811", "5.935178037319068276595164618e+27"); + t("50390659887149153421298.0", "1850974969302907.304813168340340692703000933618277725", "2.7223847e+7"); + t("9064774049223140371550605423344.893477", "968198891361906782353832605.0896311034634292118142013277497", "9.362e+3"); + t("87609117962016584220698707830.9803704377612089423639053", "28446132839167858.16528005077336", "3.079825242234e+12"); + t("4113765531.6375234789707476488597819636052834", "5119.0738535118570308085279254669345", "8.03615e+5"); + t("85919371885787677473760061397312.9347654085343258734742087278", "1393586.0", "6.1653440753414340753825068e+25"); + t("580820148874038769205.8737772", "57176552037.92462632955934645851968194010191400757", "1.0158362618e+10"); + t("34416747793390562233441330.652505492669604433038", "2.9006372989233846373120025", "1.1865236583065679470059039e+25"); + t("611675614481655117500968303318910213038853032.170527534518160799027854811815", "5747036287202707371143079617529.34904701751831118809786986512241503204", "1.06433226434242e+14"); + t("2538519921671621.6", "12588548518.0637153942747619217819071653445", "2.01653e+5"); + t("8169713234307006618070378734.4366051506965198817890150721", "8022882.413370", "1.018301504792381787747e+21"); + t("86201439630585044365038308732.69241", "174154.70", "4.94970503986312424327556e+23"); + t("9703307875836954050302915770653.5006178515495594361060870543", "80541.7255288268870679439438092474", "1.20475540002728390319806364e+26"); + t("27414798.42261007811991881558112422474950548", "5.001007587072768974970347651814551", "5.481854e+6"); + t("35695497073543915770986412.8440883", "784117886046309.1561991312", "4.5523125678e+10"); + t("87958233319063300964559411135476924335417736205751272475.0", "5722695385403642769976512049652073.08122872578060932", "1.5370070813730597161003e+22"); + t("28870470584885559979180367060997793251.9458770229981608111026979888901", "723588591052430584652204831251120.12838074602677268884092", "3.9899e+4"); + t("484933748610956934.47700527370", "12981.212", "3.7356584932975e+13"); + t("8126504568986305331935055713958335.5671492266807229266951803", "519782549077776669059.77090737243041411560882", "1.5634431327878e+13"); + t("55751811791259483647823990951483.0", "908126452022542960697896.5916051381392790468202244403", "6.1392124e+7"); + t("1948695236331460833964919579913203571942453373.2777627338870", "9782044122946332936568261842392755201644.8393044734693675219", "1.99211e+5"); + t("62727055281506910370273437210483.8857", "567745.7015834541805298558646610754209483242786", "1.10484421293829070989243895e+26"); + t("5091959395871698003267111313478.3930282513482774", "1853117282823.84571", "2.747780425485207302e+18"); + t("545938243671057478539883158.1701797", "63484705985497792.1901323771809622868025", "8.599523856e+9"); + t("62185571391527882074520530900922983055063438.3", "8132189321579975808060040833041132.5054769062768231989", "7.646842557e+9"); + t("14189533280272285522181426322083264.813727", "4495620394504365095179605.47822357956638761503516116594119924", "3.156301474e+9"); + t("3344.8457665459740400719", "404.52834953043956863339867078569499285", "8e+0"); + t("9001461502259033.96344026870345", "86427682285.2024330259102465418590937015910", "1.0415e+5"); + t("9723935868793796935386841714805114356.6682737", "10657456542385.647512973222742463237992912427340265", "9.12406804580515409844635e+23"); + t("147228461297369670552030722260657371.0", "56606316550133403276386769525380.3", "2.6e+3"); + t("338613476612936820.6080787952655111841989226343115083", "332.2219230446732547", "1.019238807330015e+15"); + t("416684342300044414140161801.40782766874545811239465000", "19945435058137032.227867316737888305805966836804697773", "2.0891213507e+10"); + t("417315060548680214158514722481522252838542626059.36278712651463579339320939901240848", "829914977763197458583245996203652116.8848666032180229404696", "5.02840738786e+11"); + t("6002019663528594333452543368414083591.5214270808120156894", "621508935485425828324.0", "9.657173567168029e+15"); + t("6634005133357052451687820090403.454214503998864567", "4395572927917156531546770565399.1531171242645042057", "1e+0"); + t("561358196950822401.219331193970618850927926", "284094044873.429723", "1.975959e+6"); + t("96655318615507296355355495509191724349087481421.443366160438423650455312664494", "874385663187385109096974951306517.17058901699706997489060938757056530330", "1.10540831906107e+14"); + t("319355089917280495417975890926.0520068968103712371405701029957", "5695608669464798606.8", "5.6070405895e+10"); + t("6589390657819358431145194.3", "4816208376091416.4092260609510653840221", "1.368169759e+9"); + t("5749207204280111971.2399521327579206", "66529.44005149597717850445686559974354830", "8.64159866644e+13"); + t("25764054577770392742769216567530.5291120848448893908087666587441447527269", "55456959929839256.945", "4.64577477928207e+14"); + t("267192937054112929962259218278.498", "15432851717050353.319030872004920819263922925152", "1.731325758537e+13"); + t("83319775729074952878575984405873869997269.2300715131706353767647252433118", "419776246474292174386248279272614367.3064065847293656934464", "1.98486e+5"); + t("574046336479.3351930280634467150899678620165869701", "6.1437964", "9.3435117166e+10"); + t("3540182073920138072.026853859582039465", "253208876988.0692081973320", "1.3981271e+7"); + t("9696575248.21815763101560149840735433053481716997", "55942.44194499822718543729613724768383737224", "1.73331e+5"); + t("55921114169344145191055435.2610620944516952481039", "9348400660268970144532200.507114435077496149942220", "5e+0"); + t("53697301590823117750393292519687928.74", "89874089751736615846952289.255365960779471017146746835466719349", "5.9747255e+8"); + t("78323098848769137295265.7869219344486", "5132901523696.5446022535238996301111552952", "1.5259030099e+10"); + t("102948125446933881360352618908870409248110847326846.2979756693", "878653185315123406289344586830412199992.7979934870485306494633", "1.17165825114e+11"); + t("4008793273264.1170983408822972440861271321647", "976361919213.2316106634997273614874628961", "4e+0"); + t("39546984927010933113107020217275209737865987546262881.468", "201979668131620624713040583190.1768", "1.95796860608960046428552e+23"); + t("7419080256297.6574077483845468492819497936", "6869058.54609711927386335531674712790758057530", "1.080072e+6"); + t("71448125354018967793592240554420279044.57840455284860239840288843", "390651079363301369559854785.959061826619434879", "1.82894990256e+11"); + t("929678221451.38847376", "2349.608615532033240403816841599825313959", "3.95673651e+8"); + t("648400065576167051979400608343532495736976782.56791661659156612969265453", "6745748155220524090476072.09945", "9.6119815127454949757e+19"); + t("29256953782350909705357102906085177781979404563625087.3984329813578161157713732347270", "137130661855963480915204957002415.5182", "2.13350926673724032098e+20"); + t("37773103217068750212158006668857854578024531065313432743998.5108607129067709807869775934", "34530484343089936093734546612069.4836703339688164121854", "1.093905977158056006873414475e+27"); + t("940375544506545701153097768382485552.348369746129330854687", "30997856492924275904214.0", "3.0336792633426e+13"); + t("5336324471503412892246454790435298131.765637937108", "5817186143.6718203755279228968801748571927967895", "9.17337753977237083211474264e+26"); + t("50126263736046640973332.3288784846756566112538814354582229133824", "36609431742269.619", "1.369217203e+9"); + t("1507134497657611561623405861394090.68553354328170", "411101209821411.522390382504107295533735686993", "3.666091127078738578e+18"); + t("55357474445527737454819685783907416458065524230069.691764259118022601576858833805268105595", "5621244695803326955806044602896191021.516717035980774112599044", "9.847903345473e+12"); + t("974583367533285749398509705552380.3128857952218", "64089042.8129609139918343282157132268887862111", "1.52067081166672208966032e+25"); + t("1221280778169778846.1922578706405272685587395438266959", "5.0235", "2.43113522080178928e+17"); + t("322737069.1510", "2365.14198886884160659", "1.36455e+5"); + t("903762742058357468352979073788437717394.2893711503", "323669258716028958819.62509", "2.792241517293037703e+18"); + t("8708722977474890817302295046.3316560", "15351740.74166533", "5.67279185078928304778e+20"); + t("1253081893096805021302658411202795225103.777985055051413714537965120957263", "7008004654558238416648387968378527.0", "1.78807e+5"); + t("893869087741829442344628143655848625177274219955704697909879408.567931339299986894853610537", "66045860445982080245479594994024166209.3284078", "1.3534066809121391903010568e+25"); + t("8045157196926269967176822342266261944431.285036014152642196", "44012203486684537298371034278.883376887762729452659", "1.82793783532e+11"); + t("77046343920956351207888110679283583298479.0610470596656394786408146174425755", "298470931606474634432309.449810602254052307182", "2.58136842694416039e+17"); + t("623500529132658429674646646136332752270911793714.1131931861676", "773553792860593262829196473575.6467364605464340907119", "8.06020906221609302e+17"); + t("13297783934980798196167395943.5044663930215602538350779570681", "63844203906341285954.6639150529335", "2.08284904e+8"); + t("902379170865051968232758716229790.4947026226317058737703674", "13079087155542675027347.417882642382689085044819", "6.8994048295e+10"); + t("327761534382376789582393358484099274419818218907346678492.47724682758", "703890614074045530088421622059.9702661722116", "4.65642711848830006066449093e+26"); + t("7787320.80173823747928201752064367", "86.0740053903220147186986", "9.0472e+4"); + t("25712537197492699240821504825869.9757710573733278074695", "257025.259727429610260664059510936859", "1.00038950353596976918982639e+26"); + t("2055719336331506637100585335116853672706.9842245710219885055487221126", "5195105286874.782596", "3.95703113375814736151318069e+26"); + t("879858160870518396458962028816059568554493.077883892616265", "35676646861167640026083873733299515789.898807336821599632968510259020286302", "2.4662e+4"); + t("1113878505.60294076059743593328371713765962", "3637.63107629701348", "3.06209e+5"); + t("16740018616182376046668.749145532", "8408377480.7", "1.990873822518e+12"); + t("9641879632067985881566327.0237796573555855098220202232961805", "90527.54028", "1.06507694810284597755e+20"); + t("5097191061953955922095657392188.86087552877924", "90651471742300412247426507.82337292166927", "5.6228e+4"); + t("8763741403975499656817131217909530870752109.109990571987170602723324618870753441516", "30495028465595390590584125549314520236.6905848098088837862649336", "2.87382e+5"); + t("4758065138779986462430459839401160855804453083.28884561707", "9216359459863343487318696535793851.04274104385246472828653045362864845934", "5.16262973411e+11"); + t("80945716455293829628805000255504572029356862035773630.9840004557183223077032737738", "19041026008058976122521722290.56334", "4.251121574070333309215334e+24"); + t("922185019562223341922956940658234584269225102945.8638950", "9191156079948274898662304.275523792591358", "1.00333952719407320280756e+23"); + t("146688497828016194730729113679.662095257190217278639558303", "20018943711272755727383284644.24507", "7e+0"); + t("9632455.0", "5.91258874108", "1.629143e+6"); + t("749709927599711673286168724713.637721694323007571652", "68831371497.82470573187401020", "1.0891980085322067643e+19"); + t("703334852897742025459017143133534769379436366529.28693683670471993263060", "43404555974140947273348.88169434203533719911009901", "1.6204171131638036825989489e+25"); + t("266446231005960024131312641770116963442589808.95592697589", "908813209562489394364082.9707572", "2.93180411774856973797e+20"); + t("7365331456946807654134746419826200283228175270946.87441478287000755797033173195980998", "72570173729965791642605682209056791163.095609209261129", "1.01492542712e+11"); + t("1885375657396122344090283190476150429471.29065818802987431905865902497995", "67122860797766366857816021232423265355.80132760264091339569551013509671764", "2.8e+1"); + t("1988895029701763458653106419453898805.1", "40999033655994650376584088995662929.9872018665953", "4.8e+1"); + t("9205310802789903367648277912472047986.41931455321056110337551393595", "6878892446038808663400976440763.36", "1.338196e+6"); + t("7254812952281947165494.39874884828253729493", "278987038678.2602011075217990146458934669", "2.6004121864e+10"); + t("75121545671313909531478916112276629156.02750137976105193542131649494474", "7556481823445448485668050317.73936186381", "9.941338764e+9"); + t("14230274566049623.3174995100578869246434729", "4217337009791.19808", "3.374e+3"); + t("18563145159921228668292804829417744799073736.9369852598006749423827382921969171129", "334308200499652466018.93584328063247000337134", "5.5527041012386192428781e+22"); + t("-1.939705899412577956E+107", "4.16011175E+95", "-4.66262931377e+11"); + t("-2.17572499998013E+90", "-8.5667512E+88", "2.5e+1"); + t("53.0528", "5.81484336338007548323701145501824145289496435180610403", "9e+0"); + t("-9.262020368015430982320E+31", "-961048023.41740322816166130721520234700463741290443", "9.6374168015875956889595e+22"); + t("72052512835997.5407791032688023719", "-7.7902408903663348543130", "-9.249073789887e+12"); + t("5386665.48728950474757", "-55787.95154355082444905369697247039", "-9.6e+1"); + t("8200969461.781648200152056735094101250", "-6173584.6386638", "-1.328e+3"); + t("-6162044682.46579949512756133331211291134216377880642", "70883.101619290546467", "-8.6932e+4"); + t("2.2858509075765580228170996569682255", "7.024E-8", "3.2543435e+7"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightIntPowTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightIntPowTests.cs new file mode 100644 index 0000000..a9eb860 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightIntPowTests.cs @@ -0,0 +1,480 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightIntPow")] + public class BigDecimalLightIntPowTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void IntPow() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21 + }); + + var t = (string expected, BigDecimalArgument n, BigDecimalArgument exp) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).Pow(exp).ValueOf()); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("4", 2, 2); + t("2147483648", 2, 31); + t("0.25", 2, -2); + t("0.0625", 2, -4); + t("1", 1, 100); + t("0", 0, 1000); + + bigDecimalFactory.Config.Precision = 20; + + t("1.9801312458591796501e+301030", 2, 1e6 + 1); // Math.pow( 2, 1e6 + 1) == Infinity + t("5.0501702959901511235e-301031", 2, -1e6 - 1); // Math.pow( 2, -1e6 - 1) == 0 + t("-1.9801312458591796501e+301030", -2, 1e6 + 1); // Math.pow(-2, 1e6 + 1) == -Infinity + t("-5.0501702959901511235e-301031", -2, -1e6 - 1); // Math.pow(-2, -1e6 - 1) == -0 + t("-1.9801312458591796501e-698971", -0.2, 1e6 + 1); // Math.pow(-0.2, 1e6 + 1) == -0 + t("-5.0501702959901511235e+698970", -0.2, -1e6 - 1); // Math.pow(-0.2, -1e6 - 1) == -Infinity + t("1.9801312458591796501e-698971", 0.2, 1e6 + 1); // Math.pow( 0.2, 1e6 + 1) == 0 + t("5.0501702959901511235e+698970", 0.2, -1e6 - 1); // Math.pow( 0.2, -1e6 - 1) == Infinity + + bigDecimalFactory.Config.Precision = 600; + + t("4096", "8", 4); + t("-1.331", "-1.1", 3); + t("5.125696", "-2.264", 2); + t("6.7266e-7", "6.7266E-7", 1); + t("4142779.6499215776", "21.06", 5); + t("731.1616", "-5.2", 4); + t("1", "61818", 0); + t("3.2", "3.2", 1); + t("5.4139923025768140625e-41", "-1.945E-7", 6); + t("1280630.81718016", "5.8", 8); + t("3965.318943552", "15.828", 3); + t("53.721", "53.721", 1); + t("1", "-1.9", 0); + t("4.58357323731267363492522744606954913014016e-39", "-0.0000161306", 8); + t("-8560814308.6108448224", "-96.94", 5); + t("4.4127502627834341562081e-74", "-6.77E-10", 8); + t("79327261142.56790234534719652175488087744161", "23.0371", 8); + t("3.101121e-38", "1.761E-19", 2); + t("1", "-1", 4); + t("6.23201296e-28", "-1.58E-7", 4); + t("-8.50893402176e-19", "-9.476E-7", 3); + t("16", "4", 2); + t("90368789.0625", "-97.5", 4); + t("1", "-112.8", 0); + t("4.122181458338334221291398681640625e+27", "40042.5", 6); + t("5.94467302491009e+21", "1290.0", 7); + t("5.6599836943004175019970957e+25", "141437", 5); + t("69.75757441", "1.7", 8); + t("1e-42", "0.0000010", 7); + + t("8", "8", 1); + t("-2.5090696333749305038864384e+25", "-664", 9); + t("24794.911296", "5.4", 6); + t("7077398515.1515538432", "93.32", 5); + t("-1.4520042511984659693722813984375e-130", "-2.8295E-19", 7); + t("4", "4", 1); + t("372088627687.312953646321", "781.019", 4); + t("-5.3864523289963490660381317787272961329536e-23", "-0.000658806", 7); + t("-1.8", "-1.8", 1); + t("1", "-5.9", 0); + t("1", "2", 0); + t("-6.4097340625", "-1.45", 5); + t("170859375", "15", 7); + t("595732589817199.440265999920799232", "43.82", 9); + t("1.7080198121677824e+36", "-4200", 10); + t("1", "658.8", 0); + t("136.460505366756569881", "2.269", 6); + t("-1", "-1", 3); + t("236007.159691873761", "-22.041", 4); + t("1", "-1.1", 0); + t("287803125756.085809269657829376", "18.76", 9); + t("4.1069049025e-34", "-2.02655E-17", 2); + t("-8", "-2", 3); + t("1704883919.2576", "203.2", 4); + t("22106814.0740608", "11.2", 7); + t("3.7481851264119295287828498195966142655968201e+23", "227.71", 10); + t("-3", "-3", 1); + t("5.308416e-54", "4.8E-14", 4); + t("1", "-1", 8); + t("1", "-4.1", 0); + t("398", "398", 1); + t("1", "1.17981E-18", 0); + t("255896509713547.45824", "761.4", 5); + t("16807", "7", 5); + t("1", "232.6", 0); + t("2.67066142562472466573674890357652039841e+30", "-6358.1", 8); + t("390625", "-5", 8); + t("85766121", "21.0", 6); + t("2206809.987903620081317314341735861401", "4.309", 10); + t("6.1917364224e-80", "-1.2E-8", 10); + t("64", "-2", 6); + t("-39.8778220049", "-2.09", 5); + t("892496818.033068251283537321", "-31.029", 6); + t("1.1289646949223432899980166202016362758071452681629968849e+25", "320.087", 10); + t("1932991.455312009", "124.569", 3); + t("635307227133823.258624", "-293.2", 6); + t("784", "-28", 2); + t("-43361725294765860565.175323475675341312", "-152.02", 9); + t("1589.6036888689492933115234375", "4.36775", 5); + t("1", "-18.4", 0); + t("20832.8532313216810321678408500840248440324096", "3.46612", 8); + t("6.5536", "-1.6", 4); + t("174729381067.247616", "5590.56", 3); + t("-4.084101e-14", "-0.0021", 5); + t("7.46848810699576790739263937619996819197249e+21", "153.93", 10); + t("2.09881105970752e-16", "0.0000059428", 3); + t("23298085122481", "-169", 6); + t("1", "-4.095E-11", 0); + t("30016915.773120638290557721", "17.629", 6); + t("16807", "7", 5); + t("130666515.5580240243056896", "-10.34", 8); + t("-5.97080224872032e-91", "-9.02E-19", 5); + t("-3450.25251", "-5.1", 5); + t("43046721", "-9", 8); + t("1", "1", 1); + t("3545.66529682492339392399", "5.1279", 5); + t("3396.171616714297", "15.0313", 3); + t("4.622674003397519975764019459730496e+33", "-408146", 6); + t("3.24210716131761936e-27", "2.38620E-7", 4); + t("9", "3", 2); + t("14641", "121", 2); + t("62.81386652381601821841", "2.81523", 4); + t("1", "8", 0); + t("4.29981696e-160", "-1.2E-20", 8); + t("1.692652673311521044295612689449216e-7", "-0.14242", 8); + t("1", "-19.5", 0); + t("1", "8621.8", 0); + t("7.907e-7", "7.907E-7", 1); + t("1.61051", "1.1", 5); + t("1.553e-14", "1.553E-14", 1); + t("858461358961485360081", "171171", 4); + t("64", "-2", 6); + t("-2.9", "-2.9", 1); + t("-2.0661046784e-179", "-1.4E-20", 9); + t("39.0625", "-2.5", 4); + t("-391460020121.8781037", "-45.3", 7); + t("-80.1", "-80.1", 1); + t("3.5831808", "1.2", 7); + t("41.08469075197275390625", "-1.45", 10); + t("-128", "-2", 7); + t("-5277043158.170301334052958483", "-12.03", 9); + t("100.31024025", "10.0155", 2); + t("262144", "4", 9); + t("-2.66450474490105494016e-70", "-1.86E-8", 9); + t("1.58541338622748269695158625134808009096449e+21", "-131.83", 10); + t("1.69e-14", "1.3E-7", 2); + t("81", "-3", 4); + t("1.3979045762098993055105649e+25", "327", 10); + t("-2.8334269484119140625e-17", "-0.0145", 9); + t("8455365204.69607", "96.7", 5); + t("4.826809", "-1.3", 6); + t("-4.2027e-14", "-4.2027E-14", 1); + t("-3671885391606530844.02199", "-5163.9", 5); + t("1.4833", "1.4833", 1); + t("1078702060.96", "32843.6", 2); + t("16384", "4", 7); + t("0.000041046707114327285209693732389121", "-0.185729", 6); + t("9.04141586678594150656e-76", "1.73404E-19", 4); + t("7", "7", 1); + t("-5.408864751631992324037382349788164206309e+39", "-25989", 9); + t("3.6213725246884329693766314512921496510839580087890625e-58", "0.00000180255", 10); + t("51.58686976", "-2.68", 4); + t("32562222.2784028467808485507564561204461862636001", "5.6399", 10); + t("1.5269627878770126091369423832739776731492122624e-24", "-0.0041532", 10); + t("2.27128515349184346452713121698128944001e-82", "-6.849E-9", 10); + t("788.12330352545906108118941549114886272", "2.59298", 7); + + t("49478904727733663575.051582184770446498259493718971258958961046708278746324459568256251259157238318185790764612200843144821137580796334089638532287323488178607687532035618686192601481827902773410791645057647691925965756808571011539462511641266331263543939501901006735272661302011976870015625991111560481188335365459566760212844848008439578745211448299643484693328447464460429576345111356618402802188681216", "-1.60380", 96); + t("1.17647340482075248419254427344376045314316013640615098803852731448350843468375614975229837000370025634765625e+81", "-1312.5", 26); + t("7.0251816660378376802360594609084621021532608383100803495211258733288152327693358768741786747381360859889479870288549139760601303377485234176e+87", "-2391.76", 26); + t("85.717123455378345835968064", "2.0998", 6); + t("7.8189586726154755713303078223442071754329e+40", "187", 18); + t("9.145283009860369082115124525217171723626500086794105722560960199131059600008740516579605574000306840952542591838726900925804876261491646795282472377021036430500854987560433039755667787412917103148092128371355207976203112911565783359385741850905996481e+41", "-6.4113", 52); + t("2.05766289512932241998482631797034621069017517962263802542480365981262536498089637707776e+86", "26", 61); + t("98190573319064.214163360748608660888346857427032348178060040012159036566957731914573312588336568078808326155328828092023492584783227218123097647282496144318320115860427194595696623235777670393347299594686642872330179664094829207439052010438267983369137644871417464586087393161049", "-1.6293", 66); + t("1.392598192044227355988772015943279484446048049140235246881310663971517522995991944491655264930301742862780134225258915488062891063359354742689683631308848403923615202977361e+171", "109", 84); + t("1.5469996446227372120183605762031536360861258626528255060075983309687394111102266369973688377324297491658050323998067994446097153176237864040180207896595918522219595889946775556217e+64", "13.37", 57); + t("417.53905413413116367045797", "1.3", 23); + t("1.624290817967129588779052613030846258081e+39", "79677", 8); + t("6.613998972307900952958925063693292646912001305426127894831260851822286968476028114198011923029274945784114379928252947652708965396453170282038903005249536e-263", "0.00000908", 52); + t("17179869184", "2", 34); + t("9.7756260861181096053516970094092017016032995016954767790504110039917368643756356818044285001644705953440430468819149794081183248976623767084182482857941562203266736374606395800621259352114936429301555533971456e+141", "131.6", 67); + t("4294967296", "2", 32); + t("131621703842267136", "-6", 22); + t("7.9228162514264337593543950336e+28", "2", 96); + t("-1", "-1", 41); + t("5.0096959237841976223015468271587016074738912992534254294320102857326166341642003475731604090433896328441157235303061782495282575910872792923981113856240569836427242032573810996210128117467500761653330557379347005097932959928243111015057764620250811725789666461853189934772359267843261626881e+197", "140.9", 92); + t("2.404907604760405225358828131112281116032698930082119547604265954848982041717359046106827774346003151904701415424e+111", "32", 74); + t("2.69721605590607563262106870407286853611938890184108047911269431464974473521e+22", "-2.7", 52); + t("18.174", "18.174", 1); + t("1.36891479058588375991326027382088315966463695625337436471480190078368997177499076593800206155688941388250484440597994042813512732765695774566001e+43", "2.7", 100); + t("1.25668660115116491467662710973545031109788152235501170924313646703423681882164573441433515503588152722789494580469301248e+72", "34.2", 47); + t("1.56438420672167084519979701497174364597412396629019101951505612890666817698608365177006994887516584111152450449887451995069033040411213741933147153316594951835865202053237255800944727011696760985308614176976019463960094165747239428884158901702435389388132623055120422260406418255249330452909476806656e+299", "1308", 96); + t("-1.366174308182025187777528918308146941320736787278460889575749404867695325446359807161410602138908197731224033169833047036778978022709170976735608988099868310813030127497812540494011203545816852288666658682985428600019476831917843e+58", "-4.83", 85); + t("2.966806088806219456880539423158152815514806645521282752514016241570099725287916962770395912230014801025390625e+28", "-5.15", 40); + t("8589934592", "2", 33); + t("3.92012913845865034844198476089476040042936801910400390625e+28", "-10.5", 28); + t("6.26204859896956162110746451442214931102399028194694661966016701109504299345041406486245804277657094315831017177064948219797627444240188709011456e+72", "10.6", 71); + t("-7.4010922571797388655581604684527426699437277457499992187268655958229686891933340740793991046504324130585438416249947232728346081088006867719609592595610095069331022367447133421906806310032697675369409918188139600222703781482594772971289070262621142441874895437059567046831661495957273728351051362944953711082346089727330717918651409489163662706555003193741825901442633007312863953564385259087744338361955671878877893732351367361843585968017578125e+364", "-31956.5", 81); + t("6.192736416792149755132475219493405669399778858602560762871794455317449717448580836229845787580888290473782381059983387805505374173265513677435445890655671110840202944429668728225878544903602239e-270", "0.000319", 77); + t("2.321827472731847506187210910989207010589651530892302311791322352855446782760907718473019283821056753242967949096791603718944064726033664384082861996009850744961116407128920163494805886357836270766853975184523023642990429569615539676822828070446559161161124635674389704743948383107212919966543969471039720464085404567773913503635201792672811032312063265454094042341369554833714443413857449688164664657173315113983032808001e+220", "159.83", 100); + t("4.953736650985698001275587761883016173298229503362193331584010106486052779761329981195411366329068322677550960044762649449732919438910119549694010717647780952298320287365138145210431380601324547389442337520392258009e+27", "-2.797", 62); + t("-3.181403788572786716059998378326698266679069780899509454959934125355133265193e-226", "-0.0000057", 43); + t("2.2481244795444847556680083178853571141700204725943661497539185751725919215990484669445118877448657555202573745174750533635052209260608084995835891707958259234271442982681066779696130155696868114346639852814575962457281749995256623713554214237458259176913852401064878760784275382146658972801541462348779288776844691139086889351786721e+179", "229.03", 76); + t("1.09544203269304121665791452848994634135137143229447033238750572549632571476402641497730897157401184093614916314911584167715115647604065370616785146866296916632437569033863034458711783186506727022529378159297811462454675308057682780534190256280910865229376785975491743196806996272790525705427972427376758443312371576466422700240638756574402393677191376501159420836822933903938571935476091044876631814554274289087939783553959776485376e+31", "-2.0436", 100); + t("-18437563379.178327736384102280592359424", "-2.4", 27); + t("-9.9938258857146531850367031e-85", "-0.0000000231", 11); + t("2.45673281757908854552870925433471410070214400334169452520459965621921664416713287959754208329284439619509099451538227140937811535553399003066102795766261859069268099803838998995339331311912275460846260697085073312049264485545427543086425664188963659692922005683716104197951717376e+78", "-6.08", 100); + t("-1.270210714458885172439348525985048001607770314656078008119108251089872343340175575576722621917724609375e+24", "-4.15", 39); + t("1209.5", "1209.5", 1); + t("1220703125", "5.0", 13); + t("2.2282376678496302739664556233420633e-74", "0.000000006553", 9); + t("2.218088039378445352751296336694731578146959285984085545221611060271486214348079661041003283535646898758718143100202167951881147633680620698026648392938984778649e+159", "893", 54); + t("2.10030968607618842407969732186669026418164521383378412734005003194384320968659491239802049483617846390172315534146347011074332799904332281963786542263761412332465321180532568441958976108339460464558490863953503079336356338135760894630619724493454777575270501253639608281424341291617698518141921861556244699796561591915201261004739209197698527393965924844797945393999012105081714167479170123104969e-75", "-0.16053", 94); + t("2.5812157101662325924336748344070521698410946762506012782923924916938485004644329931151074914373301798478548152505612780265485671672098712055026947247254600014458282820627468534250894082132928621697659949721616819635951012296371246281717642419683893063297904005186874144169940879165882368e+286", "25488", 65); + t("-15.625", "-2.5", 3); + t("2.9729685996261878754343622542880008372085710279050331084451543295302017053107644303792930816e+59", "-72.2", 32); + t("8.15730721", "1.3", 8); + t("1027.334860999330573407176938442293022889", "-1.47", 18); + t("1.20109289910050514343148045475506579676136202628631781424931463646123976128634333627993215283736800191296195442718065238702508520055513255346146658609301480565930380776363581062628797012612519067602295957218821773367819208495782017345400726347727499503218384384326417098721424389373157748956399698521853695814977704822352568748499324367082691064737392226159651276162776412093080580234527587890625e+315", "8679.5", 80); + t("-6.00774319642841528092711102659123449286352750007573133369794363392e-33", "-0.22", 49); + t("-4.399348626310072691340857398671747903319767685984244866658805429802943497233040561059795990923598510826890908258017493538766494536483606174431755682553269424176946343755577041745496403493430254087811474250251864009392456889456030217048416123130922140883015639602300329038985615284964386359900403921860549312983015992252637174331659470716194350399038561704290046291e+177", "-81.31", 93); + t("-3.05410827582876268390180635074883196222812916959850956275590047122226930793718597160851022493537771838978253152932907298258251555751167476560688772053768410645587233357374279876239597797393798828125e-247", "-0.000000217485", 37); + t("5.94029530519133658573841651381893916937282220672559984930445801765696530117833330901747112098660456061962952244422396324466169433806822249922825538552986841011e-19", "0.491", 59); + t("6.30523820693302485362185385323378612453984181696300485861970499164041182778517073604560519798249286847423997356860449832519236757706844668669858983416671702949907296869514603475482872905487176008793424936405673085021973514041591620544995041842415714193527926259387876594710020672351902248919941484928131103515625e+217", "-207.5", 94); + t("1.3437482898194084408359108790569717431056936319064040016470306278420649755238589129250716839755182586596297106623509972801915917688676116852207e-198", "0.0047", 85); + t("-7.2125976851811538835264180669311252876757309817127885777282268797579465235996423577991265862898834402822899090972405912847104748143261578733778979456054998346007864343435284069799588577484912513898046820531311312862161018665360468415091050892814436289818311468501837802070896183140379745282036670643116477155731121958797307187300620339307163520531060733946755523082115115646976e+279", "-767.6", 97); + t("-3.6014175419419889979825978713404525121917028354184157603813105843373968813713708575013260529677555144144724689493141661197266911743582631754736205113266715503341523389605232359965730457026715491821102337726896541765297511282920487936650122950956509166185123335946923710632464810273024751e+116", "-23.51", 85); + t("864441744884.215763637320205869663958329635842919446190153261333597518371076208416885489806126587561695103959519298009135858834566699504679568405218950836778578735139166130606578479646072479355927241854902595925015466294859320621226069690609744261681250304", "1.404", 81); + t("2.1740698194376449374483147468467027620784304276072222988616865620688896e+52", "808.4", 18); + t("3.8358611506121121577937e+22", "113", 11); + t("7.708142065054490966774434895299862856570563111111152865942369472254266622057906176e-375", "0.0000000000000002582", 24); + t("1.697054670829812124918589801369405630774787179949418285317226086899030607907838200923128944336540480137932154797404155642362243064347816887752994688507537824596616056930370261936449615792564115353680658971035397858675806419291627327666883921628766762017e+153", "35.3", 99); + t("-4.710128697246244834921603689e+27", "-9", 29); + t("3.2505902718449668133084058626546515621706592677748264541998335302067693284031047914414370910433910917853346703702752017311701370087768406221174636457161634693311184118695477205673579866365261461786447054994132502457715569269165081396243597525386428206972507983546973520886724081775555138991647659604473279e+52", "6.8159", 63); + t("10125003344964.40019736846338763496828575459544161517257186895064610033021488387585533013795387142569984", "1.4", 89); + t("-1.4631650542473900277009650505078819321358806229e+27", "-26.90", 19); + t("0.000005295825289418576524939548312590198218162176", "0.468", 16); + t("-2.13825209215512828440269455240169347772084407562319954177735966744864590012014618496355742013223900851293500036195697397558882293948621657334016332630442341312358031641684225772703692879077286212410249112292259617578818732032e+224", "-203479518", 27); + t("5.444517870735015415413993718908291383296e+39", "8", 44); + t("-33338.549041729", "-33338.549041729", 1); + t("2.7214030202002235259872217354276868322505756236796101744750922254072943468398158090938361760503196297567571421573431913968089480080443473498108606049915577803053551131894096917430267992139228904833591260925102332702863889641131058350845466180073805176058062062511496305436593986927276878340795001904960142635221849217162104418149855782368706167456898339731322626805338533602069310753044118499679070391659043014863756212342671519561753648641528938961249781667596503442752009505056776106357574462890625e+355", "25403380.775", 48); + t("-134217728", "-8.00", 9); + t("6.4919612772480684272077477598407081955951769084986853540654908040236664132468736e+31", "4.6", 48); + t("-408518.488", "-74.2", 3); + t("2.6122383559387081296537383480965114437482497294603331038492821930754511334614082451247995976011754175948033208350877260508339210350470971773483611262598975948388081226982520139805939801386768827832059816233575763932242012655210850575522139572300856461682889553829554870249034765972111622144e-53", "0.119534", 57); + t("1.88522188856624562372708154656751441041381726119427387599765763695834615013232142421520586436232009071932931843172032205056661409003338693915273301223126561630347970098203184279906247655542800284362476149094060315694708604230353242909365032002466875120342181047689475694706227284673985251088619705863125778538982501735383260557349198668384156297528069830916927729430864813333996813440323955895348081117644429414429531206777610934118661932545955356203081687958272101e+350", "1396953.01", 57); + t("-7.4641079962956705920034912695642465787383566977879750308559196923222402311665962335871104200586964218306687527948988363660881738310704671349709669487610144905689251123467238632699575375039822099609504292687413249132266915915320573775450823119373280252201183083672896166447786672561808861768782076443312543759437244643146889964363933455672502577964296155349186564340392078021387512970362139779496580009767098175116221996336815276032e+365", "-425417.2", 65); + t("1.915651048048760989675223006710502095760272088541579446290639477213455428121307995153274075329786132157611746651e+72", "363227.051", 13); + t("-7.65032026817518248876564402449082201253180407179105772287243705588834467106246226864795794350056707139677395342984049031608196167e-158", "-0.0000000000008205956327", 13); + t("1.5286700631942576193765185769276826401e+37", "7", 44); + t("1073741824", "8", 10); + t("-7.492788722116264058568890205770570774859100309722464309788118049412229345772411480224300523702767256086276612012745150464681862935165491623598382139203570285583278591609354972796097254467143774807748614976801272704624819215123157317922738427454525033948883547809409740884056108275497786621497433099431568320476275959806764951584862378486525479494452910448127181400467328943711415916384184330110378180608e+38", "-2.6742", 91); + t("-9.9615483925456314514941835282258027490657130453558630944504898425429565393128463181577359582035968e+22", "-34.13672", 15); + t("1.399922200750534682219817715626042346444265577310152832656021878942015248035909712686518235139333930615671437276362060231490721869741275050613538630628001507198150040959125681675660226363983554975062957910826317184614904091530578807538850671607301864207908455029708464592014690257839027200102495492869235566493012545340996194182688131148892605629158333606816661843824439253963260085811270982958376407623291015625e+181", "8668.79595", 46); + t("1.1972515182562019788602740026717047105681e+40", "9", 42); + t("2.809433795080632851709145012225734908409054034941321241601987773815883609706743541544402166343924517939889529050536360240983658675834106822309237371584880050176e+67", "29.26", 46); + t("-1.130764362193076554708917348657069436161383119992010510285626112959278426786936465605907875370782367006311207257151205709430547608789956273155866459033031412425747753017041228269946019068798157376004812291000927158419091251680264057450083682494989856683271885476193403159681085354715517423876371812000883161101039915298940406738346701704184093773206563783365396974283025554248166993067633181013835776e+229", "-495.16", 85); + t("-3.077228040283419501485435148888847716813106712632276671229710377509021026817676725408321326107948661263691709915698886286976007892051135335651197784824163323643144277812710153968406419716183905139635176333083510237302643593683953953477494067043109636077672667948180821005422658784541128359007025402810248257138220199195378601727145592714535208968044372704483391015842523268884989073259915535384596690721656759730286732238685451797332150695395077171985430070293527840123294365665570804795301448909420756992e+418", "-5398620298.48", 43); + t("2591500643510.8703986391408896", "35.620", 8); + t("-3.35390966929685775566428232543003229321430942684482327393890454463616e+26", "-6156.933746", 7); + t("-4911940958770.721866380729238693889243243167048192", "-25.7122", 9); + t("2.09670982511886308779364382461226064522913244291274975553909045464953985730555995547122852179186171376596687978705841751285402054060384366505333092240660435368377833186306191605049e+179", "2093", 54); + t("-1.3120135409024675389197377e-32", "-0.0000000000235855553", 3); + t("3.06580286249339590556181770635869764259023245764469206004664101e-78", "0.0061", 35); + t("-4.429293345196932276984549040219058245905488651609667018402382745119170674779904528756935495114384894434070998056621967747005022674509457845620395626349316891933712941619646377506486625368600115937614507993729672492431012578899815005421568e+37", "-32.051870380", 25); + t("1.299270565684257922619246441017034698039805547412943905460754496572097300952165266370194652051376805296279609746312644347199238836765289306640625e+56", "-18.85", 44); + t("1.566108714385843340192620380546546555641735293434509574033302065853656477829384746549085411912657151882140111651595251043453318950397645765893613409097202898027341727466585518405768283017471302953847629952837298920882176e+24", "41.0192888808596", 15); + t("3.23590932372253866812859949454563891250217856922745576253641197253435665205998361592799809e+89", "2474977", 14); + t("-9.7368504802272205153595678239454304952368475046930119079817985916928e+67", "-12", 63); + t("3.44552147465294110719732986332367243247925798357929806000836849e+62", "-7", 74); + t("128", "2", 7); + t("5.65251025822228531444194278761233641822281792819659230058333528631972497846690920646507426317458140864925211864848848044857090776165664263450974899867329254381660849739991179791628529582217569168185463633540183106805961127540063207424e+251", "-96880334819820", 18); + t("1.214529036103353599078303402353988354368901290518483617131872964733929620706476271152496337890625e+43", "6.5", 53); + t("-1.3089738102615705488950036718911116878301386483323342409513651601949943841095689259436086715966084434967103664037924413474102289403813212913777522181382481044473580351805322191321973e+181", "-78533", 37); + t("1.252453015827223091648143056289e+30", "47", 18); + t("4.593884321465082753417847006029094939767153045428871371185146539475234934788078659649525017869031479813190380591953477672897146298354193774199686172307595609685062957351072442717423824419651156326307969688849329e+172", "34973.7", 38); + t("6.4993779802563991313942147088910855038980304493628711994552936552675080091715543868582664478495863312478503560216160496462563144213423384672637506819444007554298505039521124189159003567749810227911510054190116940785207230365438230686589958633589792785739898681640625e+25", "19.527362557915", 20); + t("22876792454961", "3", 28); + t("429643228077338878294.90980773552148447232", "13385.0992", 5); + t("-7316.89", "-7316.89", 1); + t("5234016485162380478.15409743331356736233224871362317808951664029477472141754368438049197212877764328120319129016485361", "2.41", 49); + t("-9.18448171920669942200338050009727274073573579465100492416464784644248864677562331387086995022599687737054074140424187879986024804042070022603490146718362719056788563440317890910682257768632925460866552260450415793672740716743856864948011399578402033107962721324762764871499139470157293091799845778141752390211181570286270362089589942764421437922022663206638528993662330911966459538905107421403529415706249287725923857606476849002798755812680628308770502507877888997449832630062999974358780733e+247", "-11613.6333", 61); + t("2.648409294963988844015616e-24", "0.0000000138355056", 3); + t("2.40863472207038829716951461596425356200891165327233287498341065017430044564718221477455813374032856667895504085743031089347856425830213625711815509685491800628989456526993157007511653813393067316060298253585492583958097263354394562221211900373157618798878275619835293896301261289133749847496154802330721946407650402052956106639135229248180394944200385403412146150497882700273381421471626181859523581299015700836664867216504968658889499860010034200157321932124862289179191239642591047175122517733014555125735104472403712501002006088016431555682009e+357", "6337.73", 94); + t("-3502571449.82200575261531309080576", "-2.6", 23); + t("1", "1", 25); + t("-1.1809125003067061836785344667120764389443931749265317457525459548456128442105786285468877390219672806038351135283671645849621670658638427296075188535296e+27", "-7.46960", 31); + t("-7804725.584345565904628551916716032", "-1.8", 27); + t("652.68343537143736977925527144667849979675453569710942641839519790994481", "-1.1", 68); + t("1", "-3", 0); + t("4.26825223812027400796974891518773732342988745354489429495479078935112929549619739019072139340757097296812815466676129830954465240517595242384015591919845376e+55", "3.6", 100); + t("1.143346541001259437465016483752642875340200408207372315398374410086504054045958634479945641547514904516533919702060746490155830653988883705469429546657675670673347514271976875109918113055399954802405065425692486675365016543448426931378922954782957026636988416e+190", "-388997.14", 34); + t("1.391479860226959780852496779461260634580951060711489905798047445581119629509685004732118558920853318033429289719854192097911392274604744812177542476869031306237630906988638098552100901480110526866015997536096860367785128698535455722265589251495705036009334110148089566472594008624482378925581538366245059147829461639938451131334656e+162", "785.994", 56); + t("-2.039429275458086101347617297850948854294429450037773018607110681185721614063201210356599410953e+93", "-27753", 21); + t("1.8072708076715752612606017458825273480777271963492548142293548724970849500539908571180569517655791008990836891664536992680448e+43", "64022.984420938", 9); + t("-155568095557812224", "-14", 15); + t("2.18753957001465798602093911444285519704647324430365134831536108015616e+44", "4954.46", 12); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("2e+0", 2, "1.0"); + t("1.6e+1", 2, "4.00000000"); + t("6.25e-2", 2, -4); + t("5.0600621890668482322956892808849303e+20", "907.27", 7); + t("-7e+0", "-7", 1); + t("-9.01e+2", "-901", 1); + t("1.016984074247269470395836690098169093010136836967e+39", "21584.7", 9); + t("-8.983272e+1", "-89.83272", 1); + t("5.308416e+6", "-48", 4); + t("3.83432050166120236679168e+23", "52088", 5); + t("-2.679971527468745095582058350756311201706813294321409e+51", "-517889", 9); + t("5.067853299870089529116832768e+2", "3.47508", 5); + t("3.48822062687911109850066182676769e+32", "4129", 9); + t("1e+0", "-429.32321", 0); + t("-4.2773e+0", "-4.2773", 1); + t("-5.8169306081172252508071119604378757744768e+12", "-66.6082", 7); + t("1e+0", "-7.0654", 0); + t("-1.51655708279450944384385164853883404204414169862685507e+46", "-3956084.3", 7); + t("8.1e+1", "-3", 4); + t("1.296e+3", "-6", 4); + t("2.9e+0", "2.9", 1); + t("1.764e+3", "-42", 2); + t("-9.3418332730097368870513138581415704704611459349313e+49", "-356673", 9); + t("1.517108809906561e+15", "79", 8); + t("3.1063e+4", "31063", 1); + t("1e+0", "-21914.49416", 0); + t("1.4586250332983909737249e+10", "49.43", 6); + t("-4.208092749838142546109102616048103440952842087045576022556672e+46", "-4577028.48", 7); + t("3e+0", "3", 1); + t("1.4301918832998497740081358663795354088849575358074712812593899025686055664154241e+71", "784195396.7", 8); + t("1.914994057877243921847839041839022064004621019747303000421532785660701999616e+57", "2315715.86", 9); + t("1.40379741624014849127481344e+26", "804", 9); + t("2.1305364420464979969795870610432e+21", "18437.32", 5); + t("1e+0", "-48", 0); + t("7.018e+3", "7018", 1); + t("-5.8149737003040059690390169e+25", "-729", 9); + t("2.537640625e+9", "50375", 2); + t("1e+0", "-287", 0); + t("-1.879616311308566413901e+11", "-179.81", 5); + t("-3.73314280039567349e+17", "-3269", 5); + t("8.503056e+6", "-54", 4); + t("1.114538684361769559136325232186960408417483078419495901986816e+28", "3205.4344", 8); + t("-4.27504205e+3", "-4275.04205", 1); + t("-4.18195493e+8", "-53", 5); + t("-1.32651e+5", "-51", 3); + t("-4.309348e+6", "-4309348", 1); + t("5.2697770766776504576e+19", "-7259323024", 2); + t("7.334473e+6", "7334473", 1); + + t("4.2587208337796928798976e+22", "-674", 8); + t("2.5398714208994744315474847375553672678449979949471296663472852498581058264323e+76", "82219173067", 7); + t("3.8595867893817789e+16", "38595867893817789", 1); + t("1e+0", "6607929.612", 0); + t("2.03571124747179512510686558355453870501244709050625e+34", "-377727882.4895", 4); + t("2.45293306092383728169089251608498030232760591201e+47", "-838901", 8); + t("1e+0", "-3", 0); + t("3.834566459566834602823771544700625e+33", "248845085", 4); + t("9.9603189655699799982630929090395077799549456e+43", "-99900649454", 4); + t("4.96981290961e+11", "-89", 6); + t("1.58714182711801961914035004098749014540213215369889902124332186866896819339082286680313155541911581006508901525889227579394470766224134369e+74", "175595288.8066529", 9); + t("1.326409999413464946341631126231535779147856072448189797080406801e+19", "-60348.91227522707", 4); + t("-2.050107090202653994550415295865311714194868710425929507925126964581376e+69", "-72837546696276", 5); + t("2.0550048143314549586011369057890711537772093948321e+49", "-2129135057417", 4); + t("1e+0", "3943801.89538088", 0); + t("2.17438998607457e+14", "737", 5); + t("-2.273581752472e+10", "-22735817524.72", 1); + t("1.51891070159203e+12", "1518910701592.03", 1); + t("-6.42199562432576e+14", "-86276", 3); + t("1.33010089e+8", "11533", 2); + t("5.1662108991396663099278667856407361e+26", "-4767525.59", 4); + t("-2.197e+3", "-13", 3); + t("5.7261215932713209368576e+22", "489176", 4); + t("2.63105908732834720740862027188940646962896811537209872829318157804817881e+71", "800488505731", 6); + t("-7.8151742291e+2", "-781.51742291", 1); + t("-2.5619022164869008875e+19", "-2947955", 3); + t("1.888497394256858387595532951034741052100428552247961627495355202904723558656e+3", "-6.592180609971056972", 4); + t("1.227102111503512992112190463e+27", "1023", 9); + t("4.762033342402709161761620616017059035607e+39", "86210167", 5); + t("1.0526899962331857933889886363874543386374239042307e+34", "6374705.107", 5); + t("8.3043861038534085480857730707894983974895341475449922046323943309856240866914720437665233e+61", "7584431.953", 9); + t("5.4787291089024129877918140548999194405505068584642366052046899220357579072497678119620025119214429570421679076944647727607529032984620150444553526120397e+151", "72419131838243117", 9); + t("6.1203577224967e+13", "61203577224967", 1); + t("-2.6742593337474927167986914400257603e+34", "-82827", 7); + t("3.490938536648870448335810684618787855050175354916141007545163425555957335829e+75", "247548469", 9); + t("6.634204312890625e+15", "-95", 8); + t("-9.171271e+1", "-91.71271", 1); + t("5.65625765123605544067809018296482219675982471958093705254464e+59", "-9093998202", 6); + t("3.518743761e+9", "-39", 6); + t("1e+0", "-5420353171006060062", 0); + t("5.93548365959371477646876280183482286894691258676416e+26", "840398698.65610156", 3); + t("3.05021119744369888239209417566581849921624834657246971302432870103990316674041818082170961e+89", "-820455414011161", 6); + t("3.2696530375744e+11", "571808.8", 2); + t("7.5976962512577721e+4", "-275.639189", 2); + t("1.902906615566371112511312310657143013376e+4", "7.1760176", 5); + t("1.518464318469541965652429354308518011195184133938752135708801e+60", "33317743", 8); + t("2.13200587786233626937431579432326390786198510967574168821917803373975072742648456640669209424089001389646413824e+92", "2444169945946508.968", 6); + t("2.22147484530834915265639755288996e+8", "-14904.612860817114", 2); + t("1.492078384275163354935132877205588401e+36", "-1105217899", 4); + t("-8.7063159741318127407528723363285743789464660953004359884056134456089069164858324456719131936164339926111276712486987242162931090900645752178720048529774274761e+31", "-3538.91793390607241", 9); + t("-2.13718835678657210508559759338095142848187133522908355458407047497607984468725768078407393313580673815584615486794665109272908382172581587476837516398285148210296241056810064518192239263716914808770258390627580625498767684881468120398755080836616073670778327363332334149416019505078840253645081995145611223104498789608205428495349224542916922658293232780298744501314853052243306816366148311919597221018850456061527891844821902500302159789434488225792e+125", "-43837.525307806238", 27); + t("6.6067183217034216835242910438119195789788339709493349261334009277024675568767116522521737472677079426635748603259327817717050761351617610783486587612028204471198915744801916514515768618923473461233676712402753179616115705829361991013069927369820940249862144e+28", "-63581.52864975395137421365938883267810362492", 6); + t("3.4979655423042386318207008930737637967359866053138998526505479068249644854876701482811561341347105355107695596776164641704434681969517211923069874207364828070027467521475982678466251216378786468053405366050900916905682920934733855175647035328921497719019616796867272653837232009633511918699584196136643032274244642212313884180837128156688381283842300678798685499010807063746785776492193558002382725297304258913361e+62", "860658355.93419774133511168973596889241553275604551215135281", 7); + t("2.43e+2", "3", 5); + t("1.1341259418236998571758990926811782086077524757263871423863079766086030645673726799115988350322336274469528121736526520039192242333771040454545272536238688950013853620343757910936524944674880346697808001951639020756685105416346426508389541123017097529060283829118103883424462596062875341251599735321937114348037712815556934333412355272212045907182873831909566029976608100685207198148793211027456e+142", "-77969657.57799062937836", 18); + t("-3.0028686351108853762578194984762919284354267811356443985818417209466959135294437327385632801156377236905276696018118450080884435331856383482308738976558186955588239868161702337334759747439195397392938819582577110829644281561085620841415307488010481547467558616309027516654381610456065415065653113913265920029870297942479155862011879884534002975129045737955826661617772520189976935251896803639204375428428030749e+58", "-3144155.647351179442684823966727126493552586749", 9); + t("1.201753576366394485531985516556867241747342491824062593983537252565487129409802473156809713616241453319630220923725569628522288147931699557284946119375022985149050727430775477724150730989713693887368264655960182781852240604839836052804518341222619522792226084796948765314193322314769946060633722353531243331728258530762514582945950418550784e+31", "27540.61485935537676544614263765574563131573245204", 7); + t("3.37155040678778244943012545203918986928745669295171850695394544390939711301031039954614562269468815944072319615611367890859596537480727045421148118535227427436434942469760108682572253320836320356162649649114580786938367825230347818905248996593031355662611333376e+4", "-3.68110925219710489918033269313682", 8); + t("-1.157385562678413511184308898769846329872668259271078544423253372613586833033423503791374542602879075132311305638124240471079826030985837104460703581522437292662638238646090030670166015625e+186", "-7784665", 27); + t("5.7216584769709576633639728428105243709762039786762015993329350164736e+39", "-8697220540.1137988", 4); + t("3.605080945893673836738483946060969335788919921875e+3", "2.48435", 9); + t("-1.36240450766284865053749603054987406024313651234922549391481734582321604854817272341996695098685037495173906240642212299142117181990034526636150309000822666516664160854969363947955605850108340373472205128364217170231566407701356867606602700453971968987168686696650431666690097496345998516797552915475256643599049488322243247996920458277719083301674288561258518312772229949771006312491204843363917607453589630126953125e+161", "-3009460118.872263767875045", 17); + t("-3.8433712973156659829312033596061261378003902713922379084688365643813353176050190118421109324160544394293788636677094907930777317141076841010276342345029919613746057639577024242309077555840877645790649554834063514938596292845365250946008190566774814236719875110926196028928250892121252859736673222597350006754961294389605594296221696e+157", "-271616.155606", 29); + t("8.880125173267286184293229956929e+30", "-143903", 6); + t("1.2933690030633029978317864458950890700698349292432976269804895466563737201880939364145851524416113479708518067001609042030295271670130750045121e+14", "-7.62048571", 16); + t("4.49118544044091499255717578905704133184433268994940305778505055836352880272044837700029253390614132345790751503571600332872e+26", "765808758.66956931514481639498062905791538", 3); + t("-1.128193052103617375313057818469912250487118062091774976e+29", "-646363.29196", 5); + t("-3.852842458277771128223673975490918109e+4", "-38528.42458277771128223673975490918109", 1); + t("4.47317529320544012507678955001652121720459770030481180787405405093720278140090456738247550862238112656659162732461713512251836889602737214995151906586537236627456e+105", "5932.48", 28); + t("1e+0", "-13.97065588562499", 0); + t("3.600545803275794460618862354918801e+11", "600045.48188248151", 2); + t("2.569380011313067359691205257942517240115628560689496193366261158908199626359277748729466511294505469537479575614097255886064905027804073982599354300474897943e+129", "62080.7", 27); + t("5.818461494039866039726986100228248575472782020261098417686712139322808092966875943575012778303872663798273362332843148103605110550575434794509775866235877112057573531799569068637521409971342270836350080123911710082519119058044202449706075905917444188007277340785315892319100567144025511009943278859996309146349108129588009524947393206783018441414022970002633906397294399684375635228021017590940658971148436650082905540838555648e+102", "6398.880593717242", 27); + t("1.34971356455758975292534311187056647652453780619004003032217331555704261585125261846040712896856946037144900053640398406244356726653396169868958721875222540716653887768486266703330919098362921e+11", "4.1528548909", 18); + t("-1.77396388128500114222945974047586725531284545911409446577e+56", "-913", 19); + t("-1.23493440106890737225414566980096565722401440419412087747352443276574932419181598097379536554237254841727093836607763912665203669933311010821309594074994067411700657618950544400833319706872315553946358432623522564358319794505880365894233180227408889879677018966524371664896e+230", "-90520083747.46", 21); + t("-2.17525001942067723150294558531604730954322658381064353285681098867925681081506083705983156066163186746091443633027643554689317160117967955473175500964155968361524273945120598810972722792061e+14", "-3.121741", 29); + t("1e+0", "-562610.16179592649796590823394093366548", 0); + t("5.5399516545866639955830015026176e+11", "14.94", 10); + t("1.494189395849269188211255039709933309086424259778445906419464942576097148044216376789735318980392750336285644804638743600807550074206128272345650029255016954321611264002141919840462369550905098763723254901675135787504979910497931539962354019230845564318816091666473025536e+126", "-32698949771.110178432792", 12); + t("1.1504940871276742926708823617505372960241390892442547940194260102743306128298973371802547471453755938653944600792141533514422490556963535378521856840746722206160260148176604222079226186281680715577736316488196108040509176925372372483300649927835887344415603493563915019264675154039059770309142781930141352329958156926976e+15", "-8.7358521345995835476", 16); + + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow((string?)null); }, ".pow(null)"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow((BigDecimalLight?)null); }, ".pow(null)"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow(""); }, ".pow('')"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow(" "); }, ".pow(' ')"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow("4e"); }, ".pow('4e')"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow("hello"); }, ".pow('hello')"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").Pow("\t"); }, ".pow('\t')"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightIsFinitEtcTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightIsFinitEtcTests.cs new file mode 100644 index 0000000..8f6d5a0 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightIsFinitEtcTests.cs @@ -0,0 +1,184 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightIsFinitEtc")] + public class BigDecimalLightIsFinitEtcTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void IsFinitEtc() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21 + }); + + var t = (bool actual) => + { + BigDecimalTests.assert(actual); + }; + + var n = bigDecimalFactory.BigDecimal(1); + + t(!n.IsNegative()); + t(!n.IsZero()); + t(n.IsInteger()); + t(n.Equals(n)); + t(n.Equals(1)); + t(n.Equals("1.0")); + t(n.Equals("1.00")); + t(n.Equals("1.000")); + t(n.Equals("1.0000")); + t(n.Equals("1.00000")); + t(n.Equals("1.000000")); + t(n.Equals(bigDecimalFactory.BigDecimal(1))); + t(n.GreaterThan(0.99999)); + t(!n.GreaterThanOrEqualTo(1.1)); + t(n.LessThan(1.001)); + t(n.LessThanOrEqualTo(2)); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("-0.1"); + + t(n.IsNeg()); + t(!n.IsZero()); + t(!n.IsInt()); + t(!n.Equals(0.1)); + t(!n.GreaterThan(-0.1)); + t(n.GreaterThanOrEqualTo(-1)); + t(n.LessThan(-0.01)); + t(!n.LessThanOrEqualTo(-1)); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("0.0000000"); + + t(!n.IsNegative()); + t(n.IsZero()); + t(n.IsInteger()); + t(n.Eq("-0")); + t(n.Gt(-0.000001)); + t(!n.Gte(0.1)); + t(n.Lt(0.0001)); + t(n.Lte("-0")); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("-0"); + + t(!n.IsNeg()); + t(n.IsZero()); + t(n.IsInt()); + t(n.Equals("0.000")); + t(n.GreaterThan(-1)); + t(!n.GreaterThanOrEqualTo(0.1)); + t(!n.LessThan(0)); + t(n.LessThan(0.1)); + t(n.LessThanOrEqualTo(0)); + t(n.ValueOf() == "0" && n.ToString() == "0"); + + n = bigDecimalFactory.BigDecimal("-1.234e+2"); + + t(n.IsNeg()); + t(!n.IsZero()); + t(!n.IsInt()); + t(n.Eq(-123.4)); + t(n.Gte("-1.234e+3")); + t(n.Lt(-123.39999)); + t(n.Lte("-123.4e+0")); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("5e-200"); + + t(!n.IsNegative()); + t(!n.IsZero()); + t(!n.IsInteger()); + t(n.Equals(5e-200)); + t(n.GreaterThan(5e-201)); + t(!n.GreaterThanOrEqualTo(1)); + t(n.LessThan(6e-200)); + t(n.LessThanOrEqualTo(5.1e-200)); + t(n.ToString() == n.ValueOf()); + + n = bigDecimalFactory.BigDecimal("1"); + + t(n.Equals(n)); + t(n.Equals(n.ToString())); + t(n.Equals(n.ToString())); + t(n.Equals(n.ValueOf())); + t(n.Equals(n.ToFixed())); + t(n.Equals(1)); + t(n.Equals("1e+0")); + t(!n.Equals(-1)); + t(!n.Equals(0.1)); + + t(!bigDecimalFactory.BigDecimal(0.1).Equals(0)); + t(!bigDecimalFactory.BigDecimal(1e9 + 1).Equals(1e9)); + t(!bigDecimalFactory.BigDecimal(1e9 - 1).Equals(1e9)); + t(bigDecimalFactory.BigDecimal(1e9 + 1).Equals(1e9 + 1)); + t(bigDecimalFactory.BigDecimal(1).Equals(1)); + t(!bigDecimalFactory.BigDecimal(1).Equals(-1)); + + t(!bigDecimalFactory.BigDecimal(10).GreaterThan(10)); + t(!bigDecimalFactory.BigDecimal(10).LessThan(10)); + t(!bigDecimalFactory.BigDecimal(2).GreaterThan(10)); + t(!bigDecimalFactory.BigDecimal(10).LessThan(2)); + t(bigDecimalFactory.BigDecimal(10).LessThanOrEqualTo(20)); + t(!bigDecimalFactory.BigDecimal(10).GreaterThanOrEqualTo(20)); + + t(!bigDecimalFactory.BigDecimal(1.23001e-2).LessThan(1.23e-2)); + t(bigDecimalFactory.BigDecimal(1.23e-2).Lt(1.23001e-2)); + t(!bigDecimalFactory.BigDecimal(1e-2).LessThan(9.999999e-3)); + t(bigDecimalFactory.BigDecimal(9.999999e-3).Lt(1e-2)); + + t(!bigDecimalFactory.BigDecimal(1.23001e+2).LessThan(1.23e+2)); + t(bigDecimalFactory.BigDecimal(1.23e+2).Lt(1.23001e+2)); + t(bigDecimalFactory.BigDecimal(9.999999e+2).LessThan(1e+3)); + t(!bigDecimalFactory.BigDecimal(1e+3).Lt(9.9999999e+2)); + + t(!bigDecimalFactory.BigDecimal(1.23001e-2).LessThanOrEqualTo(1.23e-2)); + t(bigDecimalFactory.BigDecimal(1.23e-2).Lte(1.23001e-2)); + t(!bigDecimalFactory.BigDecimal(1e-2).LessThanOrEqualTo(9.999999e-3)); + t(bigDecimalFactory.BigDecimal(9.999999e-3).Lte(1e-2)); + + t(!bigDecimalFactory.BigDecimal(1.23001e+2).LessThanOrEqualTo(1.23e+2)); + t(bigDecimalFactory.BigDecimal(1.23e+2).Lte(1.23001e+2)); + t(bigDecimalFactory.BigDecimal(9.999999e+2).LessThanOrEqualTo(1e+3)); + t(!bigDecimalFactory.BigDecimal(1e+3).Lte(9.9999999e+2)); + + t(bigDecimalFactory.BigDecimal(1.23001e-2).GreaterThan(1.23e-2)); + t(!bigDecimalFactory.BigDecimal(1.23e-2).Gt(1.23001e-2)); + t(bigDecimalFactory.BigDecimal(1e-2).GreaterThan(9.999999e-3)); + t(!bigDecimalFactory.BigDecimal(9.999999e-3).Gt(1e-2)); + + t(bigDecimalFactory.BigDecimal(1.23001e+2).GreaterThan(1.23e+2)); + t(!bigDecimalFactory.BigDecimal(1.23e+2).Gt(1.23001e+2)); + t(!bigDecimalFactory.BigDecimal(9.999999e+2).GreaterThan(1e+3)); + t(bigDecimalFactory.BigDecimal(1e+3).Gt(9.9999999e+2)); + + t(bigDecimalFactory.BigDecimal(1.23001e-2).GreaterThanOrEqualTo(1.23e-2)); + t(!bigDecimalFactory.BigDecimal(1.23e-2).Gte(1.23001e-2)); + t(bigDecimalFactory.BigDecimal(1e-2).GreaterThanOrEqualTo(9.999999e-3)); + t(!bigDecimalFactory.BigDecimal(9.999999e-3).Gte(1e-2)); + + t(bigDecimalFactory.BigDecimal(1.23001e+2).GreaterThanOrEqualTo(1.23e+2)); + t(!bigDecimalFactory.BigDecimal(1.23e+2).Gte(1.23001e+2)); + t(!bigDecimalFactory.BigDecimal(9.999999e+2).GreaterThanOrEqualTo(1e+3)); + t(bigDecimalFactory.BigDecimal(1e+3).Gte(9.9999999e+2)); + + t(!bigDecimalFactory.BigDecimal("1.0000000000000000000001").IsInteger()); + t(!bigDecimalFactory.BigDecimal("0.999999999999999999999").IsInteger()); + t(bigDecimalFactory.BigDecimal("4e4").IsInteger()); + t(bigDecimalFactory.BigDecimal("-4e4").IsInteger()); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightLnTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightLnTests.cs new file mode 100644 index 0000000..b18536e --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightLnTests.cs @@ -0,0 +1,124 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightLn")] + public class BigDecimalLightLnTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Ln() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (BigDecimalArgument n, string expected, long sd) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(n, config).Ln().ValueOf()); + }; + + t("91247532.65728", "18.3290865106890306", 19); + t("390145000.967298821818782016684792033527978825236257109725032636684195216173865101534596314015627154955417417356051726409514707961291776124601310897", "19.782029025340505793950028597475307602798983116", 47); + t("1582186416.193367134722504736788921341001732540902935815137028669849087377143230724513115136185091885228053584573993361147951779854091136019178181014965525402328169438038737972227467851264", "21.18207353512", 13); + t("524656579.6561082202986522788989992058097028959478133491616251386650273315481201712733337497961653741466850177948", "20.07825447252854998238544895", 28); + + // 0.00000000000000000000000000000000000000000000000000012300000000007559999999999999999999999999999999999999243549999999070119999999714232000000000000000000000062028900000114375240000070298928000014402707200950... + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.000000000000000000000000000000000000000000000000000123", 3); + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.000000000000000000000000000000000000000000000000000123", 3); + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.0000000000000000000000000000000000000000000000000001230000000000755", 16); + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.00000000000000000000000000000000000000000000000000012300000000007559", 17); + t("1.0000000000000000000000000000000000000000000000000001230000000000756", "0.00000000000000000000000000000000000000000000000000012300000000007559999999999999999999999999999999999999243549999999070119999999714232", 83); + + // 0.000000001229999999999549999690409... + t("1.000000001230000000756", "0.00000000122", 3); + t("1.000000001230000000756", "0.00000000122999", 6); + t("1.000000001230000000756", "0.00000000122999999999954", 15); + + t("8.1", "2.09186", 6); + t("40.34", "3.6973435", 8); + t("4.2", "1.4350845", 8); + t("14.23", "2.65535", 6); + t("21.41", "3.06", 3); + t("22.67", "3.121", 4); + t("39.1", "3.666122466", 10); + + t("484260633.26", "19.9981", 6); + t("236924096.650141980105861288", "19.2832503", 9); + t("11138070.731145", "16.225879593546584", 17); + t("316912316.269705411968295", "19.57413568875", 13); + t("14302.00090090005", "9.5681547295995328150820246661661705098", 38); + t("11275.000001000060000080002000020000001000000000000005", "9.330343164459576214650017260944374", 34); + t("27341.0000008", "10.2161426860830683625276502597036387295831", 42); + t("16240.999999", "9.695294188113030278102040381421186919123", 40); + t("14805.999994993999999999994994999999999799999999999299999999999", "9.602787782664937484827890675974506248220680541057", 49); + t("0.979999999999999999", "-0.02020270731751944942845346428", 28); + t("0.000704006", "-7.25872367911527720999907560001613988913676912731866147366599498415", 66); + t("2.5", "0.91", 2); + t("2.0", "0.693147180559945", 15); + t("0.013440860215", "-4.3094559418430461815", 20); + t("70.0", "4.248495242", 11); + t("59.8", "4.091005660956586", 16); + t("60.0", "4.09", 3); + t("0.99999999999999999999999999999999999999999999999999985408483944", "-0.00000000000000000000000000000000000000000000000000014591516056", 35); + t("1.0000000000000000000278495935577735173108449580311901557454985107031530689779032404701969152386509968231412912032547047938976884258008764161145204", "0.000000000000000000027849", 5); + t("0.99999999999999999999999999999999999977092768577305435532481001390241851854279230037455", "-0.000000000000000000000000000000000000229072314226945644675189986097581481", 36); + t("0.99999999999999999999999999999999999999999999999999998835768423821199588003439629108184316187951135202946432288978839496371393350180031770629223550075209192125418982248995945098956877584132", "-0.00000000000000000000000000000000000000000000000000001164231576178800411996", 22); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("86581147739152189809997746256.485303", "6.6630879609165666865732779356483110831e+1", 39); + t("2.49662549037205161930152513676222984332E-1769526964968889", "-4.074486411188359782e+15", 19); + t("4.75511906567739510224E+9281276469", "2.1370928843035034699971447557867150369194e+10", 41); + t("8.69428902381899286125995853877646262336481547649342271017E+28073656389526", "6.464198270836177218138049860623405271087114955052778e+13", 52); + t("6.328946425890222657711855468334E+28226", "6.4994611968630829105921275070197989840133161484e+4", 47); + t("8.419E-4010970724", "-9.235601395387443688559191477601e+9", 31); + t("1.7723561424140845E+247846099271", "5.7068673353869932302832431846669628468118839468307384e+11", 53); + t("4.432834164971387041E-4507057882525783", "-1e+16", 2); + t("5.6180796113670596347965219927087524242601615E+3880377312075", "8.93489895397792489522883676797722624255e+12", 39); + t("8.6184097550403752866225958864653E-99458373", "-2.29011364889340897937584119444696367e+8", 36); + t("7.21733459581750946992541376472150E+771894752", "1.7773533512920215e+9", 17); + t("7.29846078607878771302050492452384424889888683E-537191033751", "-1.236928066403126e+12", 16); + t("3.668100638398885156015068016729087120382965349467E+84070728", "1.935800063496311111975e+8", 22); + t("7.8060858E-167062888423895", "-3.8467651647738609186703184862365050751052e+14", 41); + t("5.77970666253418116761098030625E+223072047", "5.13642371840220060515235912414184521974662502e+8", 47); + t("54.944027854626073894087463822117107421615", "4e+0", 2); + t("5.89E+4068309134235820", "9.36762796618291285378e+15", 21); + t("6.806688317295882211444994250555E+7553266453", "1.73920387400077162987035162411978513704566862686e+10", 48); + t("8.7301419368711031383740359E+35766359667870", "8.235508660190309563654957418152355352e+13", 37); + t("7.926192471441099330397999580E-784167", "-1.80560917444508379549407756805599569268569223e+6", 45); + t("72.7973", "4.287678866602e+0", 13); + t("7E+2084142509237", "4.79891547344626727113852205192e+12", 30); + t("9.3160920091238143684430426114185923861195316789176E+9009721765428", "2.0745e+13", 5); + t("7.11299819E+7082753304", "1.63e+10", 3); + t("1.259774278348886756714714853102551787716753309044316124949E+712621", "1.6408707224870705769939774744309009702195e+6", 41); + t("3.59522279140903230506716479623E+86968785461810", "2.002530289601622667750807006104599119026e+14", 40); + t("4.19231E-7592313503421", "-1.748194789431315881762449482356139169e+13", 37); + t("64572.983932271806289465556", "1.10755513969156443144229910347268775332908e+1", 42); + t("4.961229890606203486886459941941277127027E+604148", "1.39110378041583852706104753424975e+6", 33); + t("4.1590152196231371771711659246E+403232512853795", "9.284771731076797069605043792598349156233286259e+14", 46); + t("7.57895891043427E+89609785", "2.0633415715277728333795242903376837197944185472408033310945e+8", 59); + t("9.9940433950867406385462586629E+57", "1.33549339555687132737e+2", 21); + t("5.2273640460183882551198285667311888762451852768642903877382E+86461", "1.99085e+5", 6); + t("8.37869137029350445E+900", "2.07445227543587787134124946870990167444156501037595873e+3", 54); + t("7E+5", "1.3458835614025541e+1", 17); + t("8.36991087473514132639620816460727714124539564560E+114871900769", "2.64502326e+11", 9); + t("88.7213950103796184597368396487398", "4.4855e+0", 5); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightLogTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightLogTests.cs new file mode 100644 index 0000000..e4b6fec --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightLogTests.cs @@ -0,0 +1,104 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightLog")] + public class BigDecimalLightLogTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Log() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (BigDecimalArgument n, BigDecimalArgument @base, string expected, long sd) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(n, config).Log(@base).ValueOf()); + }; + + t("243", "3", "5", 7); + t("243", "9", "2.5", 7); + + /* + 6.166675020000903537297764507632802193308677149 + 28^6.16667502 = 839756321.6383567959704282429971526703012698 + 28^6.16667503 = 839756349.6207552863005150010387178739013142 + */ + t("32", "4", "2.5", 10); + + //t("316.2277660168379331998893544432645719585553021316022642247511089459022980600999502961482777894980004", "10", "2.49999999999999999999", 21); + + // Base 10 therefore the following tests pass despite 15 or more zeros or nines as the rounding digits. + + // 4.9999999999999999999960913... + //t("99999.9999999999999991", 10, "4.999", 4); + + // 10^0.1 = 1.258925411794167210423954106395800606093617409466... + //t("1.258925411794167210423954106395", 10, "0.09999", 4); + + // 3.391702100000000000000000000000000025534271040... + t("2464.348361986885121671329250344224", 10, "3.3917021", 18); + + // 4.99999999999999999960913... + //t("99999.99999999999991", 10, "4.999", 4); + + // 4.9999999999999999960913... + //t("99999.9999999999991", 10, "4.999", 4); + + // 4.99999999999960913... + //t("99999.99999991", 10, "4.999", 4); + + // 8.959609629999999999999999999999431251938064 + //t("911191437.48166728043529900000", 10, "8.959609629999999999999999", 25); + + //t("6.626757835589191227753975149737456562020794782", 10, "0.8213011002743699999999999999999999999999999", 43); + //t("64513410281785809574142282220919135969.8537876292904158501590880", 10, "37.80964999999999999999", 22); + //t("10232.9299228075413096627", 10, "4.009999999999999", 16); + //t("1.29891281037500", 10, "0.11357", 5); + //t("0.0000100000000000010000005060000000000800030000000400908", 10, "-4.99", 3); + //t("8", "4294967296", "0.09375", 4); + + //t("4.20732041199815040736678139715312481859825562145776045079", 10, "0.6240055873352599999999999999999999999999999999999999", 52); + //t("33.51145738694771448172942314968136067036971739113975569076629", 10, "1.5251933153717162999999999999999999999999999999999999999", 56); + //t("16.399137225681149762104868844", 10, "1.21482099999999999999999", 24); + t("0.01", 10, "-2", 17); + t("0.00001", 10, "-5", 35); + t("15625", "3125", "1.2", 2); + //t("268435456", "1048576", "1.4", 2); + t("8589934592", "65536", "2.0625", 5); + //t("33554432", "256", "3.125", 4); + t("4503599627370496", "65536", "3.25", 3); + t("68630377364883", "59049", "2.9", 2); + + // base 2 + t("18216.8140929585641372", 2, "14.152983050314836771855701", 26); + t("7408.82842447993", 2, "12.8550297084583087071", 21); + t("29259.23925137426", 2, "14.83660463902", 13); + t("31553.4", 2, "14.945507849063278420302384", 26); + t("6080.97", 2, "12.57008575", 10); + t("575.881932366571406", 2, "9.16962924962079798", 18); + t("4573.55560689675", 2, "12.1591004766309775332", 21); + t("8607.97004888426002071", 2, "13.07145734276093159769689946319", 31); + t("559.1647711259", 2, "9.12712965971023632", 18); + t("31897.9889", 2, "14.9611778475691091525075", 24); + t("9091.859714971663525", 2, "13.1503597085807068872335", 24); + t("5661.58", 2, "12.466989012642603919950322048", 29); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightMinusTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightMinusTests.cs new file mode 100644 index 0000000..f952b51 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightMinusTests.cs @@ -0,0 +1,220 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightMinus")] + public class BigDecimalLightMinusTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Minus() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 200, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e9, + ToExpPos = (long)9e9 + }); + + var t = (BigDecimalArgument minuend, BigDecimalArgument subtrahend, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(minuend).Minus(subtrahend).ValueOf()); + }; + + t(1, 0, "1"); + t(1, "-0", "1"); + t(-1, 0, "-1"); + t(-1, "-0", "-1"); + t(0, 1, "-1"); + t(0, -1, "1"); + t("-0", 1, "-1"); + t("-0", -1, "1"); + + t(1, "0", "1"); + t(1, "1", "0"); + t(1, "-45", "46"); + t(1, "22", "-21"); + //t(1, 0144, "-99"); //js only + t(1, "0144", "-143"); + t(1, "6.1915", "-5.1915"); + t(1, "-1.02", "2.02"); + t(1, "0.09", "0.91"); + t(1, "-0.0001", "1.0001"); + t(1, "8e5", "-799999"); + t(1, "9E12", "-8999999999999"); + t(1, "1e-14", "0.99999999999999"); + t(1, "3.345E-9", "0.999999996655"); + t(1, "-345.43e+4", "3454301"); + t(1, "-94.12E+0", "95.12"); + t("0", 0, "0"); + t("0", "0", "0"); + t(3, "-0", "3"); + t(9.654, 0, "9.654"); + t(0, "0.001", "-0.001"); + t(0, "111.1111111110000", "-111.111111111"); + t(-1, 1, "-2"); + t(-0.01, 0.01, "-0.02"); + t(54, -54, "108"); + t(9.99, "-9.99", "19.98"); + t("0.0000023432495704937", "-0.0000023432495704937", "0.0000046864991409874"); + t(100, 100, "0"); + t(-999.99, "0.01", "-1000"); + t("10", 4, "6"); + t("03.333", -4, "7.333"); + t(-1, -0.1, "-0.9"); + t(43534.5435, "0.054645", "43534.488855"); + t("99999", "1", "99998"); + + var t2 = (BigDecimalArgument minuend, BigDecimalArgument subtrahend, string expected, long sd) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(minuend, config).Minus(subtrahend).ValueOf()); + }; + + t2("1E-17", "1E-16", "-0.00000000000000009", 67); + t2("0.001", "1E-37", "0.00099999999999", 11); + t2("1E-35", "1E-15", "-0.00000000000000099999999999999999999", 72); + t2("1E-31", "0.01", "-0.0099999999999999999999999999999", 36); + t2("1E-20", "1E-30", "0.000000000000000000009999999999", 99); + t2("1E-20", "1E-34", "0.0000000000000000000099999999999999", 41); + t2("1E-37", "1E-14", "-0.0000000000000099999999999999999999999", 99); + t2("0.1", "1E-29", "0.09999999999999999999999999999", 53); + t2("1E-27", "1E-27", "0", 14); + t2("1E-33", "1E-28", "-0.000000000000000000000000000099999", 6); + t2("1E-16", "1E-9", "-0.0000000009999999", 74); + t2("1E-20", "1E-26", "0.00000000000000000000999999", 88); + t2("1E-14", "1E-32", "0.00000000000000999999999999999999", 68); + t2("1E-15", "1E-18", "0.000000000000000999", 46); + t2("1E-34", "1E-31", "-0.0000000000000000000000000000000999", 90); + t2("0.01", "0.0001", "0.0099", 27); + t2("1E-22", "0.01", "-0.0099999999999999999999", 62); + t2("1E-19", "0.1", "-0.0999999999999999999", 64); + t2("1E-40", "1E-12", "-0.0000000000009999999999999999999999999999", 98); + t2("1E-37", "1E-16", "-0.0000000000000000999999999999999999999", 82); + t2("0.1", "1E-11", "0.09999999999", 88); + t2("0.001", "1E-14", "0.00099999999999", 56); + t2("1E-14", "1E-31", "0.0000000000000099999999999999999", 42); + t2("0.00001", "1E-35", "0.0000099999999999999999999999", 23); + t2("0.000001", "1E-17", "0.00000099999999999", 19); + t2("1E-16", "1E-37", "0.0000000000000000999999999999999999999", 50); + t2("1E-18", "1E-15", "-0.000000000000000999", 70); + t2("1E-27", "1E-30", "0.000000000000000000000000000999", 76); + t2("0.000001", "1E-35", "0.00000099999999999999999999999999999", 40); + t2("1E-20", "1E-27", "0.000000000000000000009999999", 32); + t2("0.1", "1E-25", "0.0999999999999999999999999", 75); + t2("1E-33", "1E-19", "-0.000000000000000000099999999999999", 15); + t2("1E-7", "1E-34", "0.0000000999999999999999999999999999", 96); + t2("1E-32", "1E-35", "0.00000000000000000000000000000000999", 4); + t2("0.1", "1E-31", "0.0999999999999999999999999999999", 31); + t2("1E-21", "1E-12", "-0.00000000000099999", 5); + t2("1E-38", "0.1", "-0.09999999999999999999", 19); + t2("1E-25", "0.1", "-0.0999999999999999999999999", 83); + t2("0.001", "1E-21", "0.000999999999999999999", 100); + t2("1E-10", "0.1", "-0.0999999999", 58); + t2("1E-18", "1E-39", "0.000000000000000000999999999999999999999", 84); + t2("1E-16", "1E-39", "0.00000000000000009999999999999999999", 19); + t2("1E-24", "1E-36", "0.000000000000000000000000999999999999", 25); + t2("1E-10", "1E-39", "0.000000000099999999999999999999999999999", 67); + t2("1E-24", "1E-30", "0.00000000000000000000000099", 2); + t2("1E-23", "1E-37", "0.0000000000000000000000099999999999999", 55); + t2("1E-27", "1E-39", "0.000000000000000000000000000999999999999", 27); + t2("1E-28", "1E-27", "-0.0000000000000000000000000009", 86); + t2("0.000001", "1E-16", "0.0000009999999999", 35); + t2("1E-25", "0.0001", "-0.0000999999999999999999999", 54); + t2("1E-12", "0.00001", "-0.000009999999", 50); + t2("0.1", "1E-23", "0.0999999999", 9); + t2("0.01", "1E-10", "0.0099999999", 52); + t2("0.1", "1E-12", "0.09999", 4); + t2("1E-26", "1E-37", "0.0000000000000000000000000099999999999", 70); + t2("1E-23", "1E-14", "-0.00000000000000999999999", 56); + t2("1E-21", "0.0001", "-0.000099999999999999999", 39); + t2("1E-10", "0.1", "-0.0999999999", 26); + t2("1E-17", "0.01", "-0.00999999999999999", 20); + t2("1E-26", "1E-21", "-0.00000000000000000000099999", 85); + t2("0.000001", "1E-33", "0.000000999999999999999999999999999", 90); + t2("1E-27", "0.1", "-0.099999999999999999999999999", 84); + t2("1E-21", "1E-18", "-0.000000000000000000999", 88); + t2("1E-16", "1E-16", "0", 56); + t2("1E-37", "0.000001", "-0.0000009999999999999999999999999999999", 33); + t2("1E-20", "1E-22", "0.0000000000000000000099", 51); + t2("1E-16", "1E-30", "0.000000000000000099999999999999", 20); + t2("1E-22", "1E-10", "-0.0000000000999999999999", 87); + t2("1E-11", "1E-20", "0.00000000000999999999", 47); + t2("0.1", "1E-24", "0.099999999999999999999999", 46); + t2("1E-25", "0.001", "-0.0009999999999999999999999", 42); + t2("1E-15", "1E-37", "0.00000000000000099999999999", 11); + t2("1E-22", "0.001", "-0.0009999999999999999999", 81); + t2("1E-24", "1E-12", "-0.000000000000999999999999", 20); + t2("1.000000", "18105728986041761640887595533283120477.2742082541073753474", "-18100000000000000000000000000000000000", 4); + t2("0.99999998878183120416824285037203", "38327.8407", "-38326.8407000112181687958317", 27); + t2("0.9999999999999999999999999996779494408046302584202610482", "530770914537012205776892173.865394333047000705228144653463710904", "-530770914537012205776892172.8653943330470007052281446537857614631953697415797389518", 92); + t2("1.000154688825648481267644205561160017273389804317525860318979525925354", "5590.1166644928260", "-5589.1165098040003515187323557944388", 35); + t2("0.99999999999006027143696724994249662", "88359515632902648.759516639917666812111537547", "-88359515632902600", 15); + t2("1.0000000000", "53.0721765572571058497526522442", "-52.0721765572571058497526522442", 68); + t2("1.0000000000000000010868737982065976552678875918917937663867883830744", "72274249298653961307161266.2429171261996071156986500328106121752", "-72274249298653961307161265.2429171261996071146117762346040145199321124081082062336132116", 87); + t2("1.00000000000000000000081253348145920781026085647520801897170982656182514222627649830571537940570097", "34180955261225283278.9546214472426960215969277072", "-34180955261225283277.954621447242696021596115173718540792189739143524791981028290173438174857773723", 98); + t2("0.99999999999999999999999999999999999998756496998614330743704048912", "36423078435.49585469762969072900556033", "-36423078434.49585469762969072900556033000000000001243503", 56); + t2("0.99999999999999999999999999999815156221279091250236161202515555239214607133", "184535429818126810905.866146730925744980274670738002788577", "-184535429818126810904.866146730925744980274670738004637014787209087497", 69); + t2("1.10455706926852759636854514325898495936688404757420394401166868002", "35601365816445214252.5525881378161872928170", "-35601365816445214251.44803106854765969644845485674101504063311595242579605598833131998", 98); + t2("0.9999999999380984950253", "83972321187501515671178201780968.114223326", "-83972321187501515670000000000000", 19); + t2("1.00000000000000000000000000000002230745989026902237", "5182909643868660181.616326849296578520834", "-5182909643868660180.61632684929657852083399999999997769254010973097763", 74); + t2("1.00000000000000000000000000000000017890501993570751536367804830406693776445", "7596063323395135740831786963557300.828122807129946719956", "-7596063323395135740831786963557299.82812280712994671995599999999999982109498006429248463", 87); + t2("0.99999999997144379431778592551299579284817269428143146335310624910486", "5744510660347753705135441208927833216328.435064197579250286979352170", "-5744510660347753705135441208927833216327.435064197607806492661566244487004", 73); + t2("1.0000000000000000000", "5966.1758018", "-5965.1758018", 58); + + t2("606.254575304", "10913610393350.2606", "-10913610392744.006024696", 37); + t2("42885995.8922914272", "706475.796938411", "42170000", 4); + t2("6052717165.1446", "65455223170949076520.8060582718286379316", "-65455223164896300000", 15); + t2("5955452.7441572243480999", "916606845979019189.694793932", "-916606845973063000", 15); + t2("2571182.9104", "5112317485037139357.0326821757855538364", "-5112317485034568174.12228217578555383", 36); + t2("33777941893928234.1403399701827010", "4007790318278125722.91052580512126369", "-3000000000000000000", 1); + t2("6409343803262.388", "823497316.0", "6408520305946.388", 38); + t2("35811.99", "6730744506562.519", "-6000000000000", 1); + t2("29074997967.4033077914", "566332182964.6602808", "-537250000000", 5); + t2("9529.144771387", "8895131556.883", "-8895122027.738228613", 34); + t2("1376622519151175.50445", "75251508328.9053133011113", "1376547267642846.5991366988887", 40); + t2("7062679212073143326888924001163.02786", "670367382193775796879309.97397127870279732280890295", "7062678541705761133000000000000", 19); + t2("269622299212099.5658", "67080856574410241738.2", "-67080586952111029638.6342", 43); + t2("347539.651654349", "999164349246243097554653376.101753100580453", "-999164349246243000000000000", 16); + t2("589630075341582712237298018007.626791554398075374457001806", "37072203775488.5460924874", "589630075341582675165094242519.080699066998075374457001806", 80); + t2("239797538.62924219574590", "62.7179", "239797475.9113421957459", 29); + t2("68389708692892364357038.550642618", "346589125.87181", "68389708692892017767912.678832618", 74); + t2("22366800802617651725451014763352512558.88384367", "56706199621325498.77362822019", "22366800802617651725394308563731187060.11021544981", 77); + t2("5501088.6084944677846990708389945743093", "664927.656419331398418627625297930574", "4836160.9520751363862804432136966437353", 53); + t2("999909783662285281933157327721667.775471879628", "2795909691798312648666149730968954.548860473478014471571999555369104559", "-1795999908136027366732992403247280", 33); + t2("3761160947240340619655699804028514166.1545031706631", "90008594170211932230610878657643955.0766771120853201398452422803203", "3671000000000000000000000000000000000", 4); + t2("55148738462073723350464458331198071161.324235957257244236", "890533822519200952605943.67027149110407422724883", "55148738462072832816641939130245465210", 37); + t2("5527758.208579037564171467506", "57746543998576.5", "-57746538470818.291420962435828532494", 57); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t2("-14434824877681671252494.50", "-4744180884604619155005023739354631157756385352850463825687419180.317893158", "4.744180884604619155005023739354631157756370918025586144016e+63", 58); + t2("4.511087857625328082657257239895665113144003584405761127577260517484874613e+778771121", "1.8325842443473932072e-59442002", "4.511087857625328082657257239895665113144003584405761127577260517484874612999999999999999e+778771121", 88); + t2("-688837253042614877399.5", "-3.632441039346975825180266180783847897335359529888336884091855e+188507", "3.6324410393469758251802661807838478973353595298883368840918549999999999999999999999e+188507", 83); + t2("7.43404688761493575549516036492094029880287e-26712037", "-7.9066293190521765772848055594328963843287417065639566213443958915377769052389889e+928963854", "7.90662931905217657728480555943289638432874170656395662134439e+928963854", 60); + t2("-4.320626740890915234398134986114517e+94658", "2.78894990560963181013521759e+8249", "-4.32062674089091523439813498e+94658", 27); + t2("-3.95785198444775477048e-46", "-6.870396030942305e-7108", "-3.957851984447754770479999999999999999999999999999999999999999999999999999e-46", 73); + t2("-7.17914921169565067656826325978347627539814084292339438679298679106912228033991102060926370758854e-7922150", "7.149725093137932026784009177225420e+497084531", "-7.14972509313793202678400917722542e+497084531", 65); + t2("8.356458499777e-30", "-4.8e-10939393", "8.356458499777e-30", 40); + t2("5.991948215377e-6123814", "6.38169244547e-151999802", "5.991948e-6123814", 7); + t2("-5.21392008878352879914684467839557603e-6383", "7.9128406143023651297161503149801950528574678665327896050715374145940581e+68652", "-7.91284e+68652", 7); + t2("-6.2846594717691810204240002443373127012520917569388241491889161091457255e+405", "8.0153128400211520487097219622809800495350464749634911270946865114372247349824051499281e-403780935", "-6.284659471769181020424000244337312701252e+405", 41); + t2("5.04188783533720818821892800831885659358875702648575435572892191640197223326922385205881e+94", "-4.044799176079958739979061829854269217248659863992017958880957143157173214518526499880140332437e-114", "5.04188783533720818821892800831885659358875702648575435572892191640197223326922385205881e+94", 93); + t2("-3.32941405604212020e-471060", "5.8742682933034054748993473533381157135243211041287576477331104705911641772138481682906049360e-6416", "-5.87426829330340547489934735333811571352432110412875764773311047059116417721384e-6416", 78); + t2("5.806100701116837194078609598286654001909211492267547200e-6351", "-3.1322555058724231886103050203444286e+8361722", "3.1322555058724231886103050203444286e+8361722", 89); + t2("6.858541567594014583569e-92403457", "932344125683735556729917290084013738442958.911626146652618624368048421976479", "-9.323441256837355567e+41", 19); + t2("-7.4825478541105716433040812574e-2957384", "-8933987726393636136642392373893254836880610561986804046816378730701943482730.285263", "8.93398772639363613664239237389325483688061056198680404681637873070194348e+75", 72); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightModTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightModTests.cs new file mode 100644 index 0000000..4fbc8a7 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightModTests.cs @@ -0,0 +1,817 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightMod")] + public class BigDecimalLightModTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Mod() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 400, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21 + }); + + var t = (BigDecimalArgument a, BigDecimalArgument b, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(a).Mod(b).ValueOf()); + }; + + t(0, 1, "0"); + t(0, -1, "0"); + t("-0", 1, "0"); + t("-0", -1, "0"); + t(1, "1", "0"); + t(1, "-45", "1"); + t(1, "22", "1"); + //t(1, 0144, "1"); //js only + t(1, "0144", "1"); + t(1, "6.1915", "1"); + t(1, "-1.02", "1"); + t(1, "-1.02", "1"); + t(1, 2, "1"); + t(1, -2, "1"); + t(-1, 2, "-1"); + t(-1, -2, "-1"); + + /* + Due to the double precision binary floating point representation of 0.1 the next 4 results + match BigDecimal"s remainder method, but not Javascript"s % operator. + 0.1.toFixed(18) // "0.100000000000000006" + new Decimal(1).mod("-0.100000000000000006") // "0.099999999999999946" + */ + t(1, -0.1, "0"); // JS: 0.09999999999999995 + t(-1, -0.1, "0"); // JS: -0.09999999999999995 + t(2, -0.1, "0"); // JS: 0.0999999999999999 + t(-2, -0.1, "0"); // JS: -0.0999999999999999 + + t(2, -0.5, "0"); // JS: 0 + t(-2, -0.5, "0"); // JS: 0 + t(999.99, -0.99, "0.09"); + t(-999.99, -0.99, "-0.09"); + t(999.99, "3.01", "0.67"); + t(-999.99, "3.01", "-0.67"); + + t(1, "0.09", "0.01"); + t(1, "-0.0001", "0"); + t("-0", 1, "0"); + t("-0", 0.1, "0"); + t("-0", "-1", "0"); + t(1, "1e-14", "0"); + + t(1, "8e5", "1"); + t(1, "9E12", "1"); + t(1, "3.345E-9", "6.1e-10"); + t(1, "-345.43e+4", "1"); + t(1, "-94.12E+0", "1"); + t(0, "0.001", "0"); + t(0, "111.1111111110000", "0"); + t(-1, 1, "0"); + t(-0.01, 0.01, "0"); + t(54, -54, "0"); + t(9.99, "-9.99", "0"); + t("0.0000023432495704937", "-0.0000023432495704937", "0"); + t(100, 100, "0"); + t("03.333", -4, "3.333"); + t(43534.5435, "0.054645", "0.019545"); + t("99999", "1", "0"); + + t("-0.111", "21", "-0.111"); + t("0.000621", "-1", "0.000621"); + t("6.41", "11", "6.41"); + t("21", "11", "10"); + t("1531", "-11", "2"); + t("21", "-0.0161", "0.0056"); + t("-41", "-21", "-20"); + t("31", "-1", "0"); + t("31", "2.21", "0.06"); + t("-842658.56", "-19.52", "-19.2"); + t("-34.871", "-7325043345", "-34.871"); + t("78691958", "49006.018397", "37298.472815"); + t("-11618324684", "621.3", "-394.1"); + t("0", "69.07362125", "0"); + t("0.27474921216", "0.00000000002460017868", "2.224673016e-11"); + t("0", "59137483772", "0"); + t("-0.000000000000000000014634493", "-4.2", "-1.4634493e-20"); + t("-5.470", "-1.8989", "-1.6722"); + t("-95519.5319132", "4.1", "-1.8319132"); + t("43.257", "-4704608304", "43.257"); + t("-32128.403", "68263.11", "-32128.403"); + t("85.4005884", "-0.000000000000000010953667", "4.132633e-18"); + t("3197.909", "-10738864.39", "3197.909"); + t("1.03436722695", "2.6", "1.03436722695"); + t("-4", "-56.36464628", "-4"); + t("92.0618", "-454.866", "92.0618"); + t("-6.147123243", "-53259.9", "-6.147123243"); + t("-3", "-0.4911", "-0.0534"); + t("0", "-12.3", "0"); + t("-0.001713264153", "0.00000000000000000001843605", "-1.36779e-20"); + t("2", "-9325.1665961", "2"); + t("42016273.6500", "-122.861496017", "99.24210634"); + t("35.9", "3867744417", "35.9"); + t("0.000000000000000479760268839", "-209975.082", "4.79760268839e-16"); + t("0.0000000000000000000428713848", "3", "4.28713848e-20"); + t("0.000000000000000104698757876", "-15902.7654", "1.04698757876e-16"); + t("-4", "3124473.52104", "-4"); + t("-9.58", "1.00", "-0.58"); + t("79", "1", "0"); + t("0", "-0.0000000000013618", "0"); + t("1.55", "-31", "1.55"); + t("-2.6", "-13.58133", "-2.6"); + t("0", "90950", "0"); + t("-46.1", "61.8", "-46.1"); + t("-0.00000000000023461", "-0.00000000134", "-2.3461e-13"); + t("-9761.89778", "4645363921.75", "-9761.89778"); + t("0.000000000000000090372203", "0.00000322253", "9.0372203e-17"); + t("-23560577.226", "-0.5304109598", "-0.3270269352"); + t("-11752006.868", "0.003773", "-0.002016"); + t("0.000000036524", "-1.2", "3.6524e-8"); + t("4713.9562", "0.000000000000000000561", "2.23e-19"); + t("-351870798", "28.8", "-1.2"); + t("-4.6", "-0.00000000058", "-4.4e-10"); + t("-21863.82", "4214.9937962", "-788.851019"); + t("-30.221041721", "20401.1", "-30.221041721"); + t("-2.35", "3", "-2.35"); + t("64462", "90.840", "56.44"); + t("46", "433563.55477", "46"); + t("47852501568", "-147426331397", "47852501568"); + t("0", "3812504.1", "0"); + t("0.000000000000142963770", "1210345642.9", "1.4296377e-13"); + t("-0.0024002323743", "-0.000000000000000013220659", "-3.535752e-18"); + t("225.773", "66128.74787", "225.773"); + t("-158.4165", "12.78", "-5.0565"); + t("-21042099137", "10.935", "-4.565"); + t("32791.03", "411590460", "32791.03"); + t("-1984910.86246", "-153845.7", "-138762.46246"); + t("75010460639.6", "-0.00000000005103249", "2.835305e-11"); + t("-0.00000000000000025595509", "25.023", "-2.5595509e-16"); + t("-103052291", "-350.4", "-1.4"); + t("0.00000000000000015307870924", "-0.0000035499", "1.5307870924e-16"); + t("4402230", "122.112", "92.4"); + t("-3073677", "532.95653726", "-116.64962158"); + t("-0.026619162", "-0.00000000000000010", "0"); + t("0.000065666975666", "-6.558", "0.000065666975666"); + t("-3.3", "0.000000000033194405282", "-1.2721464422e-11"); + t("94101.0", "-810285.8180", "94101"); + t("229868", "9654.7078", "7809.7206"); + t("0.000000001926", "-0.00000000000000000005918", "2.562e-20"); + t("67", "0.00000006016496", "2.00248e-8"); + t("0.0000000000000000000832655", "-327907966408", "8.32655e-20"); + t("-1534", "-293318.339", "-1534"); + t("0.00000000000000000511522652", "-1145.46888006", "5.11522652e-18"); + t("0.00000000465574", "707.0", "4.65574e-9"); + t("0.230910067", "-1712.01", "0.230910067"); + t("-31874.7", "-2617976302", "-31874.7"); + t("22.8", "3819", "22.8"); + t("-0.0000015419", "329", "-0.0000015419"); + t("-9176.3441", "741523.991", "-9176.3441"); + t("-5.1103", "-25460.136", "-5.1103"); + t("15232730973", "-2.28", "1.32"); + t("0.081", "-1111.578", "0.081"); + t("3.1", "-42.207", "3.1"); + t("-0.000000000000000433", "0.00000000000000000254528412564", "-3.016986412e-19"); + t("-83943.1", "-4303134750", "-83943.1"); + t("19.825539", "4432543.44", "19.825539"); + t("-2416", "8097.16337", "-2416"); + t("-3.836", "0.00000823841385579", "-0.00000502522549283"); + t("2290356160", "-965232.20", "825381.6"); + t("1.12", "-35806.5278", "1.12"); + t("0", "-0.0000144726783", "0"); + t("-1571629111.33", "6.4736", "-3.8676"); + t("-0.0053778", "1.1", "-0.0053778"); + t("-0.0000013840", "-12.1", "-0.000001384"); + t("-22.9310218204", "-1.6843970", "-1.0338608204"); + t("-71.300", "-25.868806", "-19.562388"); + t("0.02847", "-63397392.02", "0.02847"); + t("-0.0000000000000331096", "0.00000183271", "-3.31096e-14"); + t("-27821115", "-34.83906", "-0.40734"); + t("0.000000000000436294954175", "-2261.01154", "4.36294954175e-13"); + t("45.86441", "-530611.936214", "45.86441"); + t("-1999679428", "0.00000000000000000002297558409", "-5.828173e-23"); + t("-105924.2800", "-426.10612", "-249.96224"); + t("754.9", "-1", "0.9"); + t("0.000000238266109662", "29355.83", "2.38266109662e-7"); + t("25.3", "-0.00000000000000086417416", "5.8408656e-16"); + t("-1261.3", "39.0", "-13.3"); + t("1.017", "-153", "1.017"); + t("27.690", "-21507592", "27.69"); + t("-2623.072516", "3.06", "-0.652516"); + t("91", "13034138.923", "91"); + t("-5212749.21", "-0.00000000000000000001986395", "-2.1827e-21"); + t("117.4212", "-29.978", "27.4872"); + t("-47179.732", "-77504621680", "-47179.732"); + t("0", "-3.7234", "0"); + t("443705716.830", "3024.9575", "1925.7725"); + t("-0.000000000000000000017191196518", "-14.725715414", "-1.7191196518e-20"); + t("30.4", "399719414108", "30.4"); + t("16145.97", "-48642", "16145.97"); + t("2765166", "-18.6825", "6.54"); + t("37.63", "-1284.342", "37.63"); + t("-0.0000000000000000000177845858", "0.0000005860954024", "-1.77845858e-20"); + t("-2.3", "2582.24565000", "-2.3"); + t("16.7", "-0.0000000017369", "1.362e-9"); + t("170180366706", "4626.181", "2388.659"); + t("-1404312.6", "-17000256053", "-1404312.6"); + t("-7603530366", "316.496322753", "-236.943012537"); + t("8", "1.59866", "0.0067"); + t("-4.963", "8.73", "-4.963"); + t("25644160.8", "-5842.06855", "3321.93405"); + t("-4.31384", "-220.2", "-4.31384"); + t("186.9", "-48200.85", "186.9"); + t("5", "57089.99", "5"); + t("-244278052979", "-2", "-1"); + t("8", "-5763.4", "8"); + t("29549", "-1", "0"); + t("-2.0", "-0.00000000000000446955628", "-3.76062704e-15"); + t("737330.9", "-746370915533", "737330.9"); + t("-0.000882183174", "-16.5", "-0.000882183174"); + t("-45", "0.000000001106035", "-7.5858e-10"); + t("-594.06", "-29.85802821", "-26.75746401"); + t("-27.648237", "-1047.5249", "-27.648237"); + t("2", "-739163.624", "2"); + t("544827.1330", "54848981.1", "544827.133"); + t("1", "0.00000000000076553", "2.9959e-13"); + t("-10.89", "0.000000000000000000047", "-5e-21"); + t("-3052.938", "9327.5819201", "-3052.938"); + t("-24.1", "127758.429", "-24.1"); + t("3.9", "12173.38", "3.9"); + t("0.0000000000000213926861909", "-77.4", "2.13926861909e-14"); + t("-90173804.260", "-5062619.06909", "-4109280.08547"); + t("637", "43943.2610", "637"); + t("14867.1", "894449", "14867.1"); + t("7.3", "-1.1", "0.7"); + t("2894844.4", "-1", "0.4"); + t("-0.00000000000196", "-2.6741", "-1.96e-12"); + t("0.00000000000000071433493", "5.9227", "7.1433493e-16"); + t("69", "-7204969", "69"); + t("-12468163", "-10022891.867", "-2445271.133"); + t("45469.1932906", "-3095367650", "45469.1932906"); + t("73072906.39", "-112013211", "73072906.39"); + t("1.4", "972.159255713", "1.4"); + t("66924.3855375", "19.93", "19.3755375"); + t("26.4256214076", "11.4775634275", "3.4704945526"); + t("23362.0174956", "-0.0000000001748", "1.536e-10"); + t("18276818006", "-5.74", "1.1"); + t("-8319.8", "3", "-0.8"); + t("-7.7413714358", "43763934316.0", "-7.7413714358"); + t("-688566579", "-1.83", "-0.3"); + t("29854", "-268509731.22", "29854"); + t("-194.15246", "-3.2255572", "-0.619028"); + t("2.0186177", "-326915", "2.0186177"); + t("-4", "1259", "-4"); + t("3.56", "-0.000000000000000000515993", "1.2338e-19"); + t("0.000001783", "-16426085", "0.000001783"); + t("-1766987819", "-87.259", "-49.72"); + t("-17.1", "0.00000000000000021840564", "-5.750892e-17"); + t("-8589.659", "0.000000000000000505", "-3.75e-16"); + t("-65891.7", "-38663.83", "-27227.87"); + t("-1.0", "0.00000000000000003836", "-1.78e-17"); + t("-33378.26", "-1226528.13", "-33378.26"); + t("2", "492342441", "2"); + t("1274", "-3092459411.0", "1274"); + t("0.2631770", "-493249535.4", "0.263177"); + t("-0.00000000000000000141", "4201192116", "-1.41e-18"); + t("-574.29154", "133427.3", "-574.29154"); + t("104617.3", "293188753.50", "104617.3"); + t("0", "38.96345", "0"); + t("-0.0000017289693288", "-5.4", "-0.0000017289693288"); + t("0", "4", "0"); + t("9.65", "1.2", "0.05"); + t("0.000000000017", "-50377365", "1.7e-11"); + t("137.3064", "0.0000001012", "7.04e-8"); + t("-9.89405", "29.2", "-9.89405"); + t("3.23", "-3048751.09", "3.23"); + t("87020568364", "-1", "0"); + t("-3658", "-0.4067222", "-0.3472554"); + t("0.0000000000483229749", "-508858", "4.83229749e-11"); + t("3", "-0.000000000000000006525172012", "6.0850742e-19"); + t("-52.63", "-373.710", "-52.63"); + t("-6.49915814", "352.2", "-6.49915814"); + t("0", "-44190.198", "0"); + t("0.00000000000000003763584929", "6", "3.763584929e-17"); + t("1.299983", "194.7", "1.299983"); + t("1", "9.52", "1"); + t("-86603.9", "446867516", "-86603.9"); + t("-1482885.420", "-0.0000000018878840", "-9.643e-10"); + t("-170.531717", "-633436587.6", "-170.531717"); + t("15.36378", "6540.267", "15.36378"); + t("-20570.61", "18.955913858", "-3.44346407"); + t("77", "0.000000000000027", "2.3e-14"); + t("0.000000001687849", "-0.0131699248663", "1.687849e-9"); + t("-0.000000000000026", "3291407.1", "-2.6e-14"); + t("-290.613", "0.00000000000000000008353794", "-6.386436e-20"); + t("200", "66.97", "66.06"); + t("2.2", "-43.41589", "2.2"); + t("98201.177964", "0.007000", "0.004964"); + t("35.453991547", "128.68861", "35.453991547"); + t("5.27", "1", "0.27"); + t("-1", "0.000119683476689", "-0.000044552263405"); + t("-34.0", "3", "-1"); + t("3378", "-44180", "3378"); + t("15", "-4", "3"); + t("0.0000004190944243", "37285824.4", "4.190944243e-7"); + t("-298.4", "506466", "-298.4"); + t("-0.00000010893", "-0.000426882829396", "-1.0893e-7"); + t("-1.9756065817", "941.5", "-1.9756065817"); + t("-1026297.2", "-205657.802", "-203665.992"); + t("2", "0.0000000005621541447", "3.513430991e-10"); + t("-7951901.67", "-0.0000000000055383", "-2.3814e-12"); + t("9", "0.000000000015125851830", "7.24233339e-12"); + t("72.245762", "-39.70217", "32.543592"); + t("6.62321", "-912632", "6.62321"); + t("617021", "-42.5970821", "2.2657815"); + t("1469815.28770", "537.217915", "524.290175"); + t("345897.6", "-0.00000000000108024", "9.7032e-13"); + t("0", "1.8688906295", "0"); + t("164", "-82114.2", "164"); + t("57.84537", "-1.4", "0.44537"); + t("114.340500", "6333334050", "114.3405"); + t("4.80", "-6077773.6", "4.8"); + t("162", "-37.75886044", "10.96455824"); + t("0.000000016367092", "1", "1.6367092e-8"); + t("148.2", "-46", "10.2"); + t("1.5768318844", "-7512089036.8", "1.5768318844"); + t("-0.0000000000000014460", "0.0011257005", "-1.446e-15"); + t("64.079", "-141", "64.079"); + t("-0.0582", "-13.35353476", "-0.0582"); + t("-1.0007", "63155.153933", "-1.0007"); + t("-623313173.6", "0.0000000081031", "-2.4548e-9"); + t("-36.9", "-1", "-0.9"); + t("2.0857", "0.000000000000000000205859744928", "1.887979864e-19"); + t("0.0000000494417", "492420240", "4.94417e-8"); + t("0.000000000000012194", "0.000000000000000013778591965", "1.372470294e-17"); + t("-16179.166", "16.4610327", "-14.4318886"); + t("3.24", "55986", "3.24"); + t("-61938", "47825328585", "-61938"); + t("4.36", "-1", "0.36"); + t("-9857364.3", "-1", "-0.3"); + t("9943.75", "3.5", "0.25"); + t("151.4907", "-1", "0.4907"); + t("0.000000000113985670", "-2286508", "1.1398567e-10"); + t("-1468", "-12915320.7", "-1468"); + t("46.543901", "0.00000014040913", "3.32077e-8"); + t("3", "190.34681", "3"); + t("-468.5022", "-0.00000000309208106131", "-1.13251725725e-9"); + t("-0.00000000000153707", "-112649.31435", "-1.53707e-12"); + t("-1.5", "0.000000067829063910", "-6.729086517e-8"); + t("42031.2", "-1.165644", "0.408648"); + t("-137623012.4", "-71.9609", "-21.9379"); + t("-278354", "8", "-2"); + t("5370.3", "71543859", "5370.3"); + t("-0.2469826911", "-0.0000000000008289323096", "-3.584481336e-13"); + t("338.68861185", "0.000000000000371927032", "2.00995384e-13"); + t("-0.00000000144", "115767.5757", "-1.44e-9"); + t("-3183918.6386", "-980.559", "-43.5656"); + t("-0.000000000004661097", "-0.051176618", "-4.661097e-12"); + t("-1", "948.171", "-1"); + t("1057394189", "62.751", "54.866"); + t("167.9", "0.00000000000009753", "8.45e-15"); + t("-12.172", "800.4476", "-12.172"); + t("-1.4", "-139187231194", "-1.4"); + t("359356.2", "-0.006806", "0.005734"); + t("4744567.6711", "-1.74", "0.0511"); + t("-0.0000000000234390", "-75.75283631", "-2.3439e-11"); + t("-6557078727.02", "-0.000000000000000015", "-5e-18"); + t("-1.33", "-5.111037", "-1.33"); + t("-431.277", "-1", "-0.277"); + t("0.0000000000000000000697336", "-8212.9015367", "6.97336e-20"); + t("3370.2674507", "445.572089", "251.2628277"); + t("-2.33567", "-0.0000000104784", "-8.888e-9"); + t("0.00000983659", "83423921", "0.00000983659"); + t("-51.2", "-0.0027394686", "-0.0020713346"); + t("0.000000000819617035421", "0.000000011", "8.19617035421e-10"); + t("0.00079279091535", "7", "0.00079279091535"); + t("-0.000000000095324834", "28091.00", "-9.5324834e-11"); + t("-0.00000000000000015", "23.52", "-1.5e-16"); + t("0.1438", "1035688.4", "0.1438"); + t("16693", "-1", "0"); + t("-781.09402123", "6.9", "-1.39402123"); + t("1", "20.70", "1"); + t("-3", "0.000006782445", "-0.00000249249"); + t("0.00000000000000000022", "-54710642.596", "2.2e-19"); + t("-590.69625205", "26.40", "-9.89625205"); + t("10", "-5.67", "4.33"); + t("-7", "-0.00000000000643634802", "-3.80362768e-12"); + t("-9680099.05", "-62.737684457", "-50.764391642"); + t("-1.5", "9914.9781", "-1.5"); + t("-1", "0.0000000507688288763", "-3.15199093625e-8"); + t("-0.000000000032713211391", "-0.000000046529", "-3.2713211391e-11"); + t("5.40", "1612427.39748", "5.4"); + t("0", "-0.0000000000000000000146", "0"); + t("-0.000000000000000000817527", "-52.0", "-8.17527e-19"); + t("1053329.8", "-120573.937", "88738.304"); + t("0.0000000000713", "-100743.840", "7.13e-11"); + t("8219", "-7505759130.86", "8219"); + t("16655.7", "243", "131.7"); + t("259.650", "278.73", "259.65"); + t("-284.091", "-1", "-0.091"); + t("0.1250", "-23713.35", "0.125"); + t("0.00000000490018764513", "-4.41", "4.90018764513e-9"); + t("-584.70403", "11076992", "-584.70403"); + t("-221.643", "-30.5", "-8.143"); + t("-9.69", "1177241", "-9.69"); + t("-4.97845868064", "-1.3178692059", "-1.02485106294"); + t("-1.04328912629", "-12.828540", "-1.04328912629"); + t("26", "-4.91596", "1.4202"); + t("94.686", "7.5851", "3.6648"); + t("0", "-0.000000000000000363", "0"); + t("-1.431", "65.06874", "-1.431"); + t("-878.898828", "-5.21", "-3.618828"); + t("-0.00000000000000014146660", "1.05112178985", "-1.414666e-16"); + t("0", "360.6112165", "0"); + t("4.464476", "0.00016302503", "0.00003555345"); + t("1145096", "-217.15", "64.05"); + t("29.46", "104.40", "29.46"); + t("841.82", "-2171922.59229", "841.82"); + t("46", "1", "0"); + t("22829.8889", "-1578709411", "22829.8889"); + t("-0.00374341104", "1.2", "-0.00374341104"); + t("410", "7", "4"); + t("0.076125848849", "1.103", "0.076125848849"); + t("0.000001844875808", "0.000000000000020813", "2.0037e-14"); + t("6.685", "0.003905472818", "0.002736008402"); + t("41011740.6", "908.670191", "728.869597"); + t("-152.527", "-1", "-0.527"); + t("12815.035", "-1497.81264", "832.53388"); + t("-0.000000000000004048729", "0.00000000126", "-4.048729e-15"); + t("-19949.700625", "-314.64", "-127.380625"); + t("-2.4", "569419658.2", "-2.4"); + t("0.00000000000000597954708", "4", "5.97954708e-15"); + t("-17.0", "1.58", "-1.2"); + t("22811600498", "2", "0"); + t("3.1328", "-119317.4", "3.1328"); + t("2.26039694", "1567.2", "2.26039694"); + t("-0.0004559", "-1.59", "-0.0004559"); + t("-0.000000000000165", "3", "-1.65e-13"); + t("-215.9051", "14846316.4792", "-215.9051"); + t("-1", "6004363.2", "-1"); + t("173513829480", "-117.2937046", "37.6296904"); + t("2269413223", "44.831", "39.204"); + t("-1411953.506", "0.000003338150524", "-0.000001742597716"); + t("-26.596", "-7", "-5.596"); + t("-0.00000000000010245141710", "6652789979", "-1.024514171e-13"); + t("2.042", "24673", "2.042"); + t("-2.71", "68.05392544", "-2.71"); + t("-3", "220821.80", "-3"); + t("116.073", "-0.0000000000024392780", "2.029598e-12"); + t("-0.00000006283674", "0.0000000000000079", "-5.7e-15"); + t("-3", "-7", "-3"); + t("-0.0000000000000005058", "-1.5", "-5.058e-16"); + t("-683", "1013123.5", "-683"); + t("-6", "16985130.432", "-6"); + + t("2318237922853539360.167157597022570", "-9702015238687.680494235371626139504030926823802574", "9295675788919.833075194557918488338251940141560718"); + t("-3346995255.54414928936", "-19484973963827626752773520333240590885639375", "-3346995255.54414928936"); + t("-270721769", "22539228.03492196260802407744489638356810047", "-251032.58093644870371107066124339718279436"); + t("-0.00000000000000000308066481692295683548642301228852180070143433425056969292333", "206232915.762239501154732324", "-3.08066481692295683548642301228852180070143433425056969292333e-18"); + t("-0.00000000156454306292867840840689", "2635", "-1.56454306292867840840689e-9"); + t("12886035692416820.3977457533594029154555584175743", "-113496127978790341.941210015456704515", "12886035692416820.3977457533594029154555584175743"); + t("-299395547.883083669188105176893563510454667", "-3152.9580", "-115.077083669188105176893563510454667"); + t("8076327350.789696755252236317", "9", "5.789696755252236317"); + t("2241730616485747642201052100686334", "15115372376051.1433309224128", "15028644606255.6407694748928"); + t("0.000000020545442143", "910205431326260.56522101419792183224139104902865869227", "2.0545442143e-8"); + t("-299.2", "-1095069605114867345071265098807585478368438601713540771676", "-299.2"); + t("0", "-0.00000000000000000006258032721", "0"); + t("-9561792051.46130", "-0.00000037912322661422", "-3.0664875638608e-7"); + t("-4589.274150042", "5463826693798.059180748770", "-4589.274150042"); + t("-177372488891124.8209441829612234253673371", "-2184484411972.871928873110", "-429251521322.1947054610512234253673371"); + t("2840794355990579101690516447419567416103576933551526", "-225384346136689418.311568171615", "4159399848092788.810925291935"); + t("433169940324134426366793327.235", "-1918606541369710.9167801826", "369802826989779.100695574"); + t("0.00000231962990639112417450960779176176525188784519762202020426278", "11491626.8146875740651454657723913302260", "0.00000231962990639112417450960779176176525188784519762202020426278"); + t("-118317530966985340050567.3794340230", "-1290337888625470391870404816877827630953112876.297", "-1.18317530966985340050567379434023e+23"); + t("507941745866485347809651792.3258074064530387681549475622", "-78.8876", "48.5294074064530387681549475622"); + t("3280516686867.41769205935464611912132313550145186748", "-0.00000000000000125477", "5.0338132313550145186748e-16"); + t("39.99", "-196.666", "39.99"); + t("198328732837738155510399443.82996", "0.049415792708", "0.034407057628"); + t("23.9909397975464820637937485614", "0.0000000001050229258855441", "8.54924991032156614e-11"); + t("-1157214583831665284482", "1.0988344", "-0.0759048"); + t("19626.043251177620", "0.0000000034291719721621", "1.7452276531105e-9"); + t("11144329315299884830592174718286.015391668774749336449044", "-276730.619204816478", "84261.983174911066749336449044"); + t("71.3348063927327012696442274193666742024", "1.003", "0.1218063927327012696442274193666742024"); + t("2353.964728726069", "-1147885339335726766004631.4827280116227481840172642411087841", "2353.964728726069"); + t("-3.4", "99841150890712628939215423679763543630485717", "-3.4"); + t("-17423609848720294448155093008156493860946579332348817", "-407401303.1", "-39793145.5"); + t("268219889", "66408.228187594864", "63463.578491939168"); + t("-7067928231578399800943353710459167713.4021506", "-44099.172874028", "-34277.265446476"); + t("0.0000000000003143", "0.763206816948175243403280699590867", "3.143e-13"); + t("4.036744136250", "0.00971177", "0.00635958625"); + t("1793819.269108", "493646013195.8520", "1793819.269108"); + t("-15826468630.86978", "-0.000000000000000000372629410691473337097845426967193919000496413569810554360", "-3.3602620906243362074116532307435310028959396493592065148e-19"); + t("-18.7707479011363", "-0.00000000000002581603178761489486464393960475608950385662413624987", "-9.1067040799565470223405647782611453765936052898943e-15"); + t("238432236541400642177165.39210", "-5", "0.3921"); + t("-6811268416946324947973610791528879575619937612025", "0.0000000000000001069504654335424482337205845600046597647661", "-8.16882733210848477277494710610839496492589e-17"); + t("-0.0000000000000001763427790981229873712832162", "-0.00000000000000000002454861590426229238192323806393241482688272809526858064170", "-1.00710578069411919285971867734642985013640916857852506689e-20"); + t("19755770505453660565232908.50109071", "11636774869145974997.1", "6173329669666681241.40109071"); + t("-0.0000000000002209009508639970169662640887364083811", "0.000000000000000089645450775854240465099382429782771424049138745143690592", "-1.4560152292168460259210429423632311142922131965946381312e-17"); + t("563088", "-0.00000008456562014728262541201891984898", "2.11408406705846430113462806523e-8"); + t("0.000000000000014349029064561994176595511", "-185.73981699167343715247600", "1.4349029064561994176595511e-14"); + t("-0.00000000001083082172818863769543", "1190273509470734307.14840", "-1.083082172818863769543e-11"); + t("-0.0000007000816503264538441903792097551608671", "426939", "-7.000816503264538441903792097551608671e-7"); + t("-74639664.5738469080670677219615636886365697", "11681605088890876252615.81485333", "-74639664.5738469080670677219615636886365697"); + t("-17473762843659544328007830640965916", "4735599287262364762422146713625.0556784154158620151196", "-4.1370729486807194325314144030856023255308850262237956e+30"); + t("-35798372944152782907433662314743475258228956226653087.007402", "2986648933436031786673397525017144049.527376", "-2.586979851276128040119426347481949619034666e+36"); + t("594962882338997095.95600951831319665393181826", "-0.000040093460748026675395936734376802508692547860", "0.00000106629014969426833642467613848819248141182"); + t("-730572579439411951784822207340668557", "0.0000000000000028", "-4e-16"); + t("0.000000000000000001168651449131923286954932276275033439404771143330881475", "-47210255.27658777658181021168421281357", "1.168651449131923286954932276275033439404771143330881475e-18"); + t("-30769567698.202004635902421797597470637", "-2117030646075139493515312478944809325583483881105", "-30769567698.202004635902421797597470637"); + t("0.22203824107047587018951755693974277131200048220", "-136.52076", "0.2220382410704758701895175569397427713120004822"); + t("4489045408103326401151265241469016732232592556114681884438", "0.000000000000001314763381159004315842197", "6.8074495798791174068935e-16"); + t("-21348129287570112842795163717617654521736400718052510", "-1995504519697835638540568077.0196418", "-1.1402642626986948193867205135517104e+27"); + t("-14.48287435139371979106", "-278112747003022610742126629257947172194929.64536", "-14.48287435139371979106"); + t("0.0000000000000110719145581948062251355493585472867", "-7978399748.1558009430388367158631487853516499292946094", "1.10719145581948062251355493585472867e-14"); + t("119501784974", "-0.0031818401885065375156179", "0.0016290398380208417060804"); + t("-0.133707475845003705950317295850288779512882217932", "329652021145697865591302212038174941275757995054.713783674845", "-0.133707475845003705950317295850288779512882217932"); + t("-12542871568091185279.0460234294798148233", "25754.120417", "-21877.7952474294798148233"); + t("-3818054566.20841286030331762281612", "-1936.24778639274331686587963417792515204476546099", "-472.43293099041187629213445041741051174848665583"); + t("118000308055.9373727402663957624604063", "9918.67574327356", "4846.8753496034663957624604063"); + t("-11.38", "-24193758424792525116909481098205.677446", "-11.38"); + t("2.46889727437003280961289299604392122014099570", "-4644753841435365046988433379518839103541882981334804890807.8", "2.4688972743700328096128929960439212201409957"); + t("1805667164641860305883.31324", "0.00000000016618955069904640141657751519707415214669847044", "1.046133052518583849356487736801523519251586328e-11"); + t("-0.000000000000000000012169689776926610597997556555980427323944885949030949402", "-434910402113045297454505.1302573189763520", "-1.2169689776926610597997556555980427323944885949030949402e-20"); + t("-1739.4", "0.155584511367509963502532516739270411", "-0.120747422606118005188995371696075431"); + t("-569589695561180399227800563933576000706960457.3656765081522", "3483.46493456384339944984809629410413910476502", "-3467.25917700145185407850776398960809939327178"); + t("27827944878804.043096443231553973596298120", "327784539432851688676.574297", "27827944878804.04309644323155397359629812"); + t("-0.0000000000000000000273570270893076789122004877379023084477997941182649713787", "55071786762378989.632689594", "-2.73570270893076789122004877379023084477997941182649713787e-20"); + t("-1", "30698458.1545228514266", "-1"); + t("-77.6796737181065072239544734403386720988476876081692968190", "-48043379.33911367817680827247020826", "-77.679673718106507223954473440338672098847687608169296819"); + t("-0.00000000002231552048713565363805177481170756001463248", "-7745938658044151", "-2.231552048713565363805177481170756001463248e-11"); + t("4080930738001215900471542815678.870", "-259094.384407758455239", "219215.641754292988748"); + t("-65148376658415.8821831041618603950", "176.7", "-41.982183104161860395"); + t("-20649466814.805802613083057980846632715554163812995", "-0.0000000001319860149268122557211741866249364289650956", "-9.623959984992160004489809813728963916899e-11"); + t("-8637039792424460231", "1171511157428179825785002.9414399798460302750", "-8637039792424460231"); + t("170120714324740496497515610676549361259437493939036", "0.0000001984234593401508456286993357944778724317751259644793106", "1.80272091831781979821089649811533712715612789460516662e-8"); + t("3040385342.35657760274052", "-372946621956569451.93539995558371617994622295531744", "3040385342.35657760274052"); + t("234417346052636032.106833697570476435658983423056", "405728269025466785030711845788149565209977.743", "234417346052636032.106833697570476435658983423056"); + t("3003698058950457901967364.923201608", "-0.00000000000033926708389437080558726155721138587500872389823", "2.3077148260391721408496333950768060426097166773e-13"); + t("-1", "13121297327432473503324600878404", "-1"); + t("-0.00000000000086987493647337590015438704985", "1126309963348141179998313355117347492625867522.06445459173", "-8.6987493647337590015438704985e-13"); + t("0.01175883004658442799157", "-1304796615695885174911897002429657121243.096878772927435101", "0.01175883004658442799157"); + t("-4.1", "-925940.0049", "-4.1"); + t("94413979984015715031.72143", "-44956570520496128861135438942192313346223.4679844", "94413979984015715031.72143"); + t("-2084.96276512750756221737052806049261165250425", "1.5202660037865707", "-0.67807393611913251737052806049261165250425"); + t("5530042131715182582", "0.00000076755550127601384796182326285660346554068838", "4.3620483782819522891660511451578934939479584e-7"); + t("-67042.802", "-28411888994.212820705785482909844033014", "-67042.802"); + t("-5360742.0", "327368856548045.08220112714929243516", "-5360742"); + t("47117230722.16973123915245237545229011004357913004", "-47488231.617918014245187991287717374685823103416490829", "8904957.195061107925965018036654421707060540881097632"); + t("-0.000000000000151343572349948255798487186356", "42.39640064100021994629331666", "-1.51343572349948255798487186356e-13"); + t("113840373593648670861500086", "16082411799435623101958677220820405667", "1.13840373593648670861500086e+26"); + t("-8.22", "-2867798109411674.996765068247085164513407273890902397064937", "-8.22"); + t("-3.50238614", "-6860188389136636488339219859054193101069684390", "-3.50238614"); + t("107107360259917227679425620190.388983860971684", "8800479523270977282088607107997626691064406556317263323.341", "1.07107360259917227679425620190388983860971684e+29"); + t("-175822.1223383477", "-88621983013742415713.67926832", "-175822.1223383477"); + t("-0.0000000001165498478337125015371156469966957212161218123244751", "-62550285299530518719359714148367546793907", "-1.165498478337125015371156469966957212161218123244751e-10"); + t("0.0000000000000000320110187403311537074296810233047925148", "-60407506473103.897451724471", "3.20110187403311537074296810233047925148e-17"); + t("-0.000000000000000338282064563114", "-96190376454071434357.783403611375151575341982065544942431", "-3.38282064563114e-16"); + t("-0.000000000000446753711341", "-9.4", "-4.46753711341e-13"); + t("369078971611659797359596697169091.7394557", "4390355307871218680185944", "3.2920328769890124360129157394557e+24"); + t("0.00167752355829931578551694576878658836500507142636702529088528", "3276066309050", "0.00167752355829931578551694576878658836500507142636702529088528"); + t("-40341913269616270298908054352.555424105652", "-76.6805753", "-22.343535105652"); + t("0.000000000000000234899796181467417005659941", "-0.00000000000000002455754630676905247611", "1.3881879420545944720669941e-17"); + t("-2288200091016313974155687089998490026813781889257797", "173612435224249143072698340434416969557762958", "-4.06305517399251906560023908396396030698941e+41"); + t("-119.570203264189", "0.00000000000000000270873280446606560343105459296495864", "-3.0654086667132932857371380394960016e-19"); + t("9636003428434421863325355207384758", "27189148267469.7985900247652", "763104629651.47867591268"); + t("336.422676596", "45198935114500.3922307046", "336.422676596"); + t("-14.0627943158485824648781649958871436175344604029182482603314", "514937038588634.2538384203447", "-14.0627943158485824648781649958871436175344604029182482603314"); + t("0.00000023418399644897328432613203542773200097298268", "150.05994", "2.3418399644897328432613203542773200097298268e-7"); + t("-7549019185595.78985813486261693520665842030485693423", "0.00000107047", "-3.7760261693520665842030485693423e-7"); + t("2084", "-4702062390.892", "2084"); + t("-0.000000000000004338", "23.449915", "-4.338e-15"); + t("355378988141704324089218417352212802.4373051939435896809", "-410089.6820", "397574.1193051939435896809"); + t("-0.00000001989462540690061730462809985539649615779", "-38.286442069994941913718432", "-1.989462540690061730462809985539649615779e-8"); + t("18131048627056749262739468342.355859006591", "-1199.6142723004281428", "211.04880824112304"); + t("-7485271015053088795456302791998022618551521.6832", "0.0000000000000000000469320709938399196323702081094328803321", "-2.69710660151015687863998038860418026399e-20"); + t("0.000000000951589985684289940380019704065655070039753", "-26373114201649323963859575.5038618827163", "9.51589985684289940380019704065655070039753e-10"); + t("29612852829840055823.4234313598", "-0.000000000000000000390000839472495342007727670085919905954881", "1.00427280201824924510562417012541840544546e-19"); + + t("-0.0000000000000001612847241392420250768267369", "17433478642639304.4236073577621811634134", "-1.612847241392420250768267369e-16"); + t("-1883174595828380403709352050091085026369077660279268.9", "-0.0012895", "-0.001097"); + t("-125549014214.7375819121786172926612698843039792917253281", "-101.5885766453", "-100.8153792133786172926612698843039792917253281"); + t("1065766474589037077293252213448", "104.84555", "81.7216"); + t("-0.0047533898584759553535897361825760775807323217889394835", "-18213101567414468503998329412491692494599546949.8", "-0.0047533898584759553535897361825760775807323217889394835"); + t("1270005291407.8881300436", "4138621074845956468.09769209", "1270005291407.8881300436"); + t("-260441856275307932803222450437995247080731478", "704992903069127.4325788", "-431855187882906.333326"); + t("-0.00000000000000000009754763692467059466885260432113614665268499743", "-1095452837.106034703346392429672156", "-9.754763692467059466885260432113614665268499743e-20"); + t("15.2", "-9898.141488362", "15.2"); + t("-4.642097816103323517795932640", "2320173035769155029864.2360071417144711754883993503027", "-4.64209781610332351779593264"); + t("27232043073441728507866158240.138995261078", "-215290045818292170941580969748443497", "2.7232043073441728507866158240138995261078e+28"); + t("-7820551181460133788154158506805766936661586187217825438.43", "9043807302.81268", "-8827979159.46068"); + t("40454701041551859098452066940764312196468.06490346453770", "1.43336157528769251880838", "0.053020665769834197966"); + t("0", "6893071800513.175", "0"); + t("-23294105221282442798534198559904763230604376248570", "1108006854160532581.643019501", "-634324850398077026.428796591"); + t("-70.48", "425148951767015.661297750583259821000170", "-70.48"); + t("-40097263.65021696329198038628255519578725029828361985869", "8008783649.929271", "-40097263.65021696329198038628255519578725029828361985869"); + t("-3744957147569480041094559658.8985734744", "-1.39589737574796529539305515486016767152", "-0.007414375129527604087594017204876948"); + t("1", "12243765348634238072286305372976115524601373993259986307", "1"); + t("1133226250873003731000285272922.678821486883559776563400259", "-48449121713.05851357863749277194726", "46399517902.028653911554106994622540259"); + t("-1110.00985672050392625354008504049692", "0.000000000000000144467905969585159040405525015114077352752345766119586", "-5.0667226393916955793430389451065661055080904169044368e-17"); + t("9977", "793339.568052455522323049704543732060826", "9977"); + t("3044797849984420605285366.474651143157", "25186260049851668345583291614301619318511974775753812002050.8326735955299366787084106211969141751506", "3.044797849984420605285366474651143157e+24"); + t("639737463904283952640443433078141655542321388667481890755297474427803997023609757112922145297681502347448794470168805201764741986941", "-14552442514714892538227035420.61249278214225741", "3.07716512012830819205367001585789874568359778e+27"); + t("0.0000009480666812553237528290117310639076036954221787358487462393246935364400792376", "1.0", "9.480666812553237528290117310639076036954221787358487462393246935364400792376e-7"); + t("16673429143256557896853574875292172327063389650998117777668136985538005.9156698099892691658894660539763873869793114863329930039146096813387028", "-107478408440617999633969729.9071529239187240331642550654002067338975836414285167506215860", "8.20260811545606661396908107304136068380872993912615354808000919495595106968750582594596813387028e+25"); + t("-2433298586307081.77465641473337660801763802817481653388429397435772288734383710955919905923279924807", "8945608818026652762135420517379.424606537007", "-2433298586307081.77465641473337660801763802817481653388429397435772288734383710955919905923279924807"); + t("-70843295832985633806095066724872543838444364150876355516508644344503020757888058408332911592444048015580157647", "159194370214483300881159411658565511338185028333524386712582766324718381977826309423371642975467856662959008464353958219661", "-7.0843295832985633806095066724872543838444364150876355516508644344503020757888058408332911592444048015580157647e+109"); + t("3.2263", "71756256022538928427069542438.00966178692388729446382444038774751007836179716329976575691385315023922435789196791754653262230986812059146", "3.2263"); + t("108061134.3910585273259047952072200021695505338334592792817809710438", "1260951025714501457005284501987116458944716243549637898428510181316826466436575714044748818353924236900363398289", "108061134.3910585273259047952072200021695505338334592792817809710438"); + t("43607983963968869595947769368216107706521387015680146006305613629433990860442947600228456010092", "121385730326389922895424600532542775257956396540395781939587936260842487516174244325430.384295616198856908112758", "1.1504925896106825966642741273863721105609952802207648727165046290817382897631508088378461034727326937297965944e+86"); + t("-2.6480956814", "2148671523057716670055099537649941488566244507589768590863804139800870729193528442.071130969310679730958621114", "-2.6480956814"); + t("-470479333263.84377245126007813562135983915023544360010239389244912214130585392185699431847364158901094167357758815083446794565320814454973581796", "27849448232164647723510637195798019946766053448137414448566670989993.67717797401551478004030639298176072944", "-470479333263.84377245126007813562135983915023544360010239389244912214130585392185699431847364158901094167357758815083446794565320814454973581796"); + t("0", "-6993020667326513594.01598727239030644128692238032346465300777782504759087255641592855556786881965341488969418534051814789", "0"); + t("-10372286284244779022048585", "-0.0000001930730138191035178741471788596965420386122185118633654121349245216394001018297980054707996074710125164147", "-8.47592995170001700266169749815180334434465081954780254569435821161404742961756995939834569063835498482552e-8"); + t("274897009856813.734380955979520483734957204601027214931003941720546146487845256149072527968056465339318846303131569226913408938616354923540700172412", "7", "1.734380955979520483734957204601027214931003941720546146487845256149072527968056465339318846303131569226913408938616354923540700172412"); + t("738408012842109785457164849764507323379297.79095792233769102310198027453532813226348191188862586945019214410536832", "15306177324248047715406533.5158700026", "1.506634005344982055089315836033881173769102310198027453532813226348191188862586945019214410536832e+25"); + t("0.000000001307002813605936443383593439823579112009200431906135937099617451361199016339230482184530115838223218189460633917243083200", "-156347131201.0667716470724866", "1.3070028136059364433835934398235791120092004319061359370996174513611990163392304821845301158382232181894606339172430832e-9"); + t("-4792567274869561212802263.9162146352653952716695372928501404982289832583166534206544945624150460220976057951121526613072397239125750526383369389", "-2571615359217819081745372380499521952091705406387642084116393860754896982150026573094709965566690085424189906211974018648786870967996877095142", "-4.7925672748695612128022639162146352653952716695372928501404982289832583166534206544945624150460220976057951121526613072397239125750526383369389e+24"); + t("-40.05748869168454725527441481953494139473673991070979113635160468475219376406826789262579745739976", "-41875468662578995790027634863433077814557063632577215827031.031982081918392876105825240291071725658144212578666", "-40.05748869168454725527441481953494139473673991070979113635160468475219376406826789262579745739976"); + t("-0.0000022907766811721016183225617138609000543876574860984718810338550238748128247445010491861049613", "-3279074504656188611648707.4983942082641992057679531912380705659521798322669577604617597486447068188912830230847051445600458515668443081070949175", "-0.0000022907766811721016183225617138609000543876574860984718810338550238748128247445010491861049613"); + t("-0.000000000340313277", "-0.000000001255112168870655023338247473949331250106676281883642901353991", "-3.40313277e-10"); + t("-50225365.1475566438998761801442412", "284028617245837000189928101232939099744527904229835535.835746075", "-50225365.1475566438998761801442412"); + t("63.344721423304857459331086841825237874925064097", "57155073593666.40553442288889921516416834083269742567707391607", "63.344721423304857459331086841825237874925064097"); + t("-405919933.1066287819696386581647229483641869199888974504501408794124002251348919063696581146156799005", "2647178729438306865645909642983752549443679075960964976334982663855617.77", "-405919933.1066287819696386581647229483641869199888974504501408794124002251348919063696581146156799005"); + t("-0.000000000000130754174234156809102364575558", "1512769765054847098913787446631276445464675564737758845532029029227218416561642292270741819169983956650914922547871552583245517440681359875", "-1.30754174234156809102364575558e-13"); + t("-42805325218726498366672740080295203192725414965527973209314316749.7120445518644682586008052614425260815242140724520046592053081", "0.000123298332335657505901061098051881119196170384724006568439947745355121025753230625359269654114501774394590171609541470588517", "-0.000032325304000891296915093212441483965264186154572168660357953720611674306961720593830907904561258705086770592138813164224068"); + t("-75210406056668422373802918016368260769067586508935441638493539318778550326.50528533489988415483952", "440622997.6355053630471029", "-340429684.42458949795004585483952"); + t("-1222922824327546500522220970819290434122898473371530650066004876062845284114.47721875136651190", "-1379027454245733767586", "-881180208974102493198.4772187513665119"); + t("-30656582150188875494703614722772772221409126232115063256882064964663663147033209144753246762464712.948730003091026599897432459556025696", "-2913934951186033025005819092772439514996587951119743767357433798109195725658300879072952407504422194931477368634077", "-3.0656582150188875494703614722772772221409126232115063256882064964663663147033209144753246762464712948730003091026599897432459556025696e+97"); + t("-6460522065030402275014019.2874194931729240210323452441436174892", "-84550416554285528170014238135907266547165974999578715609084038263.46129840157771271779704084743623515311185778729738812", "-6.4605220650304022750140192874194931729240210323452441436174892e+24"); + t("-0.016364386296444405533757351682555346465502820950062088651150128675773350177464733695707386307349689534592475248473689442", "-662351516465.9032743599806965674027961010966377214913163", "-0.016364386296444405533757351682555346465502820950062088651150128675773350177464733695707386307349689534592475248473689442"); + t("1103343525164099798605597537113983882179727144422100669678631936027042820706120285756898888893404677995338896062374110057717750895679", "91748792242920404655427917872546031638524.76204683127448751123961871264830271567888066463998429231705219642715054074868199195373673227635494751953719", "3.076328553647557636193208401331029365654020485144903415117912662361833098755573989373555529561896396760648323565651091850507799771898789127729144278e+40"); + t("-0.0894652716283348818337684886989151280762017763427032659791509101256464820297", "-12966.6884", "-0.0894652716283348818337684886989151280762017763427032659791509101256464820297"); + t("13114418006467273871814114136828793244459258873580991741468083458844936", "4759000553255960840361168620.3774494470837273198", "4.2761722071204063036259345611428685193209688534e+27"); + t("-28951495771059579052038784935583719855135835316878812739160571275658593082655402834569052032878823395641241968136.92574783376902191547024436698530", "-3031768663774740737176934765360849728180780437211886327623459816735182479695223019269147895285170079834032202516966937529989903070284157092473214668.7", "-2.89514957710595790520387849355837198551358353168788127391605712756585930826554028345690520328788233956412419681369257478337690219154702443669853e+112"); + t("2393723882767965821294763322394195744548891304060902", "-140981135960273230.0025778", "86668711566444988.9814302"); + t("-3224488416109581472101333552995382215707383396998952009319985210337309105631785072396803.91964338865842816515912815197781787", "102818159313377657005579111128189067224885718.140628085554012525428767372817189722551478405035418445112060974169840360487565259217", "-8.1595634025043932590241822413741540317627232887069206304733728507469999734166316619875329520357299837254473649437591096347440866e+43"); + t("0.000000000000000162614535957335504400161243268689702722565890737357214918357356590168738846464706769774484467251167640135858015634083627803179977581109102", "0.00000106803134832455205844954340150714254354766339175870844951355513521917239107042458407307482848507498559", "1.62614535957335504400161243268689702722565890737357214918357356590168738846464706769774484467251167640135858015634083627803179977581109102e-16"); + t("-3927.4031809", "-0.0000000035029583866611658486269733571456482523405154883369032001554318344330512146832289592781514675456658500756286236294841624823979375753461327906", "-2.6932691679676130460056959057199199083055272525449126446015947490329456323969370838199750438158748550553789684640297326857241719276712355958e-9"); + t("2592701578783037181466698143885146669128411307594485136303860886846006143235135122817836647040961317262173311873893155", "-2476735053659095937599211826013828027536167714634610749923083443278572078026871812469079060633677096037053974280521689349022693979242065", "2.592701578783037181466698143885146669128411307594485136303860886846006143235135122817836647040961317262173311873893155e+117"); + t("96.04335877730532081621787788158383111099350287030581038188446699532128180774027960706578", "19731419380883276630592147059117156462461951865864609673166.4479371059569659447212290002838890816175493435199181043231716596224989574671224595362826", "96.04335877730532081621787788158383111099350287030581038188446699532128180774027960706578"); + t("325023114939529014657978169628372760601480839073817238211782426113558723164836055970989007713696933704", "106223840476390782472173917090144170488887005908229635819404889799358852135763.040387492", "1.05150216674283695595324235267625323135707751092953285615150305395692443496735212656796e+77"); + t("-0.00000000000000033647992217979179179186957", "-0.00000000000000000003156150266634952697310752", "-2.74225383948473157029928e-21"); + t("67711097909563003399071203293654909244735459519561246144664768566612029202546308760389038038790661412078936611567061527752843866673871533", "0.0000000250914595238219383127319568059987481594970145735261435136883603429568", "1.1931039593784471503157310210681907892950978516052505236994695043296e-8"); + t("942307044555108835920493820461160734540503253601173239.92559776036964181595894387449189836528222244015903442453788542293705358104537", "-341315427404722210577937787468731.95", "4.792118403841194654638154768215812559776036964181595894387449189836528222244015903442453788542293705358104537e+31"); + t("-94130661760152187286400649382778774100247360104073487553172289492592909079685814047724040987.545360", "582.270609307311781203990506333968732999092917722", "-429.29359293653441023844377749905124203115916886"); + t("3313638785820621590180176562638.00992668522579291400041235393589181972606810182197653338554677836315505146", "90527335216395767852035210539.14", "5.465471803037394750690898322896992668522579291400041235393589181972606810182197653338554677836315505146e+28"); + t("-0.306955389372676043580907106603221153651127238512560719", "66.904579801977727781298", "-0.306955389372676043580907106603221153651127238512560719"); + t("141390900187450346.4446228025914244", "-255850256279441962530367023331027625163686895444551579538905939296353570502455036176395785785059148507467346341628419844281564795408561", "141390900187450346.4446228025914244"); + t("-31281694978574998092.32325767151", "-1542462855.73276869937293894166028800355184049470473", "-519767223.60416992161136296357867627633975428783569"); + t("0.00000000465065764192519767209223768411174160970559048882576195807880851927339930867660413363177803", "695983282190820825900286910552083743912340874031142607911981006600892487992712378.27501435873441215408642204715421306049", "4.65065764192519767209223768411174160970559048882576195807880851927339930867660413363177803e-9"); + t("0.000002299699", "105", "0.000002299699"); + t("-751157538.56375056723760379542086174039490718435868835658852", "-0.000000281235130627575144572363209737439923", "-2.4952865744315606513538295859410866335658852e-7"); + t("-1492151820229229.7080972636031810741838557504286290118227845200639080208767965213313891261997405771908981", "518534900915966328248424169467.8926376495890764066267652", "-1492151820229229.7080972636031810741838557504286290118227845200639080208767965213313891261997405771908981"); + t("477573736732380117689005270695410306243996300502014352674644518059825662478485969426161545468188704450446835856", "-44107433160804154887771872206618010747863690779283512394813143542934429409262133052168377457307.7801829320544", "4.26587795612760356325706643922768450442822164299827765862986444105362242670998534111196655345782505509351168e+94"); + t("-1708419546267714621908304198526.86627770247445328880", "-6561936.23828726436959004970934079513865615878124751998092886724055429258975571944079950471550813589210381712752008129366876", "-3255473.411304257056507423459569857877329230063250469248244750150261213529383645499126139366386431281819493395691345793149"); + t("0.0000000000000004527321152996104608068898547927166509996670208320178171898523653701667544358478578289218730097763063669131852", "0.000000000000011707656496202100248575019665652640050450842478555351860415163190039866", "4.527321152996104608068898547927166509996670208320178171898523653701667544358478578289218730097763063669131852e-16"); + + t("-4.785068183e+1", "4.100602340813778290214569907944153985840287e+41", "-47.85068183"); + t("2.80464647349124269012895506839600253935327310965e+18", "-9.5524432014496391100798143628e+26", "2804646473491242690.12895506839600253935327310965"); + t("-2.8475390576301982648821864330615e+1", "2.699279786373606e-17", "-2.6651296488681e-17"); + t("-2.9148775309735883444412038961e+12", "-3.7791910283459953859509024618806015827414491747e-14", "-1.2484519780688810034904273898769796515468689534e-14"); + t("4.75952e+1", "-9.2480596298788483952588449013e+15", "47.5952"); + t("-1.059098439e-6", "-2.61519835738114698145e+4", "-0.000001059098439"); + t("2.0737545782540501468649951383811505929864648e-11", "8.001141125055718003273562341771790690597363615833e+48", "2.0737545782540501468649951383811505929864648e-11"); + t("-1.22658750490728083398e+13", "1.8753238083480045539938865768259755398e+8", "-132148191.84975394758545561202438438412"); + t("3.0610455075185277682819215983121128590345078192561e+45", "-7.2132877592078603887799551646099823518259e+16", "61373855855082630.483565489609741494295639"); + t("9.0188012787220251521914339e+21", "7.34972521506799782052e+20", "199131020640427767567.4339"); + t("2.732276e+6", "-2.155e+2", "167"); + t("1.81970803337505025123814446711e+19", "1.552273391587321102352777093263e+8", "121079294.0355602541613892510099"); + t("5.29521849750516603814171596807e-3", "-1.186023062792866863315593132074754530817309278318e-16", "9.65458477943067357182194529851732179008303939488e-17"); + t("4.17590665394570316906941267960925070278431e-5", "9.049524633791428612160450019368774628e+0", "0.0000417590665394570316906941267960925070278431"); + t("-3.349078310428002e+5", "-1.6540638667696404135343644190345e+18", "-334907.8310428002"); + t("3.1992755000743044238501551275241732747e+28", "6.7694639443884902632801069e+19", "58012283694485729642.404216747"); + t("7.824216663065598374539197703051941e+7", "2.8264285749437427237554422632944775049521496e+41", "78242166.63065598374539197703051941"); + t("-1.67058990412026696591650976e+2", "4.22502522584451063700771426002353559984275436807335e+7", "-167.058990412026696591650976"); + t("-2.45635416234991644154081e+10", "1.6511720053714564535061012818217797956053950352564e+3", "-169.9750792296892367202705840388216243464507038608"); + t("-1.234302917437106938892e+6", "-4.66222869142052358935242282170391162075612576838441480514e-11", "-1.16831454856809476137891894092632703280451615639647891166e-11"); + t("1.839710778457895734645309275939324e+23", "-1.16318585777868797619955e+17", "90437897170854441.0401789324"); + t("4.31278525467628823588407602838382746643207760247774704277223e+9", "2.23171038985847514593e+20", "4312785254.67628823588407602838382746643207760247774704277223"); + t("3.0774747e+7", "-1.292178569466e+6", "1054639.902282"); + t("7.1986256721501851444121681387782246892728127232221676165644e+45", "-1.13782811077947907584409056830168328555517006340535538318684e+28", "2.4664369028970742315721904655905118416446174179007597618692e+27"); + t("-5e+0", "1.8187074446258529890089548133661805568989582581e+46", "-5"); + t("2.90713213183891582843410750914399986513758162e-3", "-2.63153627e+1", "0.00290713213183891582843410750914399986513758162"); + t("-1.1994289233986543701822561078984450080807572663172692845e+26", "1.3308098373134e+12", "-1101301973800.58984450080807572663172692845"); + t("3.80222940163e+10", "-1.86439621006147e+8", "175050952.052159"); + t("-1.0589771547255325020757865564001533466983148718e+46", "-4.66653476326811630302573645173380627372e+30", "-1.34743461530630312563356791528734704544e+30"); + t("0e+0", "-5.8555382904168e+10", "0"); + t("-3.877410561846137535676828506580217538851e+39", "1.8546585782329946703671500695022434e+25", "-8.304732800863368666145000987852196e+24"); + t("-1.163627582049e+10", "-1.190310616961783801595291761751e+7", "-6941092.77337225841399948769273"); + t("5.50922178592853292e+8", "2.7726691028626755345614e+1", "9.067016077612284334026"); + t("4.585813032273175774206281699078636679246584e+2", "-1e+0", "0.5813032273175774206281699078636679246584"); + t("2.143209743784799995437859351e+27", "7.89686033593298254046863395059167e-18", "6.81868949928986360863748711628261e-18"); + t("-2.2928677299898057914670255997347455786e+11", "1.43685706448112139571439918598028632e+6", "-306934.405632425577309870670368346"); + t("4.354911010988471845818170482045217459828e-19", "-3.4255381103210061953947764102346444839325208e+5", "4.354911010988471845818170482045217459828e-19"); + t("7.6205756951722652979726396821744395258e-11", "-2.469701682300246385132843673488255945931294e+23", "7.6205756951722652979726396821744395258e-11"); + t("-3.0414336636936289483194714509757754918625515721268383983891e+22", "4.536514951e+9", "-2390201439.714509757754918625515721268383983891"); + t("6.1950756263395220720928988581672084e+12", "5.50299097228515217025542686233486e+6", "994424.9277391452982364908047321"); + t("1.5592703628193685590607028031257876838163995140476313e+52", "4.644158636847e+12", "1438695302628"); + t("-8.321953e-20", "3.425924048971005175376011737e-6", "-8.321953e-20"); + t("2.50545873839057298343115607524742030919655663396773e-12", "-3.81e-9", "2.50545873839057298343115607524742030919655663396773e-12"); + t("-6.626563801610720283429069e+24", "-7.318668911456127669428074219e+27", "-6.626563801610720283429069e+24"); + t("6.579221387782276980734304828884120337616419799251099653496e-1", "-3.8969000319182257446208467342247396396093882352e-15", "1.9767722676183043776377919004479568382127247136e-15"); + t("3.1401513e+2", "1.237032386460703e+15", "314.01513"); + t("4.232794809535764324617667621124324483982653495945584e+6", "7.3809184815598732203484798105535965548268885342e+0", "0.4405677713499586621163276690389136391131296364"); + t("-2.54046333929067768396256156730192176704492639570003e+1", "-1.43509613727037812846035760529266475517733244287446e+5", "-25.4046333929067768396256156730192176704492639570003"); + t("-1.7784812894976825e+5", "1.348176239051319766183648668812555533668836074076e+47", "-177848.12894976825"); + t("-1.34525103103779e+8", "-2.1e+0", "-1.903779"); + t("-7.5e+0", "1.1485396369968399088809663888589e-8", "-2.897466364518558819119797833239e-9"); + t("1.02502826667e+1", "9.3481096028282686300763053917132870455928e-15", "7.7634911550320902212280587730161073680336e-15"); + t("9.56858647594739448303715711e+11", "-4.2315e+2", "168.239448303715711"); + t("-1.121662781899762e+3", "-1.153e+3", "-1121.662781899762"); + t("-1.1987521321e+0", "3.3717546189279471902193720771211135e-6", "-0.0000023276964037193028773035373618806855"); + t("-3.96409663517864928212668914312890035732488673186557035e+16", "-3.503768915124379422490579250903005526551657e+9", "-1073469883.0404370184683678233259100444904567035"); + t("-9.780642443954005196506214589e+15", "-9.0202154557465647565999764323022181914347547218716e+44", "-9780642443954005.196506214589"); + t("6.22723611860453496632948443539098691396413e-10", "-2.77824094902753769648885834726391520861911e+5", "6.22723611860453496632948443539098691396413e-10"); + t("-4.7319718694e+5", "6.8346446241247783161447574947601984306026821486383635e+33", "-473197.18694"); + t("-6.1933379823501920314298624358203814e+30", "-8.089868231074264910103113854481018685411838271163628e+0", "-8.004699925089141256941499632457605509538837084388632"); + t("1.5e-3", "7.82546748299781600669e+20", "0.0015"); + t("-6.7242596508788e-7", "1.3806352e+7", "-6.7242596508788e-7"); + t("1.9762609860647814575863656621674468865989380864741e+45", "6.51277646556899014436272323991705259786529655e-5", "0.000014790203177222374955576884258500785345510175"); + t("7.004000748022736e-8", "4.736649441368895442161035451e+22", "7.004000748022736e-8"); + t("-4.29285701374473103585848390846585847338e-20", "-1.39970996245e+6", "-4.29285701374473103585848390846585847338e-20"); + t("1.44068396723397585225000633824556784092935879966094079042e+14", "-1.85739402953385383572444765551721122270675395703645487708e-6", "2.2082902769721875195705810453565730977529281295245227248e-7"); + t("-1.90763083929612502667113570129e-17", "-2.989745679222607307608195e+24", "-1.90763083929612502667113570129e-17"); + t("-1.8008915784029129140878223332849e+15", "1.2709184544773109938594286324169565032629e-8", "-8.198978038773931537165401098330611286589e-9"); + t("2.5283393571163e+11", "1.42605397244976960657e+16", "252833935711.63"); + t("-1.07482517991266460493961480563252855043997503069929863e+53", "4.0293147259356676513464190395e+2", "-327.97566262501963085789832435"); + t("-1.791459937048480305498333255301e-17", "-3.60140444532360031210882850839206992361061e+32", "-1.791459937048480305498333255301e-17"); + t("-3.7973618905e+4", "2.076660739009108092554128277835978289058948608e+27", "-37973.618905"); + t("4.296835337235213305241997742797979761241859185e+32", "1.016128323816741556885745789299051e+30", "8.773810728563935184150511955984541241859185e+29"); + t("-3.3476803669790089330287396786213536648e-19", "-1.0485228843496121655433179024642877076320529176e-16", "-3.3476803669790089330287396786213536648e-19"); + t("-9.265001828356e-19", "5.82146621596502038608123809e+5", "-9.265001828356e-19"); + t("1.6574237778185417162412521417931606051387220789593e+6", "4.3416420707553748006564234818e+29", "1657423.7778185417162412521417931606051387220789593"); + t("-9.774062277712948833378e-13", "3.080037033054419810654271948e-15", "-1.034488293043803360395792484e-15"); + t("1.0480042083686042910696085478682293620068215e+43", "-9.1636346772043682784439956904897547881091051932e+20", "711021412902451879505.0635467550321309923369716"); + t("-3.40923816647136940940085344632137226188233200061358e+20", "1.6073165168980479523827835495337e+31", "-340923816647136940940.085344632137226188233200061358"); + t("-8.7800373379e+9", "1.589967630656932636460925283862063976207125245919e-11", "-2.20858757786189096197325170019616955392212367465e-12"); + t("-1.508492483290420652523454481016576379245159230227181384539e+43", "9.65407339051e-1", "-0.95207917271339"); + t("1.70797882e-17", "-1.221287649130143636399302725332474299568133811751e+13", "1.70797882e-17"); + t("2.25e+0", "7.2018713275608502122703864334941124435400603003965e+49", "2.25"); + t("3.66e+3", "-2.00125759501079698887197092755e+20", "3660"); + t("1.074410572430091406447031457374002693e+8", "1.14072231468921335177378921904e+16", "107441057.2430091406447031457374002693"); + t("-3.8968391781145045605e+7", "3.823518283e-1", "-0.379345773205"); + t("3.8807293359084454309373e-14", "-6.54951383e-4", "3.8807293359084454309373e-14"); + t("8.3790348726489133341557987289125627922491641304972332e+10", "1.88761931097750519978e+9", "735099043.478904551237987289125627922491641304972332"); + + t(8, 3, "2"); + t(8, -3, "2"); + t(-8, 3, "-2"); + t(-8, -3, "-2"); + t(1, 2, "1"); + t(1, -2, "1"); + t(-1, 2, "-1"); + t(-1, -2, "-1"); + t(34, 5, "4"); + t(34, -5, "4"); + t(-34, 5, "-4"); + t(-34, -5, "-4"); + + var t2 = (BigDecimalArgument a, BigDecimalArgument b, string expected, long sd) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(a, config).Mod(b).ValueOf()); + }; + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t2("4.944978e+764", "5323614045.2252161212631613035133757836906706", "5.1535379640553098968737518932745870816240816e+9", 97); + t2("32172841276723723017320184344985646175887112.47790381", "5.58951e+9", "2.42307711247790381e+9", 20); + t2("7.00620e+9706", "-8.08968082636983139609501341360433350633079179648541620232683e+9707", "7.0062e+9706", 42); + t2("-1.81968692707021067164405981e+1010", "-8.0e+4383", "-1.819e+1010", 4); + t2("72217.81124137174718066449515357955447849981408895", "-8.7683588909862633417120718073873e+49", "7.221781124137174718066449515357955447849981408895e+4", 53); + t2("374.465410986072628695747577414265711313", "5.2879747143440196018217433252932138284305606201435437e+952", "3.7446541098607e+2", 14); + t2("9.62707270e+501", "-6.342341847592514387089599362701767676614396026825953485e+539", "9.6270727e+501", 84); + t2("7145500474663735829770809398299303175.875800464970535410224", "90828572.5113415651186621228687335129152209", "5.6290732076087447357393897802e+7", 29); + t2("-6.05845881219948340925618875938e+91", "6.61836246027891675911003e+7034", "-6.0584588121994e+91", 14); + t2("7376349279.6789964", "8.13158102169523546706061074913188868474536498e+1244", "7.3763492796789964e+9", 83); + t2("-26377480.2334276377485822339988800328191768957719819966", "97339239938767981386925617.88982454562567822091088", "-2.6377480233427637748582233e+7", 26); + t2("-6.887177370604424697705428668658450e+36", "-7.67098e+3101", "-6.88717737060442469770542866865845e+36", 73); + t2("-5.033571988963017652865943270154512156255697111231944e+1306", "-1.04835155898865079e+703", "-9.344544833551976e+702", 72); + t2("-8.1488000628720211739998282062206736158332e+75", "-2.001705e+6119", "-8.148800062872021173999828206220673615833e+75", 40); + t2("-951.8120833154", "-4601803.9053077601346104732884149542122", "-9.518120833154e+2", 85); + t2("7.01029485594801768569517050720798941155721968259835932500e+9422", "-7.0642669512907646431409065185107769129961433230267e+65", "2.2427484434740226146829404720536384416432051622105e+65", 95); + t2("-3.3053551448370844845756700300850e+3913", "-8.3467925553134e+50", "-4.1896819159544e+50", 96); + t2("-3.25278868174882601881e+2959", "7.8431549098046872891828825565737588458734074284671853699539e+633", "-2.3794416114981559662e+633", 20); + t2("-29924.33147502565764364098940606", "-1592929.777384719554672688705249208524154144674784435883721", "-2.99243314750256576e+4", 18); + t2("-701325358.8507151963018486", "5.02485985784225975e+2516", "-7.013253588507151963018486e+8", 69); + t2("-682825", "-9.58106140947497715953494e+7650", "-6.82825e+5", 53); + t2("-6.49308611559837353028439424226724e+681", "-6.9279627338450039699162972e+5038", "-6.49308611559837353028439424226724e+681", 52); + t2("-8.2373007776535315311267037638881860091e+40", "-5.757730498009786912193794e+37", "-3.7461654995362466895783438881860091e+37", 89); + t2("5.129086074208008222351499810040746978958761126e+293", "496793381949653476385416592315281192971751225.09020825", "4e+44", 1); + t2("-243025.9013822376723836745951444", "-2.6675104229981642056765726341862e+9212", "-2.430259013822376723836745951444e+5", 91); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightNegTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightNegTests.cs new file mode 100644 index 0000000..04d2904 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightNegTests.cs @@ -0,0 +1,231 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightNeg")] + public class BigDecimalLightNegTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Neg() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21 + }); + + var t = (string expected, BigDecimalArgument n) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).Neg().ValueOf()); + }; + + t("-4", 4); + t("-2147483648", 2147483648); + t("-0.25", 0.25); + t("-0.0625", 0.0625); + t("-1", 1); + t("1", -1); + t("0", 0); + t("0", "-0"); + t("0", "0"); + t("0", "-0"); + + t("-9.99e+9000000000000000", "9.99e+9000000000000000"); + t("9.99e+9000000000000000", "-9.99e+9000000000000000"); + t("-1e-9000000000000000", "1e-9000000000000000"); + t("1e-9000000000000000", "-1e-9000000000000000"); + + t("-238", "238"); + t("1.3e-11", "-0.000000000013"); + t("-33.1", "33.1"); + t("2.61", "-2.61"); + t("-4", "4.0"); + t("-5.8", "5.8"); + t("-3.52e-7", "0.000000352"); + t("190", "-190"); + t("4.47", "-4.47"); + t("6.9525e-12", "-0.0000000000069525"); + t("1.3", "-1.3"); + t("-6.21", "6.21"); + t("2", "-2"); + t("-1", "1"); + t("147.857", "-147.857"); + t("-26.517", "26.517"); + t("-3", "3"); + t("5", "-5"); + t("204", "-204"); + t("2.1e-8", "-0.000000021"); + t("3.7015e-7", "-0.00000037015"); + t("-50.1839", "50.1839"); + t("44768.1", "-44768.1"); + t("3.8e-15", "-0.0000000000000038"); + t("-7.4379", "7.4379"); + t("1.5", "-1.5"); + t("6.0399", "-6.0399"); + t("109.07", "-109.070"); + t("1582", "-1582"); + t("-772", "772"); + t("-6.7824e-14", "0.000000000000067824"); + t("-1.819e-8", "0.00000001819"); + t("-3e-15", "0.0000000000000030"); + t("-424120", "424120"); + t("-1814.54", "1814.54"); + t("-4.295e-17", "0.00000000000000004295"); + t("-5", "5"); + t("2152", "-2152"); + t("4.6", "-4.6"); + t("1.9", "-1.9"); + t("-2", "2.0"); + t("-0.00036", "0.00036"); + t("-0.000006962", "0.000006962"); + t("3.6", "-3.6"); + t("-1.1495e-14", "0.000000000000011495"); + t("-312.4", "312.4"); + t("4.3e-10", "-0.00000000043"); + t("5", "-5"); + t("-1.8911e-8", "0.000000018911"); + t("4963.53", "-4963.53"); + t("-4.3934e-10", "0.00000000043934"); + t("-1.3", "1.30"); + t("-1", "1.0"); + t("-68.32", "68.32"); + t("0.014836", "-0.014836"); + t("8", "-8"); + t("2.1351", "-2.13510"); + t("162224", "-162224"); + t("3e-19", "-0.00000000000000000030"); + t("0.00004985", "-0.00004985"); + t("28.9321", "-28.9321"); + t("-2", "2"); + t("-16688", "16688"); + t("-1", "1"); + t("5", "-5"); + t("-20", "20.0"); + t("-1.9", "1.9"); + t("3", "-3"); + t("185640", "-185640"); + t("-0.0000058", "0.0000058"); + t("9.67e-13", "-0.000000000000967"); + t("-707.98", "707.98"); + t("2.57917", "-2.57917"); + t("-1.3", "1.3"); + t("-4.2655", "4.2655"); + t("-149.6", "149.6"); + t("-1.32383", "1.32383"); + t("-26.925", "26.925"); + t("-0.00013", "0.00013"); + t("-6868", "6868"); + t("7", "-7"); + t("-5e-9", "0.0000000050"); + t("3.2555e-16", "-0.00000000000000032555"); + t("1.42768e-13", "-0.000000000000142768"); + t("11.2962", "-11.2962"); + t("3186.7", "-3186.7"); + t("-6.9", "6.9"); + t("-6.2618e-7", "0.00000062618"); + t("8", "-8"); + t("-8.04", "8.04"); + t("-22", "22"); + t("-750.6", "750.6"); + t("12.803", "-12.803"); + t("-20513.4", "20513.4"); + t("114781", "-114781"); + t("-16.9046", "16.9046"); + t("4.6e-7", "-0.00000046"); + t("-31399", "31399"); + t("1.04", "-1.04"); + t("-51.2544", "51.2544"); + t("1.023e-15", "-0.000000000000001023"); + t("281", "-281"); + t("-128315", "128315"); + t("20.2", "-20.2"); + t("9", "-9"); + t("-10", "10"); + t("-1.92262e-17", "0.0000000000000000192262"); + t("-0.0023", "0.0023"); + t("5", "-5"); + t("7", "-7"); + t("13.72", "-13.72"); + t("98068", "-98068"); + t("3.2", "-3.2"); + t("1.1", "-1.1"); + t("-3.97e-18", "0.000000000000000003970"); + t("0.00334824", "-0.00334824"); + t("-5.4892e-8", "0.000000054892"); + t("-1", "1.0"); + t("-2.8135e-8", "0.000000028135"); + t("-1.816e-13", "0.0000000000001816"); + t("199724", "-199724"); + t("-19.4", "19.40"); + t("-12.74", "12.74"); + t("-2171.8", "2171.8"); + t("-2.7", "2.7"); + t("1", "-1.0"); + t("21779", "-21779"); + t("8.9e-12", "-0.0000000000089"); + t("-4.51", "4.51"); + t("2.6", "-2.6"); + t("-0.00016", "0.000160"); + t("6", "-6"); + t("50.566", "-50.566"); + t("-16.2", "16.2"); + t("-9444", "9444"); + t("21.4", "-21.4"); + t("2.5", "-2.5"); + t("489311", "-489311"); + t("6.8", "-6.8"); + t("4.29", "-4.29"); + t("23982", "-23982.0"); + t("-0.0111781", "0.0111781"); + t("4.96e-20", "-0.0000000000000000000496"); + t("-40.5481", "40.5481"); + t("-32.52", "32.52"); + t("-7.4", "7.4"); + t("-5", "5.0"); + t("-2463.4", "2463.4"); + t("7.363", "-7.363"); + t("2.8", "-2.8"); + t("-14498", "14498"); + t("201", "-201"); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("-5.0600621890668482322956892808849303e+20", "5.0600621890668482322956892808849303e+20"); + t("7e+0", "-7e+0"); + t("-6.1095374220609e+13", "6.1095374220609e+13"); + t("9.01e+2", "-9.01e+2"); + t("-1.016984074247269470395836690098169093010136836967e+39", "1.016984074247269470395836690098169093010136836967e+39"); + t("-1.497639134680472576e+18", "1.497639134680472576e+18"); + t("-4.1717657571404248e+16", "4.1717657571404248e+16"); + t("8.983272e+1", "-8.983272e+1"); + t("-5.308416e+6", "5.308416e+6"); + t("-2.09764e+3", "2.09764e+3"); + t("-3.83432050166120236679168e+23", "3.83432050166120236679168e+23"); + t("-4.096e+3", "4.096e+3"); + t("2.679971527468745095582058350756311201706813294321409e+51", "-2.679971527468745095582058350756311201706813294321409e+51"); + t("-5.067853299870089529116832768e+2", "5.067853299870089529116832768e+2"); + t("-3.48822062687911109850066182676769e+32", "3.48822062687911109850066182676769e+32"); + t("-1e+0", "1e+0"); + t("4.2773e+0", "-4.2773e+0"); + t("5.8169306081172252508071119604378757744768e+12", "-5.8169306081172252508071119604378757744768e+12"); + t("-1e+0", "1e+0"); + t("1.51655708279450944384385164853883404204414169862685507e+46", "-1.51655708279450944384385164853883404204414169862685507e+46"); + t("-8.1e+1", "8.1e+1"); + t("-1.296e+3", "1.296e+3"); + t("-2.9e+0", "2.9e+0"); + t("-1.764e+3", "1.764e+3"); + t("9.3418332730097368870513138581415704704611459349313e+49", "-9.3418332730097368870513138581415704704611459349313e+49"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightPlusTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightPlusTests.cs new file mode 100644 index 0000000..ae96d7f --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightPlusTests.cs @@ -0,0 +1,224 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightPlus")] + public class BigDecimalLightPlusTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Plus() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 200, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e9, + ToExpPos = (long)9e9, + }); + + var t = (BigDecimalArgument addendA, BigDecimalArgument addendB, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(addendA).Plus(addendB).ValueOf()); + }; + + t(1, 0, "1"); + t(1, "-0", "1"); + t(-1, 0, "-1"); + t(-1, "-0", "-1"); + t(0, 1, "1"); + t(0, -1, "-1"); + t("-0", 1, "1"); + t("-0", -1, "-1"); + + t(1, "0", "1"); + t(1, "1", "2"); + t(1, "-45", "-44"); + t(1, "22", "23"); + //t(1, 0144, "101"); //js only + t(1, "0144", "145"); + t(1, "6.1915", "7.1915"); + t(1, "-1.02", "-0.02"); + t(1, "0.09", "1.09"); + t(1, "-0.0001", "0.9999"); + t(1, "8e5", "800001"); + t(1, "9E12", "9000000000001"); + t(1, "1e-14", "1.00000000000001"); + t(1, "3.345E-9", "1.000000003345"); + t(1, "-345.43e+4", "-3454299"); + t(1, "-94.12E+0", "-93.12"); + t("0", 0, "0"); + t("0", "0", "0"); + t(3, "-0", "3"); + t(9.654, 0, "9.654"); + t(0, "0.001", "0.001"); + t(0, "111.1111111110000", "111.111111111"); + t(-1, 1, "0"); + t(-0.01, 0.01, "0"); + t(54, -54, "0"); + t(9.99, "-9.99", "0"); + t("0.00000", "-0.000001", "-0.000001"); + t("0.0000023432495704937", "-0.0000023432495704937", "0"); + t(100, 100, "200"); + t(-999.99, "0.01", "-999.98"); + t("10", 4, "14"); + t("03.333", -4, "-0.667"); + t(-1, -0.1, "-1.1"); + t(43534.5435, "0.054645", "43534.598145"); + t("99999", "1", "100000"); + + var t2 = (BigDecimalArgument addendA, BigDecimalArgument addendB, string expected, long sd) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(addendA, config).Plus(addendB).ValueOf()); + }; + + t2("9182914763445141913243843569172715469835.4885696227829197845538926", "7633444625534.6271670438", "9182914763445141913243843576806160095370.115", 43); + t2("79344567.9583146261700423456539738617142116267", "76770085769491324895202178331658.82467912070", "76770085769491324895202257676226.7829937468700423456539738617142116267", 75); + t2("8.1572164344501210656681193", "141383742681203268175705548539.5903424774279108405668653", "141383742681203268175705548547.7475589118780319062349846", 87); + t2("3686865567196977754914570753132702.86443144944286374816106555429", "252977292743732124354509767399171006.56792658736276850447471854354498", "256664158310929102109424338152303709.43235803680563225263578409783498", 76); + t2("7772413527479.0292045567366574215506978466", "6951039673098790484081676762223797578.48972170861559580041987995", "6951039673098790484081684534637325057.5189262", 44); + t2("897519.488463768126475213360003650464", "243345915368302813437999412228446907.03319139912318828693096", "243345915368302813437999412229344426.521655167249663500290963650464", 69); + t2("9944701104687189448523634989441.1145387693210320276079647", "76461573432179845156280348475771563.06533912678377627209249", "76471518133284532345728872110761004.179877896", 44); + t2("49868358282915444463601511745776323.6756", "426.127124853", "49868358282915444463601511745776749.802724853", 62); + t2("18829358460454562606796373222566693.8406444934478081754024757172", "245696827314924767344.62999383040940", "18829358460454808303623688147334038.4706383238572081754024757172", 65); + t2("451443519.5", "40545287685504171383686533617478.0379433921591774655032923922180", "40545287685504171383686985060997.537943392159177465503292392218", 85); + t2("9103707265251.90817165947074590284", "7132.1726911109784489", "9103707272384.08086277044919480284", 57); + t2("81132109324361724111675518092.0430089148033907345892402992266", "56280915849510057765284537881333571.97531", "56280996981619382127008649556851664.018318914803390734", 53); + t2("308403067969970653523590678072543444693.024992850150499393849129", "732241040738289252979020347.308655416021872045866556456848136589", "308403067970702894564328967325522465040.333648266172371439715685456848136589", 93); + t2("510539424488693733.41537434134721968131486", "327009.1496755290899995046724660116828516732779", "510539424489020742.56504987043721918598", 38); + t2("581375185201895127979063.3148256", "14356334345.7574898", "581375185201909484313409.0723154", 33); + t2("7402851913927.841295065397846204951008", "3095919939427099869935455000158274400904.445835412", "3095919939427099869935455007561126314832.287130477397846204951008", 76); + t2("4961172832120828815580484602760756.2012712908", "672041039664151754962281595761407065569.95071013621060637157419754", "672046000836983875791097176246009826326.15", 41); + t2("615013136392771057432168892493351121.844", "7501.90719259576291230", "615013136392771057432168892493358623.7511925957629123", 56); + t2("439780502800870192246198170895028338.75503651737499", "54139159349728010041929589316148734373.238719628804657454831809670308", "54578939852528880234175787487043762700", 36); + t2("4825986092816553.7635954902708301975634371809900", "6932262398609128466540251295633274.5129783804352371207490", "6932262398609128471366237388449828.27657387070606731831243718099", 87); + t2("6779555902177154177229771584.099785903065", "7705328232185839682426202564296087172997.525840974954568455125376057221984043", "7705328232192619238328379718473316944581.625626878019568455125376057221984043", 86); + t2("73975703304587932639.2181626587592846793346557", "385064.7711364633520856985649145914899", "73975703304588317703.9892991221113703778995702914899", 65); + t2("5361772037663933234405322789036276.33156433900413166799767144681154137323", "286704590022711173.40544742389525", "5361772037663933521109912811747449.73701176289938166799767", 57); + t2("652545610682383466438682204.42146681125712", "90000817174099471.37775277", "652545610772384283612781675.79921958125712", 83); + t2("30955320958921614617178138289424354927.94679217117720836736847", "9343585893221.056", "30955320958921614617178147633010248149.00279217117720836736847", 93); + t2("99936880718101922830812712583.65032262815572509426570474", "33036974375228768881250337405734899.3544983736263577509194755440416", "33037074312109486983173168218447483.00482100178208284518518", 58); + t2("2403534785699117112878638516815488696057.917378367470941297385927", "6382502380424160003.479677660153263338013088885", "2403534785699117112885021019195912856061.397056027624204635399015885", 85); + t2("4863433553099693015144122064473263537.90580375285849442237159037230012244", "729921864795343627150.6944153828593595441", "4863433553099693745065986859816890688.60021913571785396647159037230012244", 88); + t2("399834116109759859225128.86903386714268063275622585130318202065", "83243301579.66435004343194655785121635608927271", "399834116109843102526708.53338391057462719060744220739245473065", 63); + t2("858875986652204266383404217992.291603983048765141", "6.0926465541742680273373988448676561", "858875986652204266383404217998.3842505372230331683373988448676561", 77); + t2("55771.4302072966318037483204", "5074951905603164297.9", "5074951905603220069.3302072966318037483204", 43); + t2("9932777897276065862443227653669365455342.97666674233819577", "9658865807142952156279.44105819698310", "9932777897276065872102093460812317611000", 37); + t2("742255892921.08552278588490", "92947236971652934320.381863823954476980190144705805612087685", "92947237713908827241.46738660983937698019014470580561", 52); + t2("693483.30191418214", "142589882557.20048662638259170691", "142590576040.50240080852259170691", 57); + t2("4.526207787", "494677.2546106854088", "494681.7808184724088", 48); + t2("30748018.2039098027620849591479954965780808709", "6852918.752696887318295520093985973", "37600936.9566066900803804792419814695780808709", 45); + t2("9458108973104955501.19731713109763438574297", "25483717936.348437947448383180705503437809197004644", "9458108998588000000", 13); + t2("44343536119449484.887983227307430084581470194803169", "687286972712382711.817290490656982837", "731630500000000000", 7); + t2("190892658814671027948020798562.66401", "3077914596519843221.11397426172", "190892658817748942544540641783.77798426172", 87); + t2("5738.75872446155", "29858473503717618435783009538061.2367254587951510324891489061", "29858473503717618435783009500000", 27); + t2("46692439158758833041970355457275102904.33760089680805727178230", "5100.209160709238112205230327", "46692439158758833041970355457275108004.5467616060461694", 54); + t2("6886266974462041003392255811.09", "157963384397039800487731671393.108839212437491153109722732638001", "164849651371501841491123920000", 26); + t2("261560536522656708116178389636.96902957482448266", "43.894270959640597", "261560536522656708116178389680.86330053446507966", 58); + t2("7389329930453.70597654613990586394144740106960", "7516027589853093719738857026838910413.94175665824167286", "7516027589853093000000000000000000000", 16); + t2("14259971637546.243488016880492813", "47.75579735608706408", "14259971637593.999285372967556893", 38); + t2("588735735873509776102380058677.1286952894401", "97.779232460469346660464003276", "588700000000000000000000000000", 4); + t2("92727445890741842949222790332510627.7224808091", "7609679843743118851669318656.448072904050281496386026279208447", "92727453500421686690000000000000000", 19); + t2("7495308563429194517.4950842956952536756132", "26.98098879", "7495308563400000000", 11); + t2("88323438972.9", "3947737028583992592909690304161920258.9068619264090315473722446642669787780455", "3947737028583992592909690392485359231.806861926409031547372", 58); + t2("76964133350127894939591167080295347.29740816733871", "772928008263955477554638996.3016794002524482346051388435140772", "76964134123000000000000000000000000", 12); + t2("93178915455.978234064862278834", "70156785202107872073374655857728.50328804248218", "70156785202107872073467834773184.481522107344458834", 100); + t2("9.09", "81260831717416.97800363", "81260831717426.06800363", 89); + t2("1855445938689865341002697566158764326.79725393455165540", "565.09791800109811921652723361425597442", "1855445938689865341002697566158764891.89517193564977461652723361425597442", 97); + t2("563573389370505100921783994.63820711261296", "6183290606357615817.2201", "563573395553795707279399811.85830711261296", 93); + t2("34682163909803912305.58279868924", "3882592798.71", "34682163913686505104.29279868924", 32); + t2("45556245389463100131676399335223730722.64187559429639385721653", "3139098333707395868305892593215872544698.3980421276727128", "3184654579096858968437568992551096275421.039917", 46); + t2("214681567801880599741149018665.4268904627994045437530044796095081166697", "30.24438352", "214681567801880599741149018695.671273982799404543753004", 54); + t2("8113872603185679969728486212332590783.602055287175599032912451", "6883368621751387.904574695331503", "8113872603185679969735369580954342000", 34); + t2("4473325482.521859322286620356175998427324", "5517383386767642457749850088998162.9878404839737358471115523370", "5517383386767642457749000000000000", 22); + t2("211869120158.6755510559122396323632849492172", "3350176216485535906730909111199110098559.434382853205751669259307", "3350176216485535906730909111410979218718.1099339091179913016225919492172", 84); + t2("4787781.830769633650", "28106931688076101944325980357112766666.4147856541674471029390", "28100000000000000000000000000000000000", 4); + t2("5421870551709971643477646229788.9916151146275027436845830667747596930491", "1294187723.63552000599434", "5421870551709971643478940417512.6271351206218427436845830667747596930491", 84); + t2("66516175033671157522539424787063035.289018415345287705892", "457025403297589.48109451223206526106813370983486534540", "66516175030000000000000000000000000", 10); + t2("420410527375765723.59880359173181300286368456", "51144376163959512362961732882333687.127621078003128120894", "51144376163959512783372260258099410.726", 38); + t2("3.21003346071", "312572971640834499.5651635013104403556411852", "312572971640834502.7751969620204403556411852", 65); + t2("75902636101686648000.6", "359043382984760880361621433096498558.8522232641204", "359043300000000000000000000000000000", 7); + t2("272.20163189736699207276", "8009976948562717694664282.361198237345827", "8009976948562717694664554.56283013471281907276", 93); + t2("93525713224070.09674242841815995541364018052052", "75768676.532480641692742503493", "93525788992746.6", 15); + t2("1744056.272665115358269071", "6706.43717222508571881815348574554893", "1750762.70983734044398788915348574554893", 39); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t2("4.6011800481717419E-806104423910", "-8.6437098622551564549067098493197906561E-280114", "-8.64370986225515645490670984931979065609999999999999e-280114", 51); + t2("-7.59901046473456174157176600977643736E+928", "3.1554648E+9567428", "3.1554647999999999999999999999999999999999999999999999999999999999999e+9567428", 68); + t2("7.38629782790796531025130356311386902379257377504731E-65498", "-9.996570772195629416377330436034192E+586560433", "-9.99657077219562941637733043603419199e+586560433", 36); + t2("-3.43703754975841976988985601863218657090565779695942448E-584", "-7.04870954464451748226487792925E+6452", "-7.04870954464451748226487792925e+6452", 65); + t2("-4.6389773729060896356268643578053980E+271990", "5.4794710777462795179129364629207044179495471E+68796013", "5.479471077746279517912936462920704417949547099999999999e+68796013", 55); + t2("9.172623893884291050640178462622576979394001E+74551900", "-0.0006992318506880861375813973557823740630779243140040", "9.17262389388429105064017846262257697939400099999999999999999999999999999e+74551900", 72); + t2("6.166E-6244253", "-9.3214367939176849033412886654725530336291E+4194", "-9.3214367939e+4194", 11); + t2("-3.77704574461102506821116718590213463452971444226E+24181884", "7.89843889931508016397563E+54501333520", "7.89e+54501333520", 3); + t2("-2.6442090E-332", "5.661168834684021053299709525328255302698212731427678781E+171776", "5.6611688346840210532997e+171776", 23); + t2("-1.78E-383610148117221", "-8.4613992413390360803256099173E+37044824", "-8.4613992413390360803256099173e+37044824", 61); + t2("1.494273480155723127276787860353929741454585651339923384424E+7030", "3.599955E+6368385830772", "3.599955e+6368385830772", 63); + t2("2.48389743898982686504586E+5990118820", "7.105424023427069964143E+50201321230", "7.10542402342706996e+50201321230", 18); + t2("-4.4958852106290149081075323202084592539E-86", "-5.01557417551668E+7208357370", "-5.01557e+7208357370", 6); + t2("5.983877037E+772055650933", "5.97790820447058150727307175945652943256022347739E+7594931381", "5.983877037e+772055650933", 52); + t2("4.89816458567686737756451385267113E+12101101", "-9.90080E+857552754863", "-9.900799999999999999999999e+857552754863", 25); + t2("7.9045762440256318425790659793143E-4965904173099", "-3.6938684611042279394235224593675E+38389", "-3.69386846110422793942352245e+38389", 27); + t2("9091734240572059777337372169615492503869182301.1247975", "-8.3901616123211619672445427440292E+133319243", "-8.39016161232116196724e+133319243", 21); + t2("-5.7614024596800067218526669656238695848489E+224985466854", "3.2427446481735120819953731236322538554448401584592050E+8378", "-5.7614024596800067218526669656238695848488999999999e+224985466854", 50); + t2("-3.4835323431888473771840263159327068602635020872E+7998239783115", "6.7428100586109632952356510043358059719760985E+2038539186746204", "6.742810058610963295235651004335805971976098499999999999999999999999999999999999e+2038539186746204", 79); + t2("5.35984699E-72107915904", "-7.76276928415635E+61389759002525", "-7.7627692841563499999999999999999999999999999999999999999999999999999999999e+61389759002525", 74); + t2("372", "4.0265633445977342886914858196025527970624174904E+64814780518", "4.0265633445977342886914858196025527970624174904e+64814780518", 49); + t2("3.3495505285238580755935342866555E+716714246983274", "-4.76240159579095E+7974238", "3.34955052852385807559353428665549999999999999999999999999999999999999999999999e+716714246983274", 78); + t2("-1.136660052521958775081132655E+780346585615836", "-1.4135244992E-646125418487", "-1.136660052521958775081132655e+780346585615836", 57); + t2("6.80671234274E+24353107821", "1E+4750938956", "6.80671234274e+24353107821", 35); + t2("4.2085E+131473", "-5.1978121837876172298218903357871360922005E+2099146", "-5.1978121837876172298e+2099146", 20); + t2("-1.85132291032742043751664841732E+6749817", "-5.51291831643359159273855611591861000641174141E-3605", "-1.85132291032742043751664841732e+6749817", 37); + t2("-2.2E+623", "-9.68323984843808465603512E+183103449888", "-9.68323984843808465603512e+183103449888", 44); + t2("-8462160.18230790532620920473885801869", "-6.823491622045784142358976141661068180768388482486E-88", "-8.46216018230790532620920473885801869e+6", 63); + t2("9.584900900395488487116295413021E+117531807633", "6.9324408293249E-1363303", "9.584900900395488487116295413021e+117531807633", 36); + t2("-1.2205998125948126093868793881263340265049E-998794", "3.649848500316357500547879920E+99", "3.649848500316357500547879919e+99", 28); + t2("7.9674746447477270E+32024230", "9.378127937107139691153209079100915E+74421", "7.967474644747727e+32024230", 53); + t2("8.6526468560473890123167324816104194119468735E-45492", "-9.09989833699618989418290584169989921293754881009537E+328", "-9.0998983369961898941829058416998992129375488100953699e+328", 53); + t2("7.3823394401894199541813669526973321281009006E+342964619755", "-2.7835169984777076297255968060492117442353849489382980019E-3932414405016", "7.382339440189419954181366952697332128100900599999999999999999999999999e+342964619755", 70); + t2("5.93767365838216619745732348758017158E+955", "8.9721E+431904020646180", "8.9e+431904020646180", 2); + t2("5.408E-422768", "-4.8335290132E+201375094", "-4.83352901319999999999999999999e+201375094", 30); + t2("-5255068.0825602021074390953683541500", "-4.592648796456153745297889532992250988472527208E+7065130", "-4.592648796456153745297889532992250988472527208e+7065130", 57); + t2("6.59649576007342568868449989E+538872427755185", "891005.33873644936728042736", "6.59649576e+538872427755185", 10); + t2("3.41080223464725380344854090346498493563054230776E+7037668", "3.14842150141E+41335484610639", "3.14842150141e+41335484610639", 77); + t2("6.97755E+6", "2.2877809304854828E+4407", "2.2877e+4407", 5); + t2("-1.194105902974498122551096123E-94894098890", "1.5568136322038996483E-354014309250", "-1.194105902974498122551096122999999999999999999999999999999999999999999999999999e-94894098890", 79); + t2("-4.3582926017193518533450323833708928536970E+625928309325", "-7.78629536748566236211756044018672869112292055163649E+3878224580", "-4.35829260171935185e+625928309325", 18); + t2("4.338817746880378436738495919632651616263614596719991E-16853", "2E+5897995878425272", "2e+5897995878425272", 69); + t2("9.71853832510229703370187576961518504499101205577E+9111269390", "3.2496E+50", "9.71853832510229703370187576961518504499101205577e+9111269390", 48); + t2("-9.2321759503981412397425795826926029942098E+8733527", "-8.7062475124E+556924354520332", "-8.7062475124e+556924354520332", 72); + t2("1.9019789382830376195918378941236968514484E+71410", "-7.99725347286638007091478935373392E+7365295302", "-7.997253472866380070914789353733919999999999999999e+7365295302", 49); + t2("2.7064812231096664184153270330230630627E+8960", "4.44890E+14", "2.7064812e+8960", 8); + t2("6.46583186092292730436357802632474725780631273259822452268E+2939004825", "-6.65941847768578026064519388121523E-28546746064", "6.465831860922927304363578026324e+2939004825", 31); + t2("-8.078E+3315302", "2.15169943796281232304472863921988890E+2567", "-8.07799999e+3315302", 9); + t2("5.8E+39461267787915", "2.5148686588857181692588619317395E-31", "5.8e+39461267787915", 15); + t2("-2.310978793269215902937528986527468629E+99530314910", "-7.923E-1175647952319965", "-2.3109787932692159029375289e+99530314910", 26); + t2("6.9518585698785793563297313E-945937", "6.932072394145325883412710200096049709866325251010349E+68", "6.9320723941453258834127102000960497098663e+68", 41); + t2("8.319E+65", "3.450099689207871250018932572724713674993594305684395175E+1105524162723988", "3.45009968920787125001893257272471367499359430568439517e+1105524162723988", 54); + t2("4.7593360865E+590704292", "4.39E-602", "4.7593360865e+590704292", 14); + t2("-7.4285E-5714", "-6.532075721513261186334596133875081264260077128E-2890085", "-7.4285e-5714", 5); + t2("8.5388207560433728E-487531241199571", "4.6189690903892583097304455452838826E+122511151", "4.6189690903892583097304455452838826e+122511151", 47); + t2("4.402131638E-6217", "6146491945.8", "6.1464919458e+9", 36); + t2("6.61443100729216275764908834386016575464653E+312916490935810", "9.43649732874441825128E-676693579", "6.614431007292162757649088343e+312916490935810", 28); + t2("6.16310007323656E+923827938105", "-5.237117564730560853952E+2717", "6.163100073236559999999999999e+923827938105", 28); + t2("6.407773391879524E-624218926406576", "5.864631545659357543848307123243933897691521705569062751724E-51503787491", "5.8646e-51503787491", 5); + t2("7E+8031229", "4.05349021928512412448845923836308834593E+297765528415", "4.053490219285124124488e+297765528415", 22); + t2("-3.23441338692447615E+731667319946640", "1.6564004817431066315512571583E+8737112727", "-3.234413e+731667319946640", 7); + t2("8.07600E-3167114890609796", "4.49379785612193203546441944699154417651288200E-67617878473229", "4.493797856121932035464419446991544176512882e-67617878473229", 55); + t2("7.10099910618603162602913895464216183877374670763177E-664701", "2.9497134176736888244719710189373062001792229363001946E-7040302304129787", "7.10099910618603162602913895464216183877374670763177e-664701", 69); + t2("-9.8967145096522848735804634E+98677519", "-8.39861E+5784323495519916", "-8.39e+5784323495519916", 3); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightPowSqrtTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightPowSqrtTests.cs new file mode 100644 index 0000000..447792b --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightPowSqrtTests.cs @@ -0,0 +1,56 @@ +using DecimalSharp.Tests.Extensions; +using NUnit.Framework; +using System; +using System.Globalization; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightPowSqrt")] + public class BigDecimalLightPowSqrtTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void PowSqrt() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + ToExpNeg = -7, + ToExpPos = 21 + }); + + Random random = new Random(); + + string n; + for (var i = 0; i < 1000; i++) + { + + // Get a random value in the range [0,1) with a random number of significant digits + // in the range [1, 40], as a string in exponential format. + var e = random.NextDouble().ToExponential(); + + // Change exponent to a non-zero value of random length in the range (-9e15, 9e15). + var r = bigDecimalFactory.BigDecimal(e.Slice(0, e.IndexOf('e') + 1) + (random.NextDouble() < 0.5 ? '-' : "") + + (n = Math.Floor(random.NextDouble() * 9e15).ToString(CultureInfo.InvariantCulture)).Substring((int)(random.NextDouble() * n.Length) | 0)); + //console.log(' r: ' + r); + + // Random precision in the range [1, 40]. + bigDecimalFactory.Config.Precision = (long)(random.NextDouble() * 40 + 1) | 0; + + var p = r.Pow(0.5); + //console.log(' r.pow(0.5): ' + p); + + // sqrt is much faster than pow(0.5) + var s = r.Sqrt(); + //console.log(' r.sqrt(): ' + s); + + BigDecimalTests.assertEqual(p.ValueOf(), s.ValueOf()); + } + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightPowTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightPowTests.cs new file mode 100644 index 0000000..17b19ce --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightPowTests.cs @@ -0,0 +1,56 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightPow")] + public class BigDecimalLightPowTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Pow() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 40, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (BigDecimalArgument @base, BigDecimalArgument exp, string expected, long sd) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(@base, config).Pow(exp).ValueOf()); + }; + + //t("2.56", "6.5", "450.3599627370496", 16); + //t("1.96", "1.5", "2.744", 15); + //t("2.25", "9.5", "2216.8378200531005859375", 23); + t("48.9262695992662373981", "1.0", "48.926269599266237", 17); + //t("1.21", "0.5", "1.1", 2); + //t("3.24", "0.5", "1.8", 2); + //t("5344.87762641765349023882127126550721", "1.0625", "9139.7407411741874683083843738640173291", 38); + t("91.180153837", "0.5", "9.54882997214842023704943457512609", 33); + t("91.145", "23.8479557348417627", "54402923894673605836306983589686900000000000000", 33); + //t("65536", "2.5", "1099511627776", 13); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("9.9999999999999", "2220.75", "5.623413251778e+2220", 13); + t("0.9999999999999999991999999999019999949909999999", "2220.75", "9.999999999999982233999997e-1", 25); + t("-2", "1001", "-2.1430172143725346418e+301", 20); + t("5.0771598579583468811E-101844", "7064449.87442997380369702938801116641723585825702571602", "3.907934864857193219594361275098983e-719466848189", 34); + t("93720986.7819907489497420190553708041564963922285117", "39.580", "3.3e+315", 2); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightSqrtTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightSqrtTests.cs new file mode 100644 index 0000000..a346cb8 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightSqrtTests.cs @@ -0,0 +1,110 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; +using System.Globalization; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightSqrt")] + public class BigDecimalLightSqrtTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Sqrt() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (string expected, BigDecimalArgument n, long sd) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(n, config).Sqrt().ValueOf()); + }; + + Random random = new Random(); + // Test against Math.sqrt of squared integers. + for (var i = 0; i < 500; i++) + { + var j = Math.Floor(random.NextDouble() * Math.Pow(2, Math.Floor(random.NextDouble() * 26) + 1)); + j *= j; + t(Math.Sqrt(j).ToString(CultureInfo.InvariantCulture), j.ToString(CultureInfo.InvariantCulture), 20); + } + + t("10", "101", 2); + t("10", "111", 2); + t("999", 999000.25, 3); + t("0.00999999999999999999999999999949", "0.00009999999999999999999999999999", 30); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("5.6790521336e+45232", "3.2251633136582109206181686755297199980106981532535904612E+90465", 11); + t("9.6241485526139652228166208472049625290167818011e+1987400693503696", "9.262423536278148172467483107114956962585715251496115897712401E+3974801387007393", 47); + t("9.4527e+117835031340212", "8.935356909E+235670062680425", 6); + t("6.01309285636782899752364197007684920017398969437949e-1790", "3.61572856993018165706134046141609828036662065978484170009821375392882703132369124228069E-3579", 51); + t("1.257819302229712520962174337277372176639810260661e-44311330", "1.582109397061640889607372828919871087547023353618955613E-88622660", 49); + t("3.9031901238112199422244215131891752614639270293050848390039e+24964497874732", "1.5234893142617446461800063194E+49928995749465", 59); + t("2.20453501e-357801904289", "4.859974646744411255356204868440980E-715603808578", 9); + t("9.6614424956e+33826", "9.3343471095787978641040077990615E+67653", 12); + t("6.840414600748481921789126213883996657219910998072878638534975744655859056193334e+365397755685166", "4.6791271910133013331845019336634770531377970763582548051313437429709245928538732275037320149E+730795511370333", 79); + t("3.1595298775034276812747891834935798726890112101053025250708e+161894746", "9.982629046836824729046499174522512414789196378588531892708638648812537073974580E+323789492", 59); + t("2.21e+957", "4.88485916656072684684336288223350318510382769049147063964695662933003E+1914", 3); + t("5.03544006612282891778e+46195820165472", "2.53556566595150796637413433477866041357009510845074403852348490716635E+92391640330945", 21); + t("6.0271249500033e-10781347401", "3.6326235162953181809577645353279210E-21562694801", 14); + t("5.0973657635624059747024576803245965274249298527568449922667e+1692063437920", "2.598313772753815009002620426366701559965597345321262947368693172122554312019668885696226081E+3384126875841", 59); + t("7.552132321848183098292052759964393e+3", "57034702.6067040290231940776601570114357688435285519762590782006101866084636618667", 34); + t("7e+413483559541878", "4.9446671019E+826967119083757", 2); + t("2.3540150674351154530407163580243074454938968196e+2160300", "5.54138693771155115387408E+4320600", 47); + t("1.1573376026021382616589933753247694e+358389221", "1.33943032639686490800430635561822376604163268393006414770600700814939E+716778442", 35); + t("6.63236207127e+23317", "4.39882266444868312494846698153144297198308093870920987520682921E+46635", 12); + t("7.2998671170787362309999885642096413366997803441454046e-3", "0.000053288059927007419736192864488572091336455240976257828090775274140470718273556545610819", 53); + t("8.937227578505540103845413636584692573241532357433996111863e+1790938", "7.987403679E+3581877", 58); + t("1.401091686602968166559525283171170204216e+4918493", "1.9630579142679499665419988066E+9836986", 40); + t("1.0245391862903256753964503966393139032236946080277416684518e-38", "1.0496805442444426583754480311188446871883996972187399715782318606844535332564E-76", 59); + t("1.7128627267646388333852869565663674027391841238236919212997718917108311794e-4002", "2.9338987207395937897002373949538359655732613253567763605075447290049969107E-8004", 74); + t("2.8264310169258223109845135255342978316223511737459003e-16767859699", "7.988712293440338047E-33535719398", 53); + t("6.649283812592150138142528590709054870664998836855393073088808237856384012e+16918", "4.42129752204E+33837", 73); + t("2.90723345116412399903677294614733205e+380", "8.4520063395676629612501328633225132880746874537228627270266E+760", 36); + t("3.49559682514708909727859773952360298460003998789958980573672291458393004e+132", "1.22191971639784089879E+265", 72); + t("2.902077e+1588760762", "8.422051691577715414082824473132488156131471218330734604226191089990683764449E+3177521524", 7); + t("2.18935e-192883592280", "4.79327125880129020E-385767184560", 6); + t("2.3774545577213805010498159234873880660721178e+422716", "5.65229017403016496862404612990739165210984813062645469906426138589591E+845432", 44); + t("4.621003503308429392531555236351223553159256034625873954713601722906751e+22257918209422", "2.135367337758877761572808626061137813597705703296648884770002410767354094917580791680252657855994460E+44515836418845", 71); + t("2.02207593759537562422226807353364843462858518254559656e-28012230172050", "4.08879109740221741578687735602952948096051E-56024460344100", 54); + t("5.3731000956898735111861968797250897647473152496311640907459600751218763861e+454513139585766", "2.88702046383025278824610014957155384890357084971884613239765424667693727485508799293067464689E+909026279171533", 74); + t("3.0742131314253906754227821858e+96706326503", "9.450786377428306361560309171177304320240134953027243301587893245054872736802088043071493639E+193412653006", 29); + t("3.006875499403192963673188892347469682563777463469587792654e+20786", "9.041300268911201088838782013152679784074371858101273E+41572", 58); + t("2.85909217357538160219868784409618103905259254542127e-30883978641744", "8.174408057E-61767957283488", 51); + t("1.650095715573914339995571593605530228843869509809576660267100705710199e+460348481858", "2.72281587055538841173686928082096620997022877836901707243689996E+920696963716", 71); + t("5.0531262501544526519574040306536300193230181695512694054594791474960429e+43540097", "2.553408490E+87080195", 71); + t("4.962894523835293602541700098665678245210425304527057712473799410572054423102e+99", "2.463032205471434562E+199", 76); + t("4.90795797150709105376962677572069305380908614111297365553e+4086", "2.4088051450080E+8173", 57); + t("2.2706488927283296329062209956647601583635908763632678803367026671603381e+37", "515584639404838941246901894159595954745567752911318738407100564309750626516.1791617", 71); + t("3.01621123e+412557134", "9.097530205431698341141736543467287960383290070775938518339807290620844422120352E+825114268", 9); + t("6.01199e+2879412", "3.61440703564099768E+5758825", 6); + t("5.175035338263985141e-19506965", "2.678099075228103912053736336553650966855863923E-39013929", 19); + t("5.2064477870639497e-28517", "2.71070985594230989175938821603202E-57033", 17); + t("8.881482619e+2095399787486186", "7.888073352767506531631057273649734668539553289948510498240822582019489548040318306E+4190799574972373", 10); + t("8.919264136401625271884219060858252e+9", "79553272734900230263.41763128677730026531493235388640071381802652591", 34); + t("2.5833750802158470838638220584e+18913396", "6.6738268050802343551355260020766554923882450343012342734378848E+37826792", 30); + t("6.04693544698469e-220", "3.65654283E-439", 15); + t("1.245345961467927340281476373719978090064081519e+42", "1.550886563744476367740974406041099100674095756961953547612335899E+84", 46); + t("1.90934970073455410278410575623977888122382805484e+422554664715", "3.6456162796951313121087727108063524737724086412612828706606881122179782708607529986314383405E+845109329430", 48); + t("1.576844611205999099662237540201844126209316481620105534e+335357340260426", "2.486438927889398461388938E+670714680520852", 55); + t("2.7450159803706115172884307982554068123557452994357916574e+29493402848956", "7.535112732490029474794930517417328483099871453263111571224994801873955541077813E+58986805697912", 56); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightTimesTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightTimesTests.cs new file mode 100644 index 0000000..c02b0f3 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightTimesTests.cs @@ -0,0 +1,819 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightTimes")] + public class BigDecimalLightTimesTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Times() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 300, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21 + }); + + var t = (BigDecimalArgument multiplicand, BigDecimalArgument multiplier, string expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(multiplicand).Times(multiplier).ValueOf()); + }; + + t(1, 0, "0"); + t(1, "-0", "0"); + t(-1, 0, "0"); + t(-1, "-0", "0"); + t(0, 1, "0"); + t(0, -1, "0"); + t("-0", 1, "0"); + t("-0", -1, "0"); + t(0, 0, "0"); + t(0, "-0", "0"); + t("-0", 0, "0"); + t("-0", "-0", "0"); + + t(1, "1", "1"); + t(1, "-45", "-45"); + t(1, "22", "22"); + //t(1, 0144, "100"); //js only + t(1, "0144", "144"); + t(1, "6.1915", "6.1915"); + t(1, "-1.02", "-1.02"); + t(1, "0.09", "0.09"); + t(1, "-0.0001", "-0.0001"); + t(1, "8e5", "800000"); + t(1, "9E12", "9000000000000"); + t(1, "1e-14", "1e-14"); + t(1, "3.345E-9", "3.345e-9"); + t(1, "-345.43e+4", "-3454300"); + t(1, "-94.12E+0", "-94.12"); + t("0", 0, "0"); + t("0", "0", "0"); + t(3, "-0", "0"); + t(9.654, 0, "0"); + t(0, "0.001", "0"); + t(0, "111.1111111110000", "0"); + t(-1, 1, "-1"); + t(-0.01, 0.01, "-0.0001"); + t(54, -54, "-2916"); + t(9.99, "-9.99", "-99.8001"); + t("0.0000023432495704937", "-0.0000023432495704937", "-5.49081854961890952566173969e-12"); + t(100, 100, "10000"); + t(-999.99, "0.01", "-9.9999"); + t("10", 4, "40"); + t("03.333", -4, "-13.332"); + t(-1, -0.1, "0.1"); + t(43534.5435, "0.054645", "2378.9451295575"); + t("99999", "1", "99999"); + + t("-19.851", "69.11", "-1371.90261"); + t("-0.0251", "-1.09821", "0.027565071"); + t("-2.11", "-21", "44.31"); + t("-1", "7161", "-7161"); + t("-4.61", "1", "-4.61"); + t("11", "-0.0000271", "-0.0002981"); + t("-1", "0.0000224801", "-0.0000224801"); + t("-3.6", "-3336", "12009.6"); + t("0.000000219", "-110.42", "-0.00002418198"); + t("312", "22.87694", "7137.60528"); + t("0.29976", "-5", "-1.4988"); + t("0.00000000000000000010018", "-74.6", "-7.473428e-18"); + t("138.583905", "9.73380", "1348.948014489"); + t("5360260.6", "-12.12", "-64966358.472"); + t("-7.01", "-0.0000000988077", "6.92641977e-7"); + t("0.0000202", "-56583117802", "-1142978.9796004"); + t("116727.96", "0.0000000000000019308", "2.25378345168e-10"); + t("-136636.46", "6.5636554051", "-896834.639212729946"); + t("12.1712598149", "53.270389", "648.3677449597909961"); + t("76", "76019.61784", "5777490.95584"); + t("0.0000714939", "1425786", "101.9350017054"); + t("-3221.71685", "-230", "740994.8755"); + t("0.00000000237457904", "-892315", "-0.0021188724960776"); + t("6511.4", "0.0000000000000186", "1.2111204e-10"); + t("0.000000011188562", "0", "0"); + t("-25379.8", "3", "-76139.4"); + t("41.9279", "23.4198661", "981.94580385419"); + t("0.0000010", "58236.222", "0.058236222"); + t("0", "-16.39257632", "0"); + t("0.000000004846959", "1", "4.846959e-9"); + t("0", "-30878.5", "0"); + t("-8065.5", "-0.00000000058314173", "0.000004703329623315"); + t("-443850607", "-1", "443850607"); + t("-0.070884", "0.0000000000000000002106611401", "-1.49325042548484e-20"); + t("15510739.6998", "4.13", "64059354.960174"); + t("-1182.8", "0.00000000000006116702878", "-7.2348361640984e-11"); + t("0.000000000000000024429766", "1.492", "3.6449210872e-17"); + t("-521641.171", "0.000000044916564267", "-0.023430329181534636657"); + t("-1.4", "-50.3861389", "70.54059446"); + t("-906235823", "169450901242", "-153562476945135592166"); + t("818.5", "-0.0000000000000002572", "-2.105182e-13"); + t("0", "2", "0"); + t("0.00000000000000000723208622905", "7281.27407", "5.26588019315858457335e-14"); + t("-8.30486506", "-1110043.7", "9218763.139203122"); + t("1.8", "0", "0"); + t("-0.000000000000339156493611", "-0.000000000000000000167265", "5.6729010903843915e-32"); + t("0.00000000000000283", "4.074", "1.152942e-14"); + t("39.85", "33086328", "1318490170.8"); + t("4.1183805089", "-5.126069", "-21.1111026568765141"); + t("-464.2025675", "0.00000000000000000106831881858", "-4.9591633849340270415e-16"); + t("0", "-0.0000000000073", "0"); + t("-0.0000002358363833", "-37968.0", "0.0089542358011344"); + t("3.4", "-32545254.52", "-110653865.368"); + t("0.000000247", "12.88", "0.00000318136"); + t("-446908", "0.000000490399599", "-0.219163503989892"); + t("-0.0000000015", "91", "-1.365e-7"); + t("794881.3", "45.2898548", "36000058.66023524"); + t("5", "3046563.8", "15232819"); + t("-95094833817", "3.101", "-294889079666.517"); + t("-12786.5", "-0.0000000684878615", "0.00087572004106975"); + t("66754192.630", "7", "467279348.41"); + t("414951476.81", "-12.875", "-5342500263.92875"); + t("-2.486307", "0.00000000000131610556936", "-3.27224248983875352e-12"); + t("-0.000000000000000477405019421", "-1.1", "5.251455213631e-16"); + t("-367046.223", "-0.0000129", "4.7348962767"); + t("0", "0.000000000000093338247", "0"); + t("0.3341376", "-8", "-2.6731008"); + t("422580779", "-10829.0", "-4576127255791"); + t("-11.6639", "-56.51836497", "659.224557173583"); + t("-1", "-36577.4", "36577.4"); + t("61.5", "-68269.0", "-4198543.5"); + t("-18.10728", "0", "0"); + t("531751766", "41.50116", "22068315121.04856"); + t("-7.63315110", "3", "-22.8994533"); + t("1249.58475875", "38582.13", "48211641.6081111375"); + t("-2", "0.000000000000001022", "-2.044e-15"); + t("10.750", "0.000000000014145865", "1.5206804875e-10"); + t("14", "0.044276206", "0.619866884"); + t("12175855.915", "52.1893", "635449397.1047095"); + t("-1", "-0.00000000000029721", "2.9721e-13"); + t("311354.171224", "194857.1428", "60669584203.5706187872"); + t("0.0000008188", "6375.414052", "0.0052201890257776"); + t("0.00000055577528074", "3", "0.00000166732584222"); + t("526170.543", "6065.11546", "3191285094.94589478"); + t("0", "-27078031462", "0"); + t("0.0003450371", "4044.753", "1.3955898453363"); + t("0", "-5.681398758", "0"); + t("-2830933", "-1", "2830933"); + t("2.8", "14.36338836", "40.217487408"); + t("725.6556", "-0.000058977271", "-0.0427971869738676"); + t("0", "0", "0"); + t("591.1", "-182368.115408", "-107797793.0176688"); + t("1", "-8.44", "-8.44"); + t("-48988695", "3.99", "-195464893.05"); + t("-54145231.29", "-164.1", "8885232454.689"); + t("1.9615", "370.5", "726.73575"); + t("-2317170.34468", "-0.0000117290196265", "27.17813645069548986202"); + t("-3865301765", "9.90928729", "-38302385651.92906685"); + t("8.9648", "-3", "-26.8944"); + t("-10645.1", "-4208", "44794580.8"); + t("-390304.9", "-9.540", "3723508.746"); + t("0.00000000043946", "-0.0000000000135", "-5.93271e-21"); + t("11.167962", "907.089236", "10130.338118257032"); + t("328719912.6", "1.13", "371453501.238"); + t("8.0902", "3", "24.2706"); + t("-0.0000000000000000000103885880", "54949757", "-5.70850386173116e-13"); + t("-60096046", "147.9066", "-8888601837.3036"); + t("-1.1", "-4", "4.4"); + t("-2.3781033", "1.488", "-3.5386177104"); + t("18.64", "-13492494", "-251500088.16"); + t("0.0000000000000000078080114", "1362291", "1.06367836581174e-11"); + t("0.0000006699", "-0.0000000000000059", "-3.95241e-21"); + t("-279.40", "-4199.537182", "1173350.6886508"); + t("-346081282.623", "5715.5169", "-1978033419605.4328287"); + t("26098.51437", "-0.00004277160560", "-1.116275363379572472"); + t("-0.000000000038243914682", "6258350.6", "-0.0002393438263964435092"); + t("-0.23215784", "1.7", "-0.394668328"); + t("270.08569", "73.4", "19824.289646"); + t("0.000000000000000253826", "-1", "-2.53826e-16"); + t("1773.911", "167", "296243.137"); + t("-609057.1664", "-2", "1218114.3328"); + t("178326076.8", "-299396.226", "-53390154391306.1568"); + t("-99153591.8357", "-67230.718614", "6666167232273.3544197198"); + t("0.0000000000001596", "-0.00349909609", "-5.58455735964e-16"); + t("1.84", "0.00000000003464", "6.37376e-11"); + t("73.5", "0", "0"); + t("0.000000000000000049", "-198604", "-9.731596e-12"); + t("1052854077", "2.8", "2947991415.6"); + t("28.3", "5964", "168781.2"); + t("2085.7", "-338.192", "-705367.0544"); + t("59.12705", "-0.0000000000016294", "-9.634161527e-11"); + t("-0.0000000000000629", "-0.0000133901915", "8.4224304535e-19"); + t("0.000000000000000000010713336246", "12.8722", "1.379042068257612e-19"); + t("0.000620507896", "3.9", "0.0024199807944"); + t("3", "9.6", "28.8"); + t("-1", "7", "-7"); + t("4.07", "4", "16.28"); + t("-2473.25538", "12.3", "-30421.041174"); + t("-1310633", "-9", "11795697"); + t("-3.90", "3031.9", "-11824.41"); + t("150.0276", "0.00897", "1.345747572"); + t("2", "-8.8", "-17.6"); + t("-3030148.8", "229674", "-695946395491.2"); + t("2", "775.7549", "1551.5098"); + t("-613183.18515", "-3", "1839549.55545"); + t("-0.000000000001224", "367.376621", "-4.49668984104e-10"); + t("-0.00000000000000000737581", "1.3490", "-9.94996769e-18"); + t("0", "-1.15490644", "0"); + t("8.437", "-12103106905", "-102113912957.485"); + t("155.8091088", "3.465", "539.878561992"); + t("179142.3", "0.0060", "1074.8538"); + t("-301.3766", "9.6052", "-2894.78251832"); + t("48.15", "518165.306", "24949659.4839"); + t("4387518.42726", "-8069", "-35402886189.56094"); + t("-28.3", "-77.67", "2198.061"); + t("9", "0.00000000000001022", "9.198e-14"); + t("-1071.62294", "0.0000010", "-0.00107162294"); + t("-4.15", "-3", "12.45"); + t("-661.167", "453", "-299508.651"); + t("-104436", "-1098478.95443", "114720748084.85148"); + t("0", "3.630588", "0"); + t("0", "-13181687.0", "0"); + t("-1.111", "-3.78770", "4.2081347"); + t("0.000000042325027395", "2.89323850", "1.224563987727687075e-7"); + t("-21.7", "-0.00001926174637", "0.000417979896229"); + t("28151356.2", "0.00000000003236052", "0.000910992525337224"); + t("0.0120", "-862436.56", "-10349.23872"); + t("3649.71055", "-692509.6", "-2527459593.09628"); + t("-3", "-1", "3"); + t("-1135.91888551", "12.37808265", "-14060.4978485386674015"); + t("1", "2172752.822", "2172752.822"); + t("-0.00000000000001091997", "-117.1", "1.278728487e-12"); + t("-605.91910660", "2036476909", "-1233940269312.8094994"); + t("-85793626", "-403556966", "34622615410698716"); + t("387.034155496", "1.51", "584.42157479896"); + t("-212937", "7812.350", "-1663538371.95"); + t("838667.59", "-297101", "-249168979656.59"); + t("0.00382632083", "0.000316896", "0.00000121254576574368"); + t("0.000000000000002582", "-295757466.2", "-7.636457777284e-7"); + t("-0.000000000000798713", "21.52", "-1.718830376e-11"); + t("0.00000974", "-2.9", "-0.000028246"); + t("0.0000000000281", "38.82", "1.090842e-9"); + t("-3.237", "16967081.13", "-54922441.61781"); + t("9.8", "-0.0000000001333", "-1.30634e-9"); + t("5614.9", "-76.1668", "-427668.96532"); + t("-1.8", "3545.0927", "-6381.16686"); + t("0.00000249806256", "-1131.1175", "-0.0028256022777108"); + t("-0.20706", "11338.58322", "-2347.7670415332"); + t("1908.3417145", "-138.575", "-264448.4530868375"); + t("0", "0.0000669436", "0"); + t("325.22245849", "-14504.56", "-4717208.6625157144"); + t("-13.8825", "0", "0"); + t("0.0000000000869261985", "1.1243", "9.773112497355e-11"); + t("2588680", "-2.639437", "-6832657.77316"); + t("847973030.3", "1300.4", "1102704128602.12"); + t("-669.7", "-1150.41", "770429.577"); + t("-1", "-6.761867", "6.761867"); + t("-4", "-128.68", "514.72"); + t("-0.0000000000000000148", "-389336", "5.7621728e-12"); + t("5.1", "8.1", "41.31"); + t("959895377.84", "976.5", "937337836460.76"); + t("152", "-1325188.6822", "-201428679.6944"); + t("-1013851164640", "-116895", "118514131890592800"); + t("-0.555030", "0.0025719815451", "-0.001427526916976853"); + t("-8.61456", "-0.000000000050", "4.30728e-10"); + t("-0.10822", "-42439", "4592.74858"); + t("5", "248", "1240"); + t("1.00560719", "-0.00000000000000538", "-5.4101666822e-15"); + t("-0.0000000000000000880", "20.26149480", "-1.7830115424e-15"); + t("-215.544104755", "-4060438.71", "875203626.65949706605"); + t("0", "13031.6", "0"); + t("-0.0000000000000047877659854", "-208.19", "9.96765000500426e-13"); + t("-4", "-3160383", "12641532"); + t("-0.00104402960", "-6", "0.0062641776"); + t("-6", "-221362529.2", "1328175175.2"); + t("-5658.7", "-0.000009428149284", "0.0533510683533708"); + t("-3", "-0.0000000000000000171257563600", "5.137726908e-17"); + t("1577941089.0", "-0.0000000000000054178560", "-0.000008549057596685184"); + t("-3", "-19154.88287", "57464.64861"); + t("-5.3", "-0.000000000000000094150109", "4.989955777e-16"); + t("-275.9", "-618029.6", "170514366.64"); + t("-0.00277412", "-2.0", "0.00554824"); + t("20896.13", "-2", "-41792.26"); + t("0", "144.50", "0"); + t("0", "37399", "0"); + t("0.0000000103050173", "-6.752", "-6.95794768096e-8"); + t("-1679844", "0.00008795", "-147.7422798"); + t("1731362.632", "-0.0000000010867236", "-0.0018815126323525152"); + t("-116536", "8818.8637874", "-1027715110.3284464"); + t("112359.12", "-6.3736", "-716132.087232"); + t("0.02767509", "4.002781363", "0.11077733447134767"); + t("-942581.9", "7.504907", "-7073989.4993833"); + t("6603793", "1.604", "10592483.972"); + t("91689.093", "5", "458445.465"); + t("4351694708.6", "0.0003242690", "1411119.6914630134"); + t("-2.38", "-39", "92.82"); + t("-759.5", "0.000000324", "-0.000246078"); + t("-6.1623", "-10.1485", "62.53810155"); + t("1819.975133", "-1918.4931", "-3491609.7348320823"); + t("-544", "-2373759.39656", "1291325111.72864"); + t("-2143.2", "-0.000000000000000000162130", "3.47477016e-16"); + t("0.621559060", "53.8", "33.439877428"); + t("-4624.6", "0.0000000000000190537313036", "-8.811588578662856e-11"); + t("-6", "-50.943", "305.658"); + t("-3021.479", "3", "-9064.437"); + t("-965", "-0.000415509858", "0.40096701297"); + t("0", "6465897.6979", "0"); + t("74528068.573", "-119403349", "-8898900982117850.977"); + t("64.56", "0.000000017086", "0.00000110307216"); + t("-9626.07", "-1051902.812582", "10125690107.11121274"); + t("1.4514", "-1", "-1.4514"); + t("0.00120840179209", "-492240", "-594.8236981383816"); + t("-1.163", "-3.5", "4.0705"); + t("-390918.9935", "-3.9645296", "1549809.9209329576"); + t("1130.013737", "3", "3390.041211"); + t("-5", "-6733821263", "33669106315"); + t("27774.358123", "-0.0000000000000128441670", "-3.56738494049618541e-10"); + t("0.363631323", "-3819136980.1", "-1388757832.7919876723"); + t("-0.0000000065598472", "53857.08", "-0.000353294215438176"); + t("-240695", "2", "-481390"); + t("0.000059", "0.00000000000017987993", "1.061291587e-17"); + t("37.17", "-61.7668", "-2295.871956"); + t("1.475572354", "266461086.2", "393182612.2135309148"); + t("-0.000000000003907", "-31.5", "1.230705e-10"); + t("-0.0000000000000000000894018", "0.00000000000000001599913222", "-1.430351218905996e-36"); + t("0", "-0.00005850856211", "0"); + t("32.75", "-2.57293", "-84.2634575"); + t("0.00000131", "43", "0.00005633"); + t("-129602.62", "-0.000000000000000123490", "1.60046275438e-11"); + t("-2941.6442", "2.013048311", "-5921.6718883729462"); + t("1.01983639584", "10710047", "10922495.73175700448"); + t("0.4077750076", "-3", "-1.2233250228"); + t("0.359", "207160.173586", "74370.502317374"); + t("-26222.646879", "9.8", "-256981.9394142"); + t("-2", "-1.1360", "2.272"); + t("6717280984", "564735824499", "3.793489214890694027016e+21"); + t("-7", "0.000000000000000000179598", "-1.257186e-18"); + t("-0.000212", "754.3", "-0.1599116"); + t("-8.6", "-44061.183", "378926.1738"); + t("0.000000000000000000013", "956", "1.2428e-17"); + t("-3", "3.8968771877", "-11.6906315631"); + t("-4485.1947117", "444609963508", "-1994162257095211.5806436"); + t("0", "-3353199.6579", "0"); + t("0.0000000000000000000293", "-4", "-1.172e-19"); + t("-225", "5.09648", "-1146.708"); + t("0.00000036757", "0", "0"); + t("-78694.836", "-43.8", "3446833.8168"); + t("0.000000000000018028989162", "495", "8.92434963519e-12"); + t("-4036233", "-0.0000000000000000000134620360255", "5.43359140533119415e-14"); + t("-2.19", "-481624.5154", "1054757.688726"); + t("-6", "-33692.483", "202154.898"); + t("-0.00000000387466078726", "137145711.9", "-0.531393112039787150394"); + t("-52.6685", "-107972.8", "5686765.4168"); + t("-7.137137210", "3.06", "-21.8396398626"); + t("-174.1619", "-2084784202", "363089977710.3038"); + t("11", "-0.15", "-1.65"); + t("177.3211", "-85578219.525", "-15174824022.2144775"); + t("2", "-1", "-2"); + t("-681.685707574", "222753546489", "-151847908952971.868407686"); + t("2225288.04", "-2945.03251212", "-6553545626.6317910448"); + t("-829419822664", "0.000750870", "-622786462.24371768"); + t("-3.887", "-0.0000000000215299", "8.36867213e-11"); + t("14780708.1", "-2000820.86", "-29573549092050.966"); + t("-65280872367", "2756.0", "-179914084243452"); + t("-1.1", "-16652196529", "18317416181.9"); + t("6153.32891899", "3.07", "18890.7197812993"); + t("1.6664", "10.5", "17.4972"); + t("-335.16960", "25.16", "-8432.867136"); + t("20.7", "834", "17263.8"); + t("8029.51", "-1", "-8029.51"); + t("3544067.44", "0.00000000000000000108040", "3.829010462176e-12"); + t("-0.00000000000000861840983", "3", "-2.585522949e-14"); + t("-1", "-5.4071", "5.4071"); + t("-0.000000000000014799305202", "-77.4875919308", "1.1467625223519416640216e-12"); + t("0", "-31045268779", "0"); + t("-437", "640.03", "-279693.11"); + t("60", "0.000000000000000371281463", "2.227688778e-14"); + t("-1", "-0.019533338878", "0.019533338878"); + t("-1117.048", "8.967", "-10016.569416"); + t("-0.0000000000001992331", "17762516", "-0.0000035388811264796"); + t("-1.209", "-3960.47030", "4788.2085927"); + t("-994748.5", "-10809803.2", "10753035518495.2"); + t("-3.0521", "0", "0"); + t("4553015.460", "-6", "-27318092.76"); + t("0.00000000403775332", "0", "0"); + t("10628.68130", "-1.196558", "-12717.8336389654"); + t("-0.00000000003389", "-113275.58", "0.0000038389094062"); + t("0.0000000000000000000810", "-0.000000002954", "-2.39274e-28"); + t("0", "0.00000002678", "0"); + t("12309", "25980042.9", "319788348056.1"); + t("-7.6", "0", "0"); + t("-61.22", "-349.3", "21384.146"); + t("-1.845209", "0.000000052784913420", "-9.739919730680478e-8"); + t("395.326251", "-371872028", "-147010774681.007028"); + t("332.72", "3715", "1236054.8"); + t("-1681921.54", "76348.91498", "-128412884660.4906692"); + t("517583042", "-13.9", "-7194404283.8"); + t("-21.723616577", "-0.000013157028", "0.000285818231564853156"); + t("-116.13334149", "0.0000000006536", "-7.5904751997864e-8"); + t("-4.1", "-294.0876", "1205.75916"); + t("-22.05", "-6.7", "147.735"); + t("-22.9", "-0.00000217178", "0.000049733762"); + t("-50.5", "0.012432393", "-0.6278358465"); + t("-2", "-0.00000000000119764950", "2.395299e-12"); + t("19381.0141", "65.916071785", "1277520.3166816971685"); + t("-4.90", "-22.5701", "110.59349"); + t("0.00000000000192902409442", "289522860.5", "0.00055849657378990048841"); + t("-27006298.37", "-8164.7", "220498324301.539"); + t("-8776869", "-143972778", "1263630212072082"); + t("-79325483.3", "248065.2", "-19677891879911.16"); + t("-26.2", "28441.8", "-745175.16"); + t("18.71", "97792.4647", "1829697.014537"); + t("-150.68501", "-1.3460", "202.82202346"); + t("-43.0091494663", "-5.6724", "243.96509943264012"); + t("12.359", "-1.261", "-15.584699"); + t("0.0000000048694525", "-13", "-6.33028825e-8"); + t("-26799", "-3.0401", "81471.6399"); + t("0.000000000003271187802", "0", "0"); + t("1", "0.0000000000250081008", "2.50081008e-11"); + t("23.590033588", "0.000000000000000880594309", "2.0773249326711650692e-14"); + t("2.34", "-35556883", "-83203106.22"); + t("127410324", "48.0", "6115695552"); + t("2.4", "2.0", "4.8"); + t("17", "-0.00000000000000000467960391085", "-7.955326648445e-17"); + t("-5827035", "63.01", "-367161475.35"); + t("-452352446648", "13167459.5", "-5956332520963450756"); + t("0", "27.51619908", "0"); + t("-6.8253", "-203490405", "1388883061.2465"); + t("-663513.1", "235798", "-156455061953.8"); + t("45846991454.7", "0.000000000000011371170", "0.000521333933819940999"); + t("-6940453.30", "-0.0000000000000000000429869089", "2.9834863373180437e-13"); + t("-299.7692790", "-2.0", "599.538558"); + t("-0.000000000000781997707", "-0.00000000002498", "1.953430272086e-23"); + t("-211968.876", "-11448", "2426619692.448"); + t("-2", "224979.5", "-449959"); + t("0.0000000000007372", "3", "2.2116e-12"); + t("2.14", "-96.5220369", "-206.557158966"); + t("246.3484", "-119174406049", "-29358424251121.4716"); + t("2301100.91737", "-431951.5", "-993963992909.347555"); + t("-13819448.15", "0", "0"); + t("0.0000000155919108142", "8.51", "1.32687161028842e-7"); + t("124616457", "513907736", "64041361285211352"); + t("-5298.3584942", "-4.1932", "22217.07683787944"); + t("158463114", "0.0000000000000000001405398", "2.22703743489372e-11"); + t("-65667302.5", "7", "-459671117.5"); + t("-1693481.437", "-27743783", "46983581502656.171"); + t("-0.0000000000000003099934391", "125", "-3.87491798875e-14"); + t("-0.000000000000004272052", "0.0000005661", "-2.4184086372e-21"); + t("12.95933", "209420271.72", "2713946409.9091476"); + t("3.1", "-1.31573054798", "-4.078764698738"); + t("0.000086866", "-103057641552", "-8952205.091056032"); + t("11.1", "660.353292988", "7329.9215521668"); + t("-92.940180", "-1", "92.94018"); + t("97808795959", "-97", "-9487453208023"); + t("0.000000000000000388699", "-399", "-1.55090901e-13"); + t("227578760.552", "-40082.64751", "-9121959239968.50902552"); + t("-4.31547", "-29.771127352", "128.47640695373544"); + t("27.8", "60.0346682", "1668.96377596"); + t("12.7", "60805396.70", "772228538.09"); + t("6.808549", "434235.18", "2956511.50055382"); + t("-0.000000000000000000764", "798867", "-6.10334388e-13"); + t("0.000000000166682635066", "21.7", "3.6170131809322e-9"); + t("-17.0856584365", "-73.70395", "1259.280515120874175"); + t("-0.000032761108", "137.87702888", "-0.00451700423385679904"); + t("6.7467", "0.000000000000000000017375144", "1.172248840248e-19"); + t("1.0", "4", "4"); + t("2791.3", "372.0576", "1038524.37888"); + t("0", "-1.1", "0"); + t("-67196.498357", "36318.97052", "-2440507642.87511143564"); + t("0.00000000484838500152", "-0.00004296", "-2.082866196652992e-13"); + t("-1488.65084", "-2472469.6620", "3680644039.21081608"); + t("-0.000000000020", "-9.9", "1.98e-10"); + + t("59429490631462462063898399891833", "85.00891132032463441584595955", "5.05203629890205609747397099201262363916734883085091009335515e+33"); + t("-0.000000000000000042109349317791897577655162141761006017167", "-13008827246961207056988713615056579178448396076639.2633976291", "5.477932507570985534957063193452340625430871365299670940723162464475095465880668702087454656216987597e+32"); + t("8591855.554373470161526044552421978378391766637549711729320", "-4.18144454943", "-35926367.5773248178055078206847122253956635626957707604812328535202876"); + t("-2283433141014849078.33114178969776355920", "-453.97", "1.036610143026511036089988438269093722970024e+21"); + t("-834090482593334176100123.7933568971710257756", "-2311068.681", "1.9276403914416302737519348190500409072951706328939836e+30"); + t("189532.2", "2968613550973672055370920.6", "5.6264785726585220673297239734332e+29"); + t("5.5765", "206791541", "1153173028.3865"); + t("223004397.925983046564773982957421494273449", "-0.00000765764399", "-1707.68828752147254136863163630226113151989615142151"); + t("-9", "-861605.04321559065136010082968313802", "7754445.38894031586224090746714824218"); + t("0.000000000000000000028090298007095127212699390661641605", "-6917964065283873879.11378929124954598", "-0.1943276721961993069547944346297165198267413742521737520171142577284979"); + t("-12902.95204428144349964281942884855605291385221512", "936511255610118037649.1", "-1.2083759820067154006199526430520916600744894425420426553143497592274392e+25"); + t("0.000000054421393267623019090", "0.0693540337668146867938144", "3.774343146319828330922834963772562065116896e-9"); + t("-0.00000000007483922", "11963887185334360.01202905021298539073645325022668", "-895367.9851184189424994447352806605141113868134295543896"); + t("-136818356017962729836947190424992612288254", "0.000001250702751", "-1.71119094258963391622539632506259119343595682786754e+35"); + t("89886141515.402264741", "165920325588054483132342147189817", "1.4913937866089484761163201125053970911515450613342397e+43"); + t("-4910559.69867254476135299557110880352698481", "-0.000000000000001251373615473295746877725841601861845423548", "6.14494484412532005943449278569391549262463086794696425713068030612078654982181230588e-9"); + t("188388334026044880874021952902236669508901633565820006", "-1428610610603915751990.6", "-2.691335729036024155624090667679961618627273975496253699574106150646158039436e+74"); + t("2569238997875.3944611244282198384307876980880850", "-45354701.13646736794503189060", "-116527066896795434703.141029468202286044275680813636330729593599972883501"); + t("-20273871998054251005", "-0.00001018031347", "206394372190847.50529696253735"); + t("0.000000000127882266384995374972957752031634640610096", "56084430050054721499878916115459816143192971582.9", "7.1722040237117373866688717282573432808847848059761445842371981626319357370527308468409584e+36"); + t("954627502168195877866647607616261900931", "9.96209474259629834949998607", "9.51008962048762055845159388440432218351076192328571371885622003117e+39"); + t("27452502565473996463690067929.18801932606917287121704780", "-15999511778834005759916561695256821.291408", "-4.392266381547719678372690910805800180664096055687896418712826017984317410615883824886612653024e+62"); + t("24739272583405.47186561318831947000688841802596024659835438", "0", "0"); + t("-14628477765152447836551575115758391.03361640644696947989", "1896549844807094292937664785889813670098706728.8", "-2.7743637235263904499250092914009953677085505785952534916815852412079339245487773243303684333379283832e+79"); + t("-0.0000000065376926", "400694118953983940534743481756583594", "-2.6196149763489805485528325035782515637752044e+27"); + t("6159556.6345747363", "12428.3903194610108", "76553374049.32049544464848654145204"); + t("1", "-214152.677228898078143751453160882566438516677", "-214152.677228898078143751453160882566438516677"); + t("1234245458508975352.84372029387871714", "711.09788699", "877669337572736089357.1591886677375895858960086"); + t("-12435092008252.828827", "-0.000000000000000130972832307119388", "0.001628659220320498210781727802616997876"); + t("1222155005674.47827107178853812873657", "-1.9217613579329307675966802225522", "-2348690263309.514070047950271986297573047714307144600821921806873954"); + t("-9610326782.75790", "-1925856563138573766.221666413429", "1.85081109084807161320054127390660041302158391e+28"); + t("1897933.1084909834795612591951194123752666123", "-19444.86721593176768385769", "-36905057279.327795521442821058258453663270782572671411150172721603587"); + t("0.000584193054195683632690208", "-15427224.032385517626932779704097", "-9012.477125240345688831570386428613444841606254309382176"); + t("-9193123344.97483292546402603464388933977", "3", "-27579370034.92449877639207810393166801931"); + t("-208355", "18.5077", "-3856171.8335"); + t("0", "-7.9", "0"); + t("-146.9974821", "27.85613660690160", "-4094.78194224817268246136"); + t("0.0000002221395758167297538432", "-11018022952341415341382543191308.248305367013916352", "-2.4475389449721144325377299337884145675514764946137036517351977553240064e+24"); + t("-62634425863308865890231971109828114770592016347.2857222333045", "-0.0000000000044191162667", "2.7678881018796339994185288016784587422371771822944265151385376844431015e+35"); + t("0.014785725196930589141008331862", "1405730020396633.72", "20784737782660.25819955773732132563645741958664"); + t("3060880958477929473167827.136432332645114184906595927797020", "-134990224.755007177950183445", "-4.131890085332574931410011369432785413898866996911658019131150911202211096837243339e+32"); + t("-251157.56", "-35553.75153", "8929593483.1210668"); + t("10660825.6584256928", "-54.80641419272238648411", "-584281626.672080870616452029619482941408"); + t("0.00000000000000000018196806510154644625549186906147312734531", "290466772346954491087868523893813560578350699536244189", "5.285567654026668587345538632825206167793448119823731989523008725260266169443990119026948390359e+34"); + t("801946936195133455122.3263199289", "3353455956475898285353850471499087737905097359235396953.528", "2.6892937299611674351748616442698675657013699635861635172559630870783247800626545335641592e+75"); + t("88876291341359997.22", "-242985336224765018278774996045975", "-2.15956355339905308693512776069018053139845369921895e+49"); + t("-677.8706245402", "-40041.8855", "27143217.9316521785471"); + t("3.1852520702012", "0.00000998870874036575237809441602188548308619567919990770190850", "0.0000318165551938868335179942506676244968068581347935045219680140052189902"); + t("-2897031868709978067512290.19826378134251899155435029", "-0.0000000000000313426136", "90800550447.862773034512424935249089493462002949664538517944"); + t("-286245211287.816038991926811942762853058522756387871", "-905725.51698541", "259259591978255100.08416583456412844730858064475954566698860796211"); + t("-301283745846510635986864779646783.59226306843", "164455867753899", "-4.954787986333307027587976990843711993792791415951383630857e+46"); + t("16627939773", "-24446.50", "-406494929660644.5"); + t("2835613541302657637165162939561661439198237", "-34702274210562114517526690656890036690211485", "-9.8402238665467925464317665495284869217720281504532926830801758242091305082784369151945e+85"); + t("0.000000000000167329000479220734904842317239446253923254", "-335462.843", "-5.6132662217107750155727738207852552086794690651122e-8"); + t("1606900543967463817538016297544283302866330961.38117", "-12172415089417043266077235.5931339752547820885496331722", "-1.9559860428582011548778770036179464667831089769951903599695351323242935536918541220406695361968160447474e+70"); + t("25175391597018424433550189069315474558138086224811394.9498", "2697842514071148.65", "6.791924175882585620347727294751149080055684613881481427569426305249508777e+67"); + t("33605644614556574.500804536703659893409117374", "-32.543409918351171133101366277860678601667282494", "-1093642268261945046.079483918411013199812861395190797870188216612955697572700923777661450756"); + t("-16194637333856709349021519708.8552324881761540256020238975", "-468.317375400951782165492196622874246631857734334382", "7.584230051762041449005379580598839525796458346850505580761259136785876093027076066542485326077054219893845e+30"); + t("45938105933592236851533187176.70670204189811056", "-23728.6", "-1.090046940455836751355290385241202650071383506234016e+33"); + t("0.0000019359500318287540988972385182980431073131086249", "-1.433", "-0.0000027742163956106046237197427967210957727796846594817"); + t("3.383292222691", "-0.00000000000000000008416407858503881", "-2.8475167250671594974339763771e-19"); + t("-1781216226076936151337005862078252102700230837", "-139003643961.53840777847576996", "2.4759554610811353724544585499901643072996118138112041996180785490331025652e+56"); + t("-4942215729757062263164723577.197780606517", "-15241705.579", "7.5327797060859772211128133542568249856768162658343e+34"); + t("20212448898283508798.6625218057881201405", "0.000000000000000000473337907308896740021174588136160473489005777205", "9.5673182631015315198993602152061224371243489547543953762429365302559862133611162973025"); + t("0.0000000000000000000336083585075308914988259705527435231286920", "-1042029834722073772731648833.0978", "-35020912.2608826168412442748054117197175486895048242174316983271784220776"); + t("2376653285350901814422.788590453876", "-7116898082702.215", "-1.691439920976175340680854757410757210391140053534e+34"); + t("-0.0000067077602282", "10325935005362413727223741709915.3224340753", "-6.926389614794815252662513824455946141306951378398346e+25"); + t("118620396179863704912953340.8484888231431511", "0.00002664482432944840555300828814", "3.160619618102041148915830017998160333002812044061355761312703976357954e+21"); + t("-0.0000000000152038475299141990408716170165065", "0.000000000000005856774815228245375399878344009978104812414293866282", "-8.9045511307771647940461821641351376995341987855772716940834996589432243659697783833e-26"); + t("-552929555032574543198346", "0.00000000031628803556881", "-174885002769189.22345730619750676118826"); + t("0.000000000000000045838", "3539579713.731326460", "1.6224725491801654227348e-7"); + t("1392529024903490704995506782982906.381429", "-696.803141131", "-9.70318598668840847367530799623705904459432004456199e+35"); + t("0.00000017046264046382452", "77820777096586290650583567570533323989282", "1.326553514683081867495692236827890756347852656781320879464e+34"); + t("173.2", "400230281235477723305446756183676238679630391", "6.93198847099847416765033781710127245393119837212e+46"); + t("441.339801980", "3859926956832539877913158087979570115173.37608", "1.7035393987857371577386465661853388929161435925152686384e+42"); + t("146444036588433930865962234014095372651938826216413", "-52287041949860150983876138.09252718579", "-7.65712548440629977355786783708824277254343945936126868688503521615280343003456839837127e+75"); + t("-152996991626635397079841283901340.65158799", "139164451.4055465586500905725256511816907743", "-2.1291742406419715449781823729219758981469966625530964344454535418866326578427680657e+40"); + t("-2392095943969007513831013778238", "283213.66941826693939894680290224", "-6.7747426989201568951320097088428601075588412800688116615345312e+35"); + t("-15192560288102281367737239879605.47240096086", "-81553445736510122", "1.23900564105440798918085016560369292282227123306201591582492e+48"); + t("1.7067661013360140299015089144175628", "-8518082392971818901480808577069938345874733", "-1.45383742767114563412540521449653172561766842289564535605710831784007839607324e+43"); + t("111116813960956208515375359292296052638950332201721672", "-6723639335232846900768096240894018745358463215413", "-7.47109381153635523540473499319528741906993971058857734750058361188185043050515216086975306279606530536e+101"); + t("-19017520.49675261317806237143645102654220495050", "4439261178196804.5636234243239638305", "-8.442374044679588557398641259522603028251217372386419857709859483039768004289025e+22"); + t("17312453768.05379", "1726.44336801935101862147113581125657128654142147602", "29888970991998.0896280136870221704774967797321308901016337045551158"); + t("-2", "-8.63876", "17.27752"); + t("734608.2", "0", "0"); + t("4.1351657034625927353146715451605855050687982255845069770", "29034498780299324669067501513285520", "1.2006246357352024765485891656111571028229380504313388083084112136514462841267544463307304e+35"); + t("8113870024531627718699652079910.7068190690295904975254176585", "16923534495569343509614671152502455712381.505727413", "1.373153592527270771522358333649474524182371877317191394431842566433920202044363434189424789373922626777224605e+71"); + t("-10.01", "-4864429445729841.069760518121786", "48692938751755709.10830278639907786"); + t("-2257142436339514797101935880.78", "361.115", "-8.150879908987438859554655755878697e+29"); + t("2334599.31164827194227", "-29960204503173960913.6", "-6.9945072809951386426110474550748535657872e+25"); + t("0.0000000000000042471515826788460724024393725389035009593598059706180678", "828398091382.612675070213", "0.0035183322649037987809384707757042363075619742175811901626183872501809043713944414"); + t("-0.0000000000000000000284493127383335026590175755701910596367998889566726", "-0.00000000000000000013237", "3.765835527173205746974156478226190564123201301194752062e-39"); + t("-0.025286262", "-0.10797436581647216600797099911020807463243214320798554", "0.00273026810331915910538504877190248824967123287037864285665148"); + t("-2.16564935772054852403", "123868749404533277771925133166764554.44147780538237283827", "-2.682562775895750704487504519843216927715513029094342900139628307846103986281e+35"); + t("488112856156098659519479388744402.61", "-3114334168535743226695852106494538175980162249914143.70", "-1.520146546028510353469309736526975923164123845906295275264771051373672808879616446195057e+84"); + t("13062458273.90637045335784972", "-422551949801626.741267985176602715381458097174737967000518", "-5.51956721284152853764296726669744927261362132472755924039708895768532345915860615496e+24"); + t("-1774897196938188058987.040101468413944266333770483137507", "-546064776871.3594927107191784", "9.692088418156530694143698199431520418181775404052225935078568528036161040292642488e+32"); + t("17667764535653225248288857836.95612603671740964890", "-0.0000000000000000319890032591629766", "-565174177313.13507635499469894977748029671843469133582435048491574"); + t("-281835819.9184911063", "-7175814054420814885484554.4", "2.02240143761032232334599327109026978241853272e+33"); + t("0.000000000000000001503903188910", "2473558551492927739005724.481043938460207033289961875", "3719992.59354581446800290523978683389613115250358419250482280625"); + t("224371010310.537303586", "-8046248744083810452149728.077812213", "-1.805344959919976464767416627850984855572049419079495818e+36"); + t("21241841371778633003043.69805019497112440", "3019928870075002318121482.417", "6.41488500121878843990786691028203447626143414100289387726373196748e+46"); + t("-0.000000000000000017364919937061080720023417741392471545683503908", "-0.0000000000000001101", "1.9118776850704249872745782933273111171797537802708e-33"); + t("439522909103802363083392888521183473696.816065", "-2.2", "-9.66950400028365198783464354746603642132995343e+38"); + t("0.0000000000000081177461857815960900264491259569062173810350", "0.0610415335877925918303617472579311", "4.955196764565624988836180976890473307042478930774835424434663605140744766885e-16"); + t("-186798563956757871041672400714377.094855823", "-1262567588714917541983982710.193577", "2.35845812470293091731202495176066945197325419055745256762489749711235648871e+59"); + t("202739871381.909125537", "20323942031180.7301604586345358572504650", "4.120473393374958139010105109821762644139100410749336624705e+24"); + t("-0.0000000000871057582376852096451379468926610553156501430073631916", "-0.00000000000000000204556363069958967723715901466977445824097114499093", "1.78180371075520049530019591335531323553330829840490421849868550913658281328132369671225257713629597852188e-28"); + t("43650.3286859870996376890566772833", "0.00000000000000000001310330289622533562857521522228834136757813518300419196026", "5.71963478292282611553143218521780871633322080859969244917523136988043505512171959238361658e-16"); + t("-1092205601185294", "2", "-2184411202370588"); + t("5860768904954696696.24176142662833543847", "0.0000000000000048972255", "28701.506930951217005600908223400663331828964985"); + t("-85896656824567.02163635501735158916726224558523587655", "32321.39", "-2776299344922992287.4470686942774805948582718361870079644045"); + t("0.00026", "95786603846831218908589843126114668233645", "2.49045170001761169162333592127898137407477e+37"); + t("4045878451917596479346482", "-2.2547", "-9.1222421455386047819825129654e+24"); + t("-0.00007402891873793970469482766866928008041088343139", "580", "-0.0429367728680050287230000478281824466383123902062"); + t("-294517422548703614947348777318332.649869292704089396942", "-0.000000000000018464905130542546160683866082", "5438236266653724351.349152153311431266266033202633265447500622081254643984468321244"); + t("-83.506", "-8171012757524040761112.5", "6.82328591329802547797460425e+23"); + t("0", "-0.000000000000000052054568154502662326801153388437977", "0"); + t("-848457792560875.315304639536969249869368391843456", "2786837672040308423168750746536175069.979124227", "-2.364514139444808677729215519365182902026897625419714103499744958027008402375235640420961008512e+51"); + t("3114192", "0.00000000000000007442771895146280027117559688227552768887141498150", "2.31782206936893840902092874406007390124461849564067448e-10"); + t("0.00000000000000000004917302646400565894337036110048", "-422918872", "-2.079620088498342188194690499484768025856e-11"); + t("-497313848.92", "72015813415347226684601.47954307807272704460158688818499730", "-3.5814461352690899900766892687894799291942231391683303086680262807916e+31"); + t("4026.7272674898467547880850473160814529617052037657449361", "-21157682685", "-85196217784587.2940970833078499068622793775121577888984306494014285"); + t("161789945200634672.93574932528", "-8005803048483811151653134568908048072385822541265", "-1.2952584365012698158369216496463941318557463003471359935387477829065387076792e+66"); + t("-0.00000000000021548823070578223953868560097628121116323968225230682924", "-49653567182460198793826479862157.077878", "10699759340379041130.65114538401855139934323670216223964167385329900350710562551938222192755272"); + t("-5565648526946998.206396582068274786458395468246488801913", "0.0022945055453979742566004395333553200630524525428518539025", "-12770411408815.9541406930749916678604063671114068656466120089976699763004963995450912686342679576306781385154825"); + t("3.271826", "-23890.6474306628013", "-78166.0414204757505261738"); + t("-0.0000000008805699092114903173390188646922", "9284821552.25745813417849639083469216233186", "-8.175934471316238510307959904561765618357930068136953080998844682973153492"); + t("361333176.6552043788873570", "425816532338214481.0652246362221874080822", "1.538616403020706012031174663425818903103785031033415757451967454e+26"); + t("2805.024", "3138666568668923617772609.35105", "8.8040350531139788020189957723196752e+27"); + t("15516261613526.6610074517562", "-0.00000000000000000236624580694534592762621412652683109621677385955", "-0.00003671528898247448920639683215816512848818717755547603887938060370189964171"); + t("-0.000000003258489294057571", "-0.0000000000000000001263694100620034334234551033555508871", "4.117733697834092773082498224393477748428351275212341e-28"); + t("-21061048707054855665564434392186020553808698597863.879494", "181831629693595281071297779845", "-3.82956480945997219565546562178683388176250894166635033461551679226752688144082199843e+78"); + t("-0.0000000000000004150087739116129831368627055614", "-1518028660414097725821098740744462450073.304250189994494", "6.299952131211430047024557585815135401837971947761937657558761468690680184406091789316e+23"); + t("-329353403844205335310.931518048486742714840512646142", "0.000000000004737902605006197777999824176859382087", "-1560444350.041118731605073747643365481135986445785795088564232590700292190358983404458354"); + t("-36414599958286461846528123709871289767333710768520", "-11982666807671338.82516899790506494507", "4.363440182347893057208595495864483712233866372669435753275016489496855915098212851964e+65"); + t("119742066861.890807047", "22054829383.984629241", "2.640890854724681514607753859168565061327e+21"); + t("-484485733573777836334476960525005005848019789", "-14406177805616860655.8627771810687838", "6.9795876221485617831711438674257823866674330443283469578093046623068838325626182e+63"); + t("5988848948477.078723617", "-6.5", "-38927518165101.0117035105"); + t("-1.0", "-63379703.864490098873312332", "63379703.864490098873312332"); + t("-0.506613427677516177791327725446313117452", "-0.000000000000025064675288473359447414244747114622651598944039", "1.2698101061517425226884571964189454600296022874042153446180321519393920461477382268628e-14"); + t("-23042537.21970212804132180", "10390764065108.50823342162627716811120", "-239429567711406187063.05734442567122738046800108051885738416"); + t("9812550833139441428690193893295885866528739.860970333644852", "-6934084675959416258239634601815942.0149731256600469716450344", "-6.80410583641450037528576307977037672169914839765125030421279633360096772675136555394720496053502446210349236989229088e+76"); + t("0.0000347689", "0.000000000085057549281766287602723911010", "2.957357425222803877030347389515589e-15"); + t("17309197932605.95272164347202723030822567422328", "10372291249693770815173154703247665392420536", "1.7953604225558623153970783373103876250250653717733283278048673842023984171292886092127808e+56"); + t("-10.68586744857482180099209534824648355512284245440", "674588.26676653525901087", "-7208560.801031027382439380269948592059745431252505648164243884987079328"); + t("-158425376406388668464703992996848728.8980383980010724", "516624932849644105480296.4740763529887132394681136194056", "-8.184649944763013743333361097416811851476935800617569830052596874617614630479435342869900779234127425056544e+58"); + t("43701371988184830897740842", "7444696727806908941269732116534493096172849746185.16", "3.2534346104111212105848066810541857916878449567515264310528659180255182630472e+74"); + t("18985671206766137596695783", "-4918195942924959263752039745340080571253768938", "-9.3375251102824433332331539143355814981375199246602425748207454160988454e+70"); + t("-8164454926564686613685695436631269148628112649072225137", "3017566861500503598.7", "-2.46367886286161259704778334978048504960179943566519245177920238542851005219e+73"); + t("-167.140200050688164319586013710074703990054053511303270", "-124707.791051624249704808849761672566349962496678", "20843685.14424789642526902036712772659312890967899817539551993752122248668554302671208072486282553706"); + t("0.00013717932814418", "-236889624553106847157555062629.1419261258", "-3.2496359540522243673339058837639891572432570371217844e+25"); + t("0", "-7377966474", "0"); + t("-1165159893843574357027338982426", "-7258741844369034621359206819796872729971572863114", "8.457594876822935516127237999861301735400382433503942145536493041682252149634564e+78"); + t("127327741", "-0.000000000000001314349415125924728376790639", "-1.67353141912655226200255348893816499e-7"); + t("-19", "674693830910632347225468600360472778098653805584.98", "-1.281918278730201459728390340684898278387442230611462e+49"); + t("1115499473064514172110108362485045185533368299248344166641563", "26727699066738.5277545215239", "2.98147342251737349166633853134205297966348378257402631237265170730493167637686598378557e+73"); + t("9531022923010697243825538443.3659", "-10497868918011538716", "-1.000554293003294813441624977396834705527412812041844e+47"); + t("36948.619152016593259861704969912416", "-109424973578674628984651491823525807602358729239", "-4.043101674477927092300739573396847025094408695070482727807518216276085630888331424e+51"); + t("-0.000224994118800115645797961334226721592496197539765940949883662", "231860.641001", "-52.167280606449958627644387092820869098935873225250256147940687697225662"); + t("-81737025015671727638688.506795636777200442300", "5419138.800783060", "-4.42944283723002262118621171335050352165263579845818347438e+29"); + t("-1466856541.9549101", "-24128674849693158122765920.4", "3.539330455197531614891444994295155372575604e+34"); + t("3719432135548", "54707696881", "2.03481565841010488825788e+23"); + t("0.0000000000000000347350240379700980370747179429442891350492370249744117", "0.0005534400198558475169798243101266211771697229801", "1.922375239326751185420171365530525629522813111237423841789162415238003577693927327244648617996830717e-20"); + t("2248441073845808666637746763786280194954645599162114623.5", "-6334923145497633015473724024497.97", "-1.4243701399993365995217919270799399913979461349413953499228708640778427689308423183064295e+85"); + t("-2833.50779749", "0.000000000000000000027787099520949762309607915049358999802", "-7.873496316224179511483613883698024416527436609698e-17"); + t("0.000000000004441882942767312311877169439858885409", "-0.9432493370398481379786084999178021934162", "-4.1898031409738770478382967231410155261701150266906290976528356507851700442258e-12"); + t("-2107306488.021444213082463895093082025238625832167567", "-0.000000016561760020640192077800", "34.9007043445492445900173806825761285679208256730753889935834487955007126"); + t("-129070822817.42205", "336811489052744821.06", "-4.3472536026398913255504341077748373e+28"); + t("0.0055725231631263368659868273181674133608110946135789308", "-152412560828753089910310350.5653132", "-8.4932252556962839520515736693985586025569561774936573592091065011026694067884882312656e+23"); + t("68902.0767970349411722981874624462811895157551795177137623704", "0.00000000000298788286086686468161985148648212755894442142", "2.05871334339993176415426311877635990320333360195205545566288301397039058040718828895421507390094595733968e-7"); + t("88153860095637039945277243438872776.064214155", "106.735", "9.409102257307819458559166578448085753213897833925e+36"); + t("3.7075516820964288985011546648796", "23633186593.70572408884166096265287527701858061993092", "87621260708.792430109916115951342109977008394099657174865349158237730095429102117232"); + t("-35505760506401161908713691885731701346896104.7570686644891", "-5457648514664450630675291184021238402035211", "1.937779610897920137400487822865364585421914753043232864073023463191678738063333894770237751635257001e+86"); + t("-120.55403235772170", "6237.155894", "-751914.2934654306175666998"); + t("-50246944566472610231911381270921126440112308695", "425722751177060307857193841626947340", "-2.13912674790799614679030549405709134417922674778586880217918152980768287325891213e+82"); + t("8119749715097219059818517125264159.064450132566482", "560418609424712067.0940695322762258473926083185", "4.550458844211485491057203230529751310726950775388516102150563306194801442473073934282587480517e+51"); + t("0.00014717424858", "-7244528491321.3877", "-1066208037.026626286030354466"); + t("-42181198581127024501.50753334291048422600", "-0.008682426489650895544", "366235155926002047.202675730675546783334970920687585688944"); + t("-57.3", "-96900776925224476370583151961084756", "5.5524145178153624960344146073701565188e+36"); + t("1083976078583942678025084625.271006", "-0.0000000000000000534905554182086699326584150063088902383604755", "-57982482503.506901999157564033733434733806444040999020955818569250676306523353"); + t("1058587.736740719", "2.2", "2328893.0208295818"); + t("-337676088587247469427246609", "2694990217595978128", "-9.10033755458704844211026116003411819226167952e+44"); + t("-180266997707357275243150935948776784257767.114595713620465125", "0.00000000000000012929550822108208448723385741716775647229370346", "-2.33077130840613978574569769854573934386258812596377482210267408630672963476159438278046789605387340218325e+25"); + t("667863393175854.7645678", "16647944315358092755156.00", "1.11185525798577381655823461635163932295615768e+37"); + t("-2607482796153.37663635999672298", "67905.1", "-177061380021074655.829689213473629198"); + t("0.02649777513989417670980608", "-3.7", "-0.098041768017608453826282496"); + t("41727029296529241379347405093482273986363238008823.7495", "-0.002796170808176706621979157103112461500671267733114714664", "-1.16675901230889282855531874612261889002345278810932959186816789276573413038428661947418401753559128959112668e+47"); + t("-11232695034932926234846674550549966790.9183", "-535612384919640506677833697180021817295233383415483", "6.0163705767354292540256743939915265501958563028272108803751138896375435530577152378000080389e+87"); + t("3.481826810306751", "0.01981896398982153971994255430994006244", "0.06900620017226469113521762438686245737379444049353244"); + t("-500336401148192185730936", "-0.0000000015351207243732", "768076778560892.7643589222652324493152"); + t("0.000000000000000010152819846152021274527085743667507483", "2034271405274844529575.93770552252121", "20653.59109593400315620700194269765880413700716562682807038424236270121443"); + t("-8", "14804.920611063196753", "-118439.364888505574024"); + t("-7644880", "32.933", "-251768833.04"); + t("0.0000000000000400490024778789822215877572796299412810612705023875", "0.00000000000023561893047293924977558189853184387736389392033215150171", "9.436303130345939646688036612188083884147595770701765354726302304762424603125782629215278913888534265332625e-27"); + t("-669622098209324787.5786201166", "-442008.19657257", "2.95978456014644004507422179531566173761662e+23"); + t("3750095561598843110.3554570", "-0.000000000921072821137", "-3454111098.455188785930556597852894609"); + t("509.01003417", "-0.0000000000695541947", "-3.5403783020913832899e-8"); + t("0.0000000000000000635110973210625767420869099697944141102671291", "-302.6", "-1.921845804935353572215549895685978970976683326566e-14"); + t("-10277403.8756777588787330367830", "3.73924958", "-38429778.12561843210264377872295730114"); + t("-566623967.574094904804042946014964033941069", "-0.00000000000001662953909014460365351667", "0.00000942269541818623958668998623752446360099484415277625603154138912023"); + t("0.0000000000000000060428627571787342505274", "18.65854757486578220960", "1.1275104224320402610478848029208041233734304e-16"); + t("6026260424.00", "18673139236042341642133200165212521277908.5537452", "1.125291999700035578262744750920904785263182229257757399648e+50"); + t("1351407130504734.056748656589882", "-16213.40426049972577134801362523633", "-21910910127395164076.55243444398575049081525274237838315413681306"); + t("-1749812757762436212668429.46101826944561361814636104616270309", "-259646", "4.5433188330198551287450703583554958847579349723006019196120650614e+29"); + t("70245313181709005413989461536786.3825442617", "-509184726219286329641748", "-3.57678405606165250356068075267063781878365698344246156333141574516e+55"); + t("-16.20", "-83495.2179048376073493099472538", "1352622.53005836923905882114551156"); + t("17522790821382422258618581410703033443568", "5481690529703238.18676804112985115150792", "9.605451649954285042649291504450317447918361312248424196122189225108309342505856e+55"); + t("3", "-0.0000000000000000000298256458973606523936524717292889013", "-8.94769376920819571809574151878667039e-20"); + t("-57135112812568.466051", "2713703246.301287433494800761485396936819", "-1.55047741117257327421574162146466373193666197915868993431769e+23"); + t("0.000000000000000018433", "224.613695971469169", "4.140304257842091192177e-15"); + t("351655210258904818533038059328", "-317039471793459879795242832647363526701869253095475", "-1.114885821139012575684668438594527497497409491712701452561241865985548506983408e+80"); + t("-1317999447639091934290806166798244489675877673.24510838", "51973652129741187036804.3069426597647651181729", "-6.8501244798785198639385417890806274968448700953804306642353363730416792643087698202422857568078902e+67"); + + t("-838472500998941781878534497598346150189438395681961909493802795126225423951505690327678802846577883568622319410118", "-2884829948773734005744162960155700874127.0681001892763437635520740604769472972181496111013", "2.4188505821049618555759179210300843443018778137981932674088381260022683344838428233063800820435344194302980110031387348601685636929132993133036482870813353080292469079495502993056630049417824321203429534e+153"); + t("796691.919974655750", "-344177691021", "-274203585471964324.87434102075"); + t("-0.000000000000000000037241136189493487515236242635317406", "-236633306915237035867656873537286323242534.531", "8.812493209800553514615822924219854143174591731693607256359134469397049100346586e+21"); + t("-36918999197803067902650019640975752121441727061986591604616945161242737830954924822209930.0610216157567", "-630816248640.220238311747288806", "2.32891045775094316018876017621573827476363455570577127733350185252461212627985116895575049148402627634872854943933909453127151295002e+100"); + t("-356285686518395271578252895087932787716516776378851836556183.490949109645090654856023328687155015449097603555460351788748359722414863145", "536192552176752561042209607723742909268910764247931780563.2", "-1.91037731558344763167084704445859558938320679866577929319697485737868113003820206731226346686676150919266490086231386325706954806002421869189844369048659180671649946432503759091893660299023264e+116"); + t("-10868240043.323", "-0.0000006987483137538548533133640114148563911523216092560534998", "7594.1644037440686677326890935142678911031312404730399664663577718354"); + t("-0.00000000000011591017649385438295796980510866337031921451760232710693439920068628049494341909991139678975519329366780780539554769715433124600", "26133984739171981586185319", "-3029194783605.121387520277919164440375428744596566999709645269433197968011145816158998774967743687046263521357854521385482216635698201872145379668177474"); + t("-1711273540905209744011506141193.37033113722759550410761924564724", "0.0000000001293732763469758906747311439702612890496046217356893762894231050676460791112722303394750148856", "-221393064712797651093.576041646381279748254325855686348423517448454794870494445248164160406818767744894597164595179089851596941716698075867505673842006555744"); + t("-63062954745.8598353024049107700099585768452939988302739544094597635", "-0.0000000000000000007066107653369429290153271704760473112899492658449746935736601687393998875372553088763481649809909245944916440347928986666226", "4.45609627173810154902373805273164378070520471666107189671611539018934456392187448488034184668558120645401564953529878995106460890572197110823797727327567501341707822274253599872751551397551e-8"); + t("-0.05396306543212365254900360568584", "0.000000135925517648212", "-7.33495760274574245053942000380666682810971808e-9"); + t("-51311181621759783527978578699650628367670018837603370537970304306.5", "-0.0000000000000171073617238152543", "8.7779894447982604608252727389859997980275463423154981803549625152925376395768264295e+50"); + t("780360810680597937530828803485426316757997822572046380524663475663587783713055764905934635773988266249773631591980851269802869685048538490187809566", "0.0000000000021114006241457087", "1.6476543027298657092509209956166007749872751971298560901265194443520620935869459922698982198083609063920515096925628739206594316734184930365483909751507976717094242e+135"); + t("-0.0000000000000001558591643933212408712480642149933587830724439341932663613727360989832586450936995132509861377299507330923270242750447693180038078839868789871", "-899234589140276920.9563731186", "140.15395165697510406375504229464266777072446771644043491265354600675571562268623460258428521212930915552512830838365872392420849552201444571287189837930690619037363617006"); + t("-192128620208427347208760897481755790502927310252099946847941391701541372730741701901004842683652084499599551669587901.095113423628696460069833", "-150027.013347965686304316841127", "2.8824483068535959518771144524961420793873335181555629802553828843970441540984506755823649963472492988719283593979140183046911245632653583841810467259116227616668386421791e+121"); + t("-0.00000000000088119558575179620805745334627526", "-2342970366196339369130467230746566743437618438527.293007742982263818470063380858096529305084867946540343494845177603781376", "2.06461514423948373213684382167619940227586580537675167441830145669955691286212463457073538034124876268856699464885544965251476720909351479389090095755776e+36"); + t("-6635456782135376051461227670659894416124826680462504047183309508524677837974389566804395212269550349799505694436932101464692080338", "-36033.774951979165187136955049120300", "2.391005563910499861359276356470099138701070047532575485529233046218042255556441673237652214828582412128576389116490428262479007258867518065861096006448051838266614e+134"); + t("1.0795693", "-0.000000000000000006209261744497244037804821960982585015091967690457481640260325487223225820327780029749670765451353356", "-6.7033283550236685978221251810425966169333249952098001341386914040137368425931872572708312434887817265895708e-18"); + t("0.0000000003205206100151839365357713821428922286825107015046701389076172910755564034571464044704259976070021361285911146439621197151315883353504731", "181280954003418224438635307210393590651533286700798186230089972712042801144671899167602413575288941132381001", "5.81042819613101098829202896183160808144566548341644020145672547798396356491584355574818346795299101366223635188614907521125965341055497357077467758341149862217405975928504053356664898994511933823140023871980627595465353142713441016064148015731e+97"); + t("60.273280", "-1948051519028114.87884169", "-117415454660806895.9645912570432"); + t("-83193336723730904831044", "-8597513002342", "7.15255794190492657393641372686305048e+35"); + t("-20357731434704594485933.435192883517106779904094737872189392050585959795325610691798979690389882855327158774541534046886050", "57101254487124.26556892385946827693467498483828207557125700861375680904187175758285473565759248405589101", "-1.1624520034335964384881547289755586531335208559562766632031511288008463494925147406785220580646246607391536758053170339436847553410796246157934498139151632371860559137134623242512914876401966834601783673486087092780486894105e+36"); + t("0.000000000000196393242447331955075189676455271786947264076645295021258862881929479958110333580", "194877.520544633956108976283205922142563827316236038257841914758325718909245819798140", "3.82726281398572106089641076236903647054748740721743415697957940132522454065934785001420361718935697399839562856732355534966588993484025198806123215220764836635412e-8"); + t("-8071576425880681257819461150", "-1591541556785189268475083517665125202173160434133152.98399538151538621882421945398094", "1.2846249310556773308688003659431424152963795381736069812397375172279784904016650744805487687134414853173170481e+79"); + t("6215707454580399344821610342", "145319540897984402903779835609411326583090144758472486922947576644983828825850438698150473186142966520100265693", "9.03263753655802873031730925036374079283112281131923966584171630907427735951790460941752213245331152538824074995769485027917034562316597006e+137"); + t("-129348079468144673220614626836759706", "-88248178940421789818564716716211678654401184759743634646878788943183256531349288163631708018145656009375447214258101552585320093130", "1.141473246250472885515118898707262713605663944616163164881785239559268827685334536245384449464192711247404249908389352393586709492073897298343118518559610042335141978e+166"); + t("-5780259200186462371596484655187034250137478170873403737601291296553629304246338.1", "20317804349924669254706871559", "-1.174421755212405947511968636545739798982946944457429152629522410545955272538056812944623926565594717327880979e+107"); + t("-774.0", "31209403299230592237921875076234864775333333322171087161573695825372946329.47956111641", "-2.415607815360447839215153130900578533610799999136042146305804056883866045901718030410134e+76"); + t("-35300012822981309972161307966314653.5746532880996436", "0.000000000000000000330318102723213448", "-11660233261792292.2796305229097940998500752778977839907195278155271328"); + t("-372377963884127526301703864441812802765174863559283045963633022003526893443086066813180.3717468998054326701855782319548515", "0.93426382293185456943254764459757361885785459231935724261799663689196168735639052920121741580138452492", "-3.4789926011396505505944781064660804224349193623867972766690000964018527357693140898258100416659583488178405935796093105315794205956790824509036660608118406568210299647359494344226952122917410385314738577518950473221664938e+86"); + t("24266165641723085835767787003697599948414575.4598063181549354935463146230534386950113305", "-114046436224578769506685348541641847469702436631296179876858707928490406027412029206934467.22255852787626", "-2.76746971227383645895497368320257172653365323571255355106207704032170926692669369847993108061766552826817226048614230592101594822309797349385303976310250855456022415694582167365528080196393e+132"); + t("3296856412996342216590213367517526056709903701721644610.791416", "-17873043539632614693589701036988.4471469786937536273599351623416309394", "-5.89248582134006296943775735259576640781981176325731275908604121314963017378308625998703430431944837580972601701118670108255361904e+85"); + t("-579102350347312720630005129054780607559620407558223441199264163920137899902249163147321939579047776302298780448678174736222915", "-219492399337234160290652558813948662413370806048542871624923.1888570368753037439767245955297245131205931820059590", "1.27108564339563247096015910701131062607103942871909341223369812880561545119021551254208157534581993545107836369462180155951136922383213991699434467561508645543330227906067804094605876984754845169252387320636979899325902200224418682350485e+185"); + + // Exponentials + t("1.153024e+0", "5.28973573008e+2", "609.919225043976192"); + t("-3.699875785122930862283231104748329088664056423999601e+15", "1.1e+0", "-4069863363635223.9485115542152231619975304620663995611"); + t("-1.2682525953252723e+14", "1.788378029508237622037088155833989378609386207655e+18", "-2.2681150773465187729527785601467557683746716925715084680772194565e+32"); + t("-3.87722166e+2", "-1.74278705869601992403691e+8", "67571717327.438998052674620914706"); + t("-3e+0", "-3.64329808384254180872888049513111969646643282968e+25", "1.092989425152762542618664148539335908939929848904e+26"); + t("6.953012278719261355e+11", "-4e+0", "-2781204911487.704542"); + t("-7.04663671550547513365402564941508037562051247993316079593e+15", "5.535517336770122093358205271769744142052184795629511766877e-18", "-0.03900677970460142822373864049115522460524845334243105937826127540936694775384656847162726619838459694385924193041061"); + t("5.08438408986e-9", "-2.606367e+4", "-0.0001325177090713613862"); + t("-1.2967e+0", "5.94990983e+8", "-771524807.6561"); + t("1.3117e+3", "-1.959557842524477358350764324331855847355274e+37", "-2.5703520220393569509486975642260953149759129058e+40"); + t("-5.3548e-11", "1.742694574037778940228462366629620551e+11", "-9.3317809050574986691353702808282921264948"); + t("4.34526424962996265825639250671e+21", "-3.754914933534859756171859142125715053796299171e+1", "-1.631609762109069348677868227008975151085048810070540943592037216417378493741e+23"); + t("4.7426914347369245430071315112274335473949505818891357635e+55", "2.099290936966289806252483785990857067e+13", "9.9562891457708756252380705318075217577762765683497811755225761339325645531279572292864156545e+68"); + t("1.2197662968047362383e+19", "-7.9257e+3", "-9.66750173858529800389431e+22"); + t("-2.18492048239986982664891448764e+26", "5.0217571e+0", "-1.0972139945426971341049955535599032244e+27"); + t("2.8477441033458111e-12", "-2.6015762266879431727233849707015975771758956198e+40", "-7.40862335895523532800693698581126602552353137494951139716821978e+28"); + t("1.17305251157767339030842411702548e-7", "3.1679877726710109082864387936446078459964397e+14", "37162160.13379088759968293791782997863641886182709969796604371507532234183556"); + t("5.516400791447843686549580838221025644959140288781e+40", "-4.534755696021348164010120097087738141133999137556364474656e+25", "-2.5015529910554782273339735168586403296046609840907360623635477256369630649686086353650780443350045195634336e+66"); + t("-1.086178703865e+6", "-5.412964e+6", "5879446221587.90586"); + t("2.193003362433320722921995078848109409779629e-11", "-1.87156484301625964803880921322257778262063404562091823011824e+56", "-4.10434799374664745958524117450745644772403340614160247100180995137281346990234693655901738534901333296e+45"); + t("5.690242268084896613323736558476149127814487192716110263e+4", "5.85123113232510962819522680703136616268672961423348513284699e+54", "3.329492270949058963099905818513145552769091859265632399465562585831994642969765945460416258196265143264172794765837e+59"); + t("-2.2964852129902920477142981e+11", "-1.01192386417445983894690800351420572044711646857422992584148e+47", "2.323868190748643763813766975749316051539457362388056941019107244885259571701270065188e+58"); + t("1.64014114524e-9", "2.33457695670849217356126573862065622e+13", "38290.357234267802543783512378452575905911293928"); + t("4.52030709268304468292307103018250587082757e-13", "2.4202633390406694150089337e+3", "1.0940333537626286438097741446790925743401036958119194290469762262109e-9"); + t("-2.531530179588420531938806173298571611356854e+42", "-3.7916295786409190517918e-6", "9.5986247081496130774858068268051041666243771242517966898979109972e+36"); + t("-1.1137e-20", "3.15532351096658148747044e+19", "-0.3514083794163481802595829028"); + t("1.26704207115899080748696654617058814620502905910804474e+17", "-1.1036640030158560360573681189153991777396167698e+36", "-1.398388724244832908797767208849960696897136903372124358147141607664782163824521550287804299792680852e+53"); + t("-1.92043925491801737087120450765880605794833102824745131e+40", "1.48390768547e+10", "-2.8497545698511264714107436784310097859137225929760606638486194657e+50"); + t("3.8135622104716384192078983238750322e+13", "-2.39302666425671400328234877933630532203640643176e-15", "-0.09125956055460405574747767900047040915488905349535492182534023415362543138557102672"); + t("-3.234931242339998871854389747974137006095446e+30", "-5.92883411067302421812958123642550690642906114730631103678724e+9", "1.917937069526724859889065751200796792104177866908520783368616010428214659504892064497475599582063490904e+40"); + t("3e+0", "1.99273095508512817553537488885e+0", "5.97819286525538452660612466655"); + t("-1.953336949e-2", "7.78542087974602115e+8", "-15207550.26792398884803047135"); + + t("-7.3082509513985065717321588249117283909294426665053038123171823802E45", "8.1139587436599483304895082011722489767478591E-41", "-592988.4670796104848902291110510024833882877779324139587779775769322761921828542989063538752670078960459222982"); + t("4.1580690407774531635854811718695276837491313289E8", "4.51151976050001428945887983E-3", "1875921.0642990819646935715021378546121515533349338737465486653798953306087"); + t("-5.94098742155317032555791061122172112467693488807700534435506921715E-24", "4.61016941217052394016E20", "-0.0027388958488934255950077406845338327546662445400484871083292926528860519832777944645744"); + t("3.7504E-12", "-7.88007879736459852E17", "-2955344.7521636190289408"); + t("-2.1186022052008407937878760699384240447915477894859451125820040738844629725E-19", "-7.216767917254229694821186934734207628E33", "1528946042391748.997410886033946108685159225196274137373381385049759221715038347354480872320019684962009305423"); + t("-5E-13", "-2.75399279758638331766833072E26", "137699639879319.165883416536"); + t("6E-5", "2.417496760754967572844203198215987E23", "14504980564529805437.065219189295922"); + t("-4.945015198370467209539041539486792258261028978257673527352148835976343131637595762491692863E23", "3.21738997057546245991016675193089492784008451753637062802134E-9", "-1591004230358037.215453223084728812766073228229224818741711464362077222232342773738670279322956619570773005741693064394880256558629265661028200068969642"); + t("8.944326872147001036632309667E-41", "1.34989853214019743744001484188796117541380712420727841534671603347856989127834147166127622e+48", "120739337.1569336009465330585026690676314127638673504378646869299090176172459431821906069831664699038568059542346321874"); + t("-1.06387569312217787644613114942E-25", "-3.49651047707433733724368394353972842316097364325909366154237667988339210449181953609691895611E35", "37198525073.064174722364904333744771229085129180022174384101305415837978911883846550330098510374779170577866567699408319562"); + + var t2 = (BigDecimalArgument multiplicand, BigDecimalArgument multiplier, string expected, long sd) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Precision = sd; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(multiplicand, config).Times(multiplier).ValueOf()); + }; + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t2("8.7640115353288983769636573243142380477", "98132771361613972783640738.8", "8.6003674020697822292e+26", 21); + t2("97217122196114863.76307918894", "364113335834514329508664304298161.52242179479054037", "3.5398050663058988634098095121967083071e+49", 38); + t2("425036.71458946184", "828502.099774406", "3.5214381051858403971876e+11", 23); + t2("14296983312767601794907267485.024743090402168607", "9785251609055993162691824779826.478", "1.39899578965905859019321727491823760297927041482177805249500602271527916358976146e+59", 90); + t2("376873444696269355299365.4531356", "291637790197265810665.5250538930136484438850490707423377654", "1.0991053859525146161055022709845243436052743435939690299036572244868802096241063972718824e+44", 91); + t2("9408583565372039515608744.3684350485521856091581100947114429124279", "86796159427820718186657687754456418494.479528815877464198372228379", "8.16628919130005414007709894042072728383299297277052582630118037721442350956148223604782621526e+62", 93); + t2("804334215574564.25044091930742448256033235093982", "55688438273971108617042699218.90358138209948168910", "4.4792116315667092377278387277247989195238061393700184267551514519131272798066909360107266e+43", 90); + t2("2.205199208254798821474950998902191375631503824848921578E-31040239", "-3.3880545460122022299262396676563823061715925772E+85847945", "-7.471335202390180221185936884296420222859699405817191352101605427e+54807706", 64); + t2("280871964076135618401817180457296.105266734468", "-7.887061633E+4000357553507", "-2.2152e+4000357553540", 5); + t2("2.17214889901473709634572E+85", "-9.67073449015503646158535438556730E-6375241745195", "-2.1006275275454107335252775478289115070676115032739126956e-6375241745109", 69); + t2("7.7347070256738760192372923810083E+84912757", "-4.2406171585544227861811736221460633E+9292884376073", "-3.27999313294640829790116089024e+9292969288831", 30); + t2("-4.2210567526544976259E+4894", "3.438532765228373515E-336", "-1.45142419478909683e+4559", 18); + t2("-4.19099109E+4089647656", "-1.43145673878838054505158894395674407848872E+7076667342352", "5.9992224379825602598405528544652237783564861855048e+7080756990008", 66); + t2("-8.67452009658410368432993084472027446790739575E+52640", "-1.9127802223015687601128496484168401815516501946271396043E+68866409", "1.6592450478703567557084487969287833435458577809040885135e+68919050", 56); + t2("-6.6E-7463867943633", "-1.4807684717021055514852E+387367", "9.77307191323389663980232e-7463867556266", 48); + t2("1.777384386455398193216E+2597299297574", "-6.084886935E+523988312", "-1.08151830316154434261226e+2597823285887", 24); + t2("-2.343998818E+1337502807076880", "9.28276989128108540103161939E+41", "-2.1758801652928852685775171e+1337502807076922", 26); + t2("-8.19473472459505835840696858E+57148564414539", "-3.072155949788976057941148086E+91051363", "2.517550304110703465066659165e+57148655465903", 28); + t2("-108.838392673073428475338591374657485576815", "4.7679792205854258775825803754367415273006845283282054E-2392128538985014", "-5.189391946671311e-2392128538985012", 16); + t2("5.3E+3001536064", "-5.1284719857135251986348941516094288300538120647569E+8250887721405", "-2.7180901524281683552764939003e+8253889257470", 29); + t2("-7.98E-5131801232", "-6.46961274175379599674705810329589944472E+51197530481496", "5.162750967919529205404152e+51192398680265", 25); + t2("-4.5628487502792802885938754300464085807968592197376E+6353199536", "99369621.8217038874", "-4.53408554744886282e+6353199544", 18); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightToDPTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightToDPTests.cs new file mode 100644 index 0000000..26952e6 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightToDPTests.cs @@ -0,0 +1,496 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightToDP")] + public class BigDecimalLightToDPTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToDP() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_CEIL, + ToExpNeg = (long)-9e15, + ToExpPos = 300 + }); + + var t = (string expected, BigDecimalArgument n, long? dp, RoundingMode? rm) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToDP(dp, rm).ValueOf()); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("0", 0, null, null); + t("-1", -1, null, null); + t("9.999e+9000000000000000", "9.999e+9000000000000000", null, null); + t("-9.999e+9000000000000000", "-9.999e+9000000000000000", null, null); + t("1e-9000000000000000", "1e-9000000000000000", null, null); + t("-1e-9000000000000000", "-1e-9000000000000000", null, null); + + t("1", 0.5, 0, null); + t("1", 0.7, 0, null); + t("1", 1, 0, null); + t("1", 1.1, 0, null); + t("1", 1.49999, 0, null); + t("0", -0.5, 0, null); + t("-1", -0.500001, 0, null); + t("-1", -0.7, 0, null); + t("-1", -1, 0, null); + t("-1", -1.1, 0, null); + t("-1", -1.49999, 0, null); + t("-1", -1.5, 0, null); + + t("0", 0.4, 0, null); + t("0", -0.4, 0, null); + t("0", -0.5, 0, null); + t("1", 0.6, 0, null); + t("-1", -0.6, 0, null); + t("2", 1.5, 0, null); + t("2", 1.6, 0, null); + t("-2", -1.6, 0, null); + + t("0", "0", 0, null); + t("0", "-0", 1, null); + t("0", "-0", 1, RoundingMode.ROUND_UP); + t("0", "-0", 1, RoundingMode.ROUND_FLOOR); + t("0", "-0", 1, RoundingMode.ROUND_HALF_EVEN); + t("0", "0", 10, null); + t("0", "-0", 20, null); + + t("0.000000000001", "0.0000000000005", 12, null); + t("0.00000000001", "0.000000000005", 11, null); + t("0.0000000001", "0.00000000005", 10, null); + t("0.000000001", "0.0000000005", 9, null); + t("0.00000001", "0.000000005", 8, null); + t("0.0000001", "0.00000005", 7, null); + t("0.000001", "0.0000005", 6, null); + t("0.00001", "0.000005", 5, null); + t("0.0001", "0.00005", 4, null); + t("0.001", "0.0005", 3, null); + t("0.01", "0.005", 2, null); + t("0.1", "0.05", 1, null); + t("1", "0.5", 0, null); + + t("0.01", "0.00001000", 2, RoundingMode.ROUND_UP); + t("0.0039", "0.0039", 4, RoundingMode.ROUND_FLOOR); + t("-41620.65299", "-41620.65299", 6, RoundingMode.ROUND_HALF_DOWN); + t("0.0011117", "0.0011117", 7, RoundingMode.ROUND_UP); + t("938116", "938116", 6, RoundingMode.ROUND_HALF_DOWN); + t("-7187", "-7187", 4, RoundingMode.ROUND_HALF_UP); + t("-2.4263", "-2.426346", 4, RoundingMode.ROUND_HALF_EVEN); + t("-0.537", "-0.5374743", 3, RoundingMode.ROUND_HALF_DOWN); + t("652506", "652506", 3, RoundingMode.ROUND_HALF_EVEN); + t("-178587", "-178587", 3, RoundingMode.ROUND_CEIL); + t("4093", "4093", 3, RoundingMode.ROUND_UP); + t("44", "44", 1, RoundingMode.ROUND_CEIL); + t("-0.0496", "-0.049635", 4, RoundingMode.ROUND_HALF_UP); + t("-1", "-0.05", 0, RoundingMode.ROUND_UP); + t("520216039", "520216039", 7, RoundingMode.ROUND_DOWN); + t("-2932289", "-2932289", 8, RoundingMode.ROUND_FLOOR); + t("53937.3", "53937.399", 1, RoundingMode.ROUND_DOWN); + t("63101619", "63101619", 5, RoundingMode.ROUND_UP); + t("-0.00207", "-0.00207", 6, RoundingMode.ROUND_UP); + t("-0.032", "-0.03169086", 3, RoundingMode.ROUND_UP); + t("-755", "-755", 5, RoundingMode.ROUND_FLOOR); + t("-3583", "-3583", 5, RoundingMode.ROUND_DOWN); + t("-6.616", "-6.615375", 3, RoundingMode.ROUND_UP); + t("7528739", "7528739", 8, RoundingMode.ROUND_UP); + t("-0.9028", "-0.9028782", 4, RoundingMode.ROUND_CEIL); + t("-8.78762908", "-8.78762908", 8, RoundingMode.ROUND_CEIL); + t("-0.000262", "-0.0002613", 6, RoundingMode.ROUND_UP); + t("-888980.3", "-888980.3", 1, RoundingMode.ROUND_HALF_EVEN); + t("0.00009075", "0.00009075", 8, RoundingMode.ROUND_UP); + t("-4.42", "-4.4195", 2, RoundingMode.ROUND_UP); + t("-0.336889", "-0.336888682", 6, RoundingMode.ROUND_HALF_EVEN); + t("43759", "43759", 6, RoundingMode.ROUND_HALF_UP); + t("0.0000804", "0.0000804", 8, RoundingMode.ROUND_HALF_EVEN); + t("-4", "-4", 0, RoundingMode.ROUND_CEIL); + t("-3", "-3.614204", 0, RoundingMode.ROUND_CEIL); + t("336379823", "336379823", 4, RoundingMode.ROUND_DOWN); + t("310614", "310614", 7, RoundingMode.ROUND_UP); + t("-375811635", "-375811635", 8, RoundingMode.ROUND_FLOOR); + t("-5446775", "-5446775", 7, RoundingMode.ROUND_HALF_UP); + t("59.7954405", "59.7954405", 7, RoundingMode.ROUND_UP); + t("47086", "47085.84", 0, RoundingMode.ROUND_HALF_UP); + t("-2564", "-2564", 3, RoundingMode.ROUND_HALF_UP); + t("1.4069997", "1.40699967", 7, RoundingMode.ROUND_CEIL); + t("-0.4", "-0.42528874", 1, RoundingMode.ROUND_HALF_EVEN); + t("-0.00005573", "-0.000055732", 8, RoundingMode.ROUND_DOWN); + t("-0.00003014", "-0.000030137", 8, RoundingMode.ROUND_HALF_EVEN); + t("57", "57", 3, RoundingMode.ROUND_HALF_EVEN); + t("365474.9164", "365474.9164", 4, RoundingMode.ROUND_HALF_DOWN); + t("-7", "-7", 0, RoundingMode.ROUND_HALF_UP); + t("0.843206", "0.84320562", 6, RoundingMode.ROUND_HALF_DOWN); + t("-62734", "-62734", 5, RoundingMode.ROUND_FLOOR); + t("-51246", "-51246", 7, RoundingMode.ROUND_CEIL); + t("0.0003", "0.000332", 4, RoundingMode.ROUND_HALF_DOWN); + t("-609", "-609", 2, RoundingMode.ROUND_UP); + t("-0.00004595", "-0.00004595", 8, RoundingMode.ROUND_DOWN); + t("-22243", "-22243", 0, RoundingMode.ROUND_DOWN); + t("54693", "54693", 5, RoundingMode.ROUND_UP); + t("5", "5", 1, RoundingMode.ROUND_HALF_EVEN); + t("2", "2", 2, RoundingMode.ROUND_HALF_EVEN); + t("3808", "3808", 0, RoundingMode.ROUND_HALF_UP); + t("2616", "2616", 0, RoundingMode.ROUND_HALF_DOWN); + t("-2477", "-2477", 3, RoundingMode.ROUND_CEIL); + t("0.00009", "0.00008892", 5, RoundingMode.ROUND_HALF_UP); + t("8.8953", "8.8953", 5, RoundingMode.ROUND_HALF_DOWN); + t("0.07", "0.06922", 2, RoundingMode.ROUND_HALF_UP); + t("0.08", "0.08", 3, RoundingMode.ROUND_CEIL); + t("-773.0965536", "-773.0965536", 8, RoundingMode.ROUND_CEIL); + t("-326", "-326", 2, RoundingMode.ROUND_DOWN); + t("-0.356", "-0.3564473", 3, RoundingMode.ROUND_HALF_EVEN); + t("-312283993", "-312283992.7", 0, RoundingMode.ROUND_FLOOR); + t("-2.3995861", "-2.39958606", 7, RoundingMode.ROUND_FLOOR); + t("-0.0449", "-0.0449", 4, RoundingMode.ROUND_FLOOR); + t("0", "-0.003", 0, RoundingMode.ROUND_HALF_UP); + t("85942", "85942", 2, RoundingMode.ROUND_HALF_DOWN); + t("6738", "6738.1977", 0, RoundingMode.ROUND_FLOOR); + t("-0.003", "-0.002995", 5, RoundingMode.ROUND_FLOOR); + t("-572936", "-572936", 3, RoundingMode.ROUND_HALF_EVEN); + t("684.2426407", "684.2426407", 8, RoundingMode.ROUND_HALF_EVEN); + t("0", "-0.0007851", 1, RoundingMode.ROUND_HALF_EVEN); + t("0", "-0.002", 0, RoundingMode.ROUND_HALF_DOWN); + t("85.05", "85.05", 3, RoundingMode.ROUND_FLOOR); + t("1.66", "1.66", 3, RoundingMode.ROUND_FLOOR); + t("-17.14", "-17.14", 2, RoundingMode.ROUND_UP); + t("80182", "80182", 6, RoundingMode.ROUND_HALF_DOWN); + t("-0.00064", "-0.00063953", 6, RoundingMode.ROUND_HALF_EVEN); + t("-3.76703298", "-3.767032983", 8, RoundingMode.ROUND_HALF_UP); + t("-0.000378", "-0.00037877", 6, RoundingMode.ROUND_CEIL); + t("675", "675.76294", 0, RoundingMode.ROUND_FLOOR); + t("0.0003", "0.00023235", 4, RoundingMode.ROUND_UP); + t("-0.0155175", "-0.0155175", 7, RoundingMode.ROUND_UP); + t("-645406477.5", "-645406477.5", 2, RoundingMode.ROUND_DOWN); + t("-0.89603", "-0.8960278", 5, RoundingMode.ROUND_HALF_EVEN); + t("866034", "866034", 7, RoundingMode.ROUND_FLOOR); + t("484.002", "484.002", 4, RoundingMode.ROUND_HALF_EVEN); + t("420", "419.83", 0, RoundingMode.ROUND_HALF_EVEN); + t("4611867124", "4611867124", 4, RoundingMode.ROUND_HALF_UP); + t("0.0080252", "0.0080252", 8, RoundingMode.ROUND_UP); + t("0", "-0.02829833", 1, RoundingMode.ROUND_HALF_UP); + t("-8", "-8", 0, RoundingMode.ROUND_HALF_UP); + t("-0.0073554", "-0.00735541", 7, RoundingMode.ROUND_HALF_UP); + t("28", "28", 3, RoundingMode.ROUND_HALF_DOWN); + t("-3903", "-3903", 6, RoundingMode.ROUND_UP); + t("228", "228", 3, RoundingMode.ROUND_HALF_UP); + t("0.88", "0.883", 2, RoundingMode.ROUND_HALF_DOWN); + t("-0.01", "-0.009", 2, RoundingMode.ROUND_FLOOR); + t("7796.6", "7796.6", 2, RoundingMode.ROUND_CEIL); + t("0", "0.005", 0, RoundingMode.ROUND_HALF_EVEN); + t("805.25", "805.2467", 2, RoundingMode.ROUND_UP); + t("-85023", "-85023", 4, RoundingMode.ROUND_FLOOR); + t("0", "-0.008097491", 0, RoundingMode.ROUND_CEIL); + t("-0.026", "-0.0259", 3, RoundingMode.ROUND_HALF_UP); + t("-0.00801", "-0.008007359", 5, RoundingMode.ROUND_HALF_UP); + t("30745", "30745", 6, RoundingMode.ROUND_HALF_DOWN); + t("-81", "-81", 4, RoundingMode.ROUND_HALF_EVEN); + t("-386", "-386", 4, RoundingMode.ROUND_CEIL); + t("-2876", "-2876", 5, RoundingMode.ROUND_HALF_EVEN); + t("0", "0.00002329", 4, RoundingMode.ROUND_HALF_DOWN); + t("-62453828", "-62453828", 7, RoundingMode.ROUND_HALF_EVEN); + t("0.317", "0.317", 3, RoundingMode.ROUND_FLOOR); + t("-706", "-706", 0, RoundingMode.ROUND_DOWN); + t("36.911", "36.9109527", 4, RoundingMode.ROUND_HALF_UP); + t("5040908", "5040908", 1, RoundingMode.ROUND_UP); + t("-0.08", "-0.08", 2, RoundingMode.ROUND_HALF_UP); + t("-0.352847", "-0.352847085", 6, RoundingMode.ROUND_HALF_EVEN); + t("0.001", "0.00006", 3, RoundingMode.ROUND_CEIL); + t("-0.4389", "-0.438905", 4, RoundingMode.ROUND_DOWN); + t("0.00390964", "0.00390964", 8, RoundingMode.ROUND_CEIL); + t("-35105.1", "-35105.1788", 1, RoundingMode.ROUND_CEIL); + t("-8858843.829", "-8858843.829", 3, RoundingMode.ROUND_DOWN); + t("-5946.90816", "-5946.90816", 5, RoundingMode.ROUND_FLOOR); + t("608475", "608475", 6, RoundingMode.ROUND_HALF_EVEN); + + t("-249815496353142605063083339706423770452529255711064841247978.1649", "-249815496353142605063083339706423770452529255711064841247978.16482575714251625720191747855256", 4, RoundingMode.ROUND_FLOOR); + t("-8757939868931375459275247990933877309", "-8757939868931375459275247990933877309", 37, RoundingMode.ROUND_HALF_DOWN); + t("556228688742576287254121716253667920283844645854057755303259369", "556228688742576287254121716253667920283844645854057755303259369", 25, RoundingMode.ROUND_FLOOR); + t("0", "0.00000000000000000000000000000000000000000000000029171651270270187897342247995644546232788426", 35, RoundingMode.ROUND_FLOOR); + t("-0.0000058979376152458865088785307705", "-0.000005897937615245886508878530770431196412050562641578155968", 34, RoundingMode.ROUND_UP); + t("-0.00000000000000847145658", "-0.00000000000000847145657888758222743159237", 23, RoundingMode.ROUND_FLOOR); + t("-6049825281564367887763596943301191584240212075976455", "-6049825281564367887763596943301191584240212075976455", 53, RoundingMode.ROUND_UP); + t("-64680661822322715719008107701612.741312367131318202976964422", "-64680661822322715719008107701612.74131236713131820297696442216284615573809", 27, RoundingMode.ROUND_HALF_UP); + t("0", "-0.0000000000000000000000000000000000048810387700772580768508931440796984745771392", 29, RoundingMode.ROUND_CEIL); + t("232730083859746141163.7653402888578932348762190816502", "232730083859746141163.76534028885789323487621908165018267559238917447610653431235463768839108", 31, RoundingMode.ROUND_HALF_DOWN); + t("-499311204526771278437755030091270601.471802335", "-499311204526771278437755030091270601.47180233568698638607829334564", 9, RoundingMode.ROUND_CEIL); + t("-4793558721695298336734196955569628362250.1", "-4793558721695298336734196955569628362250.107513868618556605590137359591047843592593", 1, RoundingMode.ROUND_HALF_EVEN); + t("0.0000000000000000000000000000000000000622", "0.000000000000000000000000000000000000062176566496", 40, RoundingMode.ROUND_HALF_DOWN); + t("-393323198834362857317921391989917230.1575124832953752419421908305674188204", "-393323198834362857317921391989917230.15751248329537524194219083056741882044261538788798", 37, RoundingMode.ROUND_HALF_DOWN); + t("0", "-0.000000000000000169092170076859363", 3, RoundingMode.ROUND_HALF_DOWN); + t("0.00085774283834918184933525579624189945402764", "0.0008577428383491818493352557962418994540276420616048890965876345513", 44, RoundingMode.ROUND_HALF_UP); + t("-127706837731025454069338274697755478243.226555768723254468591", "-127706837731025454069338274697755478243.226555768723254468591", 21, RoundingMode.ROUND_HALF_UP); + t("0.0000000000000000000000000000002", "0.00000000000000000000000000000024", 31, RoundingMode.ROUND_HALF_EVEN); + t("0", "0.0000000000000000006", 0, RoundingMode.ROUND_HALF_UP); + t("0.000000000000000000000007810237984104", "0.00000000000000000000000781023798410401506609033130277607174", 36, RoundingMode.ROUND_HALF_EVEN); + t("-0.0000000000000000000000000000000000000000000003", "-0.00000000000000000000000000000000000000000000030032464295099044566372323", 46, RoundingMode.ROUND_DOWN); + t("-685966223751248103958158215191994961086468451812432", "-685966223751248103958158215191994961086468451812432", 15, RoundingMode.ROUND_HALF_EVEN); + t("-342139733926317660019.326340161146875487297", "-342139733926317660019.326340161146875487297346019153178", 21, RoundingMode.ROUND_HALF_EVEN); + t("0", "0.000000000000000000000000000000000000000000901836202", 15, RoundingMode.ROUND_HALF_UP); + t("54703159147681578.1514852895273075959730711237955491690133829927977209580124", "54703159147681578.1514852895273075959730711237955491690133829927977209580124", 59, RoundingMode.ROUND_UP); + t("-460718430436988680547605508933197195738591668941440213118174196", "-460718430436988680547605508933197195738591668941440213118174196", 16, RoundingMode.ROUND_HALF_EVEN); + t("70597943458486911871858911963104830835210711517857117431432573585719054629372", "70597943458486911871858911963104830835210711517857117431432573585719054629372", 17, RoundingMode.ROUND_FLOOR); + t("0", "0.0000000000000000000000005", 17, RoundingMode.ROUND_DOWN); + t("612277653819449429818059108521923195679275819340316389136081740197236376194", "612277653819449429818059108521923195679275819340316389136081740197236376194", 24, RoundingMode.ROUND_HALF_EVEN); + t("0", "0.000004077002116450599035175933786605407147118579202271612670066923117668943811493201471493894", 0, RoundingMode.ROUND_FLOOR); + t("0", "0.0000000000000000454362126792715044166595091", 4, RoundingMode.ROUND_HALF_DOWN); + t("-0.00000000000000000000000247815", "-0.00000000000000000000000247815", 29, RoundingMode.ROUND_CEIL); + t("-0.000000000000000000000000000000039578053693", "-0.000000000000000000000000000000039578053693375996216932325600263217353654", 42, RoundingMode.ROUND_HALF_UP); + t("-232816283401672701377791127757043050155711815150567236808118951", "-232816283401672701377791127757043050155711815150567236808118951", 5, RoundingMode.ROUND_CEIL); + t("-29071348593675752783607764808066026", "-29071348593675752783607764808066026", 0, RoundingMode.ROUND_FLOOR); + t("0", "-0.0000000000000000000000000000001261801374206123908708248209346534624420321535319795165638569", 3, RoundingMode.ROUND_HALF_DOWN); + t("-400979013779505784551704647545324555644743917317817725", "-400979013779505784551704647545324555644743917317817725", 51, RoundingMode.ROUND_UP); + t("-707984518604562445981560648691697348187535181109991331112833004096934116229906958", "-707984518604562445981560648691697348187535181109991331112833004096934116229906958", 33, RoundingMode.ROUND_FLOOR); + t("-0.00000000000000000000054943542078511748325889425", "-0.00000000000000000000054943542078511748325889425029425118", 48, RoundingMode.ROUND_CEIL); + t("0.000000000000000000000000000001", "0.0000000000000000000000000000000004", 30, RoundingMode.ROUND_CEIL); + t("8361324754302.257", "8361324754302.25608823898722021345099998761427662952277448263515002938433228636937277798222125", 3, RoundingMode.ROUND_CEIL); + t("47845474280015515238795364952786480611238289992139357357828.2393536", "47845474280015515238795364952786480611238289992139357357828.23935359", 7, RoundingMode.ROUND_CEIL); + t("2549907485257905040787802731022172814.032473410309278713663931353982863019132463", "2549907485257905040787802731022172814.03247341030927871366393135398286301913246263649610180999011", 42, RoundingMode.ROUND_HALF_UP); + t("7245563391265598645357861460253613932139592382610560614764364520097782949512752649", "7245563391265598645357861460253613932139592382610560614764364520097782949512752649", 40, RoundingMode.ROUND_DOWN); + t("80140230840302995211398777354070268652682793260175436489292", "80140230840302995211398777354070268652682793260175436489292", 35, RoundingMode.ROUND_HALF_DOWN); + t("-6237457908203764779831412120415113057397781437576879126960196359736451276", "-6237457908203764779831412120415113057397781437576879126960196359736451276", 46, RoundingMode.ROUND_FLOOR); + t("-64022435787355811014521281511793708435812347405139910972682589", "-64022435787355811014521281511793708435812347405139910972682589", 59, RoundingMode.ROUND_HALF_UP); + t("23773726397.29160222442891928943538179152516815326677387048397317891529", "23773726397.291602224428919289435381791525168153266773870483973178915287792", 59, RoundingMode.ROUND_CEIL); + t("-0.0000000000000000009191736362201691567821986127083610325635", "-0.00000000000000000091917363622016915678219861270836103256344707473557037101545788367584278310776658", 58, RoundingMode.ROUND_FLOOR); + t("576493832674677623548573635478304255.82263895978273", "576493832674677623548573635478304255.82263895978273", 14, RoundingMode.ROUND_HALF_DOWN); + t("0.00000000001", "0.00000000000000000000000000000000000000000000000007822968340296738406", 11, RoundingMode.ROUND_CEIL); + t("0", "-0.00000000000000000000000000000000000000000000000803017739", 16, RoundingMode.ROUND_CEIL); + t("-76782672919180281245123823777032511965124724736456274885479622075418722", "-76782672919180281245123823777032511965124724736456274885479622075418722", 48, RoundingMode.ROUND_HALF_UP); + t("4455851923984827076883518360355220330356", "4455851923984827076883518360355220330356", 36, RoundingMode.ROUND_HALF_EVEN); + t("6861599706553109843427643365400432566541688718985576240352998201999416183743", "6861599706553109843427643365400432566541688718985576240352998201999416183743", 2, RoundingMode.ROUND_CEIL); + t("0", "0.0000083135366316053183734543904737952651532784316140061929170739473518406297062533554026617147464", 0, RoundingMode.ROUND_DOWN); + t("72361127388902796012114362477322144735533135802605580980837229637633107.0925818254603", "72361127388902796012114362477322144735533135802605580980837229637633107.09258182546029609579105130429", 13, RoundingMode.ROUND_HALF_DOWN); + t("-273219046129778472266.058485499109338596573075", "-273219046129778472266.0584854991093385965730749815531346353045049027336176088162559", 24, RoundingMode.ROUND_HALF_UP); + t("-0.00000000000007280978660680040221854732703892674800762227646", "-0.00000000000007280978660680040221854732703892674800762227646226836240552990665555", 59, RoundingMode.ROUND_HALF_DOWN); + t("6276464097096605785329824864148.527049815380996985914", "6276464097096605785329824864148.52704981538099698591393138250952524233217779", 21, RoundingMode.ROUND_UP); + t("-597198", "-597197.628834953506966767991553710700934413500204012426446876175175114500037146677042239668", 0, RoundingMode.ROUND_UP); + t("-433359038877962603713455049783", "-433359038877962603713455049783", 30, RoundingMode.ROUND_UP); + t("0.0000000000000000000000000000000006381735336173415547900207", "0.0000000000000000000000000000000006381735336173415547900206847223271181528556195", 58, RoundingMode.ROUND_UP); + t("807050820.676699481791051456", "807050820.676699481791051455096629111775329549493444751897213743866128850061622892", 18, RoundingMode.ROUND_CEIL); + t("0.0000000000000000000000000000489752745584111598026871408099", "0.000000000000000000000000000048975274558411159802687140809907", 58, RoundingMode.ROUND_FLOOR); + t("0", "0.0000000000000000000000000000000000000000000226067497099004331941912856", 36, RoundingMode.ROUND_HALF_EVEN); + t("39094507220356523575213839820749561678857032020620050894656716293.67495126324", "39094507220356523575213839820749561678857032020620050894656716293.67495126323710280607325675762434", 11, RoundingMode.ROUND_CEIL); + t("-22678769.817248435493696742588538", "-22678769.817248435493696742588538331241538369550386799148219117165563326051964281", 24, RoundingMode.ROUND_HALF_UP); + t("5767307789536064608781837241295188919", "5767307789536064608781837241295188919", 30, RoundingMode.ROUND_UP); + t("168139421336703751454723348941581.0989620502676347173183006762310303463068390391675336175", "168139421336703751454723348941581.0989620502676347173183006762310303463068390391675336175", 55, RoundingMode.ROUND_HALF_EVEN); + t("-88504154823150878334701258558002569539793415193610842759120001088201133334307983", "-88504154823150878334701258558002569539793415193610842759120001088201133334307983", 44, RoundingMode.ROUND_HALF_UP); + t("-329655464734888739743767364510089523323", "-329655464734888739743767364510089523323", 25, RoundingMode.ROUND_DOWN); + t("0.00000000000000000000084501920385200277918", "0.000000000000000000000845019203852002779189", 41, RoundingMode.ROUND_DOWN); + t("-5840123488663376216608124416421102623453621285401805153644515702191", "-5840123488663376216608124416421102623453621285401805153644515702191", 59, RoundingMode.ROUND_FLOOR); + t("-0.00000062136", "-0.00000062135994705765807424168688040116009865960794", 13, RoundingMode.ROUND_FLOOR); + t("-0.000000000000000000001", "-0.00000000000000000000000000000000000000001462340018509", 21, RoundingMode.ROUND_UP); + t("0.006", "0.0059936079684973012978514720463815026319867172", 4, RoundingMode.ROUND_CEIL); + t("526400924922583880463185416850358172941032433541198785132036360013561525242705246671523133061757", "526400924922583880463185416850358172941032433541198785132036360013561525242705246671523133061757", 38, RoundingMode.ROUND_HALF_EVEN); + t("-882873192309626516849737955750920016208815071464396145314", "-882873192309626516849737955750920016208815071464396145314", 46, RoundingMode.ROUND_HALF_EVEN); + t("-6758735221049379519.2572393", "-6758735221049379519.25723934716782621573177906", 7, RoundingMode.ROUND_CEIL); + t("-0.000000790786371520517683432954223230156393", "-0.00000079078637152051768343295422323015639290504929", 42, RoundingMode.ROUND_HALF_UP); + t("-0.00000000000000000000000000000000000091966", "-0.0000000000000000000000000000000000009196610338039484256720548095", 41, RoundingMode.ROUND_HALF_EVEN); + t("-0.00000000000541933780252974657673566396725809671507", "-0.0000000000054193378025297465767356639672580967150744942399", 50, RoundingMode.ROUND_HALF_UP); + t("-0.000000000000000000000583479626", "-0.000000000000000000000583479626800396501245049473177007318461587644875162633137088", 30, RoundingMode.ROUND_CEIL); + t("11604528953141243475", "11604528953141243475", 13, RoundingMode.ROUND_FLOOR); + t("566807769866890.02801522720838416179840190775794257854696482", "566807769866890.02801522720838416179840190775794257854696482590456963092114076898", 44, RoundingMode.ROUND_FLOOR); + t("-35620697798492911.0669248410687861643251268323797667576839159303711022", "-35620697798492911.066924841068786164325126832379766757683915930371102255700535220012496346147093317", 52, RoundingMode.ROUND_DOWN); + t("-0.0000000000000000000050597138398214172387021051", "-0.000000000000000000005059713839821417238702105087169671933387005", 46, RoundingMode.ROUND_UP); + t("-0.8174627036499993060703761337876311", "-0.81746270364999930607037613378763105641195817852303184573911882", 34, RoundingMode.ROUND_HALF_UP); + t("0.0000000000000000000016801618027332596946", "0.000000000000000000001680161802733259694523102897059933026814910108114561982575916856344241", 40, RoundingMode.ROUND_CEIL); + t("-0.0005550919624693963627417354876271038367574907", "-0.000555091962469396362741735487627103836757490736793688", 46, RoundingMode.ROUND_HALF_EVEN); + t("0.00000000000001", "0.0000000000000000005989657036", 14, RoundingMode.ROUND_CEIL); + t("26923162467831521466200388799932149017792464401239965995848900909703513553682", "26923162467831521466200388799932149017792464401239965995848900909703513553682", 59, RoundingMode.ROUND_UP); + t("0.000000000000034716604224301619113605162061332208", "0.0000000000000347166042243016191136051620613322078875442915881933", 48, RoundingMode.ROUND_HALF_DOWN); + t("4554587644116353728395891927482", "4554587644116353728395891927482", 4, RoundingMode.ROUND_HALF_UP); + t("83", "83", 1, RoundingMode.ROUND_HALF_UP); + t("-0.0000000000000000679512312597136188846870750884127001656543", "-0.0000000000000000679512312597136188846870750884127001656543162955358", 58, RoundingMode.ROUND_HALF_DOWN); + t("-0.000000000000000005843127017405787209162333", "-0.0000000000000000058431270174057872091623337743081992327769648", 42, RoundingMode.ROUND_CEIL); + t("698142412071442689875148052035405913655358215178078673989", "698142412071442689875148052035405913655358215178078673989", 31, RoundingMode.ROUND_CEIL); + t("-0.000000000000000000000000001", "-0.0000000000000000000000000000000000000009", 27, RoundingMode.ROUND_FLOOR); + t("0", "0.000000000000000000000000000000000000000000000000086322062431379058693358", 36, RoundingMode.ROUND_HALF_EVEN); + t("-7097679626212584135194693334505819500.76271239784243114877303953752095973790591", "-7097679626212584135194693334505819500.7627123978424311487730395375209597379059174819443305631091738", 41, RoundingMode.ROUND_DOWN); + t("720941616590530465684319461159925340787620861616050215112729354513077297889437424470222725372.4341", "720941616590530465684319461159925340787620861616050215112729354513077297889437424470222725372.43418", 4, RoundingMode.ROUND_DOWN); + t("-8565045.0741813", "-8565045.07418120224", 7, RoundingMode.ROUND_FLOOR); + t("7179182230007440380654240229988748528461622212340003478705", "7179182230007440380654240229988748528461622212340003478705", 16, RoundingMode.ROUND_DOWN); + t("128138852434106311723518159896099183377408757231649238006509175039", "128138852434106311723518159896099183377408757231649238006509175039", 51, RoundingMode.ROUND_UP); + t("0.0000000000000000000000000000000000071444116240971906475", "0.000000000000000000000000000000000007144411624097190647497044019271703768941206", 56, RoundingMode.ROUND_HALF_DOWN); + t("0", "0.00000000000000000000000000000000000000000000021714481944", 43, RoundingMode.ROUND_HALF_EVEN); + t("-0.0000000000000001", "-0.0000000000000000000000000034534834", 16, RoundingMode.ROUND_UP); + t("-0.0000000000000000000008286492885892336366506247591678062602", "-0.00000000000000000000082864928858923363665062475916780626021532507656936043414109352811732", 58, RoundingMode.ROUND_DOWN); + t("31161421229261423772494491055755169247634601491928", "31161421229261423772494491055755169247634601491928", 51, RoundingMode.ROUND_FLOOR); + t("1748715317929813133410156549170209422179478560908330825848622104018934659066", "1748715317929813133410156549170209422179478560908330825848622104018934659066", 57, RoundingMode.ROUND_HALF_UP); + t("-554303811557294466.269761483473739646624314242607077", "-554303811557294466.269761483473739646624314242607077815435340758612837177421989342652", 33, RoundingMode.ROUND_DOWN); + t("-0.19004485", "-0.19004485473016995992614957080209680408919713640428488619", 8, RoundingMode.ROUND_DOWN); + t("0.000252525605711892", "0.000252525605711891731866212005527221984514215823140269482997380211714402276122070798053", 18, RoundingMode.ROUND_HALF_EVEN); + t("86245969707619", "86245969707619", 14, RoundingMode.ROUND_FLOOR); + t("-31435925010862195008998682761", "-31435925010862195008998682761", 9, RoundingMode.ROUND_FLOOR); + t("-7376.12482208", "-7376.124822087908447175101", 8, RoundingMode.ROUND_CEIL); + t("0.000080221434577125714125624728141606555230430450054", "0.0000802214345771257141256247281416065552304304500535613033078792598113626175", 51, RoundingMode.ROUND_UP); + t("-6050582615205191601389958119203059837835097590785064613410822037914417495686026661", "-6050582615205191601389958119203059837835097590785064613410822037914417495686026661", 31, RoundingMode.ROUND_DOWN); + t("0.00000000000000003455493043277403696896050418463562482", "0.0000000000000000345549304327740369689605041846356248273019036250593274409786087865531980510674", 53, RoundingMode.ROUND_FLOOR); + t("-20967.65067808575", "-20967.6506780857520813447701235001803657407937", 11, RoundingMode.ROUND_HALF_EVEN); + t("568254966593770.553753276551449605949", "568254966593770.553753276551449605948238816764309803642928261672349658172008375162162314878680613", 21, RoundingMode.ROUND_UP); + t("-451.149170475956331479335", "-451.1491704759563314793340102771090380475440750267088321862964226523091325726805634622304958123379", 21, RoundingMode.ROUND_FLOOR); + t("-0.00000000000000000000000089587927281631480799", "-0.00000000000000000000000089587927281631480798176250533957436898566513857011780218162097370714526", 44, RoundingMode.ROUND_UP); + t("0.00006", "0.00005989898942742447311513559", 6, RoundingMode.ROUND_CEIL); + t("0.00000000000000000000000000000000000084666165975", "0.000000000000000000000000000000000000846661659751645", 47, RoundingMode.ROUND_HALF_EVEN); + t("-274912.8896024699", "-274912.8896024699118787839924993246206752520896053416203239133353705", 10, RoundingMode.ROUND_DOWN); + t("2884607226068313798651836226110538860137007975185098848", "2884607226068313798651836226110538860137007975185098848", 55, RoundingMode.ROUND_HALF_EVEN); + t("-0.00000000000000000002773912168", "-0.000000000000000000027739121678637743521714908420713523555500095414277237781740952561559672", 29, RoundingMode.ROUND_FLOOR); + t("-2651358523359639", "-2651358523359639", 16, RoundingMode.ROUND_HALF_UP); + t("-4813276596516131663456402092.38944176", "-4813276596516131663456402092.3894417517916213734867", 8, RoundingMode.ROUND_FLOOR); + t("-0.000000000000000000000000000000000000112895859", "-0.000000000000000000000000000000000000112895858119340820153717620708673416", 45, RoundingMode.ROUND_UP); + t("-0.0000000000000000021", "-0.0000000000000000020224974226159732231298241899365279396237510862449464734463589", 19, RoundingMode.ROUND_FLOOR); + t("-7589382547973376572325815568183010749314649708", "-7589382547973376572325815568183010749314649708", 33, RoundingMode.ROUND_HALF_DOWN); + t("842229243093860852173.05443961588175098377444082861489172139756969332835", "842229243093860852173.0544396158817509837744408286148917213975696933283408713841831638764", 50, RoundingMode.ROUND_UP); + t("-699708233495.712278374225898965891885496", "-699708233495.71227837422589896589188549642075052667001859282382939797996992686357419809583", 27, RoundingMode.ROUND_HALF_UP); + t("-0.00000000071616892037859054", "-0.000000000716168920378590537721800581109521242491374877", 26, RoundingMode.ROUND_UP); + t("3951438403.277181863849692687044689923289027507211228628773736", "3951438403.2771818638496926870446899232890275072112286287737359542096", 51, RoundingMode.ROUND_CEIL); + t("109559.01297171197941271991562118124015322", "109559.012971711979412719915621181240153223610175595763848035079898263530366", 35, RoundingMode.ROUND_FLOOR); + t("-0.00000000000000000000000000000000000000000000489005761683947", "-0.00000000000000000000000000000000000000000000489005761683946256390055271579820502403", 59, RoundingMode.ROUND_FLOOR); + t("-0.00158", "-0.00158276409341184629828973465939702170102740363504722102864514069935682480434491", 5, RoundingMode.ROUND_CEIL); + t("-2625562538887919963240549817430379735187837775384", "-2625562538887919963240549817430379735187837775384", 44, RoundingMode.ROUND_UP); + t("0", "0.00000000000000000000002", 9, RoundingMode.ROUND_DOWN); + t("6744808.28630410992583043657159413157574982400492", "6744808.28630410992583043657159413157574982400491999838773235902794700459508120619939892", 42, RoundingMode.ROUND_HALF_EVEN); + t("0.000000000000000009", "0.000000000000000009", 18, RoundingMode.ROUND_FLOOR); + t("6067881766683695479556751950119377724336039886809300136812181462", "6067881766683695479556751950119377724336039886809300136812181462", 31, RoundingMode.ROUND_DOWN); + t("0.000000000000000000000000000000000000000077241022793", "0.0000000000000000000000000000000000000000772410227935606591033087412064412570098277", 51, RoundingMode.ROUND_DOWN); + t("743268323094543466714.5656060177009296968524561226948074051004264", "743268323094543466714.565606017700929696852456122694807405100426400624651576046667459841457817767865", 43, RoundingMode.ROUND_FLOOR); + t("-596135", "-596135", 3, RoundingMode.ROUND_CEIL); + t("0.07662404229928167815820747802086592943344134084819", "0.0766240422992816781582074780208659294334413408481864862625859275536716954542357278357044523255", 50, RoundingMode.ROUND_HALF_UP); + t("-0.000000000000000000000000000885256", "-0.000000000000000000000000000885255222637729340070545710310579917592457286140653", 33, RoundingMode.ROUND_UP); + t("55893020145100569857309952693924435456669213.356281068124371401302229274073839082240544043386519", "55893020145100569857309952693924435456669213.356281068124371401302229274073839082240544043386519", 51, RoundingMode.ROUND_UP); + t("0.000000000044398802543439239843437872656117", "0.000000000044398802543439239843437872656117345711426288269229", 42, RoundingMode.ROUND_DOWN); + t("0.000000000000000000000000000026311845042475573561274888459", "0.00000000000000000000000000002631184504247557356127488845876295156781061349824020867304", 57, RoundingMode.ROUND_HALF_EVEN); + t("-127546673151161350153045221729711", "-127546673151161350153045221729711", 2, RoundingMode.ROUND_HALF_DOWN); + t("0.0000000000000000000000846081", "0.00000000000000000000008460817346743347251678412215465432867047065857", 28, RoundingMode.ROUND_FLOOR); + t("-51296363216658187515760473402291", "-51296363216658187515760473402291", 27, RoundingMode.ROUND_HALF_UP); + t("-8623967090632480689370959269411792112227821530531202541003992985", "-8623967090632480689370959269411792112227821530531202541003992985", 54, RoundingMode.ROUND_HALF_DOWN); + t("-966322003490784535731979767036707880939452169502093813823674817588484", "-966322003490784535731979767036707880939452169502093813823674817588484", 56, RoundingMode.ROUND_HALF_DOWN); + t("-272472379898107893040761485379027824396136886208", "-272472379898107893040761485379027824396136886208", 40, RoundingMode.ROUND_DOWN); + t("0.000000000000000000007578294653267877535740172858883482", "0.00000000000000000000757829465326787753574017285888348202441720573692830214583542806201", 55, RoundingMode.ROUND_HALF_EVEN); + t("25958781094763030494523126276550672249453141421083859868561356127876297714106602172585", "25958781094763030494523126276550672249453141421083859868561356127876297714106602172585", 29, RoundingMode.ROUND_HALF_DOWN); + t("0.00000000000000000000000000000000000002", "0.000000000000000000000000000000000000015806075051053843417566111132263641553843698646164", 38, RoundingMode.ROUND_HALF_DOWN); + t("-73099329416955017257739991488405608089647281115099586", "-73099329416955017257739991488405608089647281115099586", 21, RoundingMode.ROUND_HALF_EVEN); + t("-88307320.90319141093816288808957670297463", "-88307320.903191410938162888089576702974638474154077235587259266824247410860533478169707304792818", 32, RoundingMode.ROUND_CEIL); + t("-35236814557361445958969411965214520.30399877405421", "-35236814557361445958969411965214520.303998774054210302477326477", 14, RoundingMode.ROUND_CEIL); + t("-2908087206403224796868158372851057.39782067611", "-2908087206403224796868158372851057.3978206761117082535006786132666114643644421715709235528929678", 11, RoundingMode.ROUND_HALF_UP); + t("-19581413994383784948718328954653", "-19581413994383784948718328954653", 28, RoundingMode.ROUND_DOWN); + t("0.00000000000000000000000000004", "0.000000000000000000000000000040608230569366379665209245709785291404206510745612419401142658", 29, RoundingMode.ROUND_FLOOR); + t("-0.906238977426875501362745", "-0.9062389774268755013627459831223515271076867650054627805581400941104277662892230888597201", 24, RoundingMode.ROUND_CEIL); + t("0", "0.000000000000000000000025517761823978244291048210421988594612225022695964910425529", 21, RoundingMode.ROUND_DOWN); + t("663336.45734367931832199866", "663336.4573436793183219986595282312647796998714487327022132545955984591825466144183", 20, RoundingMode.ROUND_HALF_UP); + t("-461221276.52047063868261544207237644195170184", "-461221276.5204706386826154420723764419517018397461911607", 36, RoundingMode.ROUND_HALF_UP); + t("92664692270788697481952993240101", "92664692270788697481952993240101", 9, RoundingMode.ROUND_DOWN); + t("0.00000000000001", "0.0000000000000000417218487798321067688965201563233239322412080713783058725771499175637", 14, RoundingMode.ROUND_UP); + t("-0.00000000000000291161", "-0.0000000000000029116100944057582762735577555", 21, RoundingMode.ROUND_HALF_EVEN); + t("3593092835933826522602826541522473977510499517734180584911059518", "3593092835933826522602826541522473977510499517734180584911059518", 39, RoundingMode.ROUND_CEIL); + t("0.00000000000240671872382434259", "0.00000000000240671872382434258731759266816542514881094906467645247797685306920193421", 29, RoundingMode.ROUND_HALF_EVEN); + t("98445608185462908936594271820438358882244286228", "98445608185462908936594271820438358882244286228", 43, RoundingMode.ROUND_HALF_UP); + t("-38275693035627727048820160757435988950513161", "-38275693035627727048820160757435988950513161", 28, RoundingMode.ROUND_CEIL); + t("0.000000000000000007838540274247171557849126", "0.000000000000000007838540274247171557849125417291807341828802631329086161031903106930206518314803525", 42, RoundingMode.ROUND_UP); + t("0", "0.0000000000000000000000000000000000000008760161376", 38, RoundingMode.ROUND_HALF_EVEN); + t("-274462946120897177140732986024361620867165740004629583369799434.752624497847", "-274462946120897177140732986024361620867165740004629583369799434.7526244978472107528071824755321251", 12, RoundingMode.ROUND_DOWN); + t("805407519521180265118391229", "805407519521180265118391229", 27, RoundingMode.ROUND_UP); + t("4837.60752412303502514", "4837.60752412303502513085517977565448616961234363618524491896285197928079211821305450283483280681236", 17, RoundingMode.ROUND_UP); + t("19446.966116400627008657626752077217581388920002", "19446.966116400627008657626752077217581388920001650492489914443643730475", 42, RoundingMode.ROUND_HALF_EVEN); + t("259711114990641", "259711114990641", 1, RoundingMode.ROUND_FLOOR); + t("-0.0000000001", "-0.0000000000000000002", 10, RoundingMode.ROUND_UP); + t("80565580.149080509196072203611545842035798415", "80565580.1490805091960722036115458420357984148292066084650845696757793247885015079193577022206528568", 36, RoundingMode.ROUND_HALF_DOWN); + t("0.000000005126609951384222369644011060208031", "0.00000000512660995138422236964401106020803193692417523731220078957765716642", 42, RoundingMode.ROUND_FLOOR); + t("1758006742538130240388703498480688686072955030356.7524172233646685", "1758006742538130240388703498480688686072955030356.75241722336466855", 16, RoundingMode.ROUND_DOWN); + t("-128086989690.52297791537155595882257011356310571016034760745375196584546", "-128086989690.5229779153715559588225701135631057101603476074537519658454607884909539951", 59, RoundingMode.ROUND_CEIL); + t("-361166416734639117275346911473316661252428418964862.401", "-361166416734639117275346911473316661252428418964862.400974469693342990746", 4, RoundingMode.ROUND_HALF_DOWN); + t("71633752430127836728495483808.07484204148983764432608854793881189", "71633752430127836728495483808.074842041489837644326088547938811892934755621628332271860178432369", 35, RoundingMode.ROUND_HALF_UP); + t("5744453717566208360238616812981884481035389801", "5744453717566208360238616812981884481035389801", 46, RoundingMode.ROUND_DOWN); + t("2988347090930431122495200201632971168964831173901728", "2988347090930431122495200201632971168964831173901728", 31, RoundingMode.ROUND_UP); + t("2320482568655945754105081468655336561175857", "2320482568655945754105081468655336561175857", 13, RoundingMode.ROUND_HALF_EVEN); + t("0.0000000000000000000000381190632343589292", "0.0000000000000000000000381190632343589291525554226892790057468635150617798724", 40, RoundingMode.ROUND_HALF_EVEN); + t("-815303438910393610000000000000000000000000000", "-815303438910393610000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("48079804879135055337410501154945563557501499846191760613365317572636043210233866737200001", "48079804879135055337410501154945563557501499846191760613365317572636043210233866737200000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("775141321458031580151353003447938403271713528287267233801607476638641728594600000000001", "775141321458031580151353003447938403271713528287267233801607476638641728594600000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-3246099003639468003580507000000000000000000000000000000000000000000000000000000000000000000000000000", "-3246099003639468003580507000000000000000000000000000000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("616052744557652711", "616052744557652710.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-47298707260000000000000000000000000000000", "-47298707260000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("431370739475777039213491701837719630211035950221951900000000000000000001", "431370739475777039213491701837719630211035950221951900000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("54683100000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", "54683100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("672783487870821678831521822264427999625400000000000000000000000000000000000000001", "672783487870821678831521822264427999625400000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("85750000000000000000000000000000000000000001", "85750000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-357280726879877087440504485199000000000000000000000", "-357280726879877087440504485199000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-4341299477000000000000000000000", "-4341299477000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("31902000001", "31902000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("333458122140379389691720067000000000000000000000000000000000000000000001", "333458122140379389691720067000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-459839025400000000000000000000", "-459839025400000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-82390000000000", "-82390000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("76701", "76700.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("190430490057932227000000000000000000000000000000000000001", "190430490057932227000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("60159411740605592996051862591038032930184607684088677320000000000000000000000001", "60159411740605592996051862591038032930184607684088677320000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-2234900000", "-2234900000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("56189665877093832601689082910000000000000000000000000000000000000001", "56189665877093832601689082910000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("2320000000000000000000000000001", "2320000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-6305981611547961162835048322675738149574948489012480000000000000", "-6305981611547961162835048322675738149574948489012480000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("7135722984978446900000000000000000000000000000000000001", "7135722984978446900000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("7739620000000000000000000000000000000000000000000000001", "7739620000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-7310071091565097458378697755962864041334940666867342517847595229165394387202247229680000000", "-7310071091565097458378697755962864041334940666867342517847595229165394387202247229680000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("5138337172269533148524367880141880518489245800000000000001", "5138337172269533148524367880141880518489245800000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-6000", "-6000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("463879090754017750000000000000001", "463879090754017750000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-629850000000000000000", "-629850000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-205429044500000000000000000000", "-205429044500000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-5416257015618874559905147873000000000000000000000000000000000000000000000000", "-5416257015618874559905147873000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("623364421289248201317000000000000001", "623364421289248201317000000000000000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("911141136528601", "911141136528600.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("-276055672501612195718314543393745315761189100000", "-276055672501612195718314543393745315761189100000.5", 0, RoundingMode.ROUND_HALF_CEIL); + t("66201703687996196493948073895661219741.79732939050299983848272445", "66201703687996196493948073895661219741.79732939050299983848272444531659415942809827190951", 26, RoundingMode.ROUND_HALF_FLOOR); + t("-432784391834045276975262545157922", "-432784391834045276975262545157922", 28, RoundingMode.ROUND_HALF_FLOOR); + t("1149345737914160007440457748332143986414.9571", "1149345737914160007440457748332143986414.957136799115537152433594986979", 4, RoundingMode.ROUND_HALF_FLOOR); + t("-8955086490844848921210649185442547", "-8955086490844848921210649185442547", 35, RoundingMode.ROUND_HALF_FLOOR); + t("425088038661656538743278817856878424164093767.85670041722429249440202331857043", "425088038661656538743278817856878424164093767.85670041722429249440202331857043013807", 33, RoundingMode.ROUND_HALF_FLOOR); + t("-309644694334054373034963302293381012433965117503313464512444644", "-309644694334054373034963302293381012433965117503313464512444644", 15, RoundingMode.ROUND_HALF_FLOOR); + t("-6113258580590430007589739873373442564851315606055053637944", "-6113258580590430007589739873373442564851315606055053637944", 20, RoundingMode.ROUND_HALF_FLOOR); + t("-79578809228411034521778967729244470830365009197702327546767865195836773388369068481948969.900741", "-79578809228411034521778967729244470830365009197702327546767865195836773388369068481948969.9007405268", 6, RoundingMode.ROUND_HALF_FLOOR); + t("-98635952437161220.96618", "-98635952437161220.9661782723695091452045447927505345126085", 5, RoundingMode.ROUND_HALF_FLOOR); + t("5306244228965561737.62447596491901907069113187489713", "5306244228965561737.62447596491901907069113187489712907837802453330192181391370636667897993", 32, RoundingMode.ROUND_HALF_FLOOR); + t("881494696226260293271264.36459456081728760273917638738994049272140009", "881494696226260293271264.36459456081728760273917638738994049272140008956721", 45, RoundingMode.ROUND_HALF_FLOOR); + t("0", "0.0000000000000000398975254", 1, RoundingMode.ROUND_HALF_FLOOR); + t("-2966907742563204474300609285105763571411556718257633358168823625207636310562902929129639632", "-2966907742563204474300609285105763571411556718257633358168823625207636310562902929129639632", 59, RoundingMode.ROUND_HALF_FLOOR); + t("4815226942078558754202763870371111530259178454324372013168459692655444158537", "4815226942078558754202763870371111530259178454324372013168459692655444158537", 58, RoundingMode.ROUND_HALF_FLOOR); + t("89735736519038061687.396102956878866121243318078603705593756032576774631567136", "89735736519038061687.396102956878866121243318078603705593756032576774631567136", 57, RoundingMode.ROUND_HALF_FLOOR); + t("-5139206863826452924558709317549576110217185", "-5139206863826452924558709317549576110217185", 10, RoundingMode.ROUND_HALF_FLOOR); + t("410799450059.233711597011245238081176283367945619000645947401973880735", "410799450059.23371159701124523808117628336794561900064594740197388073499637579092523992206", 59, RoundingMode.ROUND_HALF_FLOOR); + t("-1861173217597843873200339700375118033056165470698896905908777053211294087744", "-1861173217597843873200339700375118033056165470698896905908777053211294087744", 38, RoundingMode.ROUND_HALF_FLOOR); + t("0", "-0.00000000000000006595", 11, RoundingMode.ROUND_HALF_FLOOR); + t("-5407783849362963393803124142731051275240080145012", "-5407783849362963393803124142731051275240080145012", 20, RoundingMode.ROUND_HALF_FLOOR); + t("-34168517091385789116719661427034183841563988149", "-34168517091385789116719661427034183841563988149", 17, RoundingMode.ROUND_HALF_FLOOR); + t("5795445846", "5795445846", 2, RoundingMode.ROUND_HALF_FLOOR); + t("8225834668202811700000", "8225834668202811700000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("-67268029621398311238261431331851556661886545942854113916050734581000000000001", "-67268029621398311238261431331851556661886545942854113916050734581000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("4100000", "4100000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("694900000000000", "694900000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("-2668752017792840000000000000000000000000000000000000000000000000000000000001", "-2668752017792840000000000000000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("5138303265393258323808903836559900000000000000000", "5138303265393258323808903836559900000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("-61599472977109463564534878506157000000000000000000000000000000001", "-61599472977109463564534878506157000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("-706579187032566119663804136174620000000000000000001", "-706579187032566119663804136174620000000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("10", "10.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("903942469098308100136613765218227935820271584538277900367517300000000000000000", "903942469098308100136613765218227935820271584538277900367517300000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("7259090494485579718152684060350290000000000000000000000000000000000000000000000000000000000", "7259090494485579718152684060350290000000000000000000000000000000000000000000000000000000000.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("50", "50.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("-336051", "-336050.5", 0, RoundingMode.ROUND_HALF_FLOOR); + t("12.345", "12.345", null, null); + t("12", "12.345", 0, null); + + tx(() => { bigDecimalFactory.BigDecimal("12.345").ToDP(-23); }, ".toDP(-23)"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightToExponentialTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightToExponentialTests.cs new file mode 100644 index 0000000..7afbabe --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightToExponentialTests.cs @@ -0,0 +1,513 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightToExponential")] + public class BigDecimalLightToExponentialTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToExponential() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (string expected, BigDecimalArgument n, long? dp) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToExponential(dp)); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("1e+0", 1, null); + t("1.1e+1", 11, null); + t("1.12e+2", 112, null); + + t("1e+0", 1, 0); + t("1e+1", 11, 0); + t("1e+2", 112, 0); + t("1.0e+0", 1, 1); + t("1.1e+1", 11, 1); + t("1.1e+2", 112, 1); + t("1.00e+0", 1, 2); + t("1.10e+1", 11, 2); + t("1.12e+2", 112, 2); + t("1.000e+0", 1, 3); + t("1.100e+1", 11, 3); + t("1.120e+2", 112, 3); + t("1e-1", 0.1, null); + t("1.1e-1", 0.11, null); + t("1.12e-1", 0.112, null); + t("1e-1", 0.1, 0); + t("1e-1", 0.11, 0); + t("1e-1", 0.112, 0); + t("1.0e-1", 0.1, 1); + t("1.1e-1", 0.11, 1); + t("1.1e-1", 0.112, 1); + t("1.00e-1", 0.1, 2); + t("1.10e-1", 0.11, 2); + t("1.12e-1", 0.112, 2); + t("1.000e-1", 0.1, 3); + t("1.100e-1", 0.11, 3); + t("1.120e-1", 0.112, 3); + + t("-1e+0", -1, null); + t("-1.1e+1", -11, null); + t("-1.12e+2", -112, null); + t("-1e+0", -1, 0); + t("-1e+1", -11, 0); + t("-1e+2", -112, 0); + t("-1.0e+0", -1, 1); + t("-1.1e+1", -11, 1); + t("-1.1e+2", -112, 1); + t("-1.00e+0", -1, 2); + t("-1.10e+1", -11, 2); + t("-1.12e+2", -112, 2); + t("-1.000e+0", -1, 3); + t("-1.100e+1", -11, 3); + t("-1.120e+2", -112, 3); + t("-1e-1", -0.1, null); + t("-1.1e-1", -0.11, null); + t("-1.12e-1", -0.112, null); + t("-1e-1", -0.1, 0); + t("-1e-1", -0.11, 0); + t("-1e-1", -0.112, 0); + t("-1.0e-1", -0.1, 1); + t("-1.1e-1", -0.11, 1); + t("-1.1e-1", -0.112, 1); + t("-1.00e-1", -0.1, 2); + t("-1.10e-1", -0.11, 2); + t("-1.12e-1", -0.112, 2); + t("-1.000e-1", -0.1, 3); + t("-1.100e-1", -0.11, 3); + t("-1.120e-1", -0.112, 3); + + t("0e+0", 0, null); + t("0e+0", -0, null); + t("-5.0e-1", -0.5, 1); + t("0.00e+0", 0, 2); + t("1e+1", 11.2356, 0); + t("1.1236e+1", 11.2356, 4); + t("1.1236e-4", 0.000112356, 4); + t("-1.1236e-4", -0.000112356, 4); + t("1.12356e-4", 0.000112356, null); + t("-1.12356e-4", -0.000112356, null); + + t("1.00e+0", 0.99976, 2); + t("1.00e+2", 99.9979, 2); + t("1.00e+5", "99991.27839", 2); + t("1.000e+2", "99.999", 3); + t("1.000e+7", "9999512.8", 3); + t("1.00e+9", "999702726", 2); + t("1.000e+3", "999.964717", 3); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + + t("1e-8", "0.00000001", null); + t("1.00000000001e+3", "1000.00000001", null); + t("-5.3453435435e+8", "-53453.435435E4", null); + t("-8.8254658100092746334967191957167916942544e+17", "-882546581000927463.34967191957167916942543286", 40); + t("-4.794121828559674450610889008537305783490457e-9", "-0.00000000479412182855967445061088900853730578349045628396662493370334888944406719979291547717079", 42); + t("3.6149e+33", "3614844933096444884855774574994631.0106397808", 4); + t("5.582954000000000e-12", "0.000000000005582954", 15); + t("-3.88740271991885914774802363151163005925700000000000000000e-24", "-0.000000000000000000000003887402719918859147748023631511630059257", 56); + t("-6.87079645872437277236913190316306435274902613151676421e-20", "-0.00000000000000000006870796458724372772369131903163064352749026131516764202733298056929060151437", 53); + t("3.8181874087278104533737313621586530711155405443818235503358935045749888900678e+35", "381818740872781045337373136215865307.11155405443818235503358935045749888900677769535371296063", 76); + t("-7.11375441247784115059912118586189732891550e+20", "-711375441247784115059.91211858618973289154952986", 41); + t("6.5783e+24", "6578282366667302135641813.7249573246362582", 4); + t("6.000000000000000000000e-20", "0.00000000000000000006", 21); + t("-5.3799672107777e+13", "-53799672107777", 13); + t("-6.949e-23", "-0.00000000000000000000006948849870723", 3); + t("-8.073585184316705309757817e+25", "-80735851843167053097578169.623098209399637950843019109979317", 24); + t("-4.2956483e-12", "-0.0000000000042956482047751", 7); + t("-6.1162155721951440801240154580459651167830311633e+15", "-6116215572195144.0801240154580459651167830311633", 46); + t("-7.263265230767e-21", "-0.000000000000000000007263265230766073544739", 12); + t("-2.3013406115701776345891815e+18", "-2301340611570177634.5891814408272260224632", 25); + t("-6.0299793663e+30", "-6029979366232747481609455093247.705001183386474", 10); + t("-2.97544304967e+21", "-2975443049668038511693.75547178021412", 11); + t("-4.1471192639160032e+10", "-41471192639.1600315953295208128538183546", 16); + t("-3.61201776785294987e+27", "-3612017767852949869824542721.1595027189", 17); + t("-6.9983494044506115115e+17", "-699834940445061151.14676", 19); + t("-1.4580700323629245038287e+20", "-145807003236292450382.86958174", 22); + t("-8.54e+10", "-85390930743", 2); + t("-2.715269856970717e+19", "-27152698569707163435", 15); + t("-5.67681004e+20", "-567681003999187989540.627303416332508226276308449233", 8); + t("-2.06809e+27", "-2068085084336615438842661921.06985539576218546524301", 5); + t("-2.92273061370427012250925e+14", "-292273061370427.0122509240087955481845060858420928631", 23); + t("-4.3355e-17", "-0.0000000000000000433542", 4); + t("-3.491610942584e+21", "-3491610942583064798345", 12); + t("-8.701944635985129980360621e+16", "-87019446359851299.8036062002728328", 24); + t("-4.9e-10", "-0.000000000486409475991", 1); + t("-4.82125e+19", "-48212433366063403866", 5); + t("-7.95593941e-20", "-0.000000000000000000079559394098236", 8); + t("-2.00563e-10", "-0.0000000002005622924388", 5); + t("-6.9777057921142634382521825e+16", "-69777057921142634.3825218243275152606161149381", 25); + t("-8.42591e+14", "-842590769172062", 5); + t("-6.35123264409e+27", "-6351232644080754054285724566", 11); + t("-5.508835492577586495894259979e-28", "-0.00000000000000000000000000055088354925775864958942599785412", 27); + t("-2.667451876e+12", "-2667451875964", 9); + t("-6.6444610474323616283e+26", "-664446104743236162820999716", 19); + t("-2.419775049243e+12", "-2419775049242.726", 12); + t("-5.32e-18", "-0.000000000000000005319", 2); + t("-8.63030355223e-26", "-0.000000000000000000000000086303035522286938593814060049934", 11); + t("-2.5046920981956385048538613818080285657602718e+17", "-250469209819563850.48538613818080285657602717018", 43); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + + t("0e+0", "-0.0E-0", null); + t("-2.856376815219143184897347685012382222462687620998915470135915e+6", "-2856376.815219143184897347685012382222462687620998915470135915511363444", 60); + t("7.75700e-24", "0.000000000000000000000007757", 5); + t("7.0e-1", "0.7", 1); + t("5.2109749078977455423107465583658126e+37", "52109749078977455423107465583658126637", 34); + t("3.631093819552528994444977110063007461579154042777868294000e-29", "0.00000000000000000000000000003631093819552528994444977110063007461579154042777868294", 57); + t("-9.893937860425888e+8", "-989393786.042588804219191", 15); + t("8.7978043622607467e+42", "8797804362260746751563912625017414439944006.5804807", 16); + t("-4.6561702764394602621e-7", "-0.000000465617027643946026213823955447791862428108248596086901464075785390015", 19); + t("-2.542770482242902215596924884302407e+8", "-254277048.224290221559692488430240765024783", 33); + t("2.70000000e-8", "0.000000027", 8); + t("-8.0291821891769794408790934252924453237e+16", "-80291821891769794.408790934252924453237503615825249362166", 37); + t("-8.05295923004057358545854771e-16", "-0.0000000000000008052959230040573585458547716514262", 26); + t("-2.786758e-21", "-0.00000000000000000000278675879025858093817787290334306", 6); + t("-8.0160835624737225803853824687641777660406527e+20", "-801608356247372258038.538246876417776604065270622886204812876", 43); + t("-7.2849054887999144694619191770897589e+27", "-7284905488799914469461919177.08975892527524", 34); + t("-7.586e-17", "-0.00000000000000007586908", 3); + t("-5.9508150933636580674249602941673984254864e+20", "-595081509336365806742.496029416739842548642249", 40); + t("-3.526911897e-18", "-0.000000000000000003526911897770082481187", 9); + t("-5.774e-22", "-0.0000000000000000000005774729035676859", 3); + t("-6.4700957007714124190210074e-13", "-0.00000000000064700957007714124190210074383", 25); + t("-5.610492e+21", "-5610492566512449795573", 6); + t("-6.015e+23", "-601556443593022914280678", 3); + t("-6.0673361553344e+11", "-606733615533.448288878", 13); + t("-3.1e+26", "-315617199368461055533962323.071668327669249", 1); + t("-9.1391079512104562032343e+24", "-9139107951210456203234346", 22); + t("-2.0441e+21", "-2044198307917443182711", 4); + t("-8.21283723216249535240085606500821783973097233e+23", "-821283723216249535240085.606500821783973097233814324", 44); + t("-6.375e+14", "-637540984314799.4", 3); + t("-2.17797482005219478530856429744726e+29", "-217797482005219478530856429744.7268928676963181", 32); + t("-3.9547e+11", "-395476721391", 4); + t("-6.8927e+21", "-6892798573971046301111", 4); + t("-6.33842141402916538926e-12", "-0.000000000006338421414029165389261335065112712777", 20); + t("-4.5727e-30", "-0.000000000000000000000000000004572725511159166", 4); + t("-7.8847457779026882221249217577974e-17", "-0.000000000000000078847457779026882221249217577974", 31); + t("-2.64916231640264927e+12", "-2649162316402.649271824", 17); + t("-1.73604404e+28", "-17360440496948254515028685124.37795415803082546457797184294", 8); + t("-8.680224985623e+16", "-86802249856236148.11694273469092873", 12); + t("-4.3e-19", "-0.00000000000000000043859841576346037715462713764211635", 1); + t("-7.68867535389098159141717105e-11", "-0.000000000076886753538909815914171710501337139", 26); + t("-5.24325038611090505928389422325001606e+21", "-5243250386110905059283.894223250016067979080420266", 35); + t("-1.38e-21", "-0.0000000000000000000013874592057586367688528204069850262406", 2); + t("-7.308601949094508589445770582074109410615037e+24", "-7308601949094508589445770.5820741094106150373221910779", 42); + t("-3.2638e+13", "-32638405387645.3309565877781780222317335852159983", 4); + t("-3.55454737448094719019291183206515059962378e+22", "-35545473744809471901929.118320651505996237856336054914", 41); + t("-5.3906242252792e-11", "-0.00000000005390624225279268530907215395611", 13); + t("-8.86760873811213105078e+15", "-8867608738112131.050787", 20); + t("-4.78129254835567e-23", "-0.00000000000000000000004781292548355671480462711435866243551", 14); + t("-6.4694208834502691835879021438795583630205e-19", "-0.00000000000000000064694208834502691835879021438795583630205", 40); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_CEIL; + + t("0e+0", "0E0000000000", null); + t("0e+0", "-0E01", null); + t("0.00e+0", "-0E00000000001", 2); + t("3.0465655253692145345165166442116e-14", "0.0000000000000304656552536921453451651664421156", 31); + t("9.0573943842008592406279608542923313381394286641978907203396551e+22", "90573943842008592406279.60854292331338139428664197890720339655043720040907662489784", 61); + t("-1.17181502970008783734855040984899000e-1", "-0.117181502970008783734855040984899", 35); + t("-5.28860565e-16", "-0.00000000000000052886056528317233012115396784629214632", 8); + t("6.4114675970838738000e-18", "0.0000000000000000064114675970838738", 19); + t("8.00000000000000000000e-20", "0.00000000000000000008", 20); + t("2.74000064578288771723078597711103520450391668117802304078152085625023633681179e+24", "2740000645782887717230785.977111035204503916681178023040781520856250236336811781347278", 77); + t("8.1936742669491704846805837777816457628e-16", "0.00000000000000081936742669491704846805837777816457628", 37); + t("-7.2157448e+14", "-721574484716710.00141299844961546", 7); + t("-5.321807464703650000000e-15", "-0.00000000000000532180746470365", 21); + t("-4.449e+27", "-4449471658582621135143349142.228707647170080816912435271162", 3); + t("-4.922915821313919623758e+19", "-49229158213139196237.584", 21); + t("-6.996668225774098e-14", "-0.000000000000069966682257740984029052", 15); + t("-8.6856039174822133942616012424795168e+11", "-868560391748.2213394261601242479516861829472792", 34); + t("-8.461e+21", "-8461810373307862460504", 3); + t("-3.898716627703194625824411967e+25", "-38987166277031946258244119.67718", 27); + t("-2.821935496755e+26", "-282193549675582402670759843.23655", 12); + t("-3.49e-22", "-0.0000000000000000000003491662482987", 2); + t("-3.362111778576231615366457333e-14", "-0.0000000000000336211177857623161536645733316587527475522615", 27); + t("-5.9933e-13", "-0.00000000000059933412636903331", 4); + t("-2.77927721e+29", "-277927721100404435781172100113.4136636412460458083951", 8); + t("-1.876833722329e-10", "-0.0000000001876833722329987477942", 12); + t("-6.5e+14", "-653341175209856", 1); + t("-8.627291840173867961e+14", "-862729184017386.7961", 18); + t("-3.9137457165597668391301218029e-11", "-0.00000000003913745716559766839130121802935022889", 28); + t("-8.95e+10", "-89532775488", 2); + t("-2.1395541875015568986238e-17", "-0.000000000000000021395541875015568986238771696", 22); + t("-4.98575853353890809143399546448630559732119628e-12", "-0.00000000000498575853353890809143399546448630559732119628509", 44); + t("-8.99e+16", "-89989591559494822", 2); + t("-3.49346327e+22", "-34934632714180035424463", 8); + t("-3.5699537605753905457597e-14", "-0.00000000000003569953760575390545759785014980652333323889116", 22); + t("-2.9892536880349975618286e+12", "-2989253688034.9975618286212199904979534461637613", 22); + t("-3.04383919217904949618e+10", "-30438391921.790494961888803732171", 20); + t("-8.232411544e+17", "-823241154405701456", 9); + t("-5.809151226990464016815e-16", "-0.00000000000000058091512269904640168152354", 21); + t("-8.522042397326932431e+13", "-85220423973269.324312660179132118", 18); + t("-7.5210942e-22", "-0.000000000000000000000752109428925015", 7); + t("-5.2018321449543e+23", "-520183214495439298725191.09", 13); + t("-6.04084045453711395629268198016245611021901815e+21", "-6040840454537113956292.68198016245611021901815486929628647", 44); + t("-1.495478178996755138125934544343674798e-13", "-0.00000000000014954781789967551381259345443436747983317353423", 36); + t("-6.881484497510733524151245220630282259985306546537e+16", "-68814844975107335.241512452206302822599853065465371507616758", 48); + t("-4.7121389019956e-14", "-0.00000000000004712138901995619", 13); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + + t("-9.99999999000000009e+8", "-999999999.000000009e-0", null); + t("-3.99764422903251220452704763278376060858663250289320247532595e+24", "-3997644229032512204527047.63278376060858663250289320247532594416986984981431156065660613", 59); + t("5.534083545686157907280686578717428772e+12", "5534083545686.157907280686578717428772", 36); + t("5.00000000e-9", "0.000000005", 8); + t("-4.08363116583051e+14", "-408363116583051", 14); + t("9.278230415634296945273818e+19", "92782304156342969452.738186255580532649103987374718221928871873054827841260470670536425", 24); + t("-1.08732508998603085454662e-12", "-0.000000000001087325089986030854546619968259691229662152159029641023997866843605032534351388775075", 23); + t("3.5288804517377606688698e+32", "352888045173776066886981811418233.218955856086", 22); + t("4.32188781438877554e+16", "43218878143887755.42593887518334667202", 17); + t("-8.15e+2", "-815", 2); + t("1.515077312590223222678749527e+18", "1515077312590223222.678749527895871363186918977679783240817218232896076765321818445939718165", 27); + t("-8.0538186421664536509917032729912932814374102e+20", "-805381864216645365099.17032729912932814374101821", 43); + t("-3.4367097301002099047381e+14", "-343670973010020.990473804391071456587732173", 22); + t("-5.3421e-12", "-0.0000000000053420288504", 4); + t("-2.6320052e+23", "-263200517731973006983184.60341959097016190770542276", 7); + t("-4.5e-11", "-0.000000000044673422483", 1); + t("-7.232463101115829118145025733451801e-17", "-0.00000000000000007232463101115829118145025733451800457178", 33); + t("-1.18320100044154762448545914170978206041022039e+22", "-11832010004415476244854.5914170978206041022038489", 44); + t("-7.745237371276392645711e+21", "-7745237371276392645710.0521930569226728841707200771", 21); + t("-4.431559500053255695643e-10", "-0.000000000443155950005325569564213010993378905", 21); + t("-2.5e-24", "-0.000000000000000000000002443", 1); + t("-5.005027028439023958391203127005503621542e-11", "-0.0000000000500502702843902395839120312700550362154137", 39); + t("-6.453525377934213334367e-22", "-0.00000000000000000000064535253779342133343665123283565", 21); + t("-4.5594370326121718626850982373529e+13", "-45594370326121.71862685098237352845979966987", 31); + t("-1.709e+16", "-17088248121660259", 3); + t("-3.9047581533864713e+16", "-39047581533864712.6574405", 16); + t("-2.08804202e-17", "-0.000000000000000020880420127397564274443250271135", 8); + t("-6.801694635944774655689008216925036e+15", "-6801694635944774.65568900821692503508025", 33); + t("-8.7691286374104240967931800593734e+19", "-87691286374104240967.93180059373367907299683816381677816389", 31); + t("-2.802257731715238453e-29", "-0.000000000000000000000000000028022577317152384526775320012", 18); + t("-4.4705e+22", "-44704405768781565005877.813010169083", 4); + t("-4.17374908496486449232e-10", "-0.00000000041737490849648644923105632500267064", 20); + t("-2.2707e-10", "-0.00000000022706134122862417334386435", 4); + t("-2.85432e-24", "-0.0000000000000000000000028543100839983854161", 5); + t("-5.79188949e+12", "-5791889489461.643555240257", 8); + t("-7.46e+15", "-7459701910718662.03421293892346992893463534702", 2); + t("-1.0535086280629e+25", "-10535086280628995915087428.2423609320023833125322801559606", 13); + t("-2.9074412651647188367106e+30", "-2907441265164718836710598468491.31550321772", 22); + t("-5.010945976711327691649e+27", "-5010945976711327691648509517.2305", 21); + t("-8.8633960213386533e-20", "-0.0000000000000000000886339602133865324283362544", 16); + t("-3.1891844834898211661452730714015664837805e+19", "-31891844834898211661.45273071401566483780434051217", 40); + t("-5.083380976014365533843229882526437e+28", "-50833809760143655338432298825.264367948359", 33); + t("-6.8e-16", "-0.000000000000000678534987604148025611184", 1); + t("-7.9e+30", "-7838656097386639584904346062976.9346038436", 1); + t("-6.30535781e+20", "-630535780834495012856", 8); + t("-9.663e-30", "-0.00000000000000000000000000000966289400023904753107633012", 3); + t("-2.315198482309e+12", "-2315198482308.7361348", 12); + t("-8.158235289416e+18", "-8158235289415958939", 12); + t("-4.1618890517404316933699206360639988582832624525e+23", "-416188905174043169336992.063606399885828326245241437", 46); + t("-5.97550716981833990839441709632e+21", "-5975507169818339908394.41709631281058258352209", 29); + t("-6.3372e-18", "-0.000000000000000006337122571683959413228", 4); + t("-8.9189088e+18", "-8918908714500548003.38400978696756078013348", 7); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + + t("-5.002239116605888927178702930656e-39", "-0.00000000000000000000000000000000000000500223911660588892717870293065633642", 30); + t("-8.52292947230244775435e+29", "-852292947230244775434968241532.494643593912804433318745222587246680109833509655450267792446", 20); + t("-6.1169514510867e+10", "-61169514510.8673382", 13); + t("-8.05745763527307676170759722175169266017831695215e+48", "-8057457635273076761707597221751692660178316952146", 47); + t("-4.923572102098e+10", "-49235721020.9847017846898652687600227388412980598816", 12); + t("-7.981341661715027117746906076515945e+41", "-798134166171502711774690607651594491039629", 33); + t("-8.00e-3", "-0.008", 2); + t("8.517466793430899278197016892000000000000e-15", "0.000000000000008517466793430899278197016892", 39); + t("-3.032293512e+0", "-3.0322935124071923328711934463341802038", 9); + t("-2.60682904403489305678908771323995810138267385200000000e-20", "-0.00000000000000000002606829044034893056789087713239958101382673852", 53); + t("-3.935816927273980e+20", "-393581692727398036652.850960055902271", 15); + t("-8.5902152501051e+29", "-859021525010507210136559039003.689834129033952321238", 13); + t("-7.24491e-30", "-0.00000000000000000000000000000724490826045045451271534", 5); + t("-8.4948070285349193974989221504919380656715136165603325e+24", "-8494807028534919397498922.15049193806567151361656033246", 52); + t("-6.3295239596e-17", "-0.00000000000000006329523959626011114164", 10); + t("-3.1725692353e+30", "-3172569235260846783669130724638.711", 10); + t("-4.065727077e+11", "-406572707673.336570352310681187663765", 9); + t("-6.82883869249998075574247223155497e+18", "-6828838692499980755.7424722315549682855987375899188309581152", 32); + t("-2.56144400427045214943786338e+24", "-2561444004270452149437863.38354535663028539", 26); + t("-4.97637439956044400125498868e+23", "-497637439956044400125498.8682100590602459937304614141772", 26); + t("-4.307891929198702822746534506143e+29", "-430789192919870282274653450614.349564081", 30); + t("-8.55e-27", "-0.00000000000000000000000000855367295711812079", 2); + t("-7.906e+11", "-790612526329.410459220189562", 3); + t("-3.1841363e-22", "-0.00000000000000000000031841363", 7); + t("-6.2068049304845006e+20", "-620680493048450055389.3227069760888437941041", 16); + t("-8.4809476e+18", "-8480947614295114807.320148688", 7); + t("-2.287988570734255855e+23", "-228798857073425585542366.399034916953775", 18); + t("-8.148647139762925073276164486240320698e+21", "-8148647139762925073276.1644862403206980851079", 36); + t("-6.87643138785664756e-12", "-0.0000000000068764313878566475604352570287089535238582267443", 17); + t("-3.709587e+18", "-3709586618852569033.55141868", 6); + t("-6.8086794224e+28", "-68086794224433270564431694468.814537646575833889824621540849", 10); + t("-4.966301085179e+19", "-49663010851788946007", 12); + t("-5.34439184068052811184219234494114e+26", "-534439184068052811184219234.494113670484623394", 32); + t("-2.798732412e+16", "-27987324119455299", 9); + t("-1.554430791885961957e+15", "-1554430791885961.956863404519493346081223", 18); + t("-6.90619083822075003978e+24", "-6906190838220750039778836.289105048686876596", 20); + t("-1.108034176809770578315e+12", "-1108034176809.7705783154", 21); + t("-1.43e+22", "-14266566332440117777110.63461224926682073525873105", 2); + t("-9.15e+13", "-91477543307040.916791223", 2); + t("-1.1001e+26", "-110010856476508992391958436.9355559264588205214557001854", 4); + t("-1.2e+16", "-12148027447349021", 1); + t("-4.4e+13", "-44268551660889.40880208546489742632181832780494", 1); + t("-8.62058920338555484081691e+19", "-86205892033855548408.169086865949596390775", 23); + t("-5.2e-13", "-0.00000000000051876025261394172", 1); + t("-4.88063953404884862027221562057786242658496407473e-11", "-0.0000000000488063953404884862027221562057786242658496407473", 47); + t("-5.255e+18", "-5254530327311322805.9528217", 3); + t("-6.4630488003995117e-11", "-0.0000000000646304880039951167486", 16); + t("-8.638990742871e-16", "-0.0000000000000008638990742870608", 12); + t("-1.57817750020560815944470062e+12", "-1578177500205.60815944470062002898187", 26); + t("-3.6558384593093900422637e-27", "-0.00000000000000000000000000365583845930939004226367940618", 22); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_DOWN; + + t("4.95474614815842e+38", "495474614815842191683004449862568813538.573064401156", 14); + t("-8.9667567079038139e+16", "-89667567079038139", 16); + t("-7.0e+2", "-703", 1); + t("-2.6249e+33", "-2624861185343559570287214983819906", 4); + t("-6.510119186347371697501169416839709631422185436811698613000000000000000000000000000000e-31", "-0.0000000000000000000000000000006510119186347371697501169416839709631422185436811698613", 84); + t("7.73e+3", "7729", 2); + t("1.4393781011009257793117531801549e+4", "14393.781011009257793117531801548751", 31); + t("8.4e+6", "8404542", 1); + t("8.471284625267663009248667391059202502589207637435209861233007389000000000000000e-35", "0.00000000000000000000000000000000008471284625267663009248667391059202502589207637435209861233007389", 78); + t("-5.26079297227015e+31", "-52607929722701509263909039511536.9266822991", 14); + t("-4.63550600857003551411914120562163394e+15", "-4635506008570035.51411914120562163394396594237358863897062", 35); + t("-7.8219563406482338767189100434751303552919130625101491e+27", "-7821956340648233876718910043.4751303552919130625101491", 52); + t("-6.977184098e+17", "-697718409782854734", 9); + t("-8.1e+15", "-8092701222454628.9934935902179330839653799891168", 1); + t("-3.872944373744596915691884729973e+15", "-3872944373744596.91569188472997336351132980366520033057011287", 30); + t("-1.389676e+11", "-138967565295.146055555208419143848718279114979831585", 6); + t("-2.218316993130903882223e+19", "-22183169931309038822.22612", 21); + t("-3.370809304e-25", "-0.000000000000000000000000337080930401566", 9); + t("-6.1503e+19", "-61503417721509415792.24703", 4); + t("-3.13657134e-22", "-0.00000000000000000000031365713378439345", 8); + t("-1.9e-10", "-0.000000000187981", 1); + t("-2.596508353714425677970049724e+28", "-25965083537144256779700497237.5841327343962292316215149169", 27); + t("-4.151454545748277604112308101174917062e+11", "-415145454574.827760411230810117491706171981266892178", 36); + t("-1.3e-18", "-0.000000000000000001319061308619561567664259803361817", 1); + t("-1.5294854487046553159e+24", "-1529485448704655315921667", 19); + t("-1.9365487654708143765583400538310103350799e-13", "-0.000000000000193654876547081437655834005383101033507988", 40); + t("-3.88128259276357427027515474e+25", "-38812825927635742702751547.353", 26); + t("-5.64525474904155517374289736218e-11", "-0.00000000005645254749041555173742897362182099811344", 29); + t("-8.94963385755006409131430087734467745e+22", "-89496338575500640913143.0087734467744538", 35); + t("-3.7551731901764025e+17", "-375517319017640249", 16); + t("-7.601921e-16", "-0.00000000000000076019214974360137746140339586742455753", 6); + t("-6.93501087055e+20", "-693501087055377288564", 11); + t("-1.283656440009563e+24", "-1283656440009563292695670.575360580373829197017512", 15); + t("-4.9556506e+13", "-49556505932168.7211084603", 7); + t("-8.133584588946e+26", "-813358458894586332533196788.490201803951456991010654609646", 12); + t("-3.824207296e+22", "-38242072955850210158724", 9); + t("-4.2168087e-12", "-0.00000000000421680868317080291", 7); + t("-7.152812829e+15", "-7152812829336253.782723153403637377960530795", 9); + t("-8.0469635248612874571e+16", "-80469635248612874.5712104436", 19); + t("-2.726549954018643349550392804e+11", "-272654995401.8643349550392803783934819148125595437353472547", 27); + t("-2.477986360297097033217143e+30", "-2477986360297097033217143442370.539404", 24); + t("-2.7620555408e+15", "-2762055540757162", 10); + t("-5.044e+10", "-50436788962", 3); + t("-1.51176171306898543927009427965761639e+17", "-151176171306898543.9270094279657616389483779413616294465635", 35); + t("-1.77876313221062362e+17", "-177876313221062362.01", 17); + t("-4.28033364715744300662536e+13", "-42803336471574.430066253616", 23); + t("-6.053e-13", "-0.00000000000060527568964627046163209582", 3); + t("-3.9447068214322315685949701607748761e+16", "-39447068214322315.685949701607748760885392781169754754427622", 34); + t("-4.76203665586552028e+15", "-4762036655865520.285", 17); + t("-7.442141482296791204320219247230530359e+24", "-7442141482296791204320219.2472305303585223494415", 36); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_EVEN; + + t("-4.3502707501164e+36", "-4350270750116411997402439304498892819", 13); + t("9.5e-21", "0.0000000000000000000094520280724178734152", 1); + t("1.39631186750554172785676012693418617250072200744214625994656047727270672248243741907e+34", "13963118675055417278567601269341861.725007220074421462599465604772727067224824374190703237660781", 83); + t("5.9446570e-26", "0.00000000000000000000000005944657036540768164877637239177740419063920648", 7); + t("7.00000e-12", "0.000000000007", 5); + t("-2.87e+14", "-287060740776209.3950381715", 2); + t("3.411740542875509329e+24", "3411740542875509328514044", 18); + t("-6.20235112738687046118395830000000000000000000000e-29", "-0.000000000000000000000000000062023511273868704611839583", 47); + t("2.94349130121570276626863135396717336528655493e+19", "29434913012157027662.686313539671733652865549279174", 44); + t("4.01255076512828067130306533670644537832e-10", "0.000000000401255076512828067130306533670644537831678294548", 38); + t("-5.4277306444432e+11", "-542773064444.317654960431120452254700391693837992", 13); + t("-4.355706886680889557797360814402e+30", "-4355706886680889557797360814401.536556745674646509159280626", 30); + t("-1.29e-15", "-0.00000000000000128978312277001609181774216296380783932", 2); + t("-1.0588973816292989769e+25", "-10588973816292989768709129.1767038708798755780352204", 19); + t("-3.210569596e+10", "-32105695962.8803639621", 9); + t("-7.18504270173744681360682714959e+28", "-71850427017374468136068271495.87", 29); + t("-4.615682142828269066227773895179987062919e+20", "-461568214282826906622.7773895179987062919071922", 39); + t("-1.3864477517287155526073e+13", "-13864477517287.15552607265", 22); + t("-6.793120028e+13", "-67931200280922.72252141789646787475433427482", 9); + t("-8.075e-18", "-0.000000000000000008074975073002274636799975", 3); + t("-8.360228691054180854419062530687032074820667001e+24", "-8360228691054180854419062.530687032074820667001120752628", 45); + t("-3.0763956760417194035216e-12", "-0.000000000003076395676041719403521594", 22); + t("-2.5288383e+25", "-25288383009460922631988717.84659997837058450749", 7); + t("-4.554185192e+29", "-455418519247311560996997520087.98189", 9); + t("-9.135175372324138467397264e+11", "-913517537232.413846739726417", 24); + t("-8.257259383044471855222900534859251889332388855848e-10", "-0.0000000008257259383044471855222900534859251889332388855848", 48); + t("-7.651597268450922707e-13", "-0.000000000000765159726845092270720405167100094", 18); + t("-8.952011763950994514e+26", "-895201176395099451377549961.34870447", 18); + t("-2.7395479569618982298152060567357e-10", "-0.00000000027395479569618982298152060567357", 31); + t("-1.31151451700453378841431e+24", "-1311514517004533788414313", 23); + t("-5.915297930316863891e-10", "-0.0000000005915297930316863890707686339684395", 18); + t("-1.449e-27", "-0.0000000000000000000000000014487033279693402845128265141859", 3); + t("-3.7e+10", "-36919550406.826974442743517918128", 1); + t("-3.945347688940382499631779106638865e+13", "-39453476889403.824996317791066388653", 33); + t("-8.547704e-29", "-0.0000000000000000000000000000854770378842608635356", 6); + t("-3.76e+25", "-37618296325402619735777629.467812385256281737441412", 2); + t("-8.031066086398624e+28", "-80310660863986235667567286452", 15); + t("-4.038276256088135496e-17", "-0.000000000000000040382762560881354955896694823328777602811", 18); + t("-1.77173574740860868e+25", "-17717357474086086837250852", 17); + t("-1.421967649e+21", "-1421967648805122645888", 9); + t("-4.7e+11", "-469485715327", 1); + t("-7.372223291560455075681748682810527006883e+16", "-73722232915604550.75681748682810527006882666313809409", 39); + t("-8.9539396357e+14", "-895393963565598", 10); + t("-8.14646103854802172250414801405e+10", "-81464610385.48021722504148014045579178726", 29); + t("-1.2053415734425581e+12", "-1205341573442.5581371841633131879", 16); + t("-8.35214176861046133596101313170854966756043001e+28", "-83521417686104613359610131317.0854966756043001041619492", 44); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + + t("-2.033619450856645241153977e+0", "-2.03361945085664524115397653636144859", 24); + t("1.130e+8", "112955590.0430616", 3); + t("-2.1366468193419876852426155614364269e+10", "-21366468193.419876852426155614364269", 34); + t("5.82086615659566151529e+7", "58208661.56595661515285734890860077163", 20); + t("9.1615809372817426111208e+6", "9161580.937281742611120838868847823478250167882379624", 22); + t("3.8976506901061164197e+1", "38.97650690106116419699490320634490920742414", 19); + t("9.0994914931570087194607344641722310104e+6", "9099491.4931570087194607344641722310103895224905", 37); + t("6.06e+5", "605633", 2); + t("2.6999974790473705518992117e+1", "26.9999747904737055189921170044987", 25); + t("6.7108801361722e+6", "6710880.136172156342982663450743452", 13); + t("-8.0e+0", "-8", 1); + t("3.000e-2", "0.03", 3); + t("-4.7e+2", "-469", 1); + t("-6.3000e+0", "-6.3", 4); + t("-5.4e+2", "-542", 1); + t("-5.2000e+0", "-5.2", 4); + t("-9.00000e-2", "-0.09", 5); + t("-3.1000e-1", "-0.31", 4); + t("-4.4e+2", "-436", 1); + t("-3.00e+0", "-3", 2); + t("-5.00e-2", "-0.05", 2); + t("1.00e-2", "0.01", 2); + + t("1.23e+2", "123", null); + t("1e+2", "123", 0); + t("1e+2", "123", -0); + + tx(() => { bigDecimalFactory.BigDecimal(1.23).ToExponential(-23); }, ".toExponential(-23)"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightToFixedTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightToFixedTests.cs new file mode 100644 index 0000000..5c724c0 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightToFixedTests.cs @@ -0,0 +1,526 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightToFixed")] + public class BigDecimalLightToFixedTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToFixed() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (string expected, BigDecimalArgument n, long? dp) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToFixed(dp)); + }; + + t("100.0", 99.9512986, 1); + t("10.0", 9.95036, 1); + t("1.0", 0.99, 1); + t("0.10", 0.09906, 2); + t("0.010", 0.0098034, 3); + + t("1111111111111111111111.00000000", "1111111111111111111111", 8); + t("0.1", 0.1, 1); + t("0.10", 0.1, 2); + t("0.100", 0.1, 3); + t("0.01", 0.01, 2); + t("0.010", 0.01, 3); + t("0.0100", 0.01, 4); + t("0.00", 0.001, 2); + t("0.001", 0.001, 3); + t("0.0010", 0.001, 4); + t("1.0000", 1, 4); + t("1.0", 1, 1); + t("1", 1, 0); + t("12", 12, 0); + t("1", 1.1, 0); + t("12", 12.1, 0); + t("1", 1.12, 0); + t("12", 12.12, 0); + t("0.0000006", 0.0000006, 7); + t("0.00000006", 0.00000006, 8); + t("0.000000060", 0.00000006, 9); + t("0.0000000600", 0.00000006, 10); + t("0", 0, 0); + t("0.0", 0, 1); + t("0.00", 0, 2); + + t("-1111111111111111111111.00000000", "-1111111111111111111111", 8); + t("-0.1", -0.1, 1); + t("-0.10", -0.1, 2); + t("-0.100", -0.1, 3); + t("-0.01", -0.01, 2); + t("-0.010", -0.01, 3); + t("-0.0100", -0.01, 4); + t("-0.00", -0.001, 2); + t("-0.001", -0.001, 3); + t("-0.0010", -0.001, 4); + t("-1.0000", -1, 4); + t("-1.0", -1, 1); + t("-1", -1, 0); + t("-1", -1.1, 0); + t("-12", -12.1, 0); + t("-1", -1.12, 0); + t("-12", -12.12, 0); + t("-0.00000", -0.0000006, 5); + t("-0.0000006", -0.0000006, 7); + t("-0.00000006", -0.00000006, 8); + t("-0.000000060", -0.00000006, 9); + t("-0.0000000600", -0.00000006, 10); + t("0", 0, 0); + t("0", -0, 0); + t("0.0", -0, 1); + t("0.00", -0, 2); + t("0.00", "-0.0", 2); + t("0.00", "-0.0000", 2); + t("0.0000", -0, 4); + + t("1000", 1000, null); + t("0.00001", 0.00001, null); + t("0.00001", 0.00001, 5); + t("0.00000000000000000010", "0.0000000000000000001", 20); + t("0.00001000000000000", 0.00001, 17); + t("1.00000000000000000", 1, 17); + t("1000000000000000128", "1000000000000000128", null); + t("100000000000000128.0", "100000000000000128", 1); + t("10000000000000128.00", "10000000000000128", 2); + t("10000000000000128.00000000000000000000", "10000000000000128", 20); + t("0", 0, null); + t("-42.000", -42, 3); + t("-1000000000000000128", "-1000000000000000128", null); + t("-0.00000000000000000010", "-0.0000000000000000001", 20); + t("0.12312312312312300000", "0.123123123123123", 20); + + t("1", 0.5, 0); + t("-1", -0.5, 0); + t("1.3", 1.25, 1); + t("234.2041", 234.20405, 4); + t("234.2041", "234.204050000000000000000000000000006", 4); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + + t("0.000001", "0.000001", 6); + t("6552606716539719300271040797809220.3", "6552606716539719300271040797809220.237838405", 1); + t("25605410.260045950231371", "25605410.260045950231370974066", 15); + t("-65593283.0000", "-65593283", 4); + t("-2238743875407788208860272230040067273281097722822075126.88000000000", "-2238743875407788208860272230040067273281097722822075126.88", 11); + t("-1714042659419404211.0000000", "-1714042659419404211", 7); + t("580861301.000", "580861301", 3); + t("-495746734.000", "-495746734", 3); + t("-909962202.00000", "-909962202", 5); + t("-6588.00", "-6588", 2); + t("-89235424125324.000000", "-89235424125324", 6); + t("-0.0001", "-0.0000000000177", 4); + t("-0.1", "-0.000000000000007", 1); + t("7086047552021418140460170703933026989776558656.864197000000000", "7086047552021418140460170703933026989776558656.864197", 15); + t("-0.0000000001", "-0.0000000000000000007707", 10); + t("6613833500.133407255728", "6613833500.133407255727325566781771", 12); + t("-0.60", "-0.6", 2); + t("-5800577761301861465745732694236894834.347199790459214393940", "-5800577761301861465745732694236894834.34719979045921439394", 21); + t("65495133621931312001260.90", "65495133621931312001260.89870016055223846451749943336585697", 2); + t("-0.0000001", "-0.0000000000021727264987520611266069544793244453321336", 7); + t("5138338134667513058267845351654.0073", "5138338134667513058267845351654.007282", 4); + t("-419591612781413402.1606094651083282", "-419591612781413402.16060946510832813452", 16); + t("-842984708.00000", "-842984708", 5); + t("6094679992788973717749530934167375519948195193196.00000000000", "6094679992788973717749530934167375519948195193196", 11); + t("3070926.00", "3070926", 2); + t("-0.0000000000000004274", "-0.00000000000000042733957907641417564294", 19); + t("-307434.0", "-307434", 1); + t("-7155930111672774753753.84501482871023", "-7155930111672774753753.845014828710226", 14); + t("-204638.0", "-204638", 1); + t("67354.81", "67354.801797", 2); + t("0.000042911675", "0.000042911674899533228107357062", 12); + t("-57865060735863.5903347110", "-57865060735863.590334711", 10); + t("-0.00889", "-0.0088857", 5); + t("655593535442553089245040020344044.000000000000", "655593535442553089245040020344044", 12); + t("-2077237944012133216588518213.9402", "-2077237944012133216588518213.9401561759783653376", 4); + t("3354.50", "3354.49314543", 2); + t("-0.00001", "-0.000000000000091204118667391473401958802734362777499449233", 5); + t("-2817626898661648124242602088971648489124280903.00000000000000000000000", "-2817626898661648124242602088971648489124280903", 23); + t("-0.1138", "-0.1137406345875745478881089475981775971743", 4); + t("372625.84", "372625.836933301", 2); + t("-0.0001", "-0.0000000000030295", 4); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + + t("0.3", "0.3", 1); + t("-200258348374.3", "-200258348374.3595802551014614089785610548492885372322083789", 1); + t("-8996550690041157178188143247448286757711.5580857413", "-8996550690041157178188143247448286757711.55808574133329", 10); + t("-3172413669280032477.00", "-3172413669280032477", 2); + t("6547946357820.750067107731812021675", "6547946357820.750067107731812021675351468709784004", 21); + t("24188393190716631282750407915133817062572333100239.0000000000000000000", "24188393190716631282750407915133817062572333100239", 19); + t("539982361589798324286450574560330534901309503.82000000", "539982361589798324286450574560330534901309503.82", 8); + t("829898800701640360552652.0000", "829898800701640360552652", 4); + t("-1585782773394.4", "-1585782773394.44501382110847", 1); + t("-7604844176594943774211951887242195107.399", "-7604844176594943774211951887242195107.399576743428669618164", 3); + t("-0.00", "-0.0000000000000005153003506839", 2); + t("0.000", "0.00003", 3); + t("-5454249481540317712.560293859013731302", "-5454249481540317712.56029385901373130215526009738012974642338", 18); + t("15352607654972198961429295651185206861818141054385638.00000000000000000", "15352607654972198961429295651185206861818141054385638", 17); + t("91494535411039025233040.292", "91494535411039025233040.29224903220309368507011", 3); + t("2043369316.0", "2043369316", 1); + t("-0.0000000782350618457", "-0.0000000782350618457630647420312027682238301541350414", 19); + t("2122652.0", "2122652", 1); + t("-0.00841365", "-0.00841365099301981489219310202029642", 8); + t("0.0", "0.0007035", 1); + t("-0.00000000000000374916", "-0.0000000000000037491685778894015479084539735777088", 20); + t("534883638.00", "534883638", 2); + t("-2.0", "-2", 1); + t("-5634442247266825358399629799939027370665.0000000000000000000", "-5634442247266825358399629799939027370665", 19); + t("3331187169219186569122.000000000", "3331187169219186569122", 9); + t("0.0000000000", "0.0000000000006604395609805032330367635527", 10); + t("-0.0000000000000576901", "-0.00000000000005769013292086168690493327", 19); + t("-661.8", "-661.828596629053201916486", 1); + t("-6073555395665254434249128854999349235744174928042756.1153000000000", "-6073555395665254434249128854999349235744174928042756.1153", 13); + t("-5013086846966.000", "-5013086846966", 3); + t("0.004015", "0.00401523226833", 6); + t("3140295374107374579919222510.1462722", "3140295374107374579919222510.1462722819395532", 7); + t("-0.000000", "-0.00000000000000799876460379334679831886", 6); + t("-0.00", "-0.0003", 2); + t("-0.026760766726884267", "-0.026760766726884267750393307117624838556001925491", 18); + t("-20821740502968847857923433558797.0899", "-20821740502968847857923433558797.08997487843745", 4); + t("0.00000000002", "0.000000000020346524414696573703092255317751132892", 11); + t("45492073832204366341299301624.000000000", "45492073832204366341299301624", 9); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_CEIL; + + t("7810971819938620325901899057970512790433.0000000000000000", "7810971819938620325901899057970512790433", 16); + t("-623395.0", "-623395", 1); + t("81334094079413997693749807.000000000000", "81334094079413997693749807", 12); + t("790143966.5", "790143966.406169480041929356421", 1); + t("-0.000485", "-0.0004851099615478", 6); + t("843581583868277359263.9721265", "843581583868277359263.97212648230399373761717", 7); + t("-921038771017147427324121032.000000", "-921038771017147427324121032", 6); + t("-823.0", "-823", 1); + t("505.0", "505", 1); + t("-866703339332502.8636000", "-866703339332502.8636", 7); + t("46.0", "46", 1); + t("60042202798790129685.0000000", "60042202798790129685", 7); + t("-1847392.0000", "-1847392", 4); + t("-4580251343840510165820631684073999841789879.0000000000000000000000", "-4580251343840510165820631684073999841789879", 22); + t("3501378778000.539063748827265447", "3501378778000.5390637488272654464266281832626835121535730779", 18); + t("0.000000004686", "0.000000004685387489140232", 12); + t("-0.0", "-0.0006", 1); + t("-445677508.00", "-445677508", 2); + t("0.0002", "0.00015099822561012723", 4); + t("-2992505698074499692367794831646886.0000000000000000", "-2992505698074499692367794831646886", 16); + t("5297873.59", "5297873.5869265978056497873793730268", 2); + t("72978439324039191443182.00000000000", "72978439324039191443182", 11); + t("0.66028387", "0.660283869505570207917431271006277981914716620876", 8); + t("-232008389442485.0", "-232008389442485", 1); + t("-2.371568", "-2.37156855939356279513952542004820909", 6); + t("731916154123696.1935", "731916154123696.193488323779184681349292529227446", 4); + t("-793941153937799250384382615553258074.00000", "-793941153937799250384382615553258074", 5); + t("651002.00", "651002", 2); + t("-61317874871.00", "-61317874871", 2); + t("8673.00", "8673", 2); + t("-14490519736189597435728386282.030655", "-14490519736189597435728386282.0306558561264348956674", 6); + t("0.001", "0.00000000000002", 3); + t("0.000009", "0.000008920984342", 6); + t("0.0000920957086395973679873", "0.000092095708639597367987279557138375172816422475", 25); + t("28125849913667924088615.25407023317734", "28125849913667924088615.2540702331773399078402875044891", 14); + t("87.55538597", "87.55538596435839691343147", 8); + t("939705902083425775202905619379.0000000", "939705902083425775202905619379", 7); + t("7303936681469130614.8345000", "7303936681469130614.8345", 7); + t("-5831852886782.68010000", "-5831852886782.6801", 8); + t("-0.0000000", "-0.0000000213769530812", 7); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + + t("0.0000", "0.00000000000584", 4); + t("-79055907138737329232.165677999092552368", "-79055907138737329232.1656779990925523674", 18); + t("47206303530045536472421888342339.00000000", "47206303530045536472421888342339", 8); + t("3974.0", "3974", 1); + t("1296297430771.39", "1296297430771.391670729445980444292", 2); + t("0.000016", "0.00001686928031", 6); + t("-0.00001", "-0.0000000000008", 5); + t("4883938724383.000", "4883938724383", 3); + t("-5.4115622307", "-5.411562230628539329345282639155988044655000352687981880842", 10); + t("-0.01", "-0.0000000000155280115429218804426906540524", 2); + t("-2730930776035874709906.00000", "-2730930776035874709906", 5); + t("8419336352549424092369623.00000", "8419336352549424092369623", 5); + t("52897.4", "52897.4", 1); + t("-783171007682720320053252521365465473997085.0", "-783171007682720320053252521365465473997085", 1); + t("0.8", "0.8", 1); + t("-0.00000000085280", "-0.000000000852796916216780032747621063045628213284", 14); + t("809486781065644418.9", "809486781065644418.939", 1); + t("-9.0", "-9", 1); + t("2399395.00", "2399395", 2); + t("-243707862514768528758611224374.0000000000000", "-243707862514768528758611224374", 13); + t("-87906.00", "-87906", 2); + t("-36206954271055061276640398631031143034683624940748.9970000000000000000000", "-36206954271055061276640398631031143034683624940748.997", 22); + t("0.00", "0.0000000000565885579252765288683939564608114096713", 2); + t("-8391656174313988740342135972218668561645437.0", "-8391656174313988740342135972218668561645437", 1); + t("2798706581453003.177239111", "2798706581453003.17723911167031", 9); + t("607781292230803273523112111.091726721140", "607781292230803273523112111.09172672114", 12); + t("-0.3", "-0.3", 1); + t("3008522535782692059736852844809784198247000184.0", "3008522535782692059736852844809784198247000184", 1); + t("14227.00", "14227", 2); + t("7841760307718014116576857993957.0000", "7841760307718014116576857993957", 4); + t("-0.00001", "-0.00000000000002596", 5); + t("5247199732982111073.000000000", "5247199732982111073", 9); + t("-12.0", "-12", 1); + t("0.000", "0.00005", 3); + t("-1383703062.0000", "-1383703062", 4); + t("0.0051019245305169", "0.00510192453051698060366202631871161193", 16); + t("-45565092550117861497905653558246322559799.0", "-45565092550117861497905653558246322559799", 1); + t("-0.284", "-0.284", 3); + t("-8962.00", "-8962", 2); + t("49335989571.2173023", "49335989571.217302304037", 7); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("733744593401073823825766410831877679446.0000000000000000000", "733744593401073823825766410831877679446", 19); + t("-64.6849459", "-64.6849458687691227978", 7); + t("-0.000000", "-0.00000000009", 6); + t("-62537287527837589298857228059657673223234916.95923265430000000", "-62537287527837589298857228059657673223234916.9592326543", 17); + t("3393668096256773847245721315080265089731.000000", "3393668096256773847245721315080265089731", 6); + t("0.0", "0.0000000000000056674956638008432348702401392", 1); + t("72516372734.6", "72516372734.6447", 1); + t("-418.28", "-418.2800731793741351", 2); + t("0.00", "0.001", 2); + t("8366217346845756726.00000000", "8366217346845756726", 8); + t("-0.000000", "-0.0000000000000092034548636370987112234384736726", 6); + t("0.35", "0.35474830751442135112334772517193392", 2); + t("64703289793894.5830", "64703289793894.58296866", 4); + t("-0.000000000000000036", "-0.000000000000000036461242408590182363418943891", 18); + t("5494508405056449117588.631948", "5494508405056449117588.631948458033233759999", 6); + t("-0.0", "-0.00393971618499838726739122333520030506235698", 1); + t("375581290738585826632.00000000", "375581290738585826632", 8); + t("254.96635275802300887", "254.96635275802300886544776010389418575738792480979736", 17); + t("21492347.69467571391498624445", "21492347.6946757139149862444482880595559468", 20); + t("313576441324233.0000000", "313576441324233", 7); + t("-534460490015293367127173277346694900936058.0000", "-534460490015293367127173277346694900936058", 4); + t("182707431911537249021116759327712693311898345504618668.43327000000000000000000", "182707431911537249021116759327712693311898345504618668.43327", 23); + t("210005324615278.4586839690045963321032", "210005324615278.458683969004596332103244549279", 22); + t("779837001772884165637922377221951347134695.644834", "779837001772884165637922377221951347134695.6448338", 6); + t("-0.000001", "-0.00000064188301390033596845335767993853284632527964514979079", 6); + t("13.0", "13", 1); + t("0.0000001269", "0.0000001269060795648365813491128357427111184222", 10); + t("18446632248354.00", "18446632248354", 2); + t("-1229249.79", "-1229249.7897249259", 2); + t("49082.0", "49082", 1); + t("-61.0", "-61", 1); + t("-893.0", "-893", 1); + t("5002282278.56974877690066484", "5002282278.569748776900664839184116538222902", 17); + t("41372.00", "41372", 2); + t("-4732022445962399687294885123498809.7625585825095", "-4732022445962399687294885123498809.7625585825095", 13); + t("-55484242.036895641", "-55484242.036895641", 9); + t("-41427133134.52583323427907663268339", "-41427133134.525833234279076632683393992706825", 23); + t("0.0", "0.00004300614085218825243480119971669264977421", 1); + t("-472025754597316278339412186866.7010659789", "-472025754597316278339412186866.701065978877597089729906019843", 10); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_DOWN; + + t("0.00", "0.00000000000000070362", 2); + t("682377946933004839.0000000", "682377946933004839", 7); + t("0.000000000", "0.00000000000000301722508588270616971784651380892069087869575", 9); + t("-356330174906.7", "-356330174906.737986270704", 1); + t("771875969530483104163034745359742192923504.000000000000000", "771875969530483104163034745359742192923504", 15); + t("-85.57612133364", "-85.576121333642541652128540737082", 11); + t("-796870619982006783.00000000", "-796870619982006783", 8); + t("985819.0", "985819", 1); + t("0.000000", "0.00000000000000000007093034243958", 6); + t("-0.0000", "-0.0000000006400178083107075310177579449", 4); + t("-105570971372984.0", "-105570971372984", 1); + t("4387745564661852845308.94229815083918", "4387745564661852845308.9422981508391799473309882", 14); + t("-3978043797116373.2", "-3978043797116373.159631", 1); + t("5.8961281424853232622595", "5.8961281424853232622594846548715356650909645537495738043051", 22); + t("-0.0000081539970551874384495", "-0.000008153997055187438449482684680130340977472796176926", 25); + t("-65.0", "-65", 1); + t("-24012940205869.000", "-24012940205869", 3); + t("0.000000", "0.000000000000000066985234999507396", 6); + t("2935194283452.35738951157832206907124", "2935194283452.357389511578322069071242729133894", 23); + t("542060.7771", "542060.77713479586821060591807145320317", 4); + t("890815036528241639534803534813.592588608837168425865025", "890815036528241639534803534813.59258860883716842586502472472", 24); + t("685877749980391051.17", "685877749980391051.1715", 2); + t("47820177163147405231185068730213.894293", "47820177163147405231185068730213.89429254869826585947429821", 6); + t("1536364305.00", "1536364305", 2); + t("-85825125.5810188", "-85825125.5810188298", 7); + t("-4983288214158634188.4572989", "-4983288214158634188.4572988600705359104", 7); + t("0.0000000000", "0.0000000000000000017929073", 10); + t("-1684136337600384671.00000000", "-1684136337600384671", 8); + t("567733137127609543.000000", "567733137127609543", 6); + t("607675679770387.000", "607675679770387", 3); + t("43727409067319.0", "43727409067319", 1); + t("-77274559773372606.00", "-77274559773372606", 2); + t("-28855643486070486857836.00000", "-28855643486070486857836", 5); + t("-915356570870.00", "-915356570870.00041832252262829437239", 2); + t("0.0", "0.00000000000004843552301428650828", 1); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_EVEN; + + t("-6614662975368684488885953285955838893900074215956.00", "-6614662975368684488885953285955838893900074215956", 2); + t("8642393776898.000", "8642393776898", 3); + t("3612207878528.1106344698085142865", "3612207878528.1106344698085142865438924419", 19); + t("977910386.93", "977910386.9343537", 2); + t("-8937937492688941768401276851642629965923372.0", "-8937937492688941768401276851642629965923372", 1); + t("-8327876772303865517454752161.4376112752921904774", "-8327876772303865517454752161.43761127529219047742910886", 19); + t("-27707.00", "-27707", 2); + t("-7287595765894242586375.92700435484", "-7287595765894242586375.927004354837723619581861634319", 11); + t("-0.00000", "-0.000000000000023670858459165486137218740358207859", 5); + t("574676836802209077.64156", "574676836802209077.641563875647945277493356873895", 5); + t("-3041038455237222898218053653661.87952947815", "-3041038455237222898218053653661.87952947815", 11); + t("-628244132307.000", "-628244132307", 3); + t("316566935167341670725238.000", "316566935167341670725238", 3); + t("-77953301569468294124105528.0", "-77953301569468294124105528", 1); + t("0.0046", "0.00460227833968584", 4); + t("4323265763616518980379929221104.0", "4323265763616518980379929221104", 1); + t("1674500565014237781637959673471730398.1120033", "1674500565014237781637959673471730398.1120032995511774", 7); + t("872559441430499650732600166.00000", "872559441430499650732600166", 5); + t("-87858304.0000", "-87858304", 4); + t("-4158788.000", "-4158788", 3); + t("3983930437416823631395.9093", "3983930437416823631395.90934402583657", 4); + t("-14.5531937", "-14.5531936852106573016020290135814233645752955297443336", 7); + t("0.00000000002201", "0.00000000002200503795474854372849141363413146996972", 14); + t("0.0000000000000", "0.00000000000000000894955653982033503846831364474746320232", 13); + t("61564779.00", "61564779", 2); + t("-7.0", "-7", 1); + t("-0.000000000000028455976228", "-0.00000000000002845597622815028653703372125435938812845106", 24); + t("728982423193598397582409707715766595902844.0000000", "728982423193598397582409707715766595902844", 7); + t("14538075860529.2697937480", "14538075860529.269793748", 10); + t("0.000", "0.00000000000000000007021566096", 3); + t("-5136066535080.86830591678842264063462546263", "-5136066535080.86830591678842264063462546262988980471309228558", 29); + t("-3026751112367460839746524832112404665.000000000000000", "-3026751112367460839746524832112404665", 15); + + t("0.5", "0.5", null); + t("-0", "-0.5", 0); + t("10.5", "10.5", null); + t("0.05", "0.05", null); + t("0.4", "0.4", null); + t("0.6", "0.6", null); + t("1.5", "1.5", null); + t("-1.5", "-1.5", null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + + t("-535564000.00", "-535564000", 2); + t("-80000000.000", "-80000000", 3); + t("-240.0", "-240", 1); + t("-7520000000.0", "-7520000000", 1); + t("306550.000", "306550", 3); + t("800000000.0", "800000000", 1); + t("-454000000.00000", "-454000000", 5); + t("60.0", "60", 1); + t("-4700000.000", "-4700000", 3); + t("25000.00", "25000", 2); + t("6847.0", "6847", 1); + t("780.0", "780", 1); + t("-50.0", "-50", 1); + t("700.0", "700", 1); + t("412598000.0000", "412598000", 4); + t("-84581600.0", "-84581600", 1); + t("5590000.00", "5590000", 2); + t("-66000.0", "-66000", 1); + t("600.0", "600", 1); + t("-513335000.000", "-513335000", 3); + t("-40.0", "-40", 1); + + t("-52536202527.13891931933498708496518913773517016037224", "-5.253620252713891931933498708496518913773517016037224E10", null); + t("0.0000000000000008761383898703999300297605784533730922", "8.761383898703999300297605784533730922E-16", null); + t("-0.0000000000000000000000000000000000004", "-4E-37", null); + t("2832044194940.47654015529986948208", "2.83204419494047654015529986948208E12", null); + t("0.00000000000000000000000064668155275864837", "6.4668155275864837E-25", null); + t("4.34128088694", "4.34128088694E0", null); + t("-851957.6572615611436542", "-8.519576572615611436542E5", null); + t("-89097468286.2561077879598798580253771544265682053", "-8.90974682862561077879598798580253771544265682053E10", null); + t("-0.000000000000000000000000000000000000000000000030409767", "-3.0409767E-47", null); + t("0.000000000000000000004295112484112357722747956581254", "4.295112484112357722747956581254E-21", null); + t("-839203207475651.6542808578", "-8.392032074756516542808578E14", null); + t("-0.00000000000000000078216", "-7.8216E-19", null); + t("-1782290274935701247734.21262413032385", "-1.78229027493570124773421262413032385E21", null); + t("31669451104144801337076433457.18511076", "3.166945110414480133707643345718511076E28", null); + t("0.000000000000000000000000000000000000472351852761", "4.72351852761E-37", null); + t("-50155220217523568901083623.78842580174913602672593731", "-5.015522021752356890108362378842580174913602672593731E25", null); + t("-291.37", "-2.9137E2", null); + t("-52474611936456205886027195352961212383.2279441143", "-5.24746119364562058860271953529612123832279441143E37", null); + t("-326.9376463292543", "-3.269376463292543E2", null); + t("0.00000000000044", "4.4E-13", null); + t("0.000000087792449", "8.7792449E-8", null); + t("497835793870987132484033.938845920610565887398960253648", "4.97835793870987132484033938845920610565887398960253648E23", null); + t("-33960439442302770058.74863962", "-3.396043944230277005874863962E19", null); + t("0.00000000000000000000000000000000000000020694696587293782", "2.0694696587293782E-40", null); + + t("123.45", "123.45", null); + t("123", "123.45", 0); + t("123", "123.45", -0); + + // ROUND_HALF_CEIL + // Rounds towards nearest neighbour. If equidistant, rounds towards Infinity + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_CEIL; + + t("0.1", "0.05", 1); + t("1", 0.5, 0); + t("1", 0.54, 0); + t("1", 0.55, 0); + t("1", 0.56, 0); + t("-1", -0.54, 0); + t("-0", -0.5, 0); + t("-1", -0.56, 0); + t("-0.5", -0.5, 1); + t("1.3", 1.25, 1); + t("-1.2", -1.25, 1); + t("234.2041", 234.20405, 4); + t("-234.2040", -234.20405, 4); + t("234.2041", "234.204050000000000000000000000000006", 4); + t("-234.2045", "-234.20449", 4); + t("-234.2041", "-234.204050000000000000000000000000006", 4); + t("999.0", 999, 1); + t("1000", 999.5, 0); + t("-999", -999.5, 0); + t("-999.5", -999.5, 1); + t("1.00000000000000000", "1.000000000000000000005", 17); + t("1.00000000000000000001", "1.000000000000000000005", 20); + t("-1.00000000000000000", "-1.000000000000000000005", 17); + t("-1.00000000000000000000", "-1.000000000000000000005", 20); + + // ROUND_HALF_FLOOR + // Rounds towards nearest neighbour. If equidistant, rounds towards -Infinity + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_FLOOR; + + t("0.0", "0.05", 1); + t("0", 0.5, 0); + t("1", 0.54, 0); + t("1", 0.55, 0); + t("1", 0.56, 0); + t("-1", -0.54, 0); + t("-1", -0.5, 0); + t("-1", -0.56, 0); + t("-0.5", -0.5, 1); + t("1.2", 1.25, 1); + t("-1.3", -1.25, 1); + t("234.2040", 234.20405, 4); + t("-234.2041", -234.20405, 4); + t("234.2040", "234.20404999999999999999999999999999", 4); + t("234.2041", "234.204050000000000000000000000000006", 4); + t("-234.2045", "-234.20449", 4); + t("-234.2041", "-234.204050000000000000000000000000006", 4); + t("999.0", 999, 1); + t("999", 999.5, 0); + t("-1000", -999.5, 0); + t("-999.5", -999.5, 1); + t("1.00000000000000000", "1.000000000000000000005", 17); + t("1.00000000000000000000", "1.000000000000000000005", 20); + t("-1.00000000000000000", "-1.000000000000000000005", 17); + t("-1.00000000000000000001", "-1.000000000000000000005", 20); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightToIntegerTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightToIntegerTests.cs new file mode 100644 index 0000000..5a88141 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightToIntegerTests.cs @@ -0,0 +1,537 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightToInteger")] + public class BigDecimalLightToIntegerTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToInteger() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21 + }); + + var t = (string expected, BigDecimalArgument n, RoundingMode rm) => + { + var config = bigDecimalFactory.Config.Clone(); + config.Rounding = rm; + + BigDecimalTests.assertEqual(expected, new BigDecimalLight(n, config).ToInteger().ValueOf()); + }; + + t("0", "0", RoundingMode.ROUND_HALF_UP); + t("0", "-0", RoundingMode.ROUND_HALF_UP); + t("1", "1", RoundingMode.ROUND_HALF_UP); + t("-1", "-1", RoundingMode.ROUND_HALF_UP); + t("0", "0.1", RoundingMode.ROUND_HALF_UP); + t("0", "-0.1", RoundingMode.ROUND_HALF_UP); + t("0", "1e-9000000000000000", RoundingMode.ROUND_HALF_UP); + t("0", "-1e-9000000000000000", RoundingMode.ROUND_HALF_UP); + t("9.999e+9000000000000000", "9.999e+9000000000000000", RoundingMode.ROUND_HALF_UP); + t("-9.999e+9000000000000000", "-9.999e+9000000000000000", RoundingMode.ROUND_HALF_UP); + + t("6.88054606464877886407425549768282761571350053022023236e+53", "6.880546064648778864074255497682827615713500530220232351811172615965890936e+53", RoundingMode.ROUND_UP); + t("9.51833733815343753238388e+23", "9.51833733815343753238387581003146664685764843969081033323613e+23", RoundingMode.ROUND_HALF_DOWN); + t("4.434086046379498022164479619323e+30", "4.4340860463794980221644796193222113345e+30", RoundingMode.ROUND_UP); + t("913844451463", "913844451463.2968716291911429329", RoundingMode.ROUND_HALF_UP); + t("4.124227112152123941928547272459545727985864897598835e+51", "4.1242271121521239419285472724595457279858648975988352729535839522490471492602734474826e+51", RoundingMode.ROUND_FLOOR); + t("4.63429955102358262449651440722058050134341793502231565647729228272e+65", "4.634299551023582624496514407220580501343417935022315656477292282722482758912005500689831e+65", RoundingMode.ROUND_FLOOR); + t("28923471241", "28923471241.98034587766743552", RoundingMode.ROUND_DOWN); + t("4521981137129745", "4521981137129744.67989385131579785422314397", RoundingMode.ROUND_UP); + t("1.757029854153590067583921300868154608080526623790036985862257948987889309489e+76", "1.7570298541535900675839213008681546080805266237900369858622579489878893094889309687763293350816e+76", RoundingMode.ROUND_CEIL); + t("7.92779841419157112811950427049997777808175311282606971649180221573863785195e+74", "7.92779841419157112811950427049997777808175311282606971649180221573863785194619091321130332110043278383964781191e+74", RoundingMode.ROUND_HALF_EVEN); + t("4.8046702619549660118837319476958242e+34", "4.80467026195496601188373194769582420063536104857816444372396235915e+34", RoundingMode.ROUND_HALF_EVEN); + t("16604074202686788", "16604074202686787.6", RoundingMode.ROUND_UP); + t("2.03054429543856309099719183163085279314546339909457784263114937593e+67", "2.0305442954385630909971918316308527931454633990945778426311493759300288903340472095271466713787146011e+67", RoundingMode.ROUND_DOWN); + t("30559986845", "30559986844.828104310332245126047", RoundingMode.ROUND_HALF_DOWN); + t("3.169159034649715925059423431889057069973085990306134577512910339e+63", "3.16915903464971592505942343188905706997308599030613457751291033998309334924157348709083e+63", RoundingMode.ROUND_DOWN); + t("2.74536925513947196644678859506681278043361770523611795129e+56", "2.74536925513947196644678859506681278043361770523611795129033731273249555974944131605156319693351e+56", RoundingMode.ROUND_DOWN); + t("3.836711661609490207325966566e+27", "3.83671166160949020732596656539593198724761580767321062612029068e+27", RoundingMode.ROUND_CEIL); + t("9.5917250469401862241299735910188523300291350099849e+49", "9.591725046940186224129973591018852330029135009984930929359628823555090675843e+49", RoundingMode.ROUND_FLOOR); + t("21333682", "21333681.9", RoundingMode.ROUND_UP); + t("8.62022856983460008434772295e+26", "8.62022856983460008434772295e+26", RoundingMode.ROUND_FLOOR); + t("68042277", "68042276.936331", RoundingMode.ROUND_HALF_UP); + t("4.8750036651483452171308023e+25", "4.875003665148345217130802304e+25", RoundingMode.ROUND_HALF_DOWN); + t("1.3591935058296677548790388717577585193715249e+43", "1.35919350582966775487903887175775851937152497849507394160868e+43", RoundingMode.ROUND_DOWN); + t("4129", "4128.8573915082798234283182739502433923", RoundingMode.ROUND_CEIL); + t("6.25825257883805843076111330243671881564726599e+44", "6.2582525788380584307611133024367188156472659814623144865497e+44", RoundingMode.ROUND_UP); + t("2.073939185723766359554288e+24", "2.0739391857237663595542878001922882482361918639e+24", RoundingMode.ROUND_HALF_EVEN); + t("5.145015399473362034445178801296467411193767021458e+48", "5.1450153994733620344451788012964674111937670214584134294502818008587093553744e+48", RoundingMode.ROUND_HALF_UP); + t("3.7741249292961331651914274171432415480188820147e+46", "3.7741249292961331651914274171432415480188820147914167e+46", RoundingMode.ROUND_FLOOR); + t("2.5907197709663090692786288643e+28", "2.59071977096630906927862886428517500364162734e+28", RoundingMode.ROUND_HALF_UP); + t("6.5019848918413133548151232394242295281947013425358575908400718513465e+67", "6.5019848918413133548151232394242295281947013425358575908400718513464661016174107270809281124152327737993e+67", RoundingMode.ROUND_HALF_UP); + t("6.5654656243131424283006345840695185206252e+40", "6.56546562431314242830063458406951852062516491733e+40", RoundingMode.ROUND_HALF_UP); + t("7.14296188550926336386536585191594379995651640918449914847192e+59", "7.1429618855092633638653658519159437999565164091844991484719191390713140556399248288684716160792764e+59", RoundingMode.ROUND_UP); + t("1.65831307344278205652667503e+26", "1.6583130734427820565266750303412035297508422789795074468453e+26", RoundingMode.ROUND_FLOOR); + t("1.03868076642005814047021881e+26", "1.038680766420058140470218801950252025537802241e+26", RoundingMode.ROUND_CEIL); + t("346", "346.452605374950482582868219", RoundingMode.ROUND_HALF_UP); + t("181439315463425985534", "181439315463425985534.25865844894077275430318757", RoundingMode.ROUND_FLOOR); + t("8113502102248864193", "8113502102248864193.4", RoundingMode.ROUND_HALF_EVEN); + t("2.0396642160540139112491673463348213536632845904136202928864236188830882179e+73", "2.0396642160540139112491673463348213536632845904136202928864236188830882178287498700128363702734e+73", RoundingMode.ROUND_UP); + t("57217688166662318", "57217688166662318.14978073061366795927750180227408203205", RoundingMode.ROUND_DOWN); + t("1.3263967367823644477766479033175434612e+37", "1.32639673678236444777664790331754346122524765959079128749150122574912710232e+37", RoundingMode.ROUND_HALF_EVEN); + t("4.097858435839183181158056560760949599139954068194535406240460058272877614656e+75", "4.0978584358391831811580565607609495991399540681945354062404600582728776146564387e+75", RoundingMode.ROUND_DOWN); + t("9.53862376611854437580813e+23", "9.5386237661185443758081265964082575366510636210576058e+23", RoundingMode.ROUND_CEIL); + t("9.49667001930609829678887507025575441813606832788e+47", "9.49667001930609829678887507025575441813606832787403591376232279326592e+47", RoundingMode.ROUND_UP); + t("6.10292467565130496104458878537476362133917639257694305498260179044673420925478e+77", "6.102924675651304961044588785374763621339176392576943054982601790446734209254780222e+77", RoundingMode.ROUND_HALF_EVEN); + t("1.3569526432875110743338e+22", "1.3569526432875110743338802291960156552161e+22", RoundingMode.ROUND_DOWN); + t("37621189552", "37621189552.4548804003545304449", RoundingMode.ROUND_HALF_UP); + t("3.7760257582328104673720218606494623716708788e+43", "3.776025758232810467372021860649462371670878868908226307307668506118232e+43", RoundingMode.ROUND_DOWN); + t("7.74525800334839542704379514512194550565400271258796650103830226e+62", "7.745258003348395427043795145121945505654002712587966501038302267977111236789268316426418098716e+62", RoundingMode.ROUND_DOWN); + t("6.2644488671934926960298323609173878562204e+40", "6.264448867193492696029832360917387856220314258629579154805116236617047705e+40", RoundingMode.ROUND_CEIL); + t("1.1212610202715126696808411919523222015979206841671840577694468e+61", "1.12126102027151266968084119195232220159792068416718405776944683512488141027069261455294944060583439e+61", RoundingMode.ROUND_HALF_UP); + t("14768", "14768.1842134501472446153274412575133", RoundingMode.ROUND_DOWN); + t("66", "65.84595269", RoundingMode.ROUND_HALF_UP); + t("5.04358552116975225426776135857493312e+36", "5.0435855211697522542677613585749331194437753499183689199959863339211e+36", RoundingMode.ROUND_CEIL); + t("72916866821", "72916866820.54423629685259893346337712794", RoundingMode.ROUND_HALF_DOWN); + t("2.25398641434088868230960319957704440329914057033993092762174e+59", "2.253986414340888682309603199577044403299140570339930927621742643835298453365292983113173554605e+59", RoundingMode.ROUND_HALF_EVEN); + t("9.50878709595470892500629632386714322909202072012758393749698817348e+65", "9.508787095954708925006296323867143229092020720127583937496988173481432728097661248708213e+65", RoundingMode.ROUND_HALF_DOWN); + t("5.2607910472629613651015532597249206745434137969950236424916019135420122e+70", "5.260791047262961365101553259724920674543413796995023642491601913542012227611433312032956077032041978908e+70", RoundingMode.ROUND_DOWN); + t("410", "410.762791093715303350001444121070121", RoundingMode.ROUND_DOWN); + t("1.3320871624020377318642711553436113e+34", "1.33208716240203773186427115534361135519309237757872381699115467e+34", RoundingMode.ROUND_DOWN); + t("6230378575909", "6230378575908.126534764593955", RoundingMode.ROUND_CEIL); + t("8.79324953269900537785265055241483017965551931338157086204822343837345e+68", "8.793249532699005377852650552414830179655519313381570862048223438373446168669586851714244432e+68", RoundingMode.ROUND_UP); + t("7.808570916258060849165e+21", "7.8085709162580608491646e+21", RoundingMode.ROUND_HALF_DOWN); + t("88", "87.426", RoundingMode.ROUND_CEIL); + t("5036", "5035.551403129954", RoundingMode.ROUND_CEIL); + t("4.666777096688297335109779706846177431928559905049197884212958955e+63", "4.6667770966882973351097797068461774319285599050491978842129589550252836742465454224095908e+63", RoundingMode.ROUND_HALF_EVEN); + t("1.3082493338072034134280214605195699691716814374132145e+52", "1.30824933380720341342802146051956996917168143741321444089754461241e+52", RoundingMode.ROUND_UP); + t("82896368014641073413", "82896368014641073413.127", RoundingMode.ROUND_FLOOR); + t("3.6759908238598981366541946858543288181344210687261e+49", "3.6759908238598981366541946858543288181344210687260953004e+49", RoundingMode.ROUND_CEIL); + t("2554853", "2554853.448817348736141", RoundingMode.ROUND_HALF_DOWN); + t("7.432653329376812932864567362402827202784593426455497e+51", "7.43265332937681293286456736240282720278459342645549756393442032908961e+51", RoundingMode.ROUND_DOWN); + t("4.1376083180004347798256857059806342e+34", "4.13760831800043477982568570598063412322243503351025693e+34", RoundingMode.ROUND_UP); + t("2.81639743586035847441737607898e+29", "2.816397435860358474417376078971272140333871184e+29", RoundingMode.ROUND_CEIL); + t("3.33308755377081894459518719001618476646619e+41", "3.33308755377081894459518719001618476646619345374865441860199004e+41", RoundingMode.ROUND_HALF_UP); + t("861198584370", "861198584370.487", RoundingMode.ROUND_DOWN); + t("58138545", "58138545.527841812778081669334", RoundingMode.ROUND_FLOOR); + t("9.1299443667780696881942861253757909197956397717814491253e+55", "9.12994436677806968819428612537579091979563977178144912531e+55", RoundingMode.ROUND_DOWN); + t("4.39311758031073540977322723016501396453173282821704760525204945353983876096252e+77", "4.39311758031073540977322723016501396453173282821704760525204945353983876096251821769058876287518283551757703348408464e+77", RoundingMode.ROUND_CEIL); + t("3.2974115909070248542274425313413005934211172865969028889e+55", "3.297411590907024854227442531341300593421117286596902888853804228063794921468e+55", RoundingMode.ROUND_CEIL); + t("54", "53.34398845927930853307662313597656146", RoundingMode.ROUND_UP); + t("15636384601748303", "15636384601748302.9811", RoundingMode.ROUND_CEIL); + t("2.3043720261427013162485e+22", "2.3043720261427013162485531143187502464942974003324599e+22", RoundingMode.ROUND_DOWN); + t("581057837085", "581057837085.65123531004522490062077436676334724089", RoundingMode.ROUND_FLOOR); + t("797366496337", "797366496337.6718190234426526346293683404803880987062", RoundingMode.ROUND_DOWN); + t("4.285881357494659223685e+21", "4.285881357494659223685e+21", RoundingMode.ROUND_HALF_EVEN); + t("9.132045135982774098345e+21", "9.13204513598277409834525940084399290647033372055570535606505e+21", RoundingMode.ROUND_HALF_UP); + t("1.11669335324060757880756755605946384713132737403413e+50", "1.1166933532406075788075675560594638471313273740341292905922955935106577859270853666e+50", RoundingMode.ROUND_HALF_DOWN); + t("3.23832893865411943993037855346860219715891545114e+47", "3.238328938654119439930378553468602197158915451147002264725e+47", RoundingMode.ROUND_FLOOR); + t("7.40310708864509274393878672061390994720684311147946750446044572e+62", "7.4031070886450927439387867206139099472068431114794675044604457234765307070001457084110726e+62", RoundingMode.ROUND_DOWN); + t("3.68965336119015432161651754041004e+32", "3.68965336119015432161651754041003908937708794285e+32", RoundingMode.ROUND_CEIL); + t("90783322754206050", "90783322754206049.35035", RoundingMode.ROUND_CEIL); + t("4.783897483734883940914066109558172639368953766427218188058842e+60", "4.783897483734883940914066109558172639368953766427218188058842519826992028703726005242207628819478632e+60", RoundingMode.ROUND_FLOOR); + t("8.74642362004856279856821278562300234968553e+41", "8.7464236200485627985682127856230023496855266153880604628901734609882681e+41", RoundingMode.ROUND_HALF_UP); + t("2.787528073145134085377480268092975211744788266156563860706325e+60", "2.787528073145134085377480268092975211744788266156563860706324907236200247422339482e+60", RoundingMode.ROUND_UP); + t("9.044749264159923044896e+21", "9.0447492641599230448952113830135543025323624505592e+21", RoundingMode.ROUND_UP); + t("3.38724858450634217020878619249322e+32", "3.3872485845063421702087861924932165998628685152854e+32", RoundingMode.ROUND_HALF_DOWN); + t("7.33035174941232251216660134923e+32", "7.33035174941232251216660134923000387370975884e+32", RoundingMode.ROUND_FLOOR); + t("3.31861301560113994278653457913815811504895843883387949739855080482136508e+71", "3.318613015601139942786534579138158115048958438833879497398550804821365076078023599771341067964e+71", RoundingMode.ROUND_CEIL); + t("4.892538135085055040561465460077728050505789433e+45", "4.892538135085055040561465460077728050505789433039013e+45", RoundingMode.ROUND_FLOOR); + t("3.480927423683982545690946611905582393906288848845e+48", "3.4809274236839825456909466119055823939062888488451700237682978275240792e+48", RoundingMode.ROUND_HALF_EVEN); + t("8.5585370645750825066579e+22", "8.5585370645750825066579059239556661179388558223611585366682692e+22", RoundingMode.ROUND_HALF_DOWN); + t("2.8106502332881758642573040950398356187983397721051055759182e+58", "2.810650233288175864257304095039835618798339772105105575918210150772785811e+58", RoundingMode.ROUND_HALF_UP); + t("7.953951085584591494904819e+25", "7.9539510855845914949048190132594822824626976317642169018875166767e+25", RoundingMode.ROUND_HALF_DOWN); + t("5012920663454824", "5012920663454823.94", RoundingMode.ROUND_HALF_UP); + t("9.059308645970286362603799e+24", "9.059308645970286362603799e+24", RoundingMode.ROUND_HALF_UP); + t("2.930381009176059877391197659254717127145084478e+45", "2.93038100917605987739119765925471712714508447815186763294045321221268221587573e+45", RoundingMode.ROUND_DOWN); + t("3.93979729202599788234456028398138395381138418403803935560263301961568e+68", "3.939797292025997882344560283981383953811384184038039355602633019615681383938905911925353290603787e+68", RoundingMode.ROUND_HALF_DOWN); + t("3.347294783804407389536880406224847102831717725051604392715997e+60", "3.3472947838044073895368804062248471028317177250516043927159970180531e+60", RoundingMode.ROUND_DOWN); + t("4.152557275792933219421015403627280983623385245443758047431e+57", "4.1525572757929332194210154036272809836233852454437580474305470338495945e+57", RoundingMode.ROUND_HALF_UP); + t("2.568943282775480373543498502026413633372529080072386778478497168e+63", "2.56894328277548037354349850202641363337252908007238677847849716763891609585410420915975309606355e+63", RoundingMode.ROUND_CEIL); + t("8.684093992464956330645701447343516418e+36", "8.684093992464956330645701447343516417923741184554719792596139808816571956653e+36", RoundingMode.ROUND_HALF_DOWN); + t("5.83803824336815109774392e+23", "5.838038243368151097743916928821585630595573416851e+23", RoundingMode.ROUND_UP); + t("4.99449017842808893066894421324882543343399403548140337811028587e+62", "4.994490178428088930668944213248825433433994035481403378110285871375e+62", RoundingMode.ROUND_DOWN); + t("4.3792711449156782662938969897476619220638522535235560693017440318235650762880312e+79", "4.379271144915678266293896989747661922063852253523556069301744031823565076288031203e+79", RoundingMode.ROUND_HALF_EVEN); + t("1.64836570856055370302116821082684227150215611327936660631e+57", "1.6483657085605537030211682108268422715021561132793666063097975046239608762642599531985480246e+57", RoundingMode.ROUND_HALF_UP); + t("3.6880029140410668344606480164489384e+34", "3.68800291404106683446064801644893833152881384958720719932324749064e+34", RoundingMode.ROUND_CEIL); + t("5.37691884604259144480804415625800887790938772497524135e+53", "5.376918846042591444808044156258008877909387724975241352981212067476945435681674020225105e+53", RoundingMode.ROUND_FLOOR); + t("7.1995513358058164351942e+22", "7.199551335805816435194169107730917957459e+22", RoundingMode.ROUND_HALF_DOWN); + t("55248039093404", "55248039093404.6273291498305797535238516736182191", RoundingMode.ROUND_FLOOR); + t("6.419830543451423871631416632166320919709e+39", "6.41983054345142387163141663216632091970977470919817409169e+39", RoundingMode.ROUND_FLOOR); + t("47", "46.679687957019966", RoundingMode.ROUND_HALF_DOWN); + t("8.846171889181456596809377139e+27", "8.8461718891814565968093771394637497527855234030610736533458882022e+27", RoundingMode.ROUND_HALF_DOWN); + t("9494812039339485", "9494812039339484.66504814190507971", RoundingMode.ROUND_CEIL); + t("9.568743436371491059070139104936123822e+36", "9.568743436371491059070139104936123822153171585452165317540885e+36", RoundingMode.ROUND_HALF_UP); + t("6.218950733005184405477309653091850341440038341422433362937950160976e+66", "6.218950733005184405477309653091850341440038341422433362937950160975956092596313331825e+66", RoundingMode.ROUND_CEIL); + t("8.3184242277151497735548563861150757508026e+40", "8.318424227715149773554856386115075750802554724068866714143812e+40", RoundingMode.ROUND_HALF_DOWN); + t("44238479", "44238479.45577788940469598821356176", RoundingMode.ROUND_HALF_DOWN); + t("2037", "2037.823568704255455386618400409335477", RoundingMode.ROUND_FLOOR); + t("5.436649951976429287545774447705520810310093287073075e+51", "5.436649951976429287545774447705520810310093287073074686050425310198538528694387158388e+51", RoundingMode.ROUND_HALF_EVEN); + t("37738994177", "37738994177", RoundingMode.ROUND_HALF_DOWN); + t("9.117326071348610688176527980615463581736346164592577593e+54", "9.11732607134861068817652798061546358173634616459257759341133852768832521419919626360171e+54", RoundingMode.ROUND_HALF_DOWN); + t("6.084920955300075178735187946364763863e+36", "6.08492095530007517873518794636476386223409771383197420966e+36", RoundingMode.ROUND_CEIL); + t("8.522483763341817511064e+21", "8.5224837633418175110636e+21", RoundingMode.ROUND_CEIL); + t("8089235072415301", "8089235072415301.5407182501479888352094914490764", RoundingMode.ROUND_FLOOR); + t("6588524", "6588524.3302879765427617637496749722", RoundingMode.ROUND_HALF_UP); + t("6.48949404289677464226944079045203282327984360168518221116940520131007087e+71", "6.48949404289677464226944079045203282327984360168518221116940520131007086776011881e+71", RoundingMode.ROUND_HALF_DOWN); + t("4.66758032658209403400328094282546162268665050304684900737759e+59", "4.6675803265820940340032809428254616226866505030468490073775840892679e+59", RoundingMode.ROUND_UP); + t("3.8228501778813845182718352582392492990500025013409025197209162241766597698593466e+79", "3.82285017788138451827183525823924929905000250134090251972091622417665976985934664e+79", RoundingMode.ROUND_FLOOR); + t("1.48107423197776804105574657092158563e+36", "1.48107423197776804105574657092158563064846301871291470178376174e+36", RoundingMode.ROUND_FLOOR); + t("687436488212973", "687436488212972.3776181461101284022701451638", RoundingMode.ROUND_UP); + t("1.3723738401752233053350007148932102e+34", "1.37237384017522330533500071489321018e+34", RoundingMode.ROUND_HALF_UP); + t("7.62478294482680439921089600929940725974552200617448002491e+56", "7.6247829448268043992108960092994072597455220061744800249106939240528761312396549902e+56", RoundingMode.ROUND_HALF_UP); + t("85960397435", "85960397434.6658395", RoundingMode.ROUND_HALF_UP); + t("2.763384545224304050146832313739655508577774027132280259541365597279123017482e+75", "2.763384545224304050146832313739655508577774027132280259541365597279123017482371912033266310613516271663e+75", RoundingMode.ROUND_HALF_DOWN); + t("3807642124967812864", "3807642124967812863.11134193333490873646020100055", RoundingMode.ROUND_CEIL); + t("6.70427065774694862425851113103666872565875637413102437053e+57", "6.704270657746948624258511131036668725658756374131024370529849179417160857194136e+57", RoundingMode.ROUND_CEIL); + t("5.847413670589089981708716357368937643792827522e+45", "5.8474136705890899817087163573689376437928275218768e+45", RoundingMode.ROUND_UP); + t("8.05036521767882485190836e+23", "8.0503652176788248519083693278838868065648e+23", RoundingMode.ROUND_DOWN); + t("2.388213850732309089626300468433832206510001e+42", "2.38821385073230908962630046843383220651000054e+42", RoundingMode.ROUND_HALF_DOWN); + t("8.650286818819557970446473110946463648974025293138e+48", "8.65028681881955797044647311094646364897402529313791495118107976573745115e+48", RoundingMode.ROUND_HALF_UP); + t("1.06125356153442428148614416928268031052670523838e+47", "1.06125356153442428148614416928268031052670523837841483302500724891691386968e+47", RoundingMode.ROUND_HALF_DOWN); + t("6.051458835569184364025914e+24", "6.0514588355691843640259134539571989823409365353609022460399600829e+24", RoundingMode.ROUND_CEIL); + t("5255333", "5255332.88023478522156979504635801765441542", RoundingMode.ROUND_HALF_DOWN); + t("6.6440556280518454677778e+23", "6.64405562805184546777779589612592222e+23", RoundingMode.ROUND_HALF_UP); + t("933398330878877265", "933398330878877264.71837776272423433960446407792842", RoundingMode.ROUND_HALF_DOWN); + t("1.646563999089466617840308582e+27", "1.6465639990894666178403085828775007164048968602872689633441291356e+27", RoundingMode.ROUND_FLOOR); + t("2.04071424062649763402922072340235937591717327451273251540381e+59", "2.04071424062649763402922072340235937591717327451273251540381641481881855e+59", RoundingMode.ROUND_DOWN); + t("6.207910504118590442964e+21", "6.20791050411859044296423935427955051266259547322838791883672e+21", RoundingMode.ROUND_HALF_DOWN); + t("8.43012542075846388096939598702013e+32", "8.43012542075846388096939598702013178561e+32", RoundingMode.ROUND_HALF_EVEN); + t("32973411322", "32973411322.0055", RoundingMode.ROUND_DOWN); + t("7.41694510786524937341518027227253887932818592426915463600522309825048431e+71", "7.416945107865249373415180272272538879328185924269154636005223098250484307079446594739006612417e+71", RoundingMode.ROUND_CEIL); + t("6", "5.9619856716250354871335057", RoundingMode.ROUND_CEIL); + t("87527", "87526.63684823518483851567239869752", RoundingMode.ROUND_HALF_UP); + t("9.763022525200483641130669988156219e+34", "9.763022525200483641130669988156219073728900962111054931e+34", RoundingMode.ROUND_FLOOR); + t("8.6185312763805220809689217680237306487385577826341538e+52", "8.61853127638052208096892176802373064873855778263415380693587684e+52", RoundingMode.ROUND_HALF_EVEN); + t("8.45360239012103000688834251686727e+33", "8.45360239012103000688834251686726987255777523693637285554668319e+33", RoundingMode.ROUND_UP); + t("2518723195860416961", "2518723195860416961.1285010663484912294197393809044612", RoundingMode.ROUND_DOWN); + t("2.685500253120233156790885090189119970660485355223415640469844965503956949e+72", "2.6855002531202331567908850901891199706604853552234156404698449655039569485280575699687713e+72", RoundingMode.ROUND_CEIL); + t("220453411", "220453411.8828467378639975405350886112158605", RoundingMode.ROUND_DOWN); + t("4.85547756175076698605434224480862417426276770270709846574910398927491662348382e+77", "4.85547756175076698605434224480862417426276770270709846574910398927491662348381810254102042363e+77", RoundingMode.ROUND_CEIL); + t("706", "705.772547316850746", RoundingMode.ROUND_HALF_EVEN); + t("7.922244228553676441225996043345713795845944777e+45", "7.92224422855367644122599604334571379584594477725845245459550132153e+45", RoundingMode.ROUND_DOWN); + t("5.2423675401973461629044e+22", "5.242367540197346162904370934159243342332619e+22", RoundingMode.ROUND_HALF_DOWN); + t("18030585831906130", "18030585831906130.962417491553869302", RoundingMode.ROUND_DOWN); + t("9.1579489825538072699342096635557184539890411086285024230055732e+61", "9.1579489825538072699342096635557184539890411086285024230055732145647118262972725923e+61", RoundingMode.ROUND_DOWN); + t("85226070565187", "85226070565186.749650937595330322325285761974396", RoundingMode.ROUND_UP); + t("5.8026252767502790532863416020671786591156722564880455114e+55", "5.80262527675027905328634160206717865911567225648804551136391722488e+55", RoundingMode.ROUND_HALF_DOWN); + t("2.4218610164284422911400259009366691043836e+40", "2.4218610164284422911400259009366691043835892289395393055927142431986156068766091e+40", RoundingMode.ROUND_CEIL); + t("9.06687520914843144090853802874797707391234306e+44", "9.066875209148431440908538028747977073912343061e+44", RoundingMode.ROUND_HALF_UP); + t("9.277380564234452159463923699924423033503589164006560028593034039059e+66", "9.2773805642344521594639236999244230335035891640065600285930340390595049193598441e+66", RoundingMode.ROUND_FLOOR); + t("8.128082895667773893079564235647181e+33", "8.128082895667773893079564235647180709738816611273e+33", RoundingMode.ROUND_UP); + t("36", "36.956949377301", RoundingMode.ROUND_DOWN); + t("1.87389296164121983463708427608894171918413437553511848334553945494023535764718e+77", "1.873892961641219834637084276088941719184134375535118483345539454940235357647177900767e+77", RoundingMode.ROUND_HALF_EVEN); + t("17310978329", "17310978328.5287351707255015885210716726522112", RoundingMode.ROUND_HALF_EVEN); + t("9.2600219512947966032033927978963555790720436638836388e+52", "9.260021951294796603203392797896355579072043663883638828801926062258412645086313910012864e+52", RoundingMode.ROUND_HALF_UP); + t("14575632844", "14575632843.9255237386639144", RoundingMode.ROUND_HALF_UP); + t("6.6321582910691070759469809878367695902421451930245389e+52", "6.6321582910691070759469809878367695902421451930245388163039e+52", RoundingMode.ROUND_UP); + t("7.25572991620854492306001e+23", "7.25572991620854492306000246e+23", RoundingMode.ROUND_CEIL); + t("2.29944904912666115204337635383054709834656882596225337344e+56", "2.299449049126661152043376353830547098346568825962253373445377477443437271765291716e+56", RoundingMode.ROUND_DOWN); + t("5.20558341173907182519017950869849925033417917e+44", "5.205583411739071825190179508698499250334179162775097e+44", RoundingMode.ROUND_UP); + t("6111649076", "6111649076.222604966937070801102488363059341", RoundingMode.ROUND_HALF_EVEN); + t("9.11024271273341770350822200927358669721049157581569029e+53", "9.11024271273341770350822200927358669721049157581569028990662687474e+53", RoundingMode.ROUND_UP); + t("4.43687659677981757715075653509475056586153598815659143662113577e+62", "4.43687659677981757715075653509475056586153598815659143662113577090918204e+62", RoundingMode.ROUND_FLOOR); + t("248", "247.654291674654270796798279", RoundingMode.ROUND_HALF_UP); + t("4.3600875972057143805604498896639034411838346245016392883967078243062789210025219e+79", "4.3600875972057143805604498896639034411838346245016392883967078243062789210025219430426344800669971036134643124803e+79", RoundingMode.ROUND_FLOOR); + t("1.03007021065884639208787111225352947659134e+41", "1.03007021065884639208787111225352947659134e+41", RoundingMode.ROUND_HALF_DOWN); + t("6.6928769403416121328026875807e+28", "6.69287694034161213280268758078544463630255731257270872775864425e+28", RoundingMode.ROUND_FLOOR); + t("32434285307875262", "32434285307875262.2207922459899301806", RoundingMode.ROUND_HALF_EVEN); + t("62748749332151342301", "62748749332151342301.19244", RoundingMode.ROUND_HALF_DOWN); + t("4.0678262988827413231899e+22", "4.06782629888274132318985446914450533e+22", RoundingMode.ROUND_CEIL); + t("9082662703546", "9082662703546.324370805591057", RoundingMode.ROUND_HALF_EVEN); + t("8.94871836341303529473698033715697e+32", "8.9487183634130352947369803371569600373840782e+32", RoundingMode.ROUND_UP); + t("2.1670379409405843366171258653978628564316145348035311924089e+58", "2.1670379409405843366171258653978628564316145348035311924089239541816857773897563368575797031936041e+58", RoundingMode.ROUND_HALF_EVEN); + t("2935893", "2935892.87182124", RoundingMode.ROUND_CEIL); + t("4.37578044122813627924254711867936993527178454e+44", "4.375780441228136279242547118679369935271784531302743e+44", RoundingMode.ROUND_UP); + t("6.39286534756971472039e+21", "6.39286534756971472038980039416071834909341307858e+21", RoundingMode.ROUND_HALF_EVEN); + t("4.18258479181585354438902084125374066e+35", "4.182584791815853544389020841253740662e+35", RoundingMode.ROUND_FLOOR); + t("2.9635549088358495388694647078277775625649e+40", "2.96355490883584953886946470782777756256487239375833003125e+40", RoundingMode.ROUND_UP); + t("9.199438690858434123332123544047e+30", "9.19943869085843412333212354404671487370041239840183084655999684e+30", RoundingMode.ROUND_HALF_UP); + t("3.29539383367054908280466428e+26", "3.2953938336705490828046642886489630335793970083516425663e+26", RoundingMode.ROUND_DOWN); + t("5.4864050382187254727117788923745e+31", "5.48640503821872547271177889237442590120046642432614e+31", RoundingMode.ROUND_CEIL); + t("6.72291657980520450527702159742964874909944380115207127826868e+59", "6.7229165798052045052770215974296487490994438011520712782686756677317729908042785747274547904999e+59", RoundingMode.ROUND_HALF_DOWN); + t("6.4199675010715062595232405405532880703928738044906019996020105471838488933611956e+79", "6.41996750107150625952324054055328807039287380449060199960201054718384889336119552687e+79", RoundingMode.ROUND_UP); + t("8.49573393504083151850167234209249202511578741027519908816390028552e+65", "8.495733935040831518501672342092492025115787410275199088163900285521533395797589e+65", RoundingMode.ROUND_HALF_DOWN); + t("1.5955208479300521845981764334575800052437447146562787571491109848403080783e+73", "1.59552084793005218459817643345758000524374471465627875714911098484030807828997023018004378599828e+73", RoundingMode.ROUND_UP); + t("6.036649336201741152293032410301018575e+36", "6.036649336201741152293032410301018575309192634222268026610553981547335341134e+36", RoundingMode.ROUND_FLOOR); + t("8.2206171209610808188838e+22", "8.220617120961080818883809546397772352053067497822e+22", RoundingMode.ROUND_DOWN); + t("357067001617476243862", "357067001617476243862.137169321", RoundingMode.ROUND_HALF_UP); + t("3648", "3648.935966276480770486703829", RoundingMode.ROUND_FLOOR); + t("3667256", "3667256.14321901053142272931937401084036", RoundingMode.ROUND_FLOOR); + t("3.06817804911202488565210058368288435840855617967301618918521966618918e+68", "3.06817804911202488565210058368288435840855617967301618918521966618918898694871236138832751471925640291008e+68", RoundingMode.ROUND_DOWN); + t("6.397956949401398212866287356127033102182339663673964891147500216e+63", "6.3979569494013982128662873561270331021823396636739648911475002160201253259767111914786e+63", RoundingMode.ROUND_HALF_EVEN); + t("4.035852629664930971748714986884026499248056376602e+49", "4.03585262966493097174871498688402649924805637660190057197207752443783928e+49", RoundingMode.ROUND_UP); + t("690938", "690937.205492020637017366344964341683031", RoundingMode.ROUND_CEIL); + t("4572785807971", "4572785807970.2685726", RoundingMode.ROUND_UP); + t("9.12591556752170002546686195712080775076927539494357342e+53", "9.12591556752170002546686195712080775076927539494357342095192221318809927523394869766948859999e+53", RoundingMode.ROUND_HALF_EVEN); + t("3.175166710121609964935909273257064925241534e+43", "3.175166710121609964935909273257064925241533921325823763693547e+43", RoundingMode.ROUND_CEIL); + t("8.6981262273677133498099001368854630216532260172495845284342e+59", "8.6981262273677133498099001368854630216532260172495845284341969645697018865379917639005276e+59", RoundingMode.ROUND_HALF_DOWN); + t("5.43909171309351447662743501782820255783778421662946112946990882360329e+68", "5.4390917130935144766274350178282025578377842166294611294699088236032838010825005751271e+68", RoundingMode.ROUND_UP); + t("9.784135122662915564368384002663201291592977201175859415877628841e+63", "9.784135122662915564368384002663201291592977201175859415877628841445610051468229986e+63", RoundingMode.ROUND_FLOOR); + t("1.075926913120789044066114677747282911808323013538262852302400311648e+66", "1.0759269131207890440661146777472829118083230135382628523024003116470855e+66", RoundingMode.ROUND_UP); + t("24", "24.009013648289204609707762701", RoundingMode.ROUND_HALF_UP); + t("8.75619449783486902827580978677238339353807302997843705455206849896e+65", "8.7561944978348690282758097867723833935380730299784370545520684989674681468898373241422734005491e+65", RoundingMode.ROUND_FLOOR); + t("49185", "49185.42432350042440262481433144719", RoundingMode.ROUND_FLOOR); + t("475313129", "475313128.81802828668961", RoundingMode.ROUND_UP); + t("5.966160504823907616078866600887399441996553619375546697015e+57", "5.96616050482390761607886660088739944199655361937554669701500365941215e+57", RoundingMode.ROUND_FLOOR); + t("8.67093818828233413993699849118457718482116385647241974416e+56", "8.6709381882823341399369984911845771848211638564724197441644559865e+56", RoundingMode.ROUND_FLOOR); + t("4.018307218209746175224522445986860839987164456492973969349e+58", "4.0183072182097461752245224459868608399871644564929739693489418729882986617019584512013283e+58", RoundingMode.ROUND_UP); + + t("4965078", "4965077.956955313373056935621", RoundingMode.ROUND_CEIL); + t("6.32074464844040699391589694212584145237969644385445479e+53", "6.320744648440406993915896942125841452379696443854454787303226e+53", RoundingMode.ROUND_HALF_UP); + t("2.630018093200468445909344327503187558812e+39", "2.63001809320046844590934432750318755881276774e+39", RoundingMode.ROUND_DOWN); + t("5.9845994166628691963626788515044007024791069617050073781932631068e+64", "5.98459941666286919636267885150440070247910696170500737819326310684179e+64", RoundingMode.ROUND_FLOOR); + t("5.38788728618099476057660664795230746327516453731e+47", "5.38788728618099476057660664795230746327516453730723672718211491484463437612544615e+47", RoundingMode.ROUND_HALF_DOWN); + t("5.816680772652537833886113306215842146722035445468511689872171309392e+66", "5.816680772652537833886113306215842146722035445468511689872171309391615108203036895388894202315e+66", RoundingMode.ROUND_HALF_UP); + t("5.14951895405085032556822954571292087413665571538603148148092264951e+66", "5.1495189540508503255682295457129208741366557153860314814809226495101085411721086436447394e+66", RoundingMode.ROUND_HALF_EVEN); + t("9.38071154248816610903159656235010365e+35", "9.38071154248816610903159656235010365457924684058e+35", RoundingMode.ROUND_HALF_EVEN); + t("4.6192344120951390457511809260028977897911933273960342542075621554585705e+70", "4.619234412095139045751180926002897789791193327396034254207562155458570425292193318612e+70", RoundingMode.ROUND_UP); + t("895", "895.42468256229", RoundingMode.ROUND_HALF_UP); + t("4.49593629458007552251945193855124924788525290643178e+50", "4.4959362945800755225194519385512492478852529064317781769525204246314622e+50", RoundingMode.ROUND_HALF_DOWN); + t("1.57561665415364001696709e+23", "1.575616654153640016967093563564651371666e+23", RoundingMode.ROUND_HALF_UP); + t("9.5119206433900111282160111340222123761771472865509429834e+55", "9.51192064339001112821601113402221237617714728655094298342579e+55", RoundingMode.ROUND_DOWN); + t("2.8705511287442274153174451865706904160604287523337828148634483123671245935117e+77", "2.87055112874422741531744518657069041606042875233378281486344831236712459351170440769052264237721532651856136663e+77", RoundingMode.ROUND_HALF_UP); + t("7.34188971833045579480780836481104523190936e+41", "7.3418897183304557948078083648110452319093625282376588007189862745851161e+41", RoundingMode.ROUND_HALF_EVEN); + t("7.8608372491686434746950705553718082749885371792704000800225593187312714063278e+76", "7.860837249168643474695070555371808274988537179270400080022559318731271406327753488333027e+76", RoundingMode.ROUND_HALF_UP); + t("6.469775389199626982124099675993476e+34", "6.46977538919962698212409967599347606034988957766173192337753531700792e+34", RoundingMode.ROUND_FLOOR); + t("5.8545430675082317385046601147591350320748593523353867726685748e+61", "5.8545430675082317385046601147591350320748593523353867726685748416216417718e+61", RoundingMode.ROUND_HALF_EVEN); + t("6253581", "6253581.49602122273536242131464028542", RoundingMode.ROUND_HALF_UP); + t("8.7344751925490789359100991e+25", "8.7344751925490789359100990700674856026086725e+25", RoundingMode.ROUND_UP); + t("3.9904601157326518550436849417943739334793e+40", "3.990460115732651855043684941794373933479342900084994082134338812305943386e+40", RoundingMode.ROUND_FLOOR); + t("7.117509805619442000811625308308028306e+36", "7.11750980561944200081162530830802830605763083615357319229708510119793e+36", RoundingMode.ROUND_HALF_UP); + t("239", "239.6", RoundingMode.ROUND_DOWN); + t("6.583584600606673632872593433278933533220316054467200967095949640912736824225e+75", "6.5835846006066736328725934332789335332203160544672009670959496409127368242248629713e+75", RoundingMode.ROUND_HALF_DOWN); + t("3.695920981918849753532424768925832178720483413e+45", "3.69592098191884975353242476892583217872048341388978498358e+45", RoundingMode.ROUND_FLOOR); + t("2", "1.3037831777620558701769453039973469", RoundingMode.ROUND_UP); + t("8.209369008504729502003611908929598068593e+40", "8.209369008504729502003611908929598068593e+40", RoundingMode.ROUND_HALF_EVEN); + t("1.7943552590764773563109836e+26", "1.79435525907647735631098360862158965291e+26", RoundingMode.ROUND_DOWN); + t("8.27389970382499192225882435e+26", "8.273899703824991922258824345580491438304434418276176349396745658e+26", RoundingMode.ROUND_HALF_DOWN); + t("462561608456627", "462561608456627.001777", RoundingMode.ROUND_FLOOR); + t("8.1839600623408782869984730140049576888373907446562596320788904262169763785362e+77", "8.183960062340878286998473014004957688837390744656259632078890426216976378536205007147403782e+77", RoundingMode.ROUND_FLOOR); + t("6.703769389175962220793e+21", "6.703769389175962220792067880359735732888123800491e+21", RoundingMode.ROUND_UP); + t("2.5585369539549659010966714135825828801369980436910644884291291e+61", "2.5585369539549659010966714135825828801369980436910644884291291234042228005022238e+61", RoundingMode.ROUND_HALF_DOWN); + t("4.71355729812843325551825190733754692238411906900564645150190008e+62", "4.71355729812843325551825190733754692238411906900564645150190007430239409925817447e+62", RoundingMode.ROUND_CEIL); + t("8.743778229459959593062156414403742568639029e+42", "8.74377822945995959306215641440374256863902836579411682005851e+42", RoundingMode.ROUND_CEIL); + t("9.4610942886126267215813230206813878133108628300770338213090890302608873805945795e+79", "9.4610942886126267215813230206813878133108628300770338213090890302608873805945795171504245711910393542869912e+79", RoundingMode.ROUND_HALF_EVEN); + t("9.637007602803820224674484773388404422058784394922216256468207851098e+66", "9.637007602803820224674484773388404422058784394922216256468207851097102844188166040233086965888060242247e+66", RoundingMode.ROUND_UP); + t("9.8929084923535343669756305730610829040131245900415500369e+55", "9.89290849235353436697563057306108290401312459004155003684864835083512265034512297039071425988079e+55", RoundingMode.ROUND_CEIL); + t("227029338743263", "227029338743263.93013322884665944911687839", RoundingMode.ROUND_DOWN); + t("9556", "9555.702815788750539915212443558755764", RoundingMode.ROUND_UP); + t("7.5777656953887385271106133131169037438362239623169e+49", "7.57776569538873852711061331311690374383622396231687000596e+49", RoundingMode.ROUND_HALF_EVEN); + t("6.682104529462952632410838e+24", "6.682104529462952632410837641372635268045881966538e+24", RoundingMode.ROUND_CEIL); + t("3.40490212059506016256377925738958571721640636153e+47", "3.404902120595060162563779257389585717216406361520888558246387332e+47", RoundingMode.ROUND_CEIL); + t("6.02441364429381327260741367276985467068046371110897032865165337e+62", "6.0244136442938132726074136727698546706804637111089703286516533653471194692722610656609e+62", RoundingMode.ROUND_HALF_UP); + t("2.5313651653786498793153255734290103587e+37", "2.53136516537864987931532557342901035878757668609321327884376561077398262963e+37", RoundingMode.ROUND_DOWN); + t("7.85665005570333663657093714469705934e+35", "7.856650055703336636570937144697059336863289133308185e+35", RoundingMode.ROUND_UP); + t("177640526141789", "177640526141788.343225172293525", RoundingMode.ROUND_CEIL); + t("3.720337371189052622074943e+25", "3.720337371189052622074942921963398883266421248541e+25", RoundingMode.ROUND_CEIL); + t("8.6313749672631505000804724190451538529154319985775036960071751534597975400579e+76", "8.631374967263150500080472419045153852915431998577503696007175153459797540057885204939257359487066282718539447e+76", RoundingMode.ROUND_HALF_DOWN); + t("6.0093917332950477604948831161021364170792508830154947009e+55", "6.0093917332950477604948831161021364170792508830154947009e+55", RoundingMode.ROUND_UP); + t("8.039856561515957202207593997063010720427567987067604601e+54", "8.03985656151595720220759399706301072042756798706760460081115e+54", RoundingMode.ROUND_HALF_DOWN); + t("9.04126850298381168011568888913120103322736027748100982152669106905664e+68", "9.04126850298381168011568888913120103322736027748100982152669106905663196e+68", RoundingMode.ROUND_UP); + t("32970", "32969.86013043774999017900493233800251808807", RoundingMode.ROUND_HALF_UP); + t("4.062501613145928449827898996803197068849565543663154887810367223956097172358e+75", "4.06250161314592844982789899680319706884956554366315488781036722395609717235882712303074126e+75", RoundingMode.ROUND_DOWN); + t("1.2585221051341615760113300656136097763123689416096518235274048137047508960225e+76", "1.2585221051341615760113300656136097763123689416096518235274048137047508960224444402424065809722365e+76", RoundingMode.ROUND_UP); + t("76428498", "76428498.00834040050622904", RoundingMode.ROUND_FLOOR); + t("2969542081490470842", "2969542081490470842.2873874609960997776387424601", RoundingMode.ROUND_DOWN); + t("1.83915362194670915529649750389183e+32", "1.83915362194670915529649750389183e+32", RoundingMode.ROUND_FLOOR); + t("9.051934488304764732260681809870433413368e+39", "9.05193448830476473226068180987043341336894274162300324775666234e+39", RoundingMode.ROUND_DOWN); + t("5.5055581168379212453472842196419487578340912520119781134168481302943305e+70", "5.5055581168379212453472842196419487578340912520119781134168481302943304427006511738950093684489283497e+70", RoundingMode.ROUND_CEIL); + t("7.8212509096600498185673448363795561801e+38", "7.82125090966004981856734483637955618009925616349415607657138464833290636076e+38", RoundingMode.ROUND_HALF_UP); + t("3.0546982208479323109313411268e+28", "3.05469822084793231093134112688982335665368647631e+28", RoundingMode.ROUND_DOWN); + t("48401191701190454916", "48401191701190454915.87020458175288248919360841887713552", RoundingMode.ROUND_UP); + t("2.112204187292732553586397374536644222038661332931779202378403e+60", "2.1122041872927325535863973745366442220386613329317792023784031e+60", RoundingMode.ROUND_HALF_UP); + t("2.32345597459570075584924011046569282105626864293765776e+53", "2.3234559745957007558492401104656928210562686429376577553656111494e+53", RoundingMode.ROUND_HALF_EVEN); + t("6.83768634613093432910405748169502361694478922e+45", "6.8376863461309343291040574816950236169447892199728904351925720243118213615618093e+45", RoundingMode.ROUND_HALF_DOWN); + t("9.750147130105570610532123362958045378e+36", "9.750147130105570610532123362958045378979179715926704377695369e+36", RoundingMode.ROUND_FLOOR); + t("2.100861289861071804337e+22", "2.10086128986107180433695930143316811637333008279165590263448e+22", RoundingMode.ROUND_HALF_UP); + t("6.86043620730137169613692822530112725634606192506087063665162541409521357214042e+77", "6.8604362073013716961369282253011272563460619250608706366516254140952135721404168108626834814070528e+77", RoundingMode.ROUND_HALF_UP); + t("1.5626034555461789267637613119509784678795467574624046084113e+59", "1.562603455546178926763761311950978467879546757462404608411306911462258050600025152315054266e+59", RoundingMode.ROUND_DOWN); + t("8.1657953379518384767073891983969032e+34", "8.1657953379518384767073891983969032197860059203770678016940796429163e+34", RoundingMode.ROUND_HALF_DOWN); + t("8.76242761957079783283256884156570096310765263e+44", "8.762427619570797832832568841565700963107652628626208374880873465683235356e+44", RoundingMode.ROUND_HALF_UP); + t("5.738034559825558584827988487e+27", "5.738034559825558584827988486842333820461031439008871488489056012e+27", RoundingMode.ROUND_UP); + t("50057554472467", "50057554472467.164635378107751829995761049170916", RoundingMode.ROUND_DOWN); + t("2.217574620839810044488132284149156661898910087838684414107246055650497e+69", "2.217574620839810044488132284149156661898910087838684414107246055650497247127025575756749e+69", RoundingMode.ROUND_HALF_UP); + t("2.5599585974649223224327226161115338826053171794370023977e+55", "2.559958597464922322432722616111533882605317179437002397792613551347e+55", RoundingMode.ROUND_FLOOR); + t("1.43014821461134396323079197376e+29", "1.43014821461134396323079197376075503936831895045225252422372849704547e+29", RoundingMode.ROUND_FLOOR); + t("9.70966118807833422956644722296756129766012276425821843096979556875e+65", "9.70966118807833422956644722296756129766012276425821843096979556875029e+65", RoundingMode.ROUND_HALF_EVEN); + t("4.916533296743126969789915322e+27", "4.916533296743126969789915322e+27", RoundingMode.ROUND_UP); + t("4.833542905767501913532472382036762424309928346865656598315910513985992546e+72", "4.83354290576750191353247238203676242430992834686565659831591051398599254568346115e+72", RoundingMode.ROUND_UP); + t("1.3278316562805597179325e+22", "1.32783165628055971793246463003781572653917e+22", RoundingMode.ROUND_HALF_DOWN); + t("5.02347253856796475647466e+23", "5.02347253856796475647466193e+23", RoundingMode.ROUND_HALF_DOWN); + t("13871", "13871", RoundingMode.ROUND_HALF_UP); + t("2.25474388246375890069616800777e+29", "2.254743882463758900696168007764489438567545789666275279171902946e+29", RoundingMode.ROUND_UP); + t("1.02187732311006848174021155848981225371768135e+44", "1.0218773231100684817402115584898122537176813528139488791683036875150612463985e+44", RoundingMode.ROUND_DOWN); + t("2909342", "2909342.4238780677375", RoundingMode.ROUND_HALF_UP); + t("5.63252321267098810926174933800717e+32", "5.6325232126709881092617493380071648e+32", RoundingMode.ROUND_CEIL); + t("5.23553453532019073853926210509049935358952607844215638892068535879e+65", "5.2355345353201907385392621050904993535895260784421563889206853587945892297422658429e+65", RoundingMode.ROUND_HALF_UP); + t("5.0110191100309032508871028312215600979e+37", "5.0110191100309032508871028312215600979641138288229618389443889e+37", RoundingMode.ROUND_FLOOR); + t("4.7961858399681660804352167135837851113655618745113e+50", "4.796185839968166080435216713583785111365561874511295798100202049598678690552e+50", RoundingMode.ROUND_UP); + t("3.6413072083209667611577984e+25", "3.64130720832096676115779843247079245446941280671681175325417221e+25", RoundingMode.ROUND_FLOOR); + t("2.83439430931506652088137802242984878152446095843660682602522650389e+65", "2.83439430931506652088137802242984878152446095843660682602522650388696313157109743775816855708e+65", RoundingMode.ROUND_HALF_UP); + t("6", "5.41744405", RoundingMode.ROUND_UP); + t("58970028613730800", "58970028613730800.2199658574092832368454", RoundingMode.ROUND_DOWN); + t("8.20762797459327051824581448969093981355593722774039e+50", "8.20762797459327051824581448969093981355593722774038945867906329529223994172067097145347e+50", RoundingMode.ROUND_UP); + t("8.54193986164574247811915221884901109509511490395756e+50", "8.54193986164574247811915221884901109509511490395756892065295262422447820275645e+50", RoundingMode.ROUND_DOWN); + t("3.3671952204343650523723248544011797199532387566275400356721261e+61", "3.36719522043436505237232485440117971995323875662754003567212611293933424352567164847630936905281e+61", RoundingMode.ROUND_HALF_EVEN); + t("7.895956448206507301924101293638155629123626e+42", "7.89595644820650730192410129363815562912362670531791013157843487e+42", RoundingMode.ROUND_DOWN); + t("235550616880409704600", "235550616880409704599.127968573", RoundingMode.ROUND_UP); + t("8.8364345580061269808644472129329280653955e+40", "8.836434558006126980864447212932928065395496132878436651857e+40", RoundingMode.ROUND_CEIL); + t("3996478976343", "3996478976342.3856997029833631225762369936431", RoundingMode.ROUND_UP); + t("296155900738434400", "296155900738434400.6386716", RoundingMode.ROUND_DOWN); + t("1.1830481689411792598668e+22", "1.18304816894117925986685219229261257e+22", RoundingMode.ROUND_DOWN); + t("8326900056386534199", "8326900056386534198.6860278942553748883", RoundingMode.ROUND_HALF_UP); + t("3.83365199013301205515355243939508806561289907596528931968567685526298673e+71", "3.8336519901330120551535524393950880656128990759652893196856768552629867273321092962870965667105e+71", RoundingMode.ROUND_HALF_DOWN); + t("9.3791314705961013288090054954372609296202314274173493146043e+58", "9.37913147059610132880900549543726092962023142741734931460434755787852055214175662842408203865372e+58", RoundingMode.ROUND_FLOOR); + t("7.53156457775671837805805213210009899583881e+41", "7.53156457775671837805805213210009899583881451963e+41", RoundingMode.ROUND_DOWN); + t("6222125", "6222125.947399497889116625442366736", RoundingMode.ROUND_FLOOR); + t("27246516013451", "27246516013450.7612200898046", RoundingMode.ROUND_HALF_DOWN); + t("2.1129209994249240465962150114302405500377695274770604922397881331e+65", "2.1129209994249240465962150114302405500377695274770604922397881331046343270898071712446295912642e+65", RoundingMode.ROUND_HALF_EVEN); + t("1.646532833140068856832411079427771744265723063103019194344170396855795846e+72", "1.646532833140068856832411079427771744265723063103019194344170396855795846472772100605573093746166121081e+72", RoundingMode.ROUND_HALF_EVEN); + t("8.425479546282021948869850897780983270136048547e+45", "8.425479546282021948869850897780983270136048546926147755138e+45", RoundingMode.ROUND_HALF_EVEN); + t("2.233872046078596369134793158082187513760673304511868920359e+57", "2.23387204607859636913479315808218751376067330451186892035944859933718652677e+57", RoundingMode.ROUND_DOWN); + t("3.116405743404107847814732269205375396135221718527468694425449065691242e+69", "3.116405743404107847814732269205375396135221718527468694425449065691241869806095568074204631019012404933659e+69", RoundingMode.ROUND_HALF_DOWN); + t("2.062365631214868258839472996400163124440742356524760343620038100366519e+69", "2.062365631214868258839472996400163124440742356524760343620038100366518635685404679919e+69", RoundingMode.ROUND_HALF_DOWN); + t("7.50745541728415428434029959e+26", "7.5074554172841542843402995893059819526420896996212780022697e+26", RoundingMode.ROUND_HALF_UP); + t("7.24849752468097696916398838713364051520307862650612728265666514561056e+68", "7.2484975246809769691639883871336405152030786265061272826566651456105618100701083e+68", RoundingMode.ROUND_HALF_UP); + t("1.35176383329614606610756531319295678018782464936214748745e+56", "1.3517638332961460661075653131929567801878246493621474874550800287300195566470029016e+56", RoundingMode.ROUND_FLOOR); + t("4.7152341392034704538023e+22", "4.71523413920347045380226220796263110674520711227447379291824e+22", RoundingMode.ROUND_HALF_EVEN); + t("3.11927423685004836840577039188891100297737718473721047017231325136894944596e+74", "3.11927423685004836840577039188891100297737718473721047017231325136894944595400105170201920293344231e+74", RoundingMode.ROUND_CEIL); + t("2.933400342567756418849544349581259968391617744e+45", "2.93340034256775641884954434958125996839161774380675440442887971748700867e+45", RoundingMode.ROUND_HALF_EVEN); + t("978080378597", "978080378597.2017", RoundingMode.ROUND_HALF_EVEN); + t("4.372210642064489328448661007253100863929888104582288453e+54", "4.372210642064489328448661007253100863929888104582288452571259872839821582026e+54", RoundingMode.ROUND_HALF_UP); + t("1.857581283508729657743503973029242776985316586148834e+51", "1.8575812835087296577435039730292427769853165861488346530185e+51", RoundingMode.ROUND_FLOOR); + t("7.421813035238230409761595532233089939079148043727378221365519874e+63", "7.421813035238230409761595532233089939079148043727378221365519873463075894088208132266204031e+63", RoundingMode.ROUND_CEIL); + t("51860977367633", "51860977367632.92841245248", RoundingMode.ROUND_HALF_EVEN); + t("1.95284973709573510813936820783019996132821775350531973163592085e+62", "1.9528497370957351081393682078301999613282177535053197316359208517808968343594003206246753959887549e+62", RoundingMode.ROUND_FLOOR); + t("6.9464859606048993902832501774806312749761412476825724988127422436981545662e+73", "6.94648596060489939028325017748063127497614124768257249881274224369815456613e+73", RoundingMode.ROUND_CEIL); + t("21129", "21128.947551940996938322", RoundingMode.ROUND_HALF_DOWN); + t("868214861041", "868214861040.7427436259995316", RoundingMode.ROUND_HALF_EVEN); + t("7.74918309357334474806682151708655686896e+38", "7.749183093573344748066821517086556868950832e+38", RoundingMode.ROUND_CEIL); + t("2.230431257587000243746564167163186447940405426320077e+51", "2.230431257587000243746564167163186447940405426320076383541377505288703330654e+51", RoundingMode.ROUND_CEIL); + t("6494555134286333798", "6494555134286333798.4", RoundingMode.ROUND_DOWN); + t("462", "461.59410222325557994522667", RoundingMode.ROUND_HALF_UP); + t("5.39024618638372653122483710077093421975991216013901874390338817595e+65", "5.390246186383726531224837100770934219759912160139018743903388175945025e+65", RoundingMode.ROUND_UP); + t("1.12532182738546905376329237437102170669599779470511645090705e+59", "1.125321827385469053763292374371021706695997794705116450907054172134550142e+59", RoundingMode.ROUND_HALF_DOWN); + t("3.601323497164902344681087151677942539149573539415387031319081234142241e+69", "3.60132349716490234468108715167794253914957353941538703131908123414224106980338319e+69", RoundingMode.ROUND_FLOOR); + t("8.3500141350805991379256449644186334968168974724806389539568927554e+64", "8.350014135080599137925644964418633496816897472480638953956892755422515632060455336286e+64", RoundingMode.ROUND_FLOOR); + t("5.401131445300570554896434535066508128e+36", "5.4011314453005705548964345350665081270950342624714457010875100354387132625661e+36", RoundingMode.ROUND_CEIL); + t("9.6338971507843956503609197751788e+31", "9.633897150784395650360919775178841334361839784e+31", RoundingMode.ROUND_FLOOR); + t("3055045603560147538", "3055045603560147538.3515", RoundingMode.ROUND_HALF_DOWN); + t("1.0337875723141065649275067510790681222557486415834002e+52", "1.03378757231410656492750675107906812225574864158340024144131893262996852354157450707845e+52", RoundingMode.ROUND_FLOOR); + t("6628586154", "6628586154.6", RoundingMode.ROUND_FLOOR); + t("33", "32.373155518538415", RoundingMode.ROUND_UP); + t("360573130404", "360573130404.1772", RoundingMode.ROUND_HALF_UP); + t("2.600098587066400190213419659095053181377974125e+45", "2.6000985870664001902134196590950531813779741255420320463e+45", RoundingMode.ROUND_DOWN); + t("75065387", "75065386.98302833398157725347298017479752418", RoundingMode.ROUND_UP); + t("6.8963281585506360266597808464229207581611594829703695196321237700812792e+70", "6.89632815855063602665978084642292075816115948297036951963212377008127918992506071226e+70", RoundingMode.ROUND_CEIL); + t("9.28197726936724954894573282211104735760787482097421156e+55", "9.281977269367249548945732822111047357607874820974211559982916467270345710190773e+55", RoundingMode.ROUND_HALF_DOWN); + t("3.907918344492889760185116925702963410054303636244477844047e+57", "3.907918344492889760185116925702963410054303636244477844046640552136476663480363798160760359609745e+57", RoundingMode.ROUND_HALF_DOWN); + t("20390", "20389.50608970538326", RoundingMode.ROUND_HALF_EVEN); + t("169686499443647", "169686499443646.100053454", RoundingMode.ROUND_UP); + t("1.14751034435884033701335834374150193187852871899067496879575846043627e+68", "1.14751034435884033701335834374150193187852871899067496879575846043626932134782274903719229367322867524e+68", RoundingMode.ROUND_HALF_DOWN); + t("3", "3.371802754012374149032621660036326692709", RoundingMode.ROUND_DOWN); + t("6571532413631720476", "6571532413631720476.8387885238245530034497383", RoundingMode.ROUND_DOWN); + t("711645553194682", "711645553194682", RoundingMode.ROUND_HALF_EVEN); + t("4022796", "4022795.687", RoundingMode.ROUND_HALF_EVEN); + t("7.4520872837909058911068647601019387382029518098e+46", "7.45208728379090589110686476010193873820295180975587424115061e+46", RoundingMode.ROUND_CEIL); + t("8.03496111125697330071171956759554080088783440345e+47", "8.034961111256973300711719567595540800887834403452118760463608845e+47", RoundingMode.ROUND_HALF_EVEN); + t("8.55511850491578616176163093563708160895365268972005384027430492224050471255e+74", "8.5551185049157861617616309356370816089536526897200538402743049222405047125441939022661980752136356946774e+74", RoundingMode.ROUND_UP); + t("9.410089814611218259774585235e+27", "9.410089814611218259774585235484822e+27", RoundingMode.ROUND_DOWN); + + t("7.7606205390697079697957946444343391883700844095450185e+52", "7.7606205390697079697957946444343391883700844095450185e+52", RoundingMode.ROUND_HALF_UP); + t("4.58994818214423764644807412616998882808679714838440424403030461797814893812e+74", "4.58994818214423764644807412616998882808679714838440424403030461797814893812342208878013e+74", RoundingMode.ROUND_HALF_EVEN); + t("2.352923246599896770944553256e+27", "2.352923246599896770944553255908913239e+27", RoundingMode.ROUND_UP); + t("6.57437044461257145907456386880266741220483546270538944188089263831541580968217e+77", "6.5743704446125714590745638688026674122048354627053894418808926383154158096821662727e+77", RoundingMode.ROUND_CEIL); + t("5.144471216454355074735516002140628838593038720756482e+51", "5.144471216454355074735516002140628838593038720756481881662e+51", RoundingMode.ROUND_HALF_EVEN); + t("7.55341561758734508030157277452437863273441605731555574e+54", "7.553415617587345080301572774524378632734416057315555740173241606524174749783e+54", RoundingMode.ROUND_HALF_DOWN); + t("4.354982111603472427964762e+25", "4.3549821116034724279647619493655447118997607358552409709e+25", RoundingMode.ROUND_CEIL); + t("6509325589913679", "6509325589913678.913617766383998659496023511512858", RoundingMode.ROUND_CEIL); + t("666281", "666280.13924571686833198933637667668112364", RoundingMode.ROUND_CEIL); + t("9.60199236890422200332350658058079087150429925358407963e+53", "9.6019923689042220033235065805807908715042992535840796342235866415544833610757e+53", RoundingMode.ROUND_HALF_UP); + t("1.62306671385880562700401146583371770207236387224456185716632e+59", "1.62306671385880562700401146583371770207236387224456185716632051105062492e+59", RoundingMode.ROUND_HALF_DOWN); + t("3.90349821730036455964772370048656246021974386995415e+51", "3.90349821730036455964772370048656246021974386995415033871223679e+51", RoundingMode.ROUND_HALF_UP); + t("3.895161261341522686895752632514847521825863076204798881839954312741e+66", "3.8951612613415226868957526325148475218258630762047988818399543127409e+66", RoundingMode.ROUND_HALF_UP); + t("6.25312627484320038802792129687993e+32", "6.25312627484320038802792129687992603074108932199032287019e+32", RoundingMode.ROUND_CEIL); + t("7.5312441243891577030062206881031743279845658681657662674e+55", "7.5312441243891577030062206881031743279845658681657662674103562801e+55", RoundingMode.ROUND_HALF_EVEN); + t("318581309743", "318581309742.186842979710587", RoundingMode.ROUND_UP); + t("7.50855745791198760171353157088272348952587600306034994135951635926213e+68", "7.508557457911987601713531570882723489525876003060349941359516359262129e+68", RoundingMode.ROUND_CEIL); + t("6.23597982856234075088091595070521511023354363e+44", "6.2359798285623407508809159507052151102335436295014681064614367149e+44", RoundingMode.ROUND_UP); + t("84322488230978019136", "84322488230978019135.2227356965742193995386131512728", RoundingMode.ROUND_CEIL); + t("16764", "16764.8665898588107088341937975401", RoundingMode.ROUND_DOWN); + t("8.18935827058262157249579209e+26", "8.18935827058262157249579208026965e+26", RoundingMode.ROUND_UP); + t("491791160034568602461", "491791160034568602460.83489923404591775163573", RoundingMode.ROUND_CEIL); + t("6.229504129470767563312789386745388612037820576806e+48", "6.2295041294707675633127893867453886120378205768067974267924876508095964334825746814e+48", RoundingMode.ROUND_DOWN); + t("1.208874896653745206039245186466009495535378043650030890890869246166106563569228e+78", "1.2088748966537452060392451864660094955353780436500308908908692461661065635692279595e+78", RoundingMode.ROUND_HALF_DOWN); + t("9.80626682576630111702042213110361224617656870277610076975453108e+63", "9.80626682576630111702042213110361224617656870277610076975453108044184252370387593526284191295431542542e+63", RoundingMode.ROUND_HALF_UP); + t("9.1613888774072527927195114711544852205567780437825695734193073459254248e+70", "9.1613888774072527927195114711544852205567780437825695734193073459254248529627314400484204661430178990453637e+70", RoundingMode.ROUND_DOWN); + t("673517021208", "673517021208.9520590811346224620465", RoundingMode.ROUND_DOWN); + t("488983444", "488983443.827", RoundingMode.ROUND_UP); + t("4.6337190267670232287172031071723722378294103664e+46", "4.6337190267670232287172031071723722378294103663127179388e+46", RoundingMode.ROUND_UP); + t("6.3139597581687527606169340957866e+31", "6.313959758168752760616934095786555041536228188648917605288037039409e+31", RoundingMode.ROUND_CEIL); + t("1.54184940885928055170683378871489428906271821461859385037189717e+62", "1.54184940885928055170683378871489428906271821461859385037189717286319190992985766786581164023647478686e+62", RoundingMode.ROUND_HALF_EVEN); + t("1.63191916991957661548524946828787075953112885078e+48", "1.6319191699195766154852494682878707595311288507800818816847603111640452525132673e+48", RoundingMode.ROUND_HALF_EVEN); + t("2", "1.173623567", RoundingMode.ROUND_UP); + t("52181901174680", "52181901174680.411663178526728847034927", RoundingMode.ROUND_DOWN); + t("1.4428724102781618642158162144368851918104e+40", "1.442872410278161864215816214436885191810322778115208449994477462682497831e+40", RoundingMode.ROUND_UP); + t("2.11079443220477721164615243276424047214227366133785871797501665832663e+68", "2.110794432204777211646152432764240472142273661337858717975016658326637343733212934e+68", RoundingMode.ROUND_FLOOR); + t("7.01873743153639142702763253786592257300036204279037943e+53", "7.0187374315363914270276325378659225730003620427903794263281588858684437869318245e+53", RoundingMode.ROUND_HALF_UP); + t("297335892209058", "297335892209058.681131934803840285606124", RoundingMode.ROUND_FLOOR); + t("8.248773121583558644485e+21", "8.24877312158355864448508e+21", RoundingMode.ROUND_DOWN); + t("4.28146436685796776936219858146868127921870561782487170316457881813318743106081e+77", "4.28146436685796776936219858146868127921870561782487170316457881813318743106081369565342945403698537616397552596e+77", RoundingMode.ROUND_HALF_UP); + t("9.9820005984048321058530905694335215253469647160852278493082995163703534074e+73", "9.982000598404832105853090569433521525346964716085227849308299516370353407378913408895725481e+73", RoundingMode.ROUND_CEIL); + t("9.148522784578220274278e+21", "9.14852278457822027427775281695859151371500029e+21", RoundingMode.ROUND_CEIL); + t("9.939519663839419097084309722114337860929618038e+45", "9.93951966383941909708430972211433786092961803758074876538411188673348e+45", RoundingMode.ROUND_UP); + t("632030633305048023685", "632030633305048023685", RoundingMode.ROUND_HALF_DOWN); + t("4076", "4076.17183659158963369847898", RoundingMode.ROUND_HALF_UP); + t("5.0915870680446042240788973434264033797234724711318458318825931704e+64", "5.09158706804460422407889734342640337972347247113184583188259317035179494921e+64", RoundingMode.ROUND_HALF_DOWN); + t("2.764391420260965121209440896051695682676356191890177e+51", "2.7643914202609651212094408960516956826763561918901765856732207162244848e+51", RoundingMode.ROUND_HALF_UP); + t("3.9447030166935777285149689808260893983776285e+43", "3.9447030166935777285149689808260893983776284915557532e+43", RoundingMode.ROUND_CEIL); + t("8.010340555613665231927395659663971527793424333051426839523457029297415808148e+75", "8.01034055561366523192739565966397152779342433305142683952345702929741580814831598882542203e+75", RoundingMode.ROUND_DOWN); + t("4.5925662338700879558086060238867215491730251801245149826509116719e+64", "4.59256623387008795580860602388672154917302518012451498265091167181660209345699020845019573551693665e+64", RoundingMode.ROUND_UP); + t("36504551", "36504550.50166831479470939986155470151861004", RoundingMode.ROUND_HALF_DOWN); + t("2.12540209018988712945893945069101074121688475e+44", "2.12540209018988712945893945069101074121688475323726090278554628156391087371545506904e+44", RoundingMode.ROUND_HALF_DOWN); + t("181125152", "181125151.99491757248404575757536635094871583", RoundingMode.ROUND_UP); + t("5.779523432816833924616772030412948003386911576895800096115162704042415963289556e+78", "5.7795234328168339246167720304129480033869115768958000961151627040424159632895565935151683005e+78", RoundingMode.ROUND_DOWN); + t("9.17826096990960792013134687632848447684591816754268192955e+56", "9.17826096990960792013134687632848447684591816754268192954583e+56", RoundingMode.ROUND_HALF_UP); + t("7.37421367532529067061667742667390536373826923290956e+50", "7.37421367532529067061667742667390536373826923290955104174785628111147170055463656e+50", RoundingMode.ROUND_CEIL); + t("4", "4.3686309345715094939913360017624432429", RoundingMode.ROUND_HALF_DOWN); + t("8.3594110965962381130596855916957925566323732058003739681143185743e+64", "8.35941109659623811305968559169579255663237320580037396811431857425404163e+64", RoundingMode.ROUND_HALF_UP); + t("5.8017462781868947979669035963150371455e+37", "5.80174627818689479796690359631503714551627518481e+37", RoundingMode.ROUND_DOWN); + t("1.90669137860811651611491585358014142495464234863436909519124432366465306869e+74", "1.9066913786081165161149158535801414249546423486343690951912443236646530686990503828136061620899505412969685328e+74", RoundingMode.ROUND_DOWN); + t("65827281", "65827281.952680368668829078", RoundingMode.ROUND_DOWN); + t("3.796975029309190153935073574227749285722909213685e+48", "3.79697502930919015393507357422774928572290921368440305490055258561431112182290578246e+48", RoundingMode.ROUND_UP); + t("7891207466205997", "7891207466205997.584874499696221437", RoundingMode.ROUND_DOWN); + t("2.94745525109421961698647322282990083780723298975940062387186332e+63", "2.94745525109421961698647322282990083780723298975940062387186331961089494759e+63", RoundingMode.ROUND_HALF_EVEN); + t("4.34282947014265862495e+21", "4.34282947014265862495e+21", RoundingMode.ROUND_HALF_UP); + t("9.1641692214618337763737436252361499553979881311255799266612e+58", "9.1641692214618337763737436252361499553979881311255799266611244928024975394877156e+58", RoundingMode.ROUND_CEIL); + t("5.864333650394800685281265896322e+30", "5.864333650394800685281265896322331612364407086e+30", RoundingMode.ROUND_HALF_DOWN); + t("7.48583556770321193530048004930689224512462576e+44", "7.485835567703211935300480049306892245124625769726886498025816e+44", RoundingMode.ROUND_DOWN); + t("537697", "537697.02142073166750345433592", RoundingMode.ROUND_HALF_DOWN); + t("6.746416112722632847560558595748474646323241803499729e+51", "6.7464161127226328475605585957484746463232418034997282515230110158271943e+51", RoundingMode.ROUND_CEIL); + t("348870466676427057", "348870466676427056.540210736720958044510813849897553858", RoundingMode.ROUND_UP); + t("12657090", "12657089.364186117157400260898", RoundingMode.ROUND_UP); + t("1.031300029476346901189374675983105405944047815464946132481100505e+63", "1.03130002947634690118937467598310540594404781546494613248110050480689644637863861125e+63", RoundingMode.ROUND_HALF_DOWN); + t("2.615472057019087907913471735667812386452505134772501355517041236227187e+69", "2.6154720570190879079134717356678123864525051347725013555170412362271865410294e+69", RoundingMode.ROUND_UP); + t("7.04165504077691457763479440814442249894246758944393488056686043599000962e+71", "7.0416550407769145776347944081444224989424675894439348805668604359900096153767456881719096558635e+71", RoundingMode.ROUND_HALF_DOWN); + t("7354818904551179123", "7354818904551179122.7014798901745046823977703675030620318379", RoundingMode.ROUND_UP); + t("854817485148361", "854817485148360.5714740113462989051407045497052073830764", RoundingMode.ROUND_HALF_EVEN); + t("47000805088498599710", "47000805088498599709.708437024062675608904338047", RoundingMode.ROUND_UP); + t("2.1766018980782941709650115665537351498889478677e+47", "2.1766018980782941709650115665537351498889478677028004204702111607312292840436359777e+47", RoundingMode.ROUND_HALF_DOWN); + t("7.8367301959920444880797359773949243636413420565977635106208263575374910713015704e+79", "7.83673019599204448807973597739492436364134205659776351062082635753749107130157048971635283591024e+79", RoundingMode.ROUND_DOWN); + t("3.08903346956401542864799535261274279172597713664198203701807794e+62", "3.0890334695640154286479953526127427917259771366419820370180779377521270933350292462773167787142e+62", RoundingMode.ROUND_HALF_DOWN); + t("576562571", "576562571.844608138306992462909059062174553", RoundingMode.ROUND_FLOOR); + t("4.88885922847235829453662441295981179020690065850389e+50", "4.8888592284723582945366244129598117902069006585038897785761278e+50", RoundingMode.ROUND_UP); + t("805030", "805030.3196150823480264115976649255009294", RoundingMode.ROUND_FLOOR); + t("3.75867227262935844604124624219765052177179e+41", "3.758672272629358446041246242197650521771793e+41", RoundingMode.ROUND_HALF_EVEN); + t("8.75150119113270892435492538833147019932204241197862490821051048044419e+68", "8.751501191132708924354925388331470199322042411978624908210510480444188669757061961455531943e+68", RoundingMode.ROUND_UP); + t("42601873172232953", "42601873172232953.30659313764825104206642999", RoundingMode.ROUND_FLOOR); + t("1.8171003585956362231021760046143097114054128693433487680606690918875530579038e+76", "1.81710035859563622310217600461430971140541286934334876806066909188755305790370439773413227239119191673971090333e+76", RoundingMode.ROUND_CEIL); + t("3.71331955392433687189949e+23", "3.7133195539243368718994912855e+23", RoundingMode.ROUND_HALF_EVEN); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightToNumberTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightToNumberTests.cs new file mode 100644 index 0000000..5edeb71 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightToNumberTests.cs @@ -0,0 +1,62 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightToNumber")] + public class BigDecimalLightToNumberTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToNumber() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 21 + }); + + var t = (BigDecimalArgument n, double expected) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToNumber()); + }; + + t(1, 1); + t("1", 1); + t("1.0", 1); + t("1e+0", 1); + t("1e-0", 1); + + t(-1, -1); + t("-1", -1); + t("-1.0", -1); + t("-1e+0", -1); + t("-1e-0", -1); + + t("123.456789876543", 123.456789876543); + t("-123.456789876543", -123.456789876543); + + t("1.1102230246251565e-16", 1.1102230246251565e-16); + t("-1.1102230246251565e-16", -1.1102230246251565e-16); + + t("9007199254740991", 9007199254740991); + t("-9007199254740991", -9007199254740991); + + t("5e-324", 5e-324); + t("1.7976931348623157e+308", 1.7976931348623157e+308); + + t("9.999999e+9000000000000000", double.PositiveInfinity); + t("-9.999999e+9000000000000000", double.NegativeInfinity); + t("1e-9000000000000000", 0); + //t("-1e-9000000000000000", -0); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightToPrecisionTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightToPrecisionTests.cs new file mode 100644 index 0000000..daf100d --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightToPrecisionTests.cs @@ -0,0 +1,524 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightToPrecision")] + public class BigDecimalLightToPrecisionTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToPrecision() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = -7, + ToExpPos = 40 + }); + + var t = (string expected, BigDecimalArgument n, long? sd, RoundingMode? rm) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToPrecision(sd, rm)); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("1e+27", "1.2345e+27", 1, null); + t("1.2e+27", "1.2345e+27", 2, null); + t("1.23e+27", "1.2345e+27", 3, null); + t("1.235e+27", "1.2345e+27", 4, null); + t("1.2345e+27", "1.2345e+27", 5, null); + t("1.23450e+27", "1.2345e+27", 6, null); + t("1.234500e+27", "1.2345e+27", 7, null); + + t("-1e+27", "-1.2345e+27", 1, null); + t("-1.2e+27", "-1.2345e+27", 2, null); + t("-1.23e+27", "-1.2345e+27", 3, null); + t("-1.235e+27", "-1.2345e+27", 4, null); + t("-1.2345e+27", "-1.2345e+27", 5, null); + t("-1.23450e+27", "-1.2345e+27", 6, null); + t("-1.234500e+27", "-1.2345e+27", 7, null); + + t("7", 7, 1, null); + t("7.0", 7, 2, null); + t("7.00", 7, 3, null); + + t("-7", -7, 1, null); + t("-7.0", -7, 2, null); + t("-7.00", -7, 3, null); + + t("9e+1", 91, 1, null); + t("91", 91, 2, null); + t("91.0", 91, 3, null); + t("91.00", 91, 4, null); + + t("-9e+1", -91, 1, null); + t("-91", -91, 2, null); + t("-91.0", -91, 3, null); + t("-91.00", -91, 4, null); + + t("9e+1", 91.1234, 1, null); + t("91", 91.1234, 2, null); + t("91.1", 91.1234, 3, null); + t("91.12", 91.1234, 4, null); + t("91.123", 91.1234, 5, null); + t("91.1234", 91.1234, 6, null); + t("91.12340", 91.1234, 7, null); + t("91.123400", 91.1234, 8, null); + t("-9e+1", -91.1234, 1, null); + t("-91", -91.1234, 2, null); + t("-91.1", -91.1234, 3, null); + t("-91.12", -91.1234, 4, null); + t("-91.123", -91.1234, 5, null); + t("-91.1234", -91.1234, 6, null); + t("-91.12340", -91.1234, 7, null); + t("-91.123400", -91.1234, 8, null); + + t("5.55000000000000e-7", 0.000000555, 15, null); + t("-5.55000000000000e-7", -0.000000555, 15, null); + t("-1.2e-9", -.0000000012345, 2, null); + t("-1.2e-8", -.000000012345, 2, null); + t("-1.2e-7", -.00000012345, 2, null); + t("1e+8", 123456789, 1, null); + t("123456789", 123456789, 9, null); + t("1.2345679e+8", 123456789, 8, null); + t("1.234568e+8", 123456789, 7, null); + t("-1.234568e+8", -123456789, 7, null); + + t("-0.0000012", -.0000012345, 2, null); + t("-0.000012", -.000012345, 2, null); + t("-0.00012", -.00012345, 2, null); + t("-0.0012", -.0012345, 2, null); + t("-0.012", -.012345, 2, null); + t("-0.12", -.12345, 2, null); + t("-1.2", -1.2345, 2, null); + t("-12", -12.345, 2, null); + t("-1.2e+2", -123.45, 2, null); + t("-1.2e+3", -1234.5, 2, null); + t("-1.2e+4", -12345, 2, null); + t("-1.235e+4", -12345.67, 4, null); + t("-1.234e+4", -12344.67, 4, null); + + t("1.3", 1.25, 2, null); + t("1.4", 1.35, 2, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + + t("1e+4", 9631.01, 1, RoundingMode.ROUND_HALF_UP); + t("1.0e+7", 9950095.87, 2, RoundingMode.ROUND_HALF_UP); + t("1e+1", "9.856839969", 1, RoundingMode.ROUND_HALF_UP); + t("1e+2", "97.504", 1, RoundingMode.ROUND_HALF_UP); + t("1e+5", 97802.6, 1, RoundingMode.ROUND_HALF_UP); + t("1e+1", 9.9617, 1, RoundingMode.ROUND_HALF_UP); + t("1e+3", 989.2, 1, RoundingMode.ROUND_HALF_UP); + t("1.0e+5", 99576, 2, RoundingMode.ROUND_HALF_UP); + t("1e+8", "96236483.87", 1, RoundingMode.ROUND_HALF_UP); + + t("-0.00001", "-0.00001", 1, null); + t("-0.000090000000", "-0.00009", 8, null); + t("-7e-7", "-0.0000007", 1, null); + t("68.9316834061848", "68.931683406184761912218250317", 15, null); + t("7.8601018089704732e+27", "7860101808970473167417935916.60087069", 17, null); + t("3.21445885399803244067719798337437062000000e-11", "0.0000000000321445885399803244067719798337437062", 42, null); + t("-8171786349835057630612358814.162756978", "-8171786349835057630612358814.162756977984", 37, null); + t("3340.9039701", "3340.903970019817086594869184429527413533291595472085", 11, null); + t("-7269097658095414435895.9161181115739745427300313060", "-7269097658095414435895.916118111573974542730031306", 50, null); + t("0.00000632207", "0.00000632206077863", 6, null); + t("6e+2", "573", 1, null); + t("7.4e-7", "0.000000738", 2, null); + t("-5.031561e-7", "-0.0000005031560306227217140253964236911907612837", 7, null); + t("-4.291e+11", "-429050053964", 4, null); + t("8.514e+7", "85131637", 4, null); + t("-3.4e-9", "-0.000000003326783057540398442677461", 2, null); + t("6.9404295962722512e-20", "0.00000000000000000006940429596272251146200868514973032594273", 17, null); + t("-828376248340605120247.15155295014", "-828376248340605120247.15155295013990774586360178257303370779", 32, null); + t("-7.9828e+6", "-7982750.6677764682946015520272838914918899297118139169410659", 5, null); + t("0.00712610393722542527880200", "0.007126103937225425278801997738", 24, null); + t("-5.7e+4", "-56242", 2, null); + t("-8928855203945443164.755136735230293537", "-8928855203945443164.755136735230293536124112124", 37, null); + t("5218572327.99", "5218572327.98424443372003772604597054153304", 12, null); + t("71707870535238750871516796339.60", "71707870535238750871516796339.59678962573869890935", 31, null); + t("88817462.7137982220652429", "88817462.71379822206524285939115943006583441400005007918", 24, null); + t("3.00000e-9", "0.000000003", 6, null); + t("-6.053", "-6.05291095813493573191", 4, null); + t("6.51630828677e+19", "65163082867698740076", 12, null); + t("2483202135696501.60187899", "2483202135696501.60187898870193199949004966876115645", 24, null); + t("1.0766e-10", "0.000000000107650515680635692286894826641576642261", 5, null); + t("642724503819056076.659397077514269963295025", "642724503819056076.659397077514269963295024012414", 42, null); + t("-7.1192e+21", "-7119169102619893823635.32141854354", 5, null); + t("-6.717481255640638829101946114674e-8", "-0.000000067174812556406388291019461146732616998258", 31, null); + t("-12.41976452", "-12.4197645179995365323309894", 10, null); + t("-6.529258780126449116249954644017839921024112900e-16", "-0.00000000000000065292587801264491162499546440178399210241129", 46, null); + t("-441838.0", "-441838", 7, null); + t("1.128285293592950e-8", "0.000000011282852935929493101783925259749957192", 16, null); + t("-8.654857e+7", "-86548567", 7, null); + t("3.8883293855303995e-7", "0.00000038883293855303994672627854769926811949", 17, null); + t("3.25870000e-13", "0.00000000000032587", 9, null); + t("3.702e+6", "3701031.59037494113", 4, null); + t("-3580077435.93682917449675702508371047", "-3580077435.93682917449675702508371046631533", 36, null); + t("-7.400", "-7.4", 4, null); + t("109519523263844229810.068", "109519523263844229810.067657779734413280795410968892638", 24, null); + t("-509247322311590671954830.86847660619", "-509247322311590671954830.8684766061855", 35, null); + t("7.5518638430980800496570562671727890e-10", "0.00000000075518638430980800496570562671727889997", 35, null); + t("-5056721600639122835615986051.468831942818200", "-5056721600639122835615986051.4688319428182", 43, null); + t("-1.796146861125551785886171829251460000000000e-16", "-0.000000000000000179614686112555178588617182925146", 43, null); + t("6.0e+2", "599", 2, null); + t("7.619930e-16", "0.00000000000000076199293", 7, null); + t("834668.2370121038159610193", "834668.237012103815961019258574789273273342", 25, null); + t("-3.92251395952329649490768e+26", "-392251395952329649490767912.240768552138247705202732", 24, null); + t("-47504099413385554632166.5098", "-47504099413385554632166.50972492550706", 27, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + + t("-1.4e+9", "-1336106841", 2, RoundingMode.ROUND_UP); + t("-2244450.2134814273335263", "-2244450.2134814273335262397290334104071203538487453309626146", 23, RoundingMode.ROUND_UP); + t("8.74e+29", "873625255363763952428129881990.679929486040461455296118489", 3, RoundingMode.ROUND_UP); + t("-1.85453549733179613185923288786", "-1.8545354973317961318592328878502252820666161607740183", 30, RoundingMode.ROUND_UP); + t("431.7150651927", "431.71506519265522010949747887049", 13, RoundingMode.ROUND_UP); + t("-8606297211156287.52520023752564", "-8606297211156287.5252002375256362382564355963505470716151", 30, RoundingMode.ROUND_UP); + t("-8.4634889709e+24", "-8463488970828351722405003.220603", 11, RoundingMode.ROUND_UP); + + t("-844789036.5239726", "-844789036.52397268892", 16, null); + t("-5056.20629012767878749185273209679064306054", "-5056.206290127678787491852732096790643060542", 42, null); + t("-0.3287519131314873763501859870298952500", "-0.32875191313148737635018598702989525", 37, null); + t("-60729764", "-60729764", 8, null); + t("-7.622e-14", "-0.00000000000007622481594531380999826456196664586", 4, null); + t("-4686402261639729535.736324492474", "-4686402261639729535.7363244924747488", 31, null); + t("-2.0", "-2", 2, null); + t("-13801188035233586637950193108.13592574381473451125649500", "-13801188035233586637950193108.135925743814734511256495", 55, null); + t("0.0000807327587149839799300000", "0.00008073275871498397993", 24, null); + t("-6.000000e-8", "-0.00000006", 7, null); + t("-3.83574993e+11", "-383574993535", 9, null); + t("7.6987000000000000e-14", "0.000000000000076987", 17, null); + t("80928866804.6112050947427973", "80928866804.6112050947427973864826014844575374353", 27, null); + t("-0.00730140", "-0.0073014067221009206110062377503733", 6, null); + t("2.72104773884160491036088486e+30", "2721047738841604910360884862459.4086993273252009015", 27, null); + t("3.008780781917733594e+25", "30087807819177335941398228.1424107931203", 19, null); + t("-1.31528920779613669158250146972297797867760000000000000000000e-19", "-0.00000000000000000013152892077961366915825014697229779786776", 60, null); + t("-8.5e+11", "-858982311008.257025719798657844609315293821", 2, null); + t("-3.6312e-12", "-0.0000000000036312827608449878", 5, null); + t("-0.0060000", "-0.006", 5, null); + t("-4.65727e+23", "-465727983501322687372765", 6, null); + t("-0.00000332331666628036603", "-0.000003323316666280366035430077076052", 18, null); + t("3.533702e-8", "0.00000003533702791135712510338001418872124", 7, null); + t("-0.04340", "-0.0434", 4, null); + t("-597340.278566069086858587852236235470", "-597340.2785660690868585878522362354706741", 36, null); + t("6.000e-8", "0.00000006", 4, null); + t("-3.624323359112776296e-19", "-0.00000000000000000036243233591127762966338166", 19, null); + t("-3731378568692042924197.154", "-3731378568692042924197.15400334142251496795634388", 25, null); + t("-68249040894032065692.62", "-68249040894032065692.62771690318493", 22, null); + t("8786096722661914.89732851", "8786096722661914.89732851188880184891692993684242690315", 24, null); + t("-1.8413321536281347264486372900000000000e-12", "-0.00000000000184133215362813472644863729", 38, null); + t("4.0e-9", "0.0000000040395827543504045", 2, null); + t("-2.9427e+16", "-29427119846374896", 5, null); + t("-917760614.4", "-917760614.45404359204911454", 10, null); + t("8e+4", "89427", 1, null); + t("0.00000920323988134356953828667260", "0.0000092032398813435695382866726", 27, null); + t("8.2e+16", "82068995955708118", 2, null); + t("3.35195944828e+26", "335195944828445911672446409.3379497158141", 12, null); + t("-3.89774891030e-9", "-0.00000000389774891030223957363124620581272897758735065471", 12, null); + t("-4", "-4", 1, null); + t("8", "8", 1, null); + t("1.41172955693912934219137966000000e-10", "0.000000000141172955693912934219137966", 33, null); + t("9.21481e+13", "92148111958857", 6, null); + t("-5.859975978432853e-18", "-0.0000000000000000058599759784328539", 16, null); + t("-72.0", "-72", 3, null); + t("3785098751297.8929911950994079707157472", "3785098751297.89299119509940797071574729867819252140059", 38, null); + t("4.38e+16", "43893416753778361.297703358127215475077814", 3, null); + t("-33110.29096", "-33110.2909623520267070846514", 10, null); + t("-74.38305251784882707720486436292121914036495", "-74.3830525178488270772048643629212191403649548392158614", 43, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_CEIL; + + t("5.80e+18", "5805164734299168659.6173113885173384955443", 3, RoundingMode.ROUND_DOWN); + t("-1.719875889271327", "-1.719875889271327133154458155573493605566221534", 16, RoundingMode.ROUND_DOWN); + t("113.672129563", "113.672129563441659725876055771857758675550104070419635029", 12, RoundingMode.ROUND_DOWN); + t("-77950052814622081084397.9", "-77950052814622081084397.91853869253589242574", 24, RoundingMode.ROUND_DOWN); + t("4.53106985e+27", "4531069852787151785292512309.2901993579425172826443679877", 9, RoundingMode.ROUND_DOWN); + t("45285.246089613169416440797840714", "45285.2460896131694164407978407142422013937", 32, RoundingMode.ROUND_DOWN); + t("307760226411464.7333268079863299", "307760226411464.73332680798632996332324381779707", 31, RoundingMode.ROUND_DOWN); + + t("-0.0300", "-0.0300921721159558", 3, null); + t("65317841202.20949859371772273480125", "65317841202.2094985937177227348012464402154", 34, null); + t("-8.9231575495202e+29", "-892315754952021994731329589682.1894180393920044085713", 14, null); + t("-2.8075679202e-8", "-0.0000000280756792028583066", 11, null); + t("9.71456e+9", "9714558552", 6, null); + t("2.9514099281e-10", "0.00000000029514099281", 11, null); + t("-1.24459e+14", "-124459985101107", 6, null); + t("0.0000734657394154607815562372000000", "0.0000734657394154607815562372", 30, null); + t("1.78719530353972e+15", "1787195303539715", 15, null); + t("-2.8e+9", "-2861102528", 2, null); + t("-8.74480375581000e-9", "-0.00000000874480375581", 15, null); + t("-1792404726015427380.248150830448457643618022", "-1792404726015427380.248150830448457643618022", 43, null); + t("-678437320202616518.2220157912209286", "-678437320202616518.22201579122092864", 34, null); + t("-1.937304915215780220809799809655893674619672771e-8", "-0.000000019373049152157802208097998096558936746196727718", 46, null); + t("824172.15863347130174103087", "824172.15863347130174103086069960571", 26, null); + t("1.90040714061724000e-9", "0.00000000190040714061724", 18, null); + t("-1634488249956745498.58311", "-1634488249956745498.58311123049258868631623840423306", 24, null); + t("0.0000019600923098540334001755857361187871270117098000", "0.0000019600923098540334001755857361187871270117098", 47, null); + t("8.383e+4", "83829", 4, null); + t("2.843306120337864064e+23", "284330612033786406376718", 19, null); + t("1.86235e+15", "1862340943682995.08270612464203237562317928642459", 6, null); + t("-2.31e+13", "-23195312138083", 3, null); + t("5.450237e+21", "5450236028274773541895.65198933808968167192289601277", 7, null); + t("-0.008976419749408075453861117865459", "-0.00897641974940807545386111786545972434475187220274239581167", 31, null); + t("-761181660548661030.25", "-761181660548661030.25539542029", 20, null); + t("-1844205.93619958", "-1844205.936199580689273072905714475263817", 15, null); + t("4842.77906784902805070438222238898372327093", "4842.77906784902805070438222238898372327092242428134814721", 42, null); + t("-4.161198953445629503503971e+26", "-416119895344562950350397179", 25, null); + t("1.084e+4", "10836", 4, null); + t("8.71081704218174598654542083000e-8", "0.0000000871081704218174598654542083", 30, null); + t("7.9139683e+36", "7913968291641940848703040206324645237.8515176490912667096", 8, null); + t("-0.000008", "-0.000008", 1, null); + t("8.3660085625e+34", "83660085624983922907621996804192921.3992927", 11, null); + t("0.000006980263008", "0.000006980263007423150706324065130475391", 10, null); + t("-31348084528321454060964445534333629317.69561497283830023", "-31348084528321454060964445534333629317.69561497283830023", 55, null); + t("-2417953792643886.3485495754363678888681996409674308643", "-2417953792643886.3485495754363678888681996409674308643", 53, null); + t("4.0e+6", "3982592", 2, null); + t("-2092315.015029722200", "-2092315.0150297222", 19, null); + t("-364992136844916.9092238", "-364992136844916.909223894931280218350055327754935", 22, null); + t("8.34e+24", "8333642861002789136219873", 3, null); + t("7.6008837179413e+14", "760088371794122.3380234188299740029832128019574765416", 14, null); + t("-6655726127.0", "-6655726127", 11, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + + t("-1.7218673528e+29", "-172186735288586033321621121024.11240623", 11, RoundingMode.ROUND_CEIL); + t("-3.31e+28", "-33197729862068219255677464974", 3, RoundingMode.ROUND_CEIL); + t("-4.835191326e+29", "-483519132605694848658321267839.23575134378118945659616358", 10, RoundingMode.ROUND_CEIL); + t("7.3", "7.24882150443803", 2, RoundingMode.ROUND_CEIL); + t("-89186640077683569.407061427673", "-89186640077683569.4070614276736450982125609", 29, RoundingMode.ROUND_CEIL); + t("-49379651041268.5", "-49379651041268.548293", 15, RoundingMode.ROUND_CEIL); + t("-7685054.17489171951660", "-7685054.17489171951660508194254495141726065698575306365447451", 21, RoundingMode.ROUND_CEIL); + + t("-39449414270333.925852213835", "-39449414270333.925852213834759031494508489474", 26, null); + t("-7.50437989976", "-7.50437989975503711836768", 12, null); + t("-0.000004303975760000000", "-0.00000430397576", 16, null); + t("-16040233916257241895.97650633973989", "-16040233916257241895.9765063397398857", 34, null); + t("-7438.9287248601393819", "-7438.9287248601393818639176907606", 20, null); + t("9.857465584298e-7", "0.000000985746558429876825600458537705318327799", 13, null); + t("532637.9095983547284850466577958315920", "532637.90959835472848504665779583159203905641996", 37, null); + t("-1.40416695292e+30", "-1404166952915258058306475434520.7856110230505157", 12, null); + t("60346876.6670832429026869255506808488", "60346876.6670832429026869255506808488", 36, null); + t("-2.52466133e+23", "-252466132238128405832984", 9, null); + t("55", "55", 2, null); + t("-63075151.962465776516325792253177939493172", "-63075151.9624657765163257922531779394931714", 41, null); + t("7.411461e+17", "741146113404361548.543142388", 7, null); + t("-58835755359067474972692072494278983.7", "-58835755359067474972692072494278983.6314961114191480012916", 36, null); + t("-333", "-333", 3, null); + t("7.24707e+13", "72470760481059", 6, null); + t("39232618.1513515442233995765535454389", "39232618.151351544223399576553545438981252", 36, null); + t("-4e+5", "-357994", 1, null); + t("-1.90e+4", "-18904.11335233460016293296574557643545512393801643609213933", 3, null); + t("-6585152111956929.924309477123328984876184272828762900", "-6585152111956929.9243094771233289848761842728287629", 52, null); + t("4.505e-7", "0.0000004505328", 4, null); + t("-2.4125965461846e+19", "-24125965461845662271", 14, null); + t("4.82673137e+33", "4826731373891127996812671510065700.871947701", 9, null); + t("-6621278.2", "-6621278.1120573461544975284970826524341806671316100080257485", 8, null); + t("-1.8015392869565386634525164264799463344376205007391000000e-7", "-0.00000018015392869565386634525164264799463344376205007391", 56, null); + t("-0.00026465463574439280006655492609887593", "-0.00026465463574439280006655492609887592672292239588307259", 35, null); + t("4.87815228988300090", "4.8781522898830009076096556452567", 18, null); + t("-5.1107117199524082779077801201617e+35", "-511071171995240827790778012016163902", 32, null); + t("1.4734242515706890557e+20", "147342425157068905574.390834406", 20, null); + t("-4019325091848890817268596991.815200", "-4019325091848890817268596991.8152", 34, null); + t("3.8e+14", "384715413967421", 2, null); + t("7483444.49", "7483444.498791364040133403947480439118040376737700653", 9, null); + t("-594538312.6255", "-594538312.625485172379", 13, null); + t("0.00753000", "0.00753", 6, null); + t("8.1440148247e+13", "81440148247675.27449603492606125135884", 11, null); + t("8.444003009300e+21", "8444003009300239495556", 13, null); + t("2308.1529840912558574923966042774800185916972327325289", "2308.1529840912558574923966042774800185916972327325289261", 53, null); + t("2.67e+3", "2674.698673623", 3, null); + t("-2.82819136180287470854625537e+30", "-2828191361802874708546255368471.80800005766", 27, null); + t("518250411", "518250411", 9, null); + t("3.2e+4", "32661.9135347256259375001777960775509", 2, null); + t("29.15347602216416991973", "29.153476022164169919735054013077734177", 22, null); + t("-4.611285536613066108e+30", "-4611285536613066107912600830385", 19, null); + t("-51774110.0705144989023975360207167071143094356321", "-51774110.070514498902397536020716707114309435632036586", 48, null); + t("-11969053.91", "-11969053.9052", 10, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + + t("687378946204028.408158998985701", "687378946204028.408158998985701430935094", 30, RoundingMode.ROUND_FLOOR); + t("42.452", "42.4523909443358871476552683504968536100051", 5, RoundingMode.ROUND_FLOOR); + t("-22771061110217019663705702.44170142085172", "-22771061110217019663705702.44170142085171219649140996", 40, RoundingMode.ROUND_FLOOR); + t("-1470.640309974016167512235698629586", "-1470.6403099740161675122356986295857257144815364", 34, RoundingMode.ROUND_FLOOR); + t("-1.110228e+27", "-1110227398804733429555663947.06619", 7, RoundingMode.ROUND_FLOOR); + t("-6.4898237111e+26", "-648982371105405071851661301", 11, RoundingMode.ROUND_FLOOR); + t("-4641197449469148.658850361201903", "-4641197449469148.658850361201902222", 31, RoundingMode.ROUND_FLOOR); + + t("7.905300379788e+16", "79053003797878062.6454954", 13, null); + t("-6.83490000000e-13", "-0.00000000000068349", 12, null); + t("-62760641815.69084973661201201", "-62760641815.690849736612012010742308663", 28, null); + t("0.000704", "0.000704496313", 3, null); + t("82926865286287.8852357368342860830310721063079299643", "82926865286287.88523573683428608303107210630792996432", 51, null); + t("-0.00032388272393900301214220090249", "-0.00032388272393900301214220090248744799603424908", 29, null); + t("8.6e+12", "8621641486938.4837308885005093571508566552428700982454", 2, null); + t("2", "2", 1, null); + t("1.4641440117052559075e+20", "146414401170525590746.047955203899370771105088", 20, null); + t("3511.925583", "3511.925583", 10, null); + t("2861824.253079699095728", "2861824.253079699095727765750377038689", 22, null); + t("-3.940097756e+10", "-39400977564.548924098664431671700066962", 10, null); + t("-888", "-888", 3, null); + t("-0.000302106125213724988141721256104", "-0.00030210612521372498814172125610432438685", 30, null); + t("6943.4804552555315615809650428503", "6943.480455255531561580965042850266831249032130818358478956", 32, null); + t("3365678", "3365678.3397481381125085749", 7, null); + t("-5.3943374314e+19", "-53943374313769567458.386865325", 11, null); + t("-6.67880509225510150542252852147049489938254298497979", "-6.6788050922551015054225285214704948993825429849797925563674", 51, null); + t("1.36424e+18", "1364240644139816224.60228356028", 6, null); + t("1.410236477950416725e+23", "141023647795041672538410.84935693266374259666015274447", 19, null); + t("-802.817765", "-802.81776500697712984253334522", 9, null); + t("-5.276210722424690668896260075355037218851", "-5.27621072242469066889626007535503721885096", 40, null); + t("-0.000874209568970788", "-0.0008742095689707877849902027926289294748756775668387", 15, null); + t("0.092053833162002", "0.09205383316200189249855864903410820435666385119723209239", 14, null); + t("7.0656298318128209e-14", "0.0000000000000706562983181282092835675843980510112", 17, null); + t("-8.66511516852116659e+18", "-8665115168521166587", 18, null); + t("3.3490648464e+22", "33490648463534229842937.79268276945692333064632966129475", 11, null); + t("-39041587174692569176.82740706154183894", "-39041587174692569176.827407061541838942655371389185", 37, null); + t("-3834.0", "-3834", 5, null); + t("-0.008912382644814418776268630", "-0.00891238264481441877626863", 25, null); + t("-2.1e+5", "-206119", 2, null); + t("4.83340000000e-8", "0.000000048334", 12, null); + t("3.185196533675230520000000000000e-19", "0.000000000000000000318519653367523052", 31, null); + t("6.0431217298488095562718496137220939447806000000000000000e-17", "0.000000000000000060431217298488095562718496137220939447806", 56, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_DOWN; + + t("-8e+26", "-786589693451258754942279859.3834", 1, RoundingMode.ROUND_HALF_UP); + t("-26.0", "-26", 3, RoundingMode.ROUND_HALF_UP); + t("-8.462226728e+11", "-846222672789.2087639320702375427266333530942524245", 10, RoundingMode.ROUND_HALF_UP); + t("-4e-7", "-0.0000004019666978288041783154210868", 1, RoundingMode.ROUND_HALF_UP); + t("-315609.775843992", "-315609.775843992", 15, RoundingMode.ROUND_HALF_UP); + t("-3.319e+9", "-3318880945", 4, RoundingMode.ROUND_HALF_UP); + t("-6", "-6.2847", 1, RoundingMode.ROUND_HALF_UP); + + t("-1408003897645960.648499616456", "-1408003897645960.648499616456", 28, null); + t("-1.0", "-1", 2, null); + t("-8.28e+14", "-827860423543649", 3, null); + t("0.00054398953021585321711560388890", "0.00054398953021585321711560388889590290139888", 29, null); + t("-4.409e-9", "-0.000000004408792", 4, null); + t("4.0000e-10", "0.0000000004", 5, null); + t("3.40e+16", "34001779327925905", 3, null); + t("-9.03e+34", "-90332622851356543193546536340366547", 3, null); + t("-4.5320e+16", "-45320100856429143.39155209710530673318222777", 5, null); + t("3.618e+30", "3618328715720583671291544414202", 4, null); + t("-1003.61140", "-1003.61139687804673322250551", 9, null); + t("-8139415035028632370.38737", "-8139415035028632370.38736602659835", 24, null); + t("8e+7", "83198058", 1, null); + t("-7.99492e+14", "-799491603856548", 6, null); + t("444", "444", 3, null); + t("0.00000613258266938", "0.0000061325826693823067791292255878336353793864046451956723", 12, null); + t("-554696279951718746537611.26040", "-554696279951718746537611.26040029508470430208572833137315", 29, null); + t("446", "446.189185820662709163412845035853873", 3, null); + t("22873128187827109553471831451.06623850867", "22873128187827109553471831451.06623850866672688842662473", 40, null); + t("9e+5", "880389", 1, null); + t("-6.7516118890844e+16", "-67516118890844443.625641", 14, null); + t("-0.36107158435820", "-0.36107158435820101656696353075596201902674001080619510849", 14, null); + t("8.958386374640407365", "8.958386374640407364828679985365339921820421370157246", 19, null); + t("3e+2", "257", 1, null); + t("-1.904659739878e+18", "-1904659739878060478.113131137688927604413210083841", 13, null); + t("-0.0000627142", "-0.00006271421732891589577305487292334", 6, null); + t("3.310541e+8", "331054103", 7, null); + t("-1.793886e+23", "-179388600781592577147651.2641684828762234473", 7, null); + t("0.0004600", "0.00046", 4, null); + t("-2.9e+21", "-2906505321975413509885", 2, null); + t("86415.94739506", "86415.9473950557683374", 13, null); + t("6.730414", "6.7304135909152", 7, null); + t("-5.032367e+14", "-503236749968584", 7, null); + t("-5.0241682013868216287718e+32", "-502416820138682162877178622610283", 23, null); + t("-0.0552606118984074172116684879479087", "-0.0552606118984074172116684879479087", 33, null); + t("91017414629852252476380368766.471", "91017414629852252476380368766.47117955844005", 32, null); + t("28586.32124747000", "28586.32124747000107561236523943", 16, null); + t("0.000001935665545322534195131", "0.0000019356655453225341951305040536808235510260170838860718", 22, null); + t("7.8", "7.803563246406851025", 2, null); + t("-4.89914223627882382434323e+26", "-489914223627882382434323457.50920109688497974624541155867073", 24, null); + t("384718796891211107", "384718796891211107", 18, null); + t("42510.74002309897971230194", "42510.7400230989797123019438399853496258", 25, null); + t("-7.388e+11", "-738804895894", 4, null); + t("-5.0000000e-7", "-0.0000005", 8, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_EVEN; + + t("42334337596496149636254", "42334337596496149636254.4926162509306406461", 23, RoundingMode.ROUND_HALF_DOWN); + t("-7e+9", "-7246374971.34279698356", 1, RoundingMode.ROUND_HALF_DOWN); + t("71516263932998764871838469072", "71516263932998764871838469072.280115355524", 29, RoundingMode.ROUND_HALF_DOWN); + t("71257489.5995227415169007618702182092", "71257489.59952274151690076187021820922744", 36, RoundingMode.ROUND_HALF_DOWN); + t("268492835", "268492834.77041", 9, RoundingMode.ROUND_HALF_DOWN); + t("50325.551277778107847798802", "50325.551277778107847798801525", 26, RoundingMode.ROUND_HALF_DOWN); + t("-5.289303987e+29", "-528930398665449048343281311623.69686", 10, RoundingMode.ROUND_HALF_DOWN); + + t("0.08000", "0.08", 4, null); + t("-4.5132e+21", "-4513243388120382069815.8508153058993058875", 5, null); + t("-73549", "-73549.2594630551663822238", 5, null); + t("1.275868004728922895890883e+29", "127586800472892289589088296800.6", 25, null); + t("-0.0003715444034899460421534099962225699000", "-0.0003715444034899460421534099962225699", 37, null); + t("-6.9625565265e+24", "-6962556526511822306135536", 11, null); + t("1.67583703641e+13", "16758370364138.915293525076269061228714877", 12, null); + t("-173594.95064085553515176707313947534918109631092170", "-173594.950640855535151767073139475349181096310921699", 50, null); + t("-6.9503965525e+19", "-69503965525000308384.151383", 11, null); + t("4.411225e+20", "441122486054080817112", 7, null); + t("2.467044064783596937642371770e+31", "24670440647835969376423717700462.39", 28, null); + t("3.9711897549481645654e+24", "3971189754948164565361634.8039734590476326224193520402091769", 20, null); + t("-1.4757613208690e+21", "-1475761320868963235919.64499841336073105746686372924161", 14, null); + t("91683083887068.6191146", "91683083887068.61911461351134520171343337804061135", 21, null); + t("-7923074181102822.578", "-7923074181102822.5778", 19, null); + t("-6.800e-8", "-0.000000068", 4, null); + t("-2.57954671081460000000e-10", "-0.00000000025795467108146", 21, null); + t("5.5352911972e-9", "0.000000005535291197169667611325365189624523452", 11, null); + t("6.0488358e+8", "604883577", 8, null); + t("-7.575535014e-9", "-0.00000000757553501363609536678641245355", 10, null); + t("7.547067960578900230644488e-10", "0.00000000075470679605789002306444877998602723", 25, null); + t("-3.64561456763e+12", "-3645614567625.4", 12, null); + t("9.0e-7", "0.0000009", 2, null); + t("7e+2", "687", 1, null); + t("517277827334839.8174848543680868", "517277827334839.8174848543680868015165926618", 31, null); + t("7e+2", "655.46270361324473194", 1, null); + t("1632131488313153.49737424823493573157", "1632131488313153.497374248234935731568", 36, null); + t("274068317992.5998880719845028748169734442", "274068317992.5998880719845028748169734442394151076", 40, null); + t("-7.060e-9", "-0.00000000706025531009734073", 4, null); + t("0.004444", "0.0044439457493", 4, null); + t("72482770689153111154104782082.023", "72482770689153111154104782082.022764082943227214833851", 32, null); + t("5.9130694036072794206e+24", "5913069403607279420613864.152", 20, null); + t("843384561300245347961437.966", "843384561300245347961437.96592523791", 27, null); + t("0.0000035198821282510000000", "0.000003519882128251", 20, null); + t("-1.00371560130267706870097e-9", "-0.00000000100371560130267706870096885251", 24, null); + t("17504218.4970302", "17504218.49703016415913667026121376499", 15, null); + t("-5e-9", "-0.000000005169058703", 1, null); + t("6.922803246e+10", "69228032455", 10, null); + t("-16", "-16", 2, null); + t("-1.355147513468192707127939151e+40", "-13551475134681927071279391508441439066206.58705380600075", 28, null); + t("81670324.1197758695", "81670324.1197758695212865075629796973196504241126", 18, null); + t("0.00005", "0.00004797485174640366805332660647", 1, null); + t("-4.864397594e-10", "-0.0000000004864397594461335282648538530108953965681345", 10, null); + t("47694105.2312532", "47694105.23125322528167211284521303", 15, null); + t("-4.962106181e+26", "-496210618135432953927871636.779236", 10, null); + t("1.2800030559497062236642e+37", "12800030559497062236641930592334626609.7332", 23, null); + t("-574830783.7", "-574830783.6689168903917696583746514637433390929", 10, null); + t("5969.431086199057470", "5969.43108619905746956015212970904111744101", 19, null); + t("-4.8e+3", "-4814.32904953003285", 2, null); + t("4.297e+16", "42973001760252134", 4, null); + t("-5.7628e+6", "-5762846.590152347665179652381407653797146356303622218259885", 5, null); + t("904864662232032.160612401810317927291657403142932", "904864662232032.16061240181031792729165740314293194205879163", 48, null); + t("7.9892e+20", "798923115068265241915.537619430376605", 5, null); + t("-8.97759349384000643", "-8.97759349384000643427096282979", 18, null); + + t("123.45", "12.345e1", null, null); + + tx(() => { bigDecimalFactory.BigDecimal(1.23).ToPrecision(-23); }, ".toPrecision(-23)"); + tx(() => { bigDecimalFactory.BigDecimal(1.23).ToPrecision((long)1e9 + 1); }, ".toPrecision(1e9 + 1)"); + tx(() => { bigDecimalFactory.BigDecimal(1.23).ToPrecision(0); }, ".toPrecision(0)"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightToSDTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightToSDTests.cs new file mode 100644 index 0000000..6d3ed79 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightToSDTests.cs @@ -0,0 +1,540 @@ +using DecimalSharp.Core; +using NUnit.Framework; +using System; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightToSD")] + public class BigDecimalLightToSDTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ToSD() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_CEIL, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (string expected, BigDecimalArgument n, long? sd, RoundingMode? rm) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToSD(sd, rm).ValueOf()); + }; + + var tx = (Action fn, string msg) => + { + BigDecimalTests.assertException(fn, msg); + }; + + t("0", 0, null, null); + t("0.5", 0.5, null, null); + t("1", 1, null, null); + t("-1", -1, null, null); + + t("0", "0", 1, null); + t("0", "-0", 1, null); + t("0", "-0", 1, RoundingMode.ROUND_UP); + t("0", "-0", 1, RoundingMode.ROUND_FLOOR); + t("0", "-0", 1, RoundingMode.ROUND_HALF_EVEN); + t("0", "0", 10, null); + t("0", "-0", 20, null); + + t("12.345", "12.345", null, null); + t("123456789.12345678912", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Precision = 5; + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_UP; + t("123460000", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_DOWN; + t("123450000", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_CEIL; + t("123460000", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_FLOOR; + t("123450000", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_UP; + t("123460000", "123456789.12345678912346789", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_DOWN; + t("123450000", "123455000", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_EVEN; + t("123460000", "123455000", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_CEIL; + t("123460000", "123455000", null, null); + + bigDecimalFactory.Config.Rounding = RoundingMode.ROUND_HALF_FLOOR; + t("123450000", "123455000", null, null); + + t("4937809340236234102130.947044664011", "4937809340236234102130.947044664011", 35, RoundingMode.ROUND_UP); + t("337528093391.5", "337528093391.493107", 13, RoundingMode.ROUND_HALF_EVEN); + t("7725982105101004219161075340794084739.771523585576612", "7725982105101004219161075340794084739.77152358557661226998117872661100", 52, RoundingMode.ROUND_FLOOR); + t("52215017456426378512883312970.4861221", "52215017456426378512883312970.4861221", 36, RoundingMode.ROUND_CEIL); + t("4985349771216.54991391", "4985349771216.54991391072733", 21, RoundingMode.ROUND_HALF_UP); + t("1101895947.92763", "1101895947.92762954984827601473036438720818296", 15, RoundingMode.ROUND_HALF_UP); + t("20026847", "20026846.9372", 8, RoundingMode.ROUND_HALF_EVEN); + t("8204561821674316833270", "8204561821674316833266.047893028353", 21, RoundingMode.ROUND_CEIL); + t("7419720696218", "7419720696218.21961188299387526", 13, RoundingMode.ROUND_DOWN); + t("635000000", "634438520.50126453", 3, RoundingMode.ROUND_UP); + t("28392130715407969", "28392130715407968.96", 18, RoundingMode.ROUND_HALF_DOWN); + t("36765276128959576253780217524271972128", "36765276128959576253780217524271972127.99", 38, RoundingMode.ROUND_CEIL); + t("88429990502356839.49260500060049004694585659", "88429990502356839.49260500060049004694585658780656", 43, RoundingMode.ROUND_HALF_UP); + t("2768479", "2768479.2081810557738981722324989595", 7, RoundingMode.ROUND_DOWN); + t("85601900000000000000000000", "85601959550632180897338814.9", 6, RoundingMode.ROUND_FLOOR); + t("3911951424308151086107907934806060", "3911951424308151086107907934806062.45495666964", 33, RoundingMode.ROUND_HALF_DOWN); + t("892162270787217755968010370478903185093", "892162270787217755968010370478903185093.0", 42, RoundingMode.ROUND_HALF_EVEN); + t("8018330257774248398702693271920270", "8018330257774248398702693271920270.09311146148062547723636185680287073", 33, RoundingMode.ROUND_DOWN); + t("88092477731945.1182807043", "88092477731945.118280704259340858", 24, RoundingMode.ROUND_HALF_UP); + t("9252541030951.9012531009707842372724161089075754576", "9252541030951.90125310097078423727241610890757545760", 53, RoundingMode.ROUND_FLOOR); + t("90993285126.547129568419776", "90993285126.5471295684197756642787492493375", 26, RoundingMode.ROUND_HALF_EVEN); + t("315137924718839945152625512241078.591350724696151650603", "315137924718839945152625512241078.59135072469615165060341097372", 54, RoundingMode.ROUND_DOWN); + t("822866202506325637.7", "822866202506325637.740891965300", 19, RoundingMode.ROUND_FLOOR); + t("78407276142689114300000000", "78407276142689114391801017.43776", 18, RoundingMode.ROUND_DOWN); + t("13199803085352251536787921", "13199803085352251536787920.6016623911545535514918245", 26, RoundingMode.ROUND_CEIL); + t("708.66442", "708.66442", 11, RoundingMode.ROUND_UP); + t("96426394035800000000000000000", "96426394035875521556520436906.967758064780068220269263413347", 12, RoundingMode.ROUND_DOWN); + t("297.1386227802795046531729004026", "297.1386227802795046531729004026975", 31, RoundingMode.ROUND_FLOOR); + t("98291.739", "98291.739", 9, RoundingMode.ROUND_CEIL); + t("93", "93.078130", 2, RoundingMode.ROUND_HALF_DOWN); + t("0.001", "0.00099999999999", 3, RoundingMode.ROUND_UP); + t("0.000999", "0.00099999999999", 3, RoundingMode.ROUND_DOWN); + t("56300000000", "56281970459.86927925182", 3, RoundingMode.ROUND_HALF_EVEN); + t("565000000000", "565914070913.993334452356", 3, RoundingMode.ROUND_DOWN); + t("3979389667144941000000000", "3979389667144941900427982.77071", 16, RoundingMode.ROUND_FLOOR); + t("52352220229587840556187937111046743.4583563", "52352220229587840556187937111046743.458356312735390953445935426160537204", 42, RoundingMode.ROUND_HALF_UP); + t("36271.3981207141751333261", "36271.39812071417513332613", 24, RoundingMode.ROUND_DOWN); + t("4739543704210300000000000000", "4739543704210297904547136327.7628335972128075226361512", 15, RoundingMode.ROUND_HALF_EVEN); + t("37661669615568080247052723032589226.8", "37661669615568080247052723032589226.77024153", 36, RoundingMode.ROUND_HALF_DOWN); + t("9645371928851642074344527881477634000", "9645371928851642074344527881477634345.4914341", 34, RoundingMode.ROUND_HALF_UP); + t("698149777646326000000000000", "698149777646325814282220973.088797026232", 15, RoundingMode.ROUND_CEIL); + t("18498919087448435591833490000000", "18498919087448435591833489904295.729717528", 26, RoundingMode.ROUND_HALF_DOWN); + t("325969900850571568339999253781743124500", "325969900850571568339999253781743124504.0", 38, RoundingMode.ROUND_HALF_DOWN); + t("40693000000", "40693051631.1251783538001747467807789871", 5, RoundingMode.ROUND_HALF_UP); + t("810710395413475993", "810710395413475993.394678", 18, RoundingMode.ROUND_FLOOR); + t("86568781977428682.3822270220321", "86568781977428682.38222702203211", 30, RoundingMode.ROUND_HALF_DOWN); + t("427897046936740724.911837668090826906087", "427897046936740724.911837668090826906087", 41, RoundingMode.ROUND_FLOOR); + t("8248561437515605126456247769501697.764", "8248561437515605126456247769501697.764296656999", 37, RoundingMode.ROUND_HALF_UP); + t("5727898467119496952445688320883475.404402704196931184674675825", "5727898467119496952445688320883475.404402704196931184674675825", 64, RoundingMode.ROUND_HALF_UP); + t("8752958499919994791000000000000000", "8752958499919994791191031106105979.47729", 19, RoundingMode.ROUND_HALF_DOWN); + t("362154165751.582202112646276", "362154165751.58220211264627597398064", 28, RoundingMode.ROUND_HALF_DOWN); + t("11000000000000000000000000000000", "11914671819298396166152780469749.700178398572262303378530442966993", 2, RoundingMode.ROUND_DOWN); + t("84694.019523885", "84694.019523885", 16, RoundingMode.ROUND_DOWN); + t("46198004778598591438177002960.8079419769", "46198004778598591438177002960.807941976894036", 39, RoundingMode.ROUND_CEIL); + t("944540023268478392955679.235197603187056475911", "944540023268478392955679.235197603187056475911190458898708904", 45, RoundingMode.ROUND_HALF_DOWN); + t("6384.0533", "6384.0532734075270642890", 8, RoundingMode.ROUND_UP); + t("86.52585963444630269524402336034067", "86.5258596344463026952440233603406633365294", 34, RoundingMode.ROUND_UP); + t("211698906765339555009000000000000", "211698906765339555008927202275920.017666588018743809326", 21, RoundingMode.ROUND_HALF_EVEN); + t("93695.521776", "93695.521776317122397800801736652801", 11, RoundingMode.ROUND_FLOOR); + t("21", "20.73571174", 2, RoundingMode.ROUND_UP); + t("44651390355733081311803973.631", "44651390355733081311803973.6306343", 29, RoundingMode.ROUND_CEIL); + t("19628275338135891273639233000", "19628275338135891273639233078.3194337412", 26, RoundingMode.ROUND_DOWN); + t("715174732399634482855366624736839961.178974112796", "715174732399634482855366624736839961.1789741127950654699759400963516", 48, RoundingMode.ROUND_UP); + t("4010185.194165679", "4010185.1941656790873904791", 16, RoundingMode.ROUND_DOWN); + t("199763544.3", "199763544.2746", 10, RoundingMode.ROUND_HALF_DOWN); + t("792604593150000000000000000", "792604593148129965009152274.7", 11, RoundingMode.ROUND_HALF_DOWN); + t("95649091688620000000000", "95649091688615551968376.399825", 13, RoundingMode.ROUND_HALF_EVEN); + t("910000000000000000000000", "913366499416274482076806.54925361292970753237933", 2, RoundingMode.ROUND_HALF_UP); + t("5713.74819", "5713.7481900", 13, RoundingMode.ROUND_HALF_EVEN); + t("167100", "167006.16906099738293329453555919087", 4, RoundingMode.ROUND_CEIL); + t("91.8149489203336825896217615649", "91.814948920333682589621761564879978", 30, RoundingMode.ROUND_HALF_EVEN); + t("385450160421689186188707104582074317519.6", "385450160421689186188707104582074317519.5011", 40, RoundingMode.ROUND_UP); + t("980700000000000000000000000000", "980624231078939283428476194025.3425674466530668543518761186154209", 4, RoundingMode.ROUND_UP); + t("338479692666105014616000000000", "338479692666105014616253331245.01389376828879865108105798429640384", 21, RoundingMode.ROUND_DOWN); + t("174223066779502216000000000", "174223066779502215997051823.30021471115775", 19, RoundingMode.ROUND_HALF_DOWN); + t("321274436690589321065314360761529600", "321274436690589321065314360761529598.3926958740287183203559360243861156", 35, RoundingMode.ROUND_UP); + t("965260000000000000000000000000000000", "965258557685921663672915807775689926.372616852406174796393011112241", 5, RoundingMode.ROUND_HALF_DOWN); + t("20495856361024494227552150059704.128252538", "20495856361024494227552150059704.12825253784", 41, RoundingMode.ROUND_UP); + t("347539608767858771651414903881.81676443931828298", "347539608767858771651414903881.816764439318282980413", 47, RoundingMode.ROUND_HALF_EVEN); + t("319471356791473500000000000000000", "319471356791473556138054433838044.90552027814", 16, RoundingMode.ROUND_DOWN); + t("3758410000", "3758411337.659079355464558774017310777636076246", 6, RoundingMode.ROUND_DOWN); + t("986791401418080896.725674945574053721614668858858", "986791401418080896.725674945574053721614668858858", 51, RoundingMode.ROUND_HALF_UP); + t("172860000000000", "172864222463390.0005522631729828976762398559", 5, RoundingMode.ROUND_HALF_DOWN); + t("56.049", "56.049", 6, RoundingMode.ROUND_HALF_EVEN); + t("8343815925404573683080000", "8343815925404573683077429.4758959133829073879054267509464514", 21, RoundingMode.ROUND_HALF_UP); + t("5454663865.0064130258909884643960591289", "5454663865.006413025890988464396059128886823", 38, RoundingMode.ROUND_HALF_EVEN); + t("9581036221000167548404063617040830845674.8563402624162914896", "9581036221000167548404063617040830845674.8563402624162914896694713537", 59, RoundingMode.ROUND_DOWN); + t("500000000000", "410956568424.9910595380985324", 1, RoundingMode.ROUND_UP); + t("32006369380000000000000000000000000", "32006369376256480193142996925472582.0", 10, RoundingMode.ROUND_UP); + t("5222032172895746.90277", "5222032172895746.902766092011", 21, RoundingMode.ROUND_HALF_UP); + t("8439793217442.92", "8439793217442.92137711335321", 15, RoundingMode.ROUND_HALF_UP); + t("9.866065033617488770826998", "9.8660650336174887708269980", 28, RoundingMode.ROUND_HALF_UP); + t("44049352.2266915297896690888554259285496418688", "44049352.22669152978966908885542592854964186877", 45, RoundingMode.ROUND_UP); + t("26847260395161412327091304326000", "26847260395161412327091304326394.7663271691497120655790427", 29, RoundingMode.ROUND_FLOOR); + t("1000000000000", "1085137384726.66574913879922622187703130425247", 2, RoundingMode.ROUND_FLOOR); + t("9.946", "9.9456", 4, RoundingMode.ROUND_HALF_EVEN); + t("428952193056.953", "428952193056.953", 15, RoundingMode.ROUND_HALF_EVEN); + t("1941911780790529313259513.70860258", "1941911780790529313259513.70860257943008396576247829795083", 33, RoundingMode.ROUND_HALF_DOWN); + t("23968438750336.405474280759814", "23968438750336.405474280759813318106", 29, RoundingMode.ROUND_UP); + t("315154230499048000000000000000", "315154230499048332963529384927.93303628365695160150210696280635993802", 15, RoundingMode.ROUND_HALF_DOWN); + t("6500000000", "6480935501.55496974285182162603356273156890", 2, RoundingMode.ROUND_HALF_UP); + t("42302765724017563090210326618736869271", "42302765724017563090210326618736869270.98392129213256644255722", 39, RoundingMode.ROUND_CEIL); + t("608747404736337255085100901273291565", "608747404736337255085100901273291565.318094268584914528314761117", 36, RoundingMode.ROUND_FLOOR); + t("3154176290801000000000000000", "3154176290800715548619630621.0355772810773559541", 13, RoundingMode.ROUND_HALF_UP); + t("38865242750002932570887590800000000000", "38865242750002932570887590890877550733.5505553313425194996432914268372269", 27, RoundingMode.ROUND_DOWN); + t("59457914554626139.52", "59457914554626139.52065942543632055255656", 19, RoundingMode.ROUND_HALF_DOWN); + t("8728384988174071448.69", "8728384988174071448.69274", 21, RoundingMode.ROUND_HALF_UP); + t("8209486790494710645762862448749.80842396605900775935", "8209486790494710645762862448749.80842396605900775935", 54, RoundingMode.ROUND_DOWN); + t("963188883728.74069481457014205", "963188883728.740694814570142059", 29, RoundingMode.ROUND_FLOOR); + t("93249710101545870000000000", "93249710101545874917863173.03705388925", 16, RoundingMode.ROUND_FLOOR); + t("88179259072684818766023076456.5889523232", "88179259072684818766023076456.58895232320350", 39, RoundingMode.ROUND_HALF_UP); + t("776981797289252251.093401546863758214465", "776981797289252251.093401546863758214465286704664334", 39, RoundingMode.ROUND_HALF_UP); + t("188670879464255056850261739500000000000", "188670879464255056850261739507365918265.9293874736873279", 28, RoundingMode.ROUND_DOWN); + t("790372524561301386433116300000000000", "790372524561301386433116293301042112.0", 25, RoundingMode.ROUND_CEIL); + t("117626300000000000", "117626347290152284.584779", 7, RoundingMode.ROUND_FLOOR); + t("353396834933281759072773.805789609148", "353396834933281759072773.805789609148", 37, RoundingMode.ROUND_HALF_UP); + t("4274522263032700000", "4274522263032712850.0041729873", 14, RoundingMode.ROUND_HALF_UP); + t("8350000000000", "8345606845226.45566624", 3, RoundingMode.ROUND_HALF_EVEN); + t("7139338928.10029575", "7139338928.10029575", 19, RoundingMode.ROUND_CEIL); + t("1.28993795996", "1.289937959964596899900", 12, RoundingMode.ROUND_FLOOR); + t("581091710823050000000000000", "581091710823047241756858512.713357759428", 14, RoundingMode.ROUND_UP); + t("4952915437691054280969583000000", "4952915437691054280969583218972.8616946954635715417980", 25, RoundingMode.ROUND_DOWN); + t("9705894787100000000000000000000000", "9705894787058704299917761166078683.9910480951422", 11, RoundingMode.ROUND_HALF_DOWN); + t("3709152457254657158536681.732705728776998763593525103", "3709152457254657158536681.732705728776998763593525103159733", 52, RoundingMode.ROUND_FLOOR); + t("186530566473536251263.858877958", "186530566473536251263.858877958474287539", 30, RoundingMode.ROUND_HALF_UP); + t("18185426229191232807040619835808.46825483359797368754", "18185426229191232807040619835808.46825483359797368754", 52, RoundingMode.ROUND_FLOOR); + t("41.5133038761731262218686", "41.51330387617312622186860688055631484", 24, RoundingMode.ROUND_HALF_UP); + t("892734300000000000000000000000000000000", "892734285316609348922285835347841194677.279150490649933902110687168010", 7, RoundingMode.ROUND_HALF_UP); + t("8867741117000000000000000000", "8867741117136144692773028671.48789537068725372709865944763", 10, RoundingMode.ROUND_HALF_UP); + t("58066.6119296613521", "58066.611929661352058113440", 18, RoundingMode.ROUND_UP); + t("610095820904.3119523193", "610095820904.311952319394878656597629841829693065", 22, RoundingMode.ROUND_FLOOR); + t("45147764430505826.0397992803707428783769210234", "45147764430505826.03979928037074287837692102337", 45, RoundingMode.ROUND_CEIL); + t("2365934669507425116.685560049269016191", "2365934669507425116.685560049269016191181112056065", 37, RoundingMode.ROUND_HALF_UP); + t("76328567052192004276.32866340568679575775108106109", "76328567052192004276.3286634056867957577510810610864", 49, RoundingMode.ROUND_HALF_DOWN); + t("9341865065715748.71038922653450359770952", "9341865065715748.7103892265345035977095284", 39, RoundingMode.ROUND_FLOOR); + t("1893828187345809.95025475161610431769040580234726", "1893828187345809.95025475161610431769040580234726", 51, RoundingMode.ROUND_HALF_DOWN); + t("675418012725769678669671724576651465", "675418012725769678669671724576651465.457619554107058395110952042747864102", 36, RoundingMode.ROUND_HALF_DOWN); + t("722723049408340056285000637093.2", "722723049408340056285000637093.1564846486282233386998", 31, RoundingMode.ROUND_CEIL); + t("8039307818523262169309113965.237955673046573", "8039307818523262169309113965.2379556730465735379", 43, RoundingMode.ROUND_DOWN); + t("620699795.768772003", "620699795.7687720027642576108299448", 18, RoundingMode.ROUND_HALF_EVEN); + t("677976409911497700000000000000000", "677976409911497719121490267737187.9281869113", 16, RoundingMode.ROUND_DOWN); + t("9913200270263800000000000000000000000", "9913200270263779985846761891158202865.88", 14, RoundingMode.ROUND_CEIL); + t("95447550983654000", "95447550983654256.94", 14, RoundingMode.ROUND_HALF_DOWN); + t("9727301256933984906097986874000", "9727301256933984906097986873657.0", 28, RoundingMode.ROUND_UP); + t("83100000000000000000000000000000000", "83144797009396341772640576982431626.06487716198510170943250663066", 3, RoundingMode.ROUND_HALF_DOWN); + t("76723773.04423217932", "76723773.0442321793176553237", 19, RoundingMode.ROUND_HALF_EVEN); + t("8400000000000000", "8442290748483192.541766601132013892502484734171240", 2, RoundingMode.ROUND_HALF_DOWN); + t("80224755820119141339232053676610000", "80224755820119141339232053676618497.04561623225397344999", 31, RoundingMode.ROUND_FLOOR); + t("655778655223372.97", "655778655223372.965", 17, RoundingMode.ROUND_UP); + t("20184630477822715391390984001199.1866444533896426202887666335307182015", "20184630477822715391390984001199.1866444533896426202887666335307182015", 71, RoundingMode.ROUND_HALF_EVEN); + t("41930826996134220", "41930826996134221.1974945198118251722677898312235505", 16, RoundingMode.ROUND_HALF_EVEN); + t("9401169208627113200000", "9401169208627113178099.432092017583166044", 17, RoundingMode.ROUND_HALF_EVEN); + t("46844285000000", "46844285165612.4277871838", 8, RoundingMode.ROUND_HALF_DOWN); + t("732653734623947749013990.255", "732653734623947749013990.2554245257179", 27, RoundingMode.ROUND_FLOOR); + t("817615530000000000000", "817615525922580553380.874869911815006035161427956123678666", 8, RoundingMode.ROUND_HALF_DOWN); + t("648900000000000000", "648881720909905928.428439970149048878644930752628", 4, RoundingMode.ROUND_CEIL); + t("85228991367.461452", "85228991367.46145277847248857183769451804173", 17, RoundingMode.ROUND_DOWN); + t("239393776.69622644151182", "239393776.69622644151181623925655", 23, RoundingMode.ROUND_HALF_UP); + t("33546748243104239469877559937.363355786582993", "33546748243104239469877559937.363355786582993", 44, RoundingMode.ROUND_UP); + t("4000000000000000000000", "3823084385271016278125.11", 1, RoundingMode.ROUND_HALF_DOWN); + t("77046259820455751626.6026808001342537", "77046259820455751626.602680800134253741613198881", 36, RoundingMode.ROUND_HALF_EVEN); + t("26687373854107297015683.744", "26687373854107297015683.74432725585956728677271691574", 26, RoundingMode.ROUND_FLOOR); + t("976672549609984585227222778700000000000", "976672549609984585227222778792212901570.55874088", 28, RoundingMode.ROUND_DOWN); + t("2.5616142669200936365611", "2.561614266920093636561053", 23, RoundingMode.ROUND_CEIL); + t("94492716203969.2225869573684291964191137943094515", "94492716203969.2225869573684291964191137943094514534843", 48, RoundingMode.ROUND_UP); + t("990770621178724769771370000", "990770621178724769771371129.99176486560800414", 23, RoundingMode.ROUND_FLOOR); + t("691412410360950760000000", "691412410360950750128020.48447221650237091009047", 17, RoundingMode.ROUND_UP); + t("29040659564825201725590.2424704967395", "29040659564825201725590.2424704967395", 38, RoundingMode.ROUND_CEIL); + t("89559092584017288521728982.5", "89559092584017288521728982.5833198608864", 27, RoundingMode.ROUND_DOWN); + t("1811614362251924.40512130616", "1811614362251924.405121306157849629", 27, RoundingMode.ROUND_HALF_EVEN); + t("4633501475000", "4633501474602.054640995909183", 10, RoundingMode.ROUND_UP); + t("678705341261.75297583718425453684090101", "678705341261.7529758371842545368409010097945103677", 39, RoundingMode.ROUND_HALF_EVEN); + t("564078844253167778.8161248928271829563591373580664298", "564078844253167778.8161248928271829563591373580664298", 52, RoundingMode.ROUND_UP); + t("88322850583909.7416016241", "88322850583909.74160162410286643", 25, RoundingMode.ROUND_DOWN); + t("3846366946174062127758449605.7022758096", "3846366946174062127758449605.702275809555523634154040950898280612811", 38, RoundingMode.ROUND_HALF_EVEN); + t("89658733400000000000000000000", "89658733356696254546423515335.28349", 9, RoundingMode.ROUND_CEIL); + t("4761467.862", "4761467.861150141326149685649922793395", 10, RoundingMode.ROUND_CEIL); + t("179.92617", "179.9261669", 8, RoundingMode.ROUND_HALF_UP); + t("75069004857851352687270011001106689339.08735", "75069004857851352687270011001106689339.08735", 46, RoundingMode.ROUND_HALF_DOWN); + t("3361644609630676688091028947986494293.045392455143082675351", "3361644609630676688091028947986494293.04539245514308267535094798418063548394", 58, RoundingMode.ROUND_CEIL); + t("6.7942421735585618046", "6.794242173558561804595", 20, RoundingMode.ROUND_HALF_UP); + t("51657502980255968504333490637.09662892780318174480380404", "51657502980255968504333490637.0966289278031817448038040396600018487", 55, RoundingMode.ROUND_HALF_DOWN); + t("11855.226308528", "11855.226308528", 16, RoundingMode.ROUND_HALF_EVEN); + t("61277000000000", "61276347667662.405824737", 5, RoundingMode.ROUND_UP); + t("4174609640", "4174609636.0", 9, RoundingMode.ROUND_HALF_EVEN); + t("687936219719625022378.9502", "687936219719625022378.9502057605855", 25, RoundingMode.ROUND_FLOOR); + t("193757131563910000", "193757131563911904.52682306122527060962641882465", 14, RoundingMode.ROUND_HALF_EVEN); + t("387.455087", "387.45508661743", 9, RoundingMode.ROUND_HALF_EVEN); + t("557618201766183005000000000", "557618201766183005041293682.3722668213410766424816487716234273", 19, RoundingMode.ROUND_HALF_EVEN); + t("21128122508600497.05489", "21128122508600497.05488760", 22, RoundingMode.ROUND_HALF_EVEN); + t("630252144005109.53366072283861382", "630252144005109.53366072283861381792", 32, RoundingMode.ROUND_HALF_UP); + t("963826907622.364662995276", "963826907622.364662995275692188", 24, RoundingMode.ROUND_CEIL); + t("4212653046051913081783119467271.37647511439591502128556", "4212653046051913081783119467271.3764751143959150212855631", 54, RoundingMode.ROUND_FLOOR); + t("2014467765.30542656127", "2014467765.30542656127", 22, RoundingMode.ROUND_HALF_UP); + t("1479320000000000000000000000000000", "1479326666751842221164864465643932.73817033951340680", 6, RoundingMode.ROUND_DOWN); + t("6944862581642049969018412438205282752.728862", "6944862581642049969018412438205282752.72886131507563067413320187385623099", 43, RoundingMode.ROUND_CEIL); + t("9838375.64", "9838375.645", 9, RoundingMode.ROUND_DOWN); + t("73392897409456861290131541129654.9256075066904", "73392897409456861290131541129654.925607506690362687103367844755771", 45, RoundingMode.ROUND_HALF_UP); + t("89764270000000000000000000000000000000", "89764275311096607184088076035578686331.70483764463153360153147271493", 7, RoundingMode.ROUND_DOWN); + t("615391331037547517357702.9541121335087", "615391331037547517357702.9541121335086812", 37, RoundingMode.ROUND_HALF_DOWN); + t("2617216902482291199973663.484710966125", "2617216902482291199973663.484710966125", 37, RoundingMode.ROUND_HALF_UP); + t("17129271618518517092155339580000", "17129271618518517092155339589985.34795326188", 28, RoundingMode.ROUND_FLOOR); + t("606535160521504794000000000000000000000", "606535160521504794060646691380816193844.7", 18, RoundingMode.ROUND_HALF_DOWN); + t("34177380606532061226000", "34177380606532061225426.5490340", 20, RoundingMode.ROUND_CEIL); + t("537578.927123", "537578.9271229227", 12, RoundingMode.ROUND_UP); + t("5008643590729908333990610000", "5008643590729908333990609905.47558686510363696", 25, RoundingMode.ROUND_HALF_DOWN); + t("4895936188848030000000000000000000000", "4895936188848031794116383643496168477.0801543", 15, RoundingMode.ROUND_DOWN); + t("5683079691081606113599129167429526013511.48652875855", "5683079691081606113599129167429526013511.486528758557663781739723321875379906235", 51, RoundingMode.ROUND_FLOOR); + t("8629922951113.7511448487597458660248521234", "8629922951113.7511448487597458660248521234380600977", 41, RoundingMode.ROUND_HALF_UP); + t("90278102650946226014809000000000000", "90278102650946226014809046003862793.7835979911", 24, RoundingMode.ROUND_FLOOR); + t("4821625627675322025353636064.57176", "4821625627675322025353636064.57175523338580806993894351876", 33, RoundingMode.ROUND_HALF_UP); + t("201458719700489100373654957.825506491000336059519682", "201458719700489100373654957.8255064910003360595196823588160", 51, RoundingMode.ROUND_FLOOR); + t("53212790802213594493332", "53212790802213594493332.8650736614584969129110", 23, RoundingMode.ROUND_FLOOR); + t("8177197143472082210310164500000000", "8177197143472082210310164503390974.89434", 26, RoundingMode.ROUND_FLOOR); + t("6977664457930000", "6977664457920874.47627073206781", 12, RoundingMode.ROUND_CEIL); + t("48200644415566530.498484", "48200644415566530.4984835390397628883909840", 23, RoundingMode.ROUND_UP); + t("4000000000000000000000000000000000", "4192746732983495210446560254097740.47028995", 1, RoundingMode.ROUND_DOWN); + t("755.023209", "755.02320914910644", 9, RoundingMode.ROUND_HALF_EVEN); + t("66963000000000000000000000000", "66963023876901420169077780295.01885877196", 6, RoundingMode.ROUND_FLOOR); + t("505291668854707.70906269", "505291668854707.709062685721555135520850266111469308027", 23, RoundingMode.ROUND_HALF_UP); + t("664850.618013", "664850.61801224118433274591608772154387", 12, RoundingMode.ROUND_UP); + t("785103038952630143044641569204316756.63797054791874616052822183467149", "785103038952630143044641569204316756.637970547918746160528221834671492", 68, RoundingMode.ROUND_HALF_EVEN); + t("4146164592920910235341149.587", "4146164592920910235341149.58704019746296185479", 29, RoundingMode.ROUND_FLOOR); + t("579742066579367045736.917004843230287530285579", "579742066579367045736.9170048432302875302855793", 45, RoundingMode.ROUND_HALF_UP); + t("92817.84445", "92817.84445", 13, RoundingMode.ROUND_HALF_UP); + t("772179455775.22422834897", "772179455775.22422834897889", 23, RoundingMode.ROUND_DOWN); + t("4670558124138300", "4670558124138345.3777942422216231", 14, RoundingMode.ROUND_FLOOR); + t("11653701002.1779016933207", "11653701002.177901693320687576204027037389422679", 24, RoundingMode.ROUND_HALF_EVEN); + t("661971346000462043332006500000000000", "661971346000462043332006546474696174.7167702709539", 25, RoundingMode.ROUND_HALF_UP); + t("7951.2507068", "7951.2507067915133", 12, RoundingMode.ROUND_UP); + t("83825.91569730694896932060436944", "83825.915697306948969320604369447056", 31, RoundingMode.ROUND_DOWN); + t("179989.23863077943963", "179989.23863077943963", 21, RoundingMode.ROUND_CEIL); + t("333610464960022048972485697598948476.3274927278", "333610464960022048972485697598948476.32749272770013219331", 46, RoundingMode.ROUND_CEIL); + t("567620976076010000000000000000", "567620976076010425435148100001.0364396667132672575976", 14, RoundingMode.ROUND_HALF_DOWN); + t("25166561739090000000000000000", "25166561739091850523119786031.356417774102", 13, RoundingMode.ROUND_DOWN); + t("35769804358466980414449956124427509", "35769804358466980414449956124427509.31366843647801642057", 35, RoundingMode.ROUND_HALF_DOWN); + t("5624000000000000000000000000000000", "5623994624926506484134510384338582.7213130433076592758171270720102084", 4, RoundingMode.ROUND_CEIL); + t("52471579263868610000000000000000", "52471579263868615271801405152771.014318284628313", 16, RoundingMode.ROUND_FLOOR); + t("800000000000", "754585116996.9768", 1, RoundingMode.ROUND_UP); + t("6845902810000000000000000000000000000000", "6845902808062306446526711601148487105964.760230279341124548333865130108451155441", 9, RoundingMode.ROUND_CEIL); + t("25329930000000000000000000000000", "25329931835642796295008712007359.774", 7, RoundingMode.ROUND_HALF_EVEN); + t("838205133360935.04", "838205133360935.0450208", 17, RoundingMode.ROUND_DOWN); + t("960000", "964483.4958501605537391", 2, RoundingMode.ROUND_HALF_UP); + t("6985940160812637750037427078390489093.5972419", "6985940160812637750037427078390489093.59724194766104006296648646911097283", 44, RoundingMode.ROUND_HALF_UP); + t("85912832521353633900000", "85912832521353633962171.622844738617471351787937", 18, RoundingMode.ROUND_DOWN); + t("22537.04", "22537.044131504334747686356", 7, RoundingMode.ROUND_HALF_UP); + t("64820082671929139423989159247959991.27439244549390817", "64820082671929139423989159247959991.2743924454939081683", 52, RoundingMode.ROUND_CEIL); + t("81309794072838871318854500310152.093", "81309794072838871318854500310152.09295684998521", 35, RoundingMode.ROUND_HALF_UP); + t("2983.146", "2983.146", 8, RoundingMode.ROUND_UP); + t("7649851971073922220000000000", "7649851971073922227632383137.12367829277753284010508541882606785617", 18, RoundingMode.ROUND_DOWN); + t("4413319948694474085791.6528747", "4413319948694474085791.65287472187114939173359969", 29, RoundingMode.ROUND_DOWN); + t("9169434008670526360155.858673", "9169434008670526360155.858673447171266307242005", 28, RoundingMode.ROUND_HALF_UP); + t("87281481541792866.31680021820096", "87281481541792866.31680021820096251746992578412", 31, RoundingMode.ROUND_FLOOR); + t("1262882505899773546530000000000000000", "1262882505899773546530078940105109255.1340263465677131821878853130", 21, RoundingMode.ROUND_DOWN); + t("90957735119480552000.1275792566121", "90957735119480552000.12757925661213812317307", 33, RoundingMode.ROUND_FLOOR); + t("95094204140327.386800069607", "95094204140327.3868000696069952245821304362528", 26, RoundingMode.ROUND_HALF_EVEN); + t("782.8315804028037", "782.8315804028036627332091761646906", 16, RoundingMode.ROUND_HALF_UP); + t("4070074897815719013854405000000", "4070074897815719013854404930086.0517196", 25, RoundingMode.ROUND_CEIL); + t("7535527006575666259327800", "7535527006575666259327801.3118771661605538067531702602254", 24, RoundingMode.ROUND_HALF_DOWN); + t("993000000000000", "992026987647463.516668", 3, RoundingMode.ROUND_UP); + t("4698757980923794411324653119136506649753.9058533965214", "4698757980923794411324653119136506649753.90585339652148316962906302356153227", 53, RoundingMode.ROUND_DOWN); + t("338765415.622999075063635041304250288156393", "338765415.62299907506363504130425028815639273842", 42, RoundingMode.ROUND_HALF_EVEN); + t("444000", "443272.8", 3, RoundingMode.ROUND_UP); + t("92863547832.26", "92863547832.25594", 13, RoundingMode.ROUND_UP); + t("227484121340486.542512", "227484121340486.54251108296", 21, RoundingMode.ROUND_UP); + t("7034", "7034.0", 7, RoundingMode.ROUND_CEIL); + t("84677601800000000", "84677601708231089.8035199547", 9, RoundingMode.ROUND_CEIL); + t("903992663388421800000000000", "903992663388421818078667246.7494838726767325648", 16, RoundingMode.ROUND_FLOOR); + t("9440650000000000000000000000000000", "9440656634642185509393801198086015.4", 6, RoundingMode.ROUND_DOWN); + t("916417601649800000000000000", "916417601649865583796921805.163932264102471440203390988", 13, RoundingMode.ROUND_DOWN); + t("3546786323316815500000", "3546786323316815404869.163629407284618604", 17, RoundingMode.ROUND_CEIL); + t("747408692550834866360911935.8990445275165282197802717382548", "747408692550834866360911935.89904452751652821978027173825483", 58, RoundingMode.ROUND_FLOOR); + t("29804424518.256135774", "29804424518.256135774", 23, RoundingMode.ROUND_CEIL); + t("15732791881955773293163440652450", "15732791881955773293163440652451.44291076191144", 31, RoundingMode.ROUND_DOWN); + t("82293484047103499038.6975422642147137771867866208", "82293484047103499038.697542264214713777186786620705401", 48, RoundingMode.ROUND_UP); + t("5288356.17", "5288356.17", 11, RoundingMode.ROUND_CEIL); + t("75977708959803656203251104.81675609237952293524970939", "75977708959803656203251104.81675609237952293524970938678", 52, RoundingMode.ROUND_HALF_UP); + t("1958555193503000000000000000000", "1958555193502587409635649733733.584", 13, RoundingMode.ROUND_CEIL); + t("61097901998.6487577", "61097901998.6487577", 21, RoundingMode.ROUND_FLOOR); + t("4966635612645365.09586650722463", "4966635612645365.095866507224630866586307217888782761159", 30, RoundingMode.ROUND_HALF_EVEN); + t("449349314276161751863885318023458.255606199257691366208268573", "449349314276161751863885318023458.255606199257691366208268573", 61, RoundingMode.ROUND_HALF_EVEN); + t("3313802055037244406355.1441269459053985", "3313802055037244406355.14412694590539847622267", 38, RoundingMode.ROUND_HALF_DOWN); + t("77476038634229841225203.057294319605", "77476038634229841225203.05729431960467859218", 35, RoundingMode.ROUND_HALF_EVEN); + t("532731523000", "532731523075.4101466861580822959", 10, RoundingMode.ROUND_DOWN); + t("279000000000000000000000000", "279332110982355758954949172.19150963", 3, RoundingMode.ROUND_HALF_DOWN); + t("76199428363070721667903.826669566", "76199428363070721667903.826669566165506057243720918746", 32, RoundingMode.ROUND_HALF_EVEN); + t("297600", "297631.47066887", 4, RoundingMode.ROUND_FLOOR); + t("8248110729241783273113.562111307100337407", "8248110729241783273113.562111307100337407", 40, RoundingMode.ROUND_CEIL); + t("1000000000000000000000", "1236453638891742153022.8348728811", 1, RoundingMode.ROUND_HALF_UP); + t("535330000", "535327351.8008", 5, RoundingMode.ROUND_CEIL); + t("4308.58715419601937041522", "4308.58715419601937041522", 24, RoundingMode.ROUND_HALF_DOWN); + t("13500654611668894713386183570622548.34241", "13500654611668894713386183570622548.34240861579", 40, RoundingMode.ROUND_HALF_DOWN); + t("995.7155821993173011608323", "995.71558219931730116083231270171862650", 25, RoundingMode.ROUND_FLOOR); + t("239147599253876718.9504433491173273", "239147599253876718.95044334911732723218139304606724752", 34, RoundingMode.ROUND_CEIL); + t("765497722616.8961003646", "765497722616.896100364573390975890478644136740197458", 22, RoundingMode.ROUND_HALF_EVEN); + t("101979298537.68788178219", "101979298537.6878817821900758850756870223612522530", 23, RoundingMode.ROUND_FLOOR); + t("54564000000000000000000000000000000000", "54563203006377285590954695127259934956.72304700", 5, RoundingMode.ROUND_CEIL); + t("937851991874226678.2", "937851991874226678.191965007088457", 19, RoundingMode.ROUND_UP); + t("9141378468539383564638997660000", "9141378468539383564638997666387.513564869223", 27, RoundingMode.ROUND_DOWN); + t("20497199023806.45608949", "20497199023806.45608949227987004920339939", 22, RoundingMode.ROUND_HALF_DOWN); + t("81603182.7", "81603182.616632542195753770061305729184", 9, RoundingMode.ROUND_CEIL); + t("1288222268118280000000000000000000000000", "1288222268118271079758562419926059399472.4003871704903395624929468673346838726", 15, RoundingMode.ROUND_CEIL); + t("484726059819530000000000000000000000", "484726059819531746596562275263672330.122283607", 14, RoundingMode.ROUND_FLOOR); + t("680000000000", "675623616750.993125132354", 2, RoundingMode.ROUND_HALF_UP); + t("87687220439051000000000000000000000000", "87687220439051554697153502010194056104.42861", 14, RoundingMode.ROUND_DOWN); + t("2844992735024778164396876428400000", "2844992735024778164396876428386392.397101880541673725", 29, RoundingMode.ROUND_HALF_EVEN); + t("4910468313236974384325553954.559", "4910468313236974384325553954.558968559307060603568610", 32, RoundingMode.ROUND_HALF_UP); + t("7677382468596942606325100814949164462.335409794", "7677382468596942606325100814949164462.335409794", 49, RoundingMode.ROUND_DOWN); + t("6958724457786172481654532020985.043", "6958724457786172481654532020985.043", 34, RoundingMode.ROUND_CEIL); + t("460800", "460705.8028929240198868371532360965971117977776", 4, RoundingMode.ROUND_CEIL); + t("81763325373301098575053681.009551104718485", "81763325373301098575053681.0095511047184850495148390898", 41, RoundingMode.ROUND_HALF_DOWN); + t("77290000000000000000000000000", "77298476544997406115741457621.48100777755241170668034650809", 4, RoundingMode.ROUND_DOWN); + t("2862358127844547877974880690522730000", "2862358127844547877974880690522726982.49409754", 33, RoundingMode.ROUND_CEIL); + t("901843956540041489372610610000", "901843956540041489372610614345.487929674", 26, RoundingMode.ROUND_HALF_DOWN); + t("45031671217607058672836306.48351134", "45031671217607058672836306.4835113355599", 34, RoundingMode.ROUND_HALF_UP); + t("92083948494159391284091144794664446.380059732506918919702", "92083948494159391284091144794664446.380059732506918919702007475113945", 58, RoundingMode.ROUND_FLOOR); + t("177322371367658020851649000000", "177322371367658020851649147602.975655295218030854293908400956", 24, RoundingMode.ROUND_FLOOR); + t("4239542600712473433498612753.21060144321763992555366", "4239542600712473433498612753.2106014432176399255536577373285045425339", 51, RoundingMode.ROUND_HALF_UP); + t("989142489.56454046202042259", "989142489.56454046202042259", 29, RoundingMode.ROUND_HALF_EVEN); + t("39188324760962.64171", "39188324760962.641710", 19, RoundingMode.ROUND_UP); + t("1784374158800", "1784374158866.4741261545314002975498", 11, RoundingMode.ROUND_DOWN); + t("4889335896817404.6714320041572203", "4889335896817404.6714320041572203348794", 32, RoundingMode.ROUND_FLOOR); + t("3179414685590000000000000000000000", "3179414685592371949442250485606819.26696750990296429734141944", 12, RoundingMode.ROUND_HALF_EVEN); + t("2903.26350044", "2903.263500440", 13, RoundingMode.ROUND_FLOOR); + t("1491343.789445631775761446419118151", "1491343.7894456317757614464191181515356911640598", 34, RoundingMode.ROUND_FLOOR); + t("5500628286601049.843663626181949", "5500628286601049.8436636261819485793447808823573910", 31, RoundingMode.ROUND_HALF_UP); + t("3974711265332457200000000000000", "3974711265332457176491911497563.9361", 17, RoundingMode.ROUND_HALF_UP); + t("93.28105427667321036", "93.281054276673210359", 19, RoundingMode.ROUND_CEIL); + t("79910228655846918061600000", "79910228655846918061589185.101353368484158631096929283677512827019", 21, RoundingMode.ROUND_UP); + t("4389523222041915395738636382677027050000", "4389523222041915395738636382677027049670.297472800121808897652436", 36, RoundingMode.ROUND_UP); + t("2894245566479613750113978122489420.5686284128195803188", "2894245566479613750113978122489420.56862841281958031877868147223357225", 53, RoundingMode.ROUND_HALF_UP); + + t("494724446222447272134436118293973049042208245586819785140130787553487687286873291327585520984443687211379965781311260864429223913901690400000000000", "494724446222447272134436118293973049042208245586819785140130787553487687286873291327585520984443687211379965781311260864429223913901690493449434874.049", 136, RoundingMode.ROUND_DOWN); + t("3720280055397389210963282787773692958098570405431190000", "3720280055397389210963282787773692958098570405431182098.1847115996658646089352534779938945383741184042776917885782743812931817237846474528789801", 51, RoundingMode.ROUND_UP); + t("759188909745876678229347606524330959678969850255912440680257260789800000000000000000000000000000000000000000000", "759188909745876678229347606524330959678969850255912440680257260789793508531411911105662225225721357883400623102.881476662045026352517268398904498921045685377855106763679514746737986172605517588709155551610890784878010336772838372711497238975980355571170655725075915881399899070771273619112223837705596667049149981193", 67, RoundingMode.ROUND_UP); + t("4534304542844843415257043214798844424046834211704366877715023555011150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "4534304542844843415257043214798844424046834211704366877715023555011146990876705027962738522155031711274213446497330677820779740785545273317321438460934917531081249158109061429290323393161606391411793.277725444395", 69, RoundingMode.ROUND_HALF_DOWN); + t("527244430907269587850000000000", "527244430907269587847819161754.09994360681344184942353237241149292559482211118493881252182204930127002210488011149670127752911923929048735411637853031498542495512941893603181502188788354208091361643795263910287", 20, RoundingMode.ROUND_HALF_DOWN); + t("500274199038784701912854356303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "500274199038784701912854356303168604036329678593776947367198603066622399541094534586945152898619439257327038632128821666524202122658068057432922418958129519085677022999535035083.95723140131476417422632523022711778228314707489949388264508533995136005795122359991", 30, RoundingMode.ROUND_HALF_DOWN); + t("5333760730338237.358128061070265324699616103754480796605292719724271045", "5333760730338237.35812806107026532469961610375448079660529271972427104505398437046671245161686878493124070786536064182194621929641261600482019485630475569955198761522647338125822382150219203146448476750498789080703982026782691017063636782481300", 70, RoundingMode.ROUND_HALF_DOWN); + t("9387762026.7326734940421184446066226146106694714282947260976784456146415402", "9387762026.73267349404211844460662261461066947142829472609767844561464154020", 75, RoundingMode.ROUND_HALF_UP); + t("67323858.24741072854262989306161704601101", "67323858.2474107285426298930616170460110072782018778697292704532242132189290371593478382802207909998627911041939764517795222755210476244995305187831767572511625381158475111177037691940475964756887806055996078204829400918467078858084732712280713071351617031612115767601030103857883944259837811618215851568286334400246721991754374286168046011298802236522", 40, RoundingMode.ROUND_CEIL); + t("618280971398998509245590744944289036083345801467550000000000000000000000000000000000000000000000000000000000000000000000000000000", "618280971398998509245590744944289036083345801467546352624671931393813580337957902732550378613100649571499058004021009366633559571.2699009128705660239887951528338903748244427453200035937983818076678373616991455573", 50, RoundingMode.ROUND_HALF_DOWN); + t("3625212716653626154269212443601969756896707.1563164088370829935116368726319072553580520490616568", "3625212716653626154269212443601969756896707.15631640883708299351163687263190725535805204906165678662625271", 95, RoundingMode.ROUND_CEIL); + t("279794024756694785000215326702581040764281424692.94416985247012017560069970214089414772133468917746186164351199574782564560451796356697926186392269112385101341672332415427389576261072927099738586782426824776935594024948", "279794024756694785000215326702581040764281424692.94416985247012017560069970214089414772133468917746186164351199574782564560451796356697926186392269112385101341672332415427389576261072927099738586782426824776935594024947823170180686", 218, RoundingMode.ROUND_HALF_EVEN); + t("35828450460504270469704936980280835584645741698641855543514563095433541570683138929790029105719699910360000000000000000000000000000000000000000000000", "35828450460504270469704936980280835584645741698641855543514563095433541570683138929790029105719699910361577052023426681751310480362480069300311248293.15348414532497112250157766681332507724698060759080257429160605105296732683871024", 103, RoundingMode.ROUND_HALF_EVEN); + t("43761815435821313568192740041070231887308670966477475362204961804611459661458966510873830168.716748692490194916680548288518654884099098683415405589451450981728769866802762326739", "43761815435821313568192740041070231887308670966477475362204961804611459661458966510873830168.716748692490194916680548288518654884099098683415405589451450981728769866802762326738670533948709724357936162347635031179866244", 176, RoundingMode.ROUND_CEIL); + t("9940289055903627512125768245502992585069900170400000000000000000", "9940289055903627512125768245502992585069900170399503819515972524.13568735283721983801757702683853241247769318405229726113276035561474837566466532875876277432576610830142188269641845050335097656359864498101396326004092685742327518181101473104745549408201476216574093693733574369506676184899821529267868141813088352688031339966846243166921375083445250920", 47, RoundingMode.ROUND_HALF_UP); + t("47308500490651000672647597245353550222048575.807214284239202", "47308500490651000672647597245353550222048575.8072142842392016063606507543350997595316613513575837073421103918284314912676250088610064455343463233565051257974791197641171878251624763412467738389496245200149213715671349161", 59, RoundingMode.ROUND_HALF_UP); + t("7242493899945961184657078755114354.8275694408198985015345976108000512015550224515265362601958484547530262", "7242493899945961184657078755114354.827569440819898501534597610800051201555022451526536260195848454753026282935514547388140", 104, RoundingMode.ROUND_DOWN); + t("4984463523458535754905264911455285850008993268231053980.767410232956686367696506915282296297", "4984463523458535754905264911455285850008993268231053980.767410232956686367696506915282296296709367816894555456665962274719887159413483764425930136761749360042065357118267648394706165913383308575864809558314678492797545419", 91, RoundingMode.ROUND_UP); + t("468731093093191466545712621915352193328466285392879958862956252122614534959310655639000000000000000000000000000", "468731093093191466545712621915352193328466285392879958862956252122614534959310655638837578478177944653136138911.41840552882713558913968005741142943", 84, RoundingMode.ROUND_HALF_DOWN); + t("8722796170843759397737441130128801601794238071659409548210220188790585826046201831648630668253198051544084586185006178347748234700", "8722796170843759397737441130128801601794238071659409548210220188790585826046201831648630668253198051544084586185006178347748234759.9434511722086056368943", 128, RoundingMode.ROUND_FLOOR); + t("67926499505419960439966855715456849140496804252323842323150939357112.592612688760262", "67926499505419960439966855715456849140496804252323842323150939357112.5926126887602628389494013461282357363300181486827630507100652279617012866942377850016203733098433364051", 83, RoundingMode.ROUND_FLOOR); + t("1402457858069260843701831542961702005330000000000000000000000000000000000000000000", "1402457858069260843701831542961702005338943536372264316099532808299709640182133143.009979906034715196177295226439746913418590464152810027317068521003207924233662128607269663291833", 39, RoundingMode.ROUND_DOWN); + t("1106350604097326705139313335803761878947015866282894852274609129769275668488439922176607333011405146481732245401758539986540.94882628447605933696571359709430425378075223612860671428379", "1106350604097326705139313335803761878947015866282894852274609129769275668488439922176607333011405146481732245401758539986540.94882628447605933696571359709430425378075223612860671428378614749989787085552416655512628791179233", 183, RoundingMode.ROUND_CEIL); + t("9735483775685609464322320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "9735483775685609464322320520902637418698700323093604913106065125437383414521799911105265912341567164193794949895999422938985317071738708834029942382911270457249378913787.1103832980594904520955978916205703025866141635300875243", 24, RoundingMode.ROUND_DOWN); + t("489529.68306403435338777825958322163255657451479551721256707088073420494749504360454448131356633", "489529.683064034353387778259583221632556574514795517212567070880734204947495043604544481313566331313388535912869238239769635054162766247017293340447968973686886334804349955536713950306242814646600928789897172058572510482913298938731094634890755913526004290737129748224090241001770940", 95, RoundingMode.ROUND_DOWN); + t("5916066038388477.282777699215057097344308799257479415453402583912978373402137006855767835024785902898403750237821320238828483034980698804153055853499", "5916066038388477.282777699215057097344308799257479415453402583912978373402137006855767835024785902898403750237821320238828483034980698804153055853498816858707539873771777970182477242160360615721826161461903035810812584828", 148, RoundingMode.ROUND_HALF_DOWN); + t("1492565201039912150941642914851.0188694977647271424918935209921129749064571021507470715331012037266466375367808113130910695243443128008252945554605720303655", "1492565201039912150941642914851.01886949776472714249189352099211297490645710215074707153310120372664663753678081131309106952434431280082529455546057203036546314199747521356134765285561227686693949347029078827406886675694947", 155, RoundingMode.ROUND_HALF_EVEN); + t("9640.823515736412358055650895513069103270437767616274081289588691585664302621579615021666966091360826575410661596403164479300452152684973160363097309608067", "9640.823515736412358055650895513069103270437767616274081289588691585664302621579615021666966091360826575410661596403164479300452152684973160363097309608066484458989787971253015176864265186897585966764740584557961889884222991340777882611717168551975010970695517417044829720982931484654856360759782530622", 154, RoundingMode.ROUND_UP); + t("2192917244999869343205916374337677.13670389941440829125766924482174747890075138055235242239241690214", "2192917244999869343205916374337677.13670389941440829125766924482174747890075138055235242239241690213762402416630046739017177822", 99, RoundingMode.ROUND_HALF_EVEN); + t("63537288045407814614632100373927391371818274269554962.476", "63537288045407814614632100373927391371818274269554962.47539574376947926528280013008702010901972495291817972524796755262276716657735757278", 56, RoundingMode.ROUND_CEIL); + t("2811000000000000000000", "2810271650889132939296.56710151819671988902086681773799853021233325407901168571657754153770180269049570864269302522698770485556146", 4, RoundingMode.ROUND_UP); + t("315495111097618519547112164879699292983604105741729996616794447864850000000", "315495111097618519547112164879699292983604105741729996616794447864849595569.4732429578938004170666887599581675624557787373713415172397346993864722937610311872942069612761272487587892003117667431497194318776589121114621644677670506783812384346194108237410689252765415071112547238246125156991556184611980318715999133743922164645414546327450499594633872455804056396617969187240487543621620", 69, RoundingMode.ROUND_HALF_EVEN); + t("204.054713812637763806802452", "204.054713812637763806802452", 28, RoundingMode.ROUND_DOWN); + t("283401218864063400000000000000000000000000000000000000000000000", "283401218864063396558389343623404646465639303535411612743365055.0226824948376888", 17, RoundingMode.ROUND_HALF_EVEN); + t("92229.61758321528485812953091790666786058628679345291222636317052305267319561885415781143567404759366953", "92229.6175832152848581295309179066678605862867934529122263631705230526731956188541578114356740475936695278089617909281727991815396972738914904573285717078598330120780900701772340175710598595012522421761264348230172003217", 103, RoundingMode.ROUND_HALF_DOWN); + t("272730132423593904649945011230989.07441427998296751796431596590750797141803801848817960594928685477662435073578350760298700878428378237445274", "272730132423593904649945011230989.0744142799829675179643159659075079714180380184881796059492868547766243507357835076029870087842837823744527376015781771828747087898039912031366854731319283802355925346531872038489621488183273173863", 140, RoundingMode.ROUND_CEIL); + t("834882716459088686085166110241864368.2585566209634844197272577905771502073368091374111995246662548601100626717411222217154101996014", "834882716459088686085166110241864368.258556620963484419727257790577150207336809137411199524666254860110062671741122221715410199601367804869545194", 130, RoundingMode.ROUND_CEIL); + t("17069318170447559670824010313506648026528166586129880725091542343600550422997254786851016215940786230013064180480826097444101000000000000000000000000000000", "17069318170447559670824010313506648026528166586129880725091542343600550422997254786851016215940786230013064180480826097444101017117212949291335428804169206.4789414896747948034966909141270082719485508246318636726728954481", 125, RoundingMode.ROUND_HALF_UP); + t("459159626088903852606631649784227594935229835299060973799218279323000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "459159626088903852606631649784227594935229835299060973799218279323713336570937633103595944583645177507124617629953771475688119656568329467957028808451626080.2157052326772496024245144704394972923671967963191881122863487049025806804492486980444650765391761189341478929086845849828893436948962388818123422", 66, RoundingMode.ROUND_DOWN); + t("8964893258158025627760261546686868902639753180000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "8964893258158025627760261546686868902639753182992598513279568321959004014846384717934802529654264364024872333833301734962238301019.830652683", 45, RoundingMode.ROUND_HALF_DOWN); + + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("-1.11070563555955986e+949884", "-1.1107056355595598537391E+949884", 18, RoundingMode.ROUND_UP); + t("6.31095e+4614231246519714", "6.310954382701729758393260889166675474531891695090516238E+4614231246519714", 6, RoundingMode.ROUND_HALF_UP); + t("6.46090322e+6677217159189", "6.460903219125211021E+6677217159189", 9, RoundingMode.ROUND_HALF_EVEN); + t("-3.95798433263891068927612875275729538e+483397", "-3.95798433263891068927612875275729538E+483397", 36, RoundingMode.ROUND_FLOOR); + t("-5.15e+51785", "-5.1495592729221424586275386661E+51785", 3, RoundingMode.ROUND_UP); + t("-8.341297854e+7759443961", "-8.34129785438621486E+7759443961", 10, RoundingMode.ROUND_CEIL); + t("-7.039038e+648540530527", "-7.03903881158613994150693699720210776203561398962036350248E+648540530527", 7, RoundingMode.ROUND_DOWN); + t("8.86067409668395196e+553520229219693", "8.860674096683951963219272593791310E+553520229219693", 18, RoundingMode.ROUND_DOWN); + t("9.864987930516936534e-490626048", "9.8649879305169365348113E-490626048", 19, RoundingMode.ROUND_DOWN); + t("5.8917903635419393e+46492775", "5.8917903635419392365831E+46492775", 17, RoundingMode.ROUND_CEIL); + t("3.471651888e-7", "3.4716518879894538148508E-7", 10, RoundingMode.ROUND_HALF_EVEN); + t("3e+350468916", "3E+350468916", 1, RoundingMode.ROUND_HALF_DOWN); + t("2.6e+187364576122710", "2.6468730222404974166287111790752920305E+187364576122710", 2, RoundingMode.ROUND_HALF_UP); + t("-8.08170387551427578983625022e-7525724769", "-8.0817038755142757898362502198224521935080928E-7525724769", 27, RoundingMode.ROUND_FLOOR); + t("-5.820926e+137772541213403", "-5.820926E+137772541213403", 7, RoundingMode.ROUND_DOWN); + t("5.82502531276069650637998468163265673623114802117e+8930012634273", "5.82502531276069650637998468163265673623114802117E+8930012634273", 49, RoundingMode.ROUND_UP); + t("4.844065381013725986837e+6248", "4.84406538101372598683728877E+6248", 22, RoundingMode.ROUND_HALF_UP); + t("-6.724e+7494242238106", "-6.7242657973487816694742594494155083518497133669292619495E+7494242238106", 4, RoundingMode.ROUND_DOWN); + t("-9.4498161648797e+8817051", "-9.44981616487963708105775536177061040387686718038130154486986E+8817051", 14, RoundingMode.ROUND_FLOOR); + t("-7e+7786945", "-7.7313723453361061E+7786945", 1, RoundingMode.ROUND_DOWN); + t("6.891752e+46766112525827", "6.8917529279486620283885E+46766112525827", 7, RoundingMode.ROUND_FLOOR); + t("-4e-93725726753990", "-4.145441268822437756131965510163E-93725726753990", 1, RoundingMode.ROUND_CEIL); + t("-1.12e+306023331171748", "-1.118165921482066102466296293946894050652555175E+306023331171748", 3, RoundingMode.ROUND_HALF_UP); + t("-7.97933637481027805811243e+5501", "-7.97933637481027805811243624604489711E+5501", 24, RoundingMode.ROUND_CEIL); + t("7.21004626e+398740640897153", "7.2100462602152007419973593468751658532E+398740640897153", 9, RoundingMode.ROUND_HALF_UP); + t("-7.936e-43130", "-7.93600951E-43130", 4, RoundingMode.ROUND_HALF_UP); + t("-1.80564432714468488631383756914281144946839362e+1359", "-1.80564432714468488631383756914281144946839361818525E+1359", 45, RoundingMode.ROUND_HALF_EVEN); + t("-4.628554324020425e+5815991268494", "-4.6285543240204252524099493990932424634348E+5815991268494", 16, RoundingMode.ROUND_HALF_DOWN); + t("-3e+15499", "-3.0E+15499", 5, RoundingMode.ROUND_DOWN); + t("1.77529e+5442970395990", "1.77529E+5442970395990", 6, RoundingMode.ROUND_CEIL); + t("-3.393352377819527802023568109492373e+725647954123", "-3.393352377819527802023568109492373656E+725647954123", 34, RoundingMode.ROUND_DOWN); + t("-9.51113913923830633451150121829e-868", "-9.5111391392383063345115012182879189612993491E-868", 30, RoundingMode.ROUND_HALF_DOWN); + t("-7.92283e+78175", "-7.92283E+78175", 7, RoundingMode.ROUND_HALF_DOWN); + t("4.841677133170436816434246233e+30639158262", "4.8416771331704368164342462331056980108405981E+30639158262", 28, RoundingMode.ROUND_DOWN); + t("4.5e+9325666044026", "4.45420164905655927661142848292149E+9325666044026", 2, RoundingMode.ROUND_HALF_UP); + t("1.3e+971860873519992", "1.3393718841216445941247869301225022E+971860873519992", 2, RoundingMode.ROUND_HALF_UP); + t("9.876242886531e+52605", "9.876242886531446435944603618104763457E+52605", 13, RoundingMode.ROUND_DOWN); + t("6.330647937407025476697e+1768", "6.330647937407025476696971741E+1768", 22, RoundingMode.ROUND_CEIL); + t("5.2068922505677208e-3336", "5.20689225056772082748E-3336", 17, RoundingMode.ROUND_HALF_DOWN); + t("5.92809e+23046663", "5.928089832984E+23046663", 7, RoundingMode.ROUND_HALF_DOWN); + t("-8.5013637538e+888365717321295", "-8.50136375387653962573285296809772512970778623629235925E+888365717321295", 11, RoundingMode.ROUND_DOWN); + t("4.26475618712602071344874281e-62604", "4.26475618712602071344874281748487391782E-62604", 27, RoundingMode.ROUND_FLOOR); + t("9.020713898414363807382134e-1", "0.9020713898414363807382133864186995", 25, RoundingMode.ROUND_HALF_EVEN); + t("7.09e+2242265227092", "7.0838E+2242265227092", 3, RoundingMode.ROUND_UP); + t("-2.6239193037e-459", "-2.6239193037415483309716069E-459", 11, RoundingMode.ROUND_CEIL); + t("2.08714059942275969e+28", "20871405994227596829475710887.232303900189115941377511040", 18, RoundingMode.ROUND_CEIL); + t("-3.21984e+66642478", "-3.219846203541755078720574281120717190883E+66642478", 6, RoundingMode.ROUND_CEIL); + t("8.08261507044993075472382557081796361683467812687673683e-4976", "8.08261507044993075472382557081796361683467812687673683E-4976", 57, RoundingMode.ROUND_UP); + t("5.5100964862850252990176e+0", "5.51009648628502529901761683407913552", 23, RoundingMode.ROUND_HALF_UP); + t("1.71255625197e+623", "1.712556251979341826880397489279E+623", 12, RoundingMode.ROUND_FLOOR); + t("3.481615e+9752693", "3.4816153525988774411598020196959004888E+9752693", 7, RoundingMode.ROUND_FLOOR); + t("3.509821e+91098992", "3.5098208203E+91098992", 7, RoundingMode.ROUND_HALF_DOWN); + t("9.8641537792703101567472056e-72452394265", "9.8641537792703101567472055694976920744483687020935E-72452394265", 26, RoundingMode.ROUND_CEIL); + t("1.027989e+401293443271", "1.0279887207E+401293443271", 7, RoundingMode.ROUND_HALF_UP); + t("4.76e+44979245", "4.7639E+44979245", 3, RoundingMode.ROUND_HALF_UP); + t("-1.7306e+1059755325", "-1.7306315078051716446467E+1059755325", 5, RoundingMode.ROUND_HALF_UP); + t("3.9456282632322e+203687", "3.9456282632321519002673617475779957462749297912E+203687", 14, RoundingMode.ROUND_HALF_UP); + t("-8.5376063018414796e-534432343020843", "-8.53760630184147960E-534432343020843", 21, RoundingMode.ROUND_CEIL); + t("8.65224414419867239120564571373e+8606642533", "8.652244144198672391205645713722739150532482412E+8606642533", 30, RoundingMode.ROUND_CEIL); + t("-6.174e+9", "-6173578265.071", 4, RoundingMode.ROUND_HALF_UP); + t("6.793079624623340928072e+7", "67930796.2462334092807242196421600", 22, RoundingMode.ROUND_HALF_DOWN); + t("-2.36373930494803297524865796700721024e+838379", "-2.36373930494803297524865796700721024881625741597833295816323E+838379", 36, RoundingMode.ROUND_DOWN); + t("-9e+5483611650120", "-9E+5483611650120", 4, RoundingMode.ROUND_FLOOR); + t("1.5e+7", "14349628.01922235388049374147", 2, RoundingMode.ROUND_UP); + t("6.8614e+74393698866798", "6.8614E+74393698866798", 8, RoundingMode.ROUND_DOWN); + t("-1.831113233533270669228699622e+8406934", "-1.8311132335332706692286996219681430E+8406934", 29, RoundingMode.ROUND_HALF_EVEN); + t("7.714520184016993933542818837124793408006e+2", "771.45201840169939335428188371247934080056704899", 40, RoundingMode.ROUND_CEIL); + t("-1.07e+6795813709", "-1.0732125537673403265457667040389769358981173800952578892E+6795813709", 3, RoundingMode.ROUND_HALF_DOWN); + t("4.91402e+7112074044", "4.91401973E+7112074044", 7, RoundingMode.ROUND_UP); + t("8.84e+76239602607", "8.841940724E+76239602607", 3, RoundingMode.ROUND_HALF_EVEN); + t("4.794257702528707921549614769559147705541286916e+8949077983", "4.794257702528707921549614769559147705541286916517125838578E+8949077983", 46, RoundingMode.ROUND_DOWN); + t("-3.14815e+153331637489", "-3.14814925E+153331637489", 6, RoundingMode.ROUND_HALF_DOWN); + t("6.04477481096739e-222583722", "6.04477481096739E-222583722", 18, RoundingMode.ROUND_HALF_UP); + t("9.205025903021276187181944366817198e+96711", "9.205025903021276187181944366817198E+96711", 36, RoundingMode.ROUND_DOWN); + t("9.48094821522133194405126162122334e+351074489623", "9.4809482152213319440512616212233329955405089941555240223386E+351074489623", 33, RoundingMode.ROUND_UP); + t("3.9748340091494161936502395814742749549562853206914631e+3139", "3.97483400914941619365023958147427495495628532069146310E+3139", 55, RoundingMode.ROUND_HALF_UP); + + tx(() => { bigDecimalFactory.BigDecimal("12.345").ToSD(-23); }, ".toSD(-23)"); + tx(() => { bigDecimalFactory.BigDecimal("12.345").ToSD((long)1e9 + 1); }, ".toSD(1e9 + 1)"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightToStringTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightToStringTests.cs new file mode 100644 index 0000000..4c1d772 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightToStringTests.cs @@ -0,0 +1,373 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightToString")] + public class BigDecimalLightToStringTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public new void ToString() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (string expected, BigDecimalArgument n) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ToString()); + }; + + t("0", 0); + t("0", "0"); + t("1", 1); + t("9", 9); + t("90", 90); + t("90.12", 90.12); + t("0.1", 0.1); + t("0.01", 0.01); + t("0.0123", 0.0123); + t("111111111111111111111", "111111111111111111111"); + t("1111111111111111111111", "1111111111111111111111"); + t("11111111111111111111111", "11111111111111111111111"); + t("0.00001", 0.00001); + t("0.000001", 0.000001); + + t("0", -0); + t("0", "-0"); + t("-1", -1); + t("-9", -9); + t("-90", -90); + t("-90.12", -90.12); + t("-0.1", -0.1); + t("-0.01", -0.01); + t("-0.0123", -0.0123); + t("-111111111111111111111", "-111111111111111111111"); + t("-1111111111111111111111", "-1111111111111111111111"); + t("-11111111111111111111111", "-11111111111111111111111"); + t("-0.00001", -0.00001); + t("-0.000001", -0.000001); + + // Exponential format + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("1e-7", 0.0000001); + t("1.2e-7", 0.00000012); + t("1.23e-7", 0.000000123); + t("1e-8", 0.00000001); + t("1.2e-8", 0.000000012); + t("1.23e-8", 0.0000000123); + t("-1e-7", -0.0000001); + t("-1.2e-7", -0.00000012); + t("-1.23e-7", -0.000000123); + t("-1e-8", -0.00000001); + t("-1.2e-8", -0.000000012); + t("-1.23e-8", -0.0000000123); + + t("5.73447902457635174479825134e+14", "573447902457635.174479825134"); + t("1.07688e+1", "10.7688"); + t("3.171194102379077141557759899307946350455841e+27", "3171194102379077141557759899.307946350455841"); + t("4.924353466898191177698653319742594890634579e+37", "49243534668981911776986533197425948906.34579"); + t("6.85558243926569397328633907445409866949445343654692955e+18", "6855582439265693973.28633907445409866949445343654692955"); + t("1e+0", "1"); + t("2.1320000803e+7", "21320000.803"); + t("5.0878741e+4", "50878.741"); + t("5.1932898288391e+8", "519328982.88391"); + t("5.690616778176956027307884725933410349604387915634524e+49", "56906167781769560273078847259334103496043879156345.24"); + t("3.25099780528575457273246693147645e+15", "3250997805285754.572732466931476450"); + t("3e+0", "3"); + t("2.5811494197573291905990947355226e+13", "25811494197573.291905990947355226"); + t("5.60372259169833930471746454125e+13", "56037225916983.3930471746454125"); + t("1.2615810663732236602461593613783e+7", "12615810.663732236602461593613783"); + t("1.4654366449266911507705477499035407722184965108377032e+11", "146543664492.66911507705477499035407722184965108377032"); + t("6.4986735507448912857131832908423940757e+38", "649867355074489128571318329084239407570.0"); + t("3.6146989180120676857245474944e+3", "3614.6989180120676857245474944"); + t("9.928654762302286149994896625074e+4", "99286.54762302286149994896625074"); + t("3.46424170787806074650506079e+3", "3464.24170787806074650506079"); + t("1.25934313355319666474752550204680303068865719647e+33", "1259343133553196664747525502046803.03068865719647"); + t("1.23014105337660651106978059198916100450966081493207e+27", "1230141053376606511069780591.98916100450966081493207"); + t("1.386164712267169624993434287237e+23", "138616471226716962499343.4287237"); + t("2.66076369930322488334961932e+3", "2660.76369930322488334961932"); + t("9.37582568e+4", "93758.2568"); + t("1.39853642894726883996875746770529e+28", "13985364289472688399687574677.0529"); + t("3.19099e+5", "319099.0"); + t("3.04557106798789396303998723e+19", "30455710679878939630.3998723"); + t("1.3024612569115368830867934222004329653604418e+9", "1302461256.9115368830867934222004329653604418"); + t("2.358787483447172786e+5", "235878.7483447172786"); + t("5.10614446965318674547416709785208086304398889160563e+28", "51061444696531867454741670978.5208086304398889160563"); + t("1.46685947134456101512731611558e+23", "146685947134456101512731.6115580"); + t("3.69960105771344554151928256518906564810300119e+25", "36996010577134455415192825.6518906564810300119"); + t("2.68683153074628e+10", "26868315307.4628"); + t("2.35656504568492312232737219553793859212e+15", "2356565045684923.12232737219553793859212"); + t("7.753292442361215e+14", "775329244236121.5"); + t("1.56e+0", "1.56"); + t("1.272818730367215461852227991200704e+21", "1272818730367215461852.227991200704"); + t("1.13900700292988027871648046839423153789e+7", "11390070.0292988027871648046839423153789"); + t("3.3431e+0", "3.3431"); + t("1.4546654966819402705e+14", "145466549668194.02705"); + t("3.05345735395805567424714891401667575466462830113819e+48", "3053457353958055674247148914016675754664628301138.19"); + t("5.1218945854639324441304933666460587e+2", "512.18945854639324441304933666460587"); + t("9.95299900896e+5", "995299.9008960"); + t("1.21564537151562431991786620635e+0", "1.21564537151562431991786620635"); + t("4.016e+1", "40.16"); + t("1.86570326e+7", "18657032.6"); + t("1.3381001727e+5", "133810.01727"); + t("2.639841700687441886800225725227e+12", "2639841700687.441886800225725227"); + t("2.45e+0", "2.45"); + t("2.8945e+2", "289.45"); + t("1.23e+0", "1.23"); + t("1.559806666149836070330006415033e+24", "1559806666149836070330006.415033"); + t("3.14984566145310751826289711761375061645611777700983e+3", "3149.84566145310751826289711761375061645611777700983"); + t("3.0940691333892283249774116223987e+5", "309406.91333892283249774116223987"); + t("6.572766274013360381079275191108732606370177179594282e+5", "657276.6274013360381079275191108732606370177179594282"); + t("1.470126973337024e+6", "1470126.973337024"); + t("5.6499e+2", "564.99"); + t("2.8416297367859233303497847667971781197616950846e+28", "28416297367859233303497847667.971781197616950846"); + t("2.1364951568189836563102481625533538320051163977e+41", "213649515681898365631024816255335383200511.63977"); + t("8.76108618687537137080904679797e+19", "87610861868753713708.0904679797"); + t("6.27683573474251182408654509953633505286e+6", "6276835.73474251182408654509953633505286"); + t("8.91411e+0", "8.91411"); + t("9.034542832410912578330021146413119399e+28", "90345428324109125783300211464.13119399"); + t("7.026094393430852002585511641212897686956090955e+39", "7026094393430852002585511641212897686956.090955"); + t("1.8812221093491505758565988678062e+11", "188122210934.91505758565988678062"); + t("9.435538492497050138580201734902181057468044875e+43", "94355384924970501385802017349021810574680448.75"); + t("5.36793419620790391866461e+20", "536793419620790391866.461"); + t("2.315089265590404012562599592854156357726817712e+26", "231508926559040401256259959.2854156357726817712"); + t("7.499170741828885273030006066196546588710962e+17", "749917074182888527.3030006066196546588710962"); + t("3.3962128305986e+5", "339621.28305986"); + t("8.17980456510031304e+9", "8179804565.10031304"); + t("4.394575876858124185382e+13", "43945758768581.24185382"); + t("7.881617323629751701107428e+9", "7881617323.629751701107428"); + t("4.89e+0", "4.89"); + t("9.85209894663520857685703881781194082356123765e+39", "9852098946635208576857038817811940823561.23765"); + t("6.849329685e+5", "684932.9685"); + t("2.8262252277815736355279617243060700437627773361e+7", "28262252.277815736355279617243060700437627773361"); + t("1.503736721902e+9", "1503736721.902"); + t("2.65213505469049775997232325076980590625670234690917845e+41", "265213505469049775997232325076980590625670.234690917845"); + t("4.23752645959719196604760963802412828187442060555521e+2", "423.752645959719196604760963802412828187442060555521"); + t("9.023159535576504097005203913521871601640521009e+36", "9023159535576504097005203913521871601.640521009"); + t("4.69339457186380276410136272120035011198438772754725e+14", "469339457186380.276410136272120035011198438772754725"); + t("1.2819429130391792511503973184804508867728894e+6", "1281942.9130391792511503973184804508867728894"); + t("1.9778e+3", "1977.8"); + t("2.456680359828937628024631306792185367572610021e+43", "24566803598289376280246313067921853675726100.21"); + t("5.25389225018085571689046925802871155628e+1", "52.5389225018085571689046925802871155628"); + t("1.733700532107e+8", "173370053.2107"); + t("1.9561099921e+5", "195610.99921"); + t("3.3409e+2", "334.09"); + t("6.09858715556186e+0", "6.09858715556186"); + t("3.20634106832106387482375790792609337383007782520694e+24", "3206341068321063874823757.90792609337383007782520694"); + t("1.46347126003930100207988814e+20", "146347126003930100207.98881400"); + t("2.717780449744210117995586561524987067807146882e+43", "27177804497442101179955865615249870678071468.82"); + t("2.86757572635270377540170639151e+22", "28675757263527037754017.0639151"); + t("1.3488325541508602487577920722101277063863557818e+14", "134883255415086.02487577920722101277063863557818"); + t("1.96013732736436392e+13", "19601373273643.6392"); + t("4.798185890466e+2", "479.8185890466"); + t("1.696622337138949329874242519485119916519994150606e+39", "1696622337138949329874242519485119916519.994150606"); + t("5.50000572984970761183142593570950897913860587074643e+13", "55000057298497.0761183142593570950897913860587074643"); + t("4.9e+1", "49"); + t("2.353405108244768666141e+9", "2353405108.2447686661410"); + t("1.237978927714857736527530290155529e+0", "1.237978927714857736527530290155529"); + t("5.54113012e+1", "55.411301200"); + t("1.639709023131e+11", "163970902313.1"); + t("2.15324060127001207725970506357881e+19", "21532406012700120772.5970506357881"); + t("2.373532121822929762731612214095513784533409e+29", "237353212182292976273161221409.5513784533409"); + t("4.5883026736677354807679611737881799804e+16", "45883026736677354.807679611737881799804"); + t("2.5996714820346689325468319633061e+21", "2599671482034668932546.8319633061"); + t("8.22641928e+6", "8226419.280"); + t("2.56006014528479284199702229871263269e+20", "256006014528479284199.702229871263269"); + t("4.301260132991159779386275268219519443685e+24", "4301260132991159779386275.268219519443685"); + t("1.052721790360165649330888881e+22", "10527217903601656493308.88881"); + t("6.85257703973809064426443728e+0", "6.85257703973809064426443728"); + t("1.341206836e+5", "134120.6836"); + t("1.293696083809745995580141432072678134217648017629e+25", "12936960838097459955801414.32072678134217648017629"); + t("9.81886611183e+9", "9818866111.83"); + t("1.3e+1", "13"); + t("2.185212134168411755342025405260683400574952243371e+1", "21.8521213416841175534202540526068340057495224337100"); + t("5.09812942277266e+1", "50.9812942277266"); + t("1.15841228150473459450904593187073359993e+37", "11584122815047345945090459318707335999.3"); + t("2.946408e+1", "29.46408"); + t("7.8843253757257e+6", "7884325.3757257"); + t("4.149829532631829e+7", "41498295.32631829"); + t("9.76844406944663415436782518894675931581135161845733e+46", "97684440694466341543678251889467593158113516184.5733"); + t("1.320634109357604978481e+7", "13206341.09357604978481"); + t("1.2300117044692162331376535732386421937e+8", "123001170.44692162331376535732386421937"); + t("1.79343822239530391558796001578394154846951511735e+42", "1793438222395303915587960015783941548469515.11735"); + t("3.46227335968923941657647562338569e+7", "34622733.5968923941657647562338569"); + t("3.6081901133629252234652167e+18", "3608190113362925223.4652167"); + t("3.41769614577210353834283168068494e+24", "3417696145772103538342831.68068494"); + t("1.036693895e+8", "103669389.5"); + t("9.840862048026534392868878603161623504069221701e+27", "9840862048026534392868878603.161623504069221701"); + t("2.56437211238605e+10", "25643721123.86050"); + t("2.645333616435501e+6", "2645333.616435501"); + t("3.75834254646606787747061360998e+1", "37.5834254646606787747061360998"); + t("1.21582101247e+6", "1215821.01247"); + t("5.43e+1", "54.3"); + t("3.1461380403028457753654142032015e+27", "3146138040302845775365414203.2015"); + t("2.73039e+4", "27303.9"); + t("3.349112077000398203735762417e+25", "33491120770003982037357624.170"); + t("2.293912475527946909960963698602754526495697363e+31", "22939124755279469099609636986027.54526495697363"); + t("7.800578368e+8", "780057836.8"); + t("3.503304265046835170500513083432983735273e+28", "35033042650468351705005130834.32983735273"); + t("6.521027589563589728e+9", "6521027589.563589728"); + t("1.26604818273232e+3", "1266.04818273232"); + t("4.5844253800756959854340115e+7", "45844253.800756959854340115"); + t("2.5103887704609158215979351198183e+20", "251038877046091582159.79351198183"); + t("6.5170765018089001398157674630438543e+17", "651707650180890013.98157674630438543"); + t("7.85679659655762637941070216699747e+18", "7856796596557626379.41070216699747"); + t("6.55113755834849587145e+18", "6551137558348495871.45"); + t("1.37856413555592382324487860882977704999616e+32", "137856413555592382324487860882977.704999616"); + t("7.51530486314140193e+5", "751530.486314140193"); + t("1.3712642461229590011e+7", "13712642.4612295900110"); + t("8.945222111405724e+2", "894.5222111405724"); + t("1.74501389497524149414213254563953197394499747444317e+44", "174501389497524149414213254563953197394499747.444317"); + t("7.1583294041845987824307132e+11", "715832940418.45987824307132"); + t("1.282007923703783860923747442697572540049e+13", "12820079237037.83860923747442697572540049"); + t("5.660625174793381639446229222e+11", "566062517479.3381639446229222"); + t("2.094745267e+4", "20947.45267"); + t("8.4497877437844686621097450218313191175e+13", "84497877437844.6866210974502183131911750"); + t("1.707217105197425488000493702652714920318758323999364e+23", "170721710519742548800049.3702652714920318758323999364"); + t("2.5487434814078948112667918801256335353406914111636153e+36", "2548743481407894811266791880125633535.3406914111636153"); + t("7.975944255792483246376368330364e+8", "797594425.5792483246376368330364"); + t("1.1038710051127692465453332862048e+20", "110387100511276924654.53332862048"); + t("2.0214122542287381656860062564183697682e+13", "20214122542287.381656860062564183697682"); + t("7.853012025112e+4", "78530.12025112"); + t("7.97061651146928e+3", "7970.61651146928"); + t("1.5712956919727392305361179349388e+10", "15712956919.727392305361179349388"); + t("8.2480059e+3", "8248.0059"); + t("2.71929146422591231877279340940781443961397491e+19", "27192914642259123187.7279340940781443961397491"); + t("2.131e+2", "213.10"); + t("5.53443299017925367e+6", "5534432.99017925367"); + t("9.0599636453e+8", "905996364.53"); + t("2.86841011915001378943e+0", "2.86841011915001378943"); + t("3.50691916034642635201767965866239485795145676493e+28", "35069191603464263520176796586.6239485795145676493"); + t("1.20268235416561427028396813141142129291e+18", "1202682354165614270.283968131411421292910"); + t("4.8878729e+4", "48878.7290"); + t("9.04344910891e+4", "90434.4910891"); + t("3.87232843764031e+2", "387.232843764031"); + t("2.246212201353343e+11", "224621220135.33430"); + t("4.92916234816086643529027167741689023e+4", "49291.6234816086643529027167741689023"); + t("2.1773818234639052045922630496e+22", "21773818234639052045922.630496"); + t("4.78705362683815125848e+0", "4.787053626838151258480"); + t("2.700762078698436846755198719005e+28", "27007620786984368467551987190.05"); + t("3.04897901998664513240359358574664525651334171e+36", "3048979019986645132403593585746645256.51334171"); + t("3.807300704307638993582e+18", "3807300704307638993.582"); + t("7.9846840795076707340124614425632613353204e+3", "7984.6840795076707340124614425632613353204"); + t("6.69918558928e+4", "66991.8558928"); + t("5.11e+1", "51.1"); + t("1.8e+1", "18"); + t("2.629676971e+2", "262.9676971"); + t("6.8402048967767212280354493672372347369800788279670097e+39", "6840204896776721228035449367237234736980.0788279670097"); + t("4.684145127602661593941009299096573092581e+21", "4684145127602661593941.009299096573092581"); + t("1.3010133600355313564757759338788842e+18", "1301013360035531356.4757759338788842"); + t("1.58527974113934732993372979240170059e+30", "1585279741139347329933729792401.70059"); + t("1.8249338722142728063286e+2", "182.49338722142728063286"); + t("1.5941e+0", "1.59410"); + t("2.0337546838170082473539926326926478252219475e+29", "203375468381700824735399263269.26478252219475"); + t("4.626173e+3", "4626.173"); + t("6.04857e+0", "6.04857"); + t("9.55039030589038069713466331e+0", "9.55039030589038069713466331"); + t("3.13977842e+6", "3139778.42"); + t("4.4046554138751e+10", "44046554138.751"); + t("2.27133088062335544441002965096e+25", "22713308806233554444100296.5096"); + t("1.72895143e+4", "17289.5143"); + t("2.59665963383099309886519729836757e+20", "259665963383099309886.5197298367570"); + t("5.42804375404301025317704270939778493719619031067122726e+24", "5428043754043010253177042.70939778493719619031067122726"); + t("4.0526054186532354119711729303068171063825508e+2", "405.26054186532354119711729303068171063825508"); + t("1.26960267394273418410687782475849e+9", "1269602673.94273418410687782475849"); + t("5.657206212494798707700546288522044895183104747814298e+7", "56572062.12494798707700546288522044895183104747814298"); + t("4.80834664047405196104320584899449259286e+21", "4808346640474051961043.20584899449259286"); + t("5.6639294733687553228095e+12", "5663929473368.7553228095"); + t("3.08469899797006019074738182718775120203832280411e+44", "308469899797006019074738182718775120203832280.4110"); + t("6.7324018330891115163882850963905830707247414517739e+20", "673240183308911151638.82850963905830707247414517739"); + t("7.8e+1", "78"); + t("3.7511576e+4", "37511.576"); + t("4.9744737445922007872559411117007e+20", "497447374459220078725.59411117007"); + t("1.4264855114407053894401398660016825255242638071603e+2", "142.64855114407053894401398660016825255242638071603"); + t("1.7972e+1", "17.972"); + t("1.08223075909551421423442320791403363148864e+12", "1082230759095.51421423442320791403363148864"); + t("1.27992032328728568e+16", "12799203232872856.8"); + t("3.23410998756876789482263723951851692122375679e+9", "3234109987.56876789482263723951851692122375679"); + t("8.309058187826413886051933894555524364e+5", "830905.8187826413886051933894555524364"); + t("5.9126904485324084868266487306831291316268437628598e+40", "59126904485324084868266487306831291316268.437628598"); + t("3.579918283412251816470339246643e+16", "35799182834122518.16470339246643"); + t("8.292403288e+1", "82.92403288"); + t("7.39431e+2", "739.431"); + t("3.880259e+2", "388.0259"); + t("8.356612898392420429137009991722851e+18", "8356612898392420429.137009991722851"); + t("5.395903069e+4", "53959.03069"); + t("2.084656696443025813e+12", "2084656696443.025813"); + t("7.54671420639507228408101673007042651462774881888e+46", "75467142063950722840810167300704265146277488188.8"); + t("6.9e+1", "69"); + t("8.921e+2", "892.10"); + t("2.51196408e+4", "25119.6408"); + t("4.2502325992166027236666111862782e+15", "4250232599216602.7236666111862782"); + t("1.48181688637265610577148846528720697801886e+17", "148181688637265610.577148846528720697801886"); + t("6.578849006577789439801702e+0", "6.578849006577789439801702"); + t("4.346905625146927213132990652e+22", "43469056251469272131329.90652"); + t("5.5037893e+0", "5.5037893"); + t("2.47731675267438120023934691987e+15", "2477316752674381.20023934691987"); + t("3.37487366652276710575333974697197457e+9", "3374873666.52276710575333974697197457"); + t("1.0385387059229329627650733271e+0", "1.0385387059229329627650733271"); + t("9.83004944893186643985967600066862369294062e+17", "983004944893186643.985967600066862369294062"); + t("4.24581658127100743607231740518633563667839856744e+26", "424581658127100743607231740.518633563667839856744"); + t("3.14222253457223322124561584676953981561133e+2", "314.222253457223322124561584676953981561133"); + t("1.1553833141891499623566322265502695096447390786748e+48", "1155383314189149962356632226550269509644739078674.8"); + t("5.2811e+1", "52.811"); + t("9.925202445922857021945001443270353221818473047344e+2", "992.5202445922857021945001443270353221818473047344"); + t("1.5758941e+4", "15758.9410"); + t("6.6630010328564980059488916358767e+30", "6663001032856498005948891635876.7"); + t("1.49898377473153728100588907982263779724221092732531e+44", "149898377473153728100588907982263779724221092.732531"); + t("4.175238908185616536855e+20", "417523890818561653685.5"); + t("1.192838736272799853174021036238e+21", "1192838736272799853174.021036238"); + t("1.145038e+3", "1145.038"); + t("4.0973786626728889384598402998014750474268e+9", "4097378662.6728889384598402998014750474268"); + t("5.5038104e+4", "55038.104"); + t("6.83895535917805849194871290958068199407518e+2", "683.895535917805849194871290958068199407518"); + t("2.9716066182e+0", "2.9716066182"); + t("1e+0", "1"); + t("1.78063428481384259205331358231117935e+0", "1.780634284813842592053313582311179350"); + t("6.277714976103425712837719e+22", "62777149761034257128377.1900"); + t("1.37376909692642287134486582232200547809845780076e+26", "137376909692642287134486582.232200547809845780076"); + t("7.0255659498942180908195e+16", "70255659498942180.908195"); + t("1.36758412477e+6", "1367584.12477"); + t("2.8993016541323392639291954727329719281958174e+23", "289930165413233926392919.54727329719281958174"); + t("2.44e+0", "2.44"); + t("5.39870374073212675286058196342904027304008232e+40", "53987037407321267528605819634290402730400.8232"); + t("6.4507160654825e+9", "6450716065.4825"); + t("1.21664e+3", "1216.64"); + t("3.13108416362400780440861428855476299376486503e+0", "3.13108416362400780440861428855476299376486503"); + t("7.2960499529336221198242592384915903149558006256202995e+17", "729604995293362211.98242592384915903149558006256202995"); + t("5.67239328846178836850536139916737284448973e+0", "5.67239328846178836850536139916737284448973"); + t("7.20020305957519743064e+3", "7200.203059575197430640"); + t("1.85115423780064073715032545790701546649748120114e+27", "1851154237800640737150325457.90701546649748120114"); + t("1.25021250836778893386687012660759710902e+21", "1250212508367788933866.87012660759710902"); + t("2.3323707491301665555664068537483355865980611e+25", "23323707491301665555664068.5374833558659806110"); + t("2.5088131581298507401113299236e+4", "25088.131581298507401113299236"); + t("9.612326850563943155774866e+17", "961232685056394315.5774866"); + t("1.54114517176248297154289225338049499367447824e+22", "15411451717624829715428.9225338049499367447824"); + t("5.22e+0", "5.22"); + t("4.04698305476309533783897e+21", "4046983054763095337838.97"); + t("2.620876536774240989563272117908814902188002596311e+24", "2620876536774240989563272.117908814902188002596311"); + t("1.7290754650750439926458970782158e+10", "17290754650.750439926458970782158"); + t("8.570789332248e+6", "8570789.332248"); + t("1.21e+1", "12.1"); + t("9.749134061639126502181192178140679940393318673720443e+45", "9749134061639126502181192178140679940393318673.720443"); + t("1.26878e+5", "126878.0"); + t("1.2391599841950849289559651456348e+9", "1239159984.1950849289559651456348"); + t("1.72220118427662724614289256133342842086e+22", "17222011842766272461428.9256133342842086"); + t("1.512063585971680294584184272035496e+15", "1512063585971680.294584184272035496"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.Tests/Light/BigDecimalLightValueOfTests.cs b/DecimalSharp.Tests/Light/BigDecimalLightValueOfTests.cs new file mode 100644 index 0000000..8cee247 --- /dev/null +++ b/DecimalSharp.Tests/Light/BigDecimalLightValueOfTests.cs @@ -0,0 +1,74 @@ +using DecimalSharp.Core; +using NUnit.Framework; + +namespace DecimalSharp.Tests.Light +{ + [TestFixture, Category("BigDecimalLightValueOf")] + public class BigDecimalLightValueOfTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void ValueOf() + { + var bigDecimalFactory = new BigDecimalLightFactory(new BigDecimalLightConfig() + { + Precision = 20, + Rounding = RoundingMode.ROUND_HALF_UP, + ToExpNeg = (long)-9e15, + ToExpPos = (long)9e15 + }); + + var t = (string expected, BigDecimalArgument n) => + { + BigDecimalTests.assertEqual(expected, bigDecimalFactory.BigDecimal(n).ValueOf()); + }; + + t("0", 0); + t("0", "0"); + t("1", 1); + t("9", 9); + t("90", 90); + t("90.12", 90.12); + t("0.1", 0.1); + t("0.01", 0.01); + t("0.0123", 0.0123); + t("111111111111111111111", "111111111111111111111"); + t("0.00001", 0.00001); + + t("0", "-0"); + t("-1", -1); + t("-9", -9); + t("-90", -90); + t("-90.12", -90.12); + t("-0.1", -0.1); + t("-0.01", -0.01); + t("-0.0123", -0.0123); + t("-111111111111111111111", "-111111111111111111111"); + t("-0.00001", -0.00001); + + // Exponential format + bigDecimalFactory.Config.ToExpNeg = 0; + bigDecimalFactory.Config.ToExpPos = 0; + + t("1e-7", 0.0000001); + t("1.23e-7", 0.000000123); + t("1.2e-8", 0.000000012); + t("-1e-7", -0.0000001); + t("-1.23e-7", -0.000000123); + t("-1.2e-8", -0.000000012); + + t("5.73447902457635174479825134e+14", "573447902457635.174479825134"); + t("1.07688e+1", "10.7688"); + t("3.171194102379077141557759899307946350455841e+27", "3171194102379077141557759899.307946350455841"); + t("4.924353466898191177698653319742594890634579e+37", "49243534668981911776986533197425948906.34579"); + t("6.85558243926569397328633907445409866949445343654692955e+18", "6855582439265693973.28633907445409866949445343654692955"); + t("1e+0", "1"); + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/DecimalSharp.sln b/DecimalSharp.sln new file mode 100644 index 0000000..2380ac9 --- /dev/null +++ b/DecimalSharp.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32407.343 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DecimalSharp", "DecimalSharp\DecimalSharp.csproj", "{BE55FC2E-05FE-425D-8530-BA4D75379CE3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DecimalSharp.Tests", "DecimalSharp.Tests\DecimalSharp.Tests.csproj", "{3F107165-B294-4605-AF58-2C56E6B7FA98}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DecimalSharp.Light", "DecimalSharp.Light\DecimalSharp.Light.csproj", "{CF6064C9-EF1C-4FF1-BFB0-5B605ADE0ADD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DecimalSharp.Core", "DecimalSharp.Core\DecimalSharp.Core.csproj", "{71CC9F14-A9E8-4752-A465-BC4C1436A288}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BE55FC2E-05FE-425D-8530-BA4D75379CE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE55FC2E-05FE-425D-8530-BA4D75379CE3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE55FC2E-05FE-425D-8530-BA4D75379CE3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE55FC2E-05FE-425D-8530-BA4D75379CE3}.Release|Any CPU.Build.0 = Release|Any CPU + {3F107165-B294-4605-AF58-2C56E6B7FA98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F107165-B294-4605-AF58-2C56E6B7FA98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F107165-B294-4605-AF58-2C56E6B7FA98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F107165-B294-4605-AF58-2C56E6B7FA98}.Release|Any CPU.Build.0 = Release|Any CPU + {CF6064C9-EF1C-4FF1-BFB0-5B605ADE0ADD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF6064C9-EF1C-4FF1-BFB0-5B605ADE0ADD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF6064C9-EF1C-4FF1-BFB0-5B605ADE0ADD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF6064C9-EF1C-4FF1-BFB0-5B605ADE0ADD}.Release|Any CPU.Build.0 = Release|Any CPU + {71CC9F14-A9E8-4752-A465-BC4C1436A288}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {71CC9F14-A9E8-4752-A465-BC4C1436A288}.Debug|Any CPU.Build.0 = Debug|Any CPU + {71CC9F14-A9E8-4752-A465-BC4C1436A288}.Release|Any CPU.ActiveCfg = Release|Any CPU + {71CC9F14-A9E8-4752-A465-BC4C1436A288}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E77069FD-8029-44E7-B3C2-CAAC86F9292D} + EndGlobalSection +EndGlobal diff --git a/DecimalSharp/BigDecimal.cs b/DecimalSharp/BigDecimal.cs new file mode 100644 index 0000000..a308284 --- /dev/null +++ b/DecimalSharp/BigDecimal.cs @@ -0,0 +1,2550 @@ +using DecimalSharp.Core; +using DecimalSharp.Core.Extensions; +using System.Globalization; +using System.Numerics; +using System.Text.RegularExpressions; + +namespace DecimalSharp +{ + public class BigDecimal + { + public BigDecimalConfig Config; + + public int[]? d; + public int? s; + public long? e; + + protected BigDecimal(BigDecimalConfig? config = null) + { + this.Config = config ?? new BigDecimalConfig(); + + this.s = null; + this.e = null; + this.d = null; + } + public BigDecimal(BigDecimalArgument v, BigDecimalConfig? config = null) : this(config) + { + v.Switch( + @double => _BigDecimal(@double), + @decimal => _BigDecimal(@decimal), + @long => _BigDecimal(@long), + @int => _BigDecimal(@int), + @string => _BigDecimal(@string), + bigInteger => _BigDecimal(bigInteger.ToString(CultureInfo.InvariantCulture)), + bigDecimal => _BigDecimal(bigDecimal) + ); + } + internal void _BigDecimal(string? v) + { + if (v == null) + throw new BigDecimalException(BigDecimalException.InvalidArgument + v); + + int? i = null; + // Minus sign? + if (v.Length > 0 && (i = v.ElementAt(0)) == 45) + { + v = v.Slice(1); + this.s = -1; + } + else + { + // Plus sign? + if (i == 43) v = v.Slice(1); + this.s = 1; + } + + var isDec = Regex.IsMatch(v, BigDecimalHelperFunctions.isDecimal, RegexOptions.IgnoreCase); + if (isDec) + { + _BigDecimal(BigDecimalHelperFunctions.parseDecimal(this, v)); + } + else + { + _BigDecimal(BigDecimalHelperFunctions.parseOther(this, v)); + } + } + internal void _BigDecimal(int v) + { + int e, i; + + if (v == 0) + { + this.s = (double)1 / v < 0 ? -1 : 1; + this.e = 0; + this.d = new int[] { 0 }; + return; + } + + if (v < 0) + { + v = -v; + this.s = -1; + } + else + { + this.s = 1; + } + + // Fast path for small integers. + if (v == ~~v && v < 1e7) + { + for (e = 0, i = v; i >= 10; i /= 10) e++; + + if (this.Config.external) + { + if (e > this.Config.MaxE) + { + this.e = null; + this.d = null; + } + else if (e < this.Config.MinE) + { + this.e = 0; + this.d = new int[] { 0 }; + } + else + { + this.e = e; + this.d = new int[] { v }; + } + } + else + { + this.e = e; + this.d = new int[] { v }; + } + + return; + } + + _BigDecimal(BigDecimalHelperFunctions.parseDecimal(this, v.ToString(CultureInfo.InvariantCulture))); + } + internal void _BigDecimal(long v) + { + long e, i; + + if (v == 0) + { + this.s = (double)1 / v < 0 ? -1 : 1; + this.e = 0; + this.d = new int[] { 0 }; + return; + } + + if (v < 0) + { + v = -v; + this.s = -1; + } + else + { + this.s = 1; + } + + // Fast path for small integers. + if (v == ~~v && v < 1e7) + { + for (e = 0, i = v; i >= 10; i /= 10) e++; + + if (this.Config.external) + { + if (e > this.Config.MaxE) + { + this.e = null; + this.d = null; + } + else if (e < this.Config.MinE) + { + this.e = 0; + this.d = new int[] { 0 }; + } + else + { + this.e = e; + this.d = new int[] { (int)v }; + } + } + else + { + this.e = e; + this.d = new int[] { (int)v }; + } + + return; + } + + _BigDecimal(BigDecimalHelperFunctions.parseDecimal(this, v.ToString(CultureInfo.InvariantCulture))); + } + + internal void _BigDecimal(double v) + { + if (v == 0) + { + this.s = 1 / v < 0 ? -1 : 1; + this.e = 0; + this.d = new int[] { 0 }; + return; + } + + if (v < 0) + { + v = -v; + this.s = -1; + } + else + { + this.s = 1; + } + + // Infinity, NaN. + if (v * 0 != 0) + { + if (double.IsNaN(v)) + { + this.s = null; //if nan + } + this.e = null; + this.d = null; + return; + } + + _BigDecimal(BigDecimalHelperFunctions.parseDecimal(this, v.ToString(CultureInfo.InvariantCulture))); + } + + internal void _BigDecimal(decimal v) + { + if (v == 0) + { + this.s = 1 / v < 0 ? -1 : 1; + this.e = 0; + this.d = new int[] { 0 }; + return; + } + + if (v < 0) + { + v = -v; + this.s = -1; + } + else + { + this.s = 1; + } + + _BigDecimal(BigDecimalHelperFunctions.parseDecimal(this, v.ToString(CultureInfo.InvariantCulture))); + } + internal void _BigDecimal(BigDecimal? v) + { + if (v == null) + throw new BigDecimalException(BigDecimalException.InvalidArgument + v); + + this.s = v.s; + + if (this.Config.external) + { + if (!v.d.IsTrue() || v.e > this.Config.MaxE) + { + + // Infinity. + this.e = null; + this.d = null; + } + else if (v.e < this.Config.MinE) + { + + // Zero. + this.e = 0; + this.d = new int[] { 0 }; + } + else + { + this.e = v.e; + this.d = v.d.Slice(); + } + } + else + { + this.e = v.e; + this.d = v.d.IsTrue() ? v.d.Slice() : v.d; + } + } + + + // Decimal prototype methods + + + /* + * absoluteValue abs + * ceil + * clampedTo clamp + * comparedTo cmp + * cosine cos + * cubeRoot cbrt + * decimalPlaces dp + * dividedBy div + * dividedToIntegerBy divToInt + * equals eq + * floor + * greaterThan gt + * greaterThanOrEqualTo gte + * hyperbolicCosine cosh + * hyperbolicSine sinh + * hyperbolicTangent tanh + * inverseCosine acos + * inverseHyperbolicCosine acosh + * inverseHyperbolicSine asinh + * inverseHyperbolicTangent atanh + * inverseSine asin + * inverseTangent atan + * isFinite + * isInteger isInt + * isnull + * isNegative isNeg + * isPositive isPos + * isZero + * lessThan lt + * lessThanOrEqualTo lte + * logarithm log + * [maximum] [max] + * [minimum] [min] + * minus sub + * modulo mod + * naturalExponential exp + * naturalLogarithm ln + * negated neg + * plus add + * precision sd + * round + * sine sin + * squareRoot sqrt + * tangent tan + * times mul + * toBinary + * toDecimalPlaces toDP + * toExponential + * toFixed + * toFraction + * toHexadecimal toHex + * toNearest + * toNumber + * toOctal + * toPower pow + * toPrecision + * toSignificantDigits toSD + * toString + * truncated trunc + * valueOf toJSON + */ + + + /// + /// + /// + /// A new BigDecimal whose value is the absolute value of this BigDecimal. + public BigDecimal Abs() + { + var x = new BigDecimal(this, this.Config); + if (x.s < 0) x.s = 1; + return BigDecimalHelperFunctions.finalise(x); + } + /// + public BigDecimal AbsoluteValue() => Abs(); + + + /// + /// + /// + /// A new BigDecimal whose value is the value of this BigDecimal rounded to a whole number in the + /// direction of positive Infinity. + public BigDecimal Ceil() { + return BigDecimalHelperFunctions.finalise(new BigDecimal(this, this.Config), this.e + 1, RoundingMode.ROUND_CEIL); + } + + + /// + /// + /// + /// + /// + /// A new BigDecimal whose value is the value of this BigDecimal clamped to the range + /// delineated by `min` and `max`. + public BigDecimal Clamp(BigDecimalArgument min, BigDecimalArgument max) => _clamp(new BigDecimal(min, this.Config), new BigDecimal(max, this.Config)); + private BigDecimal _clamp(BigDecimal min, BigDecimal max) { + int? k; + var x = this; + if (!min.s.IsTrue() || !max.s.IsTrue()) return new BigDecimal(double.NaN, this.Config); + if (min.Gt(max)) throw new BigDecimalException(BigDecimalException.InvalidArgument + max); + k = x.Cmp(min); + return k < 0 ? min : x.Cmp(max) > 0 ? max : new BigDecimal(x, this.Config); + } + /// + public BigDecimal ClampedTo(BigDecimalArgument min, BigDecimalArgument max) => Clamp(min, max); + + + /// + /// + /// + /// + /// 1 if the value of this BigDecimal is greater than the value of `y`, + ///
-1 if the value of this BigDecimal is less than the value of `y`, + ///
0 if they have the same value, + ///
null if the value of either BigDecimal is null.
+ public int? Cmp(BigDecimalArgument y) => _cmp(new BigDecimal(y, this.Config)); + private int? _cmp(BigDecimal y) + { + long i, j, xdL, ydL; + var x = this; + var xd = x.d; + var yd = y.d; + var xs = x.s; + var ys = y.s; + + // Either null or ±Infinity? + if (!xd.IsTrue() || !yd.IsTrue()) + { + return !xs.IsTrue() || !ys.IsTrue() ? null : xs != ys ? xs : xd == yd ? 0 : !xd.IsTrue() ^ xs < 0 ? 1 : -1; + } + + // Either zero? + if (!xd[0].IsTrue() || !yd[0].IsTrue()) return xd[0].IsTrue() ? xs : yd[0].IsTrue() ? -ys : 0; + + // Signs differ? + if (xs != ys) return xs; + + // Compare exponents. + if (x.e != y.e) return x.e > y.e ^ xs < 0 ? 1 : -1; + + xdL = xd.LongLength; + ydL = yd.LongLength; + + // Compare digit by digit. + for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) + { + if (xd[i] != yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1; + } + + // Compare lengths. + return xdL == ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1; + } + /// + public int? ComparedTo(BigDecimalArgument y) => Cmp(y); + + + /// + /// + /// + /// A new BigDecimal whose value is the cosine of the value in radians of this BigDecimal. + public BigDecimal Cos() { + long pr; + RoundingMode rm; + var x = this; + var Ctor = x.Config; + + if (!x.d.IsTrue()) return new BigDecimal(double.NaN, this.Config); + + // Cos(0) = Cos(-0) = 1 + if (!x.d[0].IsTrue()) return new BigDecimal(1, this.Config); + + pr = Ctor.Precision; + rm = Ctor.Rounding; + Ctor.Precision = pr + Math.Max(x.e ?? 0, x.Sd() ?? 0) + BigDecimalHelperFunctions.LOG_BASE; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + + x = BigDecimalHelperFunctions.cosine(Ctor, BigDecimalHelperFunctions.toLessThanHalfPi(Ctor, x, out var quadrant)); + + Ctor.Precision = pr; + Ctor.Rounding = rm; + + return BigDecimalHelperFunctions.finalise(quadrant == 2 || quadrant == 3 ? x.Neg() : x, pr, rm, true); + } + /// + public BigDecimal Cosine() => Cos(); + + + /// + /// + /// + /// A new BigDecimal whose value is the cube root of the value of this BigDecimal, rounded to + /// `precision` significant digits using rounding mode `rounding`. + public BigDecimal Cbrt() { + long e, sd; + int rep = 0; + bool m = false; + double s; + LongString n; + BigDecimal r, t, t3, t3plusx; + var x = this; + var Ctor = x.Config; + + if (!x.IsFinite() || x.IsZero()) return new BigDecimal(x, this.Config); + Ctor.external = false; + + // Initial estimate. + s = (x.s ?? 0) * Math.Pow((x.s ?? 0) * x.ToNumber(), (double)1 / 3); + + // Math.cbrt underflow/overflow? + // Pass x to Math.pow as integer, then adjust the exponent of the result. + if (!s.IsTrue() || Math.Abs(s) == double.PositiveInfinity) { + n = BigDecimalHelperFunctions.digitsToString(x.d); + e = x.e ?? 0; + + // Adjust n exponent so it is a multiple of 3 away from x exponent. + if ((s = (e - n.LongLength + 1) % 3).IsTrue()) n += (s == 1 || s == -2 ? "0" : "00"); + s = Math.Pow(double.Parse(n, CultureInfo.InvariantCulture), (double)1 / 3); + + // Rarely, e may be one less than the result exponent value. + e = (long)Math.Floor(((double)e + 1) / 3) - ((e % 3 == (e < 0 ? -1 : 2)) ? 1 : 0); + + if (s == double.PositiveInfinity) { + n = "5e" + e; + } else { + n = s.ToExponential(); + n = n.Slice(0, n.IndexOf("e") + 1) + e; + } + + r = new BigDecimal(n.ToString(), Ctor); + r.s = x.s; + } else { + r = new BigDecimal(s.ToString(CultureInfo.InvariantCulture), Ctor); + } + + sd = (e = Ctor.Precision) + 3; + + // Halley"s method. + // TODO? Compare Newton"s method. + for (; ; ) { + t = r; + t3 = t.Times(t).Times(t); + t3plusx = t3.Plus(x); + r = BigDecimalHelperFunctions.divide(t3plusx.Plus(x).Times(t), t3plusx.Plus(t3), sd + 2, RoundingMode.ROUND_DOWN); + + // TODO? Replace with for-loop and checkRoundingDigits. + if (BigDecimalHelperFunctions.digitsToString(t.d).Slice(0, sd) == (n = BigDecimalHelperFunctions.digitsToString(r.d)).Slice(0, sd)) { + n = n.Slice(sd - 3, sd + 1); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999 + // , i.e. approaching a rounding boundary, continue the iteration. + if (n == "9999" || !rep.IsTrue() && n == "4999") { + + // On the first iteration only, check to see if rounding up gives the exact result as the + // nines may infinitely repeat. + if (!rep.IsTrue()) { + BigDecimalHelperFunctions.finalise(t, e + 1, RoundingMode.ROUND_UP); + + if (t.Times(t).Times(t).Eq(x)) { + r = t; + break; + } + } + + sd += 4; + rep = 1; + } else { + + // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result. + // If not, then there are further digits and m will be truthy. + double doubleN = 0; + double.TryParse(n, NumberStyles.Any, CultureInfo.InvariantCulture, out doubleN); + double doubleN2 = 0; + double.TryParse(n.Slice(1), NumberStyles.Any, CultureInfo.InvariantCulture, out doubleN2); + if (!doubleN.IsTrue() || !doubleN2.IsTrue() && n.ElementAt(0) == '5') { + + // Truncate to the first rounding digit. + BigDecimalHelperFunctions.finalise(r, e + 1, RoundingMode.ROUND_DOWN); + m = !r.Times(r).Times(r).Eq(x); + } + + break; + } + } + } + + Ctor.external = true; + + return BigDecimalHelperFunctions.finalise(r, e, Ctor.Rounding, m); + } + /// + public BigDecimal CubeRoot() => Cbrt(); + + + /// + /// + /// + /// The number of decimal places of the value of this BigDecimal. + public long? Dp() { + long w; + var d = this.d; + long? n = null; + + if (d.IsTrue()) { + w = d.LongLength - 1; + n = (w - (long)Math.Floor((double)this.e / BigDecimalHelperFunctions.LOG_BASE)) * BigDecimalHelperFunctions.LOG_BASE; + + // Subtract the number of trailing zeros of the last word. + w = d[w]; + if (w.IsTrue()) for (; w % 10 == 0; w /= 10) n--; + if (n < 0) n = 0; + } + + return n; + } + /// + public long? DecimalPlaces() => Dp(); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the value of this BigDecimal divided by `y`, rounded to + /// `precision` significant digits using rounding mode `rounding`. + public BigDecimal Div(BigDecimalArgument y) => _div(new BigDecimal(y, this.Config)); + private BigDecimal _div(BigDecimal y) { + return BigDecimalHelperFunctions.divide(this, y); + } + /// + public BigDecimal DividedBy(BigDecimalArgument y) => Div(y); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the integer part of dividing the value of this BigDecimal + /// by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`. + public BigDecimal DivToInt(BigDecimalArgument y) => _divToInt(new BigDecimal(y, this.Config)); + private BigDecimal _divToInt(BigDecimal y) { + var x = this; + var Ctor = x.Config; + return BigDecimalHelperFunctions.finalise(BigDecimalHelperFunctions.divide(x, y, 0, RoundingMode.ROUND_DOWN, 1), Ctor.Precision, Ctor.Rounding); + } + /// + public BigDecimal DividedToIntegerBy(BigDecimalArgument y) => DivToInt(y); + + + /// + /// + /// + /// + /// True if the value of this BigDecimal is equal to the value of `y`, otherwise false. + public bool Eq(BigDecimalArgument y) + { + return this.Cmp(y) == 0; + } + /// + public bool Equals(BigDecimalArgument y) => Eq(y); + + + /// + /// + /// + /// A new BigDecimal whose value is the value of this BigDecimal rounded to a whole number in the + /// direction of negative Infinity. + public BigDecimal Floor() { + return BigDecimalHelperFunctions.finalise(new BigDecimal(this, this.Config), this.e + 1, RoundingMode.ROUND_FLOOR); + } + + + /// + /// + /// + /// + /// True if the value of this BigDecimal is greater than the value of `y`, otherwise + /// false. + public bool Gt(BigDecimalArgument y) + { + return this.Cmp(y) > 0; + } + /// + public bool GreaterThan(BigDecimalArgument y) => Gt(y); + + + /// + /// + /// + /// + /// True if the value of this BigDecimal is greater than or equal to the value of `y`, + /// otherwise false. + public bool Gte(BigDecimalArgument y) + { + var k = this.Cmp(y); + return k == 1 || k == 0; + } + /// + public bool GreaterThanOrEqualTo(BigDecimalArgument y) => Gte(y); + + + /// + /// + /// + /// A new BigDecimal whose value is the hyperbolic cosine of the value in radians of this + /// BigDecimal. + public BigDecimal Cosh() { + long pr, len, k; + LongString n; + RoundingMode rm; + var x = this; + var Ctor = x.Config; + var one = new BigDecimal(1, Ctor); + + if (!x.IsFinite()) return x.s.IsTrue() ? new BigDecimal(double.PositiveInfinity, Ctor) : new BigDecimal(double.NaN, Ctor); + if (x.IsZero()) return one; + + pr = Ctor.Precision; + rm = Ctor.Rounding; + Ctor.Precision = pr + Math.Max(x.e ?? 0, x.Sd() ?? 0) + 4; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + len = x.d.LongLength; + + // Argument reduction: Cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1 + // i.e. Cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4)) + + // Estimate the optimum number of times to use the argument reduction. + // TODO? Estimation reused from cosine() and may not be optimal here. + if (len < 32) { + k = (long)Math.Ceiling((double)len / 3); + n = ((double)1 / BigDecimalHelperFunctions.tinyPow(4, k)).ToString(CultureInfo.InvariantCulture); + } else { + k = 16; + n = "2.3283064365386962890625e-10"; + } + + x = BigDecimalHelperFunctions.taylorSeries(Ctor, 1, x.Times(n.ToString()), new BigDecimal(1, Ctor), true); + + // Reverse argument reduction + BigDecimal cosh2_x; + var i = k; + var d8 = new BigDecimal(8, Ctor); + for (; i--.IsTrue();) { + cosh2_x = x.Times(x); + x = one.Minus(cosh2_x.Times(d8.Minus(cosh2_x.Times(d8)))); + } + + return BigDecimalHelperFunctions.finalise(x, Ctor.Precision = pr, Ctor.Rounding = rm, true); + } + /// + public BigDecimal HyperbolicCosine() => Cosh(); + + + /// + /// + /// + /// A new BigDecimal whose value is the hyperbolic sine of the value in radians of this + /// BigDecimal. + public BigDecimal Sinh() { + long pr, len, k; + RoundingMode rm; + var x = this; + var Ctor = x.Config; + + if (!x.IsFinite() || x.IsZero()) return new BigDecimal(x, Ctor); + + pr = Ctor.Precision; + rm = Ctor.Rounding; + Ctor.Precision = pr + Math.Max(x.e ?? 0, x.Sd() ?? 0) + 4; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + len = x.d.LongLength; + + if (len < 3) { + x = BigDecimalHelperFunctions.taylorSeries(Ctor, 2, x, x, true); + } else { + + // Alternative argument reduction: Sinh(3x) = Sinh(x)(3 + 4sinh^2(x)) + // i.e. Sinh(x) = Sinh(x/3)(3 + 4sinh^2(x/3)) + // 3 multiplications and 1 addition + + // Argument reduction: Sinh(5x) = Sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x))) + // i.e. Sinh(x) = Sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5))) + // 4 multiplications and 2 additions + + // Estimate the optimum number of times to use the argument reduction. + k = (long)(1.4 * Math.Sqrt(len)); + k = k > 16 ? 16 : k | 0; + + x = x.Times((double)1 / BigDecimalHelperFunctions.tinyPow(5, k)); + x = BigDecimalHelperFunctions.taylorSeries(Ctor, 2, x, x, true); + + // Reverse argument reduction + BigDecimal sinh2_x, + d5 = new BigDecimal(5, Ctor), + d16 = new BigDecimal(16, Ctor), + d20 = new BigDecimal(20, Ctor); + for (; k--.IsTrue();) { + sinh2_x = x.Times(x); + x = x.Times(d5.Plus(sinh2_x.Times(d16.Times(sinh2_x).Plus(d20)))); + } + } + + Ctor.Precision = pr; + Ctor.Rounding = rm; + + return BigDecimalHelperFunctions.finalise(x, pr, rm, true); + } + /// + public BigDecimal HyperbolicSine() => Sinh(); + + + /// + /// + /// + /// A new BigDecimal whose value is the hyperbolic tangent of the value in radians of this + /// BigDecimal. + public BigDecimal Tanh() { + long pr; + RoundingMode rm; + var x = this; + var Ctor = x.Config; + + if (!x.IsFinite()) return new BigDecimal(x.s.HasValue ? (double)x.s.Value : double.NaN, Ctor); + if (x.IsZero()) return new BigDecimal(x, Ctor); + + pr = Ctor.Precision; + rm = Ctor.Rounding; + Ctor.Precision = pr + 7; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + + return BigDecimalHelperFunctions.divide(x.Sinh(), x.Cosh(), Ctor.Precision = pr, Ctor.Rounding = rm); + } + /// + public BigDecimal HyperbolicTangent() => Tanh(); + + + /// + /// + /// + /// A new BigDecimal whose value is the arccosine (inverse cosine) in radians of the value of + /// this BigDecimal. + public BigDecimal Acos() { + BigDecimal halfPi; + var x = this; + var Ctor = x.Config; + var k = x.Abs().Cmp(1); + var pr = Ctor.Precision; + var rm = Ctor.Rounding; + + if (k != -1) { + return k == 0 + // |x| is 1 + ? x.IsNeg() ? BigDecimalHelperFunctions.getPi(Ctor, pr, rm) : new BigDecimal(0, Ctor) + // |x| > 1 or x is null + : new BigDecimal(double.NaN, Ctor); + } + + if (x.IsZero()) return BigDecimalHelperFunctions.getPi(Ctor, pr + 4, rm).Times(0.5); + + // TODO? Special case Acos(0.5) = pi/3 and Acos(-0.5) = 2*pi/3 + + Ctor.Precision = pr + 6; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + + x = x.Asin(); + halfPi = BigDecimalHelperFunctions.getPi(Ctor, pr + 4, rm).Times(0.5); + + Ctor.Precision = pr; + Ctor.Rounding = rm; + + return halfPi.Minus(x); + } + /// + public BigDecimal InverseCosine() => Acos(); + + + /// + /// + /// + /// A new BigDecimal whose value is the inverse of the hyperbolic cosine in radians of the + /// value of this BigDecimal. + public BigDecimal Acosh() { + long pr; + RoundingMode rm; + var x = this; + var Ctor = x.Config; + + if (x.Lte(1)) return new BigDecimal(x.Eq(1) ? 0 : double.NaN, Ctor); + if (!x.IsFinite()) return new BigDecimal(x, Ctor); + + pr = Ctor.Precision; + rm = Ctor.Rounding; + Ctor.Precision = pr + Math.Max(Math.Abs(x.e ?? 0), x.Sd() ?? 0) + 4; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + Ctor.external = false; + + x = x.Times(x).Minus(1).Sqrt().Plus(x); + + Ctor.external = true; + Ctor.Precision = pr; + Ctor.Rounding = rm; + + return x.Ln(); + } + /// + public BigDecimal InverseHyperbolicCosine() => Acosh(); + + + /// + /// + /// + /// A new BigDecimal whose value is the inverse of the hyperbolic sine in radians of the value + /// of this BigDecimal. + public BigDecimal Asinh() { + long pr; + RoundingMode rm; + var x = this; + var Ctor = x.Config; + + if (!x.IsFinite() || x.IsZero()) return new BigDecimal(x, Ctor); + + pr = Ctor.Precision; + rm = Ctor.Rounding; + Ctor.Precision = pr + 2 * Math.Max(Math.Abs(x.e ?? 0), x.Sd() ?? 0) + 6; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + Ctor.external = false; + + x = x.Times(x).Plus(1).Sqrt().Plus(x); + + Ctor.external = true; + Ctor.Precision = pr; + Ctor.Rounding = rm; + + return x.Ln(); + } + /// + public BigDecimal InverseHyperbolicSine() => Asinh(); + + + /// + /// + /// + /// A new BigDecimal whose value is the inverse of the hyperbolic tangent in radians of the + /// value of this BigDecimal. + public BigDecimal Atanh() { + long pr; + RoundingMode rm; + long wpr, xsd; + var x = this; + var Ctor = x.Config; + + if (!x.IsFinite()) return new BigDecimal(double.NaN, Ctor); + if (x.e >= 0) + { + if (x.Abs().Eq(1)) return new BigDecimal((double)x.s / 0, Ctor); + else if (x.IsZero()) return new BigDecimal(x, Ctor); + else return new BigDecimal(double.NaN, Ctor); + } + + pr = Ctor.Precision; + rm = Ctor.Rounding; + xsd = x.Sd() ?? 0; + + if (Math.Max(xsd, pr) < 2 * -x.e - 1) return BigDecimalHelperFunctions.finalise(new BigDecimal(x, Ctor), pr, rm, true); + + Ctor.Precision = wpr = xsd - (x.e ?? 0); + + x = BigDecimalHelperFunctions.divide(x.Plus(1), new BigDecimal(1, Ctor).Minus(x), wpr + pr, RoundingMode.ROUND_DOWN); + + Ctor.Precision = pr + 4; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + + x = x.Ln(); + + Ctor.Precision = pr; + Ctor.Rounding = rm; + + return x.Times(0.5); + } + /// + public BigDecimal InverseHyperbolicTangent() => Atanh(); + + + /// + /// + /// + /// A new BigDecimal whose value is the arcsine (inverse sine) in radians of the value of this + /// BigDecimal. + public BigDecimal Asin() { + BigDecimal halfPi; + int? k; + long pr; + RoundingMode rm; + var x = this; + var Ctor = x.Config; + + if (x.IsZero()) return new BigDecimal(x, Ctor); + + k = x.Abs().Cmp(1); + pr = Ctor.Precision; + rm = Ctor.Rounding; + + if (k != -1) { + + // |x| is 1 + if (k == 0) { + halfPi = BigDecimalHelperFunctions.getPi(Ctor, pr + 4, rm).Times(0.5); + halfPi.s = x.s; + return halfPi; + } + + // |x| > 1 or x is null + return new BigDecimal(double.NaN, Ctor); + } + + // TODO? Special case Asin(1/2) = pi/6 and Asin(-1/2) = -pi/6 + + Ctor.Precision = pr + 6; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + + x = x.Div(new BigDecimal(1, Ctor).Minus(x.Times(x)).Sqrt().Plus(1)).Atan(); + + Ctor.Precision = pr; + Ctor.Rounding = rm; + + return x.Times(2); + } + /// + public BigDecimal InverseSine() => Asin(); + + + /// + /// + /// + /// A new BigDecimal whose value is the arctangent (inverse tangent) in radians of the value + /// of this BigDecimal. + public BigDecimal Atan() { + int k; + long i, j, n, wpr; + BigDecimal px, t, r, x2; + var x = this; + var Ctor = x.Config; + var pr = Ctor.Precision; + var rm = Ctor.Rounding; + + if (!x.IsFinite()) { + if (!x.s.IsTrue()) return new BigDecimal(double.NaN, Ctor); + if (pr + 4 <= BigDecimalHelperFunctions.PI_PRECISION) { + r = BigDecimalHelperFunctions.getPi(Ctor, pr + 4, rm).Times(0.5); + r.s = x.s; + return r; + } + } else if (x.IsZero()) { + return new BigDecimal(x, Ctor); + } else if (x.Abs().Eq(1) && pr + 4 <= BigDecimalHelperFunctions.PI_PRECISION) { + r = BigDecimalHelperFunctions.getPi(Ctor, pr + 4, rm).Times(0.25); + r.s = x.s; + return r; + } + + Ctor.Precision = wpr = pr + 10; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + + // TODO? if (x >= 1 && pr <= BigDecimalFactory.PI_PRECISION) Atan(x) = halfPi * x.s - Atan(1 / x); + + // Argument reduction + // Ensure |x| < 0.42 + // Atan(x) = 2 * Atan(x / (1 + Sqrt(1 + x^2))) + + k = Math.Min(28, (int)(wpr / BigDecimalHelperFunctions.LOG_BASE + 2) | 0); + + for (i = k; i != 0; --i) x = x.Div(x.Times(x).Plus(1).Sqrt().Plus(1)); + + Ctor.external = false; + + j = (long)Math.Ceiling((double)wpr / BigDecimalHelperFunctions.LOG_BASE); + n = 1; + x2 = x.Times(x); + r = new BigDecimal(x, Ctor); + px = x; + + // Atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ... + for (; i != -1;) { + px = px.Times(x2); + t = r.Minus(px.Div(n += 2)); + + px = px.Times(x2); + r = t.Plus(px.Div(n += 2)); + + if (r.d.LongLength > j && t.d.LongLength > j) for (i = j; r.d[i] == t.d[i] && i--.IsTrue();) ; + } + + if (k.IsTrue()) r = r.Times(2 << (k - 1)); + + Ctor.external = true; + + return BigDecimalHelperFunctions.finalise(r, Ctor.Precision = pr, Ctor.Rounding = rm, true); + } + /// + public BigDecimal InverseTangent() => Atan(); + + + /// + /// + /// + /// True if the value of this BigDecimal is a finite number, otherwise false. + public bool IsFinite() { + return this.d.IsTrue(); + } + + + /// + /// + /// + /// True if the value of this BigDecimal is an integer, otherwise false. + public bool IsInt() { + return this.d.IsTrue() && Math.Floor((double)this.e / BigDecimalHelperFunctions.LOG_BASE) > this.d.LongLength - 2; + } + public bool IsInteger() => IsInt(); + + + /// + /// + /// + /// True if the value of this BigDecimal is NaN(null), otherwise false. + public bool IsNaN() { + return !this.s.IsTrue(); + } + + + /// + /// + /// + /// True if the value of this BigDecimal is negative, otherwise false. + public bool IsNeg() { + return this.s < 0; + } + /// + public bool IsNegative() => IsNeg(); + + + /// + /// + /// + /// True if the value of this BigDecimal is positive, otherwise false. + public bool IsPos() { + return this.s > 0; + } + /// + public bool IsPositive() => IsPos(); + + + /// + /// + /// + /// True if the value of this BigDecimal is 0 or -0, otherwise false. + public bool IsZero() { + return this.d.IsTrue() && this.d[0] == 0; + } + + + /// + /// + /// + /// + /// True if the value of this BigDecimal is less than `y`, otherwise false. + public bool Lt(BigDecimalArgument y) + { + return this.Cmp(y) < 0; + } + /// + public bool LessThan(BigDecimalArgument y) => Lt(y); + + + /// + /// + /// + /// + /// True if the value of this BigDecimal is less than or equal to `y`, otherwise false. + public bool Lte(BigDecimalArgument y) + { + return this.Cmp(y) < 1; + } + /// + public bool LessThanOrEqualTo(BigDecimalArgument y) => Lte(y); + + + /// + /// The result will always be correctly rounded if the base of the log is 10, and "almost always" + /// otherwise:

+ /// Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen + /// rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error + /// between the result and the correctly rounded result will be one ulp (unit in the last place). + ///
+ /// The base of the logarithm. Default = 10. + /// The logarithm of the value of this BigDecimal to the specified base, rounded to `precision` + /// significant digits using rounding mode `rounding`.

+ /// If no base is specified, default base = 10 used.
+ public BigDecimal Log(BigDecimalArgument @base) + { + return @base.Match( + @double => _log(new BigDecimal(@double, this.Config)), + @decimal => _log(new BigDecimal(@decimal, this.Config)), + @long => _log(new BigDecimal(@long, this.Config)), + @int => _log(new BigDecimal(@int, this.Config)), + @string => + { + if (string.IsNullOrEmpty(@string)) return _log(new BigDecimal(10, this.Config)); + return _log(new BigDecimal(@string, this.Config)); + }, + bigInteger => _log(new BigDecimal(bigInteger, this.Config)), + bigDecimal => { + if (bigDecimal == null) return _log(new BigDecimal(10, this.Config)); + return _log(new BigDecimal(bigDecimal, this.Config)); + } + ); + } + private BigDecimal _log(BigDecimal @base) { + bool isBase10, inf = false; + int[] d; + BigDecimal denominator, num, r; + long k, sd; + var arg = this; + var Ctor = arg.Config; + var pr = Ctor.Precision; + var rm = Ctor.Rounding; + var guard = 5; + + + d = @base.d; + + // Return null if @base is negative, or non-finite, or is 0 or 1. + if (@base.s < 0 || !d.IsTrue() || !d[0].IsTrue() || @base.Eq(1)) return new BigDecimal(double.NaN, Ctor); + + isBase10 = @base.Eq(10); + + d = arg.d; + + // Is arg negative, non-finite, 0 or 1? + if (arg.s < 0 || !d.IsTrue() || !d[0].IsTrue() || arg.Eq(1)) { + return new BigDecimal(d.IsTrue() && !d[0].IsTrue() ? double.NegativeInfinity : arg.s != 1 ? double.NaN : d.IsTrue() ? 0 : double.PositiveInfinity, Ctor); + } + + // The result will have a non-terminating decimal expansion if @base is 10 and arg is not an + // integer power of 10. + if (isBase10) { + if (d.LongLength > 1) { + inf = true; + } else { + for (k = d[0]; k % 10 == 0;) k /= 10; + inf = k != 1; + } + } + + Ctor.external = false; + sd = pr + guard; + num = BigDecimalHelperFunctions.naturalLogarithm(arg, sd); + denominator = isBase10 ? BigDecimalHelperFunctions.getLn10(Ctor, sd + 10) : BigDecimalHelperFunctions.naturalLogarithm(@base, sd); + + // The result will have 5 rounding digits. + r = BigDecimalHelperFunctions.divide(num, denominator, sd, RoundingMode.ROUND_DOWN); + + // If at a rounding boundary, i.e. the result"s rounding digits are [49]9999 or [50]0000, + // calculate 10 further digits. + // + // If the result is known to have an infinite decimal expansion, repeat this until it is clear + // that the result is above or below the boundary. Otherwise, if after calculating the 10 + // further digits, the last 14 are nines, round up and assume the result is exact. + // Also assume the result is exact if the last 14 are zero. + // + // Example of a result that will be incorrectly rounded: + // log[1048576](4503599627370502) = 2.60000000000000009610279511444746... + // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it + // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so + // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal + // place is still 2.6. + if (BigDecimalHelperFunctions.checkRoundingDigits(r.d, k = pr, rm)) { + + do { + sd += 10; + num = BigDecimalHelperFunctions.naturalLogarithm(arg, sd); + denominator = isBase10 ? BigDecimalHelperFunctions.getLn10(Ctor, sd + 10) : BigDecimalHelperFunctions.naturalLogarithm(@base, sd); + r = BigDecimalHelperFunctions.divide(num, denominator, sd, RoundingMode.ROUND_DOWN); + + if (!inf) { + + // Check for 14 nines from the 2nd rounding digit, as the first may be 4. + var sliceToParse = BigDecimalHelperFunctions.digitsToString(r.d).Slice(k + 1, k + 15); + long parsedSlice = string.IsNullOrEmpty(sliceToParse) ? 0 : long.Parse(sliceToParse, CultureInfo.InvariantCulture); + if (parsedSlice + 1 == 1e14) { + r = BigDecimalHelperFunctions.finalise(r, pr + 1, 0); + } + + break; + } + } while (BigDecimalHelperFunctions.checkRoundingDigits(r.d, k += 10, rm)); + } + + Ctor.external = true; + + return BigDecimalHelperFunctions.finalise(r, pr, rm); + } + /// + public BigDecimal Logarithm(BigDecimalArgument @base) => Log(@base); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the value of this BigDecimal minus `y`, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Sub(BigDecimalArgument y) => _sub(new BigDecimal(y, this.Config)); + private BigDecimal _sub(BigDecimal y) { + int[] d, xd, yd; + long i, j, k, e, xe, len, pr; + RoundingMode rm; + bool xLTy; + var x = this; + var Ctor = x.Config; + + // If either is not finite... + if (!x.d.IsTrue() || !y.d.IsTrue()) { + + // Return null if either is null. + if (!x.s.IsTrue() || !y.s.IsTrue()) y = new BigDecimal(double.NaN, Ctor); + + // Return y negated if x is finite and y is ±Infinity. + else if (x.d.IsTrue()) y.s = -y.s; + + // Return x if y is finite and x is ±Infinity. + // Return x if both are ±Infinity with different signs. + // Return null if both are ±Infinity with the same sign. + else + { + if (y.d.IsTrue() || x.s != y.s) + y = new BigDecimal(x, Ctor); + else + y = new BigDecimal(double.NaN, Ctor); + } + + return y; + } + + // If signs differ... + if (x.s != y.s) { + y.s = -y.s; + return x.Plus(y); + } + + xd = x.d; + yd = y.d; + pr = Ctor.Precision; + rm = Ctor.Rounding; + + // If either is zero... + if (!xd[0].IsTrue() || !yd[0].IsTrue()) { + + // Return y negated if x is zero and y is non-zero. + if (yd[0].IsTrue()) y.s = -y.s; + + // Return x if y is zero and x is non-zero. + else if (xd[0].IsTrue()) y = new BigDecimal(x, Ctor); + + // Return zero if both are zero. + // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity. + else return new BigDecimal(rm == RoundingMode.ROUND_FLOOR ? "-0" : "0", Ctor); + + return Ctor.external ? BigDecimalHelperFunctions.finalise(y, pr, rm) : y; + } + + // x and y are finite, non-zero numbers with the same sign. + + // Calculate @base 1e7 exponents. + e = (long)Math.Floor((double)y.e / BigDecimalHelperFunctions.LOG_BASE); + xe = (long)Math.Floor((double)x.e / BigDecimalHelperFunctions.LOG_BASE); + + xd = xd.Slice(); + k = xe - e; + + // If @base 1e7 exponents differ... + if (k.IsTrue()) { + xLTy = k < 0; + + if (xLTy) { + d = xd; + k = -k; + len = yd.LongLength; + } else { + d = yd; + e = xe; + len = xd.LongLength; + } + + // Numbers with massively different exponents would result in a very high number of + // zeros needing to be prepended, but this can be avoided while still ensuring correct + // rounding by limiting the number of zeros to `Math.ceil(pr / BigDecimalFactory.LOG_BASE) + 2`. + i = (long)Math.Max(Math.Ceiling((double)pr / BigDecimalHelperFunctions.LOG_BASE), len) + 2; + + if (k > i) { + k = i; + ArrayExtensions.Resize(ref d, 1); + } + + // Prepend zeros to equalise exponents. + ArrayExtensions.Reverse(ref d); + for (i = k; i--.IsTrue();) ArrayExtensions.Push(ref d, 0); + ArrayExtensions.Reverse(ref d); + + if (xLTy) xd = d; + else yd = d; + + // BigDecimalFactory.BASE 1e7 exponents equal. + } else { + + // Check digits to determine which is the bigger number. + + i = xd.LongLength; + len = yd.LongLength; + xLTy = i < len; + if (xLTy) len = i; + + for (i = 0; i < len; i++) { + if (xd[i] != yd[i]) { + xLTy = xd[i] < yd[i]; + break; + } + } + + k = 0; + } + + if (xLTy) { + d = xd; + xd = yd; + yd = d; + y.s = -y.s; + } + + len = xd.LongLength; + + // Append zeros to `xd` if shorter. + // Don"t add zeros to `yd` if shorter as subtraction only needs to start at `yd` length. + for (i = yd.LongLength - len; i > 0; --i) + { + if (xd.LongLength <= len) ArrayExtensions.Resize(ref xd, len + 1); + xd[len++] = 0; + } + + // Subtract yd from xd. + for (i = yd.LongLength; i > k;) { + + if (xd[--i] < yd[i]) { + for (j = i; j != 0 && xd[--j] == 0;) xd[j] = BigDecimalHelperFunctions.BASE - 1; + --xd[j]; + xd[i] += BigDecimalHelperFunctions.BASE; + } + + xd[i] -= yd[i]; + } + + // Remove trailing zeros. + for (; len > 0 && xd[--len] == 0;) ArrayExtensions.Pop(ref xd); + + // Remove leading zeros and adjust exponent accordingly. + for (; xd.LongLength > 0 && xd[0] == 0; ArrayExtensions.Shift(ref xd)) --e; + + // Zero? + if (xd.LongLength == 0 || !xd[0].IsTrue()) return new BigDecimal(rm == RoundingMode.ROUND_FLOOR ? "-0" : "0", Ctor); + + y.d = xd; + y.e = BigDecimalHelperFunctions.getBase10Exponent(xd, e); + + return Ctor.external ? BigDecimalHelperFunctions.finalise(y, pr, rm) : y; + } + /// + public BigDecimal Minus(BigDecimalArgument y) => Sub(y); + + + /// + /// The result depends on the modulo mode. + /// + /// + /// A new BigDecimal whose value is the value of this BigDecimal modulo `y`, rounded to + /// `precision` significant digits using rounding mode `rounding`. + public BigDecimal Mod(BigDecimalArgument y) => _mod(new BigDecimal(y, this.Config)); + private BigDecimal _mod(BigDecimal y) { + BigDecimal q; + var x = this; + var Ctor = x.Config; + + // Return null if x is ±Infinity or null, or y is null or ±0. + if (!x.d.IsTrue() || !y.s.IsTrue() || y.d.IsTrue() && !y.d[0].IsTrue()) return new BigDecimal(double.NaN, Ctor); + + // Return x if y is ±Infinity or x is ±0. + if (!y.d.IsTrue() || x.d.IsTrue() && !x.d[0].IsTrue()) { + return BigDecimalHelperFunctions.finalise(new BigDecimal(x, Ctor), Ctor.Precision, Ctor.Rounding); + } + + // Prevent rounding of intermediate calculations. + Ctor.external = false; + + if (Ctor.Modulo == 9) { + + // Euclidian division: q = Sign(y) * Floor(x / Abs(y)) + // result = x - q * y where 0 <= result < Abs(y) + q = BigDecimalHelperFunctions.divide(x, y.Abs(), 0, RoundingMode.ROUND_FLOOR, 1); + q.s *= y.s; + } else { + q = BigDecimalHelperFunctions.divide(x, y, 0, (RoundingMode)Ctor.Modulo, 1); + } + + q = q.Times(y); + + Ctor.external = true; + + return x.Minus(q); + } + /// + public BigDecimal Modulo(BigDecimalArgument y) => Mod(y); + + + /// + /// + /// + /// A new BigDecimal whose value is the natural exponential of the value of this BigDecimal, + /// i.e. the base e raised to the power the value of this BigDecimal, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Exp() { + return BigDecimalHelperFunctions.naturalExponential(this); + } + /// + public BigDecimal NaturalExponential() => Exp(); + + + /// + /// + /// + /// A new BigDecimal whose value is the natural logarithm of the value of this BigDecimal, + /// rounded to `precision` significant digits using rounding mode `rounding`. + public BigDecimal Ln() { + return BigDecimalHelperFunctions.naturalLogarithm(this); + } + public BigDecimal NaturalLogarithm() => Ln(); + + + /// + /// + /// + /// a new BigDecimal whose value is the value of this BigDecimal negated, i.e. as if multiplied by + /// -1. + public BigDecimal Neg() { + var x = new BigDecimal(this, this.Config); + x.s = -x.s; + return BigDecimalHelperFunctions.finalise(x); + } + /// + public BigDecimal Negated() => Neg(); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the value of this BigDecimal plus `y`, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Add(BigDecimalArgument y) => _add(new BigDecimal(y, this.Config)); + private BigDecimal _add(BigDecimal y) { + int carry; + long pr, len, i, e, k; + int[] d, xd, yd; + RoundingMode rm; + var x = this; + var Ctor = x.Config; + + // If either is not finite... + if (!x.d.IsTrue() || !y.d.IsTrue()) { + + // Return null if either is null. + if (!x.s.IsTrue() || !y.s.IsTrue()) y = new BigDecimal(double.NaN, Ctor); + + // Return x if y is finite and x is ±Infinity. + // Return x if both are ±Infinity with the same sign. + // Return null if both are ±Infinity with different signs. + // Return y if x is finite and y is ±Infinity. + else if (!x.d.IsTrue()) + { + if (y.d.IsTrue() || x.s == y.s) + y = new BigDecimal(x, Ctor); + else + y = new BigDecimal(double.NaN, Ctor); + } + + return y; + } + + // If signs differ... + if (x.s != y.s) { + y.s = -y.s; + return x.Minus(y); + } + + xd = x.d; + yd = y.d; + pr = Ctor.Precision; + rm = Ctor.Rounding; + + // If either is zero... + if (!xd[0].IsTrue() || !yd[0].IsTrue()) { + + // Return x if y is zero. + // Return y if y is non-zero. + if (!yd[0].IsTrue()) y = new BigDecimal(x, Ctor); + + return Ctor.external ? BigDecimalHelperFunctions.finalise(y, pr, rm) : y; + } + + // x and y are finite, non-zero numbers with the same sign. + + // Calculate @base 1e7 exponents. + k = (long)Math.Floor((double)x.e / BigDecimalHelperFunctions.LOG_BASE); + e = (long)Math.Floor((double)y.e / BigDecimalHelperFunctions.LOG_BASE); + + xd = xd.Slice(); + i = k - e; + + // If @base 1e7 exponents differ... + if (i.IsTrue()) { + bool isXd = false; + + if (i < 0) { + d = xd; + i = -i; + len = yd.LongLength; + isXd = true; + } else { + d = yd; + e = k; + len = xd.LongLength; + } + + // Limit number of zeros prepended to Max(ceil(pr / BigDecimalFactory.LOG_BASE), len) + 1. + k = (long)Math.Ceiling((double)pr / BigDecimalHelperFunctions.LOG_BASE); + len = k > len ? k + 1 : len + 1; + + if (i > len) { + i = len; + ArrayExtensions.Resize(ref d, 1); + } + + // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts. + ArrayExtensions.Reverse(ref d); + for (; i--.IsTrue();) ArrayExtensions.Push(ref d, 0); + ArrayExtensions.Reverse(ref d); + + if (isXd) xd = d; + else yd = d; + } + + len = xd.LongLength; + i = yd.LongLength; + + // If yd is longer than xd, swap xd and yd so xd points to the longer array. + if (len - i < 0) { + i = len; + d = yd; + yd = xd; + xd = d; + } + + // Only start adding at yd.LongLength - 1 as the further digits of xd can be left as they are. + for (carry = 0; i.IsTrue();) { + carry = ((xd[--i] = xd[i] + yd[i] + carry) / BigDecimalHelperFunctions.BASE) | 0; + xd[i] %= BigDecimalHelperFunctions.BASE; + } + + if (carry != 0) { + ArrayExtensions.Unshift(ref xd, carry); + ++e; + } + + // Remove trailing zeros. + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + for (len = xd.LongLength; xd[--len] == 0;) ArrayExtensions.Pop(ref xd); + + y.d = xd; + y.e = BigDecimalHelperFunctions.getBase10Exponent(xd, e); + + return Ctor.external ? BigDecimalHelperFunctions.finalise(y, pr, rm) : y; + } + /// + public BigDecimal Plus(BigDecimalArgument y) => Add(y); + + + /// + /// + /// + /// Whether to count integer-part trailing zeros. + /// The number of significant digits of the value of this BigDecimal. + public long? Sd(bool? z = null) => Sd(z.HasValue && z.Value ? 1 : 0); + /// + public long? Sd(long? z) { + long? k; + var x = this; + + if (z != null && z != 1 && z != 0) throw new BigDecimalException(BigDecimalException.InvalidArgument + z); + + if (x.d.IsTrue()) { + k = BigDecimalHelperFunctions.getPrecision(x.d); + if (z.IsTrue() && x.e + 1 > k) k = x.e + 1; + } else { + k = null; + } + + return k; + } + /// + public long? Precision(bool? z = null) => Sd(z); + /// + public long? Precision(long? z) => Sd(z); + + + /// + /// + /// + /// A new BigDecimal whose value is the value of this BigDecimal rounded to a whole number using + /// rounding mode `rounding`. + public BigDecimal Round() { + var x = this; + var Ctor = x.Config; + + return BigDecimalHelperFunctions.finalise(new BigDecimal(x, Ctor), x.e + 1, Ctor.Rounding); + } + + + /// + /// + /// + /// A new BigDecimal whose value is the sine of the value in radians of this BigDecimal. + public BigDecimal Sin() { + return sin(out _); + } + internal BigDecimal sin(out int quadrant) + { + quadrant = 0; + + long pr; + RoundingMode rm; + var x = this; + var Ctor = x.Config; + + if (!x.IsFinite()) return new BigDecimal(double.NaN, Ctor); + if (x.IsZero()) return new BigDecimal(x, Ctor); + + pr = Ctor.Precision; + rm = Ctor.Rounding; + Ctor.Precision = pr + Math.Max(x.e ?? 0, x.Sd() ?? 0) + BigDecimalHelperFunctions.LOG_BASE; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + + x = BigDecimalHelperFunctions.sine(Ctor, BigDecimalHelperFunctions.toLessThanHalfPi(Ctor, x, out quadrant)); + + Ctor.Precision = pr; + Ctor.Rounding = rm; + + return BigDecimalHelperFunctions.finalise(quadrant > 2 ? x.Neg() : x, pr, rm, true); + } + /// + public BigDecimal Sine() => Sin(); + + + /// + /// + /// + /// A new BigDecimal whose value is the square root of this BigDecimal, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Sqrt() { + bool m = false; + LongString n; + long sd, rep = 0; + BigDecimal r, t; + var x = this; + var d = x.d; + long e = x.e ?? 0; + var Ctor = x.Config; + + // Negative/null/Infinity/zero? + if (x.s != 1 || !d.IsTrue() || !d[0].IsTrue()) { + if (!x.s.IsTrue() || x.s < 0 && (!d.IsTrue() || d[0].IsTrue())) + return new BigDecimal(double.NaN, Ctor); + else if (d.IsTrue()) + return new BigDecimal(x, Ctor); + else + return new BigDecimal(double.PositiveInfinity, Ctor); + } + + double s = (double)x.s; + + Ctor.external = false; + + // Initial estimate. + s = Math.Sqrt(x.ToNumber()); + + // Math.sqrt underflow/overflow? + // Pass x to Math.sqrt as integer, then adjust the exponent of the result. + if (s == 0 || s == double.PositiveInfinity) { + n = BigDecimalHelperFunctions.digitsToString(d); + + if ((n.LongLength + e) % 2 == 0) n += "0"; + s = Math.Sqrt(double.Parse(n, CultureInfo.InvariantCulture)); + e = (long)Math.Floor(((double)e + 1) / 2) - ((e < 0 || e % 2 != 0) ? 1 : 0); + + if (s == double.PositiveInfinity) { + n = "5e" + e; + } else { + n = s.ToExponential(); + n = n.Slice(0, n.IndexOf("e") + 1) + e; + } + + r = new BigDecimal(n.ToString(), Ctor); + } else { + r = new BigDecimal(s.ToString(CultureInfo.InvariantCulture), Ctor); + } + + sd = (e = Ctor.Precision) + 3; + + // Newton-Raphson iteration. + for (; ; ) { + t = r; + r = t.Plus(BigDecimalHelperFunctions.divide(x, t, sd + 2, RoundingMode.ROUND_DOWN)).Times(0.5); + + // TODO? Replace with for-loop and checkRoundingDigits. + if (BigDecimalHelperFunctions.digitsToString(t.d).Slice(0, sd) == (n = BigDecimalHelperFunctions.digitsToString(r.d)).Slice(0, sd)) { + n = n.Slice(sd - 3, sd + 1); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or + // 4999, i.e. approaching a rounding boundary, continue the iteration. + if (n == "9999" || !rep.IsTrue() && n == "4999") { + + // On the first iteration only, check to see if rounding up gives the exact result as the + // nines may infinitely repeat. + if (!rep.IsTrue()) { + BigDecimalHelperFunctions.finalise(t, e + 1, RoundingMode.ROUND_UP); + + if (t.Times(t).Eq(x)) { + r = t; + break; + } + } + + sd += 4; + rep = 1; + } else { + + // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result. + // If not, then there are further digits and m will be truthy. + double doubleN = 0; + double.TryParse(n, NumberStyles.Any, CultureInfo.InvariantCulture, out doubleN); + double doubleN2 = 0; + double.TryParse(n.Slice(1), NumberStyles.Any, CultureInfo.InvariantCulture, out doubleN2); + if (!doubleN.IsTrue() || !doubleN2.IsTrue() && n.ElementAt(0) == '5') { + + // Truncate to the first rounding digit. + BigDecimalHelperFunctions.finalise(r, e + 1, RoundingMode.ROUND_DOWN); + m = !r.Times(r).Eq(x); + } + + break; + } + } + } + + Ctor.external = true; + + return BigDecimalHelperFunctions.finalise(r, e, Ctor.Rounding, m); + } + /// + public BigDecimal SquareRoot() => Sqrt(); + + + /// + /// + /// + /// A new BigDecimal whose value is the tangent of the value in radians of this BigDecimal. + public BigDecimal Tan() { + long pr; + RoundingMode rm; + var x = this; + var Ctor = x.Config; + + if (!x.IsFinite()) return new BigDecimal(double.NaN, Ctor); + if (x.IsZero()) return new BigDecimal(x, Ctor); + + pr = Ctor.Precision; + rm = Ctor.Rounding; + Ctor.Precision = pr + 10; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + + x = x.sin(out var quadrant); + x.s = 1; + x = BigDecimalHelperFunctions.divide(x, new BigDecimal(1, Ctor).Minus(x.Times(x)).Sqrt(), pr + 10, RoundingMode.ROUND_UP); + + Ctor.Precision = pr; + Ctor.Rounding = rm; + + return BigDecimalHelperFunctions.finalise(quadrant == 2 || quadrant == 4 ? x.Neg() : x, pr, rm, true); + } + /// + public BigDecimal Tangent() => Tan(); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is this BigDecimal times `y`, rounded to `precision` significant + /// digits using rounding mode `rounding`. + public BigDecimal Mul(BigDecimalArgument y) => _mul(new BigDecimal(y, this.Config)); + private BigDecimal _mul(BigDecimal y) { + int carry = 0; + long e, i, k, rL, xdL, ydL; + long t; + int[] r; + var x = this; + var Ctor = x.Config; + var xd = x.d; + var yd = y.d; + + y.s *= x.s; + + // If either is null, ±Infinity or ±0... + if (!xd.IsTrue() || !xd[0].IsTrue() || !yd.IsTrue() || !yd[0].IsTrue()) { + if (!y.s.IsTrue() || xd.IsTrue() && !xd[0].IsTrue() && !yd.IsTrue() || yd.IsTrue() && !yd[0].IsTrue() && !xd.IsTrue()) + { + // Return null if either is null. + // Return null if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity. + return new BigDecimal(double.NaN, Ctor); + } + else if (!xd.IsTrue() || !yd.IsTrue()) + { + // Return ±Infinity if either is ±Infinity. + return new BigDecimal((double)y.s / 0, Ctor); + } + else + { + // Return ±0 if either is ±0. + return new BigDecimal(y.s >= 0 ? "+0" : "-0", Ctor); + } + } + + e = (long)Math.Floor((double)x.e / BigDecimalHelperFunctions.LOG_BASE) + (long)Math.Floor((double)y.e / BigDecimalHelperFunctions.LOG_BASE); + xdL = xd.LongLength; + ydL = yd.LongLength; + + // Ensure xd points to the longer array. + if (xdL < ydL) { + r = xd; + xd = yd; + yd = r; + rL = xdL; + xdL = ydL; + ydL = rL; + } + + // Initialise the result array with zeros. + r = new int[0]; + rL = xdL + ydL; + for (i = rL; i--.IsTrue();) ArrayExtensions.Push(ref r, 0); + + // Multiply! + for (i = ydL; --i >= 0;) { + carry = 0; + for (k = xdL + i; k > i;) { + t = r[k] + (long)yd[i] * xd[k - i - 1] + carry; + r[k--] = (int)(t % BigDecimalHelperFunctions.BASE) | 0; + carry = (int)(t / BigDecimalHelperFunctions.BASE) | 0; + } + + r[k] = (int)((r[k] + carry) % BigDecimalHelperFunctions.BASE) | 0; + } + + // Remove trailing zeros. + for (; rL > 0 && !r[--rL].IsTrue();) ArrayExtensions.Pop(ref r); + + if (carry.IsTrue()) ++e; + else ArrayExtensions.Shift(ref r); + + y.d = r; + y.e = BigDecimalHelperFunctions.getBase10Exponent(r, e); + + return Ctor.external ? BigDecimalHelperFunctions.finalise(y, Ctor.Precision, Ctor.Rounding) : y; + } + /// + public BigDecimal Times(BigDecimalArgument y) => Mul(y); + + + /// + /// + /// + /// Significant digits. + /// Rounding mode. + /// A string representing the value of this BigDecimal in base 2, round to `sd` significant + /// digits using rounding mode `rm`.

+ /// If the optional `sd` argument is present then return binary exponential notation.
+ public string ToBinary(long? sd = null, RoundingMode? rm = null) { + return BigDecimalHelperFunctions.toStringBinary(this, 2, sd, rm); + } + + + /// + /// + /// + /// Decimal places. + /// Rounding mode. + /// A new BigDecimal whose value is the value of this BigDecimal rounded to a maximum of `dp` + /// decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.

+ /// If `dp` is omitted, return a new BigDecimal whose value is the value of this Decimal.
+ public BigDecimal ToDP(long? dp = null, RoundingMode? rm = null) { + var x = this; + var Ctor = x.Config; + + x = new BigDecimal(x, Ctor); + if (dp == null) return x; + + BigDecimalHelperFunctions.checkInt32(dp.Value, 0, BigDecimalHelperFunctions.MAX_DIGITS); + + if (rm == null) rm = Ctor.Rounding; + + return BigDecimalHelperFunctions.finalise(x, dp + x.e + 1, rm); + } + /// + public BigDecimal ToDecimalPlaces(long? dp = null, RoundingMode? rm = null) => ToDP(dp, rm); + + + /// + /// + /// + /// Decimal places. + /// Rounding mode. + /// A string representing the value of this BigDecimal in exponential notation rounded to + /// `dp` fixed decimal places using rounding mode `rounding`. + public string ToExponential(long? dp = null, RoundingMode? rm = null) { + LongString str; + var x = this; + var Ctor = x.Config; + + if (dp == null) { + str = BigDecimalHelperFunctions.finiteToString(x, true); + } else { + BigDecimalHelperFunctions.checkInt32(dp.Value, 0, BigDecimalHelperFunctions.MAX_DIGITS); + + if (rm == null) rm = Ctor.Rounding; + + x = BigDecimalHelperFunctions.finalise(new BigDecimal(x, Ctor), dp + 1, rm); + str = BigDecimalHelperFunctions.finiteToString(x, true, dp + 1); + } + + return x.IsNeg() && !x.IsZero() ? "-" + str : str; + } + + + /// + /// + /// + /// Decimal places. + /// Rounding mode. + /// A string representing the value of this BigDecimal in normal (fixed-point) notation to + /// `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is + /// omitted. + public string ToFixed(long? dp = null, RoundingMode? rm = null) { + LongString str; + BigDecimal y; + var x = this; + var Ctor = x.Config; + + if (dp == null) { + str = BigDecimalHelperFunctions.finiteToString(x); + } else { + BigDecimalHelperFunctions.checkInt32(dp.Value, 0, BigDecimalHelperFunctions.MAX_DIGITS); + + if (rm == null) rm = Ctor.Rounding; + + y = BigDecimalHelperFunctions.finalise(new BigDecimal(x, Ctor), dp + x.e + 1, rm); + str = BigDecimalHelperFunctions.finiteToString(y, false, dp + y.e + 1); + } + + // To determine whether to add the minus sign look at the value before it was rounded, + // i.e. look at `x` rather than `y`. + return x.IsNeg() && !x.IsZero() ? "-" + str : str; + } + + + /// + /// The denominator will be a positive non-zero value less than or equal to the specified maximum + /// denominator. If a maximum denominator is not specified, the denominator will be the lowest + /// value necessary to represent the number exactly. + /// + /// Maximum denominator. + /// An array representing the value of this BigDecimal as a simple fraction with a + /// numerator and a denominator. + /// + public BigDecimal[] ToFraction(BigDecimalArgument maxD) + { + BigDecimal d, d1, n, n1, maxDr = null; + long e, k; + var x = this; + var xd = x.d; + var Ctor = x.Config; + + if (!xd.IsTrue()) return new[] { new BigDecimal(x, Ctor) }; + + n1 = new BigDecimal(1, Ctor); + d1 = new BigDecimal(0, Ctor); + + d = new BigDecimal(d1, Ctor); + d.e = BigDecimalHelperFunctions.getPrecision(xd) - x.e - 1; + e = d.e ?? 0; + k = e % BigDecimalHelperFunctions.LOG_BASE; + d.d[0] = (int)Math.Pow(10, k < 0 ? BigDecimalHelperFunctions.LOG_BASE + k : k); + + maxD.Switch( + @double => { + n = new BigDecimal(@double, Ctor); + if (!n.IsInt() || n.Lt(n1)) throw new BigDecimalException(BigDecimalException.InvalidArgument + n); + maxDr = n.Gt(d) ? (e > 0 ? d : n1) : n; + }, + @decimal => { + n = new BigDecimal(@decimal, Ctor); + if (!n.IsInt() || n.Lt(n1)) throw new BigDecimalException(BigDecimalException.InvalidArgument + n); + maxDr = n.Gt(d) ? (e > 0 ? d : n1) : n; + }, + @long => { + n = new BigDecimal(@long, Ctor); + if (!n.IsInt() || n.Lt(n1)) throw new BigDecimalException(BigDecimalException.InvalidArgument + n); + maxDr = n.Gt(d) ? (e > 0 ? d : n1) : n; + }, + @int => { + n = new BigDecimal(@int, Ctor); + if (!n.IsInt() || n.Lt(n1)) throw new BigDecimalException(BigDecimalException.InvalidArgument + n); + maxDr = n.Gt(d) ? (e > 0 ? d : n1) : n; + }, + @string => { + if (string.IsNullOrEmpty(@string)) + { + // d is 10**e, the minimum max-denominator needed. + maxDr = e > 0 ? d : n1; + } + else + { + n = new BigDecimal(@string, Ctor); + if (!n.IsInt() || n.Lt(n1)) throw new BigDecimalException(BigDecimalException.InvalidArgument + n); + maxDr = n.Gt(d) ? (e > 0 ? d : n1) : n; + } + }, + bigInteger => { + n = new BigDecimal(bigInteger, Ctor); + if (!n.IsInt() || n.Lt(n1)) throw new BigDecimalException(BigDecimalException.InvalidArgument + n); + maxDr = n.Gt(d) ? (e > 0 ? d : n1) : n; + }, + bigDecimal => { + if (bigDecimal == null) + { + // d is 10**e, the minimum max-denominator needed. + maxDr = e > 0 ? d : n1; + } + else + { + n = new BigDecimal(bigDecimal, Ctor); + if (!n.IsInt() || n.Lt(n1)) throw new BigDecimalException(BigDecimalException.InvalidArgument + n); + maxDr = n.Gt(d) ? (e > 0 ? d : n1) : n; + } + } + ); + + return _toFraction(maxDr); + } + private BigDecimal[] _toFraction(BigDecimal maxD) { + BigDecimal d, d0, d1, d2, n, n0, n1, q; + long e, k, pr; + BigDecimal[] r; + var x = this; + var xd = x.d; + var Ctor = x.Config; + + if (!xd.IsTrue()) return new[] { new BigDecimal(x, Ctor) }; + + n1 = d0 = new BigDecimal(1, Ctor); + d1 = n0 = new BigDecimal(0, Ctor); + + d = new BigDecimal(d1, Ctor); + d.e = BigDecimalHelperFunctions.getPrecision(xd) - x.e - 1; + e = d.e ?? 0; + k = e % BigDecimalHelperFunctions.LOG_BASE; + d.d[0] = (int)Math.Pow(10, k < 0 ? BigDecimalHelperFunctions.LOG_BASE + k : k); + + Ctor.external = false; + n = new BigDecimal(BigDecimalHelperFunctions.digitsToString(xd).ToString(), Ctor); + pr = Ctor.Precision; + Ctor.Precision = e = xd.LongLength * BigDecimalHelperFunctions.LOG_BASE * 2; + + for (; ; ) { + q = BigDecimalHelperFunctions.divide(n, d, 0, RoundingMode.ROUND_DOWN, 1); + d2 = d0.Plus(q.Times(d1)); + if (d2.Cmp(maxD) == 1) break; + d0 = d1; + d1 = d2; + d2 = n1; + n1 = n0.Plus(q.Times(d2)); + n0 = d2; + d2 = d; + d = n.Minus(q.Times(d2)); + n = d2; + } + + d2 = BigDecimalHelperFunctions.divide(maxD.Minus(d0), d1, 0, RoundingMode.ROUND_DOWN, 1); + n0 = n0.Plus(d2.Times(n1)); + d0 = d0.Plus(d2.Times(d1)); + n0.s = n1.s = x.s; + + // Determine which fraction is closer to x, n0/d0 or n1/d1? + r = BigDecimalHelperFunctions.divide(n1, d1, e, RoundingMode.ROUND_DOWN).Minus(x).Abs().Cmp(BigDecimalHelperFunctions.divide(n0, d0, e, RoundingMode.ROUND_DOWN).Minus(x).Abs()) < 1 + ? new[] { n1, d1 } : new[] { n0, d0 }; + + Ctor.Precision = pr; + Ctor.external = true; + + return r; + } + + + /// + /// + /// + /// Significant digits. + /// Rounding mode. + /// A string representing the value of this BigDecimal in base 16, round to `sd` significant + /// digits using rounding mode `rm`.

+ /// If the optional `sd` argument is present then return binary exponential notation.
+ public string ToHex(long? sd = null, RoundingMode? rm = null) { + return BigDecimalHelperFunctions.toStringBinary(this, 16, sd, rm); + } + /// + public string ToHexadecimal(long? sd = null, RoundingMode? rm = null) => ToHex(sd, rm); + + + /// + /// The return value will always have the same sign as this BigDecimal, unless either this BigDecimal + /// or `y` is null, in which case the return value will be also be null.

+ /// The return value is not affected by the value of `precision`. + ///
+ /// The magnitude to round to a multiple of. Default = 1. + /// Rounding mode. + /// A new BigDecimal whose value is the nearest multiple of `y` in the direction of rounding + /// mode `rm`, or `BigDecimal.Config.Rounding` if `rm` is omitted, to the value of this BigDecimal. + public BigDecimal ToNearest(BigDecimalArgument y, RoundingMode? rm = null) + { + return y.Match( + @double => _toNearest(new BigDecimal(@double, this.Config), rm), + @decimal => _toNearest(new BigDecimal(@decimal, this.Config), rm), + @long => _toNearest(new BigDecimal(@long, this.Config), rm), + @int => _toNearest(new BigDecimal(@int, this.Config), rm), + @string => + { + if (string.IsNullOrEmpty(@string)) return _toNearest(new BigDecimal(1, this.Config), this.Config.Rounding); + return _toNearest(new BigDecimal(@string, this.Config), rm); + }, + bigInteger => _toNearest(new BigDecimal(bigInteger, this.Config), rm), + bigDecimal => { + if (bigDecimal == null) return _toNearest(new BigDecimal(1, this.Config), this.Config.Rounding); + return _toNearest(new BigDecimal(bigDecimal, this.Config), rm); + } + ); + } + private BigDecimal _toNearest(BigDecimal y, RoundingMode? rm = null) { + var x = this; + var Ctor = x.Config; + + x = new BigDecimal(x, Ctor); + + if (rm == null) { + rm = Ctor.Rounding; + } + + // If x is not finite, return x if y is not null, else null. + if (!x.d.IsTrue()) return y.s.IsTrue() ? x : y; + + // If y is not finite, return Infinity with the sign of x if y is Infinity, else null. + if (!y.d.IsTrue()) { + if (y.s.IsTrue()) y.s = x.s; + return y; + } + + // If y is not zero, calculate the nearest multiple of y to x. + if (y.d[0].IsTrue()) { + Ctor.external = false; + x = BigDecimalHelperFunctions.divide(x, y, 0, rm, 1).Times(y); + Ctor.external = true; + BigDecimalHelperFunctions.finalise(x); + + // If y is zero, return zero with the sign of x. + } else { + y.s = x.s; + x = y; + } + + return x; + } + + + /// + /// Zero is not keep its sign. (C# has not -0) + /// + /// The value of this BigDecimal converted to a number primitive. + public double ToNumber() { + var n = double.Parse(this.ToString(), CultureInfo.InvariantCulture); + return n; + } + + + /// + /// + /// + /// Significant digits. + /// Rounding mode. + /// A string representing the value of this BigDecimal in base 8, round to `sd` significant + /// digits using rounding mode `rm`.

+ /// If the optional `sd` argument is present then return binary exponential notation.
+ public string ToOctal(long? sd = null, RoundingMode? rm = null) { + return BigDecimalHelperFunctions.toStringBinary(this, 8, sd, rm); + } + + + /// + /// For non-integer or very large exponents Pow(x, y) is calculated using

+ /// x^y = Exp(y * ln(x))

+ /// Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the + /// probability of an incorrectly rounded result

+ /// P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14
+ /// i.e. 1 in 250,000,000,000,000

+ /// If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place). + ///
+ /// The power to which to raise this BigDecimal. + /// A new BigDecimal whose value is the value of this BigDecimal raised to the power `y`, rounded + /// to `precision` significant digits using rounding mode `rounding`. + public BigDecimal Pow(BigDecimalArgument y) => _pow(new BigDecimal(y, this.Config)); + private BigDecimal _pow(BigDecimal y) { + long e, k, pr; + BigDecimal r; + RoundingMode rm; + int s; + var x = this; + var Ctor = x.Config; + var yn = y.ToNumber(); + + var xn = x.ToNumber(); + int? sign = xn == 0 && Math.Abs(yn) % 2 == 1 ? x.s : null; + // Either ±Infinity, null or ±0? + if (!x.d.IsTrue() || !y.d.IsTrue() || !x.d[0].IsTrue() || !y.d[0].IsTrue()) return new BigDecimal((sign.HasValue ? sign.Value : 1) * Math.Pow(xn, yn), Ctor); + + x = new BigDecimal(x, Ctor); + + if (x.Eq(1)) return x; + + pr = Ctor.Precision; + rm = Ctor.Rounding; + + if (y.Eq(1)) return BigDecimalHelperFunctions.finalise(x, pr, rm); + + // y exponent + e = (long)Math.Floor((double)y.e / BigDecimalHelperFunctions.LOG_BASE); + + //BigInteger + var k0 = double.IsInfinity(yn) ? BigDecimalHelperFunctions.MAX_SAFE_INTEGER + 1 : new BigInteger(yn); + k0 = (k0 < 0 ? -k0 : k0); + // If y is a small integer use the "exponentiation by squaring" algorithm. + if (e >= y.d.LongLength - 1 && k0 <= BigDecimalHelperFunctions.MAX_SAFE_INTEGER) { + r = BigDecimalHelperFunctions.intPow(Ctor, x, (long)k0, pr); + return y.s < 0 ? new BigDecimal(1, Ctor).Div(r) : BigDecimalHelperFunctions.finalise(r, pr, rm); + } + + s = x.s ?? 0; + + // if x is negative + if (s < 0) { + + // if y is not an integer + if (e < y.d.LongLength - 1) return new BigDecimal(double.NaN, Ctor); + + // Result is positive if x is negative and the last digit of integer y is even. + if (y.d.LongLength <= e || (y.d[e] & 1) == 0) s = 1; + + // if x.eq(-1) + if (x.e == 0 && x.d[0] == 1 && x.d.LongLength == 1) { + x.s = s; + return x; + } + } + + // Estimate result exponent. + // x^y = 10^e, where e = y * Log10(x) + // Log10(x) = Log10(x_significand) + x_exponent + // Log10(x_significand) = Ln(x_significand) / Ln(10) + var kd = Math.Pow(x.ToNumber(), yn); + e = kd == 0 || !double.IsFinite(kd) + ? (long)Math.Floor(yn * (Math.Log(double.Parse("0." + BigDecimalHelperFunctions.digitsToString(x.d), CultureInfo.InvariantCulture)) / BigDecimalHelperFunctions.LN10d + (x.e ?? 0) + 1)) + : new BigDecimal(kd.ToString(CultureInfo.InvariantCulture), Ctor).e ?? 0; + + // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1. + + // Overflow/underflow? + if (e > Ctor.MaxE + 1 || e < Ctor.MinE - 1) return new BigDecimal(e > 0 ? (double)s / 0 : 0, Ctor); + + Ctor.external = false; + x.s = 1; + Ctor.Rounding = RoundingMode.ROUND_DOWN; + + // Estimate the extra guard digits needed to ensure five correct rounding digits from + // naturalLogarithm(x). Example of failure without these extra digits (precision: 10): + // new Decimal(2.32456).pow("2087987436534566.46411") + // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815 + k = Math.Min(12, e.ToString(CultureInfo.InvariantCulture).Length); + + // r = x^y = Exp(y*ln(x)) + r = BigDecimalHelperFunctions.naturalExponential(y.Times(BigDecimalHelperFunctions.naturalLogarithm(x, pr + k)), pr); + + // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40) + if (r.d.IsTrue()) { + + // Truncate to the required precision plus five rounding digits. + r = BigDecimalHelperFunctions.finalise(r, pr + 5, RoundingMode.ROUND_DOWN); + + // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate + // the result. + if (BigDecimalHelperFunctions.checkRoundingDigits(r.d, pr, rm)) { + e = pr + 10; + + // Truncate to the increased precision plus five rounding digits. + r = BigDecimalHelperFunctions.finalise(BigDecimalHelperFunctions.naturalExponential(y.Times(BigDecimalHelperFunctions.naturalLogarithm(x, e + k)), e), e + 5, RoundingMode.ROUND_DOWN); + + // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9). + var sliceToParse = BigDecimalHelperFunctions.digitsToString(r.d).Slice(pr + 1, pr + 15); + long parsedSlice = string.IsNullOrEmpty(sliceToParse) ? 0 : long.Parse(sliceToParse, CultureInfo.InvariantCulture); + if (parsedSlice + 1 == 1e14) { + r = BigDecimalHelperFunctions.finalise(r, pr + 1, RoundingMode.ROUND_UP); + } + } + } + + r.s = s; + Ctor.external = true; + Ctor.Rounding = rm; + + return BigDecimalHelperFunctions.finalise(r, pr, rm); + } + /// + public BigDecimal ToPower(BigDecimalArgument y) => Pow(y); + + + /// + /// + /// + /// Significant digits. + /// Rounding mode. + /// A string representing the value of this BigDecimal rounded to `sd` significant digits + /// using rounding mode `rounding`.

+ /// Exponential notation if `sd` is less than the number of digits necessary to represent + /// the integer part of the value in normal notation.
+ public string ToPrecision(long? sd = null, RoundingMode? rm = null) { + LongString str; + var x = this; + var Ctor = x.Config; + + if (sd == null) { + str = BigDecimalHelperFunctions.finiteToString(x, x.e <= Ctor.ToExpNeg || x.e >= Ctor.ToExpPos); + } else { + BigDecimalHelperFunctions.checkInt32(sd.Value, 1, BigDecimalHelperFunctions.MAX_DIGITS); + + if (rm == null) rm = Ctor.Rounding; + + x = BigDecimalHelperFunctions.finalise(new BigDecimal(x, Ctor), sd, rm); + str = BigDecimalHelperFunctions.finiteToString(x, sd <= x.e || x.e <= Ctor.ToExpNeg, sd); + } + + return x.IsNeg() && !x.IsZero() ? "-" + str : str; + } + + + /// + /// + /// + /// Significant digits. + /// Rounding mode. + /// A new BigDecimal whose value is the value of this BigDecimal rounded to a maximum of `sd` + /// significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if + /// omitted. + public BigDecimal ToSD(long? sd = null, RoundingMode? rm = null) { + var x = this; + var Ctor = x.Config; + + if (sd == null) { + sd = Ctor.Precision; + rm = Ctor.Rounding; + } else { + BigDecimalHelperFunctions.checkInt32(sd.Value, 1, BigDecimalHelperFunctions.MAX_DIGITS); + + if (rm == null) rm = Ctor.Rounding; + } + + return BigDecimalHelperFunctions.finalise(new BigDecimal(x, Ctor), sd, rm); + } + /// + public BigDecimal ToSignificantDigits(long? sd = null, RoundingMode? rm = null) => ToSD(sd, rm); + + + /// + /// + /// + /// A string representing the value of this BigDecimal.

+ /// Exponential notation if this BigDecimal has a positive exponent equal to or greater than + /// `ToExpPos`, or a negative exponent equal to or less than `ToExpNeg`.
+ public override string ToString() { + var x = this; + var Ctor = x.Config; + var str = BigDecimalHelperFunctions.finiteToString(x, x.e <= Ctor.ToExpNeg || x.e >= Ctor.ToExpPos); + + return x.IsNeg() && !x.IsZero() ? "-" + str : str; + } + + + /// + /// + /// + /// A new BigDecimal whose value is the value of this BigDecimal truncated to a whole number. + public BigDecimal Trunc() { + return BigDecimalHelperFunctions.finalise(new BigDecimal(this, this.Config), this.e + 1, RoundingMode.ROUND_DOWN); + } + /// + public BigDecimal Truncated() => Trunc(); + + + /// + /// Unlike `ToString`, negative zero will include the minus sign. + /// + /// A string representing the value of this BigDecimal. + public string ToJSON() { + var x = this; + var Ctor = x.Config; + var str = BigDecimalHelperFunctions.finiteToString(x, x.e <= Ctor.ToExpNeg || x.e >= Ctor.ToExpPos); + + return x.IsNeg() ? "-" + str : str; + } + /// + public string ValueOf() => ToJSON(); + + + /// + /// + /// + /// + /// True if object is a BigDecimal instance, otherwise false. + public static bool IsDecimalInstance(object obj) + { + return obj is BigDecimal; + } + + + /// + /// + /// + /// A new BigDecimal whose value and Config have been cloned. + public BigDecimal Clone() + { + return new BigDecimal(this, this.Config.Clone()); + } + } +} \ No newline at end of file diff --git a/DecimalSharp/BigDecimalConfig.cs b/DecimalSharp/BigDecimalConfig.cs new file mode 100644 index 0000000..25550da --- /dev/null +++ b/DecimalSharp/BigDecimalConfig.cs @@ -0,0 +1,128 @@ +using DecimalSharp.Core; + +namespace DecimalSharp +{ + public class BigDecimalConfig + { + // 1 to MAX_DIGITS + private long _precision = 20; + /// + /// The maximum number of significant digits of the result of a calculation or base conversion. + /// + public long Precision { + get { return _precision; } + set { + if (value < 1 || value > BigDecimalHelperFunctions.MAX_DIGITS) + throw new BigDecimalException(BigDecimalException.InvalidArgument + nameof(Precision) + ": " + value); + _precision = value; + } + } + + /// + /// The rounding mode used when rounding to `precision`. + /// + public RoundingMode Rounding { get; set; } = RoundingMode.ROUND_HALF_UP; + + // 0 to 9 + private int _modulo = 1; + /// + /// The modulo mode used when calculating the modulus: a mod n.
+ /// The quotient (q = a / n) is calculated according to the corresponding rounding mode.
+ /// The remainder (r) is calculated as: r = a - n * q.
+ ///
+ /// UP 0 The remainder is positive if the dividend is negative, else is negative.
+ /// DOWN 1 The remainder has the same sign as the dividend (JavaScript %).
+ /// FLOOR 3 The remainder has the same sign as the divisor (Python %).
+ /// HALF_EVEN 6 The IEEE 754 remainder function.
+ /// EUCLID 9 Euclidian division. q = Sign(n) * Floor(a / Abs(n)). Always positive.
+ ///
+ /// Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian
+ /// division (9) are commonly used for the modulus operation. The other rounding modes can also
+ /// be used, but they may not give useful results.
+ ///
+ public int Modulo { + get { return _modulo; } + set { + if (value < 0 || value > 9) + throw new BigDecimalException(BigDecimalException.InvalidArgument + nameof(Modulo) + ": " + value); + _modulo = value; + } + } + + // 0 to -EXP_LIMIT + private long _toExpNeg = -7; + /// + /// The exponent value at and beneath which `ToString` returns exponential notation. + /// + public long ToExpNeg { + get { return _toExpNeg; } + set { + if (value < -BigDecimalHelperFunctions.EXP_LIMIT || value > 0) + throw new BigDecimalException(BigDecimalException.InvalidArgument + nameof(ToExpNeg) + ": " + value); + _toExpNeg = value; + } + } + + // 0 to EXP_LIMIT + private long _toExpPos = 21; + /// + /// The exponent value at and above which `ToString` returns exponential notation. + /// + public long ToExpPos { + get { return _toExpPos; } + set { + if (value < 0 || value > BigDecimalHelperFunctions.EXP_LIMIT) + throw new BigDecimalException(BigDecimalException.InvalidArgument + nameof(ToExpPos) + ": " + value); + _toExpPos = value; + } + } + + // -1 to -EXP_LIMIT + private long _minE = -BigDecimalHelperFunctions.EXP_LIMIT; + public long MinE { + get { return _minE; } + set { + if (value < -BigDecimalHelperFunctions.EXP_LIMIT || value > 0) + throw new BigDecimalException(BigDecimalException.InvalidArgument + nameof(MinE) + ": " + value); + _minE = value; + } + } + + // 1 to EXP_LIMIT + private long _maxE = BigDecimalHelperFunctions.EXP_LIMIT; + /// + /// The maximum exponent value, above which overflow to Infinity occurs. + /// + public long MaxE { + get { return _maxE; } + set { + if (value < 0 || value > BigDecimalHelperFunctions.EXP_LIMIT) + throw new BigDecimalException(BigDecimalException.InvalidArgument + nameof(MaxE) + ": " + value); + _maxE = value; + } + } + + /// + /// Whether to use cryptographically-secure random number generation. + /// + public bool Crypto { get; set; } = false; + + internal bool external = true; + + public BigDecimalConfig Clone() + { + return new BigDecimalConfig + { + Precision = Precision, + Rounding = Rounding, + Modulo = Modulo, + ToExpNeg = ToExpNeg, + ToExpPos = ToExpPos, + MinE = MinE, + MaxE = MaxE, + Crypto = Crypto, + external = external + }; + } + } +} diff --git a/DecimalSharp/BigDecimalDivision.cs b/DecimalSharp/BigDecimalDivision.cs new file mode 100644 index 0000000..9f1cb3c --- /dev/null +++ b/DecimalSharp/BigDecimalDivision.cs @@ -0,0 +1,268 @@ +using DecimalSharp.Core; +using DecimalSharp.Core.Extensions; + +namespace DecimalSharp +{ + internal class BigDecimalDivision : BigDecimalDivisionFunctions + { + public static BigDecimal Divide(BigDecimal x, BigDecimal y, long? pr, RoundingMode? rm, long? dp, int? @base, out bool inexact) + { + inexact = false; + + long cmp, e, i, k, logBase, prodL, remL, sd, xi, xL, yd0, yL; + long rem0; + double t; + bool more; + BigDecimal q; + int[] qd, prod, rem, yz; + var Ctor = x.Config; + var sign = x.s == y.s ? 1 : -1; + var xd = x.d; + var yd = y.d; + + // Either null, Infinity or 0? + if (!xd.IsTrue() || !xd[0].IsTrue() || !yd.IsTrue() || !yd[0].IsTrue()) + { + if (!x.s.IsTrue() || !y.s.IsTrue() || (xd.IsTrue() ? (yd.IsTrue() && xd[0] == yd[0]) : !yd.IsTrue())) + return new BigDecimal(double.NaN, Ctor); + else if (xd.IsTrue() && xd[0] == 0 || !yd.IsTrue()) + return new BigDecimal(sign >= 0 ? "+0" : "-0", Ctor); + else + return new BigDecimal((double)sign / 0, Ctor); + } + + if (@base.IsTrue()) + { + logBase = 1; + e = (x.e ?? 0) - (y.e ?? 0); + } + else + { + @base = BigDecimalHelperFunctions.BASE; + logBase = BigDecimalHelperFunctions.LOG_BASE; + e = (long)Math.Floor((double)x.e / logBase) - (long)Math.Floor((double)y.e / logBase); + } + + yL = yd.LongLength; + xL = xd.LongLength; + q = new BigDecimal(sign, Ctor); + qd = q.d = new int[0]; + + // Result exponent may be one less than e. + // The digit array of a Decimal from toStringBinary may have trailing zeros. + for (i = 0; i < yd.LongLength && yd[i] == (i < xd.LongLength ? xd[i] : 0); i++) ; + + if (i < yd.LongLength && yd[i] > (i < xd.LongLength ? xd[i] : 0)) e--; + + if (pr == null) + { + pr = Ctor.Precision; + sd = pr.Value; + rm = Ctor.Rounding; + } + else if (dp.IsTrue()) + { + sd = pr.Value + ((x.e ?? 0) - (y.e ?? 0)) + 1; + } + else + { + sd = pr.Value; + } + + if (sd < 0) + { + ArrayExtensions.Push(ref qd, 1); + more = true; + } + else + { + + // Convert precision in number of @base 10 digits to @base 1e7 digits. + sd = sd / logBase + 2 | 0; + i = 0; + + // divisor < 1e7 + if (yL == 1) + { + k = 0; + yd0 = yd[0]; + sd++; + + // k is the carry. + for (; (i < xL || k.IsTrue()) && sd--.IsTrue(); i++) + { + t = (long)k * @base.Value + (xd.LongLength > i ? xd[i] : 0); + if (qd.LongLength <= i) ArrayExtensions.Resize(ref qd, i + 1); + qd[i] = (int)(t / yd0) | 0; + k = (long)(t % yd0) | 0; + } + + more = k.IsTrue() || i < xL; + + // divisor >= 1e7 + } + else + { + // Normalise xd and yd so highest order digit of yd is >= @base/2 + k = @base.Value / (yd[0] + 1) | 0; + + if (k > 1) + { + yd = multiplyInteger(yd, k, @base.Value); + xd = multiplyInteger(xd, k, @base.Value); + yL = yd.LongLength; + xL = xd.LongLength; + } + + xi = yL; + rem = xd.Slice(0, yL); + remL = rem.LongLength; + + // Add zeros to make remainder as long as divisor. + for (; remL < yL;) + { + if (rem.LongLength <= remL) ArrayExtensions.Resize(ref rem, remL + 1); + rem[remL++] = 0; + } + + yz = yd.Slice(); + ArrayExtensions.Unshift(ref yz, 0); + yd0 = yd[0]; + + if (yd[1] >= @base.Value / 2) ++yd0; + + do + { + k = 0; + + // Compare divisor and remainder. + cmp = compare(yd, rem, yL, remL); + + // If divisor < remainder. + if (cmp < 0) + { + + // Calculate trial digit, k. + rem0 = rem[0]; + if (yL != remL) rem0 = rem0 * @base.Value + (rem.LongLength > 1 ? rem[1] : 0); + + // k will be how many times the divisor goes into the current remainder. + k = (long)(rem0 / yd0) | 0; + + // Algorithm: + // 1. product = divisor * trial digit (k) + // 2. if product > remainder: product -= divisor, k-- + // 3. remainder -= product + // 4. if product was < remainder at 2: + // 5. compare new remainder and divisor + // 6. If remainder > divisor: remainder -= divisor, k++ + + if (k > 1) + { + if (k >= @base.Value) k = @base.Value - 1; + + // product = divisor * trial digit. + prod = multiplyInteger(yd, k, @base.Value); + prodL = prod.LongLength; + remL = rem.LongLength; + + // Compare product and remainder. + cmp = compare(prod, rem, prodL, remL); + + // product > remainder. + if (cmp == 1) + { + k--; + + // Subtract divisor from product. + subtract(ref prod, yL < prodL ? yz : yd, prodL, @base.Value); + } + } + else + { + + // cmp is -1. + // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1 + // to avoid it. If k is 1 there is a need to compare yd and rem again below. + if (k == 0) cmp = k = 1; + prod = yd.Slice(); + } + + prodL = prod.LongLength; + if (prodL < remL) ArrayExtensions.Unshift(ref prod, 0); + + // Subtract product from remainder. + subtract(ref rem, prod, remL, @base.Value); + + // If product was < previous remainder. + if (cmp == -1) + { + remL = rem.LongLength; + + // Compare divisor and new remainder. + cmp = compare(yd, rem, yL, remL); + + // If divisor < new remainder, subtract divisor from remainder. + if (cmp < 1) + { + k++; + + // Subtract divisor from remainder. + subtract(ref rem, yL < remL ? yz : yd, remL, @base.Value); + } + } + + remL = rem.LongLength; + } + else if (cmp == 0) + { + k++; + rem = new[] { 0 }; + } // if cmp == 1, k will be 0 + + // Add the next digit, k, to the result array. + if (qd.LongLength <= i) ArrayExtensions.Resize(ref qd, i + 1); + qd[i++] = (int)k; + + // Update the remainder. + if (cmp.IsTrue() && rem[0].IsTrue()) + { + if (rem.LongLength <= remL) ArrayExtensions.Resize(ref rem, remL + 1); + rem[remL++] = xd.LongLength > xi ? xd[xi] : 0; + } + else + { + rem = xd.LongLength > xi ? new[] { xd[xi] } : new int[0]; + remL = 1; + } + + } while ((xi++ < xL || rem.LongLength > 0) && sd--.IsTrue()); + + more = rem.LongLength > 0; + } + + // Leading zero? + if (!qd[0].IsTrue()) ArrayExtensions.Shift(ref qd); + } + + q.d = qd; + + // logBase is 1 when divide is being used for @base conversion. + if (logBase == 1) + { + q.e = e; + inexact = more; + } + else + { + // To calculate q.e, first get the number of digits of qd[0]. + for (i = 1, k = qd.LongLength > 0 ? qd[0] : 0; k >= 10; k /= 10) i++; + q.e = i + e * logBase - 1; + + BigDecimalHelperFunctions.finalise(q, dp.IsTrue() ? pr + q.e + 1 : pr, rm, more); + } + + return q; + } + } +} diff --git a/DecimalSharp/BigDecimalFactory.cs b/DecimalSharp/BigDecimalFactory.cs new file mode 100644 index 0000000..9f29807 --- /dev/null +++ b/DecimalSharp/BigDecimalFactory.cs @@ -0,0 +1,692 @@ +using DecimalSharp.Core; +using DecimalSharp.Core.Extensions; +using System.Numerics; +using System.Security.Cryptography; + +namespace DecimalSharp +{ + public class BigDecimalFactory + { + public BigDecimalConfig Config { get; set; } + + public BigDecimalFactory(BigDecimalConfig? config = null) + { + this.Config = config ?? new BigDecimalConfig(); + } + + public BigDecimal BigDecimal(BigDecimalArgument v) + { + return new BigDecimal(v, this.Config); + } + + // BigDecimalFactory methods + + + /* + * abs + * acos + * acosh + * add + * asin + * asinh + * atan + * atanh + * atan2 + * cbrt + * ceil + * clamp + * clone + * cos + * cosh + * div + * exp + * floor + * hypot + * ln + * log + * log2 + * log10 + * max + * min + * mod + * mul + * pow + * random + * round + * set + * sign + * sin + * sinh + * sqrt + * sub + * sum + * tan + * tanh + * trunc + */ + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the absolute value of `x`. + public BigDecimal Abs(BigDecimalArgument x) => BigDecimal(x).Abs(); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the arccosine in radians of `x`. + public BigDecimal Acos(BigDecimalArgument x) => BigDecimal(x).Acos(); + + + /// + /// + /// + /// A value in radians. + /// A new BigDecimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to + /// `precision` significant digits using rounding mode `rounding`. + public BigDecimal Acosh(BigDecimalArgument x) => BigDecimal(x).Acosh(); + + + /// + /// + /// + /// + /// + /// A new BigDecimal whose value is the sum of `x` and `y`, rounded to `precision` significant + /// digits using rounding mode `rounding`. + public BigDecimal Add(BigDecimalArgument x, BigDecimalArgument y) => BigDecimal(x).Plus(y); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the arcsine in radians of `x`, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Asin(BigDecimalArgument x) => BigDecimal(x).Asin(); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the inverse of the hyperbolic sine of `x`, rounded to + /// `precision` significant digits using rounding mode `rounding`. + public BigDecimal Asinh(BigDecimalArgument x) => BigDecimal(x).Asinh(); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the arctangent in radians of `x`, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Atan(BigDecimalArgument x) => BigDecimal(x).Atan(); + + + /// + /// + /// + /// A value in radians. + /// A new BigDecimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to + /// `precision` significant digits using rounding mode `rounding`. + public BigDecimal Atanh(BigDecimalArgument x) => BigDecimal(x).Atanh(); + + + /// + /// + /// + /// The y-coordinate. + /// The x-coordinate. + /// A new BigDecimal whose value is the arctangent in radians of `y/x` in the range -pi to pi + /// (inclusive), rounded to `precision` significant digits using rounding mode `rounding`. + public BigDecimal Atan2(BigDecimalArgument y, BigDecimalArgument x) => _atan2(BigDecimal(y), BigDecimal(x)); + private BigDecimal _atan2(BigDecimal y, BigDecimal x) + { + BigDecimal r; + var pr = this.Config.Precision; + var rm = this.Config.Rounding; + var wpr = pr + 4; + + // Either null + if (!y.s.IsTrue() || !x.s.IsTrue()) + { + r = BigDecimal(double.NaN); + + // Both ±Infinity + } + else if (!y.d.IsTrue() && !x.d.IsTrue()) + { + r = BigDecimalHelperFunctions.getPi(this.Config, wpr, RoundingMode.ROUND_DOWN).Times(x.s > 0 ? 0.25 : 0.75); + r.s = y.s; + + // x is ±Infinity or y is ±0 + } + else if (!x.d.IsTrue() || y.IsZero()) + { + r = x.s < 0 ? BigDecimalHelperFunctions.getPi(this.Config, pr, rm) : BigDecimal(0); + r.s = y.s; + + // y is ±Infinity or x is ±0 + } + else if (!y.d.IsTrue() || x.IsZero()) + { + r = BigDecimalHelperFunctions.getPi(this.Config, wpr, RoundingMode.ROUND_DOWN).Times(0.5); + r.s = y.s; + + // Both non-zero and finite + } + else if (x.s < 0) + { + this.Config.Precision = wpr; + this.Config.Rounding = RoundingMode.ROUND_DOWN; + r = this.Atan(BigDecimalHelperFunctions.divide(y, x, wpr, RoundingMode.ROUND_DOWN)); + x = BigDecimalHelperFunctions.getPi(this.Config, wpr, RoundingMode.ROUND_DOWN); + this.Config.Precision = pr; + this.Config.Rounding = rm; + r = y.s < 0 ? r.Minus(x) : r.Plus(x); + } + else + { + r = this.Atan(BigDecimalHelperFunctions.divide(y, x, wpr, RoundingMode.ROUND_DOWN)); + } + + return r; + } + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the cube root of `x`, rounded to `precision` significant + /// digits using rounding mode `rounding`. + public BigDecimal Cbrt(BigDecimalArgument x) => BigDecimal(x).Cbrt(); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is `x` rounded to an integer using `ROUND_CEIL`. + public BigDecimal Ceil(BigDecimalArgument x) => _ceil(BigDecimal(x)); + private BigDecimal _ceil(BigDecimal x) + { + return BigDecimalHelperFunctions.finalise(x, x.e + 1, RoundingMode.ROUND_CEIL); + } + + + /// + /// + /// + /// + /// + /// + /// A new BigDecimal whose value is `x` clamped to the range delineated by `min` and `max`. + public BigDecimal Clamp(BigDecimalArgument x, BigDecimalArgument min, BigDecimalArgument max) => BigDecimal(x).Clamp(min, max); + + + /// + /// + /// + /// A value in radians. + /// A new BigDecimal whose value is the cosine of `x`, rounded to `precision` significant + /// digits using rounding mode `rounding`. + public BigDecimal Cos(BigDecimalArgument x) => BigDecimal(x).Cos(); + + + /// + /// + /// + /// A value in radians. + /// A new BigDecimal whose value is the hyperbolic cosine of `x`, rounded to precision + /// significant digits using rounding mode `rounding`. + public BigDecimal Cosh(BigDecimalArgument x) => BigDecimal(x).Cosh(); + + + /// + /// + /// + /// A new BigDecimalFactory with the same configuration properties as this BigDecimalFactory. + public BigDecimalFactory Clone() + { + return new BigDecimalFactory(this.Config.Clone()); + } + + + /// + /// + /// + /// + /// + /// A new BigDecimal whose value is `x` divided by `y`, rounded to `precision` significant + /// digits using rounding mode `rounding`. + public BigDecimal Div(BigDecimalArgument x, BigDecimalArgument y) => BigDecimal(x).Div(y); + + + /// + /// + /// + /// The power to which to raise the base of the natural log. + /// A new BigDecimal whose value is the natural exponential of `x`, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Exp(BigDecimalArgument x) => BigDecimal(x).Exp(); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is `x` round to an integer using `ROUND_FLOOR`. + public BigDecimal Floor(BigDecimalArgument x) => _floor(BigDecimal(x)); + private BigDecimal _floor(BigDecimal x) + { + return BigDecimalHelperFunctions.finalise(x, x.e + 1, RoundingMode.ROUND_FLOOR); + } + + + /// + /// Hypot(a, b, ...) = Sqrt(a^2 + b^2 + ...) + /// + /// + /// A new BigDecimal whose value is the square root of the sum of the squares of the arguments, + /// rounded to `precision` significant digits using rounding mode `rounding`. + public BigDecimal Hypot(params BigDecimalArgument[] args) => _hypot(args.Select(arg => BigDecimal(arg)).ToArray()); + private BigDecimal _hypot(params BigDecimal[] args) + { + long i; + BigDecimal n, t = BigDecimal(0); + + this.Config.external = false; + + for (i = 0; i < args.LongLength;) + { + n = args[i++]; + if (!n.d.IsTrue()) + { + if (n.s.IsTrue()) + { + this.Config.external = true; + return BigDecimal(double.PositiveInfinity); + } + t = n; + } + else if (t.d.IsTrue()) + { + t = t.Plus(n.Times(n)); + } + } + + this.Config.external = true; + + return t.Sqrt(); + } + + + /// + /// + /// + /// + /// True if object is a BigDecimal instance, otherwise false. + public static bool IsDecimalInstance(object obj) + { + return obj is BigDecimal; + } + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the natural logarithm of `x`, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Ln(BigDecimalArgument x) => BigDecimal(x).Ln(); + + + /// + /// + /// + /// The argument of the logarithm. + /// The base of the logarithm. + /// A new BigDecimal whose value is the log of `x` to the base `y`, or to base 10 if no base + /// is specified, rounded to `precision` significant digits using rounding mode `rounding`. + public BigDecimal Log(BigDecimalArgument x, BigDecimalArgument y) => BigDecimal(x).Log(y); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the base 2 logarithm of `x`, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Log2(BigDecimalArgument x) => BigDecimal(x).Log(2); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the base 10 logarithm of `x`, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Log10(BigDecimalArgument x) => BigDecimal(x).Log(10); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the maximum of the arguments. + public BigDecimal Max(params double[] args) => _max(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Max(params decimal[] args) => _max(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Max(params long[] args) => _max(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Max(params int[] args) => _max(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Max(params string[] args) => _max(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Max(params BigInteger[] args) => _max(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Max(params BigDecimal[] args) => _max(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Max(params BigDecimalArgument[] args) => _max(args.Select(arg => BigDecimal(arg)).ToArray()); + private BigDecimal _max(params BigDecimal[] args) + { + return BigDecimalHelperFunctions.maxOrMin(this.Config, LtGt.Lt, args); + } + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the minimum of the arguments. + public BigDecimal Min(params double[] args) => _min(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Min(params decimal[] args) => _min(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Min(params long[] args) => _min(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Min(params int[] args) => _min(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Min(params string[] args) => _min(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Min(params BigInteger[] args) => _min(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Min(params BigDecimal[] args) => _min(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Min(params BigDecimalArgument[] args) => _min(args.Select(arg => BigDecimal(arg)).ToArray()); + private BigDecimal _min(params BigDecimal[] args) + { + return BigDecimalHelperFunctions.maxOrMin(this.Config, LtGt.Gt, args); + } + + + /// + /// + /// + /// + /// + /// A new BigDecimal whose value is `x` modulo `y`, rounded to `precision` significant digits + /// using rounding mode `rounding`. + public BigDecimal Mod(BigDecimalArgument x, BigDecimalArgument y) => BigDecimal(x).Mod(y); + + + /// + /// + /// + /// + /// + /// A new BigDecimal whose value is `x` multiplied by `y`, rounded to `precision` significant + /// digits using rounding mode `rounding`. + public BigDecimal Mul(BigDecimalArgument x, BigDecimalArgument y) => BigDecimal(x).Mul(y); + + + /// + /// + /// + /// The base. + /// The exponent. + /// A new BigDecimal whose value is `x` raised to the power `y`, rounded to precision + /// significant digits using rounding mode `rounding`. + public BigDecimal Pow(BigDecimalArgument x, BigDecimalArgument y) => BigDecimal(x).Pow(y); + + + /// + /// + /// + /// Significant digits. + /// A new BigDecimal with a random value equal to or greater than 0 and less than 1, and with + /// `sd`, or `BigDecimalFactory.Config.Precision` if `sd` is omitted, significant digits(or less if trailing zeros + /// are produced). + public BigDecimal Random(long? sd = null) + { + byte[] d; + long e, k, n; + long i = 0; + var r = BigDecimal(1); + var rd = new int[0]; + + if (sd == null) sd = this.Config.Precision; + else BigDecimalHelperFunctions.checkInt32(sd.Value, 1, BigDecimalHelperFunctions.MAX_DIGITS); + + k = (long)Math.Ceiling((double)sd.Value / BigDecimalHelperFunctions.LOG_BASE); + + if (!this.Config.Crypto) + { + Random random = new Random(); + for (; i < k;) + { + if (rd.LongLength <= i) ArrayExtensions.Resize(ref rd, i + 1); + rd[i++] = (int)(random.NextDouble() * 1e7) | 0; + } + } + else + { + // buffer + d = new byte[k *= 4]; + using (var rng = RandomNumberGenerator.Create()) + { + rng.GetBytes(d); + + for (; i < k;) + { + + // 0 <= n < 2147483648 + n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24); + + // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286). + if (n >= 2.14e9) + { + byte[] temp = new byte[4]; + rng.GetBytes(temp); + Array.Copy(temp, 0, d, i, 4); + } + else + { + + // 0 <= n <= 2139999999 + // 0 <= (n % 1e7) <= 9999999 + ArrayExtensions.Push(ref rd, (int)(n % 1e7)); + i += 4; + } + } + } + + i = k / 4; + } + + k = rd[--i]; + sd %= BigDecimalHelperFunctions.LOG_BASE; + + // Convert trailing digits to zeros according to sd. + if (k.IsTrue() && sd.IsTrue()) + { + n = (long)Math.Pow(10, BigDecimalHelperFunctions.LOG_BASE - sd.Value); + rd[i] = (int)(((k / n) | 0) * n); + } + + // Remove trailing words which are zero. + for (; i >= 0 && rd[i] == 0; i--) ArrayExtensions.Pop(ref rd); + + // Zero? + if (i < 0) + { + e = 0; + rd = new[] { 0 }; + } + else + { + e = -1; + + // Remove leading words which are zero and adjust exponent accordingly. + for (; rd[0] == 0; e -= BigDecimalHelperFunctions.LOG_BASE) ArrayExtensions.Shift(ref rd); + + // Count the digits of the first word of rd to determine leading zeros. + for (k = 1, n = rd[0]; n >= 10; n /= 10) k++; + + // Adjust the exponent for leading zeros of the first word of rd. + if (k < BigDecimalHelperFunctions.LOG_BASE) e -= BigDecimalHelperFunctions.LOG_BASE - k; + } + + r.e = e; + r.d = rd; + + return r; + } + + + /// + /// + /// + /// + /// A new BigDecimal whose value is `x` rounded to an integer using rounding mode `rounding`. + public BigDecimal Round(BigDecimalArgument x) => _round(BigDecimal(x)); + private BigDecimal _round(BigDecimal x) + { + return BigDecimalHelperFunctions.finalise(x, x.e + 1, this.Config.Rounding); + } + + + /// + /// + /// + /// + /// 1 if x > 0, + ///
-1 if x < 0, + ///
0 if x is 0, + ///
-0 if x is -0, + ///
null otherwise.
+ public int? Sign(BigDecimalArgument x) => _sign(BigDecimal(x)); + private int? _sign(BigDecimal x) + { + return x.d.IsTrue() ? (x.d[0].IsTrue() ? x.s : 0 * x.s) : x.s ?? null; + } + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the sine of `x`, rounded to `precision` significant digits + /// using rounding mode `rounding`. + public BigDecimal Sin(BigDecimalArgument x) => BigDecimal(x).Sin(); + + + /// + /// + /// + /// A value in radians. + /// A new BigDecimal whose value is the hyperbolic sine of `x`, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Sinh(BigDecimalArgument x) => BigDecimal(x).Sinh(); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is the square root of `x`, rounded to `precision` significant + /// digits using rounding mode `rounding`. + public BigDecimal Sqrt(BigDecimalArgument x) => BigDecimal(x).Sqrt(); + + + /// + /// + /// + /// + /// + /// A new BigDecimal whose value is `x` minus `y`, rounded to `precision` significant digits + /// using rounding mode `rounding`. + public BigDecimal Sub(BigDecimalArgument x, BigDecimalArgument y) => BigDecimal(x).Sub(y); + + + /// + /// Only the result is rounded, not the intermediate calculations. + /// + /// + /// A new BigDecimal whose value is the sum of the arguments, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Sum(params double[] args) => _sum(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Sum(params decimal[] args) => _sum(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Sum(params long[] args) => _sum(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Sum(params int[] args) => _sum(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Sum(params string[] args) => _sum(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Sum(params BigInteger[] args) => _sum(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Sum(params BigDecimal[] args) => _sum(args.Select(arg => BigDecimal(arg)).ToArray()); + /// + public BigDecimal Sum(params BigDecimalArgument[] args) => _sum(args.Select(arg => BigDecimal(arg)).ToArray()); + private BigDecimal _sum(params BigDecimal[] args) + { + long i = 0; + var x = args[i]; + + this.Config.external = false; + for (; x.s.IsTrue() && ++i < args.LongLength;) x = x.Plus(args[i]); + this.Config.external = true; + + return BigDecimalHelperFunctions.finalise(x, this.Config.Precision, this.Config.Rounding); + } + + + /// + /// + /// + /// A value in radians. + /// A new BigDecimal whose value is the tangent of `x`, rounded to `precision` significant + /// digits using rounding mode `rounding`. + public BigDecimal Tan(BigDecimalArgument x) => BigDecimal(x).Tan(); + + + /// + /// + /// + /// A value in radians. + /// A new BigDecimal whose value is the hyperbolic tangent of `x`, rounded to `precision` + /// significant digits using rounding mode `rounding`. + public BigDecimal Tanh(BigDecimalArgument x) => BigDecimal(x).Tanh(); + + + /// + /// + /// + /// + /// A new BigDecimal whose value is `x` truncated to an integer. + public BigDecimal Trunc(BigDecimalArgument x) => _trunc(BigDecimal(x)); + private BigDecimal _trunc(BigDecimal x) + { + return BigDecimalHelperFunctions.finalise(x, x.e + 1, RoundingMode.ROUND_DOWN); + } + } +} diff --git a/DecimalSharp/BigDecimalHelperFunctions.cs b/DecimalSharp/BigDecimalHelperFunctions.cs new file mode 100644 index 0000000..451206c --- /dev/null +++ b/DecimalSharp/BigDecimalHelperFunctions.cs @@ -0,0 +1,1589 @@ +using DecimalSharp.Core; +using DecimalSharp.Core.Extensions; +using System.Globalization; +using System.Numerics; +using System.Text.RegularExpressions; + +namespace DecimalSharp +{ + internal class BigDecimalHelperFunctions + { + // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ // + + /// + /// The maximum exponent magnitude.
+ /// The limit on the value of `ToExpNeg`, `ToExpPos`, `MinE` and `MaxE`. + ///
+ internal static long EXP_LIMIT = (long)9e15; // 0 to 9e15 + + /// + /// The limit on the value of `precision`, and on the value of the first argument to
+ /// `ToDecimalPlaces`, `ToExponential`, `ToFixed`, `ToPrecision` and `ToSignificantDigits`. + ///
+ internal static long MAX_DIGITS = (long)1e9; // 0 to 1e9 + + /// + /// Base conversion alphabet. + /// + internal static string NUMERALS = "0123456789abcdef"; + + internal static double LN10d = 2.302585092994046; + /// + /// The natural logarithm of 10 (1025 digits). + /// + internal static string LN10 = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058"; + + /// + /// Pi (1025 digits). + /// + internal static string PI = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789"; + + // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- // + + internal static int BASE = (int)1e7; + internal static int LOG_BASE = 7; + internal static long MAX_SAFE_INTEGER = 9007199254740991; + + internal static int LN10_PRECISION = LN10.Length - 1; + internal static int PI_PRECISION = PI.Length - 1; + + internal static string isBinary = @"^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$"; + internal static string isHex = @"^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$"; + internal static string isOctal = @"^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$"; + internal static string isDecimal = @"^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$"; + + // Helper functions for BigDecimal.prototype (P) and/or BigDecimal methods, and their callers. + + + /* + * digitsToString P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower, + * finiteToString, naturalExponential, naturalLogarithm + * checkInt32 P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest, + * P.toPrecision, P.toSignificantDigits, toStringBinary, random + * checkRoundingDigits P.logarithm, P.toPower, naturalExponential, naturalLogarithm + * convertBase toStringBinary, parseOther + * cos P.cos + * divide P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy, + * P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction, + * P.toNearest, toStringBinary, naturalExponential, naturalLogarithm, + * taylorSeries, atan2, parseOther + * finalise P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh, + * P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus, + * P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot, + * P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed, + * P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits, + * P.truncated, divide, getLn10, getPi, naturalExponential, + * naturalLogarithm, ceil, floor, round, trunc + * finiteToString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf, + * toStringBinary + * getBase10Exponent P.minus, P.plus, P.times, parseOther + * getLn10 P.logarithm, naturalLogarithm + * getPi P.acos, P.asin, P.atan, toLessThanHalfPi, atan2 + * getPrecision P.precision, P.toFraction + * getZeroString digitsToString, finiteToString + * intPow P.toPower, parseOther + * isOdd toLessThanHalfPi + * maxOrMin max, min + * naturalExponential P.naturalExponential, P.toPower + * naturalLogarithm P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm, + * P.toPower, naturalExponential + * nonFiniteToString finiteToString, toStringBinary + * parseDecimal BigDecimal + * parseOther BigDecimal + * sin P.sin + * taylorSeries P.cosh, P.sinh, cos, sin + * toLessThanHalfPi P.cos, P.sin + * toStringBinary P.toBinary, P.toHexadecimal, P.toOctal + * truncate intPow + * + * Throws: P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi, + * naturalLogarithm, config, parseOther, random, BigDecimal + */ + + + internal static LongString digitsToString(int[] d) + { + long i, k; + LongString ws; + var indexOfLastWord = d.LongLength - 1; + LongString str = ""; + var w = d[0]; + + if (indexOfLastWord > 0) + { + str += w; + for (i = 1; i < indexOfLastWord; i++) + { + ws = d[i] + ""; + k = LOG_BASE - ws.LongLength; + if (k.IsTrue()) str += getZeroString(k); + str += ws; + } + + w = d[i]; + ws = w + ""; + k = LOG_BASE - ws.LongLength; + if (k.IsTrue()) str += getZeroString(k); + } + else if (w == 0) + { + return "0"; + } + + // Remove trailing zeros of last w. + for (; w % 10 == 0;) w /= 10; + + return str + w; + } + + + internal static void checkInt32(long i, long min, long max) + { + if (i != ~~i || i < min || i > max) + { + throw new BigDecimalException(BigDecimalException.InvalidArgument + i); + } + } + + + /// + /// Check 5 rounding digits if `repeating` is null, 4 otherwise.
+ /// `repeating == null` if caller is `log` or `pow`,
+ /// `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`. + ///
+ /// + /// + /// + /// + /// + internal static bool checkRoundingDigits(int[] d, long i, RoundingMode rm, bool? repeating = null) + { + long di, k, rd; + bool r; + + // Get the length of the first word of the array d. + for (k = d[0]; k >= 10; k /= 10) --i; + + // Is the rounding digit in the first word of d? + if (--i < 0) + { + i += LOG_BASE; + di = 0; + } + else + { + di = (long)Math.Ceiling((double)(i + 1) / LOG_BASE); + i %= LOG_BASE; + } + + // i is the index (0 - 6) of the rounding digit. + // E.g. if within the word 3487563 the first rounding digit is 5, + // then i = 4, k = 1000, rd = 3487563 % 1000 = 563 + k = (long)Math.Pow(10, LOG_BASE - i); + rd = d.LongLength > di ? (d[di] % k) | 0 : 0; + + if (repeating == null) + { + if (i < 3) + { + if (i == 0) rd = rd / 100 | 0; + else if (i == 1) rd = rd / 10 | 0; + r = rm < RoundingMode.ROUND_HALF_UP && rd == 99999 || rm > RoundingMode.ROUND_FLOOR && rd == 49999 || rd == 50000 || rd == 0; + } + else + { + r = (rm < RoundingMode.ROUND_HALF_UP && rd + 1 == k || rm > RoundingMode.ROUND_FLOOR && rd + 1 == k / 2) && + (d.LongLength > di + 1 ? d[di + 1] / k / 100 : 0) == Math.Pow(10, i - 2) - 1 || + (rd == k / 2 || rd == 0) && (d.LongLength > di + 1 ? d[di + 1] / k / 100 : 0) == 0; + } + } + else + { + if (i < 4) + { + if (i == 0) rd = rd / 1000 | 0; + else if (i == 1) rd = rd / 100 | 0; + else if (i == 2) rd = rd / 10 | 0; + r = (repeating.IsTrue() || rm < RoundingMode.ROUND_HALF_UP) && rd == 9999 || !repeating.IsTrue() && rm > RoundingMode.ROUND_FLOOR && rd == 4999; + } + else + { + r = ((repeating.IsTrue() || rm < RoundingMode.ROUND_HALF_UP) && rd + 1 == k || + (!repeating.IsTrue() && rm > RoundingMode.ROUND_FLOOR) && rd + 1 == k / 2) && + (d[di + 1] / k / 1000 | 0) == Math.Pow(10, i - 3) - 1; + } + } + + return r; + } + + + /// + /// Convert string of `baseIn` to an array of numbers of `baseOut`.
+ /// Eg. convertBase("255", 10, 16) returns [15, 15].
+ /// Eg. convertBase("ff", 16, 10) returns [2, 5, 5]. + ///
+ /// + /// + /// + /// + internal static int[] convertBase(LongString str, int @baseIn, int @baseOut) + { + long j; + var arr = new[] { 0 }; + long arrL; + var i = 0; + var strL = str.LongLength; + + for (; i < strL;) + { + for (arrL = arr.LongLength; arrL--.IsTrue();) arr[arrL] *= @baseIn; + arr[0] += NUMERALS.IndexOf(str.ElementAt(i++)); + for (j = 0; j < arr.LongLength; j++) + { + if (arr[j] > @baseOut - 1) + { + if (arr.LongLength <= j + 1) ArrayExtensions.AddElementAt(ref arr, j + 1, 0); + arr[j + 1] += arr[j] / @baseOut | 0; + arr[j] %= @baseOut; + } + } + } + + ArrayExtensions.Reverse(ref arr); + return arr; + } + + + /// + /// Cos(x) = 1 - x^2/2! + x^4/4! - ...
+ /// |x| < pi/2 + ///
+ /// + /// + /// + internal static BigDecimal cosine(BigDecimalConfig Ctor, BigDecimal x) + { + long k, len; + LongString y; + + if (x.IsZero()) return x; + + // Argument reduction: Cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1 + // i.e. Cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1 + + // Estimate the optimum number of times to use the argument reduction. + len = x.d.LongLength; + if (len < 32) + { + k = (long)Math.Ceiling((double)len / 3); + y = ((double)1 / tinyPow(4, k)).ToString(CultureInfo.InvariantCulture); + } + else + { + k = 16; + y = "2.3283064365386962890625e-10"; + } + + Ctor.Precision += k; + + x = taylorSeries(Ctor, 1, x.Times(y.ToString()), new BigDecimal(1, Ctor)); + + // Reverse argument reduction + for (var i = k; i--.IsTrue();) + { + var cos2x = x.Times(x); + x = cos2x.Times(cos2x).Minus(cos2x).Times(8).Plus(1); + } + + Ctor.Precision -= k; + + return x; + } + + + /// + /// Perform division in the specified base. + /// + /// + /// + /// + /// + /// + /// + /// + /// + internal static BigDecimal divide(BigDecimal x, BigDecimal y, out bool inexact, long? pr = null, RoundingMode? rm = null, long? dp = null, int? @base = null) + { + return BigDecimalDivision.Divide(x, y, pr, rm, dp, @base, out inexact); + } + /// + /// Perform division in the specified base. + /// + /// + /// + /// + /// + /// + /// + /// + internal static BigDecimal divide(BigDecimal x, BigDecimal y, long? pr = null, RoundingMode? rm = null, long? dp = null, int? @base = null) + { + return BigDecimalDivision.Divide(x, y, pr, rm, dp, @base, out _); + } + + + /// + /// Round `x` to `sd` significant digits using rounding mode `rm`.
+ /// Check for over/under-flow. + ///
+ /// + /// + /// + /// + /// + internal static BigDecimal finalise(BigDecimal x, long? sd = null, RoundingMode? rm = null, bool isTruncated = false) + { + long digits, i, j, k, rd, w, xdi; + bool roundUp; + int[] xd; + var Ctor = x.Config; + + // Don"t round if sd is null or undefined. + if (sd != null) + { + xd = x.d; + + // Infinity/null. + if (!xd.IsTrue()) return x; + + // rd: the rounding digit, i.e. the digit after the digit that may be rounded up. + // w: the word of xd containing rd, a @base 1e7 number. + // xdi: the index of w within xd. + // digits: the number of digits of w. + // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if + // they had leading zeros) + // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero). + + // Get the length of the first word of the digits array xd. + for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++; + i = sd.Value - digits; + + // Is the rounding digit in the first word of xd? + if (i < 0) + { + i += LOG_BASE; + j = sd.Value; + w = xd[xdi = 0]; + + // Get the rounding digit at index j of w. + rd = (long)(w / Math.Pow(10, digits - j - 1) % 10) | 0; + } + else + { + xdi = (long)Math.Ceiling((double)(i + 1) / LOG_BASE); + k = xd.LongLength; + if (xdi >= k) + { + if (isTruncated) + { + + // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`. + for (; k++ <= xdi;) ArrayExtensions.Push(ref xd, 0); + w = rd = 0; + digits = 1; + i %= LOG_BASE; + j = i - LOG_BASE + 1; + } + else + { + goto @out; + } + } + else + { + w = k = xd[xdi]; + + // Get the number of digits of w. + for (digits = 1; k >= 10; k /= 10) digits++; + + // Get the index of rd within w. + i %= LOG_BASE; + + // Get the index of rd within w, adjusted for leading zeros. + // The number of leading zeros of w is given by BigDecimalFactory.LOG_BASE - digits. + j = i - LOG_BASE + digits; + + // Get the rounding digit at index j of w. + rd = j < 0 ? 0 : (long)(w / Math.Pow(10, digits - j - 1) % 10) | 0; + } + } + + // Are there any non-zero digits after the rounding digit? + isTruncated = isTruncated || sd < 0 || + xd.LongLength > xdi + 1 || (j < 0 ? w : w % Math.Pow(10, digits - j - 1)).IsTrue(); + + // The expression `w % Math.Pow(10, digits - j - 1)` returns all the digits of w to the right + // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression + // will give 714. + + roundUp = rm < RoundingMode.ROUND_HALF_UP + ? (rd.IsTrue() || isTruncated) && (rm == RoundingMode.ROUND_UP || rm == (x.s < 0 ? RoundingMode.ROUND_FLOOR : RoundingMode.ROUND_CEIL)) + : rd > 5 || rd == 5 && (rm == RoundingMode.ROUND_HALF_UP || isTruncated || rm == RoundingMode.ROUND_HALF_EVEN && + + // Check whether the digit to the left of the rounding digit is odd. + ((long)((i > 0 ? j > 0 ? w / Math.Pow(10, digits - j) : 0 : xd.LongLength > xdi - 1 && xdi >= 1 ? xd[xdi - 1] : 0) % 10) & 1).IsTrue() || + rm == (x.s < 0 ? RoundingMode.ROUND_HALF_FLOOR : RoundingMode.ROUND_HALF_CEIL)); + + if (sd < 1 || !xd[0].IsTrue()) + { + ArrayExtensions.Resize(ref xd, 1); + if (roundUp) + { + + // Convert sd to decimal places. + sd -= x.e + 1; + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + xd[0] = (int)Math.Pow(10, (LOG_BASE - sd.Value % LOG_BASE) % LOG_BASE); + x.e = -sd ?? 0; + } + else + { + + // Zero. + x.e = 0; + xd[0] = 0; + } + x.d = xd; + + return x; + } + + // Remove excess digits. + if (i == 0) + { + ArrayExtensions.Resize(ref xd, xdi); + k = 1; + xdi--; + } + else + { + ArrayExtensions.Resize(ref xd, xdi + 1); + k = (long)Math.Pow(10, LOG_BASE - i); + + // E.g. 56700 becomes 56000 if 7 is the rounding digit. + // j > 0 means i > number of leading zeros of w. + xd[xdi] = j > 0 ? ((int)(w / Math.Pow(10, digits - j) % Math.Pow(10, j)) | 0) * (int)k : 0; + } + + if (roundUp) + { + for (; ; ) + { + + // Is the digit to be rounded up in the first word of xd? + if (xdi == 0) + { + + // i will be the length of xd[0] before k is added. + for (i = 1, j = xd[0]; j >= 10; j /= 10) i++; + j = xd[0] += (int)k; + for (k = 1; j >= 10; j /= 10) k++; + + // if i != k the length has increased. + if (i != k) + { + x.e++; + if (xd[0] == BASE) xd[0] = 1; + } + + break; + } + else + { + xd[xdi] += (int)k; + if (xd[xdi] != BASE) break; + xd[xdi--] = 0; + k = 1; + } + } + } + + // Remove trailing zeros. + for (i = xd.LongLength; xd[--i] == 0;) ArrayExtensions.Pop(ref xd); + + x.d = xd; + } + + @out: + + if (Ctor.external) + { + + // Overflow? + if (x.e > Ctor.MaxE) + { + + // Infinity. + x.d = null; + x.e = null; + + // Underflow? + } + else if (x.e < Ctor.MinE) + { + + // Zero. + x.e = 0; + x.d = new int[] { 0 }; + // Ctor.underflow = true; + } // else Ctor.underflow = false; + } + + return x; + } + + + internal static LongString finiteToString(BigDecimal x, bool isExp = false, long? sd = null) + { + if (!x.IsFinite()) return nonFiniteToString(x); + long k; + long e = x.e ?? 0; + var str = digitsToString(x.d); + var len = str.LongLength; + + if (isExp) + { + if (sd.IsTrue() && (k = sd.Value - len) > 0) + { + str = str.ElementAt(0) + "." + str.Slice(1) + getZeroString(k); + } + else if (len > 1) + { + str = str.ElementAt(0) + "." + str.Slice(1); + } + + str = str + (x.e < 0 ? "e" : "e+") + x.e; + } + else if (e < 0) + { + str = "0." + getZeroString(-e - 1) + str; + if (sd.IsTrue() && (k = sd.Value - len) > 0) str += getZeroString(k); + } + else if (e >= len) + { + str += getZeroString(e + 1 - len); + if (sd.IsTrue() && (k = sd.Value - e - 1) > 0) str = str + "." + getZeroString(k); + } + else + { + if ((k = e + 1) < len) str = str.Slice(0, k) + "." + str.Slice(k); + if (sd.IsTrue() && (k = sd.Value - len) > 0) + { + if (e + 1 == len) str += "."; + str += getZeroString(k); + } + } + + return str; + } + + + /// + /// Calculate the base 10 exponent from the base 1e7 exponent. + /// + /// + /// + /// + internal static long getBase10Exponent(int[] digits, long e) + { + var w = digits[0]; + + // Add the number of digits of the first word of the digits array. + for (e *= LOG_BASE; w >= 10; w /= 10) e++; + return e; + } + + + internal static BigDecimal getLn10(BigDecimalConfig Ctor, long sd, long? pr = null) + { + if (sd > LN10_PRECISION) + { + + // Reset global state in case the exception is caught. + Ctor.external = true; + if (pr.IsTrue()) Ctor.Precision = pr.Value; + throw new BigDecimalException(BigDecimalException.PrecisionLimitExceeded); + } + return finalise(new BigDecimal(LN10, Ctor), sd, RoundingMode.ROUND_DOWN, true); + } + + + internal static BigDecimal getPi(BigDecimalConfig Ctor, long sd, RoundingMode rm) + { + if (sd > PI_PRECISION) throw new BigDecimalException(BigDecimalException.PrecisionLimitExceeded); + return finalise(new BigDecimal(PI, Ctor), sd, rm, true); + } + + + internal static long getPrecision(int[] digits) + { + var w = digits.LongLength - 1; + var len = w * LOG_BASE + 1; + + w = digits[w]; + + // If non-zero... + if (w.IsTrue()) + { + + // Subtract the number of trailing zeros of the last word. + for (; w % 10 == 0; w /= 10) len--; + + // Add the number of digits of the first word. + for (w = digits[0]; w >= 10; w /= 10) len++; + } + + return len; + } + + + internal static LongString getZeroString(long k) + { + var zs = ""; + for (; k--.IsTrue();) zs += "0"; + return zs; + } + + + /// + /// Implements "exponentiation by squaring". Called by `Pow` and `ParseOther`. + /// + /// + /// + /// + /// + /// A new BigDecimal whose value is the value of BigDecimal `x` to the power `n`, where `n` is an + /// integer of type number. + internal static BigDecimal intPow(BigDecimalConfig Ctor, BigDecimal x, long n, long pr) + { + bool isTruncated = false; + var r = new BigDecimal(1, Ctor); + + // Max n of 9007199254740991 takes 53 loop iterations. + // Maximum digits array length; leaves [28, 34] guard digits. + var k = (long)Math.Ceiling((double)pr / LOG_BASE + 4); + + Ctor.external = false; + + for (; ; ) + { + if ((n % 2).IsTrue()) + { + r = r.Times(x); + if (truncate(ref r.d, k)) isTruncated = true; + } + + n = (long)Math.Floor((double)n / 2); + if (n == 0) + { + + // To ensure correct rounding when r.d is truncated, increment the last word if it is zero. + n = r.d.LongLength - 1; + if (isTruncated && r.d[n] == 0) ++r.d[n]; + break; + } + + x = x.Times(x); + truncate(ref x.d, k); + } + + Ctor.external = true; + + return r; + } + + + internal static bool isOdd(BigDecimal n) + { + return (n.d[n.d.LongLength - 1] & 1).IsTrue(); + } + + + /// + /// Handle `max` and `min`. + /// + /// + /// "Lt" or "Gt". + /// + /// + internal static BigDecimal maxOrMin(BigDecimalConfig Ctor, LtGt ltgt, params BigDecimal[] args) + { + BigDecimal y; + var x = new BigDecimal(args[0], Ctor); + var i = 0; + + for (; ++i < args.LongLength;) + { + y = args[i]; + bool ltgtResult; + if (ltgt == LtGt.Lt) ltgtResult = x.Lt(y); + else ltgtResult = x.Gt(y); + if (!y.s.IsTrue()) + { + x = y; + break; + } + else if (ltgtResult) + { + x = y; + } + } + + return x; + } + + + /// + /// Taylor/Maclaurin series.

+ /// Exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...

+ /// Argument reduction:
+ /// Repeat x = x / 32, k += 5, until |x| < 0.1
+ /// Exp(x) = Exp(x / 2^k)^(2^k)

+ /// Previously, the argument was initially reduced by
+ /// Exp(x) = Exp(r) * 10^k where r = x - k * ln10, k = Floor(x / ln10)
+ /// to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was
+ /// found to be slower than just dividing repeatedly by 32 as above.

+ /// Max integer argument: Exp("20723265836946413") = 6.3e+9000000000000000
+ /// Min integer argument: Exp("-20723265836946411") = 1.2e-9000000000000000
+ /// (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)

+ /// Exp(x) is non-terminating for any finite, non-zero x.

+ /// The result will always be correctly rounded. + ///
+ /// + /// + /// A new BigDecimal whose value is the natural exponential of `x` rounded to `sd` significant + /// digits. + internal static BigDecimal naturalExponential(BigDecimal x, long? sd = null) + { + BigDecimal denominator, pow, sum, t; + long guard, j, wpr; + var rep = 0; + var i = 0; + var k = 0; + var Ctor = x.Config; + var rm = Ctor.Rounding; + var pr = Ctor.Precision; + + // 0/null/Infinity? + if (!x.d.IsTrue() || !x.d[0].IsTrue() || x.e > 17) + { + if (x.d.IsTrue()) + { + if (!x.d[0].IsTrue()) return new BigDecimal(1, Ctor); + else if (x.s < 0) return new BigDecimal(0, Ctor); + else return new BigDecimal(double.PositiveInfinity, Ctor); + } + else + { + if (x.s.IsTrue()) + { + if (x.s < 0) return new BigDecimal(0, Ctor); + else return new BigDecimal(x, Ctor); + } + else return new BigDecimal(double.NaN, Ctor); + } + } + + if (sd == null) + { + Ctor.external = false; + wpr = pr; + } + else + { + wpr = sd.Value; + } + + t = new BigDecimal(0.03125, Ctor); + + // while Abs(x) >= 0.1 + while (x.e > -2) + { + + // x = x / 2^5 + x = x.Times(t); + k += 5; + } + + // Use 2 * Log10(2^k) + 5 (empirically derived) to estimate the increase in precision + // necessary to ensure the first 4 rounding digits are correct. + guard = (long)(Math.Log(Math.Pow(2, k)) / LN10d * 2 + 5) | 0; + wpr += guard; + denominator = pow = sum = new BigDecimal(1, Ctor); + Ctor.Precision = wpr; + + for (; ; ) + { + pow = finalise(pow.Times(x), wpr, RoundingMode.ROUND_DOWN); + denominator = denominator.Times(++i); + t = sum.Plus(divide(pow, denominator, wpr, RoundingMode.ROUND_DOWN)); + + if (digitsToString(t.d).Slice(0, wpr) == digitsToString(sum.d).Slice(0, wpr)) + { + j = k; + while (j--.IsTrue()) sum = finalise(sum.Times(sum), wpr, RoundingMode.ROUND_DOWN); + + // Check to see if the first 4 rounding digits are [49]999. + // If so, repeat the summation with a higher precision, otherwise + // e.g. with precision: 18, rounding: 1 + // Exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123) + // `wpr - guard` is the index of first rounding digit. + if (sd == null) + { + + if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep.IsTrue())) + { + Ctor.Precision = wpr += 10; + denominator = pow = t = new BigDecimal(1, Ctor); + i = 0; + rep++; + } + else + { + return finalise(sum, Ctor.Precision = pr, rm, Ctor.external = true); + } + } + else + { + Ctor.Precision = pr; + return sum; + } + } + + sum = t; + } + } + + + /// + /// Ln(n) (n != 1) is non-terminating. + /// + /// + /// + /// A new BigDecimal whose value is the natural logarithm of `x` rounded to `sd` significant + /// digits. + internal static BigDecimal naturalLogarithm(BigDecimal y, long? sd = null) + { + LongString c; + char c0; + long denominator, e, rep = 0, wpr; + BigDecimal numerator, sum, t, x1, x2; + var n = 1; + var guard = 10; + var x = y; + var xd = x.d; + var Ctor = x.Config; + var rm = Ctor.Rounding; + var pr = Ctor.Precision; + + // Is x negative or Infinity, null, 0 or 1? + if (x.s < 0 || !xd.IsTrue() || !xd[0].IsTrue() || !x.e.IsTrue() && xd[0] == 1 && xd.LongLength == 1) + { + if (xd.IsTrue() && !xd[0].IsTrue()) return new BigDecimal(double.NegativeInfinity, Ctor); + else if (x.s != 1) return new BigDecimal(double.NaN, Ctor); + else if (xd.IsTrue()) return new BigDecimal(0, Ctor); + else return new BigDecimal(x, Ctor); + } + + if (sd == null) + { + Ctor.external = false; + wpr = pr; + } + else + { + wpr = sd.Value; + } + + Ctor.Precision = wpr += guard; + c = digitsToString(xd); + c0 = c.ElementAt(0); + + if (Math.Abs(e = x.e ?? 0) < 1.5e15) + { + + // Argument reduction. + // The series converges faster the closer the argument is to 1, so using + // Ln(a^b) = b * Ln(a), Ln(a) = Ln(a^b) / b + // multiply the argument by itself until the leading digits of the significand are 7, 8, 9, + // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can + // later be divided by this number, then separate out the power of 10 using + // Ln(a*10^b) = Ln(a) + b*ln(10). + + // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14). + //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) { + // max n is 6 (gives 0.7 - 1.3) + while ((int)(c0 - '0') < 7 && (int)(c0 - '0') != 1 || (int)(c0 - '0') == 1 && c.LongLength > 1 && (int)(c.ElementAt(1) - '0') > 3) + { + x = x.Times(y); + c = digitsToString(x.d); + c0 = c.ElementAt(0); + n++; + } + + e = x.e ?? 0; + + if ((int)(c0 - '0') > 1) + { + x = new BigDecimal(("0." + c).ToString(), Ctor); + e++; + } + else + { + x = new BigDecimal((c0 + "." + c.Slice(1)).ToString(), Ctor); + } + } + else + { + + // The argument reduction method above may result in overflow if the argument y is a massive + // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this + // function using Ln(x*10^e) = Ln(x) + e*ln(10). + t = getLn10(Ctor, wpr + 2, pr).Times(e.ToString(CultureInfo.InvariantCulture)); + x = naturalLogarithm(new BigDecimal((c0 + "." + c.Slice(1)).ToString(), Ctor), wpr - guard).Plus(t); + Ctor.Precision = pr; + + return sd == null ? finalise(x, pr, rm, Ctor.external = true) : x; + } + + // x1 is x reduced to a value near 1. + x1 = x; + + // Taylor series. + // Ln(y) = Ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...) + // where x = (y - 1)/(y + 1) (|x| < 1) + sum = numerator = x = divide(x.Minus(1), x.Plus(1), wpr, RoundingMode.ROUND_DOWN); + x2 = finalise(x.Times(x), wpr, RoundingMode.ROUND_DOWN); + denominator = 3; + + for (; ; ) + { + numerator = finalise(numerator.Times(x2), wpr, RoundingMode.ROUND_DOWN); + t = sum.Plus(divide(numerator, new BigDecimal(denominator, Ctor), wpr, RoundingMode.ROUND_DOWN)); + + if (digitsToString(t.d).Slice(0, wpr) == digitsToString(sum.d).Slice(0, wpr)) + { + sum = sum.Times(2); + + // Reverse the argument reduction. Check that e is not 0 because, besides preventing an + // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0. + if (e != 0) sum = sum.Plus(getLn10(Ctor, wpr + 2, pr).Times(e.ToString(CultureInfo.InvariantCulture))); + sum = divide(sum, new BigDecimal(n, Ctor), wpr, RoundingMode.ROUND_DOWN); + + // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has + // been repeated previously) and the first 4 rounding digits 9999? + // If so, restart the summation with a higher precision, otherwise + // e.g. with precision: 12, rounding: 1 + // Ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463. + // `wpr - guard` is the index of first rounding digit. + if (sd == null) + { + if (checkRoundingDigits(sum.d, wpr - guard, rm, rep.IsTrue())) + { + Ctor.Precision = wpr += guard; + t = numerator = x = divide(x1.Minus(1), x1.Plus(1), wpr, RoundingMode.ROUND_DOWN); + x2 = finalise(x.Times(x), wpr, RoundingMode.ROUND_DOWN); + denominator = rep = 1; + } + else + { + return finalise(sum, Ctor.Precision = pr, rm, Ctor.external = true); + } + } + else + { + Ctor.Precision = pr; + return sum; + } + } + + sum = t; + denominator += 2; + } + } + + + /// + /// ±Infinity, null. + /// + /// + /// + internal static LongString nonFiniteToString(BigDecimal x) + { + // Unsigned. + if (x.s == null) return double.NaN.ToString(CultureInfo.InvariantCulture); + return ((double)x.s * (double)x.s / 0).ToString(CultureInfo.InvariantCulture); + } + + + /// + /// Parse the value of a new BigDecimal `x` from string `str`. + /// + /// + /// + /// + internal static BigDecimal parseDecimal(BigDecimal x, LongString str) + { + BigInteger e; + long i, len; + var Ctor = x.Config; + + // Decimal point? + if ((e = str.IndexOf(".")) > -1) str = str.Replace(".", ""); + + // Exponential form? + if ((i = str.IndexOf("e", StringComparison.InvariantCultureIgnoreCase)) > 0) + { + + // Determine exponent. + if (e < 0) e = i; + e += BigInteger.Parse(str.Slice(i + 1)); + str = str.Slice(0, i); + } + else if (e < 0) + { + + // Integer. + e = str.LongLength; + } + + // Determine leading zeros. + for (i = 0; i < str.LongLength && str.ElementAt(i) == 48; i++) ; + + // Determine trailing zeros. + for (len = str.LongLength; (len - 1) >= 0 && str.ElementAt(len - 1) == 48; --len) ; + str = str.Slice(i, len); + + if (!string.IsNullOrEmpty(str)) + { + len -= i; + e = e - i - 1; + x.e = e > Ctor.MaxE ? Ctor.MaxE + 1 : e < Ctor.MinE ? Ctor.MinE - 1 : (long)e; + x.d = new int[0]; + + // Transform @base + + // e is the @base 10 exponent. + // i is where to slice str to get the first word of the digits array. + i = (long)((e + 1) % LOG_BASE); + if (e < 0) i += LOG_BASE; + + if (i < len) + { + if (i.IsTrue()) ArrayExtensions.Push(ref x.d, int.Parse(str.Slice(0, i), CultureInfo.InvariantCulture)); + for (len -= LOG_BASE; i < len;) ArrayExtensions.Push(ref x.d, int.Parse(str.Slice(i, i += LOG_BASE), CultureInfo.InvariantCulture)); + str = str.Slice(i); + i = LOG_BASE - str.LongLength; + } + else + { + i -= len; + } + + for (; i--.IsTrue();) str += "0"; + ArrayExtensions.Push(ref x.d, int.Parse(str, CultureInfo.InvariantCulture)); + + if (Ctor.external) + { + + // Overflow? + if (x.e > Ctor.MaxE) + { + + // Infinity. + x.d = null; + x.e = null; + + // Underflow? + } + else if (x.e < Ctor.MinE) + { + + // Zero. + x.e = 0; + x.d = new int[] { 0 }; + // x.constructor.underflow = true; + } // else x.constructor.underflow = false; + } + } + else + { + + // Zero. + x.e = 0; + x.d = new int[] { 0 }; + } + + return x; + } + + + /// + /// Parse the value of a new BigDecimal `x` from a string `str`, which is not a decimal value. + /// + /// + /// + /// + /// + internal static BigDecimal parseOther(BigDecimal x, LongString str) + { + int @base; + BigDecimalConfig Ctor; + BigDecimal divisor = null; + long i, len = 0, xe; + BigInteger p = 0; + bool isFloat; + int[] xd; + + if (str.IndexOf("_") > -1) + { + str = Regex.Replace(str, @"(\d)_(?=\d)", "$1"); + if (Regex.IsMatch(str, isDecimal, RegexOptions.IgnoreCase)) return parseDecimal(x, str); + } + else if (str == "Infinity" || str == "NaN") + { + if (double.IsNaN(double.Parse(str, CultureInfo.InvariantCulture))) x.s = null; + x.e = null; + x.d = null; + return x; + } + + if (Regex.IsMatch(str, isHex, RegexOptions.IgnoreCase)) + { + @base = 16; + str = str.ToLowerInvariant(); + } + else if (Regex.IsMatch(str, isBinary, RegexOptions.IgnoreCase)) + { + @base = 2; + } + else if (Regex.IsMatch(str, isOctal, RegexOptions.IgnoreCase)) + { + @base = 8; + } + else + { + throw new BigDecimalException(BigDecimalException.InvalidArgument + str); + } + + // Is there a binary exponent part? + i = str.IndexOf("p", StringComparison.InvariantCultureIgnoreCase); + + if (i > 0) + { + p = BigInteger.Parse(str.Slice(i + 1), CultureInfo.InvariantCulture); + str = str.Slice(2, i); + } + else + { + str = str.Slice(2); + } + + // Convert `str` as an integer then divide the result by `@base` raised to a power such that the + // fraction part will be restored. + i = str.IndexOf("."); + isFloat = i >= 0; + Ctor = x.Config; + + if (isFloat) + { + str = str.Replace(".", ""); + len = str.LongLength; + i = len - i; + + // log[10](16) = 1.2041... , log[10](88) = 1.9444.... + divisor = intPow(Ctor, new BigDecimal(@base, Ctor), i, i * 2); + } + + xd = convertBase(str, @base, BASE); + xe = xd.LongLength - 1; + + // Remove trailing zeros. + for (i = xe; i >= 0 && xd[i] == 0; --i) ArrayExtensions.Pop(ref xd); + if (i < 0) return new BigDecimal(x.s >= 0 ? "+0" : "-0", Ctor); + x.e = getBase10Exponent(xd, xe); + x.d = xd; + Ctor.external = false; + + // At what precision to perform the division to ensure exact conversion? + // maxDecimalIntegerPartDigitCount = Ceil(log[10](b) * otherBaseIntegerPartDigitCount) + // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412 + // E.g. Ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits. + // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount + // Therefore using 4 * the number of digits of str will always be enough. + if (isFloat) x = divide(x, divisor, len * 4); + + // Multiply by the binary exponent part if present. + if (p.IsTrue()) x = BigInteger.Abs(p) < 54 ? x.Times(Math.Pow(2, (double)p)) : x.Times(new BigDecimal(2, Ctor).Pow(p)); + Ctor.external = true; + + return x; + } + + + /// + /// Sin(x) = x - x^3/3! + x^5/5! - ...
+ /// |x| < pi/2 + ///
+ /// + /// + /// + internal static BigDecimal sine(BigDecimalConfig Ctor, BigDecimal x) + { + long k; + var len = x.d.LongLength; + + if (len < 3) + { + return x.IsZero() ? x : taylorSeries(Ctor, 2, x, x); + } + + // Argument reduction: Sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x) + // i.e. Sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5) + // and Sin(x) = Sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20)) + + // Estimate the optimum number of times to use the argument reduction. + k = (long)(1.4 * Math.Sqrt(len)); + k = k > 16 ? 16 : k | 0; + + x = x.Times((double)1 / tinyPow(5, k)); + x = taylorSeries(Ctor, 2, x, x); + + // Reverse argument reduction + BigDecimal sin2_x, + d5 = new BigDecimal(5, Ctor), + d16 = new BigDecimal(16, Ctor), + d20 = new BigDecimal(20, Ctor); + for (; k--.IsTrue();) + { + sin2_x = x.Times(x); + x = x.Times(d5.Plus(sin2_x.Times(d16.Times(sin2_x).Minus(d20)))); + } + + return x; + } + + + /// + /// Calculate Taylor series for `Cos`, `Cosh`, `Sin` and `Sinh`. + /// + /// + /// + /// + /// + /// + /// + internal static BigDecimal taylorSeries(BigDecimalConfig Ctor, int n, BigDecimal x, BigDecimal y, bool isHyperbolic = false) + { + long j; + BigDecimal t, u, x2; + long i = 1; + var pr = Ctor.Precision; + var k = (long)Math.Ceiling((double)pr / LOG_BASE); + + Ctor.external = false; + x2 = x.Times(x); + u = new BigDecimal(y, Ctor); + + for (; ; ) + { + t = divide(u.Times(x2), new BigDecimal(n++ * n++, Ctor), pr, RoundingMode.ROUND_DOWN); + u = isHyperbolic ? y.Plus(t) : y.Minus(t); + y = divide(t.Times(x2), new BigDecimal(n++ * n++, Ctor), pr, RoundingMode.ROUND_DOWN); + t = u.Plus(y); + + if (t.d.LongLength > k && u.d.LongLength > k) + { + for (j = k; t.d[j] == u.d[j] && j--.IsTrue();) ; + if (j == -1) break; + } + + var j2 = u; + u = y; + y = t; + t = j2; + i++; + } + + Ctor.external = true; + ArrayExtensions.Resize(ref t.d, k + 1); + + return t; + } + + + /// + /// Exponent e must be positive and non-zero. + /// + /// + /// Must be positive and non-zero + /// + internal static long tinyPow(long b, long e) + { + var n = b; + while ((--e).IsTrue()) n *= b; + return n; + } + + + /// + /// + /// + /// + /// + /// + /// The absolute value of `x` reduced to less than or equal to half pi. + internal static BigDecimal toLessThanHalfPi(BigDecimalConfig Ctor, BigDecimal x, out int quadrant) + { + BigDecimal t; + var isNeg = x.s < 0; + var pi = getPi(Ctor, Ctor.Precision, RoundingMode.ROUND_DOWN); + var halfPi = pi.Times(0.5); + + x = x.Abs(); + + if (x.Lte(halfPi)) + { + quadrant = isNeg ? 4 : 1; + return x; + } + + t = x.DivToInt(pi); + + if (t.IsZero()) + { + quadrant = isNeg ? 3 : 2; + } + else + { + x = x.Minus(t.Times(pi)); + + // 0 <= x < pi + if (x.Lte(halfPi)) + { + quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1); + return x; + } + + quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2); + } + + return x.Minus(pi).Abs(); + } + + + /// + /// + /// + /// + /// + /// + /// + /// The value of BigDecimal `x` as a string in base `baseOut`.
+ /// If the optional `sd` argument is present include a binary exponent suffix.
+ internal static LongString toStringBinary(BigDecimal x, int @baseOut, long? sd, RoundingMode? rm) + { + int @base; + long e, k, len; + long? i; + bool roundUp = false; + LongString str; + int[] xd; + BigDecimal y = null; + var Ctor = x.Config; + var isExp = sd != null; + long sdValue; + + if (isExp) + { + checkInt32(sd.Value, 1, MAX_DIGITS); + if (rm == null) rm = Ctor.Rounding; + + sdValue = sd.Value; + } + else + { + sd = Ctor.Precision; + rm = Ctor.Rounding; + + sdValue = sd.Value; + } + + if (!x.IsFinite()) + { + str = nonFiniteToString(x); + } + else + { + str = finiteToString(x); + i = str.IndexOf("."); + + // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required: + // maxBinaryExponent = Floor((decimalExponent + 1) * log[2](10)) + // minBinaryExponent = Floor(decimalExponent * log[2](10)) + // log[2](10) = 3.321928094887362347870319429489390175864 + + if (isExp) + { + @base = 2; + if (@baseOut == 16) + { + sdValue = sdValue * 4 - 3; + } + else if (@baseOut == 8) + { + sdValue = sdValue * 3 - 2; + } + } + else + { + @base = @baseOut; + } + + // Convert the number as an integer then divide the result by its @base raised to a power such + // that the fraction part will be restored. + + // Non-integer. + if (i >= 0) + { + str = str.Replace(".", ""); + y = new BigDecimal(1, Ctor); + y.e = str.LongLength - i; + y.d = convertBase(finiteToString(y), 10, @base); + y.e = y.d.LongLength; + } + + xd = convertBase(str, 10, @base); + e = len = xd.LongLength; + + // Remove trailing zeros. + for (; len > 0 && xd[--len] == 0;) ArrayExtensions.Pop(ref xd); + + if (xd.LongLength == 0 || !xd[0].IsTrue()) + { + str = isExp ? "0p+0" : "0"; + } + else + { + if (i < 0) + { + e--; + } + else + { + x = new BigDecimal(x, Ctor); + x.d = xd; + x.e = e; + x = divide(x, y, out var inexact, sdValue, rm, 0, @base); + xd = x.d; + e = x.e ?? 0; + roundUp = inexact; + } + + // The rounding digit, i.e. the digit after the digit that may be rounded up. + i = sdValue < xd.LongLength ? xd[sdValue] : null; + k = @base / 2; + roundUp = roundUp || sdValue + 1 < xd.LongLength; + + roundUp = rm < RoundingMode.ROUND_HALF_UP + ? (i != null || roundUp) && (rm == RoundingMode.ROUND_UP || rm == (x.s < 0 ? RoundingMode.ROUND_FLOOR : RoundingMode.ROUND_CEIL)) + : i > k || i == k && (rm == RoundingMode.ROUND_HALF_UP || roundUp || rm == RoundingMode.ROUND_HALF_EVEN && (xd[sdValue - 1] & 1).IsTrue() || + rm == (x.s < 0 ? RoundingMode.ROUND_HALF_FLOOR : RoundingMode.ROUND_HALF_CEIL)); + + ArrayExtensions.Resize(ref xd, sdValue); + + if (roundUp) + { + + // Rounding up may mean the previous digit has to be rounded up and so on. + for (; sdValue > 0 && ++xd[--sdValue] > @base - 1;) + { + xd[sdValue] = 0; + if (!sdValue.IsTrue()) + { + ++e; + ArrayExtensions.Unshift(ref xd, 1); + } + } + } + + // Determine trailing zeros. + for (len = xd.LongLength; !xd[len - 1].IsTrue(); --len) ; + + // E.g. [4, 11, 15] becomes 4bf. + for (i = 0, str = ""; i < len; i++) + { + str += NUMERALS.ElementAt(xd[i.Value]); + } + + // Add binary exponent suffix? + if (isExp) + { + if (len > 1) + { + if (@baseOut == 16 || @baseOut == 8) + { + i = @baseOut == 16 ? 4 : 3; + for (--len; (len % i).IsTrue(); len++) str += "0"; + xd = convertBase(str, @base, @baseOut); + for (len = xd.LongLength; !xd[len - 1].IsTrue(); --len) ; + + // xd[0] will always be be 1 + for (i = 1, str = "1."; i < len; i++) str += NUMERALS.ElementAt(xd[i.Value]); + } + else + { + str = str.ElementAt(0) + "." + str.Slice(1); + } + } + + str = str + (e < 0 ? "p" : "p+") + e; + } + else if (e < 0) + { + for (; (++e).IsTrue();) str = "0" + str; + str = "0." + str; + } + else + { + if (++e > len) for (e -= len; e--.IsTrue();) str += "0"; + else if (e < len) str = str.Slice(0, e) + "." + str.Slice(e); + } + } + + str = (@baseOut == 16 ? "0x" : @baseOut == 2 ? "0b" : @baseOut == 8 ? "0o" : "") + str; + } + + return x.s < 0 ? "-" + str : str; + } + + + /// + /// Does not strip trailing zeros. + /// + /// + /// + /// + internal static bool truncate(ref int[] arr, long len) + { + if (arr.LongLength > len) + { + ArrayExtensions.Resize(ref arr, len); + return true; + } + return false; + } + } +} diff --git a/DecimalSharp/DecimalSharp.csproj b/DecimalSharp/DecimalSharp.csproj new file mode 100644 index 0000000..b9a357e --- /dev/null +++ b/DecimalSharp/DecimalSharp.csproj @@ -0,0 +1,37 @@ + + + + net6.0 + enable + enable + True + 1.0.0 + XeroXP + An arbitrary-precision Decimal type for C#. +Port of [decimal.js](https://github.com/MikeMcl/decimal.js/). + Copyright (c) $(Authors) 2022 + https://github.com/XeroXP/DecimalSharp + README.md + https://github.com/XeroXP/DecimalSharp.git + git + decimal, arbitrary-precision, bigdecimal, bignumber, significant-digits, trigonometric-functions, decimal-places + LICENSE + False + + + + + True + \ + + + True + \ + + + + + + + + diff --git a/DecimalSharp/LtGt.cs b/DecimalSharp/LtGt.cs new file mode 100644 index 0000000..82ef115 --- /dev/null +++ b/DecimalSharp/LtGt.cs @@ -0,0 +1,8 @@ +namespace DecimalSharp +{ + internal enum LtGt + { + Lt, + Gt + } +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..52d0a32 --- /dev/null +++ b/README.md @@ -0,0 +1,221 @@ +DecimalSharp +============ + +![](https://img.shields.io/nuget/v/DecimalSharp) +![](https://img.shields.io/nuget/dt/DecimalSharp?color=laim) +![](https://img.shields.io/appveyor/build/XeroXP/decimalsharp/master) +![](https://img.shields.io/appveyor/tests/XeroXP/decimalsharp/master) + +Decimal in C#. Port of [decimal.js](https://github.com/MikeMcl/decimal.js/). Public domain. + +An arbitrary-precision Decimal type for C#. + + +Documentation +============= + +* [Overview](#overview) +* [Installation](#installation) +* [Use](#use) +* [System requirements](#system-requirements) +* [Development and testing](#development-and-testing) +* [Contributors](#contributors) + + +Overview +-------- + +The primary goal of this project is to produce a translation of decimal.js to +C# which is as close as possible to the original implementation. + +### Features + +- Integers and floats +- Simple but full-featured API +- Also handles hexadecimal, binary and octal values +- No dependencies +- Comprehensive [documentation](../../wiki/) and test set + +This library also adds the trigonometric functions, among others, and supports non-integer powers. + +For a lighter version of this library without the trigonometric functions use `DecimalSharp.Light` + + +Installation +------------ + +You can install DecimalSharp via [NuGet](https://www.nuget.org/): + +package manager: + + $ PM> Install-Package DecimalSharp + +NET CLI: + + $ dotnet add package DecimalSharp + +or [download source code](../../releases). + + +Use +----- + +*In the code examples below, semicolons and `ToString` calls are not shown.* + +A BigDecimal number is created from a primitive number, string, or other BigDecimal number. + +```csharp +x = new BigDecimal(123.4567) +y = new BigDecimal("123456.7e-3") +z = new BigDecimal(x) +x.Eq(y) && x.Eq(z) && y.Eq(z) // true +``` + +If using values with more than a few digits, it is recommended to pass strings rather than numbers to avoid a potential loss of precision. + +```csharp +// Precision loss from using numeric literals with more than 15 significant digits. +new BigDecimal(1.0000000000000001) // "1" +new BigDecimal(88259496234518.57) // "88259496234518.56" +new BigDecimal(99999999999999999999) // "100000000000000000000" + +// Precision loss from using numeric literals outside the range of simple values. +new BigDecimal(2e+308) // "Infinity" +new BigDecimal(1e-324) // "0" + +// Precision loss from the unexpected result of arithmetic with simple values. +new BigDecimal(0.7 + 0.1) // "0.7999999999999999" +``` + +Strings can contain underscores as separators to improve readability. + +```csharp +x = new BigDecimal("2_147_483_647") +``` + +String values in binary, hexadecimal or octal notation are also accepted if the appropriate prefix is included. + +```csharp +x = new BigDecimal("0xff.f") // "255.9375" +y = new BigDecimal("0b10101100") // "172" +z = x.Plus(y) // "427.9375" + +z.ToBinary() // "0b110101011.1111" +z.ToBinary(13) // "0b1.101010111111p+8" + +x = new BigDecimal("0b1.1111111111111111111111111111111111111111111111111111p+1023") +// "1.7976931348623157081e+308" +``` + + +A BigDecimal number is immutable in the sense that it is not changed by its methods. + +```csharp +0.3 - 0.1 // 0.19999999999999998 +x = new BigDecimal(0.3) +x.Minus(0.1) // "0.2" +x // "0.3" +``` + +The methods that return a BigDecimal number can be chained. + +```csharp +x.Div(y).Plus(z).Times(9).Minus("1.234567801234567e+8").Plus(976.54321).Div("2598.11772") +x.Sqrt().Div(y).Pow(3).Gt(y.Mod(z)) // true +``` + +Many method names have a shorter alias. + +```csharp +x.SquareRoot().DividedBy(y).ToPower(3).Equals(x.Sqrt().Div(y).Pow(3)) // true +x.ComparedTo(y.Modulo(z).Negated() === x.Cmp(y.Mod(z).Neg()) // true +``` + +And there are `IsNaN` and `IsFinite` methods, as `NaN` and `Infinity` are valid `BigDecimal` values. + +```csharp +x = new BigDecimal(double.NaN) // "NaN" +y = new BigDecimal(double.PositiveInfinity) // "Infinity" +x.IsNaN() && !y.IsNaN() && !x.IsFinite() && !y.IsFinite() // true +``` + +There are `ToExponential`, `ToFixed` and `ToPrecision` methods. + +```csharp +x = new BigDecimal(255.5) +x.ToExponential(5) // "2.55500e+2" +x.ToFixed(5) // "255.50000" +x.ToPrecision(5) // "255.50" +``` + +There is also a `ToFraction` method with an optional *maximum denominator* argument. + +```csharp +z = new BigDecimal(355) +pi = z.DividedBy(113) // "3.1415929204" +pi.ToFraction() // [ "7853982301", "2500000000" ] +pi.ToFraction(1000) // [ "355', '113" ] +``` + +All calculations are rounded according to the number of significant digits and rounding mode specified by the `precision` and `rounding` properties of the BigDecimal constructor. + +For advanced usage, multiple BigDecimal constructors can be created, each with their own independent configuration which applies to all BigDecimal numbers created from it. + +```csharp +// Set the precision and rounding +var bigDecimalFactory = new BigDecimalFactory(new BigDecimalConfig() +{ + Precision = 5, + Rounding = RoundingMode.ROUND_HALF_UP +}); + +// Create another Decimal constructor, optionally passing in a configuration object +var bigDecimalFactory2 = new BigDecimalFactory(new BigDecimalConfig() +{ + Precision = 9, + Rounding = RoundingMode.ROUND_DOWN +}); + +x = bigDecimalFactory.BigDecimal(5) +y = bigDecimalFactory2.BigDecimal(5) + +x.Div(3) // "1.6667" +y.Div(3) // "1.66666666" +``` + +The value of a BigDecimal is stored in a floating point format in terms of its digits, exponent and sign, but these properties should be considered read-only. + +```csharp +x = new BigDecimal(-12345.67); +x.c // [ 12345, 6700000 ] digits (base 10000000) +x.e // 4 exponent +x.s // -1 sign +``` + +For further information see the [API](../../wiki/) reference documentation. + + +System requirements +------------------- + +BNSharp supports: + +* Net 6 + + +Development and testing +------------------------ + +Make sure to rebuild projects every time you change code for testing. + +### Testing + +To run tests: + + $ dotnet test + + +Contributors +------------ + +[XeroXP](../../../). diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..06e2a57 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,18 @@ +image: Visual Studio 2022 +version: 1.0.{build} +branches: + only: + - master + +configuration: Release + +before_build: + - nuget restore + +build: + verbosity: minimal + project: DecimalSharp.sln + +test: + assemblies: + - '**\*.Tests.dll' \ No newline at end of file