Determines if another number is approximately equal within a given _n_th degree. Defaults to 100ths if the degree is not specified.
CREDIT: Trans
Returns the distance between self an another value. This is the same as #- but it provides an alternative for common naming between variant classes.
4.distance(3) #=> 1
Since Numeric is immutable it cannot be duplicated. For this reason try_dup returns self.
1.dup! #=> 1
Conceptually, rounding is expected to apply to floating point numbers. However it can actually be applied to pretty much any Numeric object. For example, one could round an Integer to the nearest kilo.
See Float#round_at.
Returns the size of the string representation of a numerical value.
1.spacing #=> 1 10.spacing #=> 2 100.spacing #=> 3 -100.spacing #=> 4 1.2.spacing #=> 3
CREDIT: Victor H. Goff III