<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Der Informatikblog &#187; Math.pow</title>
	<atom:link href="http://www.informatik-blog.net/tag/mathpow/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.informatik-blog.net</link>
	<description>Informatik &#38; Co.</description>
	<lastBuildDate>Mon, 28 Jun 2010 19:43:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Kalkulation des Zineszins</title>
		<link>http://www.informatik-blog.net/2009/01/21/kalkulation-des-zineszins/</link>
		<comments>http://www.informatik-blog.net/2009/01/21/kalkulation-des-zineszins/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 19:19:10 +0000</pubDate>
		<dc:creator>Emanuel</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Exception]]></category>
		<category><![CDATA[Math.pow]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=26</guid>
		<description><![CDATA[

Hier eine nicht von mir entwickelte Methode zur errechnung des Zineszins. Da ich der meinung bin, dass dies eine sehr nützliche und sauber Programmierte Methode ist, möchte ich sie euch nicht vorenthalten. Vielen Dank an das Java CodeBook für diesen Artikel. Folgendes Beispiel demonistriert die Kaltulation des Zineszins:


/*
 * Beispiele erstellt von Emanuel Seibold
 * [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Hier eine nicht von mir entwickelte Methode zur errechnung des Zineszins. Da ich der meinung bin, dass dies eine sehr nützliche und sauber Programmierte Methode ist, möchte ich sie euch nicht vorenthalten. Vielen Dank an das Java CodeBook für diesen Artikel. Folgendes Beispiel demonistriert die Kaltulation des Zineszins:<br />
<span id="more-26"></span></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/*
 * Beispiele erstellt von Emanuel Seibold
 * Quelle EBooks, Tutorials
 */</span>
<span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">tutorialzahlen</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Kapitalentwicklung bei monatlicher Ratenzahlung und Zinseszins
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">double</span> capitalWithCompoundInterest<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> startCapital, <span style="color: #000066; font-weight: bold;">double</span> installment, <span style="color: #000066; font-weight: bold;">double</span> interest, <span style="color: #000066; font-weight: bold;">int</span> term<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>interest <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0.0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">IllegalArgumentException</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Zins darf nicht Null sein&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">double</span> interestRate <span style="color: #339933;">=</span> interest <span style="color: #339933;">/</span> <span style="color: #cc66cc;">100.0</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">double</span> accumulationFactor <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">+</span> interestRate<span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">double</span> endCapital <span style="color: #339933;">=</span> startCapital <span style="color: #339933;">*</span> <span style="color: #003399;">Math</span>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span>accumulationFactor, term<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> installment <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Math</span>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span>accumulationFactor, term<span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Math</span>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span>accumulationFactor, <span style="color: #cc66cc;">1</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">12.0</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #003399;">Math</span>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span>accumulationFactor, <span style="color: #cc66cc;">1</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">12.0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">return</span> endCapital<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Berechnung des eingezahlten Kapitals
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">double</span> paidInCapital<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> startCapital, <span style="color: #000066; font-weight: bold;">double</span> installment, <span style="color: #000066; font-weight: bold;">int</span> term<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">double</span> endCapital <span style="color: #339933;">=</span> startCapital<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> n <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> n <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;=</span> term<span style="color: #339933;">;</span> <span style="color: #339933;">++</span>n<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            endCapital <span style="color: #339933;">=</span> endCapital <span style="color: #339933;">+</span> <span style="color: #cc66cc;">12</span> <span style="color: #339933;">*</span> installment<span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">return</span> endCapital<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2009/01/21/kalkulation-des-zineszins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zahlen Kaufmännisch und Mathematisch runden</title>
		<link>http://www.informatik-blog.net/2009/01/21/zahlen-kaufmannisch-und-mathematisch-runden/</link>
		<comments>http://www.informatik-blog.net/2009/01/21/zahlen-kaufmannisch-und-mathematisch-runden/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 19:00:28 +0000</pubDate>
		<dc:creator>Emanuel</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Math.pow]]></category>
		<category><![CDATA[Math.rint]]></category>
		<category><![CDATA[Math.round]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=24</guid>
		<description><![CDATA[

Dies ist wohl einer der top100 genutzten Funktionen, die nicht nur für eine KI sinnvoll ist, sondern auch bei Zahlen mit vielen stellen nach dem komma nützlich ist.
Die Ausgabe des gezeigten Beispiel ist:

kmRound(1.515, 2):1.5
mathRound(1.515, 2):1.5


/*
 * Beispiele erstellt von Emanuel Seibold
 * Quelle EBooks, Tutorials
 */
package tutorialzahlen;
&#160;
public class Main &#123;
&#160;
    public static [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Dies ist wohl einer der top100 genutzten Funktionen, die nicht nur für eine KI sinnvoll ist, sondern auch bei Zahlen mit vielen stellen nach dem komma nützlich ist.</p>
<p>Die Ausgabe des gezeigten Beispiel ist:<br />
<span id="more-24"></span><br />
<strong>kmRound(1.515, 2):1.5<br />
mathRound(1.515, 2):1.5<br />
</strong></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/*
 * Beispiele erstellt von Emanuel Seibold
 * Quelle EBooks, Tutorials
 */</span>
<span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">tutorialzahlen</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;kmRound(1.515, 2):&quot;</span> <span style="color: #339933;">+</span> <span style="color: #003399;">String</span>.<span style="color: #006633;">valueOf</span><span style="color: #009900;">&#40;</span>kmRound<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1.51</span>, <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mathRound(1.515, 2):&quot;</span> <span style="color: #339933;">+</span> <span style="color: #003399;">String</span>.<span style="color: #006633;">valueOf</span><span style="color: #009900;">&#40;</span>mathRound<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1.51</span>, <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">/* kaufmännisches runden */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">double</span> kmRound<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> nr, <span style="color: #000066; font-weight: bold;">int</span> n<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Math</span>.<span style="color: #006633;">round</span><span style="color: #009900;">&#40;</span>nr <span style="color: #339933;">*</span> <span style="color: #003399;">Math</span>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span>, n<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #003399;">Math</span>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span>, n<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">/* mathematisches runden */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">double</span> mathRound<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> nr, <span style="color: #000066; font-weight: bold;">int</span> n<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Math</span>.<span style="color: #006633;">rint</span><span style="color: #009900;">&#40;</span>nr <span style="color: #339933;">*</span> <span style="color: #003399;">Math</span>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span>, n<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #003399;">Math</span>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span>, n<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2009/01/21/zahlen-kaufmannisch-und-mathematisch-runden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
