dlamch_8c.html
来自「SuperLU is a general purpose library for」· HTML 代码 · 共 681 行 · 第 1/2 页
HTML
681 行
<p><pre> Purpose =======</pre><p><pre> DLAMC2 determines the machine parameters specified in its argument list.</pre><p><pre> Arguments =========</pre><p><pre> BETA (output) INT The base of the machine.</pre><p><pre> T (output) INT The number of ( BETA ) digits in the mantissa.</pre><p><pre> RND (output) INT Specifies whether proper rounding ( RND = .TRUE. ) or chopping ( RND = .FALSE. ) occurs in addition. This may not</pre><p><pre> be a reliable guide to the way in which the machine performs</pre><p><pre> its arithmetic.</pre><p><pre> EPS (output) DOUBLE PRECISION The smallest positive number such that</pre><p><pre> fl( 1.0 - EPS ) .LT. 1.0,</pre><p><pre> where fl denotes the computed value.</pre><p><pre> EMIN (output) INT The minimum exponent before (gradual) underflow occurs.</pre><p><pre> RMIN (output) DOUBLE PRECISION The smallest normalized number for the machine, given by BASE**( EMIN - 1 ), where BASE is the floating point value</pre><p><pre> of BETA.</pre><p><pre> EMAX (output) INT The maximum exponent before overflow occurs.</pre><p><pre> RMAX (output) DOUBLE PRECISION The largest positive number for the machine, given by BASE**EMAX * ( 1 - EPS ), where BASE is the floating point</pre><p><pre> value of BETA.</pre><p><pre> Further Details ===============</pre><p><pre> The computation of EPS is based on a routine PARANOIA by W. Kahan of the University of California at Berkeley.</pre><p><pre> ===================================================================== </pre> </td> </tr></table><a class="anchor" name="35cd4981c9a7d3c46226a75f68720dad"></a><!-- doxytag: member="dlamch.c::dlamc3_" ref="35cd4981c9a7d3c46226a75f68720dad" args="(double *a, double *b)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">double dlamc3_ </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">double * </td> <td class="mdname" nowrap> <em>a</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>double * </td> <td class="mdname" nowrap> <em>b</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><pre> Purpose =======</pre><p><pre> DLAMC3 is intended to force A and B to be stored prior to doing</pre><p><pre> the addition of A and B , for use in situations where optimizers</pre><p><pre> might hold one of these in a register.</pre><p><pre> Arguments =========</pre><p><pre> A, B (input) DOUBLE PRECISION The values A and B.</pre><p><pre> ===================================================================== </pre> </td> </tr></table><a class="anchor" name="141c735fa5fb73f28150470ee91da0f9"></a><!-- doxytag: member="dlamch.c::dlamc4_" ref="141c735fa5fb73f28150470ee91da0f9" args="(int *emin, double *start, int *base)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int dlamc4_ </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int * </td> <td class="mdname" nowrap> <em>emin</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>double * </td> <td class="mdname" nowrap> <em>start</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int * </td> <td class="mdname" nowrap> <em>base</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><pre> Purpose =======</pre><p><pre> DLAMC4 is a service routine for DLAMC2.</pre><p><pre> Arguments =========</pre><p><pre> EMIN (output) EMIN The minimum exponent before (gradual) underflow, computed by</pre><p><pre> setting A = START and dividing by BASE until the previous A can not be recovered.</pre><p><pre> START (input) DOUBLE PRECISION The starting point for determining EMIN.</pre><p><pre> BASE (input) INT The base of the machine.</pre><p><pre> ===================================================================== </pre> </td> </tr></table><a class="anchor" name="0309c617fb0124d2d3ca73dfbdda9fa9"></a><!-- doxytag: member="dlamch.c::dlamc5_" ref="0309c617fb0124d2d3ca73dfbdda9fa9" args="(int *beta, int *p, int *emin, int *ieee, int *emax, double *rmax)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int dlamc5_ </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int * </td> <td class="mdname" nowrap> <em>beta</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int * </td> <td class="mdname" nowrap> <em>p</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int * </td> <td class="mdname" nowrap> <em>emin</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int * </td> <td class="mdname" nowrap> <em>ieee</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int * </td> <td class="mdname" nowrap> <em>emax</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>double * </td> <td class="mdname" nowrap> <em>rmax</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><pre> Purpose =======</pre><p><pre> DLAMC5 attempts to compute RMAX, the largest machine floating-point number, without overflow. It assumes that EMAX + <a class="el" href="slamch_8c.html#3aa069ac3980707dae1e0530f50d59e4">abs(EMIN)</a> sum approximately to a power of 2. It will fail on machines where this assumption does not hold, for example, the Cyber 205 (EMIN = -28625,</pre><p><pre> EMAX = 28718). It will also fail if the value supplied for EMIN is too large (i.e. too close to zero), probably with overflow.</pre><p><pre> Arguments =========</pre><p><pre> BETA (input) INT The base of floating-point arithmetic.</pre><p><pre> P (input) INT The number of base BETA digits in the mantissa of a floating-point value.</pre><p><pre> EMIN (input) INT The minimum exponent before (gradual) underflow.</pre><p><pre> IEEE (input) INT A int flag specifying whether or not the arithmetic system is thought to comply with the IEEE standard.</pre><p><pre> EMAX (output) INT The largest exponent before overflow</pre><p><pre> RMAX (output) DOUBLE PRECISION The largest machine floating-point number.</pre><p><pre> =====================================================================</pre><p><pre> First compute LEXP and UEXP, two powers of 2 that bound <a class="el" href="slamch_8c.html#3aa069ac3980707dae1e0530f50d59e4">abs(EMIN)</a>. We then assume that EMAX + <a class="el" href="slamch_8c.html#3aa069ac3980707dae1e0530f50d59e4">abs(EMIN)</a> will sum approximately to the bound that is closest to <a class="el" href="slamch_8c.html#3aa069ac3980707dae1e0530f50d59e4">abs(EMIN)</a>. (EMAX is the exponent of the required number RMAX).</pre> </td> </tr></table><a class="anchor" name="8f8bef103c45d87276d6508164f5883c"></a><!-- doxytag: member="dlamch.c::dlamch_" ref="8f8bef103c45d87276d6508164f5883c" args="(char *cmach)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">double dlamch_ </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname1" valign="top" nowrap> <em>cmach</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><pre> Purpose =======</pre><p><pre> DLAMCH determines double precision machine parameters.</pre><p><pre> Arguments =========</pre><p><pre> CMACH (input) CHARACTER*1 Specifies the value to be returned by DLAMCH: = 'E' or 'e', DLAMCH := eps = 'S' or 's , DLAMCH := sfmin = 'B' or 'b', DLAMCH := base = 'P' or 'p', DLAMCH := eps*base = 'N' or 'n', DLAMCH := t = 'R' or 'r', DLAMCH := rnd = 'M' or 'm', DLAMCH := emin = 'U' or 'u', DLAMCH := rmin = 'L' or 'l', DLAMCH := emax = 'O' or 'o', DLAMCH := rmax</pre><p><pre> where</pre><p><pre> eps = relative machine precision sfmin = safe minimum, such that 1/sfmin does not overflow base = base of the machine prec = eps*base t = number of (base) digits in the mantissa rnd = 1.0 when rounding occurs in addition, 0.0 otherwise emin = minimum exponent before (gradual) underflow rmin = underflow threshold - base**(emin-1) emax = largest exponent before overflow rmax = overflow threshold - (base**emax)*(1-eps)</pre><p><pre> ===================================================================== </pre> </td> </tr></table><a class="anchor" name="9537f19743fcaaac6231895afa9f9e4d"></a><!-- doxytag: member="dlamch.c::pow_di" ref="9537f19743fcaaac6231895afa9f9e4d" args="(double *ap, int *bp)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">double pow_di </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">double * </td> <td class="mdname" nowrap> <em>ap</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int * </td> <td class="mdname" nowrap> <em>bp</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p> </td> </tr></table><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 1 22:40:40 2008 for SuperLU by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?