Does Ruby have an equivalent to Java’s Float.MIN_VALUE and
Float.MAX_VALUE (the smallest and largest finite numbers representable
respectively)? The pickaxe book doesn’t mention anything as such but
perhaps it has been added in newer Ruby versions.
Since floats do grow arbitrarily there is no other bound as system memory.
robert
“Farrel Lifson” flifson@cs.uct.ac.za schrieb im Newsbeitrag
news:1044884446.23956.4.camel@asgard.cs.uct.ac.za…
Hi all,
Does Ruby have an equivalent to Java’s Float.MIN_VALUE and
Float.MAX_VALUE (the smallest and largest finite numbers representable
respectively)? The pickaxe book doesn’t mention anything as such but
perhaps it has been added in newer Ruby versions.
In message “Equivalent to Java’s Float.MAX_VALUE?” on 03/02/10, Farrel Lifson flifson@cs.uct.ac.za writes:
Does Ruby have an equivalent to Java’s Float.MIN_VALUE and
Float.MAX_VALUE (the smallest and largest finite numbers representable
respectively)? The pickaxe book doesn’t mention anything as such but
perhaps it has been added in newer Ruby versions.
Does Ruby have an equivalent to Java’s Float.MIN_VALUE and
Float.MAX_VALUE (the smallest and largest finite numbers representable
respectively)? The pickaxe book doesn’t mention anything as such but
perhaps it has been added in newer Ruby versions.
Float::MIN and Float::MAX have been added in 1.8.
···
At Mon, 10 Feb 2003 22:37:47 +0900, Farrel Lifson wrote:
At Mon, 10 Feb 2003 22:54:06 +0900, Robert Klemme wrote:
Since floats do grow arbitrarily there is no other bound as system memory.
nobu.nokada@softhome.net schrieb im Newsbeitrag
news:200302101414.h1AEEC922638@sharui.nakada.kanuma.tochigi.jp…
Hi,
Does Ruby have an equivalent to Java’s Float.MIN_VALUE and
Float.MAX_VALUE (the smallest and largest finite numbers representable
respectively)? The pickaxe book doesn’t mention anything as such but
perhaps it has been added in newer Ruby versions.
Float::MIN and Float::MAX have been added in 1.8.
Since floats do grow arbitrarily there is no other bound as system
memory.
That’s Bignum.
Well, yes. In fact it depends on the type of application, whether you need
inf or max.
Regards
robert
···
At Mon, 10 Feb 2003 22:37:47 +0900, > Farrel Lifson wrote:
At Mon, 10 Feb 2003 22:54:06 +0900, > Robert Klemme wrote: