Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Steven Hammer  
#1 Posted : 20 August 2009 16:58:27(UTC)
Steven Hammer

Rank: Newbie

Groups: Registered
Joined: 20/08/2009(UTC)
Posts: 2
Location: UK

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...
lambda1:=atan((mx-z1)/d2)
yields lambda1=-0.02, while
lambda2:=tan((mx-z1)/d2)
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

Edited by user 20 August 2009 17:12:43(UTC)  | Reason: Added math text for examples.

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Andrey Ivashov  
#2 Posted : 20 August 2009 18:41:18(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
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:
Open in SMath Cloud
It's Ok too.

Maybe the reason is in the arguments?

Steven Hammer wrote:
Can 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.
Offline Steven Hammer  
#3 Posted : 20 August 2009 19:48:50(UTC)
Steven Hammer

Rank: Newbie

Groups: Registered
Joined: 20/08/2009(UTC)
Posts: 2
Location: UK

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
Offline Andrey Ivashov  
#4 Posted : 20 August 2009 21:59:52(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
True.
Here is what I found also:







So, no problem there.

Best regards.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.