Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Many Myths are based on truth -- Spock, "The Way to Eden", stardate 5832.3


devel / comp.lang.forth / Bug fix in FSL-based utility: voigt.4th

SubjectAuthor
* Bug fix in FSL-based utility: voigt.4thKrishna Myneni
`- Re: Bug fix in FSL-based utility: voigt.4thKrishna Myneni

1
Bug fix in FSL-based utility: voigt.4th

<t5f7g5$jdn$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17848&group=comp.lang.forth#17848

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: krishna....@ccreweb.org (Krishna Myneni)
Newsgroups: comp.lang.forth
Subject: Bug fix in FSL-based utility: voigt.4th
Date: Tue, 10 May 2022 21:36:51 -0500
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <t5f7g5$jdn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 11 May 2022 02:36:53 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8744a4fb37aebd38caed82cc152294bc";
logging-data="19895"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wDMJtpeUu5Dgi6TWTxaPv"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Cancel-Lock: sha1:crDwwVa8L4MT4Aj5zds4GpycWyw=
Content-Language: en-US
 by: Krishna Myneni - Wed, 11 May 2022 02:36 UTC

I discovered a serious bug in my Forth code for computing the Voigt
function, which is a convolution of a Gaussian probability density and a
Lorentzian probability density. This code is included in the 32/64-bit
kForth packages, under forth-src/fsl/extras/

The problem is with initializing the widths of the Gaussian and
Lorentzian distributions, in preparation for using the words K(X,Y) or
VOIGT -- the latter computes a properly normalized probability density
function with abscissas in the same units as the supplied widths. Two
different methods of initialization are provided:

1) SET-FWHM-WIDTHS ( F: Gamma_G Gamma_L -- )

2) SET-SD-HWHM-WIDTHS ( F: sigma gamma_L -- )

The first, SET-FWHM-WIDTHS has a bug in initializing intermediate
quantities used by the words K(X,Y) and VOIGT. Gamma_G and Gamma_L are
the full width at half maxima (FWHM) for the Gaussian and Lorentzian
distributions.

The second, SET-SD-HWHM-WIDTHS does not have any known problems. It sets
the widths based on "sigma", the standard deviation of the Gaussian
distribution, and the half width at half maximum (HWHM) for the
Lorentzian distribution.

The bug in SET-FWHM-WIDTHS has been fixed, and an update of voigt.4th
has been pushed to the kForth-64 distribution. Beyond the automated test
code within the file, I will perform additional validation of the fix
before pushing it out to the 32-bit kForth distributions. The automated
test code for voigt.4th may be run using the following loader under kForth.

\ test-voigt.4th
include ans-words
include modules
include fsl/fsl-util
include fsl/complex
include fsl/adaptint
include fsl/extras/zwofz

\ Turn on testing for subsequently loaded modules containing test code
true to test-code?
include fsl/extras/voigt

--
Krishna Myneni

Re: Bug fix in FSL-based utility: voigt.4th

<t5f85f$mp7$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17849&group=comp.lang.forth#17849

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: krishna....@ccreweb.org (Krishna Myneni)
Newsgroups: comp.lang.forth
Subject: Re: Bug fix in FSL-based utility: voigt.4th
Date: Tue, 10 May 2022 21:48:13 -0500
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <t5f85f$mp7$1@dont-email.me>
References: <t5f7g5$jdn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 11 May 2022 02:48:16 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8744a4fb37aebd38caed82cc152294bc";
logging-data="23335"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qjGGB1FTdk0A2SlyZW/wM"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Cancel-Lock: sha1:s96HxJUJzQ2BOqxWl1oEVjjOCrY=
In-Reply-To: <t5f7g5$jdn$1@dont-email.me>
Content-Language: en-US
 by: Krishna Myneni - Wed, 11 May 2022 02:48 UTC

On 5/10/22 21:36, Krishna Myneni wrote:
> I discovered a serious bug in my Forth code for computing the Voigt
> function, which is a convolution of a Gaussian probability density and a
> Lorentzian probability density.
....
> The bug in SET-FWHM-WIDTHS has been fixed, and an update of voigt.4th
> has been pushed to the kForth-64 distribution. ...

Link to updated voigt.4th in the kForth-64 repo:

https://github.com/mynenik/kForth-64/blob/master/forth-src/fsl/extras/voigt.4th

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor