Re: HP-39gII speed Message #2 Posted by Gilles Carpentier on 24 Feb 2013, 4:48 p.m., in response to message #1 by Mic
this confirms that 39GII is very fast.
Handling of graphics is also very fast (point, rectangle, text output etc.) and list or matrix manipulation
Here a program to draw the ULAM spiral
EXPORT Ulam
BEGIN
LOCAL a,b,xy:={128,63}, n:=1, m:=.9, d:={{1,0}, {0,-1}, {-1,0}, {0,1}};
RECT();
WHILE n<60000 DO
FOR a FROM 1 TO 4 DO
m:=m+.5;
FOR b FROM 1 TO m DO
IF isprime(n) THEN PIXON_P(xy(1),xy(2),0);END;
xy:=xy+d(a);
n:=n+1;
END;
END;
END;
FREEZE;
END;
34 sec for 60.000 loops (and prime test)
Edited: 24 Feb 2013, 8:00 p.m.
|