I am getting a float4 regression test failure. I have extracted the SQL from both the float4 and float8 tests below.
Both should return NAN
I looked at the code, The float4div does the operation as float8's then checks the value. The value is a valid
float8 NAN. The call to CheckFloat4Val is missing a cast back to float4. If I put the cast in I get the expected
results (NAN).
SELECT 'Infinity'::float4 / 'Infinity'::float4;
psql:test.sql:1: ERROR: type "real" value out of range: overflow
SELECT 'Infinity'::float8 / 'Infinity'::float8;?column?
---------- NaN
(1 row)