finite word length effects - related questions get little different results than expected - why?
    3 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Seetha Rama Raju Sanapala
 am 22 Dez. 2017
  
    
    
    
    
    Kommentiert: Seetha Rama Raju Sanapala
 am 27 Dez. 2017
            We know that all computers suffer from finite word length effects. We can expect some errors - but why some related questions get different results for example - the following cut and paste from command window.
>> tand(90)
ans =
   Inf
>> tan(pi/2)
ans =
   1.6331e+16
>> cot(0)
ans =
   Inf
>> sin(pi)
ans =
   1.2246e-16
>> cos(pi/2)
ans =
   6.1232e-17
10 Kommentare
  Walter Roberson
      
      
 am 27 Dez. 2017
				The radian-based trig functions are passed over to hardware instructions for performance reasons.
IEEE 754 defined accuracy requirements in terms of actual input bit patterns, and returning 0 in those cases would be inconsistent with the IEEE 754 accuracy requirements.
Antworten (0)
Siehe auch
Kategorien
				Mehr zu Performance and Memory finden Sie in Help Center und File Exchange
			
	Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




