| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Cube root |
Quoting Mike Bilow to Brian Converse in a message dated 12/14
MB> BC> One would hope that an optimizing compiler manages to reduce
MB> BC> the log. form to the power form. Exp, log, and (I think) power
MB> BC> are intrinsic Intel FPU functions, but are all done using a
MB> BC> microcoded series and interpolation approach. Using the log
MB> BC> form not only incurs more function calls, but also cascades
MB> BC> errors in precision. One strives to avoid cascaded operations
MB> BC> unless needed.
MB>
MB> Yes, there are direct FPU instructions for all of these
MB> things.
Well, not exactly! You do them all using the FPU, but it requires
combining rudimentary operations like raising 2 to a power, taking the
logarithm of a nuumber to the base 2, etc. Take a look at Richard
Startz's book (8087 Applications and Programming for the IBM PC and
Other PCs). The newer 80287, 80387, 80486 all have essentially the same
FP instructions, and none directly do the log, exponential or power
functions.
MB> This is becoming clear to me. As you may have guessed by
MB> now, I don't know very much about Pascal. I answered the
MB> question from a mathematical point of view, never thinking
MB> that some modern language would be unable to implement
^^^^^^^^^^^^^^^^^^^
MB> exponentiation directly.
It's just not included in the library with most Pascal compilers, just
as it wasn't included with C in the old days. It's easy enough to add
the feature in a Pascal unit, just as it's added in a library for C.
I know there are things C can do that Pascal can't, but adding functions
is no harder in Pascal than in C...
Patrick
___
X KWQ/2 1.2i X I'm not young enough to know everything anymore...
--- Maximus/2 2.02
* Origin: OS/2 Online * Auburn, WA * 206-351-5998 * (1:343/212)SEEN-BY: 270/101 620/243 711/401 409 410 413 430 808 809 934 955 712/407 515 SEEN-BY: 712/517 628 713/888 800/1 7877/2809 @PATH: 343/212 800 1 138/103 3615/50 396/1 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.