x^y=error

x^y=error - Mensajes

#1 Publicado: 13/3/2010 23:09:46
buenos

buenos

0 me gusta en 8 mensajes.

Grupo: User

hi

if i try to calculate this:
300^1.3 then it gives the result fine.
if i try to calculate 300^1.274 then it gives an error: "result is above max allowed positive number"

i tried this with the latest beta release. the previous verson from february calculates it fine.
#2 Publicado: 14/3/2010 2:10:16
Andrey Ivashov

Andrey Ivashov

2.343 me gusta en 4.056 mensajes.

Grupo: Super Administrator

Hello.

This is known problem. The only way to beat it is to use workaround with round(...) function as shown on the screenshot below:


This will be fixed later.
#3 Publicado: 14/3/2010 7:43:39
Radovan Omorjan

Radovan Omorjan

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

Grupo: Moderator

If you remember, "eval" function has been introduced in the case of rather complicated symbolic result resulting in slow calculation. If we need the numerical result only, by using "eval" the calculation time can be reduced drastically. Sometimes "eval" will not help. Here is an example were "round" can aslo help . This is an Example from the SMath included Examples.

(Numerical instability is expected, of course). Without "round" you can use up to 26-th polynomial degree.

Regards,
Radovan

PS. It is interesting to note that in this particular case "eval" will drastically increase the computational time. It might be usless (very slow) for higher polynomial degree. I do not know why, but "round" will do do job quite good. Forgot to mention - this is from 0.87 stable version. Could someone check it on 0.87 Beta? I will also check it tomorow at my office.
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#4 Publicado: 14/3/2010 8:55:05
buenos

buenos

0 me gusta en 8 mensajes.

Grupo: User

hi

thanks.
but it worked fine in the 10-february-2010 release. i mean there was no need for using the rounding...
i have a calculation sheet that worked fine, but after installing the new beta version yesterday it gave an error.
i could attach the file here, but there is no such button.

regards,
istvan
#5 Publicado: 14/3/2010 10:46:38
Radovan Omorjan

Radovan Omorjan

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

Grupo: Moderator

Hello Istvan,
Yes, you are right. In the 0.87 stable version there would be no error issued.
Wrote

i have a calculation sheet that worked fine, but after installing the new beta version yesterday it gave an error.
i could attach the file here, but there is no such button.


You could use some file hosting service or you can make from .sm an archived (.zip) file and upload it on the Wiki (File Management - menu on the right). Then make a link to it here.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#6 Publicado: 14/3/2010 13:30:07
buenos

buenos

0 me gusta en 8 mensajes.

Grupo: User

hi

i uploaded the file to the examples on "wiki":
https://smath.com/wiki/GetFile.aspx?File=Examples%5cDCDC_converter_Dissipation.zip

can i expect that all known problems will be fixed in the next stable release?
#7 Publicado: 14/3/2010 14:38:44
Andrey Ivashov

Andrey Ivashov

2.343 me gusta en 4.056 mensajes.

Grupo: Super Administrator

Not sure about next stable release, but this will be fixed in future. For now we have a solution mentioned in my previous comment (it is acceptable for your file as well).
#8 Publicado: 31/3/2010 23:30:26
Andrey Ivashov

Andrey Ivashov

2.343 me gusta en 4.056 mensajes.

Grupo: Super Administrator

Wrote

if i try to calculate 300^1.274 then it gives an error: "result is above max allowed positive number"



Fixed.

#9 Publicado: 16/4/2010 16:56:26
Oscar Campo

Oscar Campo

135 me gusta en 309 mensajes.

Grupo: Moderator

Hi,
I was trying:

n:=30000
pf:=1/n
pv:=pf*(1-pf)^n

and I obtained the error "result is above max allowed positive number". But, when I select the "pv:=pf*(1-pf)^n" and choose "Calculation/Optimization/Numeric", SMath find the correct answer: "pv=1.226*10^-5". The same happen when you choose "Calculation/Optimization/None"

Regards,

Oscar
#10 Publicado: 18/4/2010 6:49:36
captainblack

captainblack

0 me gusta en 13 mensajes.

Grupo: User

Wrote

Hi,
I was trying:

n:=30000
pf:=1/n
pv:=pf*(1-pf)^n

and I obtained the error "result is above max allowed positive number". But, when I select the "pv:=pf*(1-pf)^n" and choose "Calculation/Optimization/Numeric", SMath find the correct answer: "pv=1.226*10^-5". The same happen when you choose "Calculation/Optimization/None"

Regards,

Oscar



Right click over the definition of pv and select optimisation and set the option to numeric (this is for version 0.88) and all will be well.


Note, to very high precision (1-1/3000)^3000=1/e, e being Euler's number and the base of natural logarithms.


CB
  • Nuevos mensajes
  • Sin mensajes nuevos