Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline kBen  
#1 Posted : 14 January 2016 12:44:58(UTC)
kBen

Rank: Newbie

Groups: Registered
Joined: 14/01/2016(UTC)
Posts: 2
United States

Hi all,
I define the variables a, b, and c and then use them in a calculation defining the variable x as follows:
a:=2
b:=3
c:=4
x:=a+b/c=2.75

And then I use the variable x in another calculation:
y:=a+b+x

If I use optimization "None" to show the values used in the calculation of y, SMath automatically converts x from decimal form to fraction.
I need it to show the decimal form of x as follows:
y=2+3+2.75

Instead of:
y=2+3+11/4

Does anyone know of a way to do this? Thanks for your help in advance.

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 14 January 2016 20:25:05(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Just like this: press = after your equation.
There is nothing to "Optimze" the arithmetic
is between registers. You can have fraction
but fractions that don't terminate will need
be expressed in symbolic optimiz...

There is lot lot lot on that: keep posting.

Jean

Forum Help.sm (4kb) downloaded 20 time(s).
Offline Jean Giraud  
#3 Posted : 14 January 2016 21:56:37(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... the image

ForumResult.bmp
Offline kBen  
#4 Posted : 15 January 2016 06:06:22(UTC)
kBen

Rank: Newbie

Groups: Registered
Joined: 14/01/2016(UTC)
Posts: 2
United States

Everyone,
Thank you for your replies. I may not have explained what I am looking for clearly. I am creating engineering calculations, and I need to show the values used in each step of the calculation so the work can be checked. In my example, I need to use optimization "None" to show the values used to calculate y, not just the result for y. My problem is that SMath is automatically converting the value for x to a fraction when it is used in the calculation for y. It is difficult to check the calculation if the result for x is shown in decimal form, and then is shown as a fraction when it is used in a subsequent step in the calculation. See below:

a:=2
b:=3
c:=4

x:=a+b/c
x=2.75 <--Here x is shown in decimal form

y:=a+b+x
y=2+3+11/4 <--I need to use optimization "None" to show the values used to calculate y, but x is automatically converted to 11/4 instead of being shown as 2.75
y=7.75

I need the calculation of y to show the decimal form of x so that someone else can check the calculation without having to convert 11/4 to 2.75 in their head.
The desired result is:

y:=a+b+x
y=2+3+2.75 <-- the value of x would be shown as 2.75 not 11/4
y=7.75

I hope this explains what I am looking for better. Thanks again for the replies.

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.