here is example of what i'm doing :
IV setbounds(mpf_t upper,mpf_t lower,mpf_t target){
copf(upper,target);copf(lower,target);addfui(upper,1);int smult=mpf_get_prec(target)+1;
mpf_mul_2exp(upper,upper,smult);mpf_mul_2exp(lower,lower,smult);
subfui(upper,INTSMAX);addfui(lower,INTSMAX);int cmpv=mpf_cmp(upper,lower);
if(cmpv<=0){printf("Setbounds failed: target too small\n");exit(2);};}
This function eliminates dozens of similar declaration in sources, while providing a clean,consistent interface.
______________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
The great moral question of the twenty-first century is this: if all knowing, all culture, all art, all useful information can be costlessly given to everyone at the same price that it is given to anyone; if everyone can have everything, anywhere, all the time, why is it ever moral to exclude anyone?