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 Ale16595  
#1 Posted : 31 January 2020 15:46:08(UTC)
Ale16595


Rank: Advanced Member

Groups: Registered
Joined: 29/10/2019(UTC)
Posts: 35
Italy
Location: Italy

Hello to all.
I have a problem with the Smath function "dn_GearsBDF", it blocks the operation since giving me division by zero error.
psi.png

How can I overcome this problem? MANOVRA (con parametri moto).sm (79kb) downloaded 12 time(s).

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

Offline omorr  
#2 Posted : 31 January 2020 16:11:20(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello,

In dn_GearsBDF(init,0,end,100,D(x,Y)) replace zero with a small positive number (say 10^-10)

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Ale16595  
#3 Posted : 31 January 2020 18:14:51(UTC)
Ale16595


Rank: Advanced Member

Groups: Registered
Joined: 29/10/2019(UTC)
Posts: 35
Italy
Location: Italy

Hi, thanks for the reply.
Instead if I have an error like: "value too big or too small for an Int32", how can I solve it?
Every time this error appears the program stops.
error.png

MANOVRA slalom (cinematica).sm (46kb) downloaded 10 time(s).
Offline Jean Giraud  
#4 Posted : 31 January 2020 18:54:54(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)
Always separate text from image or *.sm document,
as you did: can't reply quote !
Offline mkraska  
#5 Posted : 31 January 2020 19:12:46(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1124 time(s) in 721 post(s)
Originally Posted by: Ale16595 Go to Quoted Post
Hi, thanks for the reply.
Instead if I have an error like: "value too big or too small for an Int32", how can I solve it?
Every time this error appears the program stops.
error.png

MANOVRA slalom (cinematica).sm (46kb) downloaded 10 time(s).

10^10 was probably too small, you have to see, how small x can be for your derivative ψ''(x) still being defined. 0.01 works.

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Jean Giraud  
#6 Posted : 31 January 2020 20:30:34(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)
... doctoring starts at red ... observe removing 10^14 at some trig [0].
lot more cleanup below ... can you write λ instead of l

MANOVRA slalom (cinematica).sm (53kb) downloaded 12 time(s).
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.