Re: abs()

new topic     » goto parent     » topic index » view thread      » older message » newer message

<snip>

> those functions below should work fine on sequences. I have a real old
> computer here
> (486), so small variances in execution time are noticeable. 
> 
> so, i found, again i stress ONLY on this particular PC which is irregular at
> the best
> of times, the most efficient all purpose algorithm to be:
> }}}
<eucode>

<snip>

> function abs(object a)
> 	if sequence(a) then return sqrt(a*a)
> 	elsif (a < 0) then return -a end if
> 	return a
> end function
> 
> which was NOT what i expected

And neither do I. Aren't 486's supposed to have slow fpu's?
Anyway, is it an sx or dx?

Regards, Alexander Toresson

Shhh! Be vewy quiet! I'm hunting wuntime ewwows!

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu