source:
CIVL/mods/dev.civl.com/examples/library/math/sqrt.c@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 277 bytes | |
| Line | |
|---|---|
| 1 | #include<assert.h> |
| 2 | #include<math.h> |
| 3 | #include<stdio.h> |
| 4 | |
| 5 | int main(int argc, char** argv) { |
| 6 | double a = 1.0/4.0; |
| 7 | double b = 1.0/3.0; |
| 8 | double c = 1.0; |
| 9 | double x = (sqrt(c)*sqrt(c)*b - a)/(sqrt(c)*sqrt(c)); |
| 10 | printf("FOO: %f\n", x); |
| 11 | x = sqrt(x); |
| 12 | printf("BAR: %f\n", x); |
| 13 | } |
| 14 |
Note:
See TracBrowser
for help on using the repository browser.
