etc/lib.c
// division nan or zero else multiply numerator by 10 until denomiator fits without a remainder(max 18 digits of precision so exit early), if exponent > 0 normalize such that cof:exp 2:1 becomes 20:0 i.e 20
division nan or zero else multiply numerator by 10 until denomiator fits without a remainder(max 18 digits of precision so exit early), if exponent > 0 normalize such that cof:exp 2:1 becomes 20:0 i.e 20
division nan or zero else multiply numerator by 10 until denomiator fits without a remainder ( max 18 digits of precision so exit early ) if exponent > 0 normalize such that cof : exp 2 : 1 becomes 20 : 0 i . e 20
i64 any_to_div (i64 rax, i64 rbx) {
	if ((eax = any_to_exp(rax)) == -128 || (ebx = any_to_exp(rbx)) == -128) {
		return 0;
	} else if ((rax = any_to_cof(rax)) == 0 || (rbx = any_to_cof(rbx)) == 0) {
		return 0;
	} else if (exp = 18) {
		do {
			if (!int_to_div(rax, rbx, cof) || int_to_mul(rax, 10, rdx)) break; rax = rdx; eax = eax - 1;
		} while (--exp);
		if ((exp = eax - ebx) > 0) {
			do {
				if (int_to_mul(cof, 10, rdx)) break; cof = rdx;
			} while (--exp);
		} else if (exp < -127) {
			return any_to_fit(cof, exp);
		}
		return any_to_dec(cof, exp);
	}
}
i64 any_to_div ( i64 rax , i64 rbx ) { if ( ( eax = any_to_exp ( rax ) ) == -128 || ( ebx = any_to_exp ( rbx ) ) == -128 ) { return 0 ; } else if ( ( rax = any_to_cof ( rax ) ) == 0 || ( rbx = any_to_cof ( rbx ) ) == 0 ) { return 0 ; } else if ( exp = 18 ) { do { if ( ! int_to_div ( rax , rbx , cof ) || int_to_mul ( rax , 10 , rdx ) ) break ; rax = rdx ; eax = eax - 1 ; } while ( -- exp ) ; if ( ( exp = eax - ebx ) > 0 ) { do { if ( int_to_mul ( cof , 10 , rdx ) ) break ; cof = rdx ; } while ( -- exp ) ; } else if ( exp < -127 ) { return any_to_fit ( cof , exp ) ; } return any_to_dec ( cof , exp ) ; } }
division nan or zero else multiply numerator by 10 until denomiator fits without a remainder(max 18 digits of precision so exit early), if exponent > 0 normalize such that cof:exp 2:1 becomes 20:0 i.e 20
division nan or zero else multiply numerator by 10 until denomiator fits without a remainder ( max 18 digits of precision so exit early ) if exponent > 0 normalize such that cof : exp 2 : 1 becomes 20 : 0 i . e 20