Created
June 16, 2018 06:29
-
-
Save todorok1/9c02b8e0022bb51f0ccea3a64e830b78 to your computer and use it in GitHub Desktop.
無限大について全力で考えてみる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void FourArithmeticInfinity(){ | |
// 足し算 | |
// 無限大に数値を足す | |
float additionToInf = Mathf.Infinity + 1.0e+38f; | |
Debug.Log("additionToInf : " + additionToInf); | |
// 無限大に無限大を足す | |
float additionInfToInf = Mathf.Infinity + Mathf.Infinity; | |
Debug.Log("additionInfToInf : " + additionInfToInf); | |
// 引き算 | |
// 無限大から数値を引く | |
float subtractionFromInf = Mathf.Infinity - 1.0e+38f; | |
Debug.Log("subtractionFromInf : " + subtractionFromInf); | |
// 無限大から無限大を引く | |
float subtractionInfFromInf = Mathf.Infinity - Mathf.Infinity; | |
Debug.Log("subtractionInfFromInf : " + subtractionInfFromInf); | |
// 掛け算 | |
// 無限大に数値を掛ける | |
float multiplicationInf = Mathf.Infinity * 1.0e+38f; | |
Debug.Log("multiplicationInf : " + multiplicationInf); | |
// 無限大に無限大を掛ける | |
float multiplicationInfByInf = Mathf.Infinity * Mathf.Infinity; | |
Debug.Log("multiplicationInfByInf : " + multiplicationInfByInf); | |
// 無限大に0を掛ける | |
float multiplicationInfByZero = Mathf.Infinity * 0f; | |
Debug.Log("multiplicationInfByZero : " + multiplicationInfByZero); | |
// 割り算 | |
// 無限大を数値で割る | |
float divisionInf = Mathf.Infinity / 1.0e+38f; | |
Debug.Log("divisionInf : " + divisionInf); | |
// 無限大を無限大で割る | |
float divisionInfByInf = Mathf.Infinity / Mathf.Infinity; | |
Debug.Log("divisionInfByInf : " + divisionInfByInf); | |
// 無限大を0で割る | |
float divisionInfByZero = Mathf.Infinity / 0f; | |
Debug.Log("divisionInfByZero : " + divisionInfByZero); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment