{"id":2597,"date":"2014-01-03T14:25:43","date_gmt":"2014-01-03T12:25:43","guid":{"rendered":"http:\/\/www.tutego.de\/blog\/javainsel\/?p=2597"},"modified":"2014-01-03T14:25:43","modified_gmt":"2014-01-03T12:25:43","slug":"math-nextup-und-nextdown","status":"publish","type":"post","link":"https:\/\/www.tutego.de\/blog\/javainsel\/2014\/01\/math-nextup-und-nextdown\/","title":{"rendered":"Math.nextUp(&hellip;) und nextDown(&hellip;)"},"content":{"rendered":"<p>Was kommt nach und vor 1: <\/p>\n<p>System.out.printf( &#8222;%.16f%n&#8220;, Math.<b>nextUp<\/b>( 1 ) );<br \/>System.out.printf( &#8222;%.16f%n&#8220;, Math.<b>nextDown<\/b>( 1 ) );<br \/>System.out.printf( &#8222;%.16f%n&#8220;, Math.<b>nextAfter<\/b>( 1, Double.<b>POSITIVE_INFINITY<\/b> ) );<br \/>System.out.printf( &#8222;%.16f%n&#8220;, Math.<b>nextAfter<\/b>( 1, Double.<b>NEGATIVE_INFINITY<\/b> ) ); <\/p>\n<p>Die Ausgabe ist: <\/p>\n<p>1,000000119209289 <\/p>\n<p>0,9999999403953552 <\/p>\n<p>1,0000001192092896 <\/p>\n<p>0,9999999403953552 <\/p>\n<p>next<b>Up<\/b>(d) ist eine Abk\u00fcrzung f\u00fcr nextAfter(d, Double.<b>POSITIVE_INFINITY<\/b>) und next<b>Down<\/b>(d) eine Abk\u00fcrzung f\u00fcr nextAfter(d, Double.<b>NEGATIVE_INFINITY<\/b>). Ist das zweite Argument von Math.nextAfter(\u2026) gr\u00f6\u00dfer als das erste, dann wird die n\u00e4chstgr\u00f6\u00dfere Zahl zur\u00fcckgegeben, ist sie kleiner, dann die n\u00e4chstkleinere Zahl. Bei Gleichheit kommt die gleiche Zahl zur\u00fcck.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Was kommt nach und vor 1: System.out.printf( &#8222;%.16f%n&#8220;, Math.nextUp( 1 ) );System.out.printf( &#8222;%.16f%n&#8220;, Math.nextDown( 1 ) );System.out.printf( &#8222;%.16f%n&#8220;, Math.nextAfter( 1, Double.POSITIVE_INFINITY ) );System.out.printf( &#8222;%.16f%n&#8220;, Math.nextAfter( 1, Double.NEGATIVE_INFINITY ) ); Die Ausgabe ist: 1,000000119209289 0,9999999403953552 1,0000001192092896 0,9999999403953552 nextUp(d) ist eine Abk\u00fcrzung f\u00fcr nextAfter(d, Double.POSITIVE_INFINITY) und nextDown(d) eine Abk\u00fcrzung f\u00fcr nextAfter(d, Double.NEGATIVE_INFINITY). Ist das zweite Argument von [&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-2597","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\/2597","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=2597"}],"version-history":[{"count":1,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/2597\/revisions"}],"predecessor-version":[{"id":2598,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/2597\/revisions\/2598"}],"wp:attachment":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/media?parent=2597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/categories?post=2597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/tags?post=2597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}