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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:11:39+00:00 2026-06-14T12:11:39+00:00

Given 3 IEEE-754 floats a, b, c that are not +/-INF and not NaN

  • 0

Given 3 IEEE-754 floats a, b, c that are not +/-INF and not NaN and a < b, is it safe to assume that a – c < b – c?
Or, can you give an example when this is incorrect?

  • 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-14T12:11:40+00:00Added an answer on June 14, 2026 at 12:11 pm

    Suppose a is approximately 0.00000000000000001, b is approximately 0.00000000000000002, and c is 1. Then a − c and b − c will both equal −1.

    (That’s assuming double-precision, a.k.a. 64-bit, values. For higher-precision values, you’ll need to add some more zeroes.)


    Edited to add explanation:

    If we ignore denormalized values and not-a-number values and infinities and so on, and just focus on IEEE 754 double-precision floating-point value for the sake of having something concrete to look at, then — in terms of the binary representation, a floating-point value consists of a sign bit s (0 for positive, 1 for negative), an eleven-bit exponent e (with an offset of 1023, such that e=0 means 2−1023 and e=1023 means 20, i.e. 1), and a 52-bit fixed-point significand m (representing 52 places past the binary point, so it ranges from [0,1) with finite precision). The actual value of the representation is therefore (−1)s × (1 + m) × 2e−1023.

    Because the significand is fixed-point, and has a fixed number of bits, the precision is very finite. A value like 1.00000000000000001 and a value like 1.00000000000000002 are identical for very many places past the decimal — more places than a double-precision significand can hold.

    When you perform addition or subtraction between a very large number and a very small number (relative to each other: in our example, 1 is “very large”; alternatively, we could have used 1 as the very small value and chosen a very large value of 10000000000000000), the resulting exponent is going to be determined almost entirely by the very large number, and the significand of the very small number has to get scaled appropriately. In our case, it gets divided by about 1017; so it simply disappears. The significand doesn’t hold enough bits to be able to distinguish that.

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

Sidebar

Related Questions

Essentially, my question is: can this not be done any easier? ; and what
Given the above dynamically generated text (meaning that I can't just use an image),
I wrote this code to do the IEEE 754 floating point arithmetic on a
Does anyone know of a JavaScript library that accurately implements the IEEE 754 specification
I'm dealing with converting floats from CCS, which does not follow the IEEE standard
Given this example in Python sample = '5PB37L2CH5DUDWN2SUOYE6LJPYCJBFM5N2FGVEHF7HD224UR52KB====' a = base64.b32decode(sample) b = base64.b32encode(a)
I would like to know whether i can assume that same operations on same
I don't understand how I can add in IEEE 754 Floating Point (mainly the
Given an arbitrary number represented in the IEEE-754 single-precision format (commonly known as float
Many programming languages that use IEEE 754 doubles provide a library function to convert

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.