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 other does not …

  2. 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 of which can be

  3. 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 to use foo = …

  4. Difference between numeric, float and decimal in SQL Server

    Jun 29, 2009 · What are the differences between numeric, float and decimal datatypes and which should be used in which situations? For any kind of financial transaction (e.g. for salary field), which one is …

  5. what's the largest number float type can hold? - Stack Overflow

    Feb 14, 2020 · I'm new to programming and have recently come up with this simple question . float type has 32 bits in which 8 bits are for the whole number part (the mantissa). so my question is can float …

  6. 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 exponent …

  7. How do I convert all of the items in a list to floats?

    [float(i) for i in lst] to be precise, it creates a new list with float values. Unlike the map approach it will work in py3k.

  8. c - What is the difference between float, _Float32, _Float32x, and ...

    Jul 5, 2023 · Are they distinct types, or can they be aliases for float? What is the minimum range and precision of these types? Are they required to be IEEE-754-compliant (or IEC 60559)? Is float …

  9. 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 to deal with …

  10. python - range () for floats - Stack Overflow

    Dec 6, 2015 · 0 Talk about making a mountain out of a mole hill. If you relax the requirement to make a float analog of the range function, and just create a list of floats that is easy to use in a for loop, the …