Jump to content


Photo

Colour Decision List


  • Please log in to reply
10 replies to this topic

#1 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11934 posts
  • Other

Posted 31 March 2009 - 11:22 PM

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
  • 0

#2 Satsuki Murashige

Satsuki Murashige
  • Sustaining Members
  • 3510 posts
  • Cinematographer
  • San Francisco, CA

Posted 01 April 2009 - 01:24 AM

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...
  • 0

#3 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11934 posts
  • Other

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
  • 0

#4 John Sprung

John Sprung
  • Sustaining Members
  • 4635 posts
  • Other

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.
  • 0

#5 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11934 posts
  • Other

Posted 01 April 2009 - 11:21 AM

...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
  • 0

#6 Will Earl

Will Earl
  • Basic Members
  • PipPipPipPip
  • 385 posts
  • Other
  • Wellington, NZ

Posted 01 April 2009 - 11:39 AM

I managed to get the same answer out of google and python... :)

-80 to the power of 1.02 = -87.3276527

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

  • 0

#7 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11934 posts
  • Other

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
  • 0

#8 John Sprung

John Sprung
  • Sustaining Members
  • 4635 posts
  • Other

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.
  • 0

#9 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11934 posts
  • Other

Posted 01 April 2009 - 10:50 PM

Um. How is it not a complex number?

P
  • 0

#10 Will Earl

Will Earl
  • Basic Members
  • PipPipPipPip
  • 385 posts
  • Other
  • Wellington, NZ

Posted 02 April 2009 - 07:54 AM

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

  • 0

#11 John Sprung

John Sprung
  • Sustaining Members
  • 4635 posts
  • Other

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.
  • 0


Willys Widgets

CineLab

Rig Wheels Passport

Media Blackout - Custom Cables and AKS

Abel Cine

Glidecam

Metropolis Post

FJS International, LLC

Ritter Battery

Gamma Ray Digital Inc

Paralinx LLC

Aerial Filmworks

CineTape

Broadcast Solutions Inc

Tai Audio

rebotnix Technologies

The Slider

Opal

Visual Products

Wooden Camera

Technodolly

Metropolis Post

The Slider

Wooden Camera

Paralinx LLC

CineTape

Ritter Battery

Glidecam

Gamma Ray Digital Inc

Visual Products

Media Blackout - Custom Cables and AKS

FJS International, LLC

Broadcast Solutions Inc

CineLab

Tai Audio

Opal

Willys Widgets

Aerial Filmworks

Abel Cine

rebotnix Technologies

Technodolly

Rig Wheels Passport