to_f near Float::MAX
--------------------

                 Key: JRUBY-3331
                 URL: http://jira.codehaus.org/browse/JRUBY-3331
             Project: JRuby
          Issue Type: Bug
          Components: RubySpec
    Affects Versions: JRuby 1.1.5
         Environment: jruby --version
jruby 1.1.5 (ruby 1.8.6 patchlevel 114) (2009-01-02 rev 6586) [i386-java]
 uname -a
Linux ******** 2.6.16.46-0.12-smp #1 SMP Thu May 17 14:00:09 UTC 2007 i686 i686 
i386 GNU/Linux
cat /etc/SuSE-release 
SUSE Linux Enterprise Desktop 10 (i586)
VERSION = 10
PATCHLEVEL = 1


            Reporter: Karl Brodowsky
            Priority: Critical
             Fix For: JRuby 1.2, JRuby 1.x+


conversion to Floating Point does not work well near Float::MAX.
10.0**308 can be expressed.
conversion of x=(Float::MAX).to_i()/2 works
conversion of y>(Float::MAX).to_i()/2 does not work or at least not always 
where it should.
Example:
jruby -e "puts (10**308).to_f"
NaN
ruby -e "puts (10**308).to_f"
1.0e+308


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to