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

  • SEARCH
  • Home
  • 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 7003609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:05:29+00:00 2026-05-27T21:05:29+00:00

I need a variable a = 6700000^2 * (a – b) (2 + sinf(a)+

  • 0

I need a variable a = 6700000^2 * (a - b) (2 + sinf(a)+ s inf(b)), where a and b are floats between -7 to 7. I need all the precision that floats can give me.

Which data type should a be? Is the sinf the proper function to get the best precision out of a and b? And should a and b be in radians or degrees?


Well I Made a mistake when I posted the expression, the correct expression is c=67000000^2*(a-b)(2+sinf(a)+sinf(b)) and my problem is with c .”a” and “b” are floats and they are passed to me as floats, they really are coordinates (latitude and longitude) so thats not my concern… My concern is when using sinf on them do I lose any precision? And which type should c be so I don’t lose precision cause I’m using a long double variable d to store a sum of multiple different c variables and d is returned to me as being zero and it shouldn’t (sould be about 1 or 2 )so I was gessing I was losing some precision when calculating the c parcels…I was using c as being a double…can it be that I am losing some precision when calculating c?

Thank you very much for your help.

  • 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-05-27T21:05:30+00:00Added an answer on May 27, 2026 at 9:05 pm

    Instead of using float, you should use a double if you want no worries in regards to memory. Remember to then change sinf() to sin() and use radians.

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

Sidebar

Related Questions

I need a variable that shared between reduce tasks and each of reduce tasks
I need a variable that is available from any function in my code, but
In a javascript file (e.g. script.js) I need a variable that contains the absolute
I need to assign a variable which will be used to create the id
I need to set a system environment variable from a Bash script that would
I know that strings have variable length, therefore they need variable space in memory
I need a variable that represents an interface. I was wondering if there is
I need to a variable which holds a 24 bits value, what should I
I need a Global variable/class that stores some basic information about the currently logged
Do I only prefix var names with @ if I need that variable in

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.