[PDF] High Performance Correctly Rounded Math Libraries for 32-bit





Previous PDF Next PDF



ANGLES ET PARALLÉLISME

Yvan Monka – Académie de Strasbourg – www.maths-et-tiques.fr. ANGLES ET PARALLÉLISME. I. Angles alternes-internes. 1) Définition.



Leçon n°20 : Problèmes dalignement de parallélisme ou d

Si deux droites sont parallèles dans la réalité alors elles sont représentées par les droites parallèles en perspective cavalière.



DROITES ET PLANS DE LESPACE

Yvan Monka – Académie de Strasbourg – www.maths-et-tiques.fr. II. Parallélisme. 1) Parallélisme d'une droite avec un plan.



Enseignement-apprentissage des notions de perpendicularité et de

Aug 24 2019 perpendicularité et de parallélisme en CM1: que ... la collection « J'aime les Maths » est présentée sur le site de l'éditeur Belin2 comme ...



LaTeX-Math-Symbols.pdf

May 31 2000 ?Laboratoire de l'Informatique du Parallélisme





High Performance Correctly Rounded Math Libraries for 32-bit

CCS Concepts: · Mathematics of computing ? Math- Keywords: elementary functions correctly rounded math ... de l'Informatique du Parallélisme.



PROCEEDINGS INTERNATIONAL MATHEMATICAL CONGRESS

same idea as the pure mathematician with regard to the use of mathematical Géométrie conforme le rôle des espaces de Riemann avec parallélisme de Levi-.



Exercices corrigés sur les angles et le parallélisme

Exercices corrigés sur les angles et le parallélisme. Exercice 1 : Les droites (xy) (tz)



A proof of the ErdH {o} s-Sands-Sauer-Woodrow conjecture

Mar 23 2017 arXiv:1703.08123v1 [math.CO] 23 Mar 2017. A proof of the Erd?os-Sands-Sauer-Woodrow ... bLaboratoire d'Informatique du Parallélisme.



[PDF] ANGLES ET PARALLÉLISME - maths et tiques

Si deux angles alternes-internes sont égaux alors les droites sur lesquelles ils reposent sont parallèles Méthode : Appliquer la propriété de parallélisme sur 



[PDF] Angles et parallélisme - Exercices corrigés

c)Calcul des angles du triangle AÔB : > Calcul de AÔB ( et de xÔA ) : La demi-droite [Oz) est la bissectrice d'e l'angle yOxˆ donc :



[PDF] Exercices corrigés sur les angles et le parallélisme

Exercices corrigés sur les angles et le parallélisme Exercice 1 : Les droites (xy) (tz) (uv) sont concourantes en I Donner la mesure de chacun des 



[PDF] Contrôle-angles parallélisme

Angles et parallélisme Contrôle A Date : Exercice 1 : (7pts) Les droites (AB) et (CD) sont parallèles 1 Cite un angle obtus



[PDF] Angles et parallélisme : propriétés - Correction

Angles et parallélisme : propriétés - Correction Exercice 1 : Pour cet exercice toutes les réponses doivent être justifiées par une propriété mathématique 



[PDF] Angles et parallélisme Diabolomaths

angulaires du parallélisme (angles alternes internes angles correspondants) ; il met en œuvre et écrit un protocole de construction de



[PDF] Problèmes dalignement de parallélisme ou dintersection

Si deux droites sont parallèles dans la réalité alors elles sont représentées par les droites parallèles en perspective cavalière



Droites parallèles et perpendiculaires : cours de maths en 6ème

Les droites parallèles et perpendiculaire : cours de maths en 6ème en PDF · 2 1 1 Droite perpendiculaire passant par un point · 2 2 2 Droite parallèle passant 



[PDF] Angles et parallélisme - maths-mde

Exercices corrigés Angles et parallélisme maths-mde Exercice 1 : 1 Citer deux angles complémentaires 2 Citer deux angles supplémentaires



[PDF] Angles et parallélisme - maths-cfmfr

Exercices Angles et parallélisme maths-cfm Exercice* 0 : Dans la configuration suivante citer : 1 la sécante; 2 deux angles correspondants;

  • Comment montrer le parallélisme ?

    Si deux droites parallèles coupées par une sécantes forment deux angles correspondants, alors ces angles sont de même mesure. La réciproque à cette règle est également vraie : Si deux angles correspondants de même mesure sont définis par deux droites et une sécante, alors ces deux droites sont parallèles.
  • Si deux droites forment avec une sécante des angles correspondants égaux, alors ces droites sont parallèles. Si deux droites forment avec une sécante des angles alternes-internes égaux, alors ces deux droites sont parallèles.
High Performance Correctly Rounded Math Libraries for 32-bit

High Performance Correctly Rounded Math Libraries

for 32-bit Floating Point Representations

Jay P. Lim

Department of Computer Science

Rutgers University

United States

jpl169@cs.rutgers.eduSantosh Nagarakatte

Department of Computer Science

Rutgers University

United States

santosh.nagaraka?e@cs.rutgers.edu

Abstract

This paper proposes a set of techniques to develop correctly rounded math libraries for 32-bit ?oat and posit types. It enhances ourRLibmapproach that frames the problem of generating correctly rounded libraries as a linear program- ming problem in the context of 16-bit types to scale to 32-bit types. Speci?cally, this paper proposes new algorithms to (1) generate polynomials that produce correctly rounded outputs for all inputs using counterexample guided polyno- mial generation, (2) generate e?cient piecewise polynomials with bit-pattern based domain splitting, and (3) deduce the amount of freedom available to produce correct results when range reduction involves multiple elementary functions. The resultant math library for the 32-bit ?oat type is faster than state-of-the-art math libraries while producing the correct output for all inputs. We have also developed a set of cor- rectly rounded elementary functions for 32-bit posits. CCS Concepts:•Mathematics of computing→Math- ematical software ;Linear programming;•Theory of computation→Numeric approximation algorithms.

Keywords:

elementary functions, correctly rounded math libraries, ?oating point, posits, piecewise polynomials

ACM Reference Format:

Jay P. Lim and Santosh Nagarakatte. 2021. High Performance Cor- rectly Rounded Math Libraries for 32-bit Floating Point Represen- tations. InProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI "21), June 20-25, 2021, Virtual, Canada.ACM, New York, NY, Permission to make digital or hard copies of all or part of this work for made or distributed for pro?t or commercial advantage and that copies bear this notice and the full citation on the ?rst page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior speci?c permission and/or a fee. Request permissions from permissions@acm.org.

PLDI "21, June 20-25, 2021, Virtual, Canada

©2021 Association for Computing Machinery.

ACM ISBN 978-1-4503-8391-2/21/06...$15.00

h?ps://doi.org/10.1145/3453483.3454049

1 Introduction

Math libraries provide implementations of elementary func- tions (e.g.???(?),??,???(?)) [37]. They are crucial compo- nents in various domains ranging from scienti?c computing to machine learning. Designing math libraries is a challeng- ing task because they are expected to provide correct results for all inputs and also have high performance. These ele- mentary functions are typically approximated with some hardware supported representation for performance. the correctly rounded result of an elementary function ?for an input ??Tis de?ned as the value of?(?)computed with real numbers and then rounded to a value in the representa- correctly rounded results for elementary functions. Seminal prior work on generating approximations for elementary functions has resulted in numerous implementations that havereduced errorsigni?cantly[5-10,15,24,25,29,49].Fur- ther, numerous correctly rounded libraries have also been developed [13,15]. Unfortunately, they are not widely used due to performance considerations. Moreover, widely used libraries do not produce correct results for all inputs.

Mini-max approaches.

Most prior approaches identify

a polynomial that minimizes the maximum error among all input points (i.e., a mini-max approach) compared to the real value of the elementary function using the Weierstrass approximation theorem and the Chebyshev alternation the- orem [47]. The Weierstrass approximation theorem states that if ?is a continuous real-valued function on[?,?]and for all?? [?,?]. The Chebyshev alternation theorem pro- vides the condition for such a polynomial: a polynomial of degree?that minimizes the maximum error will have at least?+2points where it has the absolute maximum error and the error alternates in sign. Remez algorithm [37,39] is a procedure to identify such mini-max polynomials. The maximum approximation error has to be below the error threshold required to produce correct results for all inputs. As approximating a polynomial in a small domain[?,?] is much easier, the input domain of the function is reduced using range reduction [12,31,45]. The approximated result is adjusted to produce the result for the original input (i.e., output compensation). Both range reduction and polynomial 359
PLDI "21, June 20-25, 2021, Virtual, CanadaJay P. Lim and Santosh Nagaraka?e evaluation in a representation with ?nite precision will have some numerical errors. The combination of approximation errors with the mini-max approach and numerical errors with polynomial evaluation, range reduction, and output compensation can result in wrong results.

RLibm.

OurRLibmapproach [31,32] generates polynomi-

als that approximate the correctly rounded result rather than the real value of the elementary function. The generation of the polynomial considers errors in polynomial approxima- tion and numerical errors in polynomial evaluation, range reduction, and output compensation to produce the correctly rounded output for all inputs. The task of generating the polynomial is then structured as a linear programming (LP) problem. TheRLibmapproach ?rst computes the correctly rounded result for each input in a target representationTus- inganoracle(e.g.,theMPFRlibrary[

15]).Giventhecorrectly

rounded result for an input, it ?nds an interval indouble precision such that every value in the interval rounds to the correctly rounded result, which is called the rounding interval. The rounding intervals are further constrained to account for numerical errors during range reduction and output compensation. Subsequently, it attempts to generate a polynomial of degree?using an LP solver, which when evaluated with an input produces a result that lies within the rounding interval. Using theRLibmapproach, we have been successful in generating correctly rounded libraries with 16-bit types such asbfloat16andposit16.

Challenges in scaling to 32-bits.

To extend ourRLibm

approach to 32-bit data types, we have to address the fol- lowing challenges. First, modern LP solvers can handle a few thousand constraints. A naive use of theRLibmap- proach with 32-bit types will generate more than a billion constraints, which is beyond the capabilities of current LP solvers. Second, it may not be feasible to generate a single polynomial of a reasonable degree given the large number of constraints. Third, LP solvers are sensitive to the condition number of the system of constraints. LP solvers will not be able to solve an ill-conditioned system of constraints. An e?ective range reduction is a strategy to address it. Although there are excellent books on range reduction [

12], these tech-

niques need to be adapted to work with ourRLibmapproach. Fourth, some range reduction strategies need multiple el- ementary functions themselves (e.g., ?????(?)). Finally, we need to ensure that output compensation does not experi- ence pathological cancellation errors (e.g.,?????(?)).

This paper.

Our goal is to generate e?cient implementa-

results for all inputs with 32-bit types. This paper extends ourRLibmapproach to scale to 32-bit FP types to address the challenges described above. We propose (1) sampling of in- puts with counterexample guided polynomial generation to nomials for e?ciency, (3) deduction of rounding intervals when a range reduction technique uses multiple elementary functions, and (4) modi?ed range reduction techniques for some elementary functions to address cancellation errors in output compensation. Figure1pictorially represents our approach to scale to 32-bit data types. We sample inputs proportional to the number of representable values in a given input domain[?,?]with a 32-bit represen- tationT. To generate polynomials that produce the correctly rounded result for every input, it is not necessary to consider every input and its rounding interval. We primarily need to For each input in the sample, we generate the oracle result using the MPFR library. We compute the rounding interval in double precision (i.e., set of values in thedoubletype that round to the oracle result). We generate LP constraints to create a polynomial of degree ?such that it evaluates to a value in the rounding interval for each input in the sample. If the initial sample generates a polynomial that produces the correctly rounded output for all values in[?,?], then the process terminates. Otherwise, we add counterexamples to the sample and repeat the process. The size of the sample is bounded by the number of constraints that the LP solver can process.

Piecewise polynomials.

When either the number of in-

puts in the sample exceeds our LP constraint threshold or the LP solver is not able to generate a polynomial, we split the input domain[?,?]to[?,??)and[??,?]to generate piece- wise polynomials using the above process for each input sub-domain. We choose the splitting point such that we can identify the sub-domain quickly using a few bits of the input, which results in e?cient implementations. The ability to generate piecewise polynomials ensures that our resultant polynomials are of a lower degree and provide performance improvements when compared to state-of-the-art libraries.

Range reduction with multiple functions.

We pro-

pose new algorithms to deduce rounding intervals for a class of range reduction techniques that involve multiple elementary functions. Range reduction reduces the input ?to??. The creation of the polynomial happens with the reduced inputs. The output of the polynomial?(??)should be adjusted to compute the correctly rounded result for?, which is called output compensation. We have to deduce the rounding intervals for the reduced input ??that con- siders the numerical error in range reduction, polynomial evaluation, and output compensation. We propose new tech- niques to create reduced rounding intervals when range reduction uses multiple elementary functions (e.g.,?????(?) in Section2). These techniques allow us to perform range reduction on functions that otherwise cause condition num- ber issues with the LP formulation (i.e.,???ℎ(?)or???ℎ(?)). Further, we develop modi?ed range reduction techniques for some elementary functions to avoid cancellation errors in output compensation (e.g.,?????(?)in Section5). 360

High Performance Correctly Rounded Math Libraries for 32-bit Floating Point Representations PLDI "21, June 20-25, 2021, Virtual, Canada

Inputs x and

the rounding intervals [l, h] in H ,,T,H,

Sub-domain #1

Sub-domain #2

List of

all inputs x in T f,T,

Reduced

inputs R and reduced intervals [l i', hi'] for f i(x)

Counterexample Guided Polynomial Generation

Sample

quotesdbs_dbs32.pdfusesText_38
[PDF] parallélisme définition

[PDF] recueillir un gaz par déplacement d'eau

[PDF] substance qui permet de reconnaitre le gaz contenu dans les boissons petillantes

[PDF] lors d'un controle une classe de 3e a obtenu les notes suivantes

[PDF] montrer que les mobilités et transports urbains reflètent

[PDF] corde ? sauter eps

[PDF] exercice physique saut ? la perche

[PDF] eps corde ? sauter ce1

[PDF] comment se diffusent les idées de luther

[PDF] critique de luther contre le clergé catholique

[PDF] besoin nutritif d'une plante

[PDF] de quoi ont besoin les graines pour germer?

[PDF] les besoins des végétaux cycle 3

[PDF] les besoins d'une plante maternelle

[PDF] besoins nutritifs végétaux 6ème