Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Matlab R2014a version gives, -3.1175^0.5 = -1.7656 but (-3.1175)^0.5 = 0.0000 + 1.7656i Why?
    8 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Matlab R2014a version gives, -3.1175^0.5 = -1.7656 but (-3.1175)^0.5 = 0.0000 + 1.7656i
Why?
0 comentarios
Respuestas (2)
  Orion
      
 el 29 de Mzo. de 2016
        Because of the parenthesis.
The power operation is executed before the minus operation, so
-3.1175^0.5
is strictly equivalent to :
-(3.1175^0.5)
which is not the same as
(-3.1175)^0.5
0 comentarios
  Steven Lord
    
      
 el 29 de Mzo. de 2016
        The power operator ^ has higher precedence than the unary minus operator - but parentheses () have higher precedence than either ^ or -.
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!