Invalid calculation of MINfloat16/MAXfloat16 in pandas/algos.pyx #10046
Labels
Build
Library building on various platforms
Numeric Operations
Arithmetic, Comparison, and Logical operations
The code generated by Cython from pandas/algos.pyx contains an undefined behavior (invalid cast of floating-point number to integer):
The generated code for the line from
pandas/algos.pyx
in
pandas/algos.c
contains:The file
numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/npy_common.h
defines
npy_float16
as 16-bit integer type (I guess numpy implementation has a custom code that carefully represents these 16 bits as mantiss+exponent). Casting floating-point value-inf
to a 16-bit integer type is an undefined behavior according to C standard.I wasn't able to find any place in pandas code that uses
MINfloat16
(andMAXfloat16
). Is it safe to just delete them?The text was updated successfully, but these errors were encountered: