Actions
Feature #3592
closed"1.0+0.0i".to_c.to_f can't converted into Float
Status:
Closed
Assignee:
-
Target version:
-
Description
=begin
Hi,
(1.0+0i).to_f results to 1.0, whereas (1.0+0.0i).to_f generate RangeError.
irb(main):001:0> "1.0+0i".to_c.to_f
=> 1.0
irb(main):002:0> "1.0+0.0i".to_c == 1.0
=> true
irb(main):003:0> "1.0+0.0i".to_c.to_f
RangeError: can't convert 1.0+0.0i into Float
from (irb):3:in to_f' from (irb):3 from c:/usr/bin/irb.bat:20:in
'
It would be nice if "1.0+0.0i".to_c.to_f results to 1.0.
Regards,
Park Heesob
=end
Updated by phasis68 (Heesob Park) almost 14 years ago
=begin
This issue was solved with changeset r28725.
Please close this.
=end
Updated by marcandre (Marc-Andre Lafortune) almost 14 years ago
- Status changed from Open to Closed
=begin
=end
Actions
Like0
Like0Like0