[Rails] Re: can you portably store infinity via AR?

2011-02-11 Thread Fearless Fool
Where it stands: Infinity can be represented in IEEE floating point numbers. Infinity can be represented in Ruby, as evidenced by (1.0/0.0).infinite? = 1 Infinity can be represented in sqlite (and probably other databases): sqlite select * from test_recs; 1|Inf| Yet it appears that

[Rails] Re: can you portably store infinity via AR?

2011-02-10 Thread Robert Walker
Fearless Fool wrote in post #980885: The gist of my question: is there a way to *portably* store and retrieve Infinity in an ActiveRecord float column? Okay, first some clarifications: Infinity is not value and cannot be represented by a float (lower case). What is actually happening is that

Re: [Rails] Re: can you portably store infinity via AR?

2011-02-10 Thread Frederick Cheung
On 10 Feb 2011, at 20:20, Robert Walker li...@ruby-forum.com wrote: Fearless Fool wrote in post #980885: The gist of my question: is there a way to *portably* store and retrieve Infinity in an ActiveRecord float column? Okay, first some clarifications: Infinity is not value and cannot

Re: [Rails] Re: can you portably store infinity via AR?

2011-02-10 Thread Jeffrey L. Taylor
Quoting Frederick Cheung frederick.che...@gmail.com: On 10 Feb 2011, at 20:20, Robert Walker li...@ruby-forum.com wrote: Fearless Fool wrote in post #980885: The gist of my question: is there a way to *portably* store and retrieve Infinity in an ActiveRecord float column? Okay,

[Rails] Re: can you portably store infinity via AR?

2011-02-10 Thread Adam Ms.
Robert Walker wrote in post #980944: Fearless Fool wrote in post #980885: Okay, first some clarifications: Regardless of Ruby's somewhat odd implementation; (1.0 / 0.0) is not equal to infinity. Oy! Now you've stepped in it.