A James Lewis <james@vrtx.net> writes:
> Sorry, should have been the first thing to say...
>
> Linux 2.0.29
> GCC 2.7.2
> /lib/libc.so.5.3.12
>
> For some reason it won't compile on my newer system GCC 2.8.1/glibc but
> I'll look at that when I have some time....
I just tried the same example on 6.4beta4, with linux2.0.36pre
something, glibc and egcs1.1. (It compiled fine, for what it's
worth.)
I also get this erroneous behaviour:
postgres=> select cash_mul_flt8('$1', '123.77');
cash_mul_flt8
-------------
$123.76
(1 row)
and
postgres=> select cash_mul_flt8('$1', '123.99');
cash_mul_flt8
-------------
$123.98
(1 row)
This may be sense from a numerical analysis point of view, but it
suggests there's a problem somewhere: this is surely behaving in a
surprising way.