Decimal floating point to binary floating point
12-26-2018, 07:10 AM
Post: #4
 Dan Member Posts: 162 Joined: Jan 2017
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 »

 Messages In This Thread Decimal floating point to binary floating point - Dan - 12-25-2018, 04:06 AM RE: Decimal floating point to binary floating point - Thomas Klemm - 12-25-2018, 08:32 AM RE: Decimal floating point to binary floating point - Albert Chan - 12-25-2018, 11:37 PM RE: Decimal floating point to binary floating point - Dan - 12-26-2018 07:10 AM RE: Decimal floating point to binary floating point - Paul Dale - 12-26-2018, 07:51 AM RE: Decimal floating point to binary floating point - Dan - 01-03-2019, 06:53 AM RE: Decimal floating point to binary floating point - Dan - 12-26-2018, 08:46 AM RE: Decimal floating point to binary floating point - BruceH - 12-30-2018, 05:46 PM RE: Decimal floating point to binary floating point - SlideRule - 12-30-2018, 11:36 PM RE: Decimal floating point to binary floating point - Thomas Klemm - 12-26-2018, 11:14 AM RE: Decimal floating point to binary floating point - Dan - 12-28-2018, 03:45 AM RE: Decimal floating point to binary floating point - Paul Dale - 12-28-2018, 09:33 AM RE: Decimal floating point to binary floating point - Dan - 01-01-2019, 07:27 AM

User(s) browsing this thread: 1 Guest(s)