Re: [HACKERS] Re: Trouble with float4 afterupgrading from 6.5.3 to 7.0.2

From: <vectro(at)pipeline(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, Romanenko Mikhail <mikhail(at)angg(dot)ru>, pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Re: Trouble with float4 afterupgrading from 6.5.3 to 7.0.2
Date: 2000-08-06 21:36:19
Message-ID: Pine.LNX.4.10.10008061433470.22893-100000@nemo.house
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> I suppose we could implement the conversion as "float8in(float4out(x))"
> instead of "(double) x" but it'd be several orders of magnitude slower,
> as well as being *less* useful to those who know what they're doing with
> float math (since the result would actually be a less-precise conversion
> except in cases where the intended value has a short decimal
> representation).

We only need to maintain the lower-order bit(s). Seems this could be done
a lot easier than by an ascii in-between.

Is there a reason we can't perform the conversion and then copy the
low-order bits manually, with some bit-shifting and masking?

Ian

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message vectro 2000-08-07 00:04:28 Re: [HACKERS] Re: Trouble with float4 afterupgrading from 6.5.3 to 7.0.2
Previous Message Stephan Szabo 2000-08-06 21:26:17 Re: foreign keys

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-08-06 23:59:30 LIKE pattern matching
Previous Message The Hermit Hacker 2000-08-06 19:08:52 Re: scp daemon working?