I see, I was assuming pow() being a sqr function :-)

Thanks.

-----Original Message-----
From: Kevin Wheatley [mailto:kevin.j.wheat...@gmail.com] 
Sent: Mittwoch, 17. August 2016 12:39
To: Marco Freudenberger
Cc: LCMS mailing list
Subject: Re: [Lcms-user] Negative channel values are clipped upon floating 
point conversions to profiles with true gamma TRCs

On Wed, Aug 17, 2016 at 10:21 AM, Marco Freudenberger 
<marco.freudenber...@entrustdatacard.com> wrote:
> All,
>
> excuse me, not all that important and I didn't follow the details of the 
> previous discussion.
> I didn't understand why the pow() function might have any issues with 
> negative values.
>         pow(abs(x)) == pow(x)
> or where is my thought mistake?

ignoring the mistake I made with only including the value x and missing the y 
parameter, the function pow(x, y)

when x is negative and y is not an integer then mathematically you can't 
represent it as a real number in the general case, that is why it returns NaN 
see 
https://en.wikipedia.org/wiki/Exponentiation#Real_exponents_with_negative_bases

Kevin
------------------------------------------------------------------------------
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to