Computer Science Canada

turing - help w positive #s

Author:  comp_help [ Sun Mar 29, 2009 5:44 pm ]
Post subject:  turing - help w positive #s

Does anyone how how to change real negative answers to positive real numbers.
I know this can be done with if statements and multiplying by -1 but does anyone know any other way? Confused

Thanks

Author:  Zren [ Sun Mar 29, 2009 5:47 pm ]
Post subject:  Re: turing - help w positive #s

Absolute value. |x| in math class or the function abs(x) in Turing.

Author:  comp_help [ Sun Mar 29, 2009 5:54 pm ]
Post subject:  Re: turing - help w positive #s

Yes Zren! Smile

Thank you very much for that. Apparently I forgot that (I didnt know it was also a turing function) , but I did learn absolute in grade 11 math. We did graphs on that too.

So Thank you again! Cool


: