[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fpu] '/' operator




--- Rudolf Usselmann <rudi@asics.ws> wrote:
> 
> I have started to look seriously at your code the
> last couple of days,
> since I have finished fmul now as well.
> 
> I came to the conclusion that I have to write it
> myself, as you have
> absolutely no clue how to do floating point in
> hardware.
> 
> Some of the things that are obviously wrong with
> your code are:
> 1) Exponents. You must add the bias back after you
> subtract the
> exponents. This was pointed out in the mailing list
> before.

but what about this exponent equations:

E1 = e1 - 127
E2 = e2 - 127
E1 - E2 = (e1 - 127 )- (e2 - 127)
E1 - E2 = e1 - 127 - e2 + 127 
        = e1 - e2 
Please correct me if I am wrong

> 2) Why do you add 3 bits at the beginning of the
> exponents ?
> 3) Why do you add 8 bits at the end of both
> fractions ?

I am doing the conversion to the extended format which
is 32 bit for fraction and 11 bit for exp

> 4) The reason you think that the '/' operator does
> not work
> is because you do not understand how to recover
> precision. That
> is done by shifting opa 23 bits to the left.

Could you explaine more because I thought when I added
the 8 bit to the right I am doing shift to the left!!

> 5) You do not handle de-normalized numbers at all.
> 

How did you get this conclusion?

> After I saw the above, I stopped even thinking of
> integrating your
> code and started writing my own. You should continue
> working on it,
> you got a lot of pointers above, and it will a good
> learning experience.
> 
> I suspect to have the entire FPU done in about a
> week, and will post
> the code then.
> 
> rudi
> 
> 
> on 9/3/00 14:53, Jamil Khatib at
> jamilkhatib75@yahoo.com wrote:
> > Hi all,
> > 
> > I checked my fdiv code with Rudi's pattern
> generator,
> > Some of the patterns are working but the others
> are
> > not. I checked the source of the problem and I
> found
> > that the / operator does not produce the expected
> > result. but when I checked teh operands on the
> > MS-calculator I got the same results as the /
> > operator.
> > 
> > Anyhow it seems that teh / operator can not be
> used
> > because teh IEEE div can shift teh exponent while
> > dividing numbers
> > 
> > Note: I am using round to zero now
> > 
> > Do you have anycomment?
> > 
> > Regards
> > Jamil Khatib
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/