[comp.sys.amiga.tech] Math Libraries

gerber@rigel.astro.uiuc.edu (08/07/90)

What are the advantages/disadvantages of using the Math libraries for
mathematical calculations rather than the similar C functions? Or does
Lattice C (say) call the math library routines?

What are the speed increases: with a math coprocessor? on a stock 7 Mhz
68000? I don't need a detailed response, just an order of magnitude (2X,
10X, 100X, etc.) estimate.

Thanks, 
Richard

ken@cbmvax.commodore.com (Ken Farinsky - CATS) (08/08/90)

In article <26900002@rigel> gerber@rigel.astro.uiuc.edu writes:
>What are the advantages/disadvantages of using the Math libraries for
>mathematical calculations rather than the similar C functions?

Shared-code and automatic ability to use an attached numeric processor.
When you use the math libraries, your application does not have to contain
the code to do the math--your application will be smaller.  As an 
additional benefit, when you add a math co-processor the libraries
will use them without any change to your executable.

>Or does Lattice C (say) call the math library routines?

Lattice C can call the math libraries if you set the correct flags.
See the Lattice manual for information on "lc", then look for the
"-f" flag.

-- 
--
Ken Farinsky - CATS - (215) 431-9421 - Commodore Business Machines
uucp: ...{uunet,rutgers}!cbmvax!ken
bix:  kfarinsky

hclausen@adspdk.CBMNET (Henrik Clausen) (08/10/90)

>In article <13703@cbmvax.commodore.com> ken@cbmvax.commodore.com (Ken Farinsky - CATS) writes:
>>Or does Lattice C (say) call the math library routines?
>
>Lattice C can call the math libraries if you set the correct flags.
>See the Lattice manual for information on "lc", then look for the
>"-f" flag.

   And link with lcmieee.lib - works great!

                                             -Henrik

--
|            Henrik Clausen, Graffiti Data (Fido: 2:230/22.33)           |
|           ...{pyramid|rutgers}!cbmvax!cbmehq!adspdk!hclausen           |
\__"Do not accept the heart that is the slave to reason" - Qawwali trad__/