04-21-2008, 06:15 PM
(This post was last modified: 04-24-2008, 02:45 AM by Frontrunner.)
Hi all...
My challenge is to write a routine which will translate correctly (in all circumstances) pow functions as done in C.
The winner we judged on two things.
1) Translations must be correct
2) Efficiency
Example:
Basic
r1 = (-c + (SQR(b(x) ^ 2 - (4 * a * c)))) / (2 * a)
C
r1 = (-c + (sqrt(pow(b(x), 2) - (4 * a * c)))) / (2 * a)
Good luck!
Fronrunner
My challenge is to write a routine which will translate correctly (in all circumstances) pow functions as done in C.
The winner we judged on two things.
1) Translations must be correct
2) Efficiency
Example:
Basic
r1 = (-c + (SQR(b(x) ^ 2 - (4 * a * c)))) / (2 * a)
C
r1 = (-c + (sqrt(pow(b(x), 2) - (4 * a * c)))) / (2 * a)
Good luck!
Fronrunner