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

    Dec 31, 2021 · Unlike an int (whole number), a float have a decimal point, and so can a double. But the difference between the two is that a double is twice as detailed as a float, meaning that …

  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 …

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

    Apr 11, 2012 · These numbers come from the IEEE-754 standard, which defines the standard representation of floating point numbers. Wikipedia article at the link explains how to arrive at …

  4. How to print a float with 2 decimal places in Java?

    In short, the %.2f syntax tells Java to return your variable (val) with 2 decimal places (.2) in decimal representation of a floating-point number (f) from the start of the format specifier (%).

  5. integer - What exactly is a float? - Stack Overflow

    May 9, 2012 · Floating point values, in software, trade magnitude for absolute precision (you've only got so many bits to spread around). This is the reason why we call them "floating point …

  6. java - What is the difference between the float and integer data …

    Jan 26, 2011 · float stores floating-point values, that is, values that have potential decimal places int only stores integral values, that is, whole numbers So while both are 32 bits wide, their use …

  7. How should I do floating point comparison? - Stack Overflow

    83 Comparing for greater/smaller is not really a problem unless you're working right at the edge of the float/double precision limit. For a "fuzzy equals" comparison, this (Java code, should be …

  8. floating point - How do I round a number to 2 decimal places in C ...

    You cannot properly round the number itself, because float (and double) aren't decimal floating-point - they are binary floating-point - so rounding to decimal positions is meaningless. You …

  9. floating point - What is float in Java? - Stack Overflow

    196 In Java, when you type a decimal number as 3.6, its interpreted as a double. double is a 64-bit precision IEEE 754 floating point, while float is a 32-bit precision IEEE 754 floating point. As …

  10. How to perform a bitwise operation on floating point numbers

    Apr 2, 2017 · At the language level, there's no such thing as "bitwise operation on floating-point numbers". Bitwise operations in C/C++ work on value-representation of a number. And the …