summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorRobert Persson <r.k.persson@gmail.com>2013-07-02 20:55:27 +0200
committerRobert Persson <r.k.persson@gmail.com>2013-07-02 20:55:27 +0200
commitd1a90c6ec6c64f3fcdf39da2e54ffd67b70339c4 (patch)
treee67b55a8c10aad953262bb9861b6f8ac6d16188d
parent85dbc2d3065e50f7abeaee733ef309124f927688 (diff)
downloadNim-d1a90c6ec6c64f3fcdf39da2e54ffd67b70339c4.tar.gz
Cleanup of poly an numeric modules
Removed some test code
-rw-r--r--lib/pure/numeric.nim25
-rw-r--r--lib/pure/poly.nim38
2 files changed, 0 insertions, 63 deletions
diff --git a/lib/pure/numeric.nim b/lib/pure/numeric.nim
index 902dadea3..593370fbb 100644
--- a/lib/pure/numeric.nim
+++ b/lib/pure/numeric.nim
@@ -86,28 +86,3 @@ proc brent*(xmin,xmax:float ,function:TOneVarFunction, rootx,rooty:var float,tol
   rootx=b
   rooty=fb  
   return true
-
-
-
-when isMainModule:
-  var rootx=0.0
-  var rooty=0.0
-  var err=0.0
-  
-  var cnt=0
-  proc myf(x:float):float=
-    inc cnt
-    echo ($cnt & " : " & $x)
-    return x*x-200
-
-  
-  var suc=brent(-10000.0,0.2,myf,rootx,rooty,1.0e-3)
-  
-  
-  echo suc
-  echo rootx
-  echo rooty
-  
-  
-  
-  discard(readline(stdin))
diff --git a/lib/pure/poly.nim b/lib/pure/poly.nim
index 8333398e5..e90bc96e8 100644
--- a/lib/pure/poly.nim
+++ b/lib/pure/poly.nim
@@ -371,41 +371,3 @@ proc roots*(p:TPoly,tol=1.0e-9,zerotol=1.0e-6,mergetol=1.0e-12):seq[float]=
     addRoot(p,res,x0,x1,tol,zerotol,mergetol)
 
   return res
-
-when isMainModule:
-  var ply=initPoly(1.0,-6.0,5.0,2.0)
-  var ply2 =initPoly(4.0,5.0,6.0)
-  
-  echo ply
-  echo ply2 
-  echo ply2-ply
-  
-  
-  
-  
-  var rts=ply.roots
-  if rts!=nil:
-    for i in rts:
-      echo formatFloat(i,ffDefault,0)
-  
-
-  discard readLine(stdin) 
-  
-  
-    
-  
-  
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-        
-        
-        
-    
\ No newline at end of file