2000-07-31 19:19:30 -03:00
|
|
|
/***********************************************************
|
|
|
|
Copyright (c) 2000, BeOpen.com.
|
|
|
|
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
|
|
|
|
Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
See the file "Misc/COPYRIGHT" for information on usage and
|
|
|
|
redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
******************************************************************/
|
|
|
|
|
2000-07-31 12:28:04 -03:00
|
|
|
/***************************************
|
|
|
|
THIS FILE IS OBSOLETE
|
|
|
|
USE "pyport.h" INSTEAD
|
|
|
|
***************************************/
|
|
|
|
|
1995-02-18 10:50:12 -04:00
|
|
|
/* On the 68K Mac, when using CFM (Code Fragment Manager),
|
|
|
|
<math.h> requires special treatment -- we need to surround it with
|
|
|
|
#pragma lib_export off / on...
|
|
|
|
This is because MathLib.o is a static library, and exporting its
|
|
|
|
symbols doesn't quite work...
|
|
|
|
XXX Not sure now... Seems to be something else going on as well... */
|
|
|
|
|
1998-04-28 13:02:29 -03:00
|
|
|
#ifndef HAVE_HYPOT
|
2000-07-09 00:09:57 -03:00
|
|
|
extern double hypot(double, double);
|
1998-11-02 12:21:39 -04:00
|
|
|
#ifdef MWERKS_BEFORE_PRO4
|
1998-04-28 13:02:29 -03:00
|
|
|
#define hypot we_dont_want_faulty_hypot_decl
|
|
|
|
#endif
|
1995-02-18 10:50:12 -04:00
|
|
|
#endif
|
1996-07-30 13:55:08 -03:00
|
|
|
|
1998-04-28 13:02:29 -03:00
|
|
|
#include <math.h>
|
|
|
|
|
1996-08-29 15:12:36 -03:00
|
|
|
#ifndef HAVE_HYPOT
|
1998-04-28 13:02:29 -03:00
|
|
|
#ifdef __MWERKS__
|
|
|
|
#undef hypot
|
|
|
|
#endif
|
1996-07-30 13:55:08 -03:00
|
|
|
#endif
|
1997-05-20 12:58:15 -03:00
|
|
|
|
|
|
|
#if defined(USE_MSL) && defined(__MC68K__)
|
|
|
|
/* CodeWarrior MSL 2.1.1 has weird define overrides that don't work
|
|
|
|
** when you take the address of math functions. If I interpret the
|
|
|
|
** ANSI C standard correctly this is illegal, but I haven't been able
|
|
|
|
** to convince the MetroWerks folks of this...
|
|
|
|
*/
|
|
|
|
#undef acos
|
|
|
|
#undef asin
|
|
|
|
#undef atan
|
|
|
|
#undef atan2
|
|
|
|
#undef ceil
|
|
|
|
#undef cos
|
|
|
|
#undef cosh
|
|
|
|
#undef exp
|
|
|
|
#undef fabs
|
|
|
|
#undef floor
|
|
|
|
#undef fmod
|
|
|
|
#undef log
|
|
|
|
#undef log10
|
|
|
|
#undef pow
|
2000-05-11 15:19:42 -03:00
|
|
|
#undef rint
|
1997-05-20 12:58:15 -03:00
|
|
|
#undef sin
|
|
|
|
#undef sinh
|
|
|
|
#undef sqrt
|
|
|
|
#undef tan
|
|
|
|
#undef tanh
|
|
|
|
#define acos acosd
|
|
|
|
#define asin asind
|
|
|
|
#define atan atand
|
|
|
|
#define atan2 atan2d
|
|
|
|
#define ceil ceild
|
|
|
|
#define cos cosd
|
|
|
|
#define cosh coshd
|
|
|
|
#define exp expd
|
|
|
|
#define fabs fabsd
|
|
|
|
#define floor floord
|
|
|
|
#define fmod fmodd
|
|
|
|
#define log logd
|
|
|
|
#define log10 log10d
|
|
|
|
#define pow powd
|
2000-05-11 15:19:42 -03:00
|
|
|
#define rint rintd
|
1997-05-20 12:58:15 -03:00
|
|
|
#define sin sind
|
|
|
|
#define sinh sinhd
|
|
|
|
#define sqrt sqrtd
|
|
|
|
#define tan tand
|
|
|
|
#define tanh tanhd
|
|
|
|
#endif
|