Assertion fails using abs()

8 views
Skip to first unread message

SiliconValley

unread,
Sep 7, 2009, 11:31:49 AM9/7/09
to fityk-users
Loaded Beta distribution definition:

define Beta(height=1, center=0.5, fwhm=0.05) = abs(height)*exp( lgamma
((center*((center*(1-center)/fwhm^2)-1))+((1-center)*((center*(1-
center)/fwhm^2)-1)))-lgamma((center*((center*(1-center)/fwhm^2)-1)))-
lgamma(((1-center)*((center*(1-center)/fwhm^2)-1))) )*x^((center*
((center*(1-center)/fwhm^2)-1))-1)*(1-x)^(((1-center)*((center*(1-
center)/fwhm^2)-1))-1)

As soon as I add a Beta function Fityk dies with the following
assertion:

file calc.cpp
line 228
expression: 0

If I change the abs(heigth) to sqrt(heigth^2) the crash does not
happen.

Hope it helps. Ciao!
mario

Marcin Wojdyr

unread,
Sep 7, 2009, 2:13:25 PM9/7/09
to fityk...@googlegroups.com
On Mon, Sep 7, 2009 at 17:31, SiliconValley<mva...@cscs.ch> wrote:
> As soon as I add a Beta function Fityk dies with the following
> assertion:
>
> file calc.cpp
> line 228
> expression: 0
>
> If I change the abs(heigth) to sqrt(heigth^2) the crash does not
> happen.

Fixed in r541.
Thanks,
Marcin

--
Marcin Wojdyr | http://www.unipress.waw.pl/~wojdyr/

Reply all
Reply to author
Forward
0 new messages