⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mathalib.s

📁 vxworks source code, used for develop vxworks system.
💻 S
📖 第 1 页 / 共 3 页
字号:
*     double v    /@ value to return the floor of @/*     )* \se** Performs a round-to-negative-infinity.** INCLUDE FILES: math.h ** RETURNS:* The largest integral value less than or equal to <v>,* in double precision.** SEE ALSO:* Kernighan & Ritchie:* .I "The C Programming Language, 2nd Edition"*/_floor:	movel	_mathFloorFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts */#if (CPU!=MC68040) && (CPU!=MC68LC040) && (CPU!=MC68060)/********************************************************************************* fmod - compute the remainder of x/y (ANSI)** SYNOPSIS* \ss* double fmod*     (*     double x,   /@ numerator   @/*     double y    /@ denominator @/*     )* \se** INCLUDE FILES: math.h ** RETURNS:* The double-precision modulus of <x>/<y> with the sign of <x>.** SEE ALSO:* Kernighan & Ritchie:* .I "The C Programming Language, 2nd Edition"*/_fmod:	movel	_mathFmodFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts */#endif	/* (CPU!=MC68040) && (CPU!=MC68LC040) && (CPU!=MC68060) *//********************************************************************************* hypot - compute a Euclidean distance (hypotenuse)** SYNOPSIS* \ss* double hypot*     (*     double x,		/@ argument @/*     double y		/@ argument @/*     )* \se** This routine returns the length of the Euclidean distance* (hypotenuse) of two double-precision parameters.** The distance is calculated as:* .CS*     sqrtf ((x * x) + (y * y))* .CE** INCLUDE FILES: math.h ** RETURNS: The double-precision hypotenuse of <x> and <y>.** NOMANUAL*/_hypot:	movel	_mathHypotFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* infinity - return a very large double** SYNOPSIS* \ss* double infinity (void)* \se** This routine returns a very large double.** INCLUDE FILES: math.h ** RETURNS: The double-precision representation of positive infinity.*/_infinity:	movel	_mathInfinityFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* irint - convert a double-precision value to an integer** SYNOPSIS* \ss* int irint*     (*     double x	/@ argument @/*     )* \se** This routine converts a double-precision value <x> 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.** INCLUDE FILES: math.h ** RETURNS: The integer representation of <x>.*/_irint:	movel	_mathIrintFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* iround - round a number to the nearest integer** SYNOPSIS* \ss* int iround*     (*     double x    /@ argument @/*     )* \se** This routine rounds a double-precision value <x> to the nearest* integer value.** NOTE:* If <x> is spaced evenly between two integers, it returns the even integer.** INCLUDE FILES: math.h ** RETURNS: The integer nearest to <x>.*/_iround:	movel	_mathIroundFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* log - compute a natural logarithm (ANSI)** SYNOPSIS* \ss* double log*     (*     double x    /@ value to compute the natural logarithm of @/*     )* \se** INCLUDE FILES: math.h ** RETURNS: The double-precision natural logarithm of <x>.** SEE ALSO:* Kernighan & Ritchie:* .I "The C Programming Language, 2nd Edition"*/_log:	movel	_mathLogFunc,a0		/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* log10 - compute a base-10 logarithm (ANSI)** SYNOPSIS* \ss* double log10*     (*     double x    /@ value to compute the base-10 logarithm of @/*     )* \se** INCLUDE FILES: math.h ** RETURNS: The double-precision base-10 logarithm of <x>.** SEE ALSO:* Kernighan & Ritchie:* .I "The C Programming Language, 2nd Edition"*/_log10:	movel	_mathLog10Func,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* log2 - compute a base-2 logarithm** SYNOPSIS* \ss* double log2*     (*     double x	/@ value to compute the base-two logarithm of @/*     )* \se** This routine returns the base-2 logarithm of <x> in double precision.** INCLUDE FILES: math.h ** RETURNS: The double-precision base-2 logarithm of <x>.*/_log2:	movel	_mathLog2Func,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts */#if (CPU!=MC68040) && (CPU!=MC68LC040) && (CPU!=MC68060)/********************************************************************************* pow - compute the value of a number raised to a specified power (ANSI)** SYNOPSIS* \ss* double pow*     (*     double x,   /@ operand  @/*     double y    /@ exponent @/*     )* \se** INCLUDE FILES: math.h ** RETURNS: The double-precision value of <x> to the power of <y>.** SEE ALSO:* Kernighan & Ritchie:* .I "The C Programming Language, 2nd Edition"*/_pow: 					/* pow (x,y) = exp (y * log(x)) */	movel	_mathPowFunc,a0		/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts */#endif	/* (CPU!=MC68040) && (CPU!=MC68LC040) && (CPU!=MC68060) *//********************************************************************************* round - round a number to the nearest integer** SYNOPSIS* \ss* double round*     (*     double x	/@ value to round @/*     )* \se** This routine rounds a double-precision value <x> to the nearest* integral value.** INCLUDE FILES: math.h ** RETURNS: The double-precision representation of <x> rounded to the* nearest integral value.*/_round:	movel	_mathRoundFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* sin - compute a sine (ANSI)** SYNOPSIS* \ss* double sin*     (    *     double x    /@ angle in radians @/*     )* \se** INCLUDE FILES: math.h ** RETURNS: The double-precision floating-point sine of <x>.** SEE ALSO:* Kernighan & Ritchie:* .I "The C Programming Language, 2nd Edition"*/_sin:	movel	_mathSinFunc,a0		/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* sincos - compute both a sine and cosine** SYNOPSIS* \ss* void sincos*     (*     double x,		 /@ angle in radians @/*     double *sinResult, /@ sine result buffer @/*     double *cosResult	 /@ cosine result buffer @/*     )* \se** This routine computes both the sine and cosine of <x> in double precision.* The sine is copied to <sinResult> and the cosine is copied to <cosResult>.** INCLUDE FILES: math.h ** RETURNS: N/A*/_sincos:	movel	_mathSincosFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* sinh - compute a hyperbolic sine (ANSI)** SYNOPSIS* \ss* double sinh*     (*     double x    /@ angle in radians @/*     )* \se** INCLUDE FILES: math.h ** RETURNS: The double-precision hyperbolic sine of <x>.** SEE ALSO:* Kernighan & Ritchie:* .I "The C Programming Language, 2nd Edition"*/_sinh:	movel	_mathSinhFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* sqrt - compute a non-negative square root (ANSI)** INCLUDE FILES: math.h ** SYNOPSIS* \ss* double sqrt*     (*     double x    /@ value to compute the square root of @/*     )* \se** RETURNS: The double-precision square root of <x>.** SEE ALSO:* Kernighan & Ritchie:* .I "The C Programming Language, 2nd Edition"*/_sqrt:	movel	_mathSqrtFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* tan - compute a tangent (ANSI)** SYNOPSIS* \ss* double tan*     (*     double x    /@ angle in radians @/*     )* \se** INCLUDE FILES: math.h ** RETURNS: The double-precision tangent of <x>.** SEE ALSO:* Kernighan & Ritchie:* .I "The C Programming Language, 2nd Edition"*/_tan:	movel	_mathTanFunc,a0		/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* tanh - compute a hyperbolic tangent (ANSI)** SYNOPSIS* \ss* double tanh*     (*     double x    /@ angle in radians @/*     )* \se** INCLUDE FILES: math.h ** RETURNS: The double-precision hyperbolic tangent of <x>.** SEE ALSO:* Kernighan & Ritchie:* .I "The C Programming Language, 2nd Edition"*/_tanh:	movel	_mathTanhFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* trunc - truncate to integer** SYNOPSIS* \ss* double trunc*     (*     double x	/@ value to truncate @/*     )* \se** This routine discards the fractional part of a double-precision value <x>.** INCLUDE FILES: math.h ** RETURNS:* The integer portion of <x>, represented in double-precision.*/_trunc:	movel	_mathTruncFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* acosf - compute an arc cosine (ANSI)** SYNOPSIS* \ss* float acosf*     (*     float x	/@ number between -1 and 1 @/*     )* \se** This routine computes the arc cosine of <x> in single precision.* If <x> is the cosine of an angle <T>, this function returns <T>.** INCLUDE FILES: math.h ** RETURNS: The single-precision arc cosine of <x> in the range 0* to pi radians.*/_acosf:	movel	_mathAcosfFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* asinf - compute an arc sine (ANSI)** SYNOPSIS* \ss* float asinf*     (*     float x	/@ number between -1 and 1 @/*     )* \se** This routine computes the arc sine of <x> in single precision.* If <x> is the sine of an angle <T>, this function returns <T>.** INCLUDE FILES: math.h ** RETURNS: The single-precision arc sine of <x> in the range* -pi/2 to pi/2 radians.*/_asinf:	movel	_mathAsinfFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* atanf - compute an arc tangent (ANSI)** SYNOPSIS* \ss* float atanf*     (*     float x	/@ tangent of an angle @/*     )* \se** This routine computes the arc tangent of <x> in single precision.* If <x> is the tangent of an angle <T>, this function returns <T> * (in radians).** INCLUDE FILES: math.h ** RETURNS: The single-precision arc tangent of <x> in the range -pi/2 to pi/2.*/_atanf:	movel	_mathAtanfFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* atan2f - compute the arc tangent of y/x (ANSI)** SYNOPSIS* \ss* float atan2f*     (*     float y,		/@ numerator @/*     float x		/@ denominator @/*     )* \se** This routine returns the principal value of the arc tangent of <y>/<x>* in single precision.** INCLUDE FILES: math.h ** RETURNS:* The single-precision arc tangent of <y>/<x> in the range -pi to pi.*/_atan2f:	movel	_mathAtan2fFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* cbrtf - compute a cube root** SYNOPSIS* \ss* float cbrtf*     (*     float x  /@ argument @/*     )* \se** This routine returns the cube root of <x> in single precision.** INCLUDE FILES: math.h ** RETURNS: The single-precision cube root of <x>.*/_cbrtf:	movel	_mathCbrtfFunc,a0	/* get appropriate function addr */	jmp	a0@			/* jump, let that routine rts *//********************************************************************************* ceilf - compute the smallest integer greater than or equal to a specified value (ANSI)** SYNOPSIS* \ss* float ceilf*     (*     float v	/@ value to find the ceiling of @/*     )* \se** This routine returns the smallest integer greater than or equal to <v>,* in single precision.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -