annotate test/float.c @ 86:4d1275f8a5b5

*** empty log message ***
author kono
date Wed, 05 Mar 2003 16:17:44 +0900
parents 3789aef7331d
children 1738f313f98b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
1 #include "stdio.h"
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
2
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
3 void test2(double);
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
4 void test1();
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
5 void print(double d);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
6
81
f94ca1168520 float first try...
kono
parents: 79
diff changeset
7 extern double sin(double);
84
1a723130a2c7 condtional
kono
parents: 82
diff changeset
8 // extern float fsin(float);
81
f94ca1168520 float first try...
kono
parents: 79
diff changeset
9
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
10 float f = 0.3;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
11 double d = 0.3;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
12 float f1 = 0.3;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
13 double d1 = 0.3;
84
1a723130a2c7 condtional
kono
parents: 82
diff changeset
14 double d2 = -0.2;
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
15
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
16 int
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
17 main(int ac,char *av[]) {
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
18 double g;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
19 int i;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
20 unsigned u;
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
21
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
22 g = 1.0;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
23 g = -g;
84
1a723130a2c7 condtional
kono
parents: 82
diff changeset
24 printf("%g\ncond ",g);
1a723130a2c7 condtional
kono
parents: 82
diff changeset
25 if(f==f*1.0) printf("1 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
26 if(d==f*1.0) printf("2 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
27 if(f==f1) printf("3 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
28 if(d==d1) printf("4 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
29 if(d==d2) printf("-4 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
30 if(d>d1) printf("5 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
31 if(d>d2) printf("-5 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
32 if(d>=d1) printf("6 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
33 if(d>=d2) printf("-6 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
34 if(d!=d1) printf("7 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
35 if(d!=d2) printf("-7 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
36 if(d<d1) printf("8 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
37 if(d<d2) printf("-8 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
38 if(d<=d1) printf("9 ");
1a723130a2c7 condtional
kono
parents: 82
diff changeset
39 if(d<=d2) printf("-9 ");
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
40 d = 123.4234; f=-234.333;
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
41 i = d;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
42 d = i;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
43 i = f;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
44 f = i;
84
1a723130a2c7 condtional
kono
parents: 82
diff changeset
45 printf("\n%d %g %f",i,d,f);
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
46 f = g = d = g = d = f;
84
1a723130a2c7 condtional
kono
parents: 82
diff changeset
47 printf(" %d %g %f %g\n",i,d,f,g);
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
48
86
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
49 d = 4204967294.4234; f=4204967294.4234;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
50 u = d;
3789aef7331d minor fix
kono
parents: 84
diff changeset
51 d = u;
3789aef7331d minor fix
kono
parents: 84
diff changeset
52 u = f;
3789aef7331d minor fix
kono
parents: 84
diff changeset
53 f = u;
3789aef7331d minor fix
kono
parents: 84
diff changeset
54 printf("%u %g %f\n",u,d,f);
3789aef7331d minor fix
kono
parents: 84
diff changeset
55
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
56 print(1.0);
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
57 print(0.1234);
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
58 print(1.234e10);
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
59 print(1.234e-10);
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
60
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
61 test1();
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
62 return 0;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
63 }
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
64
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
65 void
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
66 print(double d)
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
67 {
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
68 float f;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
69 int *dd;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
70
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
71 f = d;
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
72
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
73 dd = (int*) &d;
84
1a723130a2c7 condtional
kono
parents: 82
diff changeset
74 printf("d %g ",d);
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
75 printf("dx %08x %08x\n",*(dd),*(dd+1));
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
76
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
77 dd = (int*) &f;
84
1a723130a2c7 condtional
kono
parents: 82
diff changeset
78 printf("f %g ",f);
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
79 printf("dx %08x \n",*(dd));
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
80 }
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
81
81
f94ca1168520 float first try...
kono
parents: 79
diff changeset
82 double
f94ca1168520 float first try...
kono
parents: 79
diff changeset
83 testd(double i,double j)
f94ca1168520 float first try...
kono
parents: 79
diff changeset
84 {
f94ca1168520 float first try...
kono
parents: 79
diff changeset
85 return i+1.1+.0e3+12.3e-12;
f94ca1168520 float first try...
kono
parents: 79
diff changeset
86 }
f94ca1168520 float first try...
kono
parents: 79
diff changeset
87
f94ca1168520 float first try...
kono
parents: 79
diff changeset
88 float
f94ca1168520 float first try...
kono
parents: 79
diff changeset
89 testf(float i,float j)
f94ca1168520 float first try...
kono
parents: 79
diff changeset
90 {
f94ca1168520 float first try...
kono
parents: 79
diff changeset
91 return i+1;
f94ca1168520 float first try...
kono
parents: 79
diff changeset
92 }
f94ca1168520 float first try...
kono
parents: 79
diff changeset
93
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
94 void
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
95 test1()
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
96 {
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
97 float f;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
98 float f1;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
99 double g;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
100 double g1;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
101 float *pf;
3789aef7331d minor fix
kono
parents: 84
diff changeset
102 float *pf1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
103 double *pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
104 double *pg1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
105 int n = 1;
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
106
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
107 f = 1.3;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
108
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
109 g = 1.0;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
110 g = g+g;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
111 printf("%d:%g\t",n++,g);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
112 g1 = g*g;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
113 printf("%d:%g\t",n++,g1);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
114 g = g/g1;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
115 printf("%d:%g\t",n++,g);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
116 g = g-g1;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
117 printf("%d:%g\t",n++,g);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
118 g = sin(g1);
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
119 printf("%d:%g\t",n++,g);
81
f94ca1168520 float first try...
kono
parents: 79
diff changeset
120 g = testd(g,g1);
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
121 printf("%d:%g\t",n++,g);
3789aef7331d minor fix
kono
parents: 84
diff changeset
122 printf("\n");
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
123
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
124 f = f+f;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
125 printf("%d:%g\t",n++,f);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
126 f1 = f*f;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
127 printf("%d:%g\t",n++,f1);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
128 f = f/f1;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
129 printf("%d:%g\t",n++,f);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
130 f = f-f1;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
131 printf("%d:%g\t",n++,f);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
132 f = sin(f1);
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
133 printf("%d:%g\t",n++,f);
3789aef7331d minor fix
kono
parents: 84
diff changeset
134 printf("\n");
3789aef7331d minor fix
kono
parents: 84
diff changeset
135
86
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
136 g1 = g;
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
137 g1 = g1++ - ++g;
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
138 printf("%d:%g\t",n++,g1);
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
139
86
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
140 f1 = f;
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
141 f1 = f1++ - ++f;
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
142 printf("%d:%g\t",n++,f1);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
143
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
144 g = f+f;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
145 printf("%d:%g\t",n++,g);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
146 f = g*g;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
147 printf("%d:%g\t",n++,f);
81
f94ca1168520 float first try...
kono
parents: 79
diff changeset
148 f = testf(f,f1);
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
149 printf("%d:%g\t",n++,f);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
150
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
151 g = g*g+f*f-g1*g1;
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
152 printf("%d:%g\t",n++,g);
3789aef7331d minor fix
kono
parents: 84
diff changeset
153 printf("\n");
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
154
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
155 n=1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
156 f = 1.3; pf=&f; pf1=&f1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
157
3789aef7331d minor fix
kono
parents: 84
diff changeset
158 g = 1.0; pg=&g; pg1=&g1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
159 *pg = *pg+ *pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
160 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
161 *pg1 = *pg**pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
162 printf("%d:%g\t",n++,*pg1);
3789aef7331d minor fix
kono
parents: 84
diff changeset
163 *pg = *pg/ *pg1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
164 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
165 *pg = *pg-*pg1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
166 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
167 *pg = sin(*pg1);
3789aef7331d minor fix
kono
parents: 84
diff changeset
168 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
169 *pg = testd(*pg,*pg1);
3789aef7331d minor fix
kono
parents: 84
diff changeset
170 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
171 printf("\n");
3789aef7331d minor fix
kono
parents: 84
diff changeset
172
3789aef7331d minor fix
kono
parents: 84
diff changeset
173 *pf = *pf+*pf;
3789aef7331d minor fix
kono
parents: 84
diff changeset
174 printf("%d:%g\t",n++,*pf);
3789aef7331d minor fix
kono
parents: 84
diff changeset
175 *pf1 = *pf**pf;
3789aef7331d minor fix
kono
parents: 84
diff changeset
176 printf("%d:%g\t",n++,*pf1);
3789aef7331d minor fix
kono
parents: 84
diff changeset
177 *pf = *pf/ *pf1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
178 printf("%d:%g\t",n++,*pf);
3789aef7331d minor fix
kono
parents: 84
diff changeset
179 *pf = *pf-*pf1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
180 printf("%d:%g\t",n++,*pf);
3789aef7331d minor fix
kono
parents: 84
diff changeset
181 *pf = sin(*pf1);
3789aef7331d minor fix
kono
parents: 84
diff changeset
182 printf("%d:%g\t",n++,*pf);
3789aef7331d minor fix
kono
parents: 84
diff changeset
183 printf("\n");
3789aef7331d minor fix
kono
parents: 84
diff changeset
184
86
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
185 *pg1 = *pg;
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
186 *pg1 = (*pg1)++ - ++(*pg);
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
187 printf("%d:%g\t",n++,*pg1);
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
188
86
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
189 *pf1 = *pf;
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
190 *pf1 = (*pf1)++ - ++(*pf);
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
191 printf("%d:%g\t",n++,*pf1);
4d1275f8a5b5 *** empty log message ***
kono
parents: 85
diff changeset
192
85
3789aef7331d minor fix
kono
parents: 84
diff changeset
193
3789aef7331d minor fix
kono
parents: 84
diff changeset
194 *pg = *pf+*pf;
3789aef7331d minor fix
kono
parents: 84
diff changeset
195 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
196 *pf = *pg**pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
197 printf("%d:%g\t",n++,*pf);
3789aef7331d minor fix
kono
parents: 84
diff changeset
198 *pf = testf(*pf,*pf1);
3789aef7331d minor fix
kono
parents: 84
diff changeset
199 printf("%d:%g\t",n++,*pf);
3789aef7331d minor fix
kono
parents: 84
diff changeset
200
3789aef7331d minor fix
kono
parents: 84
diff changeset
201 *pg = *pg**pg+*pf**pf-*pg1**pg1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
202 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
203 printf("\n");
3789aef7331d minor fix
kono
parents: 84
diff changeset
204
3789aef7331d minor fix
kono
parents: 84
diff changeset
205 n=1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
206 f = 1.3;
3789aef7331d minor fix
kono
parents: 84
diff changeset
207 g = 1.0;
3789aef7331d minor fix
kono
parents: 84
diff changeset
208
3789aef7331d minor fix
kono
parents: 84
diff changeset
209 g *= 2*g;
3789aef7331d minor fix
kono
parents: 84
diff changeset
210 printf("%d:%g\t",n++,g);
3789aef7331d minor fix
kono
parents: 84
diff changeset
211 g /= 2*g;
3789aef7331d minor fix
kono
parents: 84
diff changeset
212 printf("%d:%g\t",n++,g);
3789aef7331d minor fix
kono
parents: 84
diff changeset
213 g -= 2*g;
3789aef7331d minor fix
kono
parents: 84
diff changeset
214 printf("%d:%g\t",n++,g);
3789aef7331d minor fix
kono
parents: 84
diff changeset
215 g += 2*g;
3789aef7331d minor fix
kono
parents: 84
diff changeset
216 printf("%d:%g\t",n++,g);
3789aef7331d minor fix
kono
parents: 84
diff changeset
217
3789aef7331d minor fix
kono
parents: 84
diff changeset
218 f *= 2*g;
3789aef7331d minor fix
kono
parents: 84
diff changeset
219 printf("%d:%g\t",n++,f);
3789aef7331d minor fix
kono
parents: 84
diff changeset
220 f /= 2*g;
3789aef7331d minor fix
kono
parents: 84
diff changeset
221 printf("%d:%g\t",n++,f);
3789aef7331d minor fix
kono
parents: 84
diff changeset
222 f -= 2*g;
3789aef7331d minor fix
kono
parents: 84
diff changeset
223 printf("%d:%g\t",n++,f);
3789aef7331d minor fix
kono
parents: 84
diff changeset
224 f += 2*g;
3789aef7331d minor fix
kono
parents: 84
diff changeset
225 printf("%d:%g\t",n++,f);
3789aef7331d minor fix
kono
parents: 84
diff changeset
226 printf("\n");
3789aef7331d minor fix
kono
parents: 84
diff changeset
227
3789aef7331d minor fix
kono
parents: 84
diff changeset
228 n=1;
3789aef7331d minor fix
kono
parents: 84
diff changeset
229 f = 1.3;
3789aef7331d minor fix
kono
parents: 84
diff changeset
230 g = 1.0;
3789aef7331d minor fix
kono
parents: 84
diff changeset
231
3789aef7331d minor fix
kono
parents: 84
diff changeset
232 *pg *= 2**pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
233 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
234 *pg /= 2**pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
235 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
236 *pg -= 2**pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
237 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
238 *pg += 2**pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
239 printf("%d:%g\t",n++,*pg);
3789aef7331d minor fix
kono
parents: 84
diff changeset
240
3789aef7331d minor fix
kono
parents: 84
diff changeset
241 *pf *= 2**pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
242 printf("%d:%g\t",n++,*pf);
3789aef7331d minor fix
kono
parents: 84
diff changeset
243 *pf /= 2**pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
244 printf("%d:%g\t",n++,*pf);
3789aef7331d minor fix
kono
parents: 84
diff changeset
245 *pf -= 2**pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
246 printf("%d:%g\t",n++,*pf);
3789aef7331d minor fix
kono
parents: 84
diff changeset
247 *pf += 2**pg;
3789aef7331d minor fix
kono
parents: 84
diff changeset
248 printf("%d:%g\t",n++,*pf);
3789aef7331d minor fix
kono
parents: 84
diff changeset
249 printf("\n");
3789aef7331d minor fix
kono
parents: 84
diff changeset
250
3789aef7331d minor fix
kono
parents: 84
diff changeset
251
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
252 return;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
253 }