Currently, there is Num.log in the std-lib. It is implemented in the bitcode with @log(), which is the natural logarithm.
Currently, I need log10(). Is this something that could be included to the std-lib? It could be implemented in the same was as Num.log with the zig builtin @log10().
The same is true for Num.log2
I think having a robust Math stdlib is very important especially we don't have bitwise operators. I'd vote yes.
seems reasonable! :+1:
Anthony Bullard said:
I think having a robust Math stdlib is very important especially we don't have bitwise operators. I'd vote yes.
Correcting myself, we don't have bitwise operators, but we do have functions for the bitwise operations
Here’s an issue for this https://github.com/roc-lang/roc/issues/5107
Last updated: Jun 16 2026 at 16:19 UTC