Decimal floating point to binary floating point
|
12-26-2018, 07:10 AM
Post: #4
|
|||
|
|||
RE: Decimal floating point to binary floating point
Thanks Thomas and Albert,
Perhaps a look-up table, storing m * 2^n, where m,n satisfy m * 2^n = 1.25^N for N element [-99,99]. Then 8.25 * 10^84 = 8.25 * (2^3 * 1.25)^84 = 8.25 * 2^252 * 1.25^84 = 8.25 * 2^252 * m * 2^n from look-up table, so fast = 8.25 * m * 2^(252+n) Then call assembly subroutine (I'm doing mixed C/assembly) converting 8.25 * m to double precision floating point, giving sign bit and fraction and intermediate exponent and add 252+n to it to obtain final exponent. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)