chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #1520: binary-search: test failure: (=) bad argument type - not a nu


From: Chicken Trac
Subject: Re: #1520: binary-search: test failure: (=) bad argument type - not a number: #f
Date: Thu, 21 Dec 2023 10:40:08 -0000

#1520: binary-search: test failure: (=) bad argument type - not a number: #f
-----------------------------------------------+---------------------------
            Reporter:  Mario Domenech Goulart  |      Owner:  (none)
                Type:  defect                  |     Status:  reopened
            Priority:  major                   |  Milestone:  5.4
           Component:  extensions              |    Version:  5.0.0
          Resolution:                          |   Keywords:  binary-search
Estimated difficulty:                          |
-----------------------------------------------+---------------------------

Comment (by sjamaan):

 I think the problem is that {{{(square x)}}} returns bignums on 32-bit
 platforms, while binary-search assumes fixnums everywhere.

 The code checks that the sequence is within fixnum range, but it doesn't
 do so for the return value of {{{proc}}} in the loop (but still calls
 fixnum ops on it!)

-- 
Ticket URL: <https://bugs.call-cc.org/ticket/1520#comment:5>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]