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

📄 gccmathlib.c

📁 VxWorks BSP框架源代码包含头文件和驱动
💻 C
字号:
/* gccMathLib.c - math support routines for gcc *//* Copyright 1984-1996 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01a,07dec96,tpr	 created.*//*DESCRIPTIONThis library contains various support routines for using gcc.  Thecompiler will generate subroutine calls to the functions in this filewhen the software floating point option is used.  The function names are those which are automatically generated by the gcc compiler.NOMANUAL*/#include "vxWorks.h"/* externals */extern int	_d_feq  (double num1, double num2);extern int	_d_fge  (double num1, double num2);extern int	_d_flt  (double num1, double num2);extern int	_d_fle  (double num1, double num2);extern int	_f_feq  (float num1, float num2);extern int	_f_fge  (float num1, float num2);extern int	_f_flt  (float num1, float num2);extern int	_f_fle  (float num1, float num2);/********************************************************************************* __eqdf2 - equality test for two doubles** RETURNS: zero if two numbers are equal, non-zero otherwise.** NOMANUAL*/int __eqdf2    (    double	num1,    double	num2    )    {    return (!(_d_feq (num1, num2)));		/* cmpdf2 returns 1 if equal */    }/********************************************************************************* __eqsf2 - equality test for two floats** RETURNS: zero if two numbers are equal, non-zero otherwise.** NOMANUAL*/int __eqsf2    (    float	num1,    float	num2    )    {    return (!(_f_feq (num1, num2)));		/* cmpsf2 returns 0 if equal */    }/********************************************************************************* __gedf2 - greater-than-or-equal test for two doubles** RETURNS: positive value or zero if first number is greater than second, *	   negative otherwise.** NOMANUAL*/int __gedf2    (    double	num1,    double	num2    )    {    return ((_d_fge (num1, num2)) - 1);    }/********************************************************************************* __gesf2 - greater-than-or-equal test for two floats** RETURNS: positive value or zero if first number is greater than second,*	   negative otherwise.** NOMANUAL*/int __gesf2    (    float	num1,    float	num2    )    {    return ((_f_fge (num1, num2)) - 1);    }/********************************************************************************* __ltdf2 - less-than test for two doubles** RETURNS: negative value if first number is less than second, zero or*	   positive otherwise.** NOMANUAL*/int __ltdf2    (    double	num1,    double	num2    )    {    return (-(_d_flt (num1, num2)));    }/********************************************************************************* __ltsf2 - less-than test for two floats** RETURNS: negative value if first number is less than second, zero or*	   positive otherwise.** NOMANUAL*/int __ltsf2    (    float	num1,    float	num2    )    {    return (-(_f_flt (num1, num2)));    }/********************************************************************************* __ledf2 - less-than-or-equal test for two doubles** RETURNS: negative value or zero if first number is less than second,*	   positive otherwise.** NOMANUAL*/int __ledf2    (    double	num1,    double	num2    )    {    return (1 - (_d_fle (num1, num2)));    }/********************************************************************************* __lesf2 - less-than-or-equal test for two floats** RETURNS: negative value or zero if first number is less than second,*	   positive otherwise.** NOMANUAL*/int __lesf2    (    float	num1,    float	num2    )    {    return (1 - (_d_fle (num1, num2)));    }

⌨️ 快捷键说明

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