log2(z)
returns the base 2 logarithm of z
CMath.log2(-1) => (0.0+4.532360141827194i)
# File lib/cmath.rb, line 105 def log2(z) begin if z.real? and z >= 0 log2!(z) else log(z) / log!(2) end rescue NoMethodError handle_no_method_error end end