softfloat: Fix exception flag handling for float32_to_float16()
Our float32 to float16 conversion routine was generating the correctnumerical answers, but not always setting the right set of exceptionflags. Fix this, mostly by rearranging the code to more closely...
softfloat: Add float to 16bit integer conversions.
ARMv8 requires support for converting 32 and 64bit floating pointvalues to signed and unsigned 16bit integers.
Signed-off-by: Will Newton <will.newton@linaro.org>[PMM: updated not to incorrectly set Inexact for Invalid inputs]...
softfloat: Make the int-to-float functions take exact-width types
Currently the int-to-float functions take types which are specifiedas "at least X bits wide", rather than "exactly X bits wide". This isconfusing and unhelpful since it means that the callers have to include...
softfloat: Fix float64_to_uint64
The comment preceding the float64_to_uint64 routine suggests thatthe implementation is broken. And this is, indeed, the case.
This patch properly implements the conversion of a 64-bit floatingpoint number to an unsigned, 64 bit integer....
softfloat: Only raise Invalid when conversions to int are out of range
We implement a number of float-to-integer conversions using conversionto an integer type with a wider range and then a check against thenarrower range we are actually converting to. If we find the result to...
softfloat: Fix factor 2 error for scalbn on denormal inputs
If the input to float*_scalbn() is denormal then it representsa number 0.[mantissabits] * 2^(1-exponentbias) (and the actualexponent field is all zeroes). This means that when we convertit to our unpacked encoding the unpacked exponent must be one...
softfloat: Add float32_to_uint64()
This patch adds the float32_to_uint64() routine, which converts a32-bit floating point number to an unsigned 64 bit number.
This contribution can be licensed under either the softfloat-2a or -2blicense.
Signed-off-by: Tom Musta <tommusta@gmail.com>...
softfloat: Fix float64_to_uint64_round_to_zero
The float64_to_uint64_round_to_zero routine is incorrect.
For example, the following test pattern:
46697351FF4AEC29 / 0x1.97351ff4aec29p+103
currently produces 8000000000000000 instead of FFFFFFFFFFFFFFFF....
softfloat: Fix float64_to_uint32
The float64_to_uint32 has several flaws:
- for numbers between 2**32 and 2**64, the inexact exception flag may get incorrectly set. In this case, only the invalid flag should be set.
test pattern: 425F81378DC0CD1F / 0x1.f81378dc0cd1fp+38...
softfloat: Fix float64_to_uint32_round_to_zero
The float64_to_uint32_round_to_zero routine is incorrect.
425F81378DC0CD1F / 0x1.f81378dc0cd1fp+38
will erroneously set the inexact flag.
This patch re-implements the routine to use the float64_to_uint64_round_to_zero...
View revisions
Also available in: Atom