Skip to content

Commit

Permalink
Update floor.c
Browse files Browse the repository at this point in the history
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
  • Loading branch information
Rejoan-Sardar authored Mar 19, 2024
1 parent 2719252 commit 51c6246
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ uint32_t stdlib_base_fast_uint32_sqrt( const uint32_t *x ) {
uint32_t sum;
uint32_t xc;

xc = x;
xc = *x;

root = 0;
bit = BIT;
Expand All @@ -49,7 +49,7 @@ uint32_t stdlib_base_fast_uint32_sqrt( const uint32_t *x ) {
while ( bit != 0 ) {
sum = ( root + bit );
root >>= 1;
if ( x >= sum ) {
if ( *x >= sum ) {
*x -= sum;
root += bit;
}
Expand Down

0 comments on commit 51c6246

Please sign in to comment.