[ruby-cvs:72843] shyouhei:r65743 (trunk): eval_error.c: log10(0) is ERANGE

shyouhei at ruby-lang.org shyouhei at ruby-lang.org
Thu Nov 15 18:03:03 JST 2018


shyouhei	2018-11-15 18:03:03 +0900 (Thu, 15 Nov 2018)

  New Revision: 65743

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65743

  Log:
    eval_error.c: log10(0) is ERANGE
    
    By definition, the logarithm of 0 is negative infinity.  This is a
    pole error (cf: cf: ISO/IEC 9899:1999 section 7.12.1 paragraph 3) and
    of course, cannot fit into an `int` value.  We have to resort to
    INT_MIN.

  Modified files:
    trunk/eval_error.c


More information about the ruby-cvs mailing list