Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Gale Paeper
Subject: problems with GPC/Mac OS X
Date: 28 May 2003, 18:59:26
Frank Heckenbach wrote:
>
> Boris Herman wrote:
>
[snip]
> >
> > Thanks! That did it. I had to implement an arcsin function myself as
> > there isn't a "math" unit for GPC, right?
For a Pascal "math" unit for GPC on Mac OS X, Apple has already supplied
a solution in the fp.p unit of the Universal Interfaces. The comment
from fp.p [.pas] pretty much explains the functionality:
{*******************************************************************************
*
*
* A collection of numerical functions designed to facilitate a wide
*
* range of numerical programming as required by C9X.
*
*
*
* The <fp.h> declares many functions in support of numerical
programming. *
* It provides a superset of <math.h> and <SANE.h> functions. Some
*
* functionality previously found in <SANE.h> and not in the FPCE
<fp.h> *
* can be found in this <fp.h> under the heading "__NOEXTENSIONS__".
*
*
*
* All of these functions are IEEE 754 aware and treat exceptions,
NaNs, *
* positive and negative zero and infinity consistent with the
floating- *
* point standard.
*
*
*
*******************************************************************************}
Thanks to the efforts of Adriaan van Os and Peter N Lewis, a Mac OS X
GPC compatible version of Apple's Universal Interfaces which includes
fp.pas is available in two download packages which installs the
GPCInterfaces (i.e., the GPC compatible translation of Apple's Universal
Interfaces) for use with Mac OS X GPC. The Mac OS X GPC binary install
package <http://www.microbizz.nl/gpc321d11.bin.tar> includes
GPCInterfaces as part of the installation or a GPCInterfaces only
install package <http://www.microbizz.nl/GPCInterfacesA.tar> will add
the GPCInterfaces to a Mac OS X configuration if it doesn't already have
a copy installed.
> You could declare the libm function external.
>
> double asin (double x);
If I'm not mistaken, the gcc math.h for Mac OS X is configured to use
Apple's math.h. Since the math.h subset of the GPCInterfaces fp.pas
ends up linking with Apple's math.h implementation, there isn't any need
to do this. The original poster can get the asin implemetation on Mac
OS X just by using the fp.pas unit from GPCInterfaces. Since fp.pas
contains a trunc function which is incompatible with Pascal's trunc
fuction, it would be less troublesome to either selectively import the
specificly need routines from fp.pas or to selectively rename the import
of the fp.pas trunc routine to avoid conflicts with Pascal's trunc function.
Gale Paeper
gpaeper@empirenet.com
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| Adriaan van Os | problems with GPC/Mac OS X | 29 May 2003, 11:34:48 |
| Author | Subject | Date |
|---|---|---|
| Boris Herman | problems with GPC/Mac OS X | 22 May 2003, 15:47:07 |
| Frank Heckenbach | problems with GPC/Mac OS X | 22 May 2003, 16:47:54 |
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).