etc/lib.c
// rounding extract coefficient, exponent, rbx = decimal places to round i.e: -2: cent, 0: integer, 3: thousand, etc, increment exponent and divide coefficient by 10 till target exponent reached, round if necessary
rounding extract coefficient, exponent, rbx = decimal places to round i.e: -2: cent, 0: integer, 3: thousand, etc, increment exponent and divide coefficient by 10 till target exponent reached, round if necessary
rounding extract coefficient exponent rbx = decimal places to round i . e : - 2 : cent 0 : integer 3 : thousand etc increment exponent and divide coefficient by 10 till target exponent reached round if necessary
i64 any_to_rod (i64 rax, i08 rbx) {
	if ((cof = any_to_cof(rax)) == 0 || (exp = any_to_exp(rax)) == -128) {
		return rax;
	} else if (exp < rbx) {
		do {
			if (int_to_div(cof, 10, rdx)) break; cof = rdx;
		} while (++exp < rbx);
	}
	return any_to_dec(cof + (cof & 1), exp);
}
i64 any_to_rod ( i64 rax , i08 rbx ) { if ( ( cof = any_to_cof ( rax ) ) == 0 || ( exp = any_to_exp ( rax ) ) == -128 ) { return rax ; } else if ( exp < rbx ) { do { if ( int_to_div ( cof , 10 , rdx ) ) break ; cof = rdx ; } while ( ++ exp < rbx ) ; } return any_to_dec ( cof + ( cof & 1 ) , exp ) ; }
rounding extract coefficient, exponent, rbx = decimal places to round i.e: -2: cent, 0: integer, 3: thousand, etc, increment exponent and divide coefficient by 10 till target exponent reached, round if necessary
rounding extract coefficient exponent rbx = decimal places to round i . e : - 2 : cent 0 : integer 3 : thousand etc increment exponent and divide coefficient by 10 till target exponent reached round if necessary