absolute function
- Posted by Vinoba Mar 17, 2011
- 3888 views
The Euphoria absolute function in math.e looks too old-fashioned. The following seems to work as well and might be faster. The outer brackets can probably be omitted. It takes care of atom and sequence arguments
public function newabs (object s ) return s + ( s * -2 * ( s < 0 ) ) end function