cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Mathcad 15 - Difficulty converting answer to decimal

ccoldham
1-Visitor

Mathcad 15 - Difficulty converting answer to decimal

Hi - I have a solution to my problem which is :

However I want my answer in decimal form - I have tried highlighting the result and then Format, Result, Decimal but it didn't make any difference

Anybody got any suggestions please on this one ?

thanks,

7 REPLIES 7
RichardJ
19-Tanzanite
(To:ccoldham)

The symbolic processor will give answers with only integers if the expression contains only integers. Change one or more of your numbers to decimal format (4.0, 13.0, 12.0).

Thank you so much Richard

lturek
12-Amethyst
(To:ccoldham)

Apart from using the symbolic keyword or forcing float mode by using a decimal point, you may assign the result a variable and evaluate that variable numerically or you also may follow the symbolic evaluation by a numeric one (inline eval)

FLoat.png

Also, in this case, you can use the built-in symbolic function "float":

Pic_1.png

RichardJ
19-Tanzanite
(To:VladimirN)

Also, in this case, you can use the built-in symbolic function "float":

No! That is not correct. The float keyword does not just change the precision of the results. It changes the precision of the calculations, so "float 3" means you are doing extremely low precision floating point math.

Richard,

In the screenshot I showed the possibility of using the symbolic operator "float", and only the user will determine the accuracy of the calculation which it requires (n = 3 - shows as a simple example).

Pic_2.png

RichardJ
19-Tanzanite
(To:VladimirN)

The float keyword should not be used to format the result, because that's not what it's for. It changes the precision of the calculations, and by that I mean the internal precision used during the calculations, not just the precision of the displayed result. When you used float,3 the real part of the answer was -1.62. When you used float,10 it was -1.625. So with only two decimal places the result should be 1.63. The difference is because the float keyword does much more than just change the precision of the displayed result.

This has come up over and over again, hence the emphasis on "No" in my reply. Do not use the float keyword to format results!

Announcements

Top Tags