Skip to content

Commit

Permalink
Issue #519 - Fix fxlength
Browse files Browse the repository at this point in the history
  • Loading branch information
justinethier committed Jan 9, 2024
1 parent e499249 commit e7725a2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions srfi/143.sld
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@
return_closcall1(data, k, obj_int2obj(count));")

(define (fxlength i)
(ceiling (/ (log (if (fxnegative? i)
(fxneg i)
(fx+ 1 i)))
(log 2))))
(exact
(ceiling (/ (log (if (fxnegative? i)
(fxneg i)
(fx+ 1 i)))
(log 2)))))

(define (fxif mask n0 n1)
(fxior (fxand mask n0)
Expand Down

0 comments on commit e7725a2

Please sign in to comment.