Skip to content

Commit

Permalink
Push qqbar_get_str_nd to qqbar.h
Browse files Browse the repository at this point in the history
  • Loading branch information
albinahlback committed Nov 5, 2024
1 parent 94d3ec8 commit b2128a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/qqbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ void _qqbar_get_fmpq(fmpz_t num, fmpz_t den, const qqbar_t x);
void qqbar_get_fmpq(fmpq_t res, const qqbar_t x);
void qqbar_get_fmpz(fmpz_t res, const qqbar_t x);

char * qqbar_get_str_nd(const qqbar_t x, slong n);

/* Special values */

Expand Down
9 changes: 2 additions & 7 deletions src/qqbar/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
#include "calcium.h"
#include "qqbar.h"

/* FIXME: Should this function be used somewhere? */
#if 0
/* Todo: document, unify and generalize. This is currently only
used for the Python interface, but other wrappers will want
good printing code too. */

void
static void
qqbar_writen(calcium_stream_t out, const qqbar_t x, slong n)
{
acb_t t;
Expand All @@ -34,7 +32,7 @@ qqbar_writen(calcium_stream_t out, const qqbar_t x, slong n)
acb_clear(t);
}

void
static void
qqbar_writend(calcium_stream_t out, const qqbar_t x, slong n)
{
qqbar_writen(out, x, n);
Expand All @@ -50,6 +48,3 @@ char * qqbar_get_str_nd(const qqbar_t x, slong n)
qqbar_writend(out, x, n);
return out->s;
}
#else
typedef int unused_file;
#endif

0 comments on commit b2128a6

Please sign in to comment.