stacks-network / docs

Unleash Bitcoin's full potential with decentralized apps and smart contracts. The documentation covers key aspects of the Stacks network and technology and provides tutorials and other helpful content for developers.
https://docs.stacks.co
Creative Commons Zero v1.0 Universal
156 stars 235 forks source link

Description of divide and more examples #1542

Closed c0d3rk1d closed 2 years ago

c0d3rk1d commented 2 years ago

Description

I am learning clarity; attending clarity bootcamp 4 now. So, last a week or so I am on this document everyday. I came across a few errors on the document, and I would like to add more examples, while I am learning.

While experimenting with / (divide), I realized that it is not an "integer division". According to wolfram and wikipedia, in integer division, the floor function is applied to the result.

https://mathworld.wolfram.com/IntegerDivision.html https://en.wikipedia.org/wiki/Division_(mathematics)#Of_integers

Clarity doesn't apply the floor function, it simply returns the integer part of the division, So I changed the description of the / (divide) accordingly.

And I added more examples to 4 Arithmetic Operations.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
stacks-docs ✅ Ready (Inspect) Visit Preview Sep 5, 2022 at 4:25PM (UTC)
CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

criadoperez commented 2 years ago

Thanks for you contributions @c0d3rk1d ! And congratulations for attending the Clarity Bootcamp.