Skip to content
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

regression in the representation of exact real balls returned by arb_get_str #1410

Open
mezzarobba opened this issue Jul 3, 2023 · 1 comment

Comments

@mezzarobba
Copy link
Contributor

mezzarobba commented Jul 3, 2023

Not really a bug, but possibly an unintended side effect of a0f4ad8: With arb 2.22.1, one had

sage: RBF100 = RealBallField(100)
sage: RBF100(10^100)
1.000000000000000000000000000000e+100

whereas with flint 3α, this has become

sage: RBF100 = RealBallField(100)
sage: RBF100(10^100)
[1.000000000000000000000000000000e+100 +/- 1e+65]
@mezzarobba
Copy link
Contributor Author

In C this is

#include <stdio.h>
#include <flint/arb.h>
#include <flint/fmpz.h>

int main(void) {
    fmpz_t i;
    arb_t a;
    char *str;
    fmpz_init(i);
    fmpz_set_ui(i, 10);
    fmpz_pow_ui(i, i, 100);
    arb_init(a);
    arb_set_fmpz(a, i);
    str = arb_get_str(a, 31, 0);
    printf("%s %d\n",
            str,
            arb_is_exact(a));
}

which outputs

[1.000000000000000000000000000000e+100 +/- 1e+65] 1

@mezzarobba mezzarobba changed the title less precise printing of exact real balls regression in the representation of exact real balls returned by arb_get_str Oct 9, 2023
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

No branches or pull requests

1 participant