1 Pages (6 items)
Zero to the Zero Power? - ?why not 1? - Messages
#1 Posted: 7/4/2016 10:06:19 AM
As one can see, zero to the zero power (0^0) in SMath will give you an error - Uncertainty.
I am just wondering why it is not accepted to be one (1) ?. I think it might be more useful to be 1 than to rise an error.
Any comments?
Regards,
Radovan
I am just wondering why it is not accepted to be one (1) ?. I think it might be more useful to be 1 than to rise an error.
Any comments?
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#2 Posted: 7/4/2016 11:55:43 AM
It is an interesting question Radovan.
Seems there isn't a uniform convention: Wolframalpha returns undefined, while Phyton, SciLab and Octave they returns 1. Also in spreadsheets most of the programs returns 1, some the #NUM error. No one of the programs in my knowledge returns 0.
In one hand the error leave the users more control over this problem (you can trap it using the try function or can be avoided if you know in advance that such issue might happens, using if/else statement on the base/exponent arguments calculated separately), in the other hand 1 might be more "productive" (but I guess in some case might represent a source of errors if you don't know what you are doing with your math; however this convention is accepted in many programs, so doesn't seems a big stop).
Seems there isn't a uniform convention: Wolframalpha returns undefined, while Phyton, SciLab and Octave they returns 1. Also in spreadsheets most of the programs returns 1, some the #NUM error. No one of the programs in my knowledge returns 0.
In one hand the error leave the users more control over this problem (you can trap it using the try function or can be avoided if you know in advance that such issue might happens, using if/else statement on the base/exponent arguments calculated separately), in the other hand 1 might be more "productive" (but I guess in some case might represent a source of errors if you don't know what you are doing with your math; however this convention is accepted in many programs, so doesn't seems a big stop).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 7/4/2016 2:23:22 PM
#4 Posted: 7/4/2016 3:49:30 PM
Hi.
There are 7 indeterminate form. All can be reduced to the forms 0/0 or inf/inf, as is showing in this table: https://en.wikipedia.org/wiki/Indeterminate_form#List_of_indeterminate_forms . As SMath have now try ... catch function, I guess that the best is take as error all of them.
Best regards.
Alvaro.
There are 7 indeterminate form. All can be reduced to the forms 0/0 or inf/inf, as is showing in this table: https://en.wikipedia.org/wiki/Indeterminate_form#List_of_indeterminate_forms . As SMath have now try ... catch function, I guess that the best is take as error all of them.
Best regards.
Alvaro.
#5 Posted: 7/4/2016 11:40:00 PM
1 Pages (6 items)
-
New Posts
-
No New Posts