{"id":1904,"date":"2013-05-31T22:40:49","date_gmt":"2013-05-31T20:40:49","guid":{"rendered":"http:\/\/www.tutego.de\/blog\/javainsel\/?p=1904"},"modified":"2013-05-31T22:40:49","modified_gmt":"2013-05-31T20:40:49","slug":"java-und-unendlich","status":"publish","type":"post","link":"https:\/\/www.tutego.de\/blog\/javainsel\/2013\/05\/java-und-unendlich\/","title":{"rendered":"Java und Unendlich"},"content":{"rendered":"<p>Der \u00dcberlauf einer mathematischen Operation f\u00fchrt zu einem positiven oder negativen Unendlich.<\/p>\n<p>Beispiel<\/p>\n<p>Multiplikation zweier wirklich gro\u00dfer Werte:<\/p>\n<p>System.out.println( 1E300 * 1E20 ); \/\/ Infinity   <br \/>System.out.println( \u20131E300 * 1E20 ); \/\/ -Infinity<\/p>\n<p>F\u00fcr die Werte deklariert die Java-Bibliothek in Double und Float zwei Konstanten; zusammen mit der gr\u00f6\u00dften und kleinsten darstellbaren Flie\u00dfkommazahl sind das:   <\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"176\">\n<p>Wert f\u00fcr<\/p>\n<\/td>\n<td valign=\"top\" width=\"226\">\n<p>Float<\/p>\n<\/td>\n<td valign=\"top\" width=\"236\">\n<p>Double<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"176\">\n<p>positiv unendlich<\/p>\n<\/td>\n<td valign=\"top\" width=\"226\">\n<p>Float.POSITIVE_INFINITY<\/p>\n<\/td>\n<td valign=\"top\" width=\"236\">\n<p>Double.POSITIVE_INFINITY<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"176\">\n<p>negativ unendlich<\/p>\n<\/td>\n<td valign=\"top\" width=\"226\">\n<p>Float.NEGATIVE_INFINITY<\/p>\n<\/td>\n<td valign=\"top\" width=\"236\">\n<p>Double.NEGATIVE_INFINITY<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"176\">\n<p>kleinster Wert<\/p>\n<\/td>\n<td valign=\"top\" width=\"226\">\n<p>Float.MIN_VALUE<\/p>\n<\/td>\n<td valign=\"top\" width=\"236\">\n<p>Double.MIN_VALUE<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"176\">\n<p>gr\u00f6\u00dfter Wert<\/p>\n<\/td>\n<td valign=\"top\" width=\"226\">\n<p>Float.MAX_VALUE<\/p>\n<\/td>\n<td valign=\"top\" width=\"236\">\n<p>Double.MAX_VALUE<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a name=\"_Ref310407449\">Tabelle <\/a>1.8: Spezialwerte und ihre Konstanten<\/p>\n<p>Das Minimum f\u00fcr double-Werte liegt bei etwa 10^\u2013324 und das Maximum bei etwa 10^308. Weiterhin deklarieren Double und Float Konstanten f\u00fcr MAX_EXPONENT\/MIN_EXPONENT.<\/p>\n<p>Hinweis<\/p>\n<p>Die Anzeige des \u00dcber-\/Unterlaufs und des undefinierten Ergebnisses gibt es nur bei Flie\u00dfkommazahlen, nicht aber bei Ganzzahlen.<\/p>\n<p>public final class java.lang.<b>Float<\/b>\/Double    <br \/>extends Number    <br \/>implements Comparable&lt;Float\/Double&gt;<\/p>\n<p>\u00a7 static boolean isInfinite(float\/double v)    <br \/>Liefert true, wenn v entweder POSITIVE_INFINITY oder NEGATIVE_INFINITY ist.<\/p>\n<p>\u00a7 static boolean isFinite(float\/double d)   <br \/>Liefert true, wenn d eine endliche Zahl ist. Neu in Java 8.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Der \u00dcberlauf einer mathematischen Operation f\u00fchrt zu einem positiven oder negativen Unendlich. Beispiel Multiplikation zweier wirklich gro\u00dfer Werte: System.out.println( 1E300 * 1E20 ); \/\/ Infinity System.out.println( \u20131E300 * 1E20 ); \/\/ -Infinity F\u00fcr die Werte deklariert die Java-Bibliothek in Double und Float zwei Konstanten; zusammen mit der gr\u00f6\u00dften und kleinsten darstellbaren Flie\u00dfkommazahl sind das: Wert [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[11,66],"tags":[],"class_list":["post-1904","post","type-post","status-publish","format-standard","hentry","category-insel","category-java-8"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/1904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/comments?post=1904"}],"version-history":[{"count":0,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/1904\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/media?parent=1904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/categories?post=1904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/tags?post=1904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}