| ??? 08/28/00 03:14 Read: times |
#4733 - RE: Floating Point Mathematics: |
5 / 2 = 2.5
50h / 02h = 28h 5.0h / 2h = 2.8h bbbb.bbbb / bbbbbbbb = bbbb.bbbb You have to be ready to make adjustments to make interger accumulators handle this. 5 / 3 = 1.667 50h / 03h = 1Bh 5.0h / 3h = 1.Bh bbbb.bbbb / bbbbbbbb = bbbb.bbbb 1.Bh = 0001.1011 1 + 1/2 + 1/8 + 1/16 = 1.6875 the resolution of four bits takes it that close. Of course 5/3 actually continues a sequence of 6s to infinity. Play around with some examples you know and then test it out. I recommend doing this in a spreadsheet until you get the hang of it. Babar, the problem with your example is that your were doing it in base ten. (5*16) / 2 = (2.5*16) Beware of the following and puzzle out why: (5*16) / (2*16) <> (2.5*16) just as 20 * 20 <> 40... it = 400. Play around with this and yor mind will race. :) -Jay C. Box |
| Topic | Author | Date |
| Floating Point Mathematics: | 01/01/70 00:00 | |
| RE: Floating Point Mathematics: | 01/01/70 00:00 | |
| RE: Floating Point Mathematics: | 01/01/70 00:00 | |
| RE: Floating Point Mathematics: | 01/01/70 00:00 | |
| RE: Floating Point Mathematics: | 01/01/70 00:00 | |
RE: Floating Point Mathematics: | 01/01/70 00:00 |



