Summary of Re: What is SIN(10**22)...

K.C.Ng uunet!Eng.Sun.COM!Kwok.Ng
Mon Dec 23 13:21:29 PST 1991


Thank you for all your replies. Here is the summary. First some
notes and clarifications.

	1. Some people couldn't get the sun4 result I posted, unless
	   they are using our newest SC2.0 math library. In the old 
	   SC1.0 math library, one needs to set the sun-specific 
	   global variable fp_pi to zero in order to get the infinite 
	   precise pi for argument reduction. Note that fp_pi is no 
	   longer support in SC2.0 or future release. 

	2. Many of you pointed out correctly that my posted answer for 
	   SIN(10**98) was not correct. This is my fault. The correct 
	   answers should be
	  	   sin(10**98)= -.5652315...
		   cos(10**98)= -.8249298...

	3. 10**22 = 1.0F0CF064DD592 * 2**73 is chosen because it is 
	   representable in both decimal floating point format and 
	   double precision binary floating format (52 non-zero
	   significant bits).

	4. A typo in sun3's answer on COS(10**22).

	5. About this argument reduction article: I intend to 
	   publish it with a public domain argument reduction
	   C program for IEEE double precision.

	6. Could anyone try SIN(x = 10**22 or 2*200) on a Cray?

--- K.C. Ng

Table of SIN(x) and COS(x) for  x = 10*22, 10*98, 2*200 in radian

	x = 10**22	    sin x		cos x
	----------------------------------------------
	correct answer	-0.8522008497..	 0.5232147853..  
	sun4 (fp_pi=0)  -0.8522008497..	 0.5232147853..  
	hp 20-s		-0.852200850	 0.523214785
	HP 28S           0.852200849762  0.523214785403
	HP 48SX          0.852200849762  0.523214785403
	IBM RS/6000 AIX 3005
			-0.852200850     0.523214785
	hp 15c		 0.7931056786	-0.6090840522
	sun3  		-0.6536528816..	 0.7567944967..  
	HP 375 (4.3BSD) -0.653652882     0.756794497
	HP 425t (4.3BSD)-0.653652882	 0.756794497
	Sharp EL5806	-0.090748172	 0.42009155 
	Stardent 1520	 0.874028061	 0.485875445
	NeXT		-0.653652882	 0.756794497
	Stardent 3040	 0.0		 1.0
	HP 700 		 0.0		 0.0	     (TLOSS error)
	IBM 3090/600S-VF AIX 370
			 0.0		 0.0	     (TLOSS error)
	TRS-80 M100 	 0.0		 0.0
	SGI something    NaN		 NaN
	DECstation 3100  NaN		 NaN
	casio fx-8100	 Error	     	 Error (*)	
	SHARP EL-531A    ERROR           ERROR
	TI 95            INVALID ARG     INVALID ARG
	TI 68            ERROR           ERROR
	casio fx-115D	 Error	      	 Error
	Texas TI-34	 Error	     	 Error 
	----------------------------------------------
	(*) On a casio fx-8100, any arugment larger than
	    2.6 in magnitude will result in error.
    


	x = 10**98	    sin x		cos x
	----------------------------------------------
	correct answer	-0.5652351528.. -0.8249298284...
	hp 15c		-0.07497332812	-0.9971855394
	hp 20-s		-0.137662378	-0.990479212
	HP 28S          -0.137662378375 -0.990479212089
	HP 48SX         -0.137662378375 -0.990479212089
	Sharp EL5806	-0.090748172	 0.42009155 
	casio fx-8100	 Error	         Error	
	SHARP EL-531A    ERROR           ERROR
	TI 95            INVALID ARG     INVALID ARG
	TI 68            ERROR           ERROR
	----------------------------------------------

	 
	x = 2**200	    sin x		cos x
	----------------------------------------------
	correct answer	-0.4788977997..	-0.8778706609..  
	sun4 (fp_pi=0)  -0.4788977997..	-0.8778706609.. 
	sun3  		-0.6936283589..	-0.7203330477..  
	Stardent 1520	-0.688654518..  -0.725089618..
	HP 375 		-0.693628359..	-0.720333048..  
	HP 425 		-0.693628359..	-0.720333048..  
	NeXT   		-0.693628359..	-0.720333048..  
	IBM 3090/600S-VF AIX 370
			 0.0		 0.0
	Stardent 3040	 0.0		 0.0
	HP 700 		 0.0		 0.0	     (TLOSS error)
	DECstation 3100  NaN		 NaN
	SGI something    NaN		 NaN
	----------------------------------------------





More information about the Numeric-interest mailing list