sysprog21 / mado

A window system for resource-constrained devices
MIT License
34 stars 12 forks source link

Enhance the precision of fixed-point square root computations #16

Closed marvin0102 closed 1 month ago

marvin0102 commented 1 month ago

The original fixed point sqrt can not calculate sqrt of numbers less than 1. Implement a new sqrt calculation that is more precise and without fixed point multiplication. Below is the comparison of sqrt from 0~2. "math.h" stands for function 'sqrt()' from library math.h. "original" stands for original sqrt implementation. "precise" stands for new implemented method. sqrt_compare

jserv commented 1 month ago

You should avoid submitting pull requests via the main branch (or default branch). Instead, always create a dedicated git branch to work on specific features or bug fixes.

In this case, you should perform the following steps to resolve the unintended conflicts:

$ git remote add upstream https://github.com/sysprog21/mado
$ git fetch upstream
$ git reset --hard 65fa6e742a6bc16b31b6b41d3dec722857298a7f
$ git cherry-pick origin/main
$ git rebase upstream/main

After verifying via git log, do git push --force.

Improve your skills with Git by watching the videos: https://hackmd.io/@sysprog/git-with-github

jserv commented 1 month ago

Thank @marvin0102 for contributing!