-
Notifications
You must be signed in to change notification settings - Fork 470
Closed
Labels
HVMAbout the HVMAbout the HVMenhancementNew feature or requestNew feature or requestpreludeBend's builtin types and functionsBend's builtin types and functionssyntaxAbout Bend's syntaxAbout Bend's syntax
Description
HVM exposes log and atan2 operations, but they're not available in Bend except as a hack (using | and & operators).
We should expose them to users with a native operation.
I don't know what syntax to use other than log(a, b) and (log a b), but I don't really like it since it is different from all the other operators.
There multiple way to implement this:
- Parsing
log(a, b)as a numeric operation. - Defining a builtin function
log a b = a & b. This is a bit of a hack and I don't love it, but it's the simplest. - Having a builtin stub
log a bthat gets converted into the numeric operation as a compiler pass.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
HVMAbout the HVMAbout the HVMenhancementNew feature or requestNew feature or requestpreludeBend's builtin types and functionsBend's builtin types and functionssyntaxAbout Bend's syntaxAbout Bend's syntax