From: "baptiste AuguiƩ" Date: 2007-07-01T20:25:04+09:00 Subject: Re: simple math operations on arrays --Apple-Mail-2-970957494 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed yep, i do want (-2/3). Oh, i see, is 2/3 =3D=3D 1 for Ruby?? OMG this is = =20 mad ! thanks, it works now! radius=3D0.045 aspectRatio=3D[] longAxis=3D[] shortAxis=3D[] 0.5.step(1, 0.1) { |x| aspectRatio << x.to_s } longAxis=3DaspectRatio.collect{ |x| radius*((x.to_f)**(-2/3.to_f)) } aspectRatio.each_index { |x| shortAxis << longAxis[x].to_f*aspectRatio=20= [x].to_f} puts longAxis puts shortAxis any easier / more elegant way to do all this ? thanks, baptiste On 1 Jul 2007, at 12:15, Robert Dober wrote: > On 7/1/07, baptiste Augui=E9 wrote: >> >> >> The names may have been confusing without the context. I believe the >> formula is right (as Octave's results show). > You mean **(-2/3) is what you want???? > Maybe I was not clear enough - as I rarely are :(. > -2/3 =3D=3D> -1 > > Robert > _____________________________ Baptiste Augui=E9 Physics Department University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 264187 http://newton.ex.ac.uk/research/emag http://projects.ex.ac.uk/atto ______________________________ --Apple-Mail-2-970957494--