• Aucun résultat trouvé

Bound on Run of Zeros and Ones for Images of Floating-Point Numbers by Algebraic Functions

N/A
N/A
Protected

Academic year: 2021

Partager "Bound on Run of Zeros and Ones for Images of Floating-Point Numbers by Algebraic Functions"

Copied!
23
0
0

Texte intégral

(1)Bound on Run of Zeros and Ones for Images of Floating-Point Numbers by Algebraic Functions Tomas Lang, Jean-Michel Muller. To cite this version: Tomas Lang, Jean-Michel Muller. Bound on Run of Zeros and Ones for Images of Floating-Point Numbers by Algebraic Functions. [Research Report] RR-4045, LIP RR-2000-33, INRIA, LIP. 2000. �inria-00072593�. HAL Id: inria-00072593 https://hal.inria.fr/inria-00072593 Submitted on 24 May 2006. HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.. L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés..

(2) INSTITUT NATIONAL DE RECHERCHE EN INFORMATIQUE ET EN AUTOMATIQUE. Bound on Run of Zeros and Ones for Images of Floating-Point Numbers by Algebraic Functions Tomas Lang , Jean-Michel Muller. No 4045 Novembre 2000. ISSN 0249-6399. ISRN INRIA/RR--4045--FR+ENG. ` THEME 2. apport de recherche.

(3)

(4) Bound on Run of Zeros and Ones for Images of Floating-Point Numbers by Algebraic Functions . Tomas Lang , Jean-Michel Muller Thème 2 — Génie logiciel et calcul symbolique Projet Arénaire Rapport de recherche n˚4045 — Novembre 2000 — 19 pages. Abstract: This paper presents upper bounds on the number of zeros and ones after the rounding bit for algebraic functions. These functions include reciprocal, division, square root, and inverse square root, which have been considered in previous work. We here propose simpler proofs for the previously given bounds given and generalize to all algebraic functions. We also determine cases for which the bound is achieved for square root. As is mentioned in the previous work, these bounds are useful for determining the precision required in the computation of approximations in order to be able to perform correct rounding. Key-words: Algebraic functions, Computer arithmetic, Table Maker’s Dilemma, Correct rounding, Floating-Point Arithmetic.. (Résumé : tsvp). . . Dept. of Electrical and Computer Engineering, University of California at Irvine CNRS, Projet CNRS/ENS Lyon/INRIA ARENAIRE, Ecole Normale Supérieure de Lyon. Unit´e de recherche INRIA Rhˆone-Alpes 655, avenue de l’Europe, 38330 MONTBONNOT ST MARTIN (France) T´el´ephone : 04 76 61 52 00 - International: +33 4 76 61 52 00 T´el´ecopie : 04 76 61 52 52 - International: +33 4 76 61 52 52.

(5) Majoration du nombre de 0 et de 1 consécutifs dans l’écriture binaire de l’image d’un flottant par une fonction algébrique Résumé : Nous donnons des majorations du nombre de zéros ou de uns consécutifs après le bit d’arrondi pour l’image d’un nombre virgule flottante par une fonction algébrique. Des résultats similaires ont été publiés pour l’inverse, la division, la racine carrée et l’inverse de la racine carrée. Nous proposons des preuves plus simples pour ces fonctions et généralisons à l’ensemble des fonctions algébriques. Nous déterminons également des cas pour lesquels la borne est effectivement atteinte pour la racine carrée. Ces bornes permettent de connaître la précision avec laquelle il faut approcher ces fonctions pour en fournir un arrondi correct. Mots-clé : Fonctions algébriques, arithmétique des ordinateurs, Dilemme du fabricant de tables, Arrondi correct, Virgule flottante..

(6) Bound on Run of Zeros and Ones. 3. 1 Introduction This paper presents upper bounds on the number of zeros and ones after the rounding bit for algebraic functions. These functions include reciprocal, division, square root, and inverse square root, which have been considered in previous work [1] [2] [5] [4]. We here propose simpler proofs for the bounds given in [1] and generalize to all algebraic functions. We also determine cases for which the bound is achieved for square root. As already discussed for inverse square root in [1], except for reciprocal, division, square root, and norms, the bounds obtained are not achieved for precisions up to double precision and it is not known if there is a precision for which they are achieved. As is mentioned in the previous work, these bounds are useful for determining the precision required in the computation of approximations in order to be able to perform correct rounding.. 1.1 Basic idea and example Our approach for the bound on the maximum number of zeros is based on the following: 1. Develop a radix-2 digit-recurrence algorithm for the function 1 . Since we are going to use the algorithm to determine the bounds, to simplify this analysis we concentrate on algorithms of the restoring type. 2. Determine a bound on the minimum value of the (non zero) residual after a one in the rounding bit position is computed. 3. Determine the number of consecutive zeros that are produced by this minimum residual. This approach can be used for any function for which a digit recurrence algorithm can be developed. We show that this is possible for the class of algebraic functions. We now develop an example of the use of this procedure and then generalize to the class of algebraic functions. Consider the computation of the cubic root. That is, compute with and operand and result of bits.. . 1.

(7)   . . Note that the implementation of the digit-recurrence algorithm results in a simple method for correct rounding; this is true even in the case in which the result is obtained in signed-digit representation, where the computation of the rounding includes the sign of the final residual. Consequently, with this implementation the bounds presented in this paper are not necessary; however, this implementation might be too complicated or slow, so that other algorithms based on approximations are preferable.. RR n˚4045.

(8) 4. Tomas Lang and Jean-Michel Muller. We define a radix-2 digit-recurrence algorithm that produces one bit of the result each iteration. That, is after iteration the partial result is.   The residual after iteration. is.

(9)  . . . .  . .    . . .   . resulting in the recurrence.    . with  #. . .  

(10)  .    . .      . . .  "! .  . . .  " !. .  " !. (1). . The selection function has to satisfy.  $ &% # 2.  $  is minimum. 1.. Consequently,.  Since. #  (' . . if   ) otherwise. .           "! . .  , and by construction    , we obtain    . Therefore, for *%            "!     "! )+

(11) ,+ .  -.

(12) (2)   /% - ) We now determine a nonzero lower bound on  0  , when 21    . For this we determine the number of fractional bits of

(13)  3  (width of

(14)  3  ). The width of

(15)  4  is the maximum width of the terms in the recurrence. Each of the terms has the Consequently, we get. following width:.  . .   . if. 1. Since

(16)  #  has bits and the effect of this initial value is "shifted" one position left each iteration, the number of bits of the contribution of

(17)  #  is  . 2. The term . .    has 5 fractional bits.. . INRIA.

(18) Bound on Run of Zeros and Ones. 5.      "! has 5$ fractional bits.  "! has 5$  fractional bits. 4. The term   Consequently, the width of  $  is 3. The term .  .  

(19)  . 

(20)    .  5 . . . . 1 . For this is 4 . Consequently, a nonzero lower bound on

(21)  4  is    ! So, how many consecutive 0s in can occur after this minimum

(22)  3  ? Each 0 multiplies the residual by 2. From equation (2) we conclude that a 1 will certainly occur when the value of the residual becomes 4. Consequently 2 ,. . . . . .        We generalize the idea described above to any algebraic function, as defined below. From this generalization, we obtain upper bounds on the maximum runs of zeros and of ones, after the rounding position. The class of algebraic functions includes the functions considered previously. In Section 4, we compare with the previously reported results.. 1.2 Algebraic functions We generalize the idea described above to any algebraic function. An Algebraic Function  is a function for which there exists a -variable polynomial  with integer coefficients such that. (3)      #. . . . . . Examples are:.  

(23)  , with        ;. Square roots   , with         ;. Roots   , with        ;. Square root reciprocal 

(24)   , with         ;       , with            ; Norms .  Normalization 

(25)   !  , with             Division, reciprocation. 2. In Section 3 we analize whether this bound is achieved. RR n˚4045.  ;.

(26) 6. Tomas Lang and Jean-Michel Muller.

(27)     . .  . Throughout the paper, we assume that we perform calculations in an -bit binary number and . The generalization to other system. We assume that ranges is discussed later. We also assume that, in the considered domain of computation the    is decreasing (Otherwise, if the considered domain is narrow enough function so that this function is monotonic, it suffices to exchange  and   .), and that. . .

(28)  .      .

(29)     . #. (4). To illustrate the development we use as running example the function . The corresponding polynomial is.   . with.       . 1.3 Radix-2 restoring digit-recurrence algorithm for algebraic function As indicated before, at step of a digit-recurrence algorithm we have already computed.   We define a residual.   as.  #       

(30)  . . .  . . . .         . (5). Since the representation of is non-redundant (restoring algorithm), the sequence   goes to. if and only if :.  2    " !   (' # if otherwise. Since the function     is decreasing, (6) is equivalent to.      2   " !    (' # if otherwise . (6). % #. (7). INRIA.

(31) Bound on Run of Zeros and Ones. In order to use (7), let us evaluate.     .   . . .  "!  . We have.             "!     .               

(32)                            

(33)      .   . 7. . . .   "!  .   . Note that this is the definition of !*  . Consequently, the selection function and the next residual are computed as follows:. #. 

(34)  /% *!   # If 

(35)   $  !*  If. For our example. then. . then. .     #. and  $.   and  $ .  

(36)   "  !*   

(37)  . !   &%   '  #       " !     . 2 Longest run of zeros and of ones for algebraic functions 2.1 Longest run of zeros starting from bit ( 1 .  .. As indicated before, we proceed as follows: 1. Determine a lower bound on the (non-zero) value of

(38) . .    when 21 .   .. 2. Use the selection function to determine an upper bound on the number of consecutive zeros. Let us now determine the smallest possible nonzero value of

(39)   . As said in the introduction,  is a -variable polynomial with integer coefficients. Define ) +* as the coefficient of  * in  , so that . . .      ) +*   * and , +* as the largest integer such that - ) +* - % .0/21 (with , +* not defined for ) +*  # ). Since  is an  -bit normalized1 fraction and   is a -bit normalized fraction, the term *    *  ) +*  is a multiple of 3.0/1 . Hence, if we define 4  as. (8) 4   68 5 * 7 , +*  9  3:  RR n˚4045.

(40) 8. Tomas Lang and Jean-Michel Muller.          , if not equal to zero, is larger or equal to   . In particular,

(41) 1         &%       # )   so that ,   ,   For our example )   and. 4 1    %    then  . Now we use the selection function to determine the maximum number of zeros. This is based on the following two properties:.   # then  $      2. When 

(42)   % !*  then    .  Consider that zeros occur after 1    . Then, from the lower bound of

(43)   obtain    1 

(44)               &%   Since the value 1     is still zero, we must have  !     

(45)     $ 1. If. . which implies.   1 . . . .  $!* .    

(46) !*         

(47)  !*      1   657 . Hence, resulting in where. . 4. .  * , +*. 9. . . . .   . (9). 41  . .  . . .    we. . 41 . (10). : . This expression for is not useful because of the in the right-hand side. To avoid this we  replace !*    by its maximum value for %  . As we will see in the applications, in the practical cases this can be replaced by the maximum of the first partial derivative. For our example . .  . !*  &%   '  #     " !     

(48) * !    &%. so that Hence the bound is. . . $. . .  . %       -     -   +. INRIA.

(49) Bound on Run of Zeros and Ones. 9. 2.2 Longest run of ones. . The longest run of ones starting from position  previous results, by noticing that a run of ones in . 2.3 Longest runs starting in bit ( 1 .  in  .  can easily be deduced from the. is a run of zeros in     .. . These runs are used for the directed rounding modes. Since our approach can be used for runs starting at any position, a similar analysis as before shows that the bound for this case is. . !   

(50)  *. 2.4 General ranges. . .  . . . . 41. (11).    

(51)    

(52)                      . Up to now we have assumed that and  .  For the general   case, we  subdomains such that  split the domain into and for . Then    #, and  . If  each subdomain we applythe theorem with.     # . This       , ONCE MULTIPLIED by the we then have  right power of 2 so that it has integer coefficients that are as small as possible (if they are not the smallest possible, the bounds are not wrong, they just are rougher) is a new polynomial     that is used for the theorem.  (so For instance, consider the reciprocal function . We have   for  # ) and (so  , we get ). Since .  . . RR n˚4045. .  .   

(53)  .         )      ,   )    ,   # 1. 4 1             

(54)     &%  " !" !*     

(55) !*    .                 . . . .

(56) 10. Tomas Lang and Jean-Michel Muller. 2.5 Application to some usual functions 2.5.1. Reciprocal. This is illustrated in the previous section, resulting in.  2.5.2. .  . (12). Division.

(57)      , we have to consider two cases: #    . In this case

(58)   so.     4  )     ,   #    ,    )  . 4 1    #$           !*   

(59) !*     (13)  #           #   . In this case    . So,     and we have the same bound as for the. For division.  

(60) . and. reciprocal.. 2.5.3. Square root. .        )     ,   # )    , #  #. 41       . !*     2    "! 

(61) !*    .   . . . .  . .    . (14). INRIA.

(62) Bound on Run of Zeros and Ones. 2.5.4. :. root.  2.5.5. . .      * ) *    , *  # )      ,    #. 4 1        : !    :  2    

(63) * !     :. :          :    :     :    . 11. Inverse square roots. To obtain results that are valid for any floating-point input, we must find results for longing to two consecutive binades. Hence, we consider two cases:. . (15). be-.  

(64)     ,   )

(65)     . This corresponds to the case of floating-point inputs in intervals of the form         . We get.      3-   )   ,   # )   -  ,   .    57 #           4 1    68 5 * 7 , +*   9     : !*            

(66) !*     .   

(67)               (16)   # 

(68)    ,    

(69)    . This corresponds to the case of floating-point inputs in  intervals of the form         . We get.        . #. and we easily deduce the same bound as in the previous case.. RR n˚4045.

(70) 12. 2.5.6. Tomas Lang and Jean-Michel Muller. Norms. The bound is the same as for square root, namely,. .  . . 2.6 Normalization of 2-D vectors The function to compute is The algebraic function is Then.  

(71)      .      . (17).

(72)      . for.    .  . )   )    ,   , )      ,      .  5 7 #$    #$           41   6 !           

(73) * !     .  . . . . .  -. . .  ..

(74)  . resulting in.  .  . #.     . #.    .  -. . . . . (18). 3 Actual maxima for some functions . In the previous section, we have obtained bounds on . It is worth considering whether these bounds are attained or not.. 3.1 Reciprocal For this function it is easy to find a1 case that attains the bound for 1 the run 1 of zeros. Namely,   for if     . Since this is we get and the next 1 in larger than 1, it is necessary to normalize resulting in a 1 in position    consecutive zeros. position  . Consequently, there are For the run of ones it can be shown that 1 it is attained1 for odd. Namely, for   1 "!   1 results in "!     1 . This can be easily  . 1 !  shown by defining    .  "!  and obtaining the Taylor expansion of ,+ . For even, by exhaustive search, we found that the bound is not attained for.

(75)                . 

(76)              

(77) .  .   .

(78) . INRIA.

(79) Bound on Run of Zeros and Ones. 13. 3.2 Division For the run of zeros the same case reciprocal applies. For the 1  as for 1 1 run of 1 ones consider     ) the case :  . Then,  1 with   and  defining   , the quotient )  is    1      1     with Taylor expansion  !    !   '  . Hence )  $     . So its first bits are: 1.100000..0 ( bits) 0 (round bit) 1111111...1 (  ones) 000... .

(80). 

(81)  .  .   . .

(82)

(83) . . .  .  

(84) .  . .   . 3.3 Square root. .   .  . Here we show that the actual maximum number of consecutive zeros after 1  is We first tighten the bound and then show the existence of a case that satisfies this bound. From the bound obtained in the previous section we get. .      % Moreover, since 1. .    . . . 1  " !  1    " !.  .    . (19). (rounding bit), we obtain from the recurrence. 1               "! 1 Replacing   by its definition (           ) results in 1  1  1                "!     "! 1 1 Calling     (integer) and       (integer) we get 1   !   - 1       -      1. Since  and     are even we get . resulting in.  $ %  %. with. 1 1      . RR n˚4045. and. . 1.   . . 1    "! and consequently.      .  1. (21). (22). . That is, the minimum residual is bounded by  Now we need to show that this bound is achieved. Making . 1   . (20). . (23).  . in (22) we get. . ..

(85) 14. Tomas Lang and Jean-Michel Muller. We now need to show that this equation has an integer solution in the range of  and . It is possible to prove by induction the following solution recurrence:.                        .  .  .  If  is odd THEN        If even THEN.      "!  Moreover,       by induction that these  values are inside the range: Now we can prove       If then.    for  odd  (inside the range)  ) )   &          for  even  (inside the range).. Similarly, we can show that  is inside the required range. As a consequence, there is always a solution inside the range and the bound is achieved. This method can also be used to obtain an example, even for large precision. For in- ) the values are (in hex) stance for quad precision ( a = ‘30720461FD6E2F325A24E31B39FA5‘ b = ‘24ABD1B29988F5099209B6D03CC18‘ (obtained very fast with Maple).  Finally, for the run of ones two simple cases that achieve  are  #  #### ##### . and.          .   .  . .             .   . .   .   .     . 3.4 Cube root The case of cube root seems quite different from square roots. We have not found a “general formula” for the worst case. For small values of , we have performed an exhaustive search, the result of which is given in Table 1.. . 3.5 Inverse square root. . As for cube roots, we have not found a general formula for the maximum value. Using   an analysis similar to that of square root we obtain that the minimum residual  1    is given by the expression. . . . .   1       2  . Using this formula, by exhaustive search, we have found the worst cases for from - to # , and for -   and % (see Table 2). For # , we have used a Maple program. .   . .   . . INRIA.

(86) Bound on Run of Zeros and Ones. 15. Table 1: Worst cases for cube roots for   

(87)  .    

(88)  .  . .   . 

(89) .     .    

(90)   .   

(91)  . .   .  

(92)      . 

(93) .    . . from - to. . . (binary). #.  .  .   

(94)  . .   

(95) .   . .

(96) . 

(97) . .     . .   

(98)  

(99) .            . .   

(100)  

(101)   .      .

(102) 

(103)           .

(104) .   

(105)     .   

(106)  

(107) 

(108) .   

(109) .   

(110)   

(111)  .   .  

(112) 

(113) 

(114)         .   . . .   . 

(115) 

(116)  

(117) 

(118)  .     .   

(119) .

(120)           . .

(121) .   .

(122)  

(123)   .   . 

(124) 

(125)  

(126)   .  .   .  

(127) . 

(128) . . .   .  .    .   

(129)   

(130) . .

(131)  .  .   .  

(132)   

(133) . . .   

(134)  

(135) 

(136) . .

(137) .   

(138) 

(139)   

(140) .

(141)  . .   

(142)  

(143)  

(144) .  .     

(145)    .

(146) ". .      .

(147)    

(148) .   

(149)  .   

(150) 

(151) .

(152) 

(153) .

(154) .   

(155)   . .     .   .  .

(156)  .

(157) 

(158) . .   . . 

(159)   

(160)  . .   .

(161) . . . . 

(162)   . . . . . 

(163)  !. 

(164) .  $

(165) 

(166) %  $ 

(167) &

(168)   ""

(169) 

(170)    

(171)  

(172) 

(173)  . 

(174)    .  .   

(175)   

(176)    .

(177) 

(178)   "    '. . . .  #. .   (. and for the larger values of , we have used a dozen of workstations in parallel during a few days, running a program implementing the algorithm presented in [3] 3 Note that there ()  #     and ) for which the worst cases. are many values of (at least, #   , where 9 is an even exponent (in Table 2, this corresponds to the are # values of the form 11.1111. . . 110)..     . . .  . .  . 3.6 Norms. . The square root, cube root or square root reciprocal of an -bit number is never exactly halfway between two consecutive -bit numbers. This is no longer true when we consider  norms. The difference with square root is due to the fact that for the norm can be larger than 1 and because    has bits. For instance, consider the % -bit binary # # #  and  # ##. . A straightforward calculation numbers    %  ### . shows that *   We now show that the bound  is achieved. We follow the same approach as for square root. Namely, similarly to (21), we have. . .     

(179)      

(180)      . 3. We thank Vincent Lefèvre for the help with this.. RR n˚4045. .

(181) .

(182)   .  .

(183) 16. Tomas Lang and Jean-Michel Muller. Table 2: Worst cases for inverse square roots for from - to # ,and for .- (which obviously suffices to deduce all worst cases). and. .  .   .   . 

(184)  .               

(185)   * .  (binary)  

(186)    

(187)  

(188) 

(189) 

(190)    

(191) 

(192) 

(193)  

(194)       

(195)     

(196)      

(197)      

(198)      

(199) 

(200)

(201) 

(202) 

(203) 

(204)  

(205) 

(206)    

(207)

(208) 

(209) 

(210) 

(211) 

(212) 

(213) 

(214) 

(215)    

(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)  

(261)

(262) 

(263)  

(264)

(265) 

(266) 

(267)

(268) 

(269) 

(270) 

(271) 

(272) 

(273)  

(274) 

(275) 

(276)   

(277) 

(278) 

(279)  

(280) 

(281) 

(282) 

(283)

(284) 

(285) 

(286) 

(287)

(288)

(289)

(290) 

(291) 

(292) 

(293)  

(294) 

(295) 

(296)  

(297) 

(298) 

(299)

(300) 

(301). 1      . Calling now            1 1       .. with recurrence:. .   - .    

(302)  

(303)

(304) 

(305) 

(306) 

(307) 

(308) 

(309)  

(310) 

(311)

(312) 

(313) 

(314) 

(315)

(316) 

(317) 

(318)

(319) 

(320)  

(321) 

(322)

(323)  

(324)

(325) 

(326)

(327) 

(328) 

(329)

(330) 

(331) 

(332)  

(333) 

(334)  

(335) 

(336)

(337) 

(338)

(339) 

(340) 

(341) 

(342)

(343) 

(344) 

(345)

(346) 

(347)

(348) 

(349)  

(350) 

(351) 

(352) 

(353) 

(354)

(355)    

(356) 

(357) 

(358) 

(359)  

(360) 

(361)

(362) 

(363)

(364) 

(365) 

(366)

(367) 

(368) 

(369) 

(370)

(371) 

(372) 

(373) 

(374)

(375) 

(376) 

(377) 

(378)  

(379) 

(380)

(381) 

(382)

(383) 

(384) 

(385)

(386) 

(387) 

(388) 

(389)

(390) 

(391) 

(392) 

(393)

(394) 

(395) 

(396) 

(397)

(398) 

(399)  

(400) 

(401)

(402) 

(403)

(404) 

(405) 

(406)

(407) 

(408)

(409) 

(410) 

(411) 

(412) 

(413) 

(414)

(415) 

(416) 

(417) 

(418) 

(419) 

(420)

(421) 

(422)

(423) 

(424)  

(425) 

(426)

(427) 

(428)

(429) 

(430) 

(431)

(432) 

(433)

(434) 

(435) 

(436) 

(437) 

(438) 

(439)

(440) 

(441) 

(442) 

(443) 

(444) 

(445)

(446) 

(447)

(448) 

(449)  

(450) 

(451)

(452) 

(453)

(454) 

(455) 

(456)

(457) 

(458)

(459) 

(460) 

(461) 

(462) 

(463) 

(464)

(465) 

(466) 

(467) 

(468) 

(469) 

(470)

(471) 

(472) 

(473)  

(474) 

(475) 

(476)  

(477)   

(478)  

(479)  "!#

(480) 

(481) $

(482)  

(483) 

(484)

(485) 

(486) 

(487) 

(488)

(489) 

(490)

(491) 

(492)

(493) 

(494) 

(495) "%&

(496)  $

(497)  

(498) 

(499) 

(500)

(501)   

(502) 

(503) ('&

(504)

(505) 

(506) )

(507)  

(508) 

(509)

(510) 

(511)  

(512)

(513) 

(514) 

(515) 

(516)  

(517) *(+,

(518) -

(519)  

(520) 

(521)

(522) 

(523)

(524) 

(525) 

(526)

(527) 

(528)

(529) 

(530) 

(531)

(532) 

(533) 

(534) 

(535)

(536) 

(537) *".

(538)

(539) )

(540)  

(541)

(542)  

(543) 

(544) 

(545)

(546) 

(547) 

(548)

(549) 

(550) 

(551) /10,

(552) 

(553) )

(554)   

(555) 

(556) 

(557)

(558)  

(559) 

(560)  

(561) /#2

(562) 

(563) 

(564) 3

(565)  

(566) 

(567) 

(568) 

(569)

(570) 

(571) 

(572) 

(573)

(574) 

(575) 

(576) 

(577) 

(578) 

(579) 

(580) /1.(

(581) 

(582)

(583) )

(584)   

(585)

(586) 

(587)

(588) 

(589) 

(590)  

(591)  

(592) 

(593) 

(594) 

(595) 

(596) 

(597) 

(598) 

(599) 01/&

(600) -

(601)  

(602)

(603) 

(604) 

(605) 

(606) 

(607)  

(608) 

(609) 

(610) 

(611)

(612) 

(613) 

(614)

(615) 

(616) 

(617) 

(618) 

(619) 

(620) 

(621)

(622) 

(623) 

(624)

(625) 

(626) 

(627) 

(628) 

(629) 

(630) 

(631) '1."

(632) 

(633) 

(634) 3. and. %. . .      . 

(635)  .            

(636)   *  . 1  1        " !    "! 1 (integer) and      (integer) we get       .        . An integer solution inside the range is given by the following.     %.  .  . INRIA.

(637) Bound on Run of Zeros and Ones. 17. .            . .   . .  . .    2 . This produces the following examples (in hex): for quad (n=113) a[113] = ‘15555555555555555555555555555‘ b[113] = ‘1C71C71C71C71C71C71C71C71C71CE38E38E38E38E38E38E38E38E390‘ for double (n=53) a[53] = ‘15555555555555‘ b[53] = ‘1C71C71C71C71CE38E38E38E390‘. 3.7 Normalization of . vectors. . is Table 3 shows the actual values of for from 3 to 10. Although the bound of   far from achieved, there are some values which are significantly larger than , which is the value expected by probabilistic considerations..  . .  . Table 3: Worst cases for normalization of 2D-vectors  for from  to # , with .. . .   .   . 

(638).  (binary)

(639)   

(640)  

(641) 

(642)

(643)   

(644) 

(645) 

(646)  

(647) 

(648) 

(649)

(650) 

(651)

(652)   

(653)  

(654)  

(655) 

(656) 

(657)  

(658)

(659)   

(660) 

(661) 

(662)

(663) 

(664) 

(665)   

(666) 

(667) 

(668) 

(669) 

(670)

(671). 

(672)  (binary) 

(673) .

(674)  

(675)

(676) 

(677)

(678)  

(679) 

(680) 

(681)  

(682) 

(683) 

(684)

(685)  

(686) 

(687) 

(688)

(689)  

(690) 

(691) 

(692) 

(693)

(694)

(695)   

(696)  

(697)

(698) 

(699)

(700)     .  . . .  . (that is, function. 

(701)  .  .  . /     /

(702)   

(703) 

(704) 

(705)

(706) 

(707) 

(708) 

(709) $

(710)   

(711) 

(712)

(713)   

(714) 

(715)  

(716)   

(717) 

(718)

(719) 

(720) 

(721) 

(722)

(723) 

(724)

(725) 

(726) 

(727) 

(728) 

(729)  

(730) 

(731) 

(732) 

(733)

(734)    

(735)  

(736) )

(737)   

(738) 

(739) 

(740) 

(741)     

(742) 

(743) 

(744)  

(745) 

(746) 

(747) 

(748) 

(749) 

(750)

(751) 

(752) 

(753)

(754) 

(755) 

(756) 

(757)

(758) 

(759) 

(760)

(761) 

(762) 

(763) 

(764)  

(765) 

(766)

(767) 

(768) 

(769)     

(770) 

(771) 

(772) 

(773)  

(774) 

(775)

(776) 

(777) 

(778) 

(779)     

(780) 

(781) . ).   .  .    .  . 4 Comparison with results given in [1] and conclusions Table 4 shows a comparison with the results reported in [1]. As can be seen the specific results are essentially the same, with minor differences for reciprocal, square root, and inverse square root. As indicated, we provide expressions for the bound for the class of algebraic functions.. RR n˚4045.

(782) 18. Tomas Lang and Jean-Michel Muller. Table 4: Comparison with results given in [1] Function.       . I-M. Reciprocal Division Square root Inv. square root Norm q-root 2D normalization algebraic. – – – –. . .  . run of ones Our  (n odd)  (n even)        /     /.           

(783) 

(784)       

(785)      "!  

(786)         . run of zeros I-M Our  .        – – – –. .  .          .   . . . (same)   (same). The main issue that is still pending is to obtain better bounds for those cases, such as inverse square root, for which the bounds are far from being achieved for specific values of and show whether they are achieved for some . In Section 1.3 we have given a radix-2 restoring digit-recurrence algorithm for algebraic functions. As is well known for division and square root, this can be extended by the use of a redundant digit set for  (usually signed-digit) to simplify the selection function. Then, the arguments of the selection function are low precision estimates of the residual and of !   . The feasability of the corresponding implementation depends on the complexity of the selection function and of the computation of !*  .. . . INRIA.

(787) Bound on Run of Zeros and Ones. 19. References [1] C. S. Iordache and D. W. Matula, Infinitely Precise Rounding for Division, Square root, and Square Root Reciprocal, Proc. 14th IEEE Symp. on Computer Arithmetic, 1999, pp. 233-240. [2] V. Lefevre, J-M. Muller, and A. Tisserand, Towards Correctly Rounded Transcendentals, Proc. 13th IEEE Symp. on Computer Arithmetic. 1997, pp. 132-137. [3] V. Lefevre and J-M. Muller, Worst Case for Correct Rounding of the Elementary Functions in Double Precision, submitted to ARITH15. [4] P. W. Markstein, Computation of elementary Functions on the IBM RISC System/6000 Processor, IBM J. Res. Develop., vol. 34, no. 1, Jan. 1990, pp. 111-119. [5] M. Schulte and E.E. Swartzlander, Exact Rounding of Certain Elementary Functions, 11th Symp. on computer Arithmetic, 1993, pp. 138-145.. RR n˚4045.

(788) Unit´e de recherche INRIA Lorraine, Technopˆole de Nancy-Brabois, Campus scientifique, ` NANCY 615 rue du Jardin Botanique, BP 101, 54600 VILLERS LES Unit´e de recherche INRIA Rennes, Irisa, Campus universitaire de Beaulieu, 35042 RENNES Cedex Unit´e de recherche INRIA Rhˆone-Alpes, 655, avenue de l’Europe, 38330 MONTBONNOT ST MARTIN Unit´e de recherche INRIA Rocquencourt, Domaine de Voluceau, Rocquencourt, BP 105, 78153 LE CHESNAY Cedex Unit´e de recherche INRIA Sophia-Antipolis, 2004 route des Lucioles, BP 93, 06902 SOPHIA-ANTIPOLIS Cedex. ´ Editeur INRIA, Domaine de Voluceau, Rocquencourt, BP 105, 78153 LE CHESNAY Cedex (France) http://www.inria.fr ISSN 0249-6399.

(789)

Figure

Table 1: Worst cases for cube roots for  from - to  # .  (binary)                                                                                                      !            "   #             $ %             $ &           ""
Table 2: Worst cases for inverse square roots for  from - to  # ,and for    -    and % and   .- (which obviously suffices to deduce all worst cases).
Table 3: Worst cases for normalization of 2D-vectors
Table 4: Comparison with results given in [1]

Références

Documents relatifs

L’accès à ce site Web et l’utilisation de son contenu sont assujettis aux conditions présentées dans le site LISEZ CES CONDITIONS ATTENTIVEMENT AVANT D’UTILISER CE SITE WEB.

The purpose of this study was to setup the upgrade of microradiography from high resolution radiographic films to a digital detector, and to quantify the image quality (in terms

Nos résultats sont en partie en accord avec la modélisation de la santé mentale des étudiants allemands, ainsi on trouve que le stress est corrélé positivement

A symmetric function is called Schur nonnegative if it is a linear combination with nonnegative coefficients of the Schur functions, or, equivalently, if it is the

Within this context, the purpose of our study was to (1) use our 2018 (post-disturbance, baseline) dataset to verify the use and potential of the ABI within the Maldives; (2) to

In the Inner Faflertal, a side valley of the Lötschental, the 200 m thick syncline comprises four units, the Gastern massif with a reduced Mesozoic sedimentary cover in a

En comparaison à une population de référence, la qualité de vie des patients de la présente étude était ainsi nettement plus détériorée pour la fonction émotionnelle

In other words, where the basic floating- point operator ( +, −, ×, /, √ ) is typically 10 times slower on an FPGA than its PC equivalent, an elementary function will be more than