We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Division involving negative numbers may have incorrect rounding.
module main import math.big fn main() { // Correct: 123 println(big.integer_from_int(1234) / big.integer_from_int(10)) // Incorrect: -124 println(big.integer_from_int(-1234) / big.integer_from_int(10)) // Correct: -123 println(big.integer_from_int(1234) / big.integer_from_int(-10)) // Incorrect: 124 println(big.integer_from_int(-1234) / big.integer_from_int(-10)) }
123 -123 -123 123
123 -124 -123 124
No response
V 0.4.2 4bc9a8f.f54f156
V full version: V 0.4.2 4bc9a8f.f54f156 OS: macos, macOS, 12.6, 21G115 Processor: 10 cpus, 64bit, little endian, Apple M1 Max
getwd: /Users/elliot/Library/Mobile Documents/comappleCloudDocs/Development/github.com/elliotchance/vsql vexe: /Users/elliot/Downloads/v-5/v vexe mtime: 2023-10-15 18:52:03
vroot: OK, value: /Users/elliot/Downloads/v-5 VMODULES: OK, value: /Users/elliot/.vmodules VTMP: OK, value: /tmp/v_501
Git version: git version 2.37.0 (Apple Git-136) Git vroot status: weekly.2023.41-18-gf54f156d (7 commit(s) behind V master) .git/config present: true
CC version: Apple clang version 14.0.0 (clang-1400.0.29.102) thirdparty/tcc status: thirdparty-macos-amd64 46662e2
Note
You can vote for this issue using the 👍 reaction. More votes increase the issue's priority for developers.
Take into account that only the 👍 reaction counts as a vote. Only reactions to the issue itself will be counted as votes, not comments.
The text was updated successfully, but these errors were encountered:
math.big: fix incorrect division with negative numbers(fix vlang#19585)
a4e3806
math.big: fix incorrect division with negative numbers (fix #19585) (#…
69d62e4
…19587)
Successfully merging a pull request may close this issue.
Describe the bug
Division involving negative numbers may have incorrect rounding.
Reproduction Steps
Expected Behavior
Current Behavior
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.2 4bc9a8f.f54f156
Environment details (OS name and version, etc.)
V full version: V 0.4.2 4bc9a8f.f54f156
OS: macos, macOS, 12.6, 21G115
Processor: 10 cpus, 64bit, little endian, Apple M1 Max
getwd: /Users/elliot/Library/Mobile Documents/com
appleCloudDocs/Development/github.com/elliotchance/vsqlvexe: /Users/elliot/Downloads/v-5/v
vexe mtime: 2023-10-15 18:52:03
vroot: OK, value: /Users/elliot/Downloads/v-5
VMODULES: OK, value: /Users/elliot/.vmodules
VTMP: OK, value: /tmp/v_501
Git version: git version 2.37.0 (Apple Git-136)
Git vroot status: weekly.2023.41-18-gf54f156d (7 commit(s) behind V master)
.git/config present: true
CC version: Apple clang version 14.0.0 (clang-1400.0.29.102)
thirdparty/tcc status: thirdparty-macos-amd64 46662e2
Note
You can vote for this issue using the 👍 reaction. More votes increase the issue's priority for developers.
Take into account that only the 👍 reaction counts as a vote.
Only reactions to the issue itself will be counted as votes, not comments.
The text was updated successfully, but these errors were encountered: