• Aucun résultat trouvé

Rigorous enclosure of round-off errors in floating-point computations


Academic year: 2022

Partager "Rigorous enclosure of round-off errors in floating-point computations"

En savoir plus ( Page)

Texte intégral


Rigorous enclosure of round-off errors in

floating-point computations

NSV 2020

Rémy Garcia Claude Michel Michel Rueher

Université Côte d’Azur, CNRS, I3S, France

July 20, 2020




Floating-point numbers

A constraint system to bound round-off errors Rigorous enclosure of round-off errors

Experimentation Conclusion



Motivation 1/22

Program on F written with the semantic ofR F‰R

Computation overF produceerrors

Error analysis tools (Fluctuat, FPTaylor, PRECiSA, . . .) compute an over-approximation of the error

Ñ Computed bounds of error are rarely reachable Other tools (S3FP, FPSDP, . . .) compute an

under-approximation of the largest absolute error Ñ Possibleover-approximation of bounds

None of these tools provides an enclosure of the largest absolute error


Motivating example

Motivation 2/22

Consider the following program that computez and use a conditional to raise an alarm or proceed without it

z = ( 3 ∗ x+y ) /w ;

i f ( z − 10 <= δ) { p r o c e e d ( ) ;

} e l s e {

r a i s e A l a r m ( ) ; }

Critical issue

Is the error on z small enough to avoid raising the alarm when the value ofz isless than or equal to10 onR?


Motivating example (cont.)

Motivation 3/22

Computation is done over 64-bit floating-point numbers with xP r7,9s,yP r3,5s,wP r2,4s, andδ set to 5.32e´15

FPTaylor PRECiSA Fluctuat FErA ez 5.15e-15 5.08e-15 6.28e-15 4.96e-15

Bounds are smallerthanδÑ no alarm for zď10

FErA output an enclosure ofr3.55e´15,4.96e´15s forez with

x“8.99999999999996624922 ex“ ´8.88178419700125232339e´16 y“4.99999999999994848565 ey “ ´4.44089209850062616169e´16 w“3.19999999999998419042 ew “ `2.22044604925031308085e´16 z“10.0000000000000035527 ez “ ´3.55271367880050092936e´15


Motivating example (cont.)

Motivation 4/22

Let us changeδ to 3.55e´15

FErA provides one case where the else branch is taken and input valuesexercising it

x“8.99999999999996624922 ex“ ´8.88178419700125232339e´16 y“4.99999999999994848565 ey “ ´4.44089209850062616169e´16 w“3.19999999999998419042 ew “ `2.22044604925031308085e´16 z“10.0000000000000035527 ez “ ´3.55271367880050092936e´15

Fluctuat, FPTaylor, and PRECiSA areunableto do so, as they only compute anover-approximationof errors


Floats – definition

Floating-point numbers 5/22

F is a finite subset of R 0

´8 `8

R(horizontal line)and F(vertical lines) IEEE 754 floats are represented by

asign amantissa an exponent




Floats – rounding

Floating-point numbers 6/22

Problem: x, yPFÑx¨y RF, where¨is an operation onR Require rounding ˝ of the result to theclosest float

Loss of precision˝pxq usually not equal to x Root of thedivergence between RandF

˝p0.1q “0.100000001490116119384765625 Rounding accumulation

Rounding onall operations˝p˝px¨yq ¨zq Increase thedivergencebetween Rand F

Reduce or cancel an error with error compensation

˝p˝p0.1`0.2q`0.2q“0.5 e“´e«7.4505805969238281e´09


Constraint Programming: overview

A constraint system to bound round-off errors 7/22

Constraint Programming (CP) is a paradigm used for solving NP-completecombinatorial problems

Explicit separation between

modelling, which is a formalisation of the problem, andsolving, that uses dedicated techniques to find a solution


How does CP works?

A constraint system to bound round-off errors 8/22


ACSP pX,D,Cq is defined by:

X is the set of variables D is the set of domains

§ A domain is the set of all possible values for eachxPX C is the set of constraints

§ A constraint is a relation between variables Solving

Filtering, removestrivially inconsistant values from domains of variables in a constraint

§ Propagateto other constraints with common variables Search,selectsa variable andsplits its domain, according to asearch strategy

Ñ The solving process is repeated until a solution is found or when the search space is fully explored


Domain of errors over Q Q Q

A constraint system to bound round-off errors 9/22

Letx be a floating-point variable of a CSP

Domain of values Dx Interval of F Cannot represent the associated error (R F)

Domain of errorsDex Interval of Q Correctly

represents an error For `,´,ˆ,˜


Dx Dex


Filtering – error computation

A constraint system to bound round-off errors 10/22

Compute errors over Q

Exact computationof errors e“ pxR¨yRq ´ pxFdyFq

with ¨an operation over Randd an operation overF (operations are restricted to `,´,ˆ,˜)

Signed errors

Possible compensationof errors


Filtering – domains of variables

A constraint system to bound round-off errors 11/22

Domain of values Dx

Projection functions from [Michel02],[BotellaGM06], and [MarreM10]

Domain of errorsDex Projection functions based onpxR¨yRq ´ pxFdyFq

Error filtering on which constraints?

Arithmetic constraints: `,´,ˆ,˜

Assignement constraint: propagation of the error Example forzx´y

ezÐezX pex´ey`eaq exÐexX pez`ey´eaq eyÐeyX pex´ez`eaq ea ÐeaX pez´ex`eyq


Filtering – operation error

A constraint system to bound round-off errors 12/22


IEEE 754, operations correctly rounded: ‘,a,b,m

pxdyq ´1

2ulppxdyq ďx¨yď pxdyq `1

2ulppxdyq ulp: distance between two consecutive floats

Error on the operation


2ulppxdyq ďedď `1



Constraint over errors

A constraint system to bound round-off errors 13/22

New notation for constraints over errors errpxq ě ϵ

errpxq represent the domain of errors of variablex errpxq PQ,the constraint is overQQQ

Modelize a program as an optimization problem max|errpxq |


Branch-and-bound – schema

Rigorous enclosure of round-off errors 14/22

(branch-and-bound is restricted to`,´,ˆ,˜operations) Computes two bounds of errors:

Dual: upper boundof error,e¯(filtering)

§ over-approximation

Primal: lower boundof error,e˚ (generate-and-test)

§ reachableÑprovides input values

Error maximization directed by search on values explore finite search space inFÑinfer error A maximal error is in general hardto find

Anytime algorithm Ñprovides input values, e˚, and e¯


Stopping criteria

Rigorous enclosure of round-off errors 15/22

Operation error: ed and z result of operation ed ď 1


Ñhighly dependent on the distribution of floats Consider intervalp2n,2n`1q

Distance between two floats is the same All floats have the sameulp

Ñcannotimproveed by means of projection functions

Once results for all operations satisfy this criteria, stop the exploration of this part of the search space


Branch-and-bound – boxes

Rigorous enclosure of round-off errors 16/22

A boxB can be in one of the following three states:


discarded, s.t.eB ďe˚

sidelined, s.t. stopping criteria is true


eS is max eB of sidelined boxes


Bounding – dual computation

Rigorous enclosure of round-off errors 17/22

Computation based on constraint programmingfiltering projection functions

ezÐezX pex´ey`eaq exÐexX pez`ey´eaq eyÐeyX pex´ez`eaq ea ÐeaX pez´ex`eyq

For a boxB

Propagate constraints to filter domains Update e with max between:

eof all boxes

eS of sidelined boxes


Bounding – primal computation

Rigorous enclosure of round-off errors 18/22

Generate-and-test: random instantiation of input variables For each boxB repeatntimes

Randomly instantiate input variables with respect to domains of values

Compute fQpq ´fFpq Local search (m steps):

explore floats around input values

§ guided by the best local value of the error ComputefQpq ´fFpq

ÑUpdatee˚ with best computed error


Branching – explore boxes

Rigorous enclosure of round-off errors 19/22

Variable selection

Choose in round-robinorder a variable xthat is not a singleton

Domain splitting

Apply a bisection on the domain of values of x to generate two subboxes

Box selection

Use best-first searchto select a box B with the greatest upper bound of error


Experimentation – FPBench

Experimentation 20/22

FErA vs.

Fluctuat, Gappa, PRECiSA, Real2Float, Daisy, Rosa, FPTaylor (¯e)

S3FP (e˚)

FErA over-approximation bound Best twice

Second 6 times Never the worst

FErAe˚ ande¯arealmost alwaysin the same order of magnitude FErAsolving timeis reasonable for most of benchmarks

only one bench timeout at 10 minutes



Conclusion 21/22

Rigorous enclosure of round-off errors in floating-point computations

Enclosure of a largest absolute error

Reachable primal Ñprovide inputs values exercising the error

Provides a tighter ¯eÑremoves some false positives


Further work

Conclusion 22/22

Tighter representation of round-off errors on elementary operations

Experimentations with different search strategies More efficient local search to speed up the primal computation procedure


Documents relatifs

This set of optimal bounds is then applied to the rounding error analysis of various numerical algorithms: in all cases, we obtain significantly shorter proofs of the best-known

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

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,

agglomerates, partly elongated and disrupted in the quartz matrix (Fig. Other matrix minerals correspond to those in the layered ore. Magnetite is not hematized.

Unité de recherche INRIA Sophia Antipolis 2004, route des Lucioles - BP 93 - 06902 Sophia Antipolis Cedex France Unité de recherche INRIA Futurs : Parc Club Orsay Université - ZAC

“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

in situ survey off the southwest Grand Banks of Newfoundland in 2007: (a) outcrop, (b) dense large coral cover with Sebastes sp., (c) boulder field with... insolitus field,

For this purpose, on one hand, we establish in Section IV-A upper bounds on the error of approximating a discarded sample with atoms of a dictionary obtained by the distance or

The table shows results from a standard execution in IEEE-754 single precision (float) with rounding to nearest, as well as results obtained with the same program (i.e. the exact

In such case, and considering that all parallel regions (the ones within the cadna init call and the ones in the CADNA instrumented code) have the same number of threads

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

TrkAC mice treated with CYP also developed significant referred allodynia from 4h to 48h compared to WT saline treated mice, but to a smaller extent than WT CYP, as 50%


 On constate alors, de ces observations concernant la prescription du donépézil chez les patients atteints de la maladie d’Alzheimer, que ce dernier en traitement

Dans les espaces publics, les jardins privés, les zones résidentielles et les hôtels : habillée d'un boîtier élégant dont la forme claire et discrète fait appel aux sens,

There are two principal voting methods for electing presidents : one round plurality elections whereby the candidate with the most votes wins, and two round majority runoff

Like the Shiva Gathering, this performative ceremony integrates the past into the present lives of Terraces residents, honouring resident survivors by highlighting the

result the number of signiant digits whih are not aeted by

Key words: rigid body integrator, Jacobi elliptic functions, probabilistic error propagation, long-time integration, compensated summation, quaternion, Discrete