# Colour Decision List

### #1

Posted 31 March 2009 - 11:22 PM

"fractional exponentiation of negative reals"

...and report back to the forum what the reaction is?

Ahem.

-P

### #2

Posted 01 April 2009 - 01:24 AM

What exactly does that mean Phil? I don't wanna get punched in the face or anything...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"

### #3

Posted 01 April 2009 - 10:37 AM

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

### #4

Posted 01 April 2009 - 11:00 AM

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.

### #5

Posted 01 April 2009 - 11:21 AM

Does the CDL spec mention this?

P

### #6

Posted 01 April 2009 - 11:39 AM

-80 to the power of 1.02 = -87.3276527

**Edited by Will Earl, 01 April 2009 - 11:40 AM.**

### #7

Posted 01 April 2009 - 12:02 PM

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

### #8

Posted 01 April 2009 - 07:39 PM

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.

### #9

Posted 01 April 2009 - 10:50 PM

P

### #10

Posted 02 April 2009 - 07:54 AM

>>>(-80)**1.02 ValueError: negative number cannot be raised to a fractional power >>> -(80)**1.02 -87.327652683387186

### #11

Posted 02 April 2009 - 07:48 PM

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.