Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8170661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:11:52+00:00 2026-06-06T21:11:52+00:00

I am getting a wrong value when I do this NSLog(@cos 90 is %.f,

  • 0

I am getting a wrong value when I do this

NSLog(@"cos 90 is %.f", cos(90.0));

The answer I get is -0. When I did a Google search, this is what I got:

cos(90 radians) = -0.448073616.

However the answer that my Casio calculator gives me is 0, and also when I was growing up as a kid, cos 90 = 0 was drilled into my brain.

Who is right, is it ObjC, Google, or my Casio calculator?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:11:54+00:00Added an answer on June 6, 2026 at 9:11 pm

    It all depends on whether you’re measuring in degrees or radians.

    90 degrees (pi/2 radians) has, as you said, a cosine of 0. That’s pretty much by definition.

    90 radians is 14.323945 times around a circle. The only part that matters is the remainder: 0.323945 of a circle, or 2.035406 radians. The cosine of that is (as you already found) -0.448074. This one isn’t a definition, so the real numbers are irrational, and what I’ve quoted are only approximations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting a wrong output when i alert this, it shows '01' <input
What is wrong with this I am getting EXEC_BAD self.allLessonsArray = [NSArray arrayWithObjects: [NSDictionary
I keep getting this stored procedure error (wrong number or types of the arguments)
Am getting this error message and matched my brackets and couldn't find anything wrong.
I cannot understand why I am getting deadlock in this simple sample.What is wrong
This question is about TimePicker behavior in Android. To get the value of the
I am getting the wrong value on gfee and netpay. SELECT s.id, s.name, c.name
I am getting this Nullable object must have a value. error in this line:
I am trying the atan2 Math Function but i am getting wrong value in
I am getting a Wrong type argument: commandp, (lambda nil (forward-line 5)) here. (global-set-key

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.