vicare icon indicating copy to clipboard operation
vicare copied to clipboard

bitwise-arithmetic-shift-right doesn't handle bignum shift amounts

Open weinholt opened this issue 12 years ago • 2 comments

The bitwise-arithmetic-shift-right procedure doesn't handle bignum shift amounts. The example below should return -1.

Vicare Scheme version 0.3d1, 64-bit Revision devel/eb362bf709a6d7d0da3bcfdf4c126ea6898137c1 Build 2013-08-20

Copyright (c) 2006-2010 Abdulaziz Ghuloum and contributors Copyright (c) 2011-2013 Marco Maggi

vicare> (bitwise-arithmetic-shift-right -1 (+ (greatest-fixnum) 1)) Unhandled exception Condition components:

  1. &assertion
  2. &who: bitwise-arithmetic-shift-right
  3. &message: "expected fixnum as argument"
  4. &irritants: (1152921504606846976)

weinholt avatar Aug 20 '13 15:08 weinholt

This is a documented restriction. Sorry but it is very low priority for me to fix this. For the time being I have changed the type of raised condition object from &assertion to &implementation-restriction.

marcomaggi avatar Aug 21 '13 07:08 marcomaggi

Thanks @weinholt. This is an issue in IronScheme too!

leppie avatar Aug 21 '13 11:08 leppie