Integer

class Integer

Parent:
Numeric

BigDecimal extends the native Integer class to provide the to_d method.

When you require the BigDecimal library in your application, this method will be available on Integer objects.

Add double dispatch to Integer

When mathn is required, Integer's division is enhanced to return more precise values from mathematical expressions.

2/3*3  # => 0
require 'mathn'
2/3*3  # => 2

(2**72) / ((2**70) * 3)  # => 4/3

Holds Integer登录查看完整内容