summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-09 09:14:23 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-09 09:14:23 +0000
commitb8540e0a9da1c2ac00aabd85e11a6c1758cd1b13 (patch)
tree728744745fb2e9aaffb9cf1a2e58d2ebe36f938f /util.c
parent1d7d08262e07b7d0d11ec2d4efa29ad2b52c565a (diff)
numeric.c: avoid division by zero
In C, division by zero is undefined, even if the expression is double (cf: ISO/IEC 9899:1990 section 6.3.5). OTOH we have tests about such operations and results, means we expect no exceptional situation shall occur. We need to carefully reroute the situation, and generate what is needed. See also: https://travis-ci.org/ruby/ruby/jobs/452680646#L2943 PS: Recently (last two decades), C have Annex. F document. It normatively specifies that the division operator is IEEE 754's division operator (cf: ISO/IEC 9899:1999 section F.3). If we could move to such newer version this could be no problem. But that is not possible today. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
0 files changed, 0 insertions, 0 deletions