Re: Rescale

*To*: mathgroup at smc.vnet.net*Subject*: [mg65437] Re: Rescale*From*: Peter Pein <petsie at dordos.net>*Date*: Sat, 1 Apr 2006 05:38:55 -0500 (EST)*References*: <e0j3hj$fti$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Ray Koopman schrieb: > InputForm@{#,Rescale@#}&@Sort@Table[Random[],{3}] > > {{0.1495146427525807, 0.9032356867418898, 0.9803938132050517}, > {2.7755575615628914*^-17, 0.9071367664432557, 1.0000000000000002}} > > What is Rescale doing, that it does not always give N@0 and N@1 > for the first and last elements? > These are the usual roundoffs. Do[v=Rescale@Sort@Table[Random[Real,{0,1},$MachinePrecision],{3}]; If[v[[{1,3}]]=!={0.,1.},Return[{i,v}]],{i,10^6}] didn't report a single triple with other values as 0. and 1. at the beginning/end.