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

Re: [fpu] '/' operator




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.
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 ?
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.
5) You do not handle de-normalized numbers at all.

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