IEEERemainder: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Spobel (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Spobel (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 174: | Zeile 174: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | === Javadoc === | ||
<span class="mw-customtoggle-myDivision-Javadoc">[Anzeigen]</span> | |||
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-myDivision-Javadoc"> | |||
double java.lang.Math.IEEEremainder(double f1, double f2) | |||
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard. The remainder value is mathematically equal to f1 - f2 × n, where n is the mathematical integer closest to the exact mathematical value of the quotient f1/f2, and if two mathematical integers are equally close to f1/f2, then n is the integer that is even. If the remainder is zero, its sign is the same as the sign of the first argument. Special cases: | |||
If either argument is NaN, or the first argument is infinite, or the second argument is positive zero or negative zero, then the result is NaN. | |||
If the first argument is finite and the second argument is infinite, then the result is the same as the first argument. | |||
Parameters: | |||
f1 the dividend. | |||
f2 the divisor. | |||
Returns: | |||
the remainder when f1 is divided by f2. | |||
</div> | |||
[[Kategorie:Evaluatorfunktion]] | [[Kategorie:Evaluatorfunktion]] |
Version vom 29. Januar 2018, 10:28 Uhr
Beschreibung
Die Funktion IEEEremainder berechnet die Remainder-Operation auf zwei Argumente, wie es in dem IEEE 745 Standtard beschrieben ist [1]. Die Funktion erwartet zwei Zahlen und gibt das entsprechende Ergebnis zurück.
Syntax
IEEEremainder(Gleitkommazahl f1, Gleitkommazahl f2)
Parameter
- f1 - Zähler
- f2 - Nenner
Return Value
- Gibt den Rest-Wert zurück, wenn f1 durch f2 geteilt wird
Beispiele
Standardfälle
IEEEremainder(4,2) --> returns 0 IEEEremainder(3,2) --> returns -1
Benutzung mit Variablen
IEEEremainder([pos=1],[pos=2]) IEEEremainder([var=a],[var=b])
JUnit Tests
[Anzeigen]
Javadoc
[Anzeigen]