• Aucun résultat trouvé

On Finding program input values maximizing the round-off error.


Academic year: 2022

Partager "On Finding program input values maximizing the round-off error."

En savoir plus ( Page)

Texte intégral


On Finding program input values maximizing the round-off error.

Mohammed Said Belaid 1 , Claude Michel 2 , Yahia Lebbah 3 , Michel Rueher 2


Université des sciences et de la technologie d’Oran,


University of Nice-–Sophia Antipolis, I3S/CNRS,


University of Oran, LITIO Lab.

5 September 2016


1 Introduction

2 Our approach

3 Motivating example

4 A greedy algorithm to maximize round off error

5 Optimizing operation round off error

6 Example

7 Conclusion



Many programs over the floats are written with the semantic of reals in mind


e.g., timer : t = t + 0.1; each tenth of second

0.1 cannot be exactly represented as a binary float

after a while, t absorbs 0.1

Arithmetic over F 6= arithmetic over R


for x ∈ F and y ∈ F, x + y ∈ F / ï requires rounding


rounding ï loss of accuracy : ◦(x) 6= x


rounding occurs on each operation : ◦(◦(x + y ) + z)


rounding accumulation ï might result in a huge difference between R and F

Tools to analyse computations over F are required


CESTAC method : detect instability by randomly changing the rounding direction


FLUCTUAT : abstract interpreter with error domains


Our approach

Goal : finding input values that maximize the distance between R and F Obj : max |f F (x 1 , . . . , x n ) − f R (x 1 , . . . , x n )| with x i ∈ F


i.e., get input values that maximize the round off error


which is a hard global optimization problem

Our approach : a local search based on a greedy algorithm


based on a maximization/minimization of basic operations, e.g. max |(x ⊕ y ) − (x + y )|


use heuristics to propagate optimization directions


assume that a good approximation of the max round off error could be found

knowing local basic operation optima


Motivating example

z = x 2 y 2 with x , y ∈ [0, 2 24 ]

x x

y y

(simple floats and rounding to the nearest even)


Motivating example

z = x 2 y 2 with x , y ∈ [0, 2 24 ]

x x

y y

↑ ↓


Motivating example

z = x 2 y 2 with x , y ∈ [0, 2 24 ]

x x

y y

↑ ↓

x = 12582913, y = 14205109

err = 16777208


A greedy algorithm to maximize Round-off error

Try to compute a good round-off error from a local maximization/minimization of basic operations Sketch of the algorithm


Top/down propagation of maximization/minimization directions


Optimization direction choice based on heuristics


Computes instances of input variables optimizing round off error of basic operations


Computes global round off error

Main issue : optimization of basic operations


Round-off error distribution

Round off error distribution for the subtraction

(positive minifloats, rounding to −∞)


Max round-off error of cx


Let x be a floating-point variable, and c be a floating point constant. Assume that the values of x and c are positive normalized numbers. Let p be the number of bits of the significand and assume that the rounding mode is set to −∞. The maximal rounding error in this floating point product cx can be obtained when :

x = M x · 2 e


−p+1 with 2 p−1M x ≤ 2 p − 1 M xerr 0 · 1

M c 0 [2 p−n


−1 ] , e x = e x ,

where n 0 is the number of least significand zeros M c in the mantissa of c.

M c 0 = M c · 2 −n


. M 1



is the modular inverse of M c 0 .

Other propositions for minimization, ⊕, , ⊗, , negative floats, other

rounding modes.


An example

Rump’s polynomial :

z = 333.75 ∗ y 6 + x 2 ∗ (11 ∗ x 2y 2y 6 − 121 ∗ y 4 − 2) + 5.5 ∗ y 8 + x/(2y )

With 32bits floats, x and y ∈ [32768, 131072] and rounding mode = −∞ :


x = 98304.0078125, y = 131070.9453125


which gives z = 4.30088084155907e41 and err = 3.45526791e35

Rump’s values :


x = 77617 and y = 33096


which gives err = 4.86777830487641e32

However Rump’s relative error is ≈ 6.084722881e33 while ours ≈ 8.033e − 7



A fast and effective greedy algorithm to maximize the round-off error


Preliminary experiments shows a fast and effective algorithm


Computed instances provide a good absolute error

Further works


Cover more basic operations


Improve heuristics


Explore the capability to handle relative error


Use this local search in a complete approach


Open position

An open associate professor position is open in our team

(application in march 2017).

Feel free to contact CP 2016 PC chair ... (a guy called Michel Rueher).


Documents relatifs

Note that the minimization problem can be recast as an inverse problem: given appropriate n 0 , u 0 , w 0 , what is the most likely equilibrium density operator (most likely in

edges in a medial mesh, we also need to define a similar quadratic error term for measuring the distance from a sphere to a medial cone, the volume primitive induced by an edge of

It is, how- ever, a particular kind of update operator and the ternary relation of substructural logics could actually be a representation of any sort of update, including the

These functions can be used in any Fortran code to be compiled with the CADNA library and accept a single precision or a double precision stochastic argument. Both functions

Finally, the algorithm has been applied to real inertial sensors for estimating an error structure whose complexity would make its estimation impossible using classical (i.e. AV, HV

Canadian Counsellor 1-143 Education II Building The University of Alberta Edmonton, Alberta T6G 2E1.. The CANADIAN COUNSELLOR is published quarterly by the Canadian Guidance

Several possibilities can be invoked to explain the low wind momenta observed for the SMC-N81 stars: first, there may be a breakdown of the modified wind momentum-luminosity relation

ML estimation in the presence of a nuisance vector Using the Expectation Max- imization (EM) algorithm Or the Bayesian Expectation Maximization (BEM) algorithm... ML estimation in

Descriptors used for these calculations are HOMO, Dipole moment, molecular connectivity index, Lipinski H-bond donor, Lipinski H-bond acceptor, TPSA, and logP.. Complete Citation

Theorem 5 For all separability criteria mentioned in Section II there exists an entangled state which passes the test while it is arbitrarily far, in trace distance, from

“The Bifunctional Cell Wall Hydrolase CwlT Is Needed for Conjugation of the Integrative and Conjugative Element ICEBs1 in Bacillus Subtilis and B.. Anthracis.” Journal of

There exists a positive real constant C such that for any positive integer n and any deterministic and complete transition structure T of size n over a k-letter alphabet, for

In the expectation, or E-step, the missing data are estimated given the observed data and current estimate of the model parameters... achieved using the conditional

S3FP, FPSDP, … compute an under-approximation of the largest absolute error.. Possible over-approximation

In order to overcome this lack of reasoning capabilities and to enhance the analysis of errors, we propose to incorporate in a constraint solver over floats [18, 10, 1, 11, 12],

Domain of errors Ñ representing possible values of errors Projection functions Ñ filtering of domains of errors Constraints over errors Ñ reasoning on errors Next step:. Find

Since computa ons over F produce errors, mainly due to rounding, the execu on path of a program might be different over F from over R.. Available approxima on tools (Fluctuat,

/ La version de cette publication peut être l’une des suivantes : la version prépublication de l’auteur, la version acceptée du manuscrit ou la version de l’éditeur. Access


Under negative gate bias, injected holes fill these shallow traps and increase the time spent by the majority carrier within the valence band, which results in the observed change

Mro Peckover said that the International Society of' Soil Mechanics and Foundation Engineering had teen f'ormed at the Second International Conf'erence held in Rotterdam in June,

error metrics over 16 corresponding color pair (CCP) data.. sets, including Lam's set, using as starting point

Dans ce contexte, l’inégalité d’Hermite-Hadamard qui on peut dire est le premier résultat fondamental pour les fonctions convexes dé…nies sur un intervalle de nombres réels