Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Add sqrt #221

Open
blamario opened this issue Jun 7, 2022 · 2 comments
Open

Add sqrt #221

blamario opened this issue Jun 7, 2022 · 2 comments

Comments

@blamario
Copy link

blamario commented Jun 7, 2022

There's an occasional need for

sqrt :: Natural -> Natural

The function would probably be best placed in plutus-numeric.

@re-xyr
Copy link
Contributor

re-xyr commented Jun 7, 2022

How should this be defined? Is it the floor of the square root?

@blamario
Copy link
Author

blamario commented Jun 7, 2022

Presumably. If you want the nearest root it's easy enough to compare if the next number up is a closer match.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants