This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 10 posting(s) in 1 day

The following should do the basics of what you want. It would need to be fixed to handle negative values, or to handle negative exponents properly, but it should give you a starting point:

$exp_k = int(ln($a)/ln(10));

$mant_k = $a/10**$exp_a;

You are currently using guest access (Log in)