login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #375 A simple stream generation enters an infinite loop revision 5 of 5

1 2 3 4 5
Editor: kratt6
Time: 2008/01/04 04:17:43 GMT-8
Note:

added:

From kratt6 Fri Jan 4 04:17:43 -0800 2008
From: kratt6
Date: Fri, 04 Jan 2008 04:17:43 -0800
Subject: 
Message-ID: <20080104041743-0800@axiom-wiki.newsynthesis.org>

Category: Axiom Library => Axiom Interpreter 

...and occurs in fact only in the interpreter (by design)

Submitted by : (unknown) at: 2007-11-17T22:34:21-08:00 (16 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

An interesting bug. When you type [i for i in 1.. | prime?(i)]? everything works fine. There is infinite number of primes so no problem. However, try this: [i for i in -5 .. | zero?(i)]?

Clearly there is only one zero. The command seems to attempt to find at least ten zeros before exiting. It seems to me that this sort of set generation does not even check if there is only a finite number of elements in the set or if the set is infinite. In the case when the number of instances satisfying the condition is less than 10 the program will choke and enter an infinite loop.

Category: Axiom on Linux => Axiom Library

Status: open => closed

this is documented behaviour

Status: closed => rejected

this is documented behaviour

Category: Axiom Library => Axiom Interpreter

...and occurs in fact only in the interpreter (by design)