Fri 21 Nov 2008 09:34:38 AM UTC, comment #2:
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
|