divide by zero error

divide by zero error - Mensajes

#1 Publicado: 31/1/2020 9:46:08
Ale16595

Ale16595

0 me gusta en 35 mensajes.

Grupo: User

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 (78,83 KiB) descargado 1193 vez(es).
#2 Publicado: 31/1/2020 10:11:20
Radovan Omorjan

Radovan Omorjan

325 me gusta y 1 no me gusta en 2.052 mensajes.

Grupo: Moderator

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!"
#3 Publicado: 31/1/2020 12:14:51
Ale16595

Ale16595

0 me gusta en 35 mensajes.

Grupo: User

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 (45,07 KiB) descargado 1278 vez(es).
#4 Publicado: 31/1/2020 12:54:54
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Always separate text from image or *.sm document,
as you did: can't reply quote !
#5 Publicado: 31/1/2020 13:12:46
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: Moderator

Wrote

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 (45,07 KiB) descargado 1278 vez(es).


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.

Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#6 Publicado: 31/1/2020 14:30:34
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

... 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 (52,94 KiB) descargado 1196 vez(es).
  • Nuevos mensajes
  • Sin mensajes nuevos