18 char *source2 = strdup(source);
28 if (0 == strncmp(line,
"precision ", 10)) { sp = line + 10; }
29 if (0 == strncmp(line,
"aspect ", 7)) { sa = line + 7; }
30 if (0 == strncmp(line,
"xmin ", 5)) { sx0 = line + 5; }
31 if (0 == strncmp(line,
"xmax ", 5)) { sx1 = line + 5; }
32 if (0 == strncmp(line,
"ymax ", 5)) { sy1 = line + 5; }
34 if (sp && sa && sx0 && sx1 && sy1) {
38 mpfr_set_prec(cz, 53);
41 mpfr_inits2(p, x0, x1, y1, (mpfr_ptr) 0);
42 mpfr_set_str(x0, sx0, 10, MPFR_RNDN);
43 mpfr_set_str(x1, sx1, 10, MPFR_RNDN);
44 mpfr_set_str(y1, sy1, 10, MPFR_RNDN);
45 mpfr_add(cx, x0, x1, MPFR_RNDN);
46 mpfr_div_2ui(cx, cx, 1, MPFR_RNDN);
47 mpfr_sub(x1, x1, x0, MPFR_RNDN);
48 mpfr_div_d(cz, x1, a * 2, MPFR_RNDN);
49 mpfr_sub(cy, y1, cz, MPFR_RNDN);
50 mpfr_clears(x0, x1, y1, (mpfr_ptr) 0);