--001517447f08981f3404832f0a6b
Content-Type: text/plain; charset=UTF-8
I read in the BigDecimal docs you can do n igDecimal.new('NaN'). But
i'm unfamiliar with it
On Thu, Apr 1, 2010 at 3:57 PM, Alex DeCaria
<alex.decaria / millersville.edu>wrote:
> Is there a built-in method to set a floating point value to NaN or
> Infinity? Or, is the only way to do this by
>
> a .0/0.0 # set a to NaN
>
> b .0/0.0 # set b to Infinity
>
> c 3.0/0.0 # set c to -Infinity
>
> Also, how can I set value to -NaN? This is possible in other languages,
> but I can't do it in Ruby. I've tried:
>
> a .0/0.0
>
> b a
>
> but b still comes out NaN.
>
> --Alex
> --
> Posted via http://www.ruby-forum.com/.
>
>
--
jbw
--001517447f08981f3404832f0a6b--