On Fri, Nov 11, 2005 at 09:26:47PM +0000, Tom wrote: > > The following bug has been logged online: > > Bug reference: 2037 > Logged by: Tom > Email address: [EMAIL PROTECTED] > PostgreSQL version: 8.1-beta4 > Operating system: Windows XP > Description: user function call unexpected "input out of range" > Details:
[ basically acos(sin(w1)*sin(w2) + cos(w1)*cos(w2)*cos(l1-l2)) ] Seems to me that you are hitting an unfortunate roundoff error, where the argument to acos is slightly greater than 1 (it will be mathematically 1 in the case w1==w2 and l1==l2). Maybe you should limit the argument to acos to -1..+1? regards -- tomás
signature.asc
Description: Digital signature