summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug1239.sci
blob: 0ffca1d810be52df74064e237b4095519fb019e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// <-- Non-regression test for bug 1239 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1239
//
// <-- Short Description -->
//    This bug was found by Marek. He says us in the newsgroup:
//
//    It seems that nanmax, nanmin functions are not working well,
//    or at
//    least not according to documentation(they should supposedly
//    ignore %nan
//    values). I get the wollowing results in scilab 3.0:
//
//    -->nanmax([%nan, -1])
//     ans  = Inf
//
//    -->nanmax([%nan, 1])
//     ans  = Inf
//    The same for nanmin. 
//    ========================================================
//
//    Btw, on a scilab cvs I don't see any problem with nanmin.
//
//     Bruno

// Author : Scilab Project - Pierre MARECHAL
// Copyright INRIA
// Date : 21 Mar 2005

if( (nanmax([%nan, -1]) <> -1) | (nanmax([%nan, 1]) <> 1) | (nanmin([%nan, -1]) <> -1) | (nanmin([%nan, 1]) <> 1) ) then
	affich_result(%F,1239);
else
	affich_result(%T,1239);
end