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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:55:33+00:00 2026-06-03T14:55:33+00:00

I am trying to understand floating point representations. I do not understand the ‘infinity’

  • 0

I am trying to understand floating point representations. I do not understand the ‘infinity’ ‘NaN’ representations in floating point.
I am looking at the table provided by TopCoder.

Infinity is represented by an exponent of all 1s and a Mantissa of all 0s.

I can only read it as 0^n, and I’m not sure how that tends to infinity.

  • 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-03T14:55:35+00:00Added an answer on June 3, 2026 at 2:55 pm

    You should simply ignore the bit patterns used and treat infinities and NaNs as special values. Unless you do bit-fiddling on your floats (for which I see very little reason to do), you will only encounter these values in the places where the IEEE rules say they should be created, and it will be safe to ignore the question of how the computer represents them. Even if you do more than standard calculations, my guesstimate is that 99% of the time, the bit patterns just don’t matter.

    Of course, none of the above says you should ignore the implementation of standard, finite, non-zero floating point numbers. Although the step from mantissa/exponent to bits in memory is still hardly ever relevant. In the page you linked to, the author claims that “global variables in C++ are initialized to a zero bit pattern” – that is wrong. Global variables of POD type in C++ are initialized with whatever bit pattern is needed for a semantic zero (§3.6.2.2, §8.5.5). I believe the C++ standard does not require any particular bit pattern for any floating-point value.

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

Sidebar

Related Questions

I was trying to understand the floating point representation in C using this code
I am trying to understand floating point arithmetic better and have seen a few
I'm trying to understand how floating point numbers work. I think I'd like to
I'm trying to understand a paper on lossless compression of floating point numbers and
So i'm trying to understand floating point arithmetic with the mantissas and exponents etc
Trying to understand the math of this code snippet. A token is provided which
I'm trying to convert a floating point number to binary representation; how can I
After trying to understand why client code is not rendered in a page (injected
I'm trying to get a basic understanding of floating point operations on x86. I
I am trying to convert an IEEE based floating point number to a MIL-STD

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.