Re: select exp(column) ANSWER
Posted in 1996
On Wed, 6 Mar 1996, Jack Parker wrote: } I was going to write an exponentiation SPL and just for grins did a } select col * exp(other_col) from table. It worked! But its not an } exponentiation function what is it? } select exp(2) } from systables } where tabid = 1 } } yields 7.39 >>>>> "Con" == Con Woodall <cwoodall@vth4.vth.colostate.edu> writes: Con> Its actually in the manual: Informix Guide to SQL v. 7.1 p Con> 1-570. Its the exponential value of two numeric expressions Con> although I can't make it work trying to paprallel the example Con> in the manual: It *is* an exponentiation function. exp(x) yield e^x ... "e" being the natural exponential base 2.71828... The syntax manual is in error on this point. There were clearly several levels of disconnect: the text says exp takes two arguments, while the example correctly uses one; there is an nonsensical remark about "e(n) = en" that probably started out as an attempt to use superscripting... If you want to calculate y^x, use select exp(y * logn(x)) from ... M.