123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887 |
- {
- File: fp.p
-
- Contains: FPCE Floating-Point Definitions and Declarations.
-
- Version: Technology: MathLib v2
- Release: Universal Interfaces 3.4.2
-
- Copyright: © 1987-2002 by Apple Computer, Inc., all rights reserved.
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://www.freepascal.org/bugs.html
-
- }
- {
- Modified for use with Free Pascal
- Version 200
- Please report any bugs to <[email protected]>
- }
- {$mode macpas}
- {$packenum 1}
- {$macro on}
- {$inline on}
- {$CALLING MWPASCAL}
- unit fp;
- interface
- {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
- {$setc GAP_INTERFACES_VERSION := $0200}
- {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
- {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
- {$endc}
- {$ifc defined CPUPOWERPC and defined CPUI386}
- {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
- {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
- {$endc}
- {$ifc not defined __ppc__ and defined CPUPOWERPC}
- {$setc __ppc__ := 1}
- {$elsec}
- {$setc __ppc__ := 0}
- {$endc}
- {$ifc not defined __i386__ and defined CPUI386}
- {$setc __i386__ := 1}
- {$elsec}
- {$setc __i386__ := 0}
- {$endc}
- {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
- {$error Conflicting definitions for __ppc__ and __i386__}
- {$endc}
- {$ifc defined __ppc__ and __ppc__}
- {$setc TARGET_CPU_PPC := TRUE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$elifc defined __i386__ and __i386__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_X86 := TRUE}
- {$elsec}
- {$error Neither __ppc__ nor __i386__ is defined.}
- {$endc}
- {$setc TARGET_CPU_PPC_64 := FALSE}
- {$ifc defined FPC_BIG_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := TRUE}
- {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
- {$elifc defined FPC_LITTLE_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := FALSE}
- {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
- {$elsec}
- {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
- {$endc}
- {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
- {$setc CALL_NOT_IN_CARBON := FALSE}
- {$setc OLDROUTINENAMES := FALSE}
- {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
- {$setc OPAQUE_UPP_TYPES := TRUE}
- {$setc OTCARBONAPPLICATION := TRUE}
- {$setc OTKERNEL := FALSE}
- {$setc PM_USE_SESSION_APIS := TRUE}
- {$setc TARGET_API_MAC_CARBON := TRUE}
- {$setc TARGET_API_MAC_OS8 := FALSE}
- {$setc TARGET_API_MAC_OSX := TRUE}
- {$setc TARGET_CARBON := TRUE}
- {$setc TARGET_CPU_68K := FALSE}
- {$setc TARGET_CPU_MIPS := FALSE}
- {$setc TARGET_CPU_SPARC := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_UNIX := FALSE}
- {$setc TARGET_OS_WIN32 := FALSE}
- {$setc TARGET_RT_MAC_68881 := FALSE}
- {$setc TARGET_RT_MAC_CFM := FALSE}
- {$setc TARGET_RT_MAC_MACHO := TRUE}
- {$setc TYPED_FUNCTION_POINTERS := TRUE}
- {$setc TYPE_BOOL := FALSE}
- {$setc TYPE_EXTENDED := FALSE}
- {$setc TYPE_LONGLONG := TRUE}
- uses MacTypes,ConditionalMacros;
- {*******************************************************************************
- * *
- * 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. *
- * *
- *******************************************************************************}
- {$ALIGN MAC68K}
- {*******************************************************************************
- * *
- * Efficient types *
- * *
- * float_t Most efficient type at least as wide as float *
- * double_t Most efficient type at least as wide as double *
- * *
- * CPU float_t(bits) double_t(bits) *
- * -------- ----------------- ----------------- *
- * PowerPC float(32) double(64) *
- * 68K long double(80/96) long double(80/96) *
- * x86 double(64) double(64) *
- * *
- *******************************************************************************}
- {$ifc TARGET_CPU_PPC}
- type
- float_t = Float32;
- double_t = Float64;
- {$elsec}
- {$ifc TARGET_CPU_68K}
- type
- float_t = extended;
- double_t = extended;
- {$elsec}
- {$ifc TARGET_CPU_X86}
- type
- float_t = Float64;
- double_t = Float64;
- {$elsec}
- {$ifc TARGET_CPU_MIPS}
- type
- float_t = Double;
- double_t = Double;
- {$elsec}
- {$ifc TARGET_CPU_ALPHA}
- type
- float_t = Double;
- double_t = Double;
- {$elsec}
- {$ifc TARGET_CPU_SPARC}
- type
- float_t = Double;
- double_t = Double;
- {$elsec}
- { Unsupported CPU }
- {$endc}
- {$endc}
- {$endc}
- {$endc}
- {$endc}
- {$endc}
- {*******************************************************************************
- * *
- * Define some constants. *
- * *
- * HUGE_VAL IEEE 754 value of infinity. *
- * INFINITY IEEE 754 value of infinity. *
- * NAN A generic NaN (Not A Number). *
- * DECIMAL_DIG Satisfies the constraint that the conversion from *
- * double to decimal and back is the identity function. *
- * *
- *******************************************************************************}
- const
- {$ifc TARGET_CPU_PPC}
- DECIMAL_DIG = 17;
- {$elsec}
- DECIMAL_DIG = 21;
- {$endc}
- {$ifc TARGET_OS_MAC}
- {*******************************************************************************
- * *
- * Trigonometric functions *
- * *
- * acos result is in [0,pi]. *
- * asin result is in [-pi/2,pi/2]. *
- * atan result is in [-pi/2,pi/2]. *
- * atan2 Computes the arc tangent of y/x in [-pi,pi] using the sign of *
- * both arguments to determine the quadrant of the computed value. *
- * *
- *******************************************************************************}
- {
- * cos()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function cos(x: double_t): double_t; external name '_cos';
- {
- * sin()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function sin(x: double_t): double_t; external name '_sin';
- {
- * tan()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function tan(x: double_t): double_t; external name '_tan';
- {
- * acos()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function acos(x: double_t): double_t; external name '_acos';
- {
- * asin()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function asin(x: double_t): double_t; external name '_asin';
- {
- * atan()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function atan(x: double_t): double_t; external name '_atan';
- {
- * atan2()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function atan2(y: double_t; x: double_t): double_t; external name '_atan2';
- {*******************************************************************************
- * *
- * Hyperbolic functions *
- * *
- *******************************************************************************}
- {
- * cosh()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function cosh(x: double_t): double_t; external name '_cosh';
- {
- * sinh()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function sinh(x: double_t): double_t; external name '_sinh';
- {
- * tanh()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function tanh(x: double_t): double_t; external name '_tanh';
- {
- * acosh()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function acosh(x: double_t): double_t; external name '_acosh';
- {
- * asinh()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function asinh(x: double_t): double_t; external name '_asinh';
- {
- * atanh()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function atanh(x: double_t): double_t; external name '_atanh';
- {*******************************************************************************
- * *
- * Exponential functions *
- * *
- * expm1 expm1(x) = exp(x) - 1. But, for small enough arguments, *
- * expm1(x) is expected to be more accurate than exp(x) - 1. *
- * frexp Breaks a floating-point number into a normalized fraction *
- * and an integral power of 2. It stores the SInt16 in the *
- * object pointed by *exponent. *
- * ldexp Multiplies a floating-point number by an SInt16 power of 2. *
- * log1p log1p = log(1 + x). But, for small enough arguments, *
- * log1p is expected to be more accurate than log(1 + x). *
- * logb Extracts the exponent of its argument, as a signed integral *
- * value. A subnormal argument is treated as though it were first *
- * normalized. Thus: *
- * 1 <= x * 2^(-logb(x)) < 2 *
- * modf Returns fractional part of x as function result and returns *
- * integral part of x via iptr. Note C9X uses double not double_t. *
- * scalb Computes x * 2^n efficently. This is not normally done by *
- * computing 2^n explicitly. *
- * *
- *******************************************************************************}
- {
- * exp()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function exp(x: double_t): double_t; external name '_exp';
- {
- * expm1()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function expm1(x: double_t): double_t; external name '_expm1';
- {
- * exp2()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function exp2(x: double_t): double_t; external name '_exp2';
- {
- * frexp()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function frexp(x: double_t; var exponent: SInt32): double_t; external name '_frexp';
- {
- * ldexp()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function ldexp(x: double_t; n: SInt32): double_t; external name '_ldexp';
- {
- * log()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function log(x: double_t): double_t; external name '_log';
- {
- * log2()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function log2(x: double_t): double_t; external name '_log2';
- {
- * log1p()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function log1p(x: double_t): double_t; external name '_log1p';
- {
- * log10()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function log10(x: double_t): double_t; external name '_log10';
- {
- * logb()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function logb(x: double_t): double_t; external name '_logb';
- {
- * modf()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function modf(x: double_t; var iptr: double_t): double_t; external name '_modf';
- {
- * modff()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function modff(x: Single; var iptrf: Single): Single; external name '_modff';
- {
- Note: For compatiblity scalb(x,n) has n of type
- int on Mac OS X
- long on Mac OS
- }
- type
- _scalb_n_type = SInt32;
- {
- * scalb()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function scalb(x: double_t; n: _scalb_n_type): double_t; external name '_scalb';
- {*******************************************************************************
- * *
- * Power and absolute value functions *
- * *
- * hypot Computes the square root of the sum of the squares of its *
- * arguments, without undue overflow or underflow. *
- * pow Returns x raised to the power of y. Result is more accurate *
- * than using exp(log(x)*y). *
- * *
- *******************************************************************************}
- {
- * fabs()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function fabs(x: double_t): double_t; external name '_fabs';
- {
- * hypot()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function hypot(x: double_t; y: double_t): double_t; external name '_hypot';
- {
- * pow()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 2.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function pow(x: double_t; y: double_t): double_t; external name '_pow';
- {
- * sqrt()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function sqrt(x: double_t): double_t; external name '_sqrt';
- {*******************************************************************************
- * *
- * Gamma and Error functions *
- * *
- * erf The error function. *
- * erfc Complementary error function. *
- * gamma The gamma function. *
- * lgamma Computes the base-e logarithm of the absolute value of *
- * gamma of its argument x, for x > 0. *
- * *
- *******************************************************************************}
- {
- * erf()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function erf(x: double_t): double_t; external name '_erf';
- {
- * erfc()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function erfc(x: double_t): double_t; external name '_erfc';
- {
- * gamma()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function gamma(x: double_t): double_t; external name '_gamma';
- {
- * lgamma()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function lgamma(x: double_t): double_t; external name '_lgamma';
- {*******************************************************************************
- * *
- * Nearest SInt16 functions *
- * *
- * rint Rounds its argument to an integral value in floating point *
- * format, honoring the current rounding direction. *
- * *
- * nearbyint Differs from rint only in that it does not raise the inexact *
- * exception. It is the nearbyint function recommended by the *
- * IEEE floating-point standard 854. *
- * *
- * rinttol Rounds its argument to the nearest long int using the current *
- * rounding direction. NOTE: if the rounded value is outside *
- * the range of long int, then the result is undefined. *
- * *
- * round Rounds the argument to the nearest integral value in floating *
- * point format similar to the Fortran "anint" function. That is: *
- * add half to the magnitude and chop. *
- * *
- * roundtol Similar to the Fortran function nint or to the Pascal round. *
- * NOTE: if the rounded value is outside the range of long int, *
- * then the result is undefined. *
- * *
- * trunc Computes the integral value, in floating format, nearest to *
- * but no larger in magnitude than its argument. NOTE: on 68K *
- * compilers when using -elems881, trunc must return an int *
- * *
- *******************************************************************************}
- {
- * ceil()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function ceil(x: double_t): double_t; external name '_ceil';
- {
- * floor()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function floor(x: double_t): double_t; external name '_floor';
- {
- * rint()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function rint(x: double_t): double_t; external name '_rint';
- {
- * nearbyint()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function nearbyint(x: double_t): double_t; external name '_nearbyint';
- {
- * rinttol()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function rinttol(x: double_t): SInt32; external name '_rinttol';
- {
- * round()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function roundd(x: double_t): double_t; external name '_round';
- {
- * roundtol()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function roundtol(round: double_t): SInt32; external name '_roundtol';
- {
- Note: For compatiblity trunc(x) has a return type of
- int for classic 68K with FPU enabled
- double_t everywhere else
- }
- {$ifc TARGET_RT_MAC_68881}
- type
- _trunc_return_type = SInt32;
- {$elsec}
- type
- _trunc_return_type = double_t;
- {$endc} {TARGET_RT_MAC_68881}
- {
- * trunc()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function truncd(x: double_t): _trunc_return_type; external name '_trunc';
- {*******************************************************************************
- * *
- * Remainder functions *
- * *
- * remainder IEEE 754 floating point standard for remainder. *
- * remquo SANE remainder. It stores into 'quotient' the 7 low-order *
- * bits of the SInt16 quotient x/y, such that: *
- * -127 <= quotient <= 127. *
- * *
- *******************************************************************************}
- {
- * fmod()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function fmod(x: double_t; y: double_t): double_t; external name '_fmod';
- {
- * remainder()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function remainder(x: double_t; y: double_t): double_t; external name '_remainder';
- {
- * remquo()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function remquo(x: double_t; y: double_t; var quo: SInt32): double_t; external name '_remquo';
- {*******************************************************************************
- * *
- * Auxiliary functions *
- * *
- * copysign Produces a value with the magnitude of its first argument *
- * and sign of its second argument. NOTE: the order of the *
- * arguments matches the recommendation of the IEEE 754 *
- * floating point standard, which is opposite from the SANE *
- * copysign function. *
- * *
- * nan The call 'nan("n-char-sequence")' returns a quiet NaN *
- * with content indicated through tagp in the selected *
- * data type format. *
- * *
- * nextafter Computes the next representable value after 'x' in the *
- * direction of 'y'. if x == y, then y is returned. *
- * *
- *******************************************************************************}
- {
- * copysign()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function copysign(x: double_t; y: double_t): double_t; external name '_copysign';
- {
- * nan()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function nan(tagp: ConstCStringPtr): Double; external name '_nan';
- {
- * nanf()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function nanf(tagp: ConstCStringPtr): Single; external name '_nanf';
- {
- * nextafterd()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function nextafterd(x: Double; y: Double): Double; external name '_nextafterd';
- {
- * nextafterf()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function nextafterf(x: Single; y: Single): Single; external name '_nextafterf';
- {
- * __fpclassifyd()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __fpclassifyd(x: Double): SInt32; external name '___fpclassifyd';
- {
- * __fpclassifyf()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __fpclassifyf(x: Single): SInt32; external name '___fpclassifyf';
- {
- * __isnormald()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __isnormald(x: Double): SInt32; external name '___isnormald';
- {
- * __isnormalf()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __isnormalf(x: Single): SInt32; external name '___isnormalf';
- {
- * __isfinited()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __isfinited(x: Double): SInt32; external name '___isfinited';
- {
- * __isfinitef()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __isfinitef(x: Single): SInt32; external name '___isfinitef';
- {
- * __isnand()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __isnand(x: Double): SInt32; external name '___isnand';
- {
- * __isnanf()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __isnanf(x: Single): SInt32; external name '___isnanf';
- {
- * __signbitd()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __signbitd(x: Double): SInt32; external name '___signbitd';
- {
- * __signbitf()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __signbitf(x: Single): SInt32; external name '___signbitf';
- {
- * __inf()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function __inf: double_t; external name '___inf';
- {*******************************************************************************
- * *
- * Inquiry macros *
- * *
- * fpclassify Returns one of the FP_Å values. *
- * isnormal Non-zero if and only if the argument x is normalized. *
- * isfinite Non-zero if and only if the argument x is finite. *
- * isnan Non-zero if and only if the argument x is a NaN. *
- * signbit Non-zero if and only if the sign of the argument x is *
- * negative. This includes, NaNs, infinities and zeros. *
- * *
- *******************************************************************************}
- const
- FP_SNAN = 0; { signaling NaN }
- FP_QNAN = 1; { quiet NaN }
- FP_INFINITE = 2; { + or - infinity }
- FP_ZERO = 3; { + or - zero }
- FP_NORMAL = 4; { all normal numbers }
- FP_SUBNORMAL = 5; { denormal numbers }
- { *******************************************************************************
- * *
- * Max, Min and Positive Difference *
- * *
- * fdim Determines the 'positive difference' between its arguments: *
- * ( x - y, if x > y ), ( +0, if x <= y ). If one argument is *
- * NaN, then fdim returns that NaN. if both arguments are NaNs, *
- * then fdim returns the first argument. *
- * *
- * fmax Returns the maximum of the two arguments. Corresponds to the *
- * max function in FORTRAN. NaN arguments are treated as missing *
- * data. If one argument is NaN and the other is a number, then *
- * the number is returned. If both are NaNs then the first *
- * argument is returned. *
- * *
- * fmin Returns the minimum of the two arguments. Corresponds to the *
- * min function in FORTRAN. NaN arguments are treated as missing *
- * data. If one argument is NaN and the other is a number, then *
- * the number is returned. If both are NaNs then the first *
- * argument is returned. *
- * *
- ******************************************************************************* }
- {
- * fdim()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function fdim(x: double_t; y: double_t): double_t; external name '_fdim';
- {
- * fmax()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function fmax(x: double_t; y: double_t): double_t; external name '_fmax';
- {
- * fmin()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function fmin(x: double_t; y: double_t): double_t; external name '_fmin';
- {******************************************************************************
- * Constants *
- ******************************************************************************}
- {*******************************************************************************
- * *
- * Non NCEG extensions *
- * *
- *******************************************************************************}
- {$ifc undefined __NOEXTENSIONS__}
- {*******************************************************************************
- * *
- * Financial functions *
- * *
- * compound Computes the compound interest factor "(1 + rate)^periods" *
- * more accurately than the straightforward computation with *
- * the Power function. This is SANE's compound function. *
- * *
- * annuity Computes the present value factor for an annuity *
- * "(1 - (1 + rate)^(-periods)) /rate" more accurately than *
- * the straightforward computation with the Power function. *
- * This is SANE's annuity function. *
- * *
- *******************************************************************************}
- {
- * compound()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function compound(rate: double_t; periods: double_t): double_t; external name '_compound';
- {
- * annuity()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function annuity(rate: double_t; periods: double_t): double_t; external name '_annuity';
- {*******************************************************************************
- * *
- * Random function *
- * *
- * randomx A pseudorandom number generator. It uses the iteration: *
- * (7^5*x)mod(2^31-1) *
- * *
- *******************************************************************************}
- {
- * randomx()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function randomx(var x: double_t): double_t; external name '_randomx';
- {******************************************************************************
- * Relational operator *
- ******************************************************************************}
- { relational operator }
- type
- relop = SInt16;
- const
- GREATERTHAN = 0;
- LESSTHAN = 1;
- EQUALTO = 2;
- UNORDERED = 3;
- {
- * relation()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function relation(x: double_t; y: double_t): relop; external name '_relation';
- {*******************************************************************************
- * *
- * Binary to decimal conversions *
- * *
- * SIGDIGLEN Significant decimal digits. *
- * *
- * decimal A record which provides an intermediate unpacked form for *
- * programmers who wish to do their own parsing of numeric input *
- * or formatting of numeric output. *
- * *
- * decform Controls each conversion to a decimal string. The style field *
- * is either FLOATDECIMAL or FIXEDDECIMAL. If FLOATDECIMAL, the *
- * value of the field digits is the number of significant digits. *
- * If FIXEDDECIMAL value of the field digits is the number of *
- * digits to the right of the decimal point. *
- * *
- * num2dec Converts a double_t to a decimal record using a decform. *
- * dec2num Converts a decimal record d to a double_t value. *
- * dec2str Converts a decform and decimal to a string using a decform. *
- * str2dec Converts a string to a decimal struct. *
- * dec2d Similar to dec2num except a double is returned (68k only). *
- * dec2f Similar to dec2num except a float is returned. *
- * dec2s Similar to dec2num except a short is returned. *
- * dec2l Similar to dec2num except a long is returned. *
- * *
- *******************************************************************************}
- const
- SIGDIGLEN = 36;
- DECSTROUTLEN = 80;
- type
- DecimalKindItem = (FLOATDECIMAL, FIXEDDECIMAL);
- DecimalKind = DecimalKindItem;
- decimal = record
- sgn: 0..1; { sign 0 for +, 1 for - }
- exp: SInt16;
- sig: Str36;
- end;
- decform = record
- style: DecimalKind;
- digits: SInt16;
- end;
- {
- * num2dec()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- procedure num2dec(const (*var*) f: decform; x: double_t; var d: decimal); external name '_num2dec';
- {
- * dec2num()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function dec2num(const (*var*) d: decimal): double_t; external name '_dec2num';
- {
- * dec2str()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- procedure dec2str(const (*var*) f: decform; const (*var*) d: decimal; s: CStringPtr); external name '_dec2str';
- {
- * str2dec()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- procedure str2dec(s: ConstCStringPtr; var ix: SInt16; var d: decimal; var vp: SInt16); external name '_str2dec';
- {$ifc TARGET_CPU_68K}
- {$ifc CALL_NOT_IN_CARBON}
- {
- * dec2d()
- *
- * Availability:
- * Non-Carbon CFM: not available
- * CarbonLib: not available
- * Mac OS X: not available
- }
- function dec2d(const (*var*) d: decimal): Double; external name '_dec2d';
- {$endc} {CALL_NOT_IN_CARBON}
- {$endc} {TARGET_CPU_68K}
- {
- * dec2f()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function dec2f(const (*var*) d: decimal): Single; external name '_dec2f';
- {
- * dec2s()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function dec2s(const (*var*) d: decimal): SInt16; external name '_dec2s';
- {
- * dec2l()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function dec2l(const (*var*) d: decimal): SInt32; external name '_dec2l';
- {*******************************************************************************
- * *
- * 68k-only Transfer Function Prototypes *
- * *
- *******************************************************************************}
- {$ifc TARGET_CPU_68K}
- {$ifc CALL_NOT_IN_CARBON}
- {
- * x96tox80()
- *
- * Availability:
- * Non-Carbon CFM: not available
- * CarbonLib: not available
- * Mac OS X: not available
- }
- procedure x96tox80(const (*var*) x: extended96; var x80: extended80); external name '_x96tox80';
- {
- * x80tox96()
- *
- * Availability:
- * Non-Carbon CFM: not available
- * CarbonLib: not available
- * Mac OS X: not available
- }
- procedure x80tox96(const (*var*) x80: extended80; var x: extended96); external name '_x80tox96';
- {$endc} {CALL_NOT_IN_CARBON}
- {$endc} {TARGET_CPU_68K}
- {$endc}
- {*******************************************************************************
- * *
- * PowerPC-only Function Prototypes *
- * *
- *******************************************************************************}
- {$ifc TARGET_CPU_PPC}
- {
- * cosl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function cosl(x: LongDouble): LongDouble; external name '_cosl';
- {
- * sinl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function sinl(x: LongDouble): LongDouble; external name '_sinl';
- {
- * tanl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function tanl(x: LongDouble): LongDouble; external name '_tanl';
- {
- * acosl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function acosl(x: LongDouble): LongDouble; external name '_acosl';
- {
- * asinl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function asinl(x: LongDouble): LongDouble; external name '_asinl';
- {
- * atanl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function atanl(x: LongDouble): LongDouble; external name '_atanl';
- {
- * atan2l()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function atan2l(y: LongDouble; x: LongDouble): LongDouble; external name '_atan2l';
- {
- * coshl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function coshl(x: LongDouble): LongDouble; external name '_coshl';
- {
- * sinhl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function sinhl(x: LongDouble): LongDouble; external name '_sinhl';
- {
- * tanhl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function tanhl(x: LongDouble): LongDouble; external name '_tanhl';
- {
- * acoshl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function acoshl(x: LongDouble): LongDouble; external name '_acoshl';
- {
- * asinhl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function asinhl(x: LongDouble): LongDouble; external name '_asinhl';
- {
- * atanhl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function atanhl(x: LongDouble): LongDouble; external name '_atanhl';
- {
- * expl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function expl(x: LongDouble): LongDouble; external name '_expl';
- {
- * expm1l()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function expm1l(x: LongDouble): LongDouble; external name '_expm1l';
- {
- * exp2l()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function exp2l(x: LongDouble): LongDouble; external name '_exp2l';
- {
- * frexpl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function frexpl(x: LongDouble; var exponent: SInt32): LongDouble; external name '_frexpl';
- {
- * ldexpl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function ldexpl(x: LongDouble; n: SInt32): LongDouble; external name '_ldexpl';
- {
- * logl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function logl(x: LongDouble): LongDouble; external name '_logl';
- {
- * log1pl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function log1pl(x: LongDouble): LongDouble; external name '_log1pl';
- {
- * log10l()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function log10l(x: LongDouble): LongDouble; external name '_log10l';
- {
- * log2l()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function log2l(x: LongDouble): LongDouble; external name '_log2l';
- {
- * logbl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function logbl(x: LongDouble): LongDouble; external name '_logbl';
- {
- * scalbl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function scalbl(x: LongDouble; n: SInt32): LongDouble; external name '_scalbl';
- {
- * fabsl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function fabsl(x: LongDouble): LongDouble; external name '_fabsl';
- {
- * hypotl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function hypotl(x: LongDouble; y: LongDouble): LongDouble; external name '_hypotl';
- {
- * powl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function powl(x: LongDouble; y: LongDouble): LongDouble; external name '_powl';
- {
- * sqrtl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function sqrtl(x: LongDouble): LongDouble; external name '_sqrtl';
- {
- * erfl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function erfl(x: LongDouble): LongDouble; external name '_erfl';
- {
- * erfcl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function erfcl(x: LongDouble): LongDouble; external name '_erfcl';
- {
- * gammal()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function gammal(x: LongDouble): LongDouble; external name '_gammal';
- {
- * lgammal()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function lgammal(x: LongDouble): LongDouble; external name '_lgammal';
- {
- * ceill()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 2.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function ceill(x: LongDouble): LongDouble; external name '_ceill';
- {
- * floorl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function floorl(x: LongDouble): LongDouble; external name '_floorl';
- {
- * rintl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function rintl(x: LongDouble): LongDouble; external name '_rintl';
- {
- * nearbyintl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function nearbyintl(x: LongDouble): LongDouble; external name '_nearbyintl';
- {
- * rinttoll()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function rinttoll(x: LongDouble): SInt32; external name '_rinttoll';
- {
- * roundl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function roundl(x: LongDouble): LongDouble; external name '_roundl';
- {
- * roundtoll()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function roundtoll(x: LongDouble): SInt32; external name '_roundtoll';
- {
- * truncl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function truncl(x: LongDouble): LongDouble; external name '_truncl';
- {
- * remainderl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function remainderl(x: LongDouble; y: LongDouble): LongDouble; external name '_remainderl';
- {
- * remquol()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function remquol(x: LongDouble; y: LongDouble; var quo: SInt32): LongDouble; external name '_remquol';
- {
- * copysignl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function copysignl(x: LongDouble; y: LongDouble): LongDouble; external name '_copysignl';
- {
- * fdiml()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function fdiml(x: LongDouble; y: LongDouble): LongDouble; external name '_fdiml';
- {
- * fmaxl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function fmaxl(x: LongDouble; y: LongDouble): LongDouble; external name '_fmaxl';
- {
- * fminl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function fminl(x: LongDouble; y: LongDouble): LongDouble; external name '_fminl';
- {$ifc undefined __NOEXTENSIONS__}
- {
- * relationl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function relationl(x: LongDouble; y: LongDouble): relop; external name '_relationl';
- {
- * num2decl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- procedure num2decl(const (*var*) f: decform; x: LongDouble; var d: decimal); external name '_num2decl';
- {
- * dec2numl()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- function dec2numl(const (*var*) d: decimal): LongDouble; external name '_dec2numl';
- {$endc}
- {$endc} {TARGET_CPU_PPC}
- {$endc} {TARGET_OS_MAC}
- {$ifc undefined __NOEXTENSIONS__}
- {
- MathLib v2 has two new transfer functions: x80tod and dtox80. They can
- be used to directly transform 68k 80-bit extended data types to double
- and back for PowerPC based machines without using the functions
- x80told or ldtox80. Double rounding may occur.
- }
- {
- * x80tod()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 2.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- function x80tod(const (*var*) x80: extended80): Double; external name '_x80tod';
- {
- * dtox80()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 2.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- procedure dtox80((*const*) var x: Double; var x80: extended80); external name '_dtox80';
- {$ifc TARGET_CPU_PPC}
- {
- * x80told()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- procedure x80told(const (*var*) x80: extended80; var x: LongDouble); external name '_x80told';
- {
- * ldtox80()
- *
- * Availability:
- * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: not available
- }
- procedure ldtox80((*const*) var x: LongDouble; var x80: extended80); external name '_ldtox80';
- {$endc} {TARGET_CPU_PPC}
- {$endc}
- {$ALIGN MAC68K}
- end.
|