[TRNSYS-users] Division by Zero
Jihane Assaf
s3467254 at student.rmit.edu.au
Tue Jun 24 23:24:01 PDT 2014
>From experience, just put a condition on the denominator not to go to zero
(even if it is never goes to zero); like when it is zero, return "1 or some
convenient value"
On 24 June 2014 23:54, ITF - Adrien JEZEQUEL <a.jezequel at itf.biz> wrote:
> Hi Amir
>
> i think you divide something by an input, which is not constant, and may
> be null, certainly at time = 0
> for example, if the output you need is the division between input_a and
> input_b, you may write :
> output = (1-EQL(Input_b,0))*input_a/(input_b+0.001*EQL(Input_b,0))
>
> Best regards
>
>
> [image: Logo_ITF]
> *Adrien JEZEQUEL*
> Simulation Dynamique - Calculs numériques
>
> 62 rue du Bolliet
> 73230 SAINT-ALBAN-LEYSSE
> Tél : +33(0) 479 750 029
> Fax : +33(0) 479 852 122
> a.jezequel at itf.biz <a.jezequel at itz.biz>
> www.itf.biz
> [image: Feuille]
> Le 24/06/2014 13:38, Amir Nashed a écrit :
>
> Hello
>
> Does anyone know why the error of "dividing by zero" occurs?
> I mean i noticed many times that i get this error although when i print
> out the denominator its value never reached zero.
>
> Thank you
>
> Amir
>
>
> _______________________________________________
> TRNSYS-users mailing listTRNSYS-users at lists.onebuilding.orghttp://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
>
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at lists.onebuilding.org
> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20140625/9f717195/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itf_logo_web.png
Type: image/png
Size: 4327 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20140625/9f717195/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: feuille.png
Type: image/png
Size: 3404 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20140625/9f717195/attachment-0003.png>
More information about the TRNSYS-users
mailing list