Re:
Posted in 1993
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
>From: uunet!sunburn.ec.usf.edu.!maddahia (Hassan Maddahian (CS)) >Subject: Exponentials in 4GL >Date: 16 Jun 1993 13:05:50 GMT >X-Informix-List-Id: <news.3580> >Does anyone know why the following expression evaluates to 4 in 4GL? > define dumy decimal > dumy = 2**(2.3) >The above results in a value of 4 for dumy. >(As if 2.3 had been rounded to 2) Because the 2.3 has been truncated (rather than rounded) to the integer with the value nearer to zero than the decimal value. Fractional exponenents are not supported in I4GL. Yours succinctly, Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>