Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: MGOS on January 27, 2012, 08:08:01 am

Title: When do ExpReg and PwrReg throw an ERR:Domain?
Post by: MGOS on January 27, 2012, 08:08:01 am
My program throws sometimes an ERR:Domain when I'm using ExpReg or PwrReg. But I don't want the program to stop, so how can I handle exeptions in these cases? How have the two lists have to be that there is no error?
Title: Re: When do ExpReg and PwrReg throw an ERR:Domain?
Post by: Torio on January 27, 2012, 04:59:29 pm
ExpReg and PwrReg will throw an ERR:DOMAIN when one of the lists contain a 0.
To check if your list contains a zero, use that command :
Code: [Select]
prod(List)
It will calculate the product of each term of your list. So if the list contains a 0, the product will automatically be 0.