Gerald Nowitzky wrote: > > Some time ago, I have been reporting a problem concerning accuracy of > operands of trigonometric operations, which introduced the > need to scale > operands - float(...,15) -. It seems to be what is described in PTS # > 1121198 and 1121197. > > Although it should be fixed, I still observe some strange behavior: > > SELECT ACOS(SIN(0.01745329251994 * 48.1002) * > SIN(0.01745329251994 * 48.1002) + COS(0.01745329251994 * 48.1002) * > COS(0.01745329251994 * 48.1002) * COS(0.01745329251994 * (11.5963 - > 11.5963))) * 6370 > AS DIST from dual > > Ends up in: Error in assignment;-3016 POS(8) Invalid numeric constant.
The result of the expression send to the acos looks like this 1.000000000000001 because of some internal conversion float/internal representation of numbers. The check if the input to acos exceeds 1 says: YES and the above error occurs. We will try to fix this with one of the next versions. Elke SAP Labs Berlin > > It is working when I put a float(..,15) around the operand of > the ACOS(), > like this: > > SELECT acos(float(SIN(0.01745329251994 * 48.1002) * > SIN(0.01745329251994 * 48.1002)+ COS(0.01745329251994 * 48.1002) * > COS(0.01745329251994 * 48.1002)* COS(0.01745329251994 * (11.5963 - > 11.5963)),15)) * 6370 > AS DIST from dual > > Thanks! > (Gerald Nowitzky) > > > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]