divi模板下载_Java Math类静态double IEEEremainder(double divi,double divisor)的示例
divi模板下載
數學類靜態double IEEEremainder(double divi,double divisor) (Math Class static double IEEEremainder(double divi , double divisor))
This method is available in java.lang package.
此方法在java.lang包中可用。
This method is used to return the calculated remainder on the given two parameters.
此方法用于返回給定兩個參數上的計算余數。
This method is followed by IEEE 754 Standard.
IEEE 754標準遵循此方法。
This is a static method so it is accessible with the class name too.
這是一個靜態方法,因此也可以使用類名進行訪問。
This method accepts two parameters (one is dividend and other is divisor), and it returns the two numbers (one is quotient and other is remainder).
此方法接受兩個參數(一個是除數,另一個是除數),并返回兩個數字(一個是商,另一個是余數)。
Example: Let suppose if the dividend is fully divisible by divisor then the value of the remainder will be 0 and in that case, the resultant value sign will be the same as the sign of the first argument.
示例:假設如果除數可被除數完全除,則余數的值將為0,在這種情況下,結果值的符號將與第一個參數的符號相同。
The return type of this method is double that means it returns the remainder of the given arguments.
此方法的返回類型為double,這意味著它將返回給定參數的其余部分。
In this method, we pass two parameters as arguments, where, the first argument represents the dividend and the second argument represents the divisor.
在此方法中,我們將兩個參數作為參數傳遞,其中,第一個參數表示除數,第二個參數表示除數。
This method does not throw any exception.
此方法不會引發任何異常。
Syntax:
句法:
public static double IEEEremainder(double divi, double divisor){}Parameter(s):
參數:
divi – the value of dividend.
股息 –股息價值。
divisor – the value of divisor.
除數 – 除數的值。
Return value:
返回值:
The return type of this method is double, it returns the remainder.
此方法的返回類型為double ,它返回余數。
Note:
注意:
If we pass any argument "NaN", it returns the "NaN".
如果我們傳遞任何參數“ NaN”,它將返回“ NaN”。
If we pass any argument as an infinity, it returns the "NaN".
如果我們將任何參數傳遞為無窮大,它將返回“ NaN”。
If we pass any argument as 0 (-0 or 0), it returns the "NaN".
如果我們將任何參數傳遞為0(-0或0),它將返回“ NaN”。
If we pass a finite value as a first argument and an infinite value as second argument, it returns the first argument.
如果我們將一個有限值作為第一個參數傳遞而將一個無限值作為第二個參數傳遞,它將返回第一個參數。
Java程序演示IEEEremainder(double divi,double divisor)方法的示例 (Java program to demonstrate example of IEEEremainder(double divi , double divisor) method)
// Java program to demonstrate the example of // IEEEremainder(double divi, double divisor) method of Math Classpublic class IEEEremainderMethod {public static void main(String[] args) {// variables declarationsDouble d1 = 7.0 / 0.0;Double d2 = 10.0;Double d3 = 5.0;Double d4 = 0.0;Double d5 = -0.0;// displaying valuesSystem.out.println("d1: " + d1);System.out.println("d2: " + d2);System.out.println("d3: " + d3);System.out.println("d4: " + d4);System.out.println("d5: " + d5);// Here , we will get (NaN) because we are passing // first parameter whose value is (infinity)System.out.println("Math.IEEEremainder (d1,d2): " + Math.IEEEremainder(d1, d2));// Here , we will get (NaN) because we are passing // second parameter whose value is (positive or negative 0)System.out.println("Math.IEEEremainder (d2,d4): " + Math.IEEEremainder(d2, d4));// Here , we will get (first argument) because we are passing // finite parameter as first argument whose value is (10.0) and // passing infinity as second argument in the method.System.out.println("Math.IEEEremainder (d2,d1): " + Math.IEEEremainder(d2, d1));// Here , we will get (0.0) because we are passing // parameter whose value is (10.0,5.0)System.out.println("Math.IEEEremainder (d2,d3): " + Math.IEEEremainder(d2, d3));} }Output
輸出量
E:\Programs>javac HypotMethod.javaE:\Programs>java HypotMethod d1: Infinity d2: 10.0 d3: 5.0 d4: 0.0 d5: -0.0 Math.IEEEremainder (d1,d2): NaN Math.IEEEremainder (d2,d4): NaN Math.IEEEremainder (d2,d1): 10.0 Math.IEEEremainder (d2,d3): 0.0翻譯自: https://www.includehelp.com/java/math-class-static-double-ieeeremainder-double-divi-double-divisor-with-example.aspx
divi模板下載
總結
以上是生活随笔為你收集整理的divi模板下载_Java Math类静态double IEEEremainder(double divi,double divisor)的示例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python 示例_带有示例的Pytho
- 下一篇: bba70_BBA的完整形式是什么?