pow ( 1.1, - Infinity ) // 0 // NaN: only Math.pow(NaN, 0) does not result in NaN pow ( - 0, - 1.5 ) // Infinity (negative exponent) pow ( - 0, - 1 ) // -Infinity (negative odd integer exponent) pow ( - 0, 1.5 ) // 0 (positive exponent) pow ( - 0, 1 ) // -0 (positive odd integer exponent) pow ( 0, - 1 ) // Infinity (negative exponent) pow ( - Infinity, - 1.5 ) // 0 (negative exponent) pow ( - Infinity, - 1 ) // -0 (negative odd integer exponent) pow ( - Infinity, 1.5 ) // Infinity (positive exponent) pow ( - Infinity, 1 ) // -Infinity (positive odd integer exponent) pow ( Infinity, - 1 ) // 0 (negative exponent) pow ( Infinity, 0.1 ) // Infinity (positive exponent) pow ( - 7, 1 / 3 ) // NaN // Zero and infinity pow ( - 7, 0.5 ) // NaN (negative numbers don't have a real square root) // Due to "even" and "odd" roots laying close to each other, // and limits in the floating number precision, // negative bases with fractional exponents always return NaN, // even when the mathematical result is real pow ( - 7, 3 ) // -343 (cubes can be negative) pow ( - 7, 2 ) // 49 (squares are positive) pow ( 2, 10 ) // 1024 // Fractional exponents
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |