Speed optimisation

Alex Tweedly alex at tweedly.net
Thu Oct 6 07:21:32 EDT 2005


Dick Kriesel wrote:

>
>Not yet, Kay; that would be too easy.  Although the "spec" didn't mention
>that the seconds might be negative, it didn't rule it out, either.  The
>above function would return an incorrect value if there were a negative.
>And handling negatives correctly might increase the times and counts.
>
>  
>
Hmmm - can you give a case where Kay's method gives wrong answers 
because of a negative seconds value ?
As far as I can see (both by inspection and by testing) it always gets 
it right.

On the other hand, both your method and mine (which is really just a 
variant of yours) get it wrong in key cases of negative seconds (e.g. 
00:00:00.1   - 31 gives   0:00:0-31 for you and 0:00:0-31.0 for me - 
both rather hopeless :-)

>Hey, Rob, since you wrote the "spec," do negatives matter?
>  
>
Yeah, yeah, it's the spec that's at fault, not the programmer :-) :-)


-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.10/119 - Release Date: 04/10/2005




More information about the use-livecode mailing list