janestreet / base

Standard library for OCaml
MIT License
848 stars 124 forks source link

Added Float.log2 #148

Closed mbarbin closed 1 year ago

mbarbin commented 1 year ago

This adds Float.log2, base 2 logarithm.

OCaml stdlib Float.log2 says it's available since 4.13.

I added the function to Float0.ml outside of the Stdlib section since I think contrary to other functions there, looks like log2 is not in Pervasives.