メインページ   クラス階層   構成   ファイル一覧   構成メンバ   ファイルメンバ  

lo-ieee.h

解説を見る。
00001 /*
00002 
00003 Copyright (C) 1996, 1997 John W. Eaton
00004 
00005 This file is part of Octave.
00006 
00007 Octave is free software; you can redistribute it and/or modify it
00008 under the terms of the GNU General Public License as published by the
00009 Free Software Foundation; either version 2, or (at your option) any
00010 later version.
00011 
00012 Octave is distributed in the hope that it will be useful, but WITHOUT
00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Octave; see the file COPYING.  If not, write to the Free
00019 Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00020 
00021 */
00022 
00023 #if !defined (octave_liboctave_ieee_h)
00024 #define octave_liboctave_ieee_h 1
00025 
00026 #ifdef  __cplusplus
00027 extern "C" {
00028 #endif
00029 
00030 /*  Octave's idea of infinity.  */
00031 extern double octave_Inf;
00032 
00033 /* Octave's idea of a missing value.  */
00034 extern double octave_NA;
00035 
00036 /* Octave's idea of not a number.  */
00037 extern double octave_NaN;
00038 
00039 extern int lo_ieee_hw;
00040 extern int lo_ieee_lw;
00041 
00042 typedef union
00043 {
00044   double value;
00045   unsigned int word[2];
00046 } lo_ieee_double;
00047 
00048 #define LO_IEEE_NA_HW 0x7ff00000
00049 #define LO_IEEE_NA_LW 1954
00050 
00051 extern void octave_ieee_init (void);
00052 
00053 #if defined (SCO)
00054 extern int isnan (double);
00055 extern int isinf (double);
00056 #endif
00057 
00058 extern int lo_ieee_isnan (double x);
00059 extern int lo_ieee_finite (double x);
00060 extern int lo_ieee_isinf (double x);
00061 
00062 extern int lo_ieee_is_NA (double);
00063 extern int lo_ieee_is_NaN_or_NA (double);
00064 
00065 extern double lo_ieee_inf_value (void);
00066 extern double lo_ieee_na_value (void);
00067 extern double lo_ieee_nan_value (void);
00068 
00069 /* In the following definitions, only check x < 0 explicitly to avoid
00070    a function call when it looks like signbit or copysign are actually
00071    functions.  */
00072 
00073 #if defined (signbit)
00074 #define lo_ieee_signbit(x) signbit (x)
00075 #elif defined (HAVE_SIGNBIT)
00076 #if defined (__MINGW32__)
00077 extern int signbit (double);
00078 #endif
00079 #define lo_ieee_signbit(x) (x < 0 || signbit (x))
00080 #elif defined (copysign)
00081 #define lo_ieee_signbit(x) (copysign (1.0, x) < 0)
00082 #elif defined (HAVE_COPYSIGN)
00083 #define lo_ieee_signbit(x) (x < 0 || copysign (1.0, x) < 0)
00084 #else
00085 #define lo_ieee_signbit(x) 0
00086 #endif
00087 
00088 #ifdef  __cplusplus
00089 }
00090 #endif
00091 
00092 #endif
00093 
00094 /*
00095 ;;; Local Variables: ***
00096 ;;; mode: C++ ***
00097 ;;; End: ***
00098 */

Wed Dec 29 11:51:39 2004に生成されました。 doxygen1.2.18
SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送