1 "======================================================================
6 ======================================================================"
9 "======================================================================
11 | Copyright (C) 2003 Free Software Foundation.
12 | Written by Paolo Bonzini
14 | This file is part of GNU Smalltalk.
16 | GNU Smalltalk is free software; you can redistribute it and/or modify it
17 | under the terms of the GNU General Public License as published by the Free
18 | Software Foundation; either version 2, or (at your option) any later version.
20 | GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT
21 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
25 | You should have received a copy of the GNU General Public License along with
26 | GNU Smalltalk; see the file COPYING. If not, write to the Free Software
27 | Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 ======================================================================"
31 Smalltalk at: #Last put: 42!
33 !Number methodsFor: 'testing'!
36 Last := Last * 3877 + 29573 rem: 139968.
37 ^self * Last asFloatD / 139968d! !
40 n := Smalltalk arguments isEmpty
42 ifFalse: [ 1 max: Smalltalk arguments first asInteger ].
44 n timesRepeat: [ 100d nextRandom ].
45 ((100d nextRandom + 0.5d-9) printString copyFrom: 1 to: 11) displayNl!