Skip to content

modmul operation returns wrong results for negative numbers #3598

@Slava0135

Description

@Slava0135

Current Behavior

For negative numbers operation returns wrong results (compared to C#).

100 * -1 % -91 == 82

image

Expected Behavior

C# results:

100 * -1 % -91 == -9

Possible Solution

Steps to Reproduce

  1. ./bin/neo-go vm
  2. loadbase64 AGQA/wClpQ==
  3. run

Your Environment

  • Version of the product used: master (c960a7e)

Metadata

Metadata

Assignees

No one assigned

    Labels

    I4No visible changesS4RoutineU1Critically important to resolve quicklybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions