From: Masahiro Tanaka Date: 2001-01-07T03:23:17+09:00 Subject: [ruby-talk:8753] Re: FloatDomainError exception, bug in Ruby? >From: "Robert Gustavsson" <0317025435@telia.com> >Subject: [ruby-talk:8739] FloatDomainError exception, bug in Ruby? > This code: snip > Does not work as expected (throwing FloatDomainError when f gets infinite). > The output (I had to break the program with Ctrl-C which raised the > Interrupt exception as expected): snip > Is this a bug? It is not bug. Current version of Ruby does not trap floating-point arithmetic errors. You can check the result using Float#infinite? or Float#finite?. M.Tanaka