mirror of
https://github.com/vale981/arb
synced 2025-03-05 17:31:38 -05:00
Merge branch 'merge_upstream' into dirichlet
This commit is contained in:
commit
45b82b3f5c
1 changed files with 26 additions and 14 deletions
|
@ -15,24 +15,36 @@
|
||||||
void
|
void
|
||||||
acb_fprintn(FILE * file, const acb_t z, long digits, ulong flags)
|
acb_fprintn(FILE * file, const acb_t z, long digits, ulong flags)
|
||||||
{
|
{
|
||||||
arb_fprintn(file, acb_realref(z), digits, flags);
|
if (arb_is_zero(acb_imagref(z)))
|
||||||
|
|
||||||
if ((arb_is_exact(acb_imagref(z)) || (flags & ARB_STR_NO_RADIUS))
|
|
||||||
&& arf_sgn(arb_midref(acb_imagref(z))) < 0)
|
|
||||||
{
|
{
|
||||||
arb_t t;
|
arb_fprintn(file, acb_realref(z), digits, flags);
|
||||||
arb_init(t);
|
}
|
||||||
arb_neg(t, acb_imagref(z));
|
else if (arb_is_zero(acb_realref(z)))
|
||||||
flint_fprintf(file, " - ");
|
{
|
||||||
arb_fprintn(file, t, digits, flags);
|
arb_fprintn(file, acb_imagref(z), digits, flags);
|
||||||
arb_clear(t);
|
flint_fprintf(file, "*I");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flint_fprintf(file, " + ");
|
arb_fprintn(file, acb_realref(z), digits, flags);
|
||||||
arb_fprintn(file, acb_imagref(z), digits, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
flint_fprintf(file, "*I");
|
if ((arb_is_exact(acb_imagref(z)) || (flags & ARB_STR_NO_RADIUS))
|
||||||
|
&& arf_sgn(arb_midref(acb_imagref(z))) < 0)
|
||||||
|
{
|
||||||
|
arb_t t;
|
||||||
|
arb_init(t);
|
||||||
|
arb_neg(t, acb_imagref(z));
|
||||||
|
flint_fprintf(file, " - ");
|
||||||
|
arb_fprintn(file, t, digits, flags);
|
||||||
|
arb_clear(t);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flint_fprintf(file, " + ");
|
||||||
|
arb_fprintn(file, acb_imagref(z), digits, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
flint_fprintf(file, "*I");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue