Re: Can anyone explain this?
Re: Can anyone explain this?
- Subject: Re: Can anyone explain this?
- From: Peter Ammon <email@hidden>
- Date: Fri, 12 Sep 2008 16:05:43 -0700
On Sep 12, 2008, at 1:31 PM, Roland Silver wrote:
Can anyone explain this?
The value of the expression is apparently different from the value
of a variable assigned to that expression:
double pitch = A0Pitch * pow(2.0, ntones/
currentTonesPerOctave(voice)) ;
NSLog(@"expression value: %f", A0Pitch * pow(2.0, ntones/
currentTonesPerOctave(voice)));
2008-09-12 16:25:08.095 AttoComp[10566:813] pitch value: 28.305812
NSLog(@"variable value: %f", pitch);
2008-09-12 16:25:08.094 AttoComp[10566:813] pitch variable: nan
A common reason for this is that you do not have a prototype for pow()
in scope. Make sure you #include <math.h>
-Peter
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden