This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: port3 under g77


On Monday 18 March 2002 07:07, Jack Howarth wrote:
> Hello,
>    In recompiling the port3 math library from Lucent
> under g77 I noticed one set of tests failed (at least
> under gcc 3.0.1 on sgi). The failing test is p3tests/errk.f
> and the authors say in their readme...
>
> The errk test might fail on some systems that offer IEEE-format
> floating-point arithmetic, but do not properly support denormalized
> numbers.  On such systems, just say "touch p3tests/machtest; make" to
> continue compiling the PORT3 library.
>
> Perhaps the g77 maintainers may want to download the port3
> library and look at the errk.f test to see if we can possibly
> come into complience with it. The port3 fortran library source
> can be downloaded from...
>
> http://www.bell-labs.com/project/PORT/
>
> Thanks in advance for looking into this issue.
>                   Jack
> ps Compared to the values which they have for sgi compilers
> g77 3.0.1 gives a diff as follows
>
> --- errk.out    Wed Sep 17 12:09:19 1997
> +++ errk.li     Wed Sep 17 17:10:54 1997
> @@ -94,9 +94,9 @@
>        22   1.4012985E-44   1.0000000E+00   2.0000000E+00   1.0789998E-43  
> 1.0789998E-43   1.0789998E-43   1.0789998E-43 29   1.0789998E-43  
> 1.0789998E-43   1.0789998E-43   1.0789998E-43   1.0789998E-43  
> 1.0789998E-43 0DOUBLE PRECISION STACK
> -       1    4.243991598728777-314    4.159111755232590-312   
> 2.121995791014679-313    2.121995791459338-314    4.243991582918676-314 -  
>     6    2.121995791953404-314    6.365987374872080-314   
> 1.060997895779076-313    1.485397054070943-313    1.909796212362811-313 -  
>    11    4.243991586871201-314    7.812501862645149E-03   
> 1.633936759423690-312    1.633936759423690-312    1.633936759423690-312 +  
>     1    7.214785689380739-313    2.121995791062109-311   
> 2.121995795905929-314    2.121995791459338-314    4.243991582918676-314 +  
>     6    4.243991582424610-314    8.487983165343286-314   
> 1.273197474826196-313    1.697596633118064-313    2.121995791409931-313 +  
>    11    2.121995791064085-313    2.000000473111868E+00   
> 1.633936759423690-312    1.633936759423690-312    1.633936759423690-312 16 
>   1.633936759423690-312    1.633936759423690-312
>  0COMPLEX STACK
>         1   2.8025969E-45   4.7644148E-44   2.7465450E-43   1.4012985E-42  
> 1.4012985E-44   1.4012985E-45 @@ -137,9 +137,9 @@
>       995    .0000000E+00    .0000000E+00    .0000000E+00    .0000000E+00  
>  .0000000E+00    .0000000E+00 0DOUBLE PRECISION STACK
>         1    2.100775833544745-312    2.100775833544745-312   
> 2.100775833544745-312    2.100775833544745-312    2.100775833544745-312 -  
>     6    2.121995791953404-314    6.365987374872080-314   
> 1.060997895779076-313    1.485397054070943-313    1.909796212362811-313 -  
>    11    4.243991586871201-314    7.812501862645149E-03   
> 1.633936759423690-312    1.633936759423690-312    1.633936759423690-312 -  
>    16    1.633936759423690-312    1.633936759423690-312   
> 1.633936759043260-312     .000000000000000E+00     .000000000000000E+00 +  
>     6    4.243991582424610-314    8.487983165343286-314   
> 1.273197474826196-313    1.697596633118064-313    2.121995791409931-313 +  
>    11    2.121995791064085-313    2.000000473111868E+00   
> 1.633936759423690-312    1.633936759423690-312    1.633936759423690-312 +  
>    16    1.633936759423690-312    1.633936759423690-312   
> 3.804305472977598-322     .000000000000000E+00     .000000000000000E+00 21 
>    .000000000000000E+00     .000000000000000E+00     .000000000000000E+00  
>   .000000000000000E+00     .000000000000000E+00 **                       **
>       496     .000000000000000E+00     .000000000000000E+00    
> .000000000000000E+00     .000000000000000E+00     .000000000000000E+00
>
> where errk.out is the sgi compiler output and errk.li is that from g77 on
> sgi.
If you're asking for g77, with unspecified options, to be made to give 
identical answers to some unspecified SGI compiler, with unknown options, on 
some particular SGI machine, that's a tall order.  The g77 -ffast-math 
options are not as loose with accuracy and re-ordering of operations as 
typical SGI optimizations, and you would first have to verify the results on 
your machine with an SGI compiler with careful choice of options.  You have 
demonstrated that you are getting support for sub-normal values and that the 
2 sets of results are consistent to about 7 significant decimals, since the 
accuracy of sub-normals has to be considered with respect to the minimum 
normalized value.
-- 
Tim Prince


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]