From 9cd46671b3860767c3bbfe649ed19ff6359dab2f Mon Sep 17 00:00:00 2001 From: Andante Date: Fri, 27 Feb 2026 13:39:08 +0900 Subject: [PATCH 1/4] Added exceptions that DivRem raises --- xml/System/Int128.xml | 4 ++++ xml/System/Int32.xml | 4 ++++ xml/System/Int64.xml | 4 ++++ xml/System/IntPtr.xml | 4 ++++ xml/System/Math.xml | 16 ++++++++++++++++ 5 files changed, 32 insertions(+) diff --git a/xml/System/Int128.xml b/xml/System/Int128.xml index f9f30041a81..ff725e06731 100644 --- a/xml/System/Int128.xml +++ b/xml/System/Int128.xml @@ -651,6 +651,10 @@ The quotient and remainder of divided-by . To be added. + + is zero. + + is Int128.MinValue and is -1. diff --git a/xml/System/Int32.xml b/xml/System/Int32.xml index 288ac96fd77..d0fc43de5e9 100644 --- a/xml/System/Int32.xml +++ b/xml/System/Int32.xml @@ -821,6 +821,10 @@ The quotient and remainder of divided-by . To be added. + + is zero. + + is Int32.MinValue and is -1. diff --git a/xml/System/Int64.xml b/xml/System/Int64.xml index 76434cbbaf8..0e28abb9dba 100644 --- a/xml/System/Int64.xml +++ b/xml/System/Int64.xml @@ -814,6 +814,10 @@ The quotient and remainder of divided-by . To be added. + + is zero. + + is Int64.MinValue and is -1. diff --git a/xml/System/IntPtr.xml b/xml/System/IntPtr.xml index 613271e0cb6..84c6d4c8d1b 100644 --- a/xml/System/IntPtr.xml +++ b/xml/System/IntPtr.xml @@ -1058,6 +1058,10 @@ The quotient and remainder of divided-by . To be added. + + is zero. + + is IntPtr.MinValue and is -1. diff --git a/xml/System/Math.xml b/xml/System/Math.xml index 2050cb52afb..3d5c92b0e41 100644 --- a/xml/System/Math.xml +++ b/xml/System/Math.xml @@ -2976,6 +2976,10 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 Produces the quotient and the remainder of two signed 32-bit numbers. The quotient and the remainder of the specified numbers. To be added. + + is zero. + + is Int32.MinValue and is -1. @@ -3023,6 +3027,10 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 Produces the quotient and the remainder of two signed 64-bit numbers. The quotient and the remainder of the specified numbers. To be added. + + is zero. + + is Int64.MinValue and is -1. @@ -3085,6 +3093,10 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 Produces the quotient and the remainder of two signed native-size numbers. The quotient and the remainder of the specified numbers. To be added. + + is zero. + + is IntPtr.MinValue and is -1. @@ -3440,6 +3452,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 is zero. + + is Int32.MinValue and is -1. @@ -3516,6 +3530,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 is zero. + + is Int64.MinValue and is -1. From 845080bb2e65276b1f0d4923667851e3870992d9 Mon Sep 17 00:00:00 2001 From: Andante Date: Fri, 27 Feb 2026 13:59:08 +0900 Subject: [PATCH 2/4] fix = error (#12354) --- xml/System/Int128.xml | 2 +- xml/System/Int32.xml | 2 +- xml/System/Int64.xml | 2 +- xml/System/IntPtr.xml | 2 +- xml/System/Math.xml | 10 +++++----- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/xml/System/Int128.xml b/xml/System/Int128.xml index ff725e06731..ea76c29004d 100644 --- a/xml/System/Int128.xml +++ b/xml/System/Int128.xml @@ -654,7 +654,7 @@ is zero. - is Int128.MinValue and is -1. + is Int128.MinValue and is -1. diff --git a/xml/System/Int32.xml b/xml/System/Int32.xml index d0fc43de5e9..fde787754a5 100644 --- a/xml/System/Int32.xml +++ b/xml/System/Int32.xml @@ -824,7 +824,7 @@ is zero. - is Int32.MinValue and is -1. + is Int32.MinValue and is -1. diff --git a/xml/System/Int64.xml b/xml/System/Int64.xml index 0e28abb9dba..0823ff2356b 100644 --- a/xml/System/Int64.xml +++ b/xml/System/Int64.xml @@ -817,7 +817,7 @@ is zero. - is Int64.MinValue and is -1. + is Int64.MinValue and is -1. diff --git a/xml/System/IntPtr.xml b/xml/System/IntPtr.xml index 84c6d4c8d1b..c33cc724798 100644 --- a/xml/System/IntPtr.xml +++ b/xml/System/IntPtr.xml @@ -1061,7 +1061,7 @@ is zero. - is IntPtr.MinValue and is -1. + is IntPtr.MinValue and is -1. diff --git a/xml/System/Math.xml b/xml/System/Math.xml index 3d5c92b0e41..e7af2de2648 100644 --- a/xml/System/Math.xml +++ b/xml/System/Math.xml @@ -2979,7 +2979,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 is zero. - is Int32.MinValue and is -1. + is Int32.MinValue and is -1. @@ -3030,7 +3030,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 is zero. - is Int64.MinValue and is -1. + is Int64.MinValue and is -1. @@ -3096,7 +3096,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 is zero. - is IntPtr.MinValue and is -1. + is IntPtr.MinValue and is -1. @@ -3453,7 +3453,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 is zero. - is Int32.MinValue and is -1. + is Int32.MinValue and is -1. @@ -3531,7 +3531,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 is zero. - is Int64.MinValue and is -1. + is Int64.MinValue and is -1. From ef8a4fcbc64a648b01550860f9f33437c9c55521 Mon Sep 17 00:00:00 2001 From: Andante Date: Sat, 28 Feb 2026 08:05:39 +0900 Subject: [PATCH 3/4] DivRem: add DivideByZeroException (#12354) --- xml/System.Numerics/BigInteger.xml | 2 ++ xml/System.Numerics/IBinaryInteger`1.xml | 2 ++ xml/System/Byte.xml | 2 ++ xml/System/Int16.xml | 2 ++ xml/System/SByte.xml | 2 ++ xml/System/UInt128.xml | 2 ++ xml/System/UInt16.xml | 2 ++ xml/System/UInt32.xml | 2 ++ xml/System/UInt64.xml | 2 ++ xml/System/UIntPtr.xml | 2 ++ 10 files changed, 20 insertions(+) diff --git a/xml/System.Numerics/BigInteger.xml b/xml/System.Numerics/BigInteger.xml index 4a6690f1172..b63547c9c38 100644 --- a/xml/System.Numerics/BigInteger.xml +++ b/xml/System.Numerics/BigInteger.xml @@ -1716,6 +1716,8 @@ The individual bytes in the `value` array should be in little-endian order, from The quotient and remainder of divided-by . To be added. + + is zero. diff --git a/xml/System.Numerics/IBinaryInteger`1.xml b/xml/System.Numerics/IBinaryInteger`1.xml index cbd6d814754..b34b28dffa3 100644 --- a/xml/System.Numerics/IBinaryInteger`1.xml +++ b/xml/System.Numerics/IBinaryInteger`1.xml @@ -192,6 +192,8 @@ Computes the quotient and remainder of two values. The quotient and remainder of divided by . To be added. + + is zero. diff --git a/xml/System/Byte.xml b/xml/System/Byte.xml index 9228a98f2c0..4a5dbdefe37 100644 --- a/xml/System/Byte.xml +++ b/xml/System/Byte.xml @@ -710,6 +710,8 @@ The quotient and remainder of divided-by . To be added. + + is zero. diff --git a/xml/System/Int16.xml b/xml/System/Int16.xml index 9ef183fe7b7..ea382b6a3fc 100644 --- a/xml/System/Int16.xml +++ b/xml/System/Int16.xml @@ -791,6 +791,8 @@ The quotient and remainder of divided-by . To be added. + + is zero. diff --git a/xml/System/SByte.xml b/xml/System/SByte.xml index 594a5200f42..567cf4a83dd 100644 --- a/xml/System/SByte.xml +++ b/xml/System/SByte.xml @@ -796,6 +796,8 @@ The quotient and remainder of divided-by . To be added. + + is zero. diff --git a/xml/System/UInt128.xml b/xml/System/UInt128.xml index 582cdbe16b3..3102a92c181 100644 --- a/xml/System/UInt128.xml +++ b/xml/System/UInt128.xml @@ -587,6 +587,8 @@ The quotient and remainder of divided-by . To be added. + + is zero. diff --git a/xml/System/UInt16.xml b/xml/System/UInt16.xml index bcf51058cf2..a16d1b071d9 100644 --- a/xml/System/UInt16.xml +++ b/xml/System/UInt16.xml @@ -722,6 +722,8 @@ The quotient and remainder of divided-by . To be added. + + is zero. diff --git a/xml/System/UInt32.xml b/xml/System/UInt32.xml index 62ec0737722..852dc3f6026 100644 --- a/xml/System/UInt32.xml +++ b/xml/System/UInt32.xml @@ -757,6 +757,8 @@ The quotient and remainder of divided-by . To be added. + + is zero. diff --git a/xml/System/UInt64.xml b/xml/System/UInt64.xml index 16d52ea59b8..4d283cf4e51 100644 --- a/xml/System/UInt64.xml +++ b/xml/System/UInt64.xml @@ -755,6 +755,8 @@ The quotient and remainder of divided-by . To be added. + + is zero. diff --git a/xml/System/UIntPtr.xml b/xml/System/UIntPtr.xml index 763658b4988..fa2a3200c93 100644 --- a/xml/System/UIntPtr.xml +++ b/xml/System/UIntPtr.xml @@ -925,6 +925,8 @@ The quotient and remainder of divided-by . To be added. + + is zero. From 75e1ecc21e6f1926feef9f4c57271d1b0eb8d84f Mon Sep 17 00:00:00 2001 From: Andante Date: Sat, 28 Feb 2026 08:16:06 +0900 Subject: [PATCH 4/4] DivRem: add DivideByZeroException to Math (#12354) --- xml/System/Math.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xml/System/Math.xml b/xml/System/Math.xml index e7af2de2648..b954a21dc6d 100644 --- a/xml/System/Math.xml +++ b/xml/System/Math.xml @@ -2882,6 +2882,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 Produces the quotient and the remainder of two unsigned 8-bit numbers. The quotient and the remainder of the specified numbers. To be added. + + is zero. @@ -3150,6 +3152,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 Produces the quotient and the remainder of two signed 8-bit numbers. The quotient and the remainder of the specified numbers. To be added. + + is zero. @@ -3203,6 +3207,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 Produces the quotient and the remainder of two unsigned 16-bit numbers. The quotient and the remainder of the specified numbers. To be added. + + is zero. @@ -3256,6 +3262,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 Produces the quotient and the remainder of two unsigned 32-bit numbers. The quotient and the remainder of the specified numbers. To be added. + + is zero. @@ -3309,6 +3317,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 Produces the quotient and the remainder of two unsigned 64-bit numbers. The quotient and the remainder of the specified numbers. To be added. + + is zero. @@ -3377,6 +3387,8 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 Produces the quotient and the remainder of two unsigned native-size numbers. The quotient and the remainder of the specified numbers. To be added. + + is zero.