Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Square root
--ghc 8.0.1 /opt/ghc/8.0.1/lib/ghc-8.0.0.20160127/ sqroot x = let fn y lb ub count = if count > 100 then y else let y2 = y*y in if y2 == x then y else if y2 > x then fn ((y+lb)/2) lb y (count+1) else fn ((y+ub)/2) y ub (count+1) in fn 0 0 x 0 main = print(sqroot 100)
run
|
edit
|
history
|
help
0
Haskell remove item by index
Search
ad-hoc braille dot rendering
Cubed
Sierpinski Triangle as lazy list
pascal triangle
Goodstein sequences
(⁄⁄>⁄▽⁄<⁄⁄)
Kleinste
Haskell Prime Factorizer