Skip to main content
1-Visitor
September 3, 2014
Question

Possible bug? - Vector square root vs raise to power of 0.5

  • September 3, 2014
  • 9 replies
  • 3838 views

For some reason, the square root symbol works but raising to a power of 0.5 doesn't:

Capture.PNG

Version: 15.0

Mathcad doc attached.

9 replies

1-Visitor
September 3, 2014

Remove the units from a and b.

1-Visitor
September 3, 2014

Might be worth reading this:

Clipboard01.jpg

Werner_E
25-Diamond I
September 3, 2014

Good information, but I am not sure if it relates to the problem here.

After all without vectorization all is working as expected.

1.png

19-Tanzanite
September 3, 2014

Mathcad doesn't treat row vectors as true vectors, so best to use column vectors:

rootAB.PNG

Alan

Dan8881-VisitorAuthor
1-Visitor
September 3, 2014

Thanks, my actual vectors are quite long and look better in the worksheet as row vectors.

The square root works so I'll continue but it does seem that there is a bug in there.

Update, just played a bit more and it appears to be the decimal causing the problem. 0.5 fails but 1/2 works.

19-Tanzanite
September 3, 2014

You could just write them as row vectors, but put a transpose at the end:

e.g. a = (1 2 3)ctrl_1

transpose.PNG

Alan

Werner_E
25-Diamond I
September 3, 2014

Dan Rose wrote:

For some reason, the square root symbol works but raising to a power of 0.5 doesn't:

Thats a bit strange and I tend to call it a bug - at least I agree that it should work as you expected when we use column vectors.

The problem seems to be the combination of units and vectorization and the error is thrown with column and rowvectors alike.

Interestingly it works if you replace 0.5 by 1/2 and it also works with symbolic evaluation.

2.png

As Alan already noted it also works when we place the vecorization operator inside and use column vecctors.

3.png