Problematic type declaration in sb-gmp::gmp-intexp

Bug #2012577 reported by ari pro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

A type declaration added to sb-gmp in https://github.com/sfrank/sb-gmp/commit/9dc3b852413191f0f6cfd25af04b82d3f09ebc92 and then introduced to SBCL in commit 69f90713f12d00ede7ec1bde098ea94a7a72f03a causes sb-gmp::gmp-intexp to signal a type-error when it is called with a base of type ratio and a negative integral exponent.

One way of fixing this is removing the type declaration.

Here is a demonstration with SBCL 2.3.2:

* (require 'sb-gmp) ;=> ("SB-GMP")
* sb-gmp:*gmp-version* ;=> "6.2.1"
* sb-gmp:*gmp-features* ;=> (:SB-GMP-5.1 :SB-GMP-5.0 :SB-GMP)
* (setf sb-gmp:*gmp-diasbled* T) ;=> T
* (expt 113/355 -1) ;=> 355/113
* (setf sb-gmp:*gmp-disabled* NIL) ;=> NIL
* (expt 113/355 -1) ;=>
debugger invoked on a TYPE-ERROR @225715EC in thread
#<THREAD "main thread" RUNNING {1001420003}>:
  The value
    113/355
  is not of type
    INTEGER

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-GMP::GMP-INTEXP 113/355 -1)
   source: (THE INTEGER (GMP-INTEXP BASE (- POWER)))

Revision history for this message
ari pro (aripro) wrote :
Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.