#### Do you have a question? Post it now! No Registration Necessary

**posted on**

- Salman Sheikh

August 27, 2003, 1:06 pm

Hello,

I have a large number division to perform and need to keep 2 to 3 digits of

accuracy beyond the decimal point. The result will always be some fraction

number between 1.000 and 192.000.

For example a typical set of division will be:

40189861/1947555 = 20.6360595721302 (need 20.636)

19399957/1948400 = 71.5458617327038 (need 71.546)

238466182/1947387 = 122.454438691436 (need 122.454)

337495643/1946746 = 173.363984310228 (need 173.364)

I have found in Simulink that this requires 31 bit for the numerator and 24

bits for the denominator. I also found that to keep the answer accurate to

about 3 places requires a 46 bit number consisting of 8 bits for the

integer portion and the remaining 38 bits to keep the 3 decimal place

fractional portion. I tried using the pipelined divider core from Xilinx

Core Generator but that only gives me an 8 bit integer with at most 32 bit

fractional remainder. That does not cut it. What can I do? Any help is

greatly appreciated.

Salman

"Even a smile is charity."

I have a large number division to perform and need to keep 2 to 3 digits of

accuracy beyond the decimal point. The result will always be some fraction

number between 1.000 and 192.000.

For example a typical set of division will be:

40189861/1947555 = 20.6360595721302 (need 20.636)

19399957/1948400 = 71.5458617327038 (need 71.546)

238466182/1947387 = 122.454438691436 (need 122.454)

337495643/1946746 = 173.363984310228 (need 173.364)

I have found in Simulink that this requires 31 bit for the numerator and 24

bits for the denominator. I also found that to keep the answer accurate to

about 3 places requires a 46 bit number consisting of 8 bits for the

integer portion and the remaining 38 bits to keep the 3 decimal place

fractional portion. I tried using the pipelined divider core from Xilinx

Core Generator but that only gives me an 8 bit integer with at most 32 bit

fractional remainder. That does not cut it. What can I do? Any help is

greatly appreciated.

Salman

"Even a smile is charity."

#### Site Timeline

- » Please help me!!!!! ModelSim question...
- — Next thread in » Field-Programmable Gate Arrays

- » Max finding
- — Previous thread in » Field-Programmable Gate Arrays

- » Need Help regarding I2C Protocol testbench
- — Newest thread in » Field-Programmable Gate Arrays

- » How do you read digital inputs from microswitch, jumpers, dip-switches...?
- — The site's Newest Thread. Posted in » Embedded Programming