🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #30931

Re: LSC math libraries (68881 especially)

#30931
From: Rich Siegel
Date: Fri, 05 Aug 1988 13:03
68 lines
3377 bytes
In article <5415@watcgl.waterloo.edu> wewallace@watcgl.waterloo.edu (Bill Wallace) writes:
>I've been playing around with LSC 3.0 specifically with the math
>libraries.  Could someone tell me if everyone received math libraries that
>contain none of the routines declared in math.h, only the same routines
>but with an underscore prepended?  I recompiled with math881.c and things
>work find but whats up?

	You should not add the actual library sources to your project; instead
you should change the _ERRORCHECK_ #define in the library's "config.h" file
(you did read the library notes, right?)), recompile the library, and then
do a Use Disk in your own project to load up the changes.

	It works like this:

	the functions beginning with an underscore ( _exp(), for example)
do not do any error checking. If _ERRORCHECK_ is undefined in the math
library's config.h file, then <math.h> defines the "real" functions
( exp() in this example) as macros that call the corresponding underscore
functions. This means that if there's not error checking, the calls
in Math881 go directly to the FPCP.

	If _ERRORCHECK_ is true (the default case in "Math"and "MathHybrid")
the function calls are error-checking wrappers that perform domain checking
on the arguments where appropriate, and before they return, call range
checking on the results, and if necessary, sets "errno".

By default, there's no error checking in "Math881", and error checking
is turned on in "Math" and "MathHybrid".

>Also if THINK is listening then here are some suggestions for the next
>version:
>  2) allow both proto.h and math.h to be included.  This currently gives
>errors for some reason.

	The math library routines are already protoyped in <math.h>; the
prototypes were not removed from <proto.h>, however. In the future, <proto.h>
will go away, and the prototypes for alibrary routines will be in that 
library's header file.

>  4) have a small default project so a single source file can be compiled
>without having to make a project especially for it.

	You can easily do this yourself - I have a project called "scratch",
and I use it whenever I want to run a quickie test program, or build a
one-file library.

>  5) allow an explicit search path for header files.  I have some large
>     projects that are included in a number of other projects and it would
>     be convenient to allow the header files for them to be kept with the
>     project rather than where it can be currently found by the search
>     strategy

	There's no way to specify a search path, but you can specify 
include files by absolute path name, for example:
	
#include "MyDisk:SubDir1:SubDir2:ProjDir:Header.h"

		--Rich




Rich Siegel
Quality Assurance Technician
THINK Technologies Division, Symantec Corp.
Internet: singer@endor.harvard.edu
UUCP: ..harvard!endor!singer
Phone: (617) 275-4800 x305
Technical Details
Message-ID: <5075@husc6.harvard.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!endor!singer
References: <5415@watcgl.waterloo.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!endor!singer
From: singer@endor.harvard.edu (Rich Siegel)
Newsgroups: comp.sys.mac
Subject: Re: LSC math libraries (68881 especially)
Message-ID: <5075@husc6.harvard.edu>
Date: 5 Aug 88 13:03:30 GMT
References: <5415@watcgl.waterloo.edu>
Sender: news@husc6.harvard.edu
Reply-To: singer@endor.UUCP (Rich Siegel)
Distribution: comp
Organization: Symantec/THINK Technologies, Bedford, MA
Lines: 68