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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:38:45+00:00 2026-05-28T06:38:45+00:00

Why is a divide underflow only caused when the divisor is much smaller than

  • 0

Why is a divide underflow only caused when the divisor is much smaller than the dividend, shouldn’t it occur anytime the denominator is close enough to zero regardless of the size of the dividend?

  • 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-28T06:38:46+00:00Added an answer on May 28, 2026 at 6:38 am

    From http://www.strw.leidenuniv.nl/docs/intel/f_ug/ieee_ovw.htm

    The underflow exception occurs if the rounded result has an exponent
    that is too small to be represented using the floating-point format of
    the result.

    This implies that the error occurrs when the ratio of the dividend and divisor is small enough to exceed the precision of the floating point format, rather than any dependence on a specific value such as epsilon.

    As the denominator approaches zero, assuming a non-zero numerator, the result of a division will approach infinity. As the numerator approaches zero, assuming a non-zero denominator, the result approaches zero. When this value gets small enough, an will occurr.

    If the numerator and denominator are very close in value, even if they are very small, you can get a useful result, so a very small numerator does not necessarily cause an underflow.

    Example:

    In C#, epsilon is 1.401298E-45.

    epsilon/epsilon == 1.0f

    Even though the numerator is very, very small, the result is still a valid float.

    Now, if you were to try something like this:

    float max = 3.40282347E+38f;
    
    /// underflow, denominator will be 0.0f
    float denominator = epsilon / max; 
    

    denominator will have an order of 1e-83. Since 83 far exceeds the maximum single-precision float exponent, the value will be clamped to zero. This is where the underflow occurrs.

    /// generates a divide-by-zero error.
    float result = 10 / denominator; 
    

    This generates a divide-by-zero instead of infinity, because the intermediate result, stored in denominator, is first clamped to 0 before being used in the second operation.

    Whether you get an underflow or a divide-by zero can depend on the compiler, your use and order of parenthisis, etc.

    For instance, again in C#:

    10f / float.Epsilon / float.MaxValue
    

    as well as

    (10f / float.Epsilon) / float.MaxValue
    

    gives 20971522.0f.

    However, the mathematically equivelant expression:

    10f / (float.Epsilon / float.MaxValue)
    

    gives Infinity.

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

Sidebar

Related Questions

Consider the following signature in C#: double Divide(int numerator, int denominator); Is there a
I am trying to divide two numbers, a numerator N by a divisor D.
I am wondering how could i divide my ListView in parts and display only
I've to divide a text into portions. Text contains only paragraphs ( p tags
All numbers that divide evenly into x. I put in 4 it returns: 4,
I think I divide it because css grew big, and to do import. @import
how can I divide the header and implementation of a global function? My way
I want to divide the window into 2 parts. Each part I can draw
How should I divide source files into projects (within one solution) to be able
How can we divide the substring from the string Like I have string String

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.