I don't see how using a lookup table will help that much.
Firstly I'm splitting the number up into the exponent and a mantissa (0 to 999) which requires a log and an exponential function.
Working out the nearest E24 value (this is corrected later on) only requires an extra multiplication which would be required to index a lookup table anyway.
Here's the fragment of code which does all of the above.
Code:
INPUT "Enter value"; value#
lgval# = LOG(value#) / lgb10' Take log10 of the value.
ex = INT(lgval#)' Exponent is the integer part of log 10 of the value.
dec#= lgval# - ex' store the decimal part of log10.
el = dec#* 24' Work out the nearest preferred number.
mnt = 10 ^ (2 + dec#)' get the mantissa.
ex = ex - 2' Preferred numbers in the array are multiplied by 100 so /100.
Do you know if there's a better way of getting the exponent and mantissa?