[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] Re: Add items on TODO
From: |
E. Weddington |
Subject: |
Re: [avr-libc-dev] Re: Add items on TODO |
Date: |
Wed, 30 Oct 2002 09:33:56 -0700 |
On 30 Oct 2002 at 13:19, Joerg Wunsch wrote:
> As Theodore A. Roth wrote:
>
> [the asin() problem]
>
> > My investigation seemed lead to there not being a clear
> > understanding of the format of the floats. gcc uses ieee format
> > floats so 1.0 looks like 0x3f800000, while the asin() implementation
> > seems to think 1.0 is 0x7f000000.
>
> Nope. asin() uses 0x3f800001 to denote a ``number slightly larger
> than 1.0''. This is correct. The 0x7f you're seeing atop is masking
> out the sign of the operand. The 0x3f800001 is micro-optimized and
> not displayed completely, i. e. the third byte is taken from
> __zero_reg__ instead (obfuscated as "rT1c" in the source).
>
> So the problem is indeed that the implemented algorithm becomes fairly
> inaccurate for small numbers.
Joerg,
Any thoughts then on re-implementing asin() as an atan2() function?
The biggest issue that I can see is that atan2 is huge in comparison.
But I'd rather have a (more) accurate function than a small one
that's incorrect.
Eric
- [avr-libc-dev] Re: Add items on TODO, Theodore A. Roth, 2002/10/22
- Re: [avr-libc-dev] Re: Add items on TODO, Joerg Wunsch, 2002/10/23
- Re: [avr-libc-dev] Re: Add items on TODO, Joerg Wunsch, 2002/10/30
- Re: [avr-libc-dev] Re: Add items on TODO,
E. Weddington <=
- Re: [avr-libc-dev] Re: Add items on TODO, Joerg Wunsch, 2002/10/30
- Re: [avr-libc-dev] Re: Add items on TODO, E. Weddington, 2002/10/30
- Re: [avr-libc-dev] Re: Add items on TODO, Joerg Wunsch, 2002/10/30
- Re: [avr-libc-dev] Re: Add items on TODO, E. Weddington, 2002/10/30
- Re: [avr-libc-dev] Re: Add items on TODO, Joerg Wunsch, 2002/10/30
- Re: [avr-libc-dev] Re: Add items on TODO, E. Weddington, 2002/10/30
- Re: [avr-libc-dev] Re: Add items on TODO, Theodore A. Roth, 2002/10/30
- Re: [avr-libc-dev] Re: Add items on TODO, E. Weddington, 2002/10/30