New Member
Group: Members
Posts: 16
Member No.: 823
Joined: 3-December 04
|
This can be done with regular arithmetic operations too.
Consider this C program:
CODE | #include <stdio.h>
int main() {
float a = 123.0; float b = 456.0;
printf("a=%.3f b=%.3f\n", a, b);
a /= b; b *= a; a /= b; a = 1/a;
printf("a=%.3f b=%.3f\n", a, b);
return 0; }
|
Which prints:
CODE | a=123.000 b=456.000 a=456.000 b=123.000
|
|