[comp.sys.mac.programmer] automatic 881 detection by libraries

trajmar@oahu.cs.ucla.edu (Peter Trajmar) (08/14/90)

I am writing an application that makes fairly heavy use of floating
point arithmetic using Think C. I am currently using the ANSI
or ANSI 881 libraries. I would like to be able to create a single
application that could run on either an 881 or non 881 equipped
machine. Currently I must compile two versions of the application.

I purchased Apple's SANE book with the hopes that SANE would handle
detection of the 881 and use it if it existed and handle the
computations in software if it did not. This does not appear to
be the case.

Based on the recent thread about coprocessors it seems that what
I want does not exist. Is there an easy way to accomplish it?
Medium hard way? What does an application such as Excel do?

It sure would be nice if SANE would support automatic provision
of the correct implementation of floating point libraries based
on the machine you are running on rather than needing to know at
compile time. If my understanding of the current situation is
correct, why are things they way they are? Is it just laziness
or are there good reasons?

Thanks for your help.

Peter Trajmar
(trajmar@cs.ucla.edu)

PS: Thanks to those who responded to my previous question about
Modal Dialogs.