Premium Member Phil Rhodes Posted April 1, 2009 Premium Member Share Posted April 1, 2009 Next time someone's speaking to a member of the ASC committee that defined the CDL algorithms, could you please say: "fractional exponentiation of negative reals" ...and report back to the forum what the reaction is? Ahem. -P Link to comment Share on other sites More sharing options...
Premium Member Satsuki Murashige Posted April 1, 2009 Premium Member Share Posted April 1, 2009 Next time someone's speaking to a member of the ASC committee that defined the CDL algorithms, could you please say: "fractional exponentiation of negative reals" What exactly does that mean Phil? I don't wanna get punched in the face or anything... Link to comment Share on other sites More sharing options...
Premium Member Phil Rhodes Posted April 1, 2009 Author Premium Member Share Posted April 1, 2009 What exactly does that mean Phil? I don't wanna get punched in the face or anything... OK, it was four in the morning, I was wrestling with mathematics and - sob - things just got completely out of hand... The algorithm for CDLs is as follows: output = (input * slope + offset)^power Since offset is unbounded (thus can be negative), the entire bracketed expression can be negative. Power can be any positive number, including (and in fact typically) non-integers. So, what's the value of, say, minus 80 raised to the power 1.02? P Link to comment Share on other sites More sharing options...
Premium Member John Sprung Posted April 1, 2009 Premium Member Share Posted April 1, 2009 So, what's the value of, say, minus 80 raised to the power 1.02? It's undefined or "not a number", sometimes abbreviated as NAN. The only fractional power of a negative we ever use is the "imaginary" square root of negative one: i = (-1)^0.5, which is kinda useful, as it give us the complex number system as a way of dealing with stuff on a two dimensional plane. The CDL lets you do undefined stuff, just as your car could be driven fast into a brick wall. In both cases, we just have to be smart enough not to..... ;-) -- J.S. Link to comment Share on other sites More sharing options...
Premium Member Phil Rhodes Posted April 1, 2009 Author Premium Member Share Posted April 1, 2009 ...yes, I know, it's a complex number. Until the Java Math.pow() is capable of returning a complex set, this will remain NaN <_< Does the CDL spec mention this? P Link to comment Share on other sites More sharing options...
Will Earl Posted April 1, 2009 Share Posted April 1, 2009 (edited) I managed to get the same answer out of google and python... :) -80 to the power of 1.02 = -87.3276527 Edited April 1, 2009 by Will Earl Link to comment Share on other sites More sharing options...
Premium Member Phil Rhodes Posted April 1, 2009 Author Premium Member Share Posted April 1, 2009 I managed to get the same answer out of google and python... :) -80 to the power of 1.02 = -87.3276527 I think the operative point is that any meaningful value of it is less than zero, so it really doesn't matter much as regards CDL P Link to comment Share on other sites More sharing options...
Premium Member John Sprung Posted April 2, 2009 Premium Member Share Posted April 2, 2009 I managed to get the same answer out of google and python... :) -80 to the power of 1.02 = -87.3276527 They both got it wrong. They've given you -(80^1.02), which is a real number. What Phil's asking about is (-80)^1.02, which is NaN. It isn't even an imaginary or complex number. Check out Wolfram's Mathematica 7 for this kind of thing: http://www.wolfram.com/ -- J.S. Link to comment Share on other sites More sharing options...
Premium Member Phil Rhodes Posted April 2, 2009 Author Premium Member Share Posted April 2, 2009 Um. How is it not a complex number? P Link to comment Share on other sites More sharing options...
Will Earl Posted April 2, 2009 Share Posted April 2, 2009 Oh well, I'm sure the ASC tech committee knows what they're doing. >>>(-80)**1.02 ValueError: negative number cannot be raised to a fractional power >>> -(80)**1.02 -87.327652683387186 Link to comment Share on other sites More sharing options...
Premium Member John Sprung Posted April 3, 2009 Premium Member Share Posted April 3, 2009 Um. How is it not a complex number? P Complex numbers consist of a real number plus a real number times "i", the Imaginary square root of -1: x + iy Taking a negative to any (edit to insert: non-integer) power other than 0.5, which is the same as square root, can't be expressed in terms of reals and i. It's just undefined. Complex numbers can be visualized on a two dimensional plane, where you can do stuff like multiplying them: (x + i y)(a + ib) = xa - yb + i(xb + ya) IIRC, there's some stuff in physics where complex numbers are useful. -- J.S. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now