FLINT3.7.0-dev

arb_dump_file, arb_load_file

Synopsis#include <flint/arb.h>
int arb_dump_file(FILE* stream, const arb_t x)source
int arb_load_file(arb_t res, FILE *stream)source

Write x to stream in the format of arb_dump_str, and read it back. Both return nonzero on failure.

The data is delimited by whitespace or end of file, so values written in sequence must be separated by whitespace:

fp = fopen("data.txt", "w");
for (i = 0; i < n; i++)
{
    arb_dump_file(fp, vec + i);
    fprintf(fp, "\n");
}
fclose(fp);

fp = fopen("data.txt", "r");
for (i = 0; i < n; i++)
    arb_load_file(vec + i, fp);
fclose(fp);
Cite this page

The FLINT team, “arb_dump_file, arb_load_file (arb.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arb/arb_dump_file.html (generated 2026-10-20).