LF: Re: programming stuff


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

LF: Re: programming stuff



Hum! 
Sorry to break your dreams (does that mean anything?), 
but aren't Taylor polys used to calculate an expression around 0?
Well, this expression is used for x around 0 at least ( I had a long long
math lesson 
about that...) When the var tends to 0, the expression cos x = x + x^2/2
+... is true,
but not around 1 ( 1+.5 > 1 , which is quite strange for a cos, aint it)
Just ask your TI, around 1 : taylor ( cos(x),x,4,1 )
If you want, I can explain it to you, but precalcs arrays are better and
faster...

--
En français :
Mathieu, je crois que les développements limités que tu utilises ne sont
valables que quand x tend vers 0. j'en suis même sûr ( j'ai fais un gros
chapitre de
maths la dessus).
En 0, cos x = x+x^2/2, mais en 1, par exemple c faux :
1+ (1^2)/2 +... > 1, et c plutot bizarre pour un cos, non?
t'a qu'a demander à ta TI en 1, ( taylor ( cos(x),x,4,1) )...
Si tu veux, je peux t'expliquer comment on fait,
mais je crois que faire des tables, c ce qu'il ya de mieux et de
plus rapide..


(bWan

----------
De : Hmlacage@aol.com
A : list-fargo@lists.ticalc.org
Objet : LF: programming stuff
Date : jeudi 26 juin 1997 19:57

Sorry to disturb....
I am working on a trig lib which would really calculate sine and cosine
values. ( the one which is available just stores values in an array... ) I
am
using " limited developpements" ( ?... ) ( am not sure about the spelling
and
the expression itself. ) U know: cos(x) = x + x^2 / 2 + ...
So: the prog i wrote just can' t be compiled...
here is what' s wrong: 
exerpt from " list.txt "

>000018	33FC 0001 000000BC	    134    move.w  #1,K     
>000020	33FC 0001 000000BD	    135    move.w  #1,nume         ;  
>Alignment error.			                                             ^ lib.asm
line 10>000028	3200

and "K" and "nume" are 	defined as

>0000BC	00			    186 K:      dc.b 0
>0000BD	00			    187 nume:   dc.b 0

nume and K are thus defined exactly in the same way and are used exactly in
the same way: what is wrong ? 
For more detail, i have attached the source file ( lib.asm )  to this Email

One more thing: i have had many " adressing mode not allowed here": this
means that i cannot use a certain data with the specified instruction ? 

One thing more: in the 68k guide ( really great ! thanks jimmy mardel ! ) ,
there are some "#" and "$" symbols used. "#" stands for "immediate" and "$"
for "adress" ?

Thanks for answering...
Mathieu, <hm lacage@aol.com>      
----------