Project

General

Profile

Actions

Feature #10909

closed

[PATCH 2/2] math.c: Direct casting from Rational to double.

Added by gogotanaka (Kazuki Tanaka) over 9 years ago. Updated over 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:68325]

Description

Hi, this proposal is continued from Feature 10800 and Feature 10785
I'd like to do cast from Rational to double unless Rational#to_f is redefined.
Along with that, I've introduced some new macros(fix2dbl_without_to_f, big2dbl_without_to_f, ..) and added test cases.

Please feel free to let me know if there are something you don't like.

thanks.


Files

direct_casting_from_Rational_to_double.patch (1.45 KB) direct_casting_from_Rational_to_double.patch gogotanaka (Kazuki Tanaka), 02/26/2015 12:41 PM
add_tests_to_test_math_rb.patch (1.79 KB) add_tests_to_test_math_rb.patch gogotanaka (Kazuki Tanaka), 02/26/2015 12:41 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0