Bonnes Pratiques Web & Cloud
58.8K views | +4 today
Follow
Bonnes Pratiques Web & Cloud
Administration cloud et développement web
Curated by Mickael Ruau
Your new post is loading...
Your new post is loading...

Popular Tags

Current selected tag: 'IEEE 754'. Clear
Scooped by Mickael Ruau
Scoop.it!

Problèmes courants: Imprécision des calculs mathématiques (2e partie) | OCTO Talks !

Problèmes courants: Imprécision des calculs mathématiques (2e partie) | OCTO Talks ! | Bonnes Pratiques Web & Cloud | Scoop.it
 

Nous avons déterminé dans la première partie que les nombres à virgule flottante sont à proscrire.

Nos armes seront donc le BigDecimal en Java, le type decimal en .Net. Malheureusement, d’autres pièges pavent notre chemin.

Notes:

  • Sous Oracle, le type NUMBER(p,s) peut être soit décimal si p (et optionnellement s) est spécifié et sera à virgule flottante sinon. Conclusion, toujours spécifier p (et s pour avoir des décimales).
  • Pour un Web Service, la valeur d’un type xs:decimal sera sous forme texte (ie. « 123.456 ») et sera donc précis et mappé sans problème vers un BigDecimal (Java) ou decimal (.Net).
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Math.js une libraire mathématique pour JavaScript et Node.js

Math.js est une librairie mathématique pour JavaScript et Node.js. Elle procure un parser d'expression et elle est une solution intégrée pour travailler notamment avec les grands nombres, les unités, les nombres complexes et les matrices.

No comment yet.
Scooped by Mickael Ruau
Scoop.it!

What Every Computer Scientist Should Know About Floating-Point Arithmetic

This paper presents a tutorial on those aspects of floating-point that have a direct impact on designers of computer systems. It begins with background on floating-point representation and rounding error, continues with a discussion of the IEEE floating-point standard, and concludes with numerous examples of how computer builders can better support floating-point.

Mickael Ruau's insight:

"It consists of three loosely connected parts. The first section, Rounding Error, discusses the implications of using different rounding strategies for the basic operations of addition, subtraction, multiplication and division. It also contains background information on the two methods of measuring rounding error, ulps and relative error. The second part discusses the IEEE floating-point standard, which is becoming rapidly accepted by commercial hardware manufacturers. Included in the IEEE standard is the rounding method for basic operations. The discussion of the standard draws on the material in the section Rounding Error. The third part discusses the connections between floating-point and the design of various aspects of computer systems. Topics include instruction set design, optimizing compilers and exception handling.

I have tried to avoid making statements about floating-point without also giving reasons why the statements are true, especially since the justifications involve nothing more complicated than elementary calculus. Those explanations that are not central to the main argument have been grouped into a section called "The Details," so that they can be skipped if desired. In particular, the proofs of many of the theorems appear in this section. The end of each proof is marked with the z symbol. When a proof is not included, the z appears immediately following the statement of the theorem."

No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Fun with JavaScript Numbers

This article explores numbers in JavaScript, including some common, and uncommon, pitfalls associated with them.
Mickael Ruau's insight:

Les phénomènes décrits sont reproductibles avec tous les autres langages communs (php, java, c, c++....) car ce sont des artefacts de la norme IEEE 754.

 

No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Startup : Numalis corrige les erreurs de calcul des ordinateurs

Startup : Numalis corrige les erreurs de calcul des ordinateurs | Bonnes Pratiques Web & Cloud | Scoop.it
Le sujet de la précision de l'ordinateur a souvent été négligé, voire tabou. Longtemps personne ne reconnaissait que l'arrondi ou la représentation d'un nombre pouvait causer des dérives. « Mais ces vingt dernières années, plusieurs catastrophes ont fait prendre conscience aux grands groupes industriels des risques que comporte l'arithmétique réalisée par ordinateur. Ils en tiennent compte maintenant dans la programmation »
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Precise calculations in JavaScript

Precise calculations in JavaScript | Bonnes Pratiques Web & Cloud | Scoop.it
Floating point numbers, like double in JavaScript, are a very rough estimate of a real number, which has to deal with rational and irrational numbers the same way.
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

PHP Master | 3 Strange PHP Facts You May Not Know

PHP Master | 3 Strange PHP Facts You May Not Know | Bonnes Pratiques Web & Cloud | Scoop.it
There is no doubt: PHP is an easy, flexible, and forgiving language. But it can also exhibit some surprising behavior.
No comment yet.