Custom Query (1030 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (622 - 624 of 1030)

Ticket Resolution Summary Owner Reporter
#1059 fixed Intermediate overflow in math functions David Findlay
Description

I wrote some code to exercise CCL's math functions and found that there were cases where intermediate computations were causing floating point overflows.

Functions affected are exp, tan, atan, tanh and atanh:

exp: fails for very large negative real rationals.

tanh: fails for complex arguments with very large real parts.

atanh: fails for numbers of the form 1 + iy for very small y.

tan and atan: analogous failures as for tanh and atanh.

I'm attaching (i) the code to exercise the functions (you just load it into Lisp) and (ii) a file of patches that fix the issues. (Apart from the exp issue, these are present in the fix to 869 - sorry.)

#1061 fixed Multidimensional array reader syntax Fred Bayer
Description

The reader signals an error when the first sequence in the initial contents list isn't a list, but a vector, bitvector or string when parsing a 2-dimensional array literal:

? #2a("ab" #*01)

Error: Reader error on #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x2100CE960D>,

near position 14:

Initial contents for #A is inconsistent with dimensions: #2A("ab" #<SIMPLE-BIT-VECTOR 2>)

While executing: CCL::SIGNAL-READER-ERROR, in process listener(1).

If the first sequence is a list, everything works fine:

? #2a((1 2) "ab" #*10) #2A((1 2) (#\a #\b) (1 0))

Creating the array with make-array also works fine:

? (make-array '(2 2) :initial-contents '("ab" #*10)) #2A((#\a #\b) (1 0))

#1064 fixed reduce maphash consing Martin Brooks
Description

with-hash-table-iterator in file macros.lisp results in what appears to be unnecessary consing.

Consing is reduced by adding ,state to the list of dynamic-extent declarations, as shown below.

(defmacro with-hash-table-iterator ((mname hash-table) &body body)

"WITH-HASH-TABLE-ITERATOR ((function hash-table) &body body)

provides a method of manually looping over the elements of a hash-table. FUNCTION is bound to a generator-macro that, within the scope of the invocation, returns one or three values. The first value tells whether any objects remain in the hash table. When the first value is non-NIL, the second and third values are the key and the value of the next object."

(let* ((hash (gensym))

(keys (gensym)) (values (gensym)) (count (gensym)) (state (gensym)))

`(let* ((,hash ,hash-table)

(,count (hash-table-count ,hash)) (,keys (make-array ,count)) (,values (make-array ,count)) (,state (vector ,hash 0 ,keys ,values (enumerate-hash-keys-and-values ,hash ,keys ,values))))

(declare (dynamic-extent ,keys ,values ,state)

(fixnum ,count))

(macrolet ((,mname () `(next-hash-table-iteration-1 ,',state)))

,@body))))

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.