Hickerson series of almost integers: Difference between revisions

→‎{{header|Kotlin}}: Changed read-only property to compile time constant
(Added Kotlin)
(→‎{{header|Kotlin}}: Changed read-only property to compile time constant)
Line 1,058:
 
object Hickerson {
private const val ln2LN2 = "0.693147180559945309417232121458"
 
fun almostInteger(n: Int): Boolean {
val a = BigDecimal(ln2LN2).pow(n + 1) * BigDecimal(2)
var nn = n
var f = n.toLong()
9,479

edits