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 8952883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:58:20+00:00 2026-06-15T13:58:20+00:00

I am confused as to why there can be rounding errors in floating point

  • 0

I am confused as to why there can be rounding errors in floating point numbers. Can someone show me an example or two? What are their min and max values? Does that mean I get every (well not every..if not how much?) number and decimal in between the min/max?

So if I wanted to hold a population of a country. i.e. USA, should I choose ints over floats for this purpose or would they have no effect. Memory, efficiency, taken into account. And what would be the answer if are not taken into account? The population count will be whole numbers.

These are questions are quite rudimentary, and on the web in lengthy detail, but I am just having trouble piecing them together as they get really complicated.

Thank you for your time.

PS: Please let me know via comment if this questions is badly worded. I will edit so it can get clearer.

  • 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-15T13:58:21+00:00Added an answer on June 15, 2026 at 1:58 pm

    No you cannot should not use float. Both float & int are 32 bit storage types & you gain nothing range wise.

    For example, if the max value of signed int 2147483647 is tried as a float gives you 2.14748e+09

    So if it was a population count you lost the 3647.

    The best you can use is a 64 bit type int (type long long in C/C++) in cases for a longer range.

    Edit:

    Regarding Efficiency, the most efficient type is always the int with word size of a machine.

    Floating point numbers require the machine to use a math processing unit additionally.

    So if it’s a 32 bit machine, int 32 bit is the fastest & most efficient.

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

Sidebar

Related Questions

Possible Duplicate: Concatenate Two NSDate String values Just confused that is there any default
I'm a little bit confused about these two terms, can somebody explain what is
I'm a little confused about the rules regarding restricted pointers. Maybe someone out there
Please advise if i'm confused but is there any point of having a transition
Playing around with MongoDB and NoRM in .NET. Thing that confused me - there
I am confused with 1 thing related with maps that: There are 2 ways
I'm confused about this. Most of us have been told that there isn't any
I'm new to struts2 and confused by the '#','%' and '$' element. There are
I'm fairly new to programming, and there's one thing I'm confused by. What is
I am studying the CodeCampServer. I am confused about the ASP.NET MvcContrib.CommandProcessor.RulesEngine. Are there

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.