Stream: ideas

Topic: Num.log10


view this post on Zulip Oskar Hahn (Dec 07 2024 at 13:23):

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

view this post on Zulip Anthony Bullard (Dec 07 2024 at 13:56):

I think having a robust Math stdlib is very important especially we don't have bitwise operators. I'd vote yes.

view this post on Zulip Richard Feldman (Dec 07 2024 at 13:59):

seems reasonable! :+1:

view this post on Zulip Anthony Bullard (Dec 07 2024 at 14:00):

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

view this post on Zulip Isaac Van Doren (Dec 07 2024 at 15:17):

Here’s an issue for this https://github.com/roc-lang/roc/issues/5107


Last updated: Jun 16 2026 at 16:19 UTC