Permalink
Browse files

adding missing test for sqrt of bignums

  • Loading branch information...
1 parent c09f7e8 commit ac4bf0acbc918cb6c04bd54210ed0b58e398a55a Danny Yoo committed Dec 10, 2010
Showing with 9 additions and 1 deletion.
  1. +9 −1 test/tests.js
View
@@ -2167,7 +2167,15 @@ describe('sqrt', {
},
'bignums': function() {
- // FIXME: we're missing this
+ assertTrue(eqv(sqrt(makeBignum("4")),
+ 2))
+
+ assertTrue(eqv(sqrt(makeBignum("-4")),
+ makeComplex(0, 2)))
+
+ assertTrue(diffPercent(makeFloat(4893703081.846022),
+ sqrt(makeBignum("23948329853269253680")))
+ < 1e-2)
},
'rationals': function() {

0 comments on commit ac4bf0a

Please sign in to comment.