Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#583 Add log and atan2 operations for floats #585

Merged
merged 5 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ and this project does not currently adhere to a particular versioning scheme.

- Fixed readback of numeric operations. ([#467][gh-467])

### Added

- `log` and `atan2` builtin functions. ([#583][gh-583])

## [0.2.35] - 2024-06-06

### Changed
Expand Down Expand Up @@ -335,4 +339,5 @@ and this project does not currently adhere to a particular versioning scheme.
[gh-516]: https://github.com/HigherOrderCO/Bend/issues/516
[gh-526]: https://github.com/HigherOrderCO/Bend/issues/526
[gh-528]: https://github.com/HigherOrderCO/Bend/issues/528
[gh-583]: https://github.com/HigherOrderCO/Bend/issues/583
[Unreleased]: https://github.com/HigherOrderCO/Bend/compare/0.2.35...HEAD
7 changes: 6 additions & 1 deletion src/fun/builtins.bend
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,9 @@ sleep hi_lo = (IO/Call IO/MAGIC "PUT_TIME" hi_lo @x (IO/Done IO/MAGIC x))
# (defer_arg (defer_arg (defer_arg (defer @arg1 @arg2 @arg3 (f arg1 arg2 arg3)) arg1) arg2) arg3)
defer val = @x (x val)
defer_arg defered arg = @x (defered x arg)
undefer defered = (defered @x x)
undefer defered = (defered @x x)

# log :: f24 -> f24 -> f24
imaqtkatt marked this conversation as resolved.
Show resolved Hide resolved
log x base = (| base x)
imaqtkatt marked this conversation as resolved.
Show resolved Hide resolved
# atan2 :: f24 -> f24 -> f24
atan2 x y = (& x y)
Loading