15 bool parse_kfr(
const char *source,
int length, mpfr_t cx, mpfr_t cy, mpfr_t cz) {
18 char *source2 = strdup(source);
26 if (0 == strncmp(line,
"Re: ", 4)) { sx = line + 4; }
27 if (0 == strncmp(line,
"Im: ", 4)) { sy = line + 4; }
28 if (0 == strncmp(line,
"Zoom: ", 6)) { sz = line + 6; }
31 mpfr_set_prec(cz, 53);
32 mpfr_set_str(cz, sz, 10, MPFR_RNDN);
33 mpfr_d_div(cz, 2.0, cz, MPFR_RNDN);
41 mpfr_set_str(cx, sx, 10, MPFR_RNDN);
42 mpfr_set_str(cy, sy, 10, MPFR_RNDN);
43 mpfr_neg(cy, cy, MPFR_RNDN);