Re: TIB: Random Number Generation Different From The One Before
[Prev][Next][Index][Thread]
Re: TIB: Random Number Generation Different From The One Before
IPART gets the Integer part:
12.34 -+AD4- 12
-7.12 -+AD4- -7
INT does:
12.34 -+AD4- 12
-7.12 -+AD4- -8
It get's the largest smaller or equal integer.
Try reading your manual once in a while...
Philipp Keller
----- Original Message -----
From: Chris Gomez +ADw-Parasyte+AEA-jps.net+AD4-
To: +ADw-ti-basic+AEA-lists.ticalc.org+AD4-
Sent: 25 February 1999 19:28
Subject: Re: TIB: Random Number Generation Different From The One
Before
+AD4-
+AD4-
+AD4-
+AD4-
+AD4APg-:seq(A,A,1,24+AFw--+AD4AXA-L +ADs- initial list
+AD4APg-:for(A,1,50) +ADs- number of times to shuffle
+AD4APg-:ipart (24rand)+AFw--+AD4AXA-B
+AD4APg-:ipart (24rand)+AFw--+AD4AXA-C
+AD4-
+AD4-When will anyone realize that it's not ipart, but int that gets the
integer
+AD4-part of a number.
+AD4-ipart gets the IMAGINARY part. I don't think rand makes imaginary
numbers.
+AD4-I've had to correct a few basic games that made this same mistake.
+AD4-
+AD4---Chris
+AD4-
+AD4-