-
Notifications
You must be signed in to change notification settings - Fork 251
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
Document common trap in arb_set_d
#1786
Comments
I don't know what you specifically mean by "wrong" here, or a "bug".
As |
Reading the provided code and the sagemath link, I think the following addition to the answer of @albinahlback might be useful for @rudolph-git-acc : observe what you get from the following piece of C,
It should yield |
@vneiger Thanks for the clarification. Your example is very helpful and I had never appreciated the "inexact" issue. It is good to be aware of this though and maybe it is worthwhile mentioning it in the documentation of arb_set_d. I have for instance seen it being used in setting integral limits and there it could make a big difference e.g. in a lower limit close to zero. Or for instance in this issue on the old ARB GitHub : flintlib/arb#451 Replacing arb_set_d by are_set_str has an immediate impact on the result. I most certainly don't want to blame FLINT/ARB for having "bugs" or being "wrong" and will include a link to this thread in my AskSageMath question. |
Yes, this should be documented. Thanks for bringing this up! |
arb_set_d
Fixed in 0c07030 |
|
Ref. this AskSagemath-question: https://ask.sagemath.org/question/76066/ghost-numbers-when-using-arb/
When I run this simple code in my IDE:
I obtain:
Only the arb_set_d command seems to induce this issue and only for non-integer values. Is this a bug or an unavoidable effect?
The text was updated successfully, but these errors were encountered: