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

Re: [fpu] '/' operator



on 9/3/00 20:13, Jamil Khatib at jamilkhatib75@yahoo.com wrote:
> 
>> 
>> No, no, no, the default equation for the exponent
>> is:
>> exp_result = expa - expb + 127;
>> 
> Why? can you explain more?

I really don't have the time right now, too many projects.
Get a good book !

>>> I am doing the conversion to the extended format
>> which
>>> is 32 bit for fraction and 11 bit for exp
>> 
>> That is wrong. There is no need to convert to
>> extended format.
>> 
> I thought that the standard mentioned that, and we
> discussed it on the mailing list and no one said that
> I should not do it!!!

No it does not. The standard does not say anything about
how to implement it. Only the behavior is described.

>>>> 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!!
>> 
>> Yes, I understand that, but it's still wrong. You
>> want to
>> add 23 bit to opa, and none to opb.
>> 
> why? 

Do you really don't understand that ??? OK, lets do this
example:
Integer division of 7/5 results in 1, right ?
If you want higher precision, you can do:

(7*10)/5=14 and then divide the result by 10.

Now think of the multiply and divide by 10 as a shift
left and a shift right.

 
> Anyhow is there is real bugs they could be fixed from
> the begining I posted my code lot of times before but
> I did not get any comment? where is the cooperation?

Now hold on. You can not expect for everybody to be fixing
your shit. Cooperation lies in you asking questions and
others answering them, just as I have been doing.
You can not expect people explain and educate you in basic
concepts, such as math.

> 
> Jamil Khatib

rudi