Documentation : Scilab is Not Naive

Documentation : Scilab is Not Naive Commit Details

Date:2010-12-13 22:40:15 (7 years 6 months ago)
Author:Michael Baudin
Commit:26
Parents: 25
Message:Added difficult cases for Smith's algorithm.
Changes:
M/en_US/scripts/cdiv.dataset.csv
M/en_US/scripts/cdiv.tst

File differences

en_US/scripts/cdiv.tst
3535
3636
3737
38
39
40
3841
3942
4043
......
8790
8891
8992
90
93
9194
9295
9396
9497
95
98
99
100
96101
97102
98103
// A Scilab port of the Li et al. improved Smith
exec("cdiv_smithLi.sci");
// An improved Smith, with ideas from Li et al.
exec("cdiv_smith5.sci");
exec("assert_computedigits.sci");
exec("assert_datasetread.sci");
msg = msg + fmtdig ( x , y , expectedR , cdiv_naive , "Na" , ", " );
msg = msg + fmtdig ( x , y , expectedR , cdiv_smith , "Sm" , ", " );
msg = msg + fmtdig ( x , y , expectedR , cdiv_smith2 , "S2" , ", " );
msg = msg + fmtdig ( x , y , expectedR , cdiv_smith3 , "S3" , ", " );
//msg = msg + fmtdig ( x , y , expectedR , cdiv_smith3 , "S3" , ", " );
if ( haveimproved ) then
msg = msg + fmtdig ( x , y , expectedR , cdiv_smith4 , "S4" , ", " );
end
msg = msg + fmtdig ( x , y , expectedR , cdiv_ansiisoC , "AC", ", " );
msg = msg + fmtdig ( x , y , expectedR , cdiv_smithLi , "Li" , "" );
msg = msg + fmtdig ( x , y , expectedR , cdiv_smithLi , "Li" , ", " );
msg = msg + fmtdig ( x , y , expectedR , cdiv_smith5 , "S5" , ", " );
msg = msg + fmtdig ( x , y , expectedR , cdiv_smith5 , "S6" , "" );
mprintf("%s\n",msg);
end
en_US/scripts/cdiv.dataset.csv
170170
171171
172172
173
173174
174175
175176
......
212213
213214
214215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
215261
0.100000000000000000000e301,0.999999999999999999996e-300,0.100000000000000000000e201,0.100000000000000000000e-199,0.999999999999999999991e100,-0.100000000000000000001e-299
#
# Cases where Smith produces an infinite real part.
# This is because the expression (+/-)a+b*r or b+(+/-)a*r overflows.
#
1e308,1e308,1.e0 ,1.e0 ,1e308,0
1e308,1e308,1.e1 ,1.e1 ,1e307,0
1e308,1e308,1.e290,1.e290,1e18 ,0
1e308,1e308,1.e300,1.e300,1e8 ,0
1e308,1e308,1.e308,1.e308,1e0 ,0
#
# Case where Smith fails and produce zero.
# This is because the expressions c+d*r or d+c*r overflows.
#
1e0 ,1e0 ,1.e308,1.e308,1e-308,0
1e1 ,1e1 ,1.e308,1.e308,1e-307,0
1e2 ,1e2 ,1.e308,1.e308,1e-306,0
1e3 ,1e3 ,1.e308,1.e308,1e-305,0
1e4 ,1e4 ,1.e308,1.e308,1e-304,0
1e5 ,1e5 ,1.e308,1.e308,1e-303,0
1e6 ,1e6 ,1.e308,1.e308,1e-302,0
1e7 ,1e7 ,1.e308,1.e308,1e-301,0
1e8 ,1e8 ,1.e308,1.e308,1e-300,0
1e9 ,1e9 ,1.e308,1.e308,1e-299,0
1e10 ,1e10 ,1.e308,1.e308,1e-298,0
1e20 ,1e20 ,1.e308,1.e308,1e-288,0
1e30 ,1e30 ,1.e308,1.e308,1e-278,0
1e40 ,1e40 ,1.e308,1.e308,1e-268,0
1e50 ,1e50 ,1.e308,1.e308,1e-258,0
1e60 ,1e60 ,1.e308,1.e308,1e-248,0
1e70 ,1e70 ,1.e308,1.e308,1e-238,0
1e80 ,1e80 ,1.e308,1.e308,1e-228,0
1e90 ,1e90 ,1.e308,1.e308,1e-218,0
1e100,1e100,1.e308,1.e308,1e-208,0
1e110,1e110,1.e308,1.e308,1e-198,0
1e120,1e120,1.e308,1.e308,1e-188,0
1e130,1e130,1.e308,1.e308,1e-178,0
1e140,1e140,1.e308,1.e308,1e-168,0
1e150,1e150,1.e308,1.e308,1e-158,0
1e160,1e160,1.e308,1.e308,1e-148,0
1e170,1e170,1.e308,1.e308,1e-138,0
1e180,1e180,1.e308,1.e308,1e-128,0
1e190,1e190,1.e308,1.e308,1e-118,0
1e200,1e200,1.e308,1.e308,1e-108,0
1e210,1e210,1.e308,1.e308,1e-98,0
1e220,1e220,1.e308,1.e308,1e-88,0
1e230,1e230,1.e308,1.e308,1e-78,0
1e240,1e240,1.e308,1.e308,1e-68,0
1e250,1e250,1.e308,1.e308,1e-58,0
1e260,1e260,1.e308,1.e308,1e-48,0
1e270,1e270,1.e308,1.e308,1e-38,0
1e280,1e280,1.e308,1.e308,1e-28,0
1e290,1e290,1.e308,1.e308,1e-18,0
1e300,1e300,1.e308,1.e308,1e-8 ,0
1e308,1e308,1.e308,1.e308,1e0 ,0

Archive Download the corresponding diff file

Revision: 26