[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#533762: grace: non-linear curve fitting tool in grace returns rms relative error instead of rms percentage error

Package: grace
Version: 1:5.1.22-2
Severity: normal

The non-linear curve fitting tool in grace outputs the wrong value next
to "RMS per cent error:" It actually gives the RMS **relative** error,
i.e. it is out by a factor of exactly 100.

The RMS per cent error should be given as:

e = 100 * (y'-y)^2/y^2

* Patch attached for source code

* Reported to developers:

-- System Information:
Debian Release: squeeze/sid
  APT prefers karmic-updates
  APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500,
'karmic-proposed'), (500, 'karmic-backports'), (500, 'karmic')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-9-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grace depends on:
ii  defoma        0.11.10-0.2ubuntu1         Debian Font Manager --
automatic f
ii  gconf2        2.26.2-1ubuntu1            GNOME configuration
database syste
ii  gsfonts       1:8.11+urwcyr1.0.7~pre44-4 Fonts for the Ghostscript
ii  lesstif2      1:0.95.0-2.3               OSF/Motif 2.1
implementation relea
ii  libc6         2.9-9ubuntu2               GNU C Library: Shared
ii  libfftw3-3    3.2.1-2ubuntu1             library for computing Fast
ii  libice6       2:1.0.5-1                  X11 Inter-Client Exchange
ii  libjpeg62     6b-14build1                The Independent JPEG
Group's JPEG 
ii  libnetcdf4    1:3.6.2-3.1                An interface for scientific
data a
ii  libpng12-0    1.2.37-1                   PNG library - runtime
ii  libsm6        2:1.1.0-2                  X11 Session Management
ii  libt1-5       5.1.2-3                    Type 1 font rasterizer
library - r
ii  libx11-6      2:1.2.1-1ubuntu1           X11 client-side library
ii  libxext6      2:        X11 miscellaneous extension
ii  libxmu6       2:1.0.4-1build1            X11 miscellaneous utility
ii  libxp6        1:1.0.0.xsf1-2             X Printing Extension
(Xprint) clie
ii  libxpm4       1:3.5.7-2                  X11 pixmap library
ii  libxt6        1:1.0.5-3ubuntu1           X11 toolkit intrinsics
ii  xmhtml1       1.1.7-15                   A Motif widget for display
ii  zlib1g        1:   compression library -

grace recommends no packages.

Versions of packages grace suggests:
ii  ghostscript        8.64.dfsg.1-0ubuntu14 The GPL Ghostscript
pn  grace-utils        <none>                (no description available)
ii  texlive-extra-util 2007.dfsg.2-6ubuntu2  TeX Live: TeX auxiliary

-- no debconf information

--- nonlfit.c.orig	2009-06-18 23:20:04.368929839 +0100
+++ nonlfit.c	2009-06-18 23:26:20.120928119 +0100
@@ -284,7 +284,7 @@
     	    rms_pe += (yp[i] - y_saved[i])*(yp[i] - y_saved[i])/
-        rms_pe = sqrt(rms_pe/n);
+        rms_pe = 100.0 * sqrt(rms_pe/n);
     for (i = 0; i < n; ++i) {

Reply to: