Skip to content

Add: add more Biginteger methods#840

Merged
shargon merged 10 commits intoneo-project:masterfrom
Jim8y:biginteger-methods
Dec 19, 2023
Merged

Add: add more Biginteger methods#840
shargon merged 10 commits intoneo-project:masterfrom
Jim8y:biginteger-methods

Conversation

@Jim8y
Copy link
Contributor

@Jim8y Jim8y commented Dec 18, 2023

This pr adds more BigInteger methods:

  • Add
  • Subtract
  • Multiply
  • Divide
  • Negate
  • Remainder
  • Compare

Methods check list:

  • BigInteger.Add(BigInteger, BigInteger)
  • BigInteger.Compare(BigInteger, BigInteger)
  • BigInteger.Divide(BigInteger, BigInteger)
  • BigInteger.DivRem(BigInteger, BigInteger, out BigInteger)
  • BigInteger.Equals(object)
  • BigInteger.Equals(BigInteger)
  • BigInteger.Explicit(BigInteger to byte)
  • BigInteger.Explicit(BigInteger to decimal)
  • BigInteger.Explicit(BigInteger to double)
  • BigInteger.Explicit(BigInteger to short)
  • BigInteger.Explicit(BigInteger to int)
  • BigInteger.Explicit(BigInteger to long)
  • BigInteger.Explicit(BigInteger to sbyte)
  • BigInteger.Explicit(BigInteger to float)
  • BigInteger.Explicit(BigInteger to ushort)
  • BigInteger.Explicit(BigInteger to uint)
  • BigInteger.Explicit(BigInteger to ulong)
  • BigInteger.GreatestCommonDivisor(BigInteger, BigInteger)
  • BigInteger.GetHashCode()
  • BigInteger.GetType()
  • BigInteger.Implicit(byte to BigInteger)
  • BigInteger.Implicit(decimal to BigInteger)
  • BigInteger.Implicit(double to BigInteger)
  • BigInteger.Implicit(short to BigInteger)
  • BigInteger.Implicit(int to BigInteger)
  • BigInteger.Implicit(long to BigInteger)
  • BigInteger.Implicit(sbyte to BigInteger)
  • BigInteger.Implicit(float to BigInteger)
  • BigInteger.Implicit(ushort to BigInteger)
  • BigInteger.Implicit(uint to BigInteger)
  • BigInteger.Implicit(ulong to BigInteger)
  • BigInteger.Max(BigInteger, BigInteger)
  • BigInteger.Min(BigInteger, BigInteger)
  • BigInteger.ModPow(BigInteger, BigInteger, BigInteger)
  • BigInteger.Multiply(BigInteger, BigInteger)
  • BigInteger.Negate(BigInteger)
  • BigInteger.OnesComplement(BigInteger)
  • BigInteger.Parse(string)
  • BigInteger.Parse(string, IFormatProvider)
  • BigInteger.Parse(string, NumberStyles)
  • BigInteger.Parse(string, NumberStyles, IFormatProvider)
  • BigInteger.Pow(BigInteger, int)
  • BigInteger.Remainder(BigInteger, BigInteger)
  • BigInteger.Subtract(BigInteger, BigInteger)
  • BigInteger.ToString()
  • BigInteger.ToString(IFormatProvider)
  • BigInteger.ToString(string)
  • BigInteger.ToString(string, IFormatProvider)
  • BigInteger.TryParse(string, out BigInteger)
  • BigInteger.TryParse(string, NumberStyles, IFormatProvider, out BigInteger)

@Jim8y Jim8y requested a review from shargon December 18, 2023 11:50
shargon and others added 5 commits December 18, 2023 11:15
…ck-dotnet into biginteger-methods

* 'biginteger-methods' of github.com:Liaojinghui/neo-devpack-dotnet:
  Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_BigInteger.cs
  Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_BigInteger.cs
  Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_BigInteger.cs
  Apply suggestions from code review
@shargon shargon merged commit e51c648 into neo-project:master Dec 19, 2023
@Jim8y Jim8y deleted the biginteger-methods branch September 18, 2024 15:34
Jim8y added a commit that referenced this pull request Aug 3, 2025
* add more Biginteger methods
* add BigInteger.GreatestCommonDivisor
* Apply suggestions from code review
* Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_BigInteger.cs
* Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_BigInteger.cs
* Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_BigInteger.cs
* mistakenly changed the name
* optimize the code to save GAS.
* further optimize the GAS
---------
Co-authored-by: Shargon <shargon@gmail.com>
Jim8y added a commit that referenced this pull request Aug 18, 2025
* add more Biginteger methods

* add BigInteger.GreatestCommonDivisor

* Apply suggestions from code review

* Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_BigInteger.cs

* Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_BigInteger.cs

* Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_BigInteger.cs

* mistakenly changed the name

* optimize the code to save GAS.

* further optimize the GAS

---------

Co-authored-by: Shargon <shargon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants