- Code: Select all
x = pow(-1,4);
Why does this code show me -1.#IND on the streamout? Instead of correct value -> 1.







Moderators: electrogear, exonerate
x = pow(-1,4);
CoreStyler wrote:You will never get >4. At least you will get 4.
To do a statement is better to use green data, and streambool out the result (0 is false, 1 is true).
jacob wrote:CoreStyler wrote:You will never get >4. At least you will get 4.
To do a statement is better to use green data, and streambool out the result (0 is false, 1 is true).
Sorry, that was wrong. I want 1 to come out and not the 4 I mentioned first.


CoreStyler wrote:Done. you want to have a negative phase?
To calculate:
pow (-1,4) synthmaker not work (don't know why).
But doing
pow (1,4) * -1 does.
And with your code you bypassed the input.
So i addedd
out = in + pow(1,4) * -1;
instead of
out = pow(1,4) * -1;
Because you bypass the input that does not affect anything.
martinvicanek wrote:SM's implementation of pow() allows for non-integer exponents hence it expects a positive base to make sure that the result is a real (not a complex) number.
Users browsing this forum: Google [Bot] and 1 guest