Skip to content

Farm token#706

Open
vishnukumavat wants to merge 17 commits intofeature/devfrom
farm_token
Open

Farm token#706
vishnukumavat wants to merge 17 commits intofeature/devfrom
farm_token

Conversation

@vishnukumavat
Copy link
Contributor

No description provided.

func FarmCoinDecimals(baseDecimals, quoteDecimals uint64) uint64 {
baseExponent := math.Log10(float64(baseDecimals))
quoteExponent := math.Log10(float64(quoteDecimals))
if baseExponent+quoteExponent >= 18 {

Check notice

Code scanning / CodeQL

Floating point arithmetic

Floating point arithmetic operations are not associative and a possible source of non-determinism
if baseExponent+quoteExponent >= 18 {
return uint64(math.Pow10(18))
}
return uint64(math.Pow10(int(baseExponent + quoteExponent)))

Check notice

Code scanning / CodeQL

Floating point arithmetic

Floating point arithmetic operations are not associative and a possible source of non-determinism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants