-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
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
Fail to run Q# program because an dotnet runtime error #81679
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/area-system-numerics Issue DetailsDescriptionWhen running the program in this issue, it went wrong with a runtime exception We tried to import Here are the error message:
Can you give me some suggestion about why this program run failure? Reproduction StepsRun the program.
Expected behavior1 Actual behaviorUnhandled exception. System.DivideByZeroException: Attempted to divide by zero. Regression?No response Known WorkaroundsNo response Configurationdotnet version:6.0.400 os version:Windows10 & Ubuntu18.04 QDK version:0.27.253010 Other informationNo response
|
This is a definition problem of the modulus operator:
In other words, you're asking the code to perform
Not sure what you were doing here, but this sounds like a more serious problem, because the exception should have been thrown. As designed, not a bug in the core libraries. |
This issue has been marked |
This issue has been automatically marked |
This issue will now be closed since it had been marked |
Description
When running the program in this issue, it went wrong with a runtime exception
System.DivideByZeroException: Attempted to divide by zero
.We tried to import
ModPowL
as a user-defined API and call it, but it did not get the same exception, meaning that the content inModPowL
was right. Moreover, we found that the error message point to something error in this page.Here are the error message:
Can you give me some suggestion about why this program run failure?
Reproduction Steps
Run the program.
Expected behavior
1
0
0
1
Actual behavior
Unhandled exception. System.DivideByZeroException: Attempted to divide by zero.
---> NISLNameSpace.main on /home/htm/qsharpProject/quantumDemo3/Program.qs:line 10
Regression?
No response
Known Workarounds
No response
Configuration
dotnet version:6.0.400
os version:Windows10 & Ubuntu18.04
QDK version:0.27.253010
Other information
No response
The text was updated successfully, but these errors were encountered: