1 Pages (14 items)
Changing fractions to decimal numbers in a explicit eqation - Messages
#1 Posted: 3/3/2020 6:20:24 PM
Hello, I'm trying to make a project in Smath, one of the requirements is that there must be shown what numbers am I substituting in my equtions.
I know you can change the optimalization to none to show the numbers, however this shows them as fractions and the fraction settings doesn't seem to do anything with it,
the result can be seen in image lower. What I want is to show the 49033/5000 as 9,81, which is how I defined it to begin with.

I would really apreciate if someone could tell me how to show those numbers in decimal form or how to do the whole thing in other way that would result in what I want.
Thank you very much in advance.
I know you can change the optimalization to none to show the numbers, however this shows them as fractions and the fraction settings doesn't seem to do anything with it,
the result can be seen in image lower. What I want is to show the 49033/5000 as 9,81, which is how I defined it to begin with.
I would really apreciate if someone could tell me how to show those numbers in decimal form or how to do the whole thing in other way that would result in what I want.
Thank you very much in advance.
#2 Posted: 3/3/2020 7:09:41 PM
Wrote49033/5000
As you are using units, 49033/500=9.806600000000000
represents the true value of that constant in floating arithmetic.
Few more would help doctor.
#3 Posted: 3/4/2020 8:51:29 AM
I'm sorry, I don't quite understand. Few more what? More decimal places?
#4 Posted: 3/4/2020 9:04:39 AM
WroteI'm sorry, I don't quite understand. Few more what? More decimal places?
Few more from the document to see the project.
#5 Posted: 3/4/2020 12:57:03 PM
Oh sorry. Here is the entire file, the things are on page 2.
zatizeni.sm (449 KiB) downloaded 45 time(s).
zatizeni.sm (449 KiB) downloaded 45 time(s).
#6 Posted: 3/4/2020 2:08:06 PM
I think that changing the optimization to numerical is enough.
zatizeni_R1.sm (447 KiB) downloaded 34 time(s).
Best Regards
Carlos
zatizeni_R1.sm (447 KiB) downloaded 34 time(s).
Best Regards
Carlos
#7 Posted: 3/4/2020 2:36:45 PM
#8 Posted: 3/4/2020 2:50:33 PM
#9 Posted: 3/4/2020 4:49:04 PM
#10 Posted: 3/4/2020 4:56:01 PM
#11 Posted: 3/4/2020 4:57:45 PM
well, apparently the way of carlos is much more elegant.
#12 Posted: 3/4/2020 5:12:57 PM
#13 Posted: 3/4/2020 5:46:00 PM
Thank you very much Carlos, thats exactly what I needed.
Didn't know there even was function eval.
Really thanks.
And thanks to everyone else for helping. Incredible comunity here.
Didn't know there even was function eval.
Really thanks.
And thanks to everyone else for helping. Incredible comunity here.
#14 Posted: 3/4/2020 6:05:40 PM
Wroteneither of your files does the thing for me.
That's what we are wondering: what should it do for you ?
The green explosion ?
By same token, you can make the while loops more visible
... in green below.
zatizeni [pink_green].sm (458 KiB) downloaded 37 time(s).
1 Pages (14 items)
-
New Posts
-
No New Posts