/* intl = bytes for integer part (1, 2, or 4) */ void init_bf_length(int bnl) { bnlength = bnl; if (fractype == FPMANDELZPOWER || fractype == FPJULIAZPOWER) intlength = 2; /* the bailout tests need greater dynamic range */ else if(bailoutest == Real || bailoutest == Imag || bailoutest == And) intlength = 2; else intlength = 1; /* conservative estimate */ decimals = (int)((bnlength-intlength)*LOG10_256); init_bf_2(); }
void init_bf_dec(int dec) { if(bfdigits) decimals=bfdigits; /* blindly force */ else decimals = dec; if (fractype == FPMANDELZPOWER || fractype == FPJULIAZPOWER) intlength = 2; /* the bailout tests need greater dynamic range */ else if(bailoutest == Real || bailoutest == Imag || bailoutest == And) intlength = 2; else intlength = 1; /* conservative estimate */ bnlength = intlength + (int)(decimals/LOG10_256) + 1; /* round up */ init_bf_2(); }
/* intl = bytes for integer part (1, 2, or 4) */ void init_bf_length(int bnl) { bnlength = bnl; if(bailout > 10) /* arbitrary value */ /* using 2 doesn't gain much and requires another test */ intlength = 4; else if (fractype == FPMANDELZPOWER || fractype == FPJULIAZPOWER || fractype == DIVIDEBROT5) intlength = 4; /* 2 leaves artifacts in the center of the lakes */ /* the bailout tests need greater dynamic range */ else if(bailoutest == Real || bailoutest == Imag || bailoutest == And || bailoutest == Manr) intlength = 2; else intlength = 1; /* conservative estimate */ decimals = (int)((bnlength-intlength)*LOG10_256); init_bf_2(); }
void init_bf_dec(int dec) { if(bfdigits) decimals=bfdigits; /* blindly force */ else decimals = dec; if(bailout > 10) /* arbitrary value */ /* using 2 doesn't gain much and requires another test */ intlength = 4; else if (fractype == FPMANDELZPOWER || fractype == FPJULIAZPOWER || fractype == DIVIDEBROT5) intlength = 4; /* 2 leaves artifacts in the center of the lakes */ /* the bailout tests need greater dynamic range */ else if(bailoutest == Real || bailoutest == Imag || bailoutest == And || bailoutest == Manr) intlength = 2; else intlength = 1; /* conservative estimate */ bnlength = intlength + (int)(decimals/LOG10_256) + 1; /* round up */ init_bf_2(); }