本文簡要介紹ruby語言中 Math.ldexp
的用法。
用法
ldexp(fraction, exponent) → float
返回 fraction
*(2** exponent
) 的值。
fraction, exponent = Math.frexp(1234)
Math.ldexp(fraction, exponent) #=> 1234.0
相關用法
- Ruby Math.log10用法及代碼示例
- Ruby Math.lgamma用法及代碼示例
- Ruby Math.log2用法及代碼示例
- Ruby Math.log用法及代碼示例
- Ruby Math.acosh用法及代碼示例
- Ruby Math.asinh用法及代碼示例
- Ruby Math.sinh用法及代碼示例
- Ruby Math.cbrt用法及代碼示例
- Ruby Math.atan用法及代碼示例
- Ruby Math.asin用法及代碼示例
- Ruby Math.gamma用法及代碼示例
- Ruby Math.erf用法及代碼示例
- Ruby Math.cosh用法及代碼示例
- Ruby Math.tan用法及代碼示例
- Ruby Math.erfc用法及代碼示例
- Ruby Math.tanh用法及代碼示例
- Ruby Math.frexp用法及代碼示例
- Ruby Math.exp用法及代碼示例
- Ruby Math.acos用法及代碼示例
- Ruby Math.sqrt用法及代碼示例
- Ruby Math.cos用法及代碼示例
- Ruby Math.atan2用法及代碼示例
- Ruby Math.atanh用法及代碼示例
- Ruby Math.sin用法及代碼示例
- Ruby Math.hypot用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 Math.ldexp。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。