[TRNSYS-users] Float error on squaring

henkwitte henk.witte at groenholland.nl
Wed Feb 15 01:25:13 PST 2006


Hello,

When I try to calculate in an equation the square of a difference of two 
variables in TRNSYS 15 like:

(value_var_1 - value_var_2)^2

A floating point error is generated when the difference is or becomes zero.

(value_var_1 - value_var_2) * (value_var_1 - value_var_2) does work without 
problems

Is this a known problem?

If I just create an static equation with 0^2 it does not generate the 
error, so it could be an underflow problem on the variables.
Is there a round or MIN function in the equation of TRNSYS?

Thanks

Henk WItte


Groenholland b.v.
Valschermkade 26
1059 CD Amsterdam
The Netherlands

Tel.: +31 (0)20 - 6159050
Fax:+31 (0)20 - 6177082

mobiel: 0628176535

http://www.groenholland.nl




More information about the TRNSYS-users mailing list