📄 mathalib.s
字号:
* float fltParam; /* argument **/ .align 4,0x90_fceil: movl _mathFceilFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* fcos - single-precision floating-point cosine** RETURNS: the cosine of the radian argument fltParam** SEE ALSO: * floatLib (1), sin (2), cos (2), tan(2),* "The C Programming Language - Second Edition"* float fcos (fltParam)* float fltParam; /* angle in radians **/ .align 4,0x90_fcos: movl _mathFcosFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* fcosh - single-precision floating-point hyperbolic cosine** RETURNS:* The hyperbolic cosine of fltParam if (fltParam > 1.0), or* NaN if (fltParam < 1.0) ** SEE ALSO: "The C Programming Language - Second Edition"* float fcosh (fltParam)* float fltParam; /* angle in radians **/ .align 4,0x90_fcosh: movl _mathFcoshFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* fexp - single-precision exponential function** RETURNS:* Floating-point inverse natural logarithm (e ** (fltExponent)).** SEE ALSO: * floatLib (1), "The C Programming Language - Second Edition"* float fexp (fltExponent)* float fltExponent; /* argument **/ .align 4,0x90_fexp: movl _mathFexpFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* ffabs - single-precision floating-point absolute value** RETURNS: The floating-point absolute value of fltParam.** SEE ALSO: * floatLib (1), "The C Programming Language - Second Edition"* float ffabs (fltParam)* float fltParam; /* argument **/ .align 4,0x90_ffabs: movl _mathFfabsFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* ffloor - single-precision floating-point floor** Performs a 'round-to-negative-infinity'.** RETURNS: * The largest integral value less than or equal to fltParam,* result is returned in single precision.** SEE ALSO: * floatLib (1), "The C Programming Language - Second Edition"* float ffloor (fltParam)* float fltParam; /* argument **/ .align 4,0x90_ffloor: movl _mathFfloorFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* ffmod - single-precision floating-point modulus ** RETURNS: * Floating-point modulus of (fltParam / fltDivisor) with the sign of fltParam. ** SEE ALSO: * floatLib (1), "The C Programming Language - Second Edition"* float ffmod (fltParam, fltDivisor)* float fltParam; /* argument ** float fltDivisor; /* divisor **/ .align 4,0x90_ffmod: movl _mathFfmodFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* fhypot - single-precision Euclidean distance (hypotenuse)** This routine takes two input single-precision floating point* parameters and returns length of the corresponding Euclidean distance* (hypotenuse).** The distance is calculated as* sqrt ((fltX * fltX) + (fltY * fltY))** RETURNS: single-precision hypotenuse.** float fhypot (fltX, fltY)* float fltX; /* argument ** float fltY; /* argument **/ .align 4,0x90_fhypot: movl _mathFhypotFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* finfinity - return a very large float** SEE ALSO: floatLib(1)* float finfinity ()*/ .align 4,0x90_finfinity: movl _mathFinfinityFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* firint - convert float to integer** Convert fltParam to an integer using the selected IEEE* rounding direction.** CAVEAT:* The rounding direction is not pre-selectable* and is fixed for 'round-to-the-nearest'.** SEE ALSO: floatLib (1)* int firint (fltParam)* float fltParam; /* argument **/ .align 4,0x90_firint: movl _mathFirintFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* firound - INTEGER floating-point rounding** Performs a 'round-to-the-nearest' function.** NOTE:* If fltParam is spaced evenly between two integers,* then the even integer will be returned.* int firound (fltParam)* float fltParam; /* argument **/ .align 4,0x90_firound: movl _mathFiroundFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* flog - single-precision floating-point natural logarithm ** RETURNS: The natural logarithm of fltParam.** SEE ALSO: * floatLib (1), "The C Programming Language - Second Edition"* float flog (fltParam)* float fltParam; /* argument **/ .align 4,0x90_flog: movl _mathFlogFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* flog10 - single-precision floating-point logarithm base 10 ** RETURNS: The logarithm (base 10) of fltParam.** SEE ALSO: floatLib (1), log2 (2)* float flog10 (fltParam)* float fltParam; /* argument **/ .align 4,0x90_flog10: movl _mathFlog10Func,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* flog2 - single-precision floating-point logarithm base 2 ** RETURNS: The logarithm (base 2) of fltParam.** SEE ALSO: floatLib (1), log10 (2)* float flog2 (fltParam)* float fltParam; /* argument **/ .align 4,0x90_flog2: movl _mathFlog2Func,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* fpow - single-precision floating point X to the power of floating-point Y ** RETURNS: The floating-point value of fltX to the power of fltY.** SEE ALSO: floatLib (1), sqrt (2)* float fpow (fltX, fltY)* float fltX; /* X ** float fltY; /* X **/ .align 4,0x90_fpow: /* pow (x,y) = exp (y * log(x)) */ movl _mathFpowFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* fround - floating-point rounding** Performs a 'round-to-nearest'.** SEE ALSO: floatLib (1)* float fround (fltParam)* float fltParam; /* argument **/ .align 4,0x90_fround: movl _mathFroundFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* fsin - single-precision floating-point sine** RETURNS: The floating-point sine of fltParam.** SEE ALSO: * floatLib (1), cos (2), tan (2), * "The C Programming Language - Second Edition"* float fsin (fltParam)* float fltParam; /* angle in radians **/ .align 4,0x90_fsin: movl _mathFsinFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* fsincos - simultaneous single-precision floating-point sine and cosine** RETURNS:* The simultaeous floating point results of sine and cosine of the * radian argument The fltParam must be in range of -1.0 to +1.0.*** SEE ALSO: floatLib (1), "i80387 Floating-Point User's Manual"* void fsincos (fltParam, sinResult, cosResult)* float fltParam; /* angle in radians ** float *sinResult; /* sine result buffer ** float *cosResult; /* cosine result buffer **/ .align 4,0x90_fsincos: movl _mathFsincosFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* fsinh - single-precision floating-point hyperbolic sine** RETURNS: The floating-point hyperbolic sine of fltParam.** SEE ALSO: * floatLib (1), "The C Programming Language - Second Edition"* float fsinh (fltParam)* float fltParam; /* angle in radians **/ .align 4,0x90_fsinh: movl _mathFsinhFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* fsqrt - single-precision floating-point square root** RETURNS: The floating-point square root of fltParam.** SEE ALSO: floatLib(1), pow (2)* float fsqrt (fltParam)* float fltParam; /* argument **/ .align 4,0x90_fsqrt: movl _mathFsqrtFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* ftan - single-precision floating-point tangent** RETURNS: Floating-point tangent of fltParam.** SEE ALSO: floatLib (1), cos (2), sin (2),* "The C Programming Language - Second Edition"* float ftan (fltParam)* float fltParam; /* angle in radians **/ .align 4,0x90_ftan: movl _mathFtanFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* ftanh - single-precision floating-point hyperbolic tangent** RETURNS: Floating-point hyperbolic tangent of fltParam.** SEE ALSO: * floatLib (1), fcosh (), fsinh ()* "The C Programming Language - Second Edition"* float ftanh (fltParam)* float fltParam; /* angle in radians **/ .align 4,0x90_ftanh: movl _mathFtanhFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* ftrunc - single-precision floating-point truncation** Performs FINTRZ.** RETURNS:* The integer portion of a single-precision number,* result is in single-precision.** SEE ALSO: floatLib (1)* float ftrunc (fltParam)* float fltParam; /* argument **/ .align 4,0x90_ftrunc: movl _mathFtruncFunc,%eax jmp *%eax /* jump, let that routine rts *//********************************************************************************* mathErrNoInit - default routine for uninitialized floating-point functions** This routine is called if floating point math operations are attempted* before either a mathSoftInit() or mathHardInit() call is performed. The* address of this routine is the initial value of the various mathXXXFunc* pointers, which are re-initialized with actual function addresses during* either of the floating point initialization calls.** SEE ALSO: mathHardInit(), mathSoftInit()* void mathErrNoInit ()*/ .align 4,0x90_mathErrNoInit: pushl $_mathErrNoInitString call _logMsg addl $4,%esp ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -