Tuesday 27 September 2022

Hive: log2: base-2 logarithm of the number n

Signature

log2(n)

 

This method return the base-2 logarithm of a number.

hive> SELECT log2(10);
OK
_c0
3.3219280948873626
Time taken: 0.046 seconds, Fetched: 1 row(s)
hive> ;
hive> ;
hive> SELECT log2(100);
OK
_c0
6.643856189774725
Time taken: 0.04 seconds, Fetched: 1 row(s)

   

Previous                                                    Next                                                    Home

No comments:

Post a Comment