• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trigonometric Problem, Particularly tan() Function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trigonometric Problem, Particularly tan() Function


  • Subject: Re: Trigonometric Problem, Particularly tan() Function
  • From: Patrick Walker <email@hidden>
  • Date: Sun, 13 Jul 2008 01:43:14 -0300

Yes, I'm aware that you need to supply radians.

Everthing appears to be fine when going from 0 to 45 degrees but at 90 degrees, the tangent returns -22877334.

I've even tried doing the tan(x) = sin(x) / cos(x) approach.


On 13-Jul-08, at 1:36 AM, Ivan Kourtev wrote:

Just to make sure, you are aware those functions from math.h take arguments in radians, and not degrees, right?

--
ivan

On Jul 13, 2008, at 12:30 AM, Patrick Walker wrote:

For some reason, using standard trigonometric functions are not behaving as they should once you hit 90 degrees. I'm not importing another framework/library and assuming the ones I'm calling are the same ones found in the standby "math.h". The functions return correct values until you reach odd multiples of 90 degrees when one should not be getting finite values as I am getting.

I'm assuming that the functions that I am using are basically from math.h and using a Taylor-like numerical method.

Any suggestions or alternatives? I've looked/searched through the documentation and have not found any other options.

Thank you for your time.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Trigonometric Problem, Particularly tan() Function
      • From: Jens Alfke <email@hidden>
    • Re: Trigonometric Problem, Particularly tan() Function
      • From: "Michael Ash" <email@hidden>
    • Re: Trigonometric Problem, Particularly tan() Function
      • From: Graham Cox <email@hidden>
References: 
 >Trigonometric Problem, Particularly tan() Function (From: Patrick Walker <email@hidden>)
 >Re: Trigonometric Problem, Particularly tan() Function (From: Ivan Kourtev <email@hidden>)

  • Prev by Date: Re: NSURLConnection substitutes characters?
  • Next by Date: Re: Click to edit
  • Previous by thread: Re: Trigonometric Problem, Particularly tan() Function
  • Next by thread: Re: Trigonometric Problem, Particularly tan() Function
  • Index(es):
    • Date
    • Thread