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 manhtruong  
#1 Posted : 16 December 2017 14:14:25(UTC)
manhtruong

Rank: Newbie

Groups: Registered
Joined: 13/12/2017(UTC)
Posts: 5
Viet Nam
Location: Hanoi

Hi everybody!
I'm beginner in Smath. I met a problem when use explicit function. I can't show values of variable in decimal format (in case it's irrational number).
In my example, please tell me How to show value of a in decimal format in expression of c. Thanks

2017-12-17 12_35_53-Question about explicit in Smath.png

Edited by moderator 17 December 2017 14:37:47(UTC)  | Reason: cropped snapshot

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

Offline Jean Giraud  
#2 Posted : 16 December 2017 18:08:25(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Tip for your snippets

1. Download WinGrab [freeware] ... put it in the task bar
2. Click on WinGrab to have it active, click "capture"", click F11
if you have set it active [maybe it's not free on your system,
in that case, code it otherwise]
3. At this point, your entire Smath is in full screen in Wingrab.
4. From WinGrab menu => selection tool
5. Strech up/down ... left/right for the portion of your Smath region
6. Crop image from from WinGrab menu
7. Save as *.PNG in your Snippet file.

So, you will just have the portion of interest.
That avoids over clogging the Smath forum server and ease the visitors.
thanks 1 user thanked Jean Giraud for this useful post.
on 17/12/2017(UTC)
Offline Jean Giraud  
#3 Posted : 16 December 2017 18:29:21(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: manhtruong Go to Quoted Post
How to show value of a in decimal format in expression of c


Maybe just click right for the "Numeric option"
If you define a:=1, b:=2, c:=3, d:=pi

MyStuff:=a*b*c*d ... what is the point to display
MysStuff=1*2*3*3.14159=

abc.PNG
thanks 1 user thanked Jean Giraud for this useful post.
on 17/12/2017(UTC)
Offline manhtruong  
#4 Posted : 16 December 2017 19:24:02(UTC)
manhtruong

Rank: Newbie

Groups: Registered
Joined: 13/12/2017(UTC)
Posts: 5
Viet Nam
Location: Hanoi

Originally Posted by: Jean Giraud Go to Quoted Post
Tip for your snippets

1. Download WinGrab [freeware] ... put it in the task bar
2. Click on WinGrab to have it active, click "capture"", click F11
if you have set it active [maybe it's not free on your system,
in that case, code it otherwise]
3. At this point, your entire Smath is in full screen in Wingrab.
4. From WinGrab menu => selection tool
5. Strech up/down ... left/right for the portion of your Smath region
6. Crop image from from WinGrab menu
7. Save as *.PNG in your Snippet file.

So, you will just have the portion of interest.
That avoids over clogging the Smath forum server and ease the visitors.


I'm so sorry, I forgot crop image Sad
Offline mkraska  
#5 Posted : 17 December 2017 12:58:27(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Ever heard of the windows snipping tool? It is already on board, no need to install anything.
Just type "sni" in the search field of the start menu.

If mouse cursor, callouts and the like are of importance, I use Greenshot.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 17/12/2017(UTC)
Offline manhtruong  
#6 Posted : 17 December 2017 20:32:22(UTC)
manhtruong

Rank: Newbie

Groups: Registered
Joined: 13/12/2017(UTC)
Posts: 5
Viet Nam
Location: Hanoi

Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: manhtruong Go to Quoted Post
How to show value of a in decimal format in expression of c


Maybe just click right for the "Numeric option"
If you define a:=1, b:=2, c:=3, d:=pi

MyStuff:=a*b*c*d ... what is the point to display
MysStuff=1*2*3*3.14159=

abc.PNG


I followed your instructions. But the problem remains unresolved. Do you have any other way?
Capture.PNG
Offline Jean Giraud  
#7 Posted : 18 December 2017 04:28:01(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: manhtruong Go to Quoted Post
I followed your instructions. But the problem remains unresolved. Do you have any other way?

A Snippet + Work sheet to check consistency in you PC.
To get all the trailing 0' => set decimals 15 [first]
then set "Trailing 0's => 15.
If you visit Abramowitz & Stegun, you will find lot of
approximations are in fixed arithmetic rational fractions.

Does it help ?

Hanoi.sm (24kb) downloaded 21 time(s).

Hanoi.PNG

thanks 1 user thanked Jean Giraud for this useful post.
on 18/12/2017(UTC)
Offline manhtruong  
#8 Posted : 18 December 2017 13:59:53(UTC)
manhtruong

Rank: Newbie

Groups: Registered
Joined: 13/12/2017(UTC)
Posts: 5
Viet Nam
Location: Hanoi

Very helpful, thank you very much!
Offline Jean Giraud  
#9 Posted : 18 December 2017 18:05:51(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: manhtruong Go to Quoted Post
Very helpful, thank you very much!


Welcome ... read more of interest. So savant a computer may be,
NONE contains mathematical functions, only the 4 arithmetic
operations [+,-,*,/] ... logic, memory as well.
Common functions: Exp(x), ln(x), X^Y [Power function], trig, SQRT...
come with Windows. More advanced functions [Si, Ei, Bessel ...]
are implemented by the software you use [Mathematica, Maple, ...]
In PC's, common functions are approximated from normalised
rational fractions giving 18/21 decimals, from which only 15 are
conserved and displayed. Main frames have supplementary base accuracy
from Chebyshev 25 decimals very stable.

As far as now, Smath will not display > 15 decimals [like Excel...].
Mathcad, Maple, Mathematica ... run what they call "Big Engine"
that will deploy all the floating point register. At the beginning
of the "Main Frames" approximation of functions were done from
Continued Fractions, slow but infinitely unlimited. Thus, Mathcad
could output 250/400 decimals for sin(something), SQRT(2) ... etc.

References:

1. C.T. Fike [Continued Fractions]
2. Luke, Clenshaw [Chebysev]
3. Cody junior [general implementation of rational fractions]
4. Hart et Al. [all collected rational fractions]

Have a good day and enjoy Smath ... Jean

Offline Jean Giraud  
#10 Posted : 19 December 2017 04:05:08(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Ah ! here is one that freaks the rules, from "while loop".

Page6 chirpLSQ Supsmooth.sm (106kb) downloaded 22 time(s).
Offline CBG  
#11 Posted : 19 December 2017 06:43:46(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Thank you Jean for your excellent example of using the function "While - loop".

But what happends if the data is not in order?

I think that before the function "While - loop", you must add a routine to sort the data ascending, and thus be sure that the data will be processed correctly, if not sorted.

Best regards.

Carlos
Offline Jean Giraud  
#12 Posted : 19 December 2017 07:38:27(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Explicit ... that's a big word.
Follow this document but don't drop dead seeing rational expressions 3 pages wide.
We talked about Continued Fraction, here is an example in applied Engineering.
Many, very many physical phenomenons are of rational form thus of Continued fraction form.
Continued fractions are calculated bottom up [for instance Excel that is brute force].
Smath does it nicely behind the scene. In fact, by itself it reconstructs a Num/Den rational polynomial.

Maple has conserved the conversion from Continued fraction to J_Fraction [explained in C.T. Fike].
Called an economized conversion. This document is complete by itself. The point of interest is wrt
the immensely long explicit, easy to manipulate to produce an elegant formulation.

The Mathcad 11 and earlier is easier to manipulate, it accesses Maple float

This document is Smath 6179 ... may just be different than more recent version.

Thiele Procedure QUICK Simplify_Collect.sm (55kb) downloaded 40 time(s).
Users browsing this topic
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.