Skip to content

Instantly share code, notes, and snippets.

@BanzaiMan
Created May 10, 2010 05:29
Show Gist options
  • Select an option

  • Save BanzaiMan/395718 to your computer and use it in GitHub Desktop.

Select an option

Save BanzaiMan/395718 to your computer and use it in GitHub Desktop.
[system]:ruby[git:master] $ ruby -rbigdecimal -rbigdecimal/math -e 'include BigMath;p x=sqrt(BigDecimal.new("2.0"), 50).to_s'
"0.14142135623739504880168872429698078569671875376948073176679737975E1"
[system]:ruby[git:master] $ ruby -rbigdecimal -rbigdecimal/math -e 'include BigMath;p x=sqrt(BigDecimal.new("2.0"), 50).inspect'
"#<BigDecimal:1001469b8,'0.1414213562 3739504880 1688724296 9807856967 1875376948 0731766797 37975E1',72(72)>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment