improved legaldouble. im using errno the right way now.