[Top][All Lists]

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

[Octave-bug-tracker] [bug #54553] [octave forge] (statistics) Unit test

From: Rafael Laboissiere
Subject: [Octave-bug-tracker] [bug #54553] [octave forge] (statistics) Unit test in ttest.m fails on i386
Date: Wed, 22 Aug 2018 16:12:49 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36


                 Summary: [octave forge] (statistics) Unit test in ttest.m
fails on i386
                 Project: GNU Octave
            Submitted by: rlaboiss
            Submitted on: Wed 22 Aug 2018 08:12:48 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: other
        Operating System: Any



The unit test in file inst/ttest.m of the statistics package (version 1.4.0)
fails on the i386 architecture:

octave:1> pkg load statistics
octave:2> x = 8:0.1:12;
octave:3> [h, pval, ci] = ttest (x, 10);
octave:4> assert (h, 0)
octave:5> assert (pval, 1, 10*eps)
octave:6> assert (ci, [9.6219 10.3781], 1E-5)
octave:7> [h, pval, ci0] = ttest (x, 0);
octave:8> assert (h, 1)
octave:9> assert (pval, 0)
octave:10> assert (ci0, ci)
error: ASSERT errors for:  assert (ci0,ci)

  Location  |  Observed  |  Expected  |  Reason
    (2)        10.3781      10.3781      Abs err 1.7764e-15 exceeds tol 0 by

This happens because of this:

octave:11> format long
octave:12> ci
ci =

   9.621891416831676e+00   1.037810858316833e+01

octave:13> ci0
ci0 =

   9.621891416831676e+00   1.037810858316832e+01

This problem has been reported as a bug against the Debian package
octave-statistics (Bug#906820 <https://bugs.debian.org/906820>).

The patch attached to the present bug report fixes the problem.


File Attachments:

Date: Wed 22 Aug 2018 08:12:48 PM UTC  Name: ttest-tolerance.patch  Size: 539B
  By: rlaboiss



Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]