Definition at line 1398 of file Decimal.cs.
1399 {
1400 result = default(DecCalc);
1402 if (num < -94)
1403 {
1404 return;
1405 }
1406 if (num > 96)
1407 {
1408 Number.ThrowOverflowException(TypeCode.Decimal);
1409 }
1412 {
1415 }
1417 int num4 = 14 - (num * 19728 >> 16);
1419 {
1421 {
1423 }
1425 }
1426 else if (
num4 != -1 ||
num3 >= 1000000000000000.0)
1427 {
1429 }
1430 else
1431 {
1433 }
1434 if (
num3 < 100000000000000.0 &&
num4 < 28)
1435 {
1438 }
1441 {
1442 num5 = (ulong)(
long)Math.Round(
num3);
1443 }
1444 else
1445 {
1449 {
1451 }
1452 }
1454 {
1455 return;
1456 }
1458 {
1461 {
1470 }
1471 else
1472 {
1474 }
1475 }
1476 else
1477 {
1480 {
1482 }
1484 {
1486 if ((uint)
num5 == (uint)(
num9 * 100000000))
1487 {
1491 }
1492 }
1494 {
1496 if ((uint)
num5 == (uint)(
num10 * 10000))
1497 {
1501 }
1502 }
1503 if (((
int)
num5 & 3) == 0 &&
num8 >= 2)
1504 {
1507 {
1511 }
1512 }
1513 if (((
int)
num5 & 1) == 0 &&
num8 >= 1)
1514 {
1517 {
1520 }
1521 }
1524 }
1526 }
static new bool IsSupported
static void UInt64x64To128(ulong a, ulong b, ref DecCalc result)
static readonly uint[] s_powers10
static unsafe uint GetExponent(float f)
static readonly double[] s_doublePowers10
static ulong UInt32x32To64(uint a, uint b)
static readonly ulong[] s_ulongPowers10
References System.Runtime.Serialization.Dictionary, System.Decimal.DecCalc.GetExponent(), System.input, System.Runtime.Intrinsics.X86.Sse41.IsSupported, System.L, System.Math.Round(), System.Decimal.DecCalc.s_doublePowers10, System.Decimal.DecCalc.s_powers10, System.Decimal.DecCalc.s_ulongPowers10, System.Number.ThrowOverflowException(), System.Decimal.DecCalc.UInt32x32To64(), and System.Decimal.DecCalc.UInt64x64To128().
Referenced by System.Decimal.Decimal().