diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-16 09:04:34 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-16 09:04:34 +0000 |
commit | ffd9a7ea27d82b96ec51ee6016fb85dccda51ef5 (patch) | |
tree | 3c31bcebe60a846428503fe6b8c27e1c48543bc6 /constant.h | |
parent | 3c7852f801ac7c488f42c632ce87e327b993a833 (diff) | |
download | ruby-ffd9a7ea27d82b96ec51ee6016fb85dccda51ef5.tar.gz |
pack.c: cast from double to float can be undefined
Generally speaking, a value of double is not always representable
when demoted to a float. ISO C defines what to do when such
conversion loses precision, but leaves it undefined when the
value is completely out of range. (cf: ISO/IEC 9899:1990 section
6.2.1.4).
Because ruby do not have half-precision floating-point types this
is not a frequent headache but for pack / unpack, there are
specifiers that has something to do with C float types. We have
to explicitly care these situations.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'constant.h')
0 files changed, 0 insertions, 0 deletions