Top "Ieee-754" questions

IEEE 754 is the most common & widely used floating-point standard, notably the single-precision binary32 aka float and double-precision binary64 aka double formats.

In Scala, why is NaN not being picked up by pattern matching?

My method is as follows def myMethod(myDouble: Double): Double = myDouble match { case Double.NaN => ... case _ => ... } The IntelliJ …

scala pattern-matching ieee-754 nan
Double vs float on the iPhone

I have just heard that the iphone cannot do double natively thereby making them much slower that regular float. Is …

iphone cocoa-touch floating-point ieee-754
Whats the largest denormalized and normalized number?(64bit, IEE 754-1985)

I am struggeling with floating point arithmetic, because I really want to understand this topic! I know that the numbers …

floating-point binary floating-accuracy ieee-754 denormalization
Are all integer values perfectly represented as doubles?

My question is whether all integer values are guaranteed to have a perfect double representation. Consider the following code sample …

c++ double standards precision ieee-754
Usefulness of signaling NaN?

I've recently read up quite a bit on IEEE 754 and the x87 architecture. I was thinking of using NaN as …

c++ visual-c++ floating-point ieee-754 x87
Portability of binary serialization of double/float type in C++

The C++ standard does not discuss the underlying layout of float and double types, only the range of values they …

c++ serialization double portability ieee-754
Extracting the exponent and mantissa of a Javascript Number

Is there a reasonably fast way to extract the exponent and mantissa from a Number in Javascript? AFAIK there's no …

javascript math haskell ghc ieee-754
How to convert a floating point number to its binary representation (IEEE 754) in Javascript?

What's the easiest way to convert a floating point number to its binary representation in Javascript? (e.g. 1.0 -> 0…

javascript binary floating-point ieee-754
Behaviour of negative zero (-0.0) in comparison with positive zero (+0.0)

In my code, float f = -0.0; // Negative and compared with negative zero f == -0.0f result will be true. But …

c++ floating-point ieee-754
Is it possible to get 0 by subtracting two unequal floating point numbers?

Is it possible to get division by 0 (or infinity) in the following example? public double calculation(double a, double b) { …

floating-point double floating-accuracy ieee-754