Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created January 22, 2015 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shigemk2/b20076e796b0bd0ae475 to your computer and use it in GitHub Desktop.
Save shigemk2/b20076e796b0bd0ae475 to your computer and use it in GitHub Desktop.
var bi = BigInt(1234567890)
var bd = BigDecimal(123456.789)
println(bi + bi)
println(bi * bi)
bi += 1
println(bi)
println(bi.toInt)
println(bi.toLong)
println(bi.toFloat)
println(bi.toDouble)
println(bi.isValidByte)
println(bi.isValidChar)
println(bi.isValidShort)
println(if (bi.isValidInt) bi.toInt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment