@@ -1580,15 +1580,13 @@ private static bool TryConvertFromSaturating<TOther>(TOther value, out Int128 re
15801580 if ( typeof ( TOther ) == typeof ( double ) )
15811581 {
15821582 double actualValue = ( double ) ( object ) value ;
1583- result = ( actualValue >= + 170141183460469231731687303715884105727.0 ) ? MaxValue :
1584- ( actualValue <= - 170141183460469231731687303715884105728.0 ) ? MinValue : ( Int128 ) actualValue ;
1583+ result = ( Int128 ) actualValue ;
15851584 return true ;
15861585 }
15871586 else if ( typeof ( TOther ) == typeof ( Half ) )
15881587 {
15891588 Half actualValue = ( Half ) ( object ) value ;
1590- result = ( actualValue == Half . PositiveInfinity ) ? MaxValue :
1591- ( actualValue == Half . NegativeInfinity ) ? MinValue : ( Int128 ) actualValue ;
1589+ result = ( Int128 ) actualValue ;
15921590 return true ;
15931591 }
15941592 else if ( typeof ( TOther ) == typeof ( short ) )
@@ -1624,8 +1622,7 @@ private static bool TryConvertFromSaturating<TOther>(TOther value, out Int128 re
16241622 else if ( typeof ( TOther ) == typeof ( float ) )
16251623 {
16261624 float actualValue = ( float ) ( object ) value ;
1627- result = ( actualValue >= + 170141183460469231731687303715884105727.0f ) ? MaxValue :
1628- ( actualValue <= - 170141183460469231731687303715884105728.0f ) ? MinValue : ( Int128 ) actualValue ;
1625+ result = ( Int128 ) actualValue ;
16291626 return true ;
16301627 }
16311628 else
@@ -1655,15 +1652,13 @@ private static bool TryConvertFromTruncating<TOther>(TOther value, out Int128 re
16551652 if ( typeof ( TOther ) == typeof ( double ) )
16561653 {
16571654 double actualValue = ( double ) ( object ) value ;
1658- result = ( actualValue >= + 170141183460469231731687303715884105727.0 ) ? MaxValue :
1659- ( actualValue <= - 170141183460469231731687303715884105728.0 ) ? MinValue : ( Int128 ) actualValue ;
1655+ result = ( Int128 ) actualValue ;
16601656 return true ;
16611657 }
16621658 else if ( typeof ( TOther ) == typeof ( Half ) )
16631659 {
16641660 Half actualValue = ( Half ) ( object ) value ;
1665- result = ( actualValue == Half . PositiveInfinity ) ? MaxValue :
1666- ( actualValue == Half . NegativeInfinity ) ? MinValue : ( Int128 ) actualValue ;
1661+ result = ( Int128 ) actualValue ;
16671662 return true ;
16681663 }
16691664 else if ( typeof ( TOther ) == typeof ( short ) )
@@ -1699,8 +1694,7 @@ private static bool TryConvertFromTruncating<TOther>(TOther value, out Int128 re
16991694 else if ( typeof ( TOther ) == typeof ( float ) )
17001695 {
17011696 float actualValue = ( float ) ( object ) value ;
1702- result = ( actualValue >= + 170141183460469231731687303715884105727.0f ) ? MaxValue :
1703- ( actualValue <= - 170141183460469231731687303715884105728.0f ) ? MinValue : ( Int128 ) actualValue ;
1697+ result = ( Int128 ) actualValue ;
17041698 return true ;
17051699 }
17061700 else
0 commit comments