00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00024 #pragma implementation
00025 #endif
00026
00027 #ifdef HAVE_CONFIG_H
00028 #include <config.h>
00029 #endif
00030
00031 #include <cfloat>
00032 #include <cmath>
00033
00034 #include "CmplxDET.h"
00035 #include "oct-cmplx.h"
00036
00037 int
00038 ComplexDET::value_will_overflow (void) const
00039 {
00040 return det[1].real () + 1 > log10 (DBL_MAX) ? 1 : 0;
00041 }
00042
00043 int
00044 ComplexDET::value_will_underflow (void) const
00045 {
00046 return det[1].real () - 1 < log10 (DBL_MIN) ? 1 : 0;
00047 }
00048
00049 Complex
00050 ComplexDET::coefficient (void) const
00051 {
00052 return det[0];
00053 }
00054
00055 int
00056 ComplexDET::exponent (void) const
00057 {
00058 return (int) (det[1].real ());
00059 }
00060
00061 Complex
00062 ComplexDET::value (void) const
00063 {
00064 return det[0] * pow (10.0, det[1].real ());
00065 }
00066
00067
00068
00069
00070
00071