1. Re: where is abs() ?
- Posted by Normand Blais <marcel_ya at YAHOO.COM> May 02, 1999
- 350 views
The other solution could be: function abs(integer x) return x * ((x>0) - (x<0)) end function Regards, --- Adam Weeden <theskaman at MINDSPRING.COM> wrote: > Sorry, there is no abs (to my knowledge, and I'm > pretty sure I know), in > Euphoria standard edition. Registerd, I'm almost > positive doesn't have it > either, if I remeber right the list was having an > argument over which was > the best abs routine. Mine was: > function abs(integer x) > if x >= 0 then > return x > else > return (-1 * x) > end if > end function > > As i remember mine was not the fastest, so there is > yet another solution to > your problem. > > Adam Weeden > WeedenSoft Technologies > ----- Original Message ----- > From: bill of birchwood > <noonian at SUNG79.FREESERVE.CO.UK> > To: <EUPHORIA at LISTSERV.MUOHIO.EDU> > Sent: Sunday, May 02, 1999 7:31 PM > Subject: Re: where is abs() ? > > > > Hello all you wonderful people. > > I can't find abs(), I'm running the demo version. > > Tried a math.e that also refers to abs(), > > but have had to use sqrt(power(n,2)). > > It is horrible to look at. > > Is it in the registered version? > > Am i asking too many questions at once? > > Any help appreciated, programming or psychiatric. > > God bless you every one. > > Colin Ellis. > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com