On 12/27/2006 12:44 PM, Bruce Momjian wrote:
The only unsolved issue is the one with underflow checks.  I have added
comments explaining the problem in case someone ever figures out how to
address it.

This will behave better for float4:

   Datum float4pl(PG_FUNCTION_ARGS)
---    float4  arg1 = PG_GETARG_FLOAT4(0);
---    float4  arg2 = PG_GETARG_FLOAT4(1);
+++    double  arg1 = PG_GETARG_FLOAT4(0);
+++    double  arg2 = PG_GETARG_FLOAT4(1);
       double  result;

       result = arg1 + arg2;
       CheckFloat4Val(result,isinf(arg1) || isinf(arg2));
       PG_RETURN_FLOAT4((float4) result);


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to