0

i have a formula, it is basically the result of two other previous calculations and it gives me an eror message saying that i cant use it as a function

ERRORC =  (( target1 ) - ( OUTC ) )(OUTC)(1 - OUTC);

target one is selected at the start.

if  ( pattern == 1 )
        {
            target1 = 1;
            target2 = 0;
         }

and outC is calculated

OUTC = 1/(1 + pow(e, -((WAC * OUTA) + (WBC * OUTB))));

e is 2.718281828
and the other variables have been set up earlier.

target1 and outc are set up as floats.

thanks in advance.

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Ancient Dragon
0

ERRORC = (( target1 ) - ( OUTC ) )(OUTC)(1 - OUTC); That statement contains mismatched parentheses. Count them and you will see that there are too many of them. You can't do multiplication with the (xxx)(yyy) syntax, meaning xxx times yyyy. You have to use the * operator if you intend to do multipliation, like this: ERRORC = (( target1 ) - ( OUTC ) ) * (OUTC) * (1 - OUTC);

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.