Lo que todo programador debería saber sobre aritmética de punto flotante
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added explanations of strictfp

+4 -3
+4 -3
content/languages/java.html
··· 7 7 -------- 8 8 Java has [IEEE 754](/formats/fp/) single and double precision types supported by keywords: 9 9 float f = 0.1f; // 32 bit float, note f suffix 10 - double d = 0.1; // 64 bit float, suffix optional 10 + double d = 0.1d; // 64 bit float, suffix optional 11 + The `strictfp` keyword on classes, interfaces and methods forces all intermediate results of floating-point calculations to be IEEE 754 values as well, guaranteeing identical results on all platforms. Without that keyword, implementations can use an extended exponent range where available, resulting in more precise results and faster execution on many common CPUs. 11 12 12 13 Decimal Types 13 14 ------------- ··· 35 36 36 37 Resources 37 38 --------- 38 - [Java Language Specification](http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html) 39 - [Java Standard API](http://java.sun.com/javase/6/docs/api/) 39 + * [Java Language Specification](http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html) 40 + * [Java Standard API](http://java.sun.com/javase/6/docs/api/)