Trunc Error

2010-03-02 Thread Schwartz, Jonathan L.
I just found the following result.

(1.2 - 0.8)/0.2  = 2
trunc( (1.2 - 0.8)/0.2)  = 1

--
I have previously reported the following:

on mouseUp
   repeat with n = 0 to 1 step 0.1
  put n&"," after aList
   end repeat
   put aList
end mouseUp

returns:  0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,
It should stop at 1

Also 0 to 0.8 step 0.1 stops at 0.9   ... there are others

The use of the increment is consistent with the documentation.


Are there other similar problems that users are aware of ?

When applied properly, these can produce false results and make analysis using 
runRev questionable.


I have reported these in the Rev Quality Control Center.



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Repeat Loop

2009-11-20 Thread Schwartz, Jonathan L.
Has anyone had a problem with the following?

on mouseUp
   repeat with n = 0 to 1 step 0.1
  put n&"," after aList
   end repeat
   put aList
end mouseUp

Returns
0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,

However,

 on mouseUp
   repeat with n = 0 to 2 step 0.1
  put n&"," after aList
   end repeat
   put aList
end mouseUp

Returns  
0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution