Changing fractions to decimal numbers in a explicit eqation

Changing fractions to decimal numbers in a explicit eqation - Poruke

#1 Objavljeno: 3. 3. 2020. 18:20:24
Pahec97

Pahec97

0 svidjanja u 5 postova.

Grupa: User

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.

p1.png

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 Objavljeno: 3. 3. 2020. 19:09:41
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

49033/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 Objavljeno: 4. 3. 2020. 08:51:29
Pahec97

Pahec97

0 svidjanja u 5 postova.

Grupa: User

I'm sorry, I don't quite understand. Few more what? More decimal places?
#4 Objavljeno: 4. 3. 2020. 09:04:39
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

I'm sorry, I don't quite understand. Few more what? More decimal places?


Few more from the document to see the project.
#5 Objavljeno: 4. 3. 2020. 12:57:03
Pahec97

Pahec97

0 svidjanja u 5 postova.

Grupa: User

Oh sorry. Here is the entire file, the things are on page 2.
zatizeni.sm (449,94 KiB) preuzeto 1235 put(ova).
#6 Objavljeno: 4. 3. 2020. 14:08:06
CBG

CBG

78 svidjanja u 312 postova.

Grupa: User

I think that changing the optimization to numerical is enough.


zatizeni_R1.sm (447,45 KiB) preuzeto 1216 put(ova).


Best Regards

Carlos
#7 Objavljeno: 4. 3. 2020. 14:36:45
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

... maybe in red [255,225,225] ... page 2.

zatizeni.sm (449,94 KiB) preuzeto 1194 put(ova).

#8 Objavljeno: 4. 3. 2020. 14:50:33
Pahec97

Pahec97

0 svidjanja u 5 postova.

Grupa: User

While I'm grateful for your help, neither of your files does the thing for me. Even after reinstalling Smath,
it doesn't work.
Attached screenshot of the file from mister Giraud, file from Carlos changes nothing as well.
p2.png
#9 Objavljeno: 4. 3. 2020. 16:49:04
CBG

CBG

78 svidjanja u 312 postova.

Grupa: User

Do you want something like this?


Eval_Fracc.png



Best Regards

Carlos
#10 Objavljeno: 4. 3. 2020. 16:56:01
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

you can use the pre-defined constant ge.
if you have to put user defined g constant, than I don't have any idea.

ge.png
#11 Objavljeno: 4. 3. 2020. 16:57:45
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

well, apparently the way of carlos is much more elegant.
#12 Objavljeno: 4. 3. 2020. 17:12:57
CBG

CBG

78 svidjanja u 312 postova.

Grupa: User

The file

Eval_Fracc_2.png,


zatizeni_R2.sm (457,85 KiB) preuzeto 1227 put(ova).


Best Regards

Carlos
#13 Objavljeno: 4. 3. 2020. 17:46:00
Pahec97

Pahec97

0 svidjanja u 5 postova.

Grupa: User

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.
#14 Objavljeno: 4. 3. 2020. 18:05:40
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

neither 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,16 KiB) preuzeto 1045 put(ova).
  • Novi postovi
  • Nema novih postova