Re: winhugs crashes on C stack overflow

"Sigbjorn Finne" <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <003901c2d485$71378cc0$1e32a8c0@sofxp>
Hi there,

thanks for the bug report. No, this wasn't a known one, WinHugs'
evaluator thread didn't have an exception filter set up to catch
the stack overflow. It does now, making the behaviour uniform
across both versions of Hugs.

--sigbjorn

----- Original Message -----
From: "Jan Reineke" <[email protected]>
To: <[email protected]>
Sent: Wednesday, February 12, 2003 11:12
Subject: winhugs crashes on C stack overflow


> Hi,
>
> I am new to Haskell and functional programming in general, but I think
> that I have found a bug in Winhugs.
>
> When I call "wurzel 5" in the "dos-mode"-hugs after loading the attached
> file I get "ERROR - C stack overflow", which is ok. Winhugs crashes in
> the same situation. In my German Win2k version it says "winhugs.exe hat
> Fehler verursacht und wird geschlossen. Starten Sie das Programm neu.
> Ein Fehlerprotokoll wird erstellt." which means something like
> "winhugs.exe has created an error and is going to be closed. Restart the
> program."
>
> Is this a known issue?
>
> Regards,
> Jan Reineke
>


----------------------------------------------------------------------------
----


> absolutevalue :: (Double -> Double)
> absolutevalue x = if (x < 0)
> then -x
> else x
>
> newtoniteration :: (Double -> Double) -> (Double -> Double) -> Double ->
Double
> newtoniteration g gprime x = if (absolutevalue(g x/gprime x) < 0.01)
> then x
> else newtoniteration g gprime x-(g x/gprime x)
>
> wurzel a = newtoniteration (\x -> (x*x-a)) (\x -> x*x) 2
>
> f a x = x*x-a
> fprime x = x*x
> wurzelalternative a = newtoniteration (f a) fprime 2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.