avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] [bug #24890] Small error in libm source fp_rempio2.S


From: Ruud
Subject: [avr-libc-dev] [bug #24890] Small error in libm source fp_rempio2.S
Date: Fri, 21 Nov 2008 09:34:39 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4

Follow-up Comment #2, bug #24890 (project avr-libc):

Hi DMitry
You may also want to leave out


  ; compare A with Pi/2
...
        ldi     rB1,  hi8(SPLIT_PIO2 + 1)
        ldi     rB2, hlo8(SPLIT_PIO2 + 1)
        ldi     rB3, hhi8(SPLIT_PIO2 + 1)
        cpi     rA0,  lo8(SPLIT_PIO2 + 1)
        cpc     rA1, rB1
        cpc     rA2, rB2
        cpc     rA3, rB3
        brlo    .L_pack                 ; A < Pi/2 ==> return A

Or replace it with a exponent test only.. This will in general increase the
performance and is shorter code.

Also the answer to the question:

        /* FIXME: Is it possible to obtain a zero value in rA2.1.0.E ?
           I do't known. So, there is a check in exponent decrement.    */

I do know, it is NO.. The minimum value of RA2....= 0x0000000E

:-)trust me

Anyway I wanted to suggest revising the sine, cosine routines because they
aren't all that accurate and can be speeded up considerably. This would also
introduce a small change in fp_rempio2 (and some other functions which rely on
powsodd, so isn't it perhaps better if you let me handle fp_rempio2 ???

Regards
Ruud

ps. Sorry for the long text  

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?24890>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]