Informix

 View Only
  • 1.  Update SMALLFLOAT Larger Than -1.175494351E-38 Works?

    Posted Tue July 02, 2024 01:38 PM

    According to multiple sources, the ranges of a FLOAT are:

    Positive numbers: Min Value: 1.175494351E-38 and Max Value: 3.402823466E+38

    Negative Numbers: Min value: -3.402823466E+38 and Max Value: -1.175494351E-38

    Given that, why can I successfully insert into an Informix SMALLFLOAT a value of -5.6051938E-45, which is greater than the maximum value? 

    Yet, I can not insert a  SMALLFLOAT value of 3.4028234E+39, which is greater than the maximum value:

    I've experimented a little by decreasing the exponent for negative numbers and when the exponent gets to -46, the update fails.

    Sure seems to me that this is a bug in Informix.

    Appreciate any input!



    ------------------------------
    Thanks,
    Rick Spagna
    Optim Development Director
    UNICOM Global
    ------------------------------


  • 2.  RE: Update SMALLFLOAT Larger Than -1.175494351E-38 Works?

    IBM Champion
    Posted Tue July 09, 2024 10:11 AM

    Looks like the highest negative number (closest to zero) I can insert into a smallfloat, using dbaccess, is -1.175494281E-38.

    I'm using 14.10.FC10 on Linux - what's yours?



    ------------------------------
    Andreas Legner
    ------------------------------



  • 3.  RE: Update SMALLFLOAT Larger Than -1.175494351E-38 Works?

    Posted Tue July 09, 2024 10:23 AM

    Hi Andreas,

    I'm also 14.10.FC10, but on Windows:

    E:\Programs\informix>oninit -V
    IBM Informix Dynamic Server Version 14.10.FC10W2DE
     Thu Feb 1 12:57:41 CST 2024

    E:\Programs\informix>

    Can you try on Windows and see what you get?

    Thanks,

    Rick



    ------------------------------
    Rick Spagna
    ------------------------------



  • 4.  RE: Update SMALLFLOAT Larger Than -1.175494351E-38 Works?

    IBM Champion
    Posted Tue July 09, 2024 11:42 AM

    Oh, yeah, tried it, and explored a little further: looks like specifically on Windows that minimum (absolute) value can be a LOT smaller than on other platforms, both for SMALLFLOAT and FLOAT.

    Strange since neither float nor double data types seem to support this...



    ------------------------------
    Andreas Legner
    ------------------------------



  • 5.  RE: Update SMALLFLOAT Larger Than -1.175494351E-38 Works?

    Posted Mon July 15, 2024 08:02 AM

    Is a bug going to be opened on this so it can be corrected?



    ------------------------------
    Rick Spagna
    ------------------------------