5,470 research outputs found

    A certified infinite norm for the implementation of elementary functions

    Get PDF
    The version available on HAL is slightly different from the published version because it contains full proofs.International audienceThe high-quality floating-point implementation of useful functions f : R -> R, such as exp, sin, erf requires bounding the error eps = (p-f)/f of an approximation p with regard to the function f. This involves bounding the infinite norm ||eps|| of the error function. Its value must not be underestimated when implementations must be safe. Previous approaches for computing infinite norm are shown to be either unsafe, not sufficiently tight or too tedious in manual work. We present a safe and self-validating algorithm for automatically upper- and lower-bounding infinite norms of error functions. The algorithm is based on enhanced interval arithmetic. It can overcome high cancellation and high condition number around points where the error function is defined only by continuous extension. The given algorithm is implemented in a software tool. It can generate a proof of correctness for each instance on which it is run

    Certifying floating-point implementations using Gappa

    Full text link
    High confidence in floating-point programs requires proving numerical properties of final and intermediate values. One may need to guarantee that a value stays within some range, or that the error relative to some ideal value is well bounded. Such work may require several lines of proof for each line of code, and will usually be broken by the smallest change to the code (e.g. for maintenance or optimization purpose). Certifying these programs by hand is therefore very tedious and error-prone. This article discusses the use of the Gappa proof assistant in this context. Gappa has two main advantages over previous approaches: Its input format is very close to the actual C code to validate, and it automates error evaluation and propagation using interval arithmetic. Besides, it can be used to incrementally prove complex mathematical properties pertaining to the C code. Yet it does not require any specific knowledge about automatic theorem proving, and thus is accessible to a wide community. Moreover, Gappa may generate a formal proof of the results that can be checked independently by a lower-level proof assistant like Coq, hence providing an even higher confidence in the certification of the numerical code. The article demonstrates the use of this tool on a real-size example, an elementary function with correctly rounded output

    Optimizing polynomials for floating-point implementation

    Get PDF
    The floating-point implementation of a function on an interval often reduces to polynomial approximation, the polynomial being typically provided by Remez algorithm. However, the floating-point evaluation of a Remez polynomial sometimes leads to catastrophic cancellations. This happens when some of the polynomial coefficients are very small in magnitude with respects to others. In this case, it is better to force these coefficients to zero, which also reduces the operation count. This technique, classically used for odd or even functions, may be generalized to a much larger class of functions. An algorithm is presented that forces to zero the smaller coefficients of the initial polynomial thanks to a modified Remez algorithm targeting an incomplete monomial basis. One advantage of this technique is that it is purely numerical, the function being used as a numerical black box. This algorithm is implemented within a larger polynomial implementation tool that is demonstrated on a range of examples, resulting in polynomials with less coefficients than those obtained the usual way.Comment: 12 page

    Rigorous approximation of diffusion coefficients for expanding maps

    Get PDF
    We use Ulam's method to provide rigorous approximation of diffusion coefficients for uniformly expanding maps. An algorithm is provided and its implementation is illustrated using Lanford's map.Comment: In this version Lanford's map has been used to illustrate the computer implementation of the algorithm. To appear in Journal of Statistical Physic

    Certified and fast computation of supremum norms of approximation errors

    Get PDF
    The version available on HAL corresponds to the version initially submitted to the conference and slightly differs from the published version since it does not account for remarks made by the referees.International audienceIn many numerical programs there is a need for a high-quality floating-point approximation of useful functions f, such as exp, sin, erf. In the actual implementation, the function is replaced by a polynomial p, leading to an approximation error (absolute or relative) epsilon = p-f or epsilon = p/f-1. The tight yet certain bounding of this error is an important step towards safe implementations. The main difficulty of this problem is due to the fact that this approximation error is very small and the difference p-f is highly cancellating. In consequence, previous approaches for computing the supremum norm in this degenerate case, have proven to be either unsafe, not sufficiently tight or too tedious in manual work. We present a safe and fast algorithm that computes a tight lower and upper bound for the supremum norms of approximation errors. The algorithm is based on a combination of several techniques, including enhanced interval arithmetic, automatic differentiation and isolation of the roots of a polynomial. We have implemented our algorithm and timings on several examples are given

    Verified compilation and optimization of floating-point kernels

    Get PDF
    When verifying safety-critical code on the level of source code, we trust the compiler to produce machine code that preserves the behavior of the source code. Trusting a verified compiler is easy. A rigorous machine-checked proof shows that the compiler correctly translates source code into machine code. Modern verified compilers (e.g. CompCert and CakeML) have rich input languages, but only rudimentary support for floating-point arithmetic. In fact, state-of-the-art verified compilers only implement and verify an inflexible one-to-one translation from floating-point source code to machine code. This translation completely ignores that floating-point arithmetic is actually a discrete representation of the continuous real numbers. This thesis presents two extensions improving floating-point arithmetic in CakeML. First, the thesis demonstrates verified compilation of elementary functions to floating-point code in: Dandelion, an automatic verifier for polynomial approximations of elementary functions; and libmGen, a proof-producing compiler relating floating-point machine code to the implemented real-numbered elementary function. Second, the thesis demonstrates verified optimization of floating-point code in: Icing, a floating-point language extending standard floating-point arithmetic with optimizations similar to those used by unverified compilers, like GCC and LLVM; and RealCake, an extension of CakeML with Icing into the first fully verified optimizing compiler for floating-point arithmetic.Bei der Verifizierung von sicherheitsrelevantem Quellcode vertrauen wir dem Compiler, dass er Maschinencode ausgibt, der sich wie der Quellcode verhält. Man kann ohne weiteres einem verifizierten Compiler vertrauen. Ein rigoroser maschinen-ü}berprüfter Beweis zeigt, dass der Compiler Quellcode in korrekten Maschinencode übersetzt. Moderne verifizierte Compiler (z.B. CompCert und CakeML) haben komplizierte Eingabesprachen, aber unterstützen Gleitkommaarithmetik nur rudimentär. De facto implementieren und verifizieren hochmoderne verifizierte Compiler für Gleitkommaarithmetik nur eine starre eins-zu-eins Übersetzung von Quell- zu Maschinencode. Diese Übersetzung ignoriert vollständig, dass Gleitkommaarithmetik eigentlich eine diskrete Repräsentation der kontinuierlichen reellen Zahlen ist. Diese Dissertation präsentiert zwei Erweiterungen die Gleitkommaarithmetik in CakeML verbessern. Zuerst demonstriert die Dissertation verifizierte Übersetzung von elementaren Funktionen in Gleitkommacode mit: Dandelion, einem automatischen Verifizierer für Polynomapproximierungen von elementaren Funktionen; und libmGen, einen Beweis-erzeugenden Compiler der Gleitkommacode in Relation mit der implementierten elementaren Funktion setzt. Dann demonstriert die Dissertation verifizierte Optimierung von Gleitkommacode mit: Icing, einer Gleitkommasprache die Gleitkommaarithmetik mit Optimierungen erweitert die ähnlich zu denen in unverifizierten Compilern, wie GCC und LLVM, sind; und RealCake, eine Erweiterung von CakeML mit Icing als der erste vollverifizierte Compiler für Gleitkommaarithmetik

    Using Acoustic Holography for Vibration Analysis

    Get PDF
    Disertační práce se zabývá bezkontaktní analýzou vibrací pomocí metod akustické holografie v blízkém poli. Akustická holografie v blízkém poli je experimentální metoda, která rekonstruuje akustické pole v těsné blízkosti povrchu vibrujícího předmětu na základě měření akustického tlaku nebo akustické rychlosti v určité vzdálenosti od zkoumaného předmětu. Konkrétní realizace této metody závisí na použitém výpočetním algoritmu. Vlastní práce je zaměřena zejména na rozbor algoritmů, které využívají k rekonstrukci zvukového pole v blízkosti vibrujícího objektu transformaci do domény vlnových čísel (prostorová transformace), kde probíhá vlastní výpočet. V úvodu práce je vysvětlena základní teorie metody akustické holografie v blízkém poli s popisem základních vlastností a dále rozborem konkrétních nejčastěji používaných algoritmům pro lokalizaci a charakterizaci zdroje zvuku a pro následnou vibrační analýzu. Stěžejní část práce se věnuje pokročilým metodám zpracování, které se snaží určitým způsobem optimalizovat přesnost predice zvukového pole v blízkosti vibrujícího předmětu v reálných podmínkách. Jde zejména o problematiku použitého měřicího systému s akustickými snímači, které nejsou ideální, a dále o možnost měření v prostorách s difúzním charakterem zvukového pole. Pro tento případ byla na základě literárního průzkumu optimalizována a ověřena metoda využívající dvouvrstvé mikrofonní pole, které umožňuje oddělení zvukových polí přicházejících z různých stran a tedy úspěšné měření v uzavřených prostorách např. kabin automobilů a letadel. Součástí práce byla také optimalizace, rozšíření a následné ověření algoritmů publikovaných v posledních letech pro měření v reálných podmínkách za použití běžně dostupných akustických snímačů.The main aim of the thesis is application of near-field acoustic holography for non-contact vibration analysis. Near-field acoustic holography is an experimental technique for reconstruction of sound field close to the surface of the vibrating object based on measurement of sound pressure or acoustic particle velocity in certain distance from the examined object. Practical realization of this method depends on used calculation procedure. The thesis is focused on analysis of acoustic holography algorithms with transformation into wavenumber domain (spatial transformation) where the reconstruction of the sound field near vibrating object is calculated. The introductory part of the thesis describes the theory of near-field acoustic holography with general characteristics and with analysis of most common algorithms used for localization and characterization of sound source and consequent vibration analysis. Principal part of the thesis deals with advanced processing methods where these methods try to optimize the accuracy of prediction of sound field near vibrating object in real environment. In this study, real measurement conditions represent the measurement system with non-ideal acoustic sensors and also areas with reverberant sound field. Based on literature study, there has been optimized and verified the new method which uses double layer microphone array to separate incoming and outgoing sound field, thus allows successful measurement in confined space e.g. cabins of cars and airplanes. Part of the thesis has been also focused on optimization, extension and successive experimental validation of selected classical algorithms published in last decade for possible measurement in real conditions and with common acoustic sensors.
    corecore