I am new to Haskell and need help in debugging my code.
I wrote the following function for calculating square roots using Newton's
method:
my_sqrt :: Float - Float
my_sqrt x = improve 1 x
where improve y x = if abs (y * y - x) epsilon
then y
Hi,
I noticed that searching on Haskell.org (using the Search feature at
the bottom) doesn't work as I expected. For example, searching for
memoise produces no results.
http://www.google.com/search?q=memoise+site%3Ahaskell.org produces 18
hits. Is this intentional?
Thanks,
Tamas
Hi,
Just thought I'd send out a quick mail to see if there are any other
Haskellers based in London who might be interested in getting
together occasionally.
Anyway, if you're interested please reply to this.
Cheers,
--Ben
___
Haskell-Cafe
Vraj Mohan [EMAIL PROTECTED] writes:
I am new to Haskell and need help in debugging my code.
I wrote the following function for calculating square roots using Newton's
method:
my_sqrt :: Float - Float
my_sqrt x = improve 1 x
where improve y x = if abs (y * y - x) epsilon
On Sun, Oct 15, 2006 at 08:37:19AM -0400, Tamas K Papp wrote:
I noticed that searching on Haskell.org (using the Search feature at
the bottom) doesn't work as I expected. For example, searching for
memoise produces no results.
This is searching haskellwiki.
On Sun, Oct 15, 2006 at 01:42:37PM +0100, Ben Moseley wrote:
Just thought I'd send out a quick mail to see if there are any other
Haskellers based in London who might be interested in getting
together occasionally.
Did you see
Hi
I noticed that searching on Haskell.org (using the Search feature at
the bottom) doesn't work as I expected. For example, searching for
memoise produces no results.
This is searching haskellwiki.
Does anyone have the search logs for this page? If they were
available, we might get a
I wrote:
Vraj Mohan [EMAIL PROTECTED] wrote:
(The equivalent code is well-behaved on MIT Scheme)
Is it? Is there equivalent code to “my_sqrt :: Float -
Float”? (that might be pertinent).
By which I mean HINT. (And one of the places to look for
bugs is where you have hand coded a constant
On Sun, Oct 15, 2006 at 12:17:20PM +, Vraj Mohan wrote:
I am new to Haskell and need help in debugging my code.
I wrote the following function for calculating square roots using Newton's
method:
my_sqrt :: Float - Float
my_sqrt x = improve 1 x
where improve y x = if abs (y
On Sun, Oct 15, 2006 at 03:41:53PM +0100, Neil Mitchell wrote:
Hi
I noticed that searching on Haskell.org (using the Search feature at
the bottom) doesn't work as I expected. For example, searching for
memoise produces no results.
This is searching haskellwiki.
Does anyone have the
Jim Apple wrote:
On 10/14/06, Brian Hulley [EMAIL PROTECTED] wrote:
User defined fixities are an enormous problem for
an interactive editor
This is the second or third time you've proposed a language change
based on the editor you're writing. I don't think this is a fruitful
avenue.
Vraj Mohan wrote:
my_sqrt :: Float - Float
my_sqrt x = improve 1 x
where improve y x = if abs (y * y - x) epsilon
then y
else improve ((y + (x/y))/ 2) x
epsilon = 0.1
This works for several
Hello Stefan,
Wednesday, October 11, 2006, 4:53:19 PM, you wrote:
So far the windows API seems to work for me. Currently I'm still struggling
to not
write garbage to the file but the shared access works now. Does anyone have an
example how to use it (e.g. the implementation of hPutStr on
Vraj Mohan wrote:
This works for several examples that I tried out but goes into an infinite loop
for my_sqrt 96. How do I go about debugging this code in GHC or Hugs?
(The equivalent code is well-behaved on MIT Scheme)
There was some excellent advice in the other responses, but I thought
[EMAIL PROTECTED] wrote:
Paul Hudak wrote:
In fact avoiding space leaks was one of the motivations for our moving
to an arrow framework for FRP (now called Yampa). Arrows amount to a
point-free coding style, although with "arrow syntax" the cumbersomeness
of programming in that
Hello Udo,
Sunday, October 15, 2006, 7:02:05 PM, you wrote:
stops getting better. It's also the reason why you code might work
with -fexcess-precision or in an untyped language or with the next or
previous compiler release or on rainy days or whatever else.
our brand-new GHC 22.6
G'day all.
Quoting Tamas K Papp [EMAIL PROTECTED]:
2. Newton's method is not guaranteed to converge.
For computing square roots, it is. The square root function is
exceedingly well-behaved.
But you can make things better by choosing a smart initial estimate.
The initial estimate in this
17 matches
Mail list logo