Changeset 76cec1e in mainline for test/fpu/fpu1/test.c
- Timestamp:
- 2005-07-15T21:57:30Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b4a4c5e3
- Parents:
- e41c47e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/fpu/fpu1/test.c
re41c47e r76cec1e 76 76 { 77 77 int i; 78 79 78 double lpi, pi; 79 double n, ab, ad; 80 80 81 81 waitq_sleep(&can_start); … … 86 86 pi = 0; 87 87 88 89 88 for (n=2, ab = sqrt(2); lpi != pi; n *= 2, ab = ad) { 89 double sc, cd; 90 90 91 92 93 94 95 96 91 sc = sqrt(1 - (ab*ab/4)); 92 cd = 1 - sc; 93 ad = sqrt(ab*ab/4 + cd*cd); 94 lpi = pi; 95 pi = 2 * n * ad; 96 } 97 97 98 98 if((int)(100000000*pi)!=PI_10e8)
Note:
See TracChangeset
for help on using the changeset viewer.