About 22,100,000 results
Open links in new tab
  1. What is the difference between float and double? - Stack Overflow

    Dec 31, 2021 · I've read about the difference between double precision and single precision. However, in most cases, float and double seem to be interchangeable, i.e. using one or the …

  2. Ranges of floating point datatype in C? - Stack Overflow

    Apr 11, 2012 · The values for the float data type come from having 32 bits in total to represent the number which are allocated like this: 1 bit: sign bit 8 bits: exponent p 23 bits: mantissa The …

  3. Difference between decimal, float and double in .NET?

    Mar 6, 2009 · What is the difference between decimal, float and double in .NET? When would someone use one of these?

  4. comparing float/double values using == operator - Stack Overflow

    The code review tool I use complains with the below when I start comparing two float values using equality operator. What is the correct way and how to do it? Is there a helper function …

  5. What is the point of float('inf') in Python? - Stack Overflow

    Dec 14, 2015 · Just wondering over here, what is the point of having a variable store an infinite value in a program? Is there any actual use and is there any case where it would be preferable …

  6. floating point - What range of numbers can be ... - Stack Overflow

    For a given IEEE-754 floating point number X, if 2^E <= abs(X) < 2^(E+1) then the distance from X to the next largest representable floating point number (epsilon) is: epsilon = 2^(E-52) % For …

  7. How can I solve error "module 'numpy' has no attribute 'float'" in ...

    In many cases you can simply replace the deprecated NumPy types by the equivalent Python built-in type, e.g., numpy.float becomes a "plain" Python float. For detailed guidelines on how …

  8. Why would you use float over double, or double over long double?

    Feb 6, 2014 · I understand that float has a smaller range than double making it less precise, and from what I understand, long double is even more precise (?). So my question is why would …

  9. floating point - C: printf a float value - Stack Overflow

    I want to print a float value which has 2 integer digits and 6 decimal digits after the comma. If I just use printf("%f", myFloat) I'm getting a truncated value. I don't know if this always happen...

  10. Why are floating point numbers inaccurate? - Stack Overflow

    Why do some numbers lose accuracy when stored as floating point numbers? For example, the decimal number 9.2 can be expressed exactly as a ratio of two decimal integers (92/10), both …