1 страниц (4 вхождений)
atan and tan functions produce the same result - Сообщения
#1 Опубликовано: 20.08.2009 09:58:27
Hi,
I've created an SMath document that calculates the inverse tan (atan) of another equation. I've noticed (quite by accident) that the tan of the same equation gives the same result as the inverse tan...
[MATH]lambda1:=atan((mx-z1)/d2)[/MATH]
yields lambda1=-0.02, while
[MATH]lambda2:=tan((mx-z1)/d2)[/MATH]
also yields lambda2=-0.02
I've double-checked the values on a calculator and the results should definitely be different.
I've also checked the tan and atan functions by calculating atan(45) and tan(45) in SMath and they yield different results as expected. Maybe there's a problem with the way that variables are handled?
Can I send you the file with the error in it?
Thanks,
Steven
I've created an SMath document that calculates the inverse tan (atan) of another equation. I've noticed (quite by accident) that the tan of the same equation gives the same result as the inverse tan...
[MATH]lambda1:=atan((mx-z1)/d2)[/MATH]
yields lambda1=-0.02, while
[MATH]lambda2:=tan((mx-z1)/d2)[/MATH]
also yields lambda2=-0.02
I've double-checked the values on a calculator and the results should definitely be different.
I've also checked the tan and atan functions by calculating atan(45) and tan(45) in SMath and they yield different results as expected. Maybe there's a problem with the way that variables are handled?
Can I send you the file with the error in it?
Thanks,
Steven
#2 Опубликовано: 20.08.2009 11:41:18
Hello.
I have checked your example into the new internal build:

It's Ok.
Then I've checked old code on the SMath Studio Live:
[LIVE width=212 height=237]http://smath.info/live/?file=587[/LIVE]
It's Ok too.
Maybe the reason is in the arguments?
This is good idea. Please, send your file via e-mail specified in the About Dialog of SMath Studio. I'll check it. Also, please, describe what version of the program do you use.
I will answer you here on the forum afterwards.
Best regards.
I have checked your example into the new internal build:
It's Ok.
Then I've checked old code on the SMath Studio Live:
[LIVE width=212 height=237]http://smath.info/live/?file=587[/LIVE]
It's Ok too.
Maybe the reason is in the arguments?
WroteCan I send you the file with the error in it?
This is good idea. Please, send your file via e-mail specified in the About Dialog of SMath Studio. I'll check it. Also, please, describe what version of the program do you use.
I will answer you here on the forum afterwards.
Best regards.
#3 Опубликовано: 20.08.2009 12:48:50
Ha! I've discovered the problem. It was my maths, not SMath. The results in the file I sent are actually different, but because rounding was set to 3 decimal places, the answers were rounded to the same value.
Thanks for your help.
Steven
Thanks for your help.
Steven
#4 Опубликовано: 20.08.2009 14:59:52
True.
Here is what I found also:



So, no problem there.
Best regards.
Here is what I found also:
So, no problem there.
Best regards.
1 страниц (4 вхождений)
-
Новые сообщения
-
Нет новых сообщений