New libm-test-ulps file

Subhash Verma subhash.verma@wipro.com
Tue Oct 23 03:13:00 GMT 2001


Hi All! I'm working on writing 
test-suite for glibc being ported to a new processor.I need some guidance 
regarding the matter. Sice most of the test-files are processor/platform 
independent they don't require any addition expect "math" part which as per my 
understanding,requires a processor specific file containing all ULPs ( Units of 
Last Precision) called 
"libm-test-ulps", which lives in /sysdep/_machine_/fpu (_machine_ e.g. i386, 
ia64 etc). But to generate this file for new port (New libm-test-ulps 
file) it is required to have executable of the test-driver 
(test-double, test-float ..etc). By running this executable test-driver for each 
type of format(test-double* for double, test-float for float etc..) 
corresponding ULPs are generated and concatenated into a single file.I have 
tried with empty "libm-test-ulps" file for 
native build of i386 (just to have an 
idea) I am facing some problem to build test driver because they requires 
some files which are generated by another file "gen-libm-test.pl", and this file 
requires the files libm-test.inc, and libm-test-ulps.So it is like a 
loop,.
It is like this
                                                                  (generates) 

libm-test.inc  
--->                                           
----->libm-test.c     -----> -- | required 
by                        
|-------------->gen-libm-test.pl----|                                    
   |______ libm-test-ulps 
--->                                         
----->libm-test-ulps.h --> __ 
|         | 
|                                                                                                                   
|          
|                                                                                                                   |                                                                                                                                                           
|          (run with options "-u 
--ignore-max-ulp=yes")           
test-driver like test-double.c 
|                      
<-------                
test-driver* (executable)<---------------------------------------- |              
ULPs are generated for double.similarly for other test-drivers ULPs are 
generated and   
|              
concatenated into a file which is further processed by "gen-libm-test.pl" to 
generate         
-------------- new "libm-test-ulps" 
file.
 
 So, for a new port, how this 
loop can be broken. I wanted to 
know. 1) how this file "libm-test-ulps" can be generated for a new 
port. 2) Any other file which is processor/platform dependent and so 
requires    some modification or addition to the test-suite for new 
port. 3) Any suggested test-case that can be added.
4) Please anybody could help me 
to understand, what exactly these ULPs are?
e.g. to test acos:
......................................................................... Test 
"cos (0.7) == 0.76484218728448842625585999019186495": double: 1 idouble: 
1 ildouble: 529 ldouble: 529
..................................
I mean , what these numbers 1,1, 
529,529 for double,idouble,ildouble, ldouble are signifying?
or
....................................................... 
Test "cos (pi/2) == 0": double: 
0.2758 float: 0.3667 idouble: 0.2758 ifloat: 0.3667 ildouble: 
0.25 ldouble: 
0.25 ..........................................................
 
Thanks in advance.
subhash
-------------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:mailadmin@wipro.com and delete this mail
from your records.
----------------------------------------------------------------------------------------------------------------------


More information about the Libc-alpha mailing list