1. Re: Math Shortcuts
Hello all.
Well, it does rather seem that Robert is right (or at least mostly
so) concerning square roots. (After all, he should know better than I what
we're talking about.) Anyway, there's a couple of howevers
attached of course. However, unless I'm mistaken since my computer is
a 386 then it wouldn't have built in floating point (unless I had the 387, but I
don't.)
My understanding is that with the 486+ they have built floating point
stuff built in. (Am I correct here? Anybody know?)
This raises a few points. (1) On a computer without floating point built in
it should be possible to save speed by decreasing the precision (in an asm
program).
(2) I have written a program that does the square roots accurate
to two decimal placeCheck it out at
<http://www.geocities.com/athens/agora/7562/eu1.html>. This illustrates
the theory anyway. I would like some HELP optimizing this program. It runs
fast
no noticable delay on the calc, but several thousand make a delay. A couple of
things about this, to:
the part I think it spends the mose time in are the two while loops. Especially
the second one.
Any idea how I can simplify them without using sqrt(). PLEASE look it over and
send me any thoughts (privately would help reduce other's mail levels) on it, and
that way I might be able to get a 16 bit asm program (unless one knows a 32 bit
free assembler) which will (hopefully) speed up the process.
It seems somewhat promising. A little optimization then compilation, we might
have a faster routine after all (at least on 386's. If one knows a way of
detecting 386/higher pc's then a program could identify which routine would be
most efficient.)! Yeah! Thanks,
- Robert McDougal
Free web-based email, Forever, From anywhere!
http://www.mailexcite.com