Re: 4GL exponentiation bug
Posted in 1994
}From: miket300@aol.com (MikeT300) }Subject: 4GL exponentiation bug }Date: 16 Jul 1994 14:56:03 -0400 }X-Informix-List-Id: <news.7633> } }I am using the Informix-4GL RDS. It seems that 4gl offers exponentiation }(** operator) but it truncates the exponent expression to an integer. }This is a problem since we are writing an application for an insurance }company and frequently need to raise values to powers for interest rate }and future/present value calculations. } }Example code: <deleted> }anyway, I wrote a function in c called power.c, but I had to build a }custom 4gl runner and compile this function into it, then change the }above line to } }let y = power (x, exp) } }How come informix doesnt say anything about this in their manual? This is one of many venerable bugs, having bug number B01872, dated 10th December 1986. It is common to both compiled I4GL and I4GL-RDS, and should be documented but isn't. It is currently prioritised at about number 340 on the list of bugs to be fixed -- which is tantamount to saying it isn't going to be fixed. Your solution of using a custom function is correct. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>