Hello!! I'm trying to implement a function that needs the sqrt of a number, actually, many numbers. So, I was wondering if there is a method in the library that lets me get the sqrt for a number. Tried with something like: ````sqrt_sum_for_association += (contribution as f64).sqrt();. But got something like:no method named sqrt found for type f64 in the current scope```
#Is there a sqrt method?
2 messages · Page 1 of 1 (latest)
there is rather no f64 support. integer sqrt does exist, e.g. see the liquidity pool example: https://github.com/stellar/soroban-examples/blob/main/liquidity_pool/src/lib.rs#L238C37-L238C41