root / pobysoPythonSage / src / sageSLZ / sageSLZ-Notes.html
Historique | Voir | Annoter | Télécharger (15,34 ko)
| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|---|---|
| 2 |
"http://www.w3.org/TR/html4/loose.dtd">
|
| 3 |
<html>
|
| 4 |
<head>
|
| 5 |
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> |
| 6 |
<style type="text/css"> |
| 7 |
/* Mise ? jour 2010-12-20 */ |
| 8 |
/* La police proportionnelle de base est une Helvetica de 10 */ |
| 9 |
/* La police fixe de base est une Courrier de 10 */ |
| 10 |
/** Corps */ |
| 11 |
body {background-color: #FFFFFF;
|
| 12 |
font-family : helvetica, arial, sans-serif; |
| 13 |
font-size : 10pt; |
| 14 |
font-weight : normal; |
| 15 |
font-style : normal} |
| 16 |
/* |
| 17 |
*/ |
| 18 |
/** Page de couverture */ |
| 19 |
/* |
| 20 |
--------------------------------------------------------------- |
| 21 |
/ ------------------------------------ |
| 22 |
/ table.coverHeader | td.coverHeaderLeft / td.coverHeaderRight | |
| 23 |
/ ------------------------------------ |
| 24 |
/ |
| 25 |
/ ------------------------------------ |
| 26 |
/ / / |
| 27 |
div.cover / / p.coverTitle / |
| 28 |
/ / / |
| 29 |
/ div.coverTitle ------------------------------------ |
| 30 |
/ / / |
| 31 |
/ / p.coverSubTitle / |
| 32 |
/ / / |
| 33 |
/ ------------------------------------ |
| 34 |
--------------------------------------------------------------- |
| 35 |
|
| 36 |
*/ |
| 37 |
@media print {div.cover {page-break-after:always}
|
| 38 |
div.coverTitle {top : 250pt}}
|
| 39 |
div.cover {margin-bottom : 100pt;
|
| 40 |
text-align : center;} |
| 41 |
table.coverHeader {position : relative;
|
| 42 |
top : 0; |
| 43 |
width : 90%; |
| 44 |
font-size: 12pt; |
| 45 |
font-family : helvetica, arial, sans-serif; |
| 46 |
font-weight: bold} |
| 47 |
table.coverHeader td.coverHeaderLeft {text-align : left}
|
| 48 |
table.coverHeader td.coverHeaderRight {text-align : right}
|
| 49 |
div.coverTitle {position : relative;
|
| 50 |
margin-top : 100pt; |
| 51 |
text-align : center; |
| 52 |
border : solid ; |
| 53 |
margin-left : 20%; |
| 54 |
margin-right : 20%} |
| 55 |
/* Voir h1 */ |
| 56 |
p.coverTitle {text-align : center ;
|
| 57 |
font-size : 20pt ; |
| 58 |
font-weight : bold ; |
| 59 |
font-family : helvetica, arial, sans-serif; |
| 60 |
text-indent : 0pt} |
| 61 |
p.coverSubTitle{text-align : center ;
|
| 62 |
font-size : 16pt ; |
| 63 |
font-weight : normal; |
| 64 |
font-family : helvetica , arial , sans-serif; |
| 65 |
margin-top : 30pt; |
| 66 |
text-indent : 0pt} |
| 67 |
/* ?l?ments "en ligne" */ |
| 68 |
abbr {font-family : helvetica, arial, sans-serif;
|
| 69 |
font-style : normal; |
| 70 |
font-weight : bold} |
| 71 |
/* Identique ? abbr */ |
| 72 |
acronym {font-family : helvetica, arial, sans-serif;
|
| 73 |
font-style : normal; |
| 74 |
font-weight : bold} |
| 75 |
address {font-family : helvetica, arial, sans-serif;
|
| 76 |
font-style : italic; |
| 77 |
margin-left : 20pt; |
| 78 |
margin-right : 20pt} |
| 79 |
blocquote {font-family : helvetica, arial, sans-serif;
|
| 80 |
font-style : italic; |
| 81 |
margin-left : 20pt; |
| 82 |
margin-right : 20pt} |
| 83 |
cite {font-family : helvetica, arial, sans-serif;
|
| 84 |
font-style : italic; |
| 85 |
font-weight : normal} |
| 86 |
/* ? utiliser dans une division de code pour les marges et dans un ?l?ment |
| 87 |
"pre" pour pr?server l'indentation) : div.code->pre->code. */ |
| 88 |
code {font-family : courier, monospace;
|
| 89 |
font-style : normal; |
| 90 |
font-weight : normal} |
| 91 |
div.code {margin-left : 30pt;
|
| 92 |
margin-right : 30pt} |
| 93 |
del {text-decoration : line-through}
|
| 94 |
dfn {font-family: helvetica, arial, sans-serif;
|
| 95 |
font-style: italic; |
| 96 |
font-weight: normal} |
| 97 |
ins {text-decoration : none;
|
| 98 |
background-color : #FFFF00} |
| 99 |
kbd {font-family : times, serif;
|
| 100 |
font-style : italic; |
| 101 |
font-weight : normal} |
| 102 |
pre {}
|
| 103 |
/* ? travailler pour ?viter les guillemets anglo-saxons. */ |
| 104 |
q {}
|
| 105 |
/* On introduit un ?l?ment div.samp pour ajouter le retrait */ |
| 106 |
samp {font-family : courier, monospace;
|
| 107 |
font-style : normal; |
| 108 |
font-weight : normal} |
| 109 |
div.samp {margin-left : 30pt;
|
| 110 |
margin-right : 30pt} |
| 111 |
strong {font-weight : bold}
|
| 112 |
var {font-family : courier, monospace;
|
| 113 |
font-style : italic; |
| 114 |
font-weight: normal} |
| 115 |
/* Span sp?cialis?s. */ |
| 116 |
/* Mot ou expression ?trang?re */ |
| 117 |
span.foreign {font-style : italic}
|
| 118 |
/* ?l?ments de langage : |
| 119 |
- nom de commande ou de programme ; |
| 120 |
- nom de variable, de fonction, de classe, de module ; |
| 121 |
- propri?t@?, param?tre, valeur, champ, objet, nom de balise ; |
| 122 |
- nom de cl? de registre ; |
| 123 |
- mot-cl? d'un langage ; |
| 124 |
. */ |
| 125 |
span.langElem {font-family : helvetica, arial, sans-serif;
|
| 126 |
font-style : normal; |
| 127 |
font-weight : bold} |
| 128 |
/* R?pertoires, fichiers, extensions de fichier (e. g. .jpeg) */ |
| 129 |
span.pathfile {font-family: courier, monospace;
|
| 130 |
font-style : italic; |
| 131 |
font-weight: normal} |
| 132 |
span.urlAddress{font-family : courier monospace;
|
| 133 |
font-style : italic; |
| 134 |
font-weight : bold } |
| 135 |
/* ?l?ments "bloc" */ |
| 136 |
h1 {text-align : center ;
|
| 137 |
font-size : 20pt ; |
| 138 |
font-weight : bold ; |
| 139 |
font-family : helvetica, arial, sans-serif} |
| 140 |
h2 {font-size : 16pt ;
|
| 141 |
font-weight : bold ; |
| 142 |
font-family : helvetica, arial, sans-serif} |
| 143 |
h3 {font-size: 14pt ;
|
| 144 |
font-weight : normal; |
| 145 |
font-family : helvetica, arial, sans-serif; |
| 146 |
margin-left : 10pt} |
| 147 |
h4 {font-size : 12pt;
|
| 148 |
font-family : helvetica, arial , sans-serif; |
| 149 |
font-weight: normal; |
| 150 |
margin-left : 15pt} |
| 151 |
h5 {font-size : 12pt ;
|
| 152 |
font-family : helvetica, arial, sans-serif; |
| 153 |
font-weight : normal; |
| 154 |
font-style : italic; |
| 155 |
margin-left : 15pt} |
| 156 |
h6 {font-size : 10pt;
|
| 157 |
font-family : helvetica, arial, sans-serif; |
| 158 |
font-size : 8pt; |
| 159 |
font-weight : bold; |
| 160 |
font-style : normal; |
| 161 |
margin-left : 15pt; |
| 162 |
text-align : right} |
| 163 |
p {font-size : 10pt;
|
| 164 |
font-family : helvetica, arial, sans-serif; |
| 165 |
margin-left : 20pt; |
| 166 |
margin-right : 20pt; |
| 167 |
text-align : justify ; |
| 168 |
text-indent : 2em} |
| 169 |
/* Listes */ |
| 170 |
ul {font-size: 10pt;
|
| 171 |
font-family: helvetica, arial, sans-serif; |
| 172 |
text-align: justify; |
| 173 |
margin-left: 20pt; |
| 174 |
margin-right: 20pt} |
| 175 |
ol {font-size: 10pt;
|
| 176 |
font-family: helvetica, arial, sans-serif; |
| 177 |
text-align: justify; |
| 178 |
margin-left: 20pt; |
| 179 |
margin-right: 20pt} |
| 180 |
dl {font-size: 10pt;
|
| 181 |
font-family: helvetica, arial, sans-serif; |
| 182 |
margin-left: 20pt; |
| 183 |
margin-right: 20pt} |
| 184 |
dl dt {font-weight: bold}
|
| 185 |
dd {font-size: 10pt;
|
| 186 |
font-family: helvetica, arial, sans-serif; |
| 187 |
text-align: justify; |
| 188 |
margin-left: 10pt} |
| 189 |
/* Tableaux */ |
| 190 |
p.tableCaption {text-align : center ;
|
| 191 |
font-size : 12pt ; |
| 192 |
font-weight : bold ; |
| 193 |
font-family : helvetica, arial, sans-serif; |
| 194 |
text-ident : 0pt } |
| 195 |
table {margin-left: 20pt;
|
| 196 |
margin-right: 20pt} |
| 197 |
/* Deux options pour les cellules titres : soit un ?l?ment en-t?te (avec |
| 198 |
ligne et cellules), soit des ?l?ments cellule en-t?te. */ |
| 199 |
thead tr td {text-align: center;
|
| 200 |
text-indent : 0pt; |
| 201 |
font-size: 10pt; |
| 202 |
font-family: helvetica, arial, sans-serif; |
| 203 |
font-weight: bold} |
| 204 |
th {text-align: center;
|
| 205 |
text-indent : 0pt; |
| 206 |
font-size: 10pt; |
| 207 |
font-family: helvetica, arial, sans-serif; |
| 208 |
font-weight: bold} |
| 209 |
|
| 210 |
td {font-size : 10pt ;
|
| 211 |
font-family : helvetica, arial, sans-serif; |
| 212 |
vertical-align: top; |
| 213 |
padding-left : 1em; |
| 214 |
padding-right : 1em} |
| 215 |
td.numeric {font-size : 10pt ;
|
| 216 |
font-family : Courier New, Courier, monospace; |
| 217 |
font-weight : bold; |
| 218 |
vertical-align: top; |
| 219 |
text-align : right; |
| 220 |
padding-right : 2em} |
| 221 |
td.middle {font-size : 10pt ;
|
| 222 |
font-family : helvetica, arial, sans-serif; |
| 223 |
vertical-align: middle} |
| 224 |
/* Pour ?viter les marges dans les cellules de tableau */ |
| 225 |
td p {font-size : 10pt;
|
| 226 |
font-family : helvetica, arial, sans-serif; |
| 227 |
margin-left : 0pt; |
| 228 |
margin-right : 0pt; |
| 229 |
text-indent : 0} |
| 230 |
/* Introduction ? une (x*sous) section */ |
| 231 |
p.heading {font-size : 10pt;
|
| 232 |
font-family : helvetica, arial, sans-serif; |
| 233 |
font-weight : bold; |
| 234 |
margin-left : 20pt; |
| 235 |
margin-right : 20pt; |
| 236 |
text-align : justify; |
| 237 |
text-indent : 0pt} |
| 238 |
/* Conclusion d'une (*sous-) section */ |
| 239 |
p.footer {font-size : 10pt;
|
| 240 |
font-family : helvetica, arial, sans-serif; |
| 241 |
font-weight : bold; |
| 242 |
margin-left : 20pt; |
| 243 |
margin-right : 20pt; |
| 244 |
text-align : justify; |
| 245 |
text-indent : 0pt} |
| 246 |
/* Illustration */ |
| 247 |
div.illustration {text-align : center;
|
| 248 |
margin : 15pt} |
| 249 |
/* Rien de bien d?fini encore pour ces mod?les (id?e : |
| 250 |
images avec texte ? gauche ou ? droite) */ |
| 251 |
img.right {}
|
| 252 |
img.left {}
|
| 253 |
p.illustrationCaption {font-family : Helvetica, arial, sans-serif ;
|
| 254 |
font-size : 12pt; |
| 255 |
font-weight : bold; |
| 256 |
text-align : center; |
| 257 |
text-indent : 0pt } |
| 258 |
/* Sommaire */ |
| 259 |
ul.summary {font-family : Helvetica , Arial , sans-serif;
|
| 260 |
font-size : 12pt} |
| 261 |
/* Filets horizontaux */ |
| 262 |
hr {}
|
| 263 |
hr.fiftypc {margin-left: 25%;
|
| 264 |
margin-right: 25%;} |
| 265 |
hr.twentypc {margin-left: 40%;
|
| 266 |
margin-right: 40%;} |
| 267 |
/* Notes */ |
| 268 |
/* L'appel de note est r?alis? par un ?l?ment "a" de classe callNote */ |
| 269 |
a.callNote {}
|
| 270 |
/* Le retour de note est r?alis? par un ?l?ment "a" de classe retFromNote */ |
| 271 |
a.retFromNote {}
|
| 272 |
/* Liste des notes proprement dite */ |
| 273 |
ol.notes {margin-left: 0%;
|
| 274 |
margin-right: 0%} |
| 275 |
/* ?lements de navigation */ |
| 276 |
table.navTable {border : none ;
|
| 277 |
width : 100%} |
| 278 |
table.navTable td {width : 20% ;
|
| 279 |
border : none ; |
| 280 |
text-align : center ; |
| 281 |
vertical-align : middle} |
| 282 |
/* ?l?ments divers (? trier)*/ |
| 283 |
/* ?l?ments pour la table des mati?res */ |
| 284 |
div.abstract {font-size : 12pt ;
|
| 285 |
font-style : italic ; |
| 286 |
font-family : Helvetica, Arial , sans-serif ; |
| 287 |
margin-left : 50pt ; |
| 288 |
margin-right : 50pt ; |
| 289 |
margin-top : 15pt ; |
| 290 |
margin-bottom : 10pt ; |
| 291 |
border : solid ; |
| 292 |
padding : 5pt} |
| 293 |
div.abstract p {margin-left : 0pt;
|
| 294 |
margin-right : 0pt; |
| 295 |
text-indent : 0pt} |
| 296 |
div.toc {margin-left : 50pt}
|
| 297 |
ul.toc {font-size : 14pt ;
|
| 298 |
font-family : Helvetica , Arial , sans-serif} |
| 299 |
</style>
|
| 300 |
<title>sageSLZ Notes</title> |
| 301 |
</head>
|
| 302 |
|
| 303 |
<body>
|
| 304 |
<h1>sageSLZ Notes</h1> |
| 305 |
|
| 306 |
<h2>The approximation interval problem</h2> |
| 307 |
|
| 308 |
<p>When Sollya computes an approximation polynomial for a given function,
|
| 309 |
degree and range, it also returns the approximation error (refered to, in the sequel, |
| 310 |
as the |
| 311 |
<span class="langElem">computedError</span> and the center of |
| 312 |
the interval as well). |
| 313 |
</p>
|
| 314 |
|
| 315 |
<p>Very often, we want to solve a slightly different problem: for a given
|
| 316 |
function, degree, lower bound and approximation error (referred to, in the |
| 317 |
sequel, as the |
| 318 |
<span class="langElem">targetError</span> ), compute the |
| 319 |
approximation polynomial and the upper bound of the interval comprised between |
| 320 |
it and the lower bound for which the approximation error stands. |
| 321 |
</p>
|
| 322 |
|
| 323 |
<p>The idea is to break a given initially “large” interval into a |
| 324 |
collection of smaller intervals because for the given function-degree-error the |
| 325 |
initial interval is too large.</p>
|
| 326 |
|
| 327 |
<p>The most naive approach is to:</p> |
| 328 |
<ol>
|
| 329 |
<li>give it a try with the initial data (a very probably too high upper bound
|
| 330 |
for the given <span class="langElem">targetError</span>);</li> |
| 331 |
<li>when you get a too large error, reduce (e. g. divide by 2) the interval by
|
| 332 |
lowering the upper bound until the computed error matches the target |
| 333 |
error;</li>
|
| 334 |
<li>this upper bound becomes the lower bound of the next interval, always
|
| 335 |
using the orginal upper bound and repeat the process until you can cover |
| 336 |
the all initial interval with the computed sub-interval.</li>
|
| 337 |
</ol>
|
| 338 |
|
| 339 |
<p>In step 2 you may have to compute several polynomials until the computed
|
| 340 |
error is below or equal to the expected error. But you must not decrease the |
| 341 |
interval width too agressively: there is no point in getting a too small |
| 342 |
approximation error since it multiplies the number of interval (and |
| 343 |
lengthens the subsequent manipulations that are made on each sub-interval).</p>
|
| 344 |
|
| 345 |
<p>In step 3 you probably inutily compute polynomials for too large intervals
|
| 346 |
and you could know it from the previous computations.</p>
|
| 347 |
|
| 348 |
<p>The whole idea is to reduce the number of polynomial computations and get the
|
| 349 |
maximum width (compatible with the target error).</p>
|
| 350 |
|
| 351 |
<p>This process has different aspects:</p> |
| 352 |
<ol>
|
| 353 |
<li>for a given interval (be it too small or too large) and the given
|
| 354 |
(computed) error, compute the new best upper bound;</li>
|
| 355 |
<li>reuse the computation already done in previous steps.</li> |
| 356 |
</ol>
|
| 357 |
|
| 358 |
<p>We use two strategies.</p> |
| 359 |
<p>The first is in the inner function that computes the first approximation
|
| 360 |
polynomial. If the upper bound is too high, we shrink the interval by a non |
| 361 |
linear (and complex) factor computed from the ratio beetwen the obtained |
| 362 |
error and the target error.<br>The whole idea is not to end up with a too
|
| 363 |
small interval.</p>
|
| 364 |
<p>This only takes into account aspect 1</p>. |
| 365 |
<p>The second strategy is in the outer function. In this function the
|
| 366 |
computed intervals returned by the inner function give all correct |
| 367 |
approximation errors. The computation of next upper bound will take into |
| 368 |
account the value of the previous interval and that of the previous |
| 369 |
computed error.</p>
|
| 370 |
<p>If the errors ratio is lower than 2, we try the same interval length
|
| 371 |
as given by the previous computation. If larger we increase the next |
| 372 |
interval but by a small margin (log2(errorsRatio).</p>
|
| 373 |
|
| 374 |
<p>In this case, aspects 1 and 2 are considered </p> |
| 375 |
|
| 376 |
<p>For the moment, we do not resort to more complex forcasting techniques
|
| 377 |
(using the derivative of the function?). This could be an option if the |
| 378 |
present strategies did not output enough performance. </p>
|
| 379 |
</body>
|
| 380 |
</html>
|